aboutsummaryrefslogtreecommitdiff
path: root/include/edid.h
diff options
context:
space:
mode:
authorJernej Skrabec2017-04-29 14:43:36 +0200
committerAnatolij Gustschin2017-05-15 20:32:12 +0200
commit43c6bdd0209ca31be84d572278485ed604582730 (patch)
tree36079aa166a2ef266c016b38fcb8e4f14109968f /include/edid.h
parentdc8cae4df3c016cbcb6eb8a841a7a94ff36b9e0b (diff)
edid: Add HDMI flag to timing info
Some DVI monitors don't show anything in HDMI mode since audio stream confuses them. To solve this situation, this commit adds HDMI flag in timing data and sets it accordingly during edid parsing. First existence of extension block is checked. If it exists and it is CEA861 extension, then data blocks are checked for presence of HDMI vendor specific data block. If it is present, HDMI flag is set. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/edid.h')
-rw-r--r--include/edid.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/edid.h b/include/edid.h
index 8b022fa98af..a9f2f3d3abf 100644
--- a/include/edid.h
+++ b/include/edid.h
@@ -19,6 +19,9 @@
#define EDID_SIZE 128
#define EDID_EXT_SIZE 256
+/* OUI of HDMI vendor specific data block */
+#define HDMI_IEEE_OUI 0x000c03
+
#define GET_BIT(_x, _pos) \
(((_x) >> (_pos)) & 1)
#define GET_BITS(_x, _pos_msb, _pos_lsb) \
@@ -234,6 +237,13 @@ struct edid1_info {
unsigned char checksum;
} __attribute__ ((__packed__));
+enum edid_cea861_db_types {
+ EDID_CEA861_DB_AUDIO = 0x01,
+ EDID_CEA861_DB_VIDEO = 0x02,
+ EDID_CEA861_DB_VENDOR = 0x03,
+ EDID_CEA861_DB_SPEAKER = 0x04,
+};
+
struct edid_cea861_info {
unsigned char extension_tag;
#define EDID_CEA861_EXTENSION_TAG 0x02
@@ -251,6 +261,10 @@ struct edid_cea861_info {
#define EDID_CEA861_DTD_COUNT(_x) \
GET_BITS(((_x).dtd_count), 3, 0)
unsigned char data[124];
+#define EDID_CEA861_DB_TYPE(_x, offset) \
+ GET_BITS((_x).data[offset], 7, 5)
+#define EDID_CEA861_DB_LEN(_x, offset) \
+ GET_BITS((_x).data[offset], 4, 0)
} __attribute__ ((__packed__));
/**