[Intel-gfx] [PATCH v2 2/3] drm/i915/xelpd: Enable Pipe Degamma

Ville Syrjälä ville.syrjala at linux.intel.com
Tue Nov 30 10:01:41 UTC 2021


On Mon, Nov 29, 2021 at 06:19:52PM +0200, Jani Nikula wrote:
> On Fri, 26 Nov 2021, Uma Shankar <uma.shankar at intel.com> wrote:
> > Enable Pipe Degamma for XE_LPD. Extend the legacy implementation
> > to incorparate the extended lut size for XE_LPD.
> >
> > v2: Added a helper for degamma lut size (Ville)
> >
> > Signed-off-by: Uma Shankar <uma.shankar at intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_color.c | 14 +++++++++++---
> >  1 file changed, 11 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
> > index 42fe549ef6fe..de3ded1e327a 100644
> > --- a/drivers/gpu/drm/i915/display/intel_color.c
> > +++ b/drivers/gpu/drm/i915/display/intel_color.c
> > @@ -808,6 +808,14 @@ static void bdw_load_luts(const struct intel_crtc_state *crtc_state)
> >  	}
> >  }
> >  
> > +static int glk_degamma_lut_size(struct drm_i915_private *i915)
> > +{
> > +	if (DISPLAY_VER(i915) >= 13)
> > +		return 131;
> > +	else
> > +		return 35;
> > +}
> > +
> 
> Why do we have both a function with hardcoded values and device info
> members for this?

The device info stuff just needs to get nuked. The size of the LUTs
depends on the gamma mode which we already select dynamically (and
if/when we get thre new uapi ironed out it'll become even more
dynamic), so trying to represent it with a single number in device 
info is futile.

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list