All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/color: fix broken display in icl+
@ 2019-10-01  6:31 Swati Sharma
  2019-10-01  6:56 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Swati Sharma @ 2019-10-01  6:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula, ankit.k.nautiyal

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
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 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);
 
 	power_domain = POWER_DOMAIN_PIPE_PANEL_FITTER(crtc->pipe);
 	WARN_ON(power_domain_mask & BIT_ULL(power_domain));
-- 
2.23.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-10-01 14:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-01  6:31 [PATCH] drm/i915/color: fix broken display in icl+ Swati Sharma
2019-10-01  6:56 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-10-01  7:23 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-01  8:03 ` [PATCH] " Jani Nikula
2019-10-01 14:21   ` Ville Syrjälä
2019-10-01 14:28     ` Sharma, Swati2
2019-10-01 14:36       ` Ville Syrjälä
2019-10-01 14:31     ` Saarinen, Jani
2019-10-01  9:09 ` ✗ Fi.CI.IGT: failure for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.