From 517f726a4a61e7b18e1d290d28bcbd43a072af58 Mon Sep 17 00:00:00 2001 From: Burt P Date: Sat, 24 Aug 2019 16:45:18 -0500 Subject: monitors: fixes for vendor oui Signed-off-by: Burt P --- deps/sysobj_early/include/util_edid.h | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'deps/sysobj_early/include') diff --git a/deps/sysobj_early/include/util_edid.h b/deps/sysobj_early/include/util_edid.h index d2fe947b..5bb4b932 100644 --- a/deps/sysobj_early/include/util_edid.h +++ b/deps/sysobj_early/include/util_edid.h @@ -32,6 +32,19 @@ typedef struct { uint32_t offset; } edid_addy; +/* OUI is stored in EDID as 24-bit little-endian, + * but lookup file from IEEE expects big-endian. + * .oui_str is .oui rendered into big-endian for + * easy lookup. */ +typedef struct { + union { + char pnp[7]; /* only needs 3+null */ + char oui_str[7]; /* needs 6+null */ + }; + uint32_t oui; + uint8_t type; /* enum VEN_TYPE_* */ +} edid_ven; + typedef struct { char *str; uint16_t len; @@ -57,6 +70,9 @@ typedef struct { uint8_t revision; uint8_t len; uint8_t bounds_ok; + + /* for vendor specific block */ + edid_ven ven; } DisplayIDBlock; typedef struct { @@ -125,6 +141,9 @@ struct edid_cea_block { edid_addy addy; int type, len; uint8_t bounds_ok; + + /* for vendor specific block */ + edid_ven ven; }; struct edid_descriptor { @@ -146,13 +165,6 @@ enum { VEN_TYPE_OUI, }; -typedef struct { - //TODO: union? - char pnp[4]; - uint32_t oui; - uint8_t type; /* enum VEN_TYPE_* */ -} edid_ven; - enum { STD_EDID = 0, STD_EEDID = 1, -- cgit v1.2.3