aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorDavid Ung <davidu@nvidia.com>2014-03-26 18:35:37 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-04-22 01:51:29 -0400
commite6853aafd4339dbf2992957ff2616ef7164bc9d4 (patch)
tree5c0422657ba3f25006720d7d331b04c169af3548 /drivers/video
parentf474f0e1fbc8d0daa41f17b9a65466e7c7dfd170 (diff)
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 <davidu@nvidia.com> Signed-off-by: Christopher Freeman <cfreeman@nvidia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/core/fbmon.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index c204ebe6187e..5b0e313849bd 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)
1012 while (pos < edid[2]) { 1012 while (pos < edid[2]) {
1013 u8 len = edid[pos] & 0x1f, type = (edid[pos] >> 5) & 7; 1013 u8 len = edid[pos] & 0x1f, type = (edid[pos] >> 5) & 7;
1014 pr_debug("Data block %u of %u bytes\n", type, len); 1014 pr_debug("Data block %u of %u bytes\n", type, len);
1015 if (type == 2) 1015 if (type == 2) {
1016 for (i = pos; i < pos + len; i++) { 1016 for (i = pos; i < pos + len; i++) {
1017 u8 idx = edid[pos + i] & 0x7f; 1017 u8 idx = edid[pos + i] & 0x7f;
1018 svd[svd_n++] = idx; 1018 svd[svd_n++] = idx;
1019 pr_debug("N%sative mode #%d\n", 1019 pr_debug("N%sative mode #%d\n",
1020 edid[pos + i] & 0x80 ? "" : "on-n", idx); 1020 edid[pos + i] & 0x80 ? "" : "on-n", idx);
1021 } 1021 }
1022 } else if (type == 3 && len >= 3) {
1023 /* Check Vendor Specific Data Block. For HDMI,
1024 it is always 00-0C-03 for HDMI Licensing, LLC. */
1025 if (edid[pos + 1] == 3 && edid[pos + 2] == 0xc &&
1026 edid[pos + 3] == 0)
1027 specs->misc |= FB_MISC_HDMI;
1028 }
1022 pos += len + 1; 1029 pos += len + 1;
1023 } 1030 }
1024 1031