Use the consolidated HDMI tables before we try to compute them via
algorithm. The reason is that these are the ideal values and even
though the values calculated via the HDMI algorithm are correct but
not always ideal.

Signed-off-by: Suraj Kandpal <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_cx0_phy.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c 
b/drivers/gpu/drm/i915/display/intel_cx0_phy.c
index f6d69627154e..d0f764189567 100644
--- a/drivers/gpu/drm/i915/display/intel_cx0_phy.c
+++ b/drivers/gpu/drm/i915/display/intel_cx0_phy.c
@@ -2671,15 +2671,18 @@ static int intel_c20pll_calc_state(const struct 
intel_crtc_state *crtc_state,
        hw_state->cx0pll.use_c10 = false;
        hw_state->cx0pll.lane_count = crtc_state->lane_count;
 
-       /* try computed C20 HDMI tables before using consolidated tables */
-       if (!is_dp)
-               /* TODO: Update SSC state for HDMI as well */
-               err = intel_c20_compute_hdmi_tmds_pll(crtc_state, 
&hw_state->cx0pll.c20);
-
+       /*
+        * Try the ideal C20 HDMI tables before trying to compute them since 
the values
+        * calculated even though would be correct but not ideal
+        */
        if (err)
                err = intel_c20pll_calc_state_from_table(crtc_state, encoder,
                                                         &hw_state->cx0pll);
 
+       if (!is_dp && err)
+               err = intel_c20_compute_hdmi_tmds_pll(crtc_state, 
&hw_state->cx0pll.c20);
+               /* TODO: Update SSC state for HDMI as well */
+
        if (err)
                return err;
 
-- 
2.34.1

Reply via email to