msm: hdmi: edid: fix parsing of 4K resolution from DTD
Detailed Timing Descriptors (DTDs) listed in the EDID data contain the information about the horizontal addressable video pixels for each resolution. The maximum value that can be specified for this field is 4095. In certain instances, a sink may list a resolution with 4096 horizontal addressable video pixels in the DTD by listing a value of 4095. If this value is parsed as is, it can lead to incorrect behavior. Fix this by explicitly updating the value to 4096. CRs-Fixed: 2020154 Change-Id: I035bbef7d245c7cdd75a5bba8719fcca4592d8b7 Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
This commit is contained in:
parent
664cdd33f9
commit
14fe7ac1c2
1 changed files with 11 additions and 0 deletions
|
@ -1510,6 +1510,17 @@ static void hdmi_edid_detail_desc(struct hdmi_edid_ctrl *edid_ctrl,
|
|||
*/
|
||||
active_h = ((((u32)data_buf[0x4] >> 0x4) & 0xF) << 8)
|
||||
| data_buf[0x2];
|
||||
/*
|
||||
* It is possible that a sink might try to fit in the resolution
|
||||
* which has an active_h of 4096 into a DTD. However, DTD has only
|
||||
* 12 bit to represent active_h which would limit the maximum value
|
||||
* to 4095. If such a case is detected, set the active_h explicitly
|
||||
* to 4096.
|
||||
*/
|
||||
if (active_h == 0xFFF) {
|
||||
pr_debug("overriding h_active to 4096\n");
|
||||
active_h++;
|
||||
}
|
||||
|
||||
/*
|
||||
* EDID_TIMING_DESC_H_BLANK[0x3]: Relative Offset to the EDID detailed
|
||||
|
|
Loading…
Add table
Reference in a new issue