]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/color: fix broken gamma state-checker during boot
authorSwati Sharma <swati2.sharma@intel.com>
Wed, 9 Oct 2019 06:55:39 +0000 (12:25 +0530)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 9 Oct 2019 14:13:14 +0000 (17:13 +0300)
commit36f5a4b0dde569184d8b8c09e561a653efd7ed8c
tree99f22ff62686a3b256b0866a927caae56170a975
parent662652780090bbcd05e0e1fb17daa98bcc6d75e8
drm/i915/color: fix broken gamma state-checker during boot

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 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.

This fix is independent from the revert ec867ff8c421 ("Revert
"drm/i915/color: Extract icl_read_luts()"") and should fix different colors
on screen in legacy platforms too.

v2:
-Added gamma_enable checks inside read_luts() [Ville/Jani N]
-Corrected gamma enable check for CHV [Ville]

v3:
-Added check in ilk_read_luts() [Ville]
-Simplified gamma enable check for CHV [Ville]

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111809
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111885
Tested-by: Jani Saarinen <jani.saarinen@intel.com>
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191009065542.27415-2-swati2.sharma@intel.com
drivers/gpu/drm/i915/display/intel_color.c