Message ID | 20190318161317.30918-10-ville.syrjala@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: Clean up intel_color_check() | expand |
On Mon, Mar 18, 2019 at 06:13:16PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > We now bypass the legacy LUT when it's not needed, so > no point in filling it up with a linear LUT. > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> > --- > drivers/gpu/drm/i915/intel_color.c | 17 +---------------- > 1 file changed, 1 insertion(+), 16 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c > index 8c5c66f5d100..b84a2a3f5844 100644 > --- a/drivers/gpu/drm/i915/intel_color.c > +++ b/drivers/gpu/drm/i915/intel_color.c > @@ -376,15 +376,6 @@ static void i9xx_load_luts_internal(const struct intel_crtc_state *crtc_state, > (drm_color_lut_extract(lut[i].green, 8) << 8) | > drm_color_lut_extract(lut[i].blue, 8); > > - if (HAS_GMCH(dev_priv)) > - I915_WRITE(PALETTE(pipe, i), word); > - else > - I915_WRITE(LGC_PALETTE(pipe, i), word); > - } > - } else { > - for (i = 0; i < 256; i++) { > - u32 word = (i << 16) | (i << 8) | i; > - > if (HAS_GMCH(dev_priv)) > I915_WRITE(PALETTE(pipe, i), word); > else > @@ -643,7 +634,7 @@ static void cherryview_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_internal(crtc_state, gamma_lut); > + i9xx_load_luts(crtc_state); > return; > } > > @@ -682,12 +673,6 @@ static void cherryview_load_luts(const struct intel_crtc_state *crtc_state) > I915_WRITE(CGM_PIPE_GAMMA(pipe, i, 1), word1); > } > } > - > - /* > - * Also program a linear LUT in the legacy block (behind the > - * CGM block). > - */ > - i9xx_load_luts_internal(crtc_state, NULL); > } > > void intel_color_load_luts(const struct intel_crtc_state *crtc_state) > -- > 2.19.2 >
diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c index 8c5c66f5d100..b84a2a3f5844 100644 --- a/drivers/gpu/drm/i915/intel_color.c +++ b/drivers/gpu/drm/i915/intel_color.c @@ -376,15 +376,6 @@ static void i9xx_load_luts_internal(const struct intel_crtc_state *crtc_state, (drm_color_lut_extract(lut[i].green, 8) << 8) | drm_color_lut_extract(lut[i].blue, 8); - if (HAS_GMCH(dev_priv)) - I915_WRITE(PALETTE(pipe, i), word); - else - I915_WRITE(LGC_PALETTE(pipe, i), word); - } - } else { - for (i = 0; i < 256; i++) { - u32 word = (i << 16) | (i << 8) | i; - if (HAS_GMCH(dev_priv)) I915_WRITE(PALETTE(pipe, i), word); else @@ -643,7 +634,7 @@ static void cherryview_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_internal(crtc_state, gamma_lut); + i9xx_load_luts(crtc_state); return; } @@ -682,12 +673,6 @@ static void cherryview_load_luts(const struct intel_crtc_state *crtc_state) I915_WRITE(CGM_PIPE_GAMMA(pipe, i, 1), word1); } } - - /* - * Also program a linear LUT in the legacy block (behind the - * CGM block). - */ - i9xx_load_luts_internal(crtc_state, NULL); } void intel_color_load_luts(const struct intel_crtc_state *crtc_state)