OSDN Git Service

msm: mdss: dp: fix calculation of link rate
authorAravind Venkateswaran <aravindh@codeaurora.org>
Fri, 16 Dec 2016 01:36:54 +0000 (17:36 -0800)
committerGerrit - the friendly Code Review server <code-review@localhost>
Thu, 22 Dec 2016 00:25:37 +0000 (16:25 -0800)
If the calculated link rate based on sink's capabilities exceeds
the maximum supported link rate, do not error out. Instead, cap
the link rate at the maximum supported rate. This fixes instability
issues seen when connecting to sinks at 4K resolution.

Change-Id: I214bb19385f855af61da628fdf1cf7efc5dd08d6
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
drivers/video/fbdev/msm/mdss_dp_aux.c

index 82588f6..b8be110 100644 (file)
@@ -537,8 +537,9 @@ char mdss_dp_gen_link_clk(struct mdss_panel_info *pinfo, char lane_cnt)
        else if (min_link_rate <= DP_LINK_RATE_540)
                calc_link_rate = DP_LINK_RATE_540;
        else {
-               pr_err("link_rate = %d is unsupported\n", min_link_rate);
-               calc_link_rate = 0;
+               /* Cap the link rate to the max supported rate */
+               pr_debug("link_rate = %d is unsupported\n", min_link_rate);
+               calc_link_rate = DP_LINK_RATE_540;
        }
 
        return calc_link_rate;