[Intel-gfx] [PATCH 16/20] drm/i915: Make ilk_read_luts() capable of degamma readout

Shankar, Uma uma.shankar at intel.com
Thu Sep 17 20:58:48 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 16/20] drm/i915: Make ilk_read_luts() capable of
> degamma readout
> 
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Just like ivb+, ilk/snb can select whether the hw lut acts as gamma or degamma.
> Make the readout cognizant of that fact.

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 | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c
> b/drivers/gpu/drm/i915/display/intel_color.c
> index 12a41fb4a98c..7f9e26419b56 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -1977,19 +1977,19 @@ static struct drm_property_blob
> *ilk_read_lut_10(struct intel_crtc *crtc)  static void ilk_read_luts(struct
> intel_crtc_state *crtc_state)  {
>  	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> +	struct drm_property_blob **blob =
> +		crtc_state->csc_mode & CSC_POSITION_BEFORE_GAMMA ?
> +		&crtc_state->hw.gamma_lut : &crtc_state->hw.degamma_lut;
> 
>  	if (!crtc_state->gamma_enable)
>  		return;
> 
> -	if ((crtc_state->csc_mode & CSC_POSITION_BEFORE_GAMMA) == 0)
> -		return;
> -
>  	switch (crtc_state->gamma_mode) {
>  	case GAMMA_MODE_MODE_8BIT:
> -		crtc_state->hw.gamma_lut = ilk_read_lut_8(crtc);
> +		*blob = ilk_read_lut_8(crtc);
>  		break;
>  	case GAMMA_MODE_MODE_10BIT:
> -		crtc_state->hw.gamma_lut = ilk_read_lut_10(crtc);
> +		*blob = ilk_read_lut_10(crtc);
>  		break;
>  	default:
>  		MISSING_CASE(crtc_state->gamma_mode);
> --
> 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