diff options
author | Erik Gilling <konkers@android.com> | 2011-02-06 19:32:17 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2012-03-21 22:14:24 -0700 |
commit | 774422bd0e665226aafdd52b5ee9c42d16a81cf3 (patch) | |
tree | 40de34d4216a945f7243c4cb509451e8dade2f04 | |
parent | 1e2763942d501cc15f8ae8d823730e1012fff878 (diff) |
video: fbmon: add HDMI dectetion to fbmod edid parsing
Looks for ieee registration number 0x000c03 as per HDMI spec.
CEA-861-E section D.6.8.
Change-Id: I6875b24c66e8754510edabcb4f9ba682a50d6ac1
Signed-off-by: Erik Gilling <konkers@android.com>
Signed-off-by: Lajos Molnar <molnar@ti.com>
Rebase-Id: Rf3a48bcf800a61542c2226d728e7cde1c3889da7
-rw-r--r-- | drivers/video/fbmon.c | 9 | ||||
-rw-r--r-- | include/linux/fb.h | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c index c5aa9192b298..f4ad429c368a 100644 --- a/drivers/video/fbmon.c +++ b/drivers/video/fbmon.c @@ -1020,13 +1020,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) { + u32 ieee_reg = edid[pos + 1] | (edid[pos + 2] << 8) | + (edid[pos + 3] << 16); + if (ieee_reg == 0x000c03) + specs->misc |= FB_MISC_HDMI; + } + pos += len + 1; } diff --git a/include/linux/fb.h b/include/linux/fb.h index e8aeec3dc276..bb989a3a4bdd 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -449,6 +449,8 @@ struct file; #define FB_MISC_PRIM_COLOR 1 #define FB_MISC_1ST_DETAIL 2 /* First Detailed Timing is preferred */ +#define FB_MISC_HDMI 4 /* display supports HDMI signaling */ + struct fb_chroma { __u32 redx; /* in fraction of 1024 */ __u32 greenx; |