On Tue, 01 Oct 2019, Swati Sharma <swati2.sharma@xxxxxxxxx> wrote: > Premature gamma lut prepration and loading which was getting > reflected in first modeset causing different colors on > screen during boot. > > Issue: In BIOS, gamma is disabled by default. However, > legacy_read_luts() was getting called even before the legacy_load_luts() > which was setting crtc_state->base.gamma_lut and gamma_lut was > programmed with junk values which led to visual artifacts (different > colored screens instead of usual black during boot). > > Fix: Calling read_luts() only when gamma is enabled which will happen > after first modeset. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111809 I'm confused. Is there a current problem upstream after the revert 1b8588741fdc ("Revert "drm/i915/color: Extract icl_read_luts()"")? Or does this fix a problem that only occurs in conjunction with the reverted commit? Then say so. Note inline. > Signed-off-by: Swati Sharma <swati2.sharma@xxxxxxxxx> > --- > drivers/gpu/drm/i915/display/intel_display.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > index f1328c08f4ad..f89aa4bb9f42 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -10528,7 +10528,9 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc, > i9xx_get_pipe_color_config(pipe_config); > } > > - intel_color_get_config(pipe_config); > + if ((INTEL_GEN(dev_priv) >= 11 && (pipe_config->gamma_mode & POST_CSC_GAMMA_ENABLE)) || > + (INTEL_GEN(dev_priv) >= 9 && (pipe_config->gamma_enable))) > + intel_color_get_config(pipe_config); Put all of the conditions inside intel_color_get_config(). BR, Jani. > > power_domain = POWER_DOMAIN_PIPE_PANEL_FITTER(crtc->pipe); > WARN_ON(power_domain_mask & BIT_ULL(power_domain)); -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx