[Intel-gfx] [PATCH 05/20] drm/i915: Reset glk degamma index after programming/readout
Shankar, Uma
uma.shankar at intel.com
Thu Sep 17 19:39:23 UTC 2020
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces at lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Saturday, July 18, 2020 2:44 AM
> To: intel-gfx at lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH 05/20] drm/i915: Reset glk degamma index after
> programming/readout
>
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Just for some extra consistency let's reset the glk degamma LUT index back to 0
> after we're dong trawling the LUT.
We do set this to 0 in the beginning, but I think good to leave in a clean state.
Reviewed-by: Uma Shankar <uma.shankar at intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_color.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c
> b/drivers/gpu/drm/i915/display/intel_color.c
> index 77c103a86a30..37a4fede7bc0 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -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)
> --
> 2.26.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list