diff options
author | Eric Miao <eric.miao@linaro.org> | 2011-09-17 22:47:43 +0800 |
---|---|---|
committer | Eric Miao <eric.miao@linaro.org> | 2011-09-17 23:04:26 +0800 |
commit | 631cc0a6d8f7f818a35e8bfdf3bb2a60d5abd9e6 (patch) | |
tree | f7d62f4c8af2f43aad700d02447c2582a78917e6 | |
parent | 4628c8759016090a85077859ebe19c0b2efaf8fa (diff) | |
download | linux-linaro-lt-2.6.38-2011.09.tar.gz |
SAUNCE: fix parsing of EDID extension block for HDMIlt-2.6.38-2011.09
BugLink: http://bugs.launchpad.net/bugs/837155
Fixed parsing of EDID extension block so HDMI capability will be
correctly identified and in turn S/PDIF audio will be correctly
configured.
Signed-off-by: Eric Miao <eric.miao@linaro.org>
-rw-r--r-- | drivers/video/mxc/mxc_edid.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/video/mxc/mxc_edid.c b/drivers/video/mxc/mxc_edid.c index 50355b550bb..8d92c686c7d 100644 --- a/drivers/video/mxc/mxc_edid.c +++ b/drivers/video/mxc/mxc_edid.c @@ -72,6 +72,7 @@ void mxc_edid_parse_ext_blk(unsigned char *edid, struct mxc_edid_cfg *cfg, struct fb_monspecs *specs) { + char detail_timming_desc_offset; unsigned char index = 0x0; if (edid[index++] != 0x2) /* only support cea ext block now */ @@ -79,11 +80,50 @@ void mxc_edid_parse_ext_blk(unsigned char *edid, if (edid[index++] != 0x3) /* only support version 3*/ return; + detail_timming_desc_offset = edid[index++]; + cfg->cea_underscan = (edid[index] >> 7) & 0x1; cfg->cea_basicaudio = (edid[index] >> 6) & 0x1; cfg->cea_ycbcr444 = (edid[index] >> 5) & 0x1; cfg->cea_ycbcr422 = (edid[index] >> 4) & 0x1; + index++; + while (index < detail_timming_desc_offset) { + unsigned char tagcode, blklen; + + tagcode = (edid[index] >> 5) & 0x7; + blklen = (edid[index]) & 0x1f; + + DPRINTK("Tagcode %x Len %d\n", tagcode, blklen); + + switch (tagcode) { + case 0x3: /*Vendor specific data*/ + { + unsigned char IEEE_reg_iden[3]; + IEEE_reg_iden[0] = edid[index+1]; + IEEE_reg_iden[1] = edid[index+2]; + IEEE_reg_iden[2] = edid[index+3]; + + if ((IEEE_reg_iden[0] == 0x03) && + (IEEE_reg_iden[1] == 0x0c) && + (IEEE_reg_iden[2] == 0x00)) + cfg->hdmi_cap = 1; + index += blklen; + break; + } + case 0x1: /*Audio data block*/ + case 0x2: /*Video data block*/ + case 0x4: /*Speaker allocation block*/ + case 0x7: /*User extended block*/ + default: + /* skip */ + index += blklen; + break; + } + + index++; + } + return fb_edid_add_monspecs(edid, specs); } |