[Intel-gfx] [PATCH 02/12] drm/i915: Polish CHV .load_luts() a bit
Sharma, Swati2
swati2.sharma at intel.com
Tue Mar 3 14:18:38 UTC 2020
Hi Ville,
Can you please rebase the series? There are intel_de_write()
changes in existing code.
On 07-Nov-19 8:47 PM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> It irks me to use crtc_state_is_legacy_gamma() inside the guts
> of the CHV color management code. Let's get rid of it and instead
> just consult cgm_mode to figure out if we want to enable the pipe
> gamma or the CGM gamma.
>
> Also CHV display engine is based on i965/g4x so we should fall back
> to the i965 path when the CGM gamma is not used.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_color.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
> index 3980e8b50c28..d8ee90b7774a 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -996,16 +996,13 @@ static void chv_load_luts(const struct intel_crtc_state *crtc_state)
>
> cherryview_load_csc_matrix(crtc_state);
>
> - if (crtc_state_is_legacy_gamma(crtc_state)) {
> - i9xx_load_luts(crtc_state);
> - return;
> - }
> -
> - if (degamma_lut)
> + if (crtc_state->cgm_mode & CGM_PIPE_MODE_DEGAMMA)
> chv_load_cgm_degamma(crtc, degamma_lut);
>
> - if (gamma_lut)
> + if (crtc_state->cgm_mode & CGM_PIPE_MODE_GAMMA)
> chv_load_cgm_gamma(crtc, gamma_lut);
> + else
> + i965_load_luts(crtc_state);
> }
>
> void intel_color_load_luts(const struct intel_crtc_state *crtc_state)
>
Reviewed-by: Swati Sharma <swati2.sharma at intel.com>
--
~Swati Sharma
More information about the Intel-gfx
mailing list