File: edid.h

package info (click to toggle)
qemu 1%3A10.0.3%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 413,680 kB
  • sloc: ansic: 4,733,433; pascal: 114,769; python: 105,506; asm: 68,431; sh: 52,881; makefile: 27,469; perl: 18,778; cpp: 11,435; xml: 3,404; objc: 2,877; yacc: 2,505; php: 1,299; tcl: 1,296; lex: 1,110; sql: 71; awk: 43; sed: 35; javascript: 7
file content (32 lines) | stat: -rw-r--r-- 1,157 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef EDID_H
#define EDID_H

typedef struct qemu_edid_info {
    const char *vendor; /* http://www.uefi.org/pnp_id_list */
    const char *name;
    const char *serial;
    uint16_t    width_mm;
    uint16_t    height_mm;
    uint32_t    prefx;
    uint32_t    prefy;
    uint32_t    maxx;
    uint32_t    maxy;
    uint32_t    refresh_rate;
} qemu_edid_info;

void qemu_edid_generate(uint8_t *edid, size_t size,
                        qemu_edid_info *info);
size_t qemu_edid_size(uint8_t *edid);
void qemu_edid_region_io(MemoryRegion *region, Object *owner,
                         uint8_t *edid, size_t size);

uint32_t qemu_edid_dpi_to_mm(uint32_t dpi, uint32_t res);

#define DEFINE_EDID_PROPERTIES(_state, _edid_info)                         \
    DEFINE_PROP_UINT32("xres", _state, _edid_info.prefx, 0),               \
    DEFINE_PROP_UINT32("yres", _state, _edid_info.prefy, 0),               \
    DEFINE_PROP_UINT32("xmax", _state, _edid_info.maxx, 0),                \
    DEFINE_PROP_UINT32("ymax", _state, _edid_info.maxy, 0),                \
    DEFINE_PROP_UINT32("refresh_rate", _state, _edid_info.refresh_rate, 0)

#endif /* EDID_H */