diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2017-04-23 20:14:07 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-04-23 20:14:07 +0200 |
commit | 23e311b6f0f881f4030b075b02558a836b08230e (patch) | |
tree | 818edc666cf77bfbd9af18c46da62af856df4dbe /drmtools.h | |
parent | b50a220f5ffe90b0b2cff3c3ec3002e9f942cff4 (diff) | |
download | drminfo-23e311b6f0f881f4030b075b02558a836b08230e.tar.gz |
revamp formats
Diffstat (limited to 'drmtools.h')
-rw-r--r-- | drmtools.h | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -1,5 +1,21 @@ +struct fbformat { + const char name[8]; + const char fields[16]; + const char bits[16]; + uint32_t bpp; /* bytes per pixel */ + uint32_t depth; /* legacy (ADDFB) */ + uint32_t fourcc; /* DRM_FORMAT_* (ADDFB2) */ + cairo_format_t cairo; /* CAIRO_FORMAT_* */ +}; + +extern const struct fbformat fmts[]; +extern const uint32_t fmtcnt; + +/* ------------------------------------------------------------------ */ + const char *drm_connector_type_name(int nr); const char *drm_connector_mode_name(int nr); const char *drm_encoder_type_name(int nr); void drm_conn_name(drmModeConnector *conn, char *dest, int dlen); -bool drm_probe_format(int fd, uint32_t bpp, uint32_t depth, uint32_t fourcc, bool print); +bool drm_probe_format(int fd, const struct fbformat *fmt); +void drm_print_format(FILE *fp, const struct fbformat *fmt); |