From e6853aafd4339dbf2992957ff2616ef7164bc9d4 Mon Sep 17 00:00:00 2001 From: David Ung Date: Wed, 26 Mar 2014 15:35:37 -0700 Subject: video: Check EDID for HDMI connection Check EDID Vendor Specific Data Block bytes to see if the connection is HDMI and set FB_MISC_HDMI. Signed-off-by: David Ung Signed-off-by: Christopher Freeman Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/core/fbmon.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c index c204ebe6187..5b0e313849b 100644 --- a/drivers/video/fbdev/core/fbmon.c +++ b/drivers/video/fbdev/core/fbmon.c @@ -1012,13 +1012,20 @@ void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs) while (pos < edid[2]) { u8 len = edid[pos] & 0x1f, type = (edid[pos] >> 5) & 7; pr_debug("Data block %u of %u bytes\n", type, len); - if (type == 2) + if (type == 2) { for (i = pos; i < pos + len; i++) { u8 idx = edid[pos + i] & 0x7f; svd[svd_n++] = idx; pr_debug("N%sative mode #%d\n", edid[pos + i] & 0x80 ? "" : "on-n", idx); } + } else if (type == 3 && len >= 3) { + /* Check Vendor Specific Data Block. For HDMI, + it is always 00-0C-03 for HDMI Licensing, LLC. */ + if (edid[pos + 1] == 3 && edid[pos + 2] == 0xc && + edid[pos + 3] == 0) + specs->misc |= FB_MISC_HDMI; + } pos += len + 1; } -- cgit v1.2.3-70-g09d2