]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Reset glk degamma index after programming/readout
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 25 Sep 2020 13:16:52 +0000 (16:16 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 28 Sep 2020 15:09:41 +0000 (18:09 +0300)
Just for some extra consistency let's reset the glk degamma LUT
index back to 0 after we're dong trawling the LUT.

Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200925131656.10022-6-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_color.c

index 77c103a86a307a6778d1370a92c31a9754ec1569..37a4fede7bc062a114309d71d47506a6e2b3b8d1 100644 (file)
@@ -818,12 +818,14 @@ static void glk_load_degamma_lut(const struct intel_crtc_state *crtc_state)
                 * as compared to just 16 to achieve this.
                 */
                intel_de_write(dev_priv, PRE_CSC_GAMC_DATA(pipe),
-                              lut[i].green);
+                              lut[i].green);
        }
 
        /* Clamp values > 1.0. */
        while (i++ < 35)
                intel_de_write(dev_priv, PRE_CSC_GAMC_DATA(pipe), 1 << 16);
+
+       intel_de_write(dev_priv, PRE_CSC_GAMC_INDEX(pipe), 0);
 }
 
 static void glk_load_degamma_lut_linear(const struct intel_crtc_state *crtc_state)
@@ -851,6 +853,8 @@ static void glk_load_degamma_lut_linear(const struct intel_crtc_state *crtc_stat
        /* Clamp values > 1.0. */
        while (i++ < 35)
                intel_de_write(dev_priv, PRE_CSC_GAMC_DATA(pipe), 1 << 16);
+
+       intel_de_write(dev_priv, PRE_CSC_GAMC_INDEX(pipe), 0);
 }
 
 static void glk_load_luts(const struct intel_crtc_state *crtc_state)