aboutsummaryrefslogtreecommitdiffstats
path: root/drmtools.h
blob: f3ef2bf55795e2492046a61d0125f5a4cc688629 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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_*          */
    pixman_format_code_t  pixman;   /* PIXMAN_*                 */
};

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, const struct fbformat *fmt);
void drm_print_format(FILE *fp, const struct fbformat *fmt,
                      int indent, bool libs);
void drm_print_format_hdr(FILE *fp, int indent, bool libs);