]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/i915/dsb: Load LUTs using the DSB during vblank
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 6 Jun 2023 19:14:57 +0000 (22:14 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 27 Sep 2023 15:40:58 +0000 (18:40 +0300)
commit5ae0da3fc78d3fdef278a22e874d6d5c305d1e03
treee9efae584003c7a72f93ab0300526af85eb0fdc7
parentdd1c3eae5855ad36134ea415d84e567d2b55e6c7
drm/i915/dsb: Load LUTs using the DSB during vblank

Loading LUTs with the DSB outside of vblank doesn't really
work due to the palette anti-collision logic. Apparently the
DSB register writes don't get stalled like CPU mmio writes
do and instead we end up corrupting the LUT entries. Disabling
the anti-collision logic would allow us to successfully load
the LUT outside of vblank, but presumably that risks the LUT
reads from the scanout (temporarily) getting corrupted data
from the LUT instead.

The anti-collision logic isn't active during vblank so that
is when we can successfully load the LUT with the DSB. That is
what we want to do anyway to avoid tearing.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230606191504.18099-13-ville.syrjala@linux.intel.com
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
drivers/gpu/drm/i915/display/intel_color.c
drivers/gpu/drm/i915/display/intel_color.h
drivers/gpu/drm/i915/display/intel_crtc.c
drivers/gpu/drm/i915/display/intel_display.c