From bc176f3364053e465518bc4491e10864a7d9a94b Mon Sep 17 00:00:00 2001 From: Aravind Venkateswaran Date: Sun, 15 Jan 2017 15:22:46 -0800 Subject: [PATCH] msm: hdmi: edid: always add timings parsed from DTD to reserved list Resolutions listed in the Detailed Timing Descriptor (DTD) have detailed information about all the timings. Current implementation attempts to match the parsed resolution with the resolution database based on just the Video Information Code (VIC). This can potentially overlook mismatches in certain parameters such as refresh rates and can cause unintended results. Fix this by always adding the resolutions parsed from the DTDs to the reserved timing list. CRs-Fixed: 1109812 Change-Id: I8b926f08ce9b44c4a16a32fed26fedd351d77ae8 Signed-off-by: Aravind Venkateswaran --- drivers/video/fbdev/msm/mdss_hdmi_edid.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/msm/mdss_hdmi_edid.c b/drivers/video/fbdev/msm/mdss_hdmi_edid.c index 5793186df491..160898ee2b6c 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_edid.c +++ b/drivers/video/fbdev/msm/mdss_hdmi_edid.c @@ -1607,9 +1607,14 @@ static void hdmi_edid_detail_desc(struct hdmi_edid_ctrl *edid_ctrl, (timing.refresh_rate % 100) / 10, timing.refresh_rate % 10); - rc = hdmi_get_video_id_code(&timing, NULL); - if (rc < 0) - rc = hdmi_set_resv_timing_info(&timing); + /* + * Always add resolutions parsed from DTD in the reserved + * timing info. This can avoid matching resolutions that have + * a non-integral fps denominators with corresponding + * resolutions that have an integral fps denominator. + * For example - 640x480p@59.94Hz --> 640x480p@60Hz + */ + rc = hdmi_set_resv_timing_info(&timing); } else { rc = -EINVAL; }