]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/i915: Plumb the entire atomic state into intel_color_check()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 23 May 2024 18:28:16 +0000 (21:28 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 27 May 2024 11:29:51 +0000 (14:29 +0300)
commit5f128aa1052e7d28074ac9b5279d0a09232b699a
tree093150711c2155db1f9bc49f9b7fd071d0a47c5f
parentfabdb275e5ed13271d8fa218a22616ba7ae5aeea
drm/i915: Plumb the entire atomic state into intel_color_check()

Bunch of stuff in intel_color_check() needs to look at both the
old and new crtc states. Currently we do that by digging the
full atomic state via the crtc_state->state pointer. That thing
is a total footgun if I ever saw one, as it's only valid during
specific parts of the atomic flow. A lot of people have been
bitten by this thing in the past when trying to use it after
it's no longer valid.

Take a small step towards elimination of the footgun by not
using it in the inte_color_check(). Instead we plumb in the
entire atomic state all the way from the top.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240523182818.15382-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_color.c
drivers/gpu/drm/i915/display/intel_color.h
drivers/gpu/drm/i915/display/intel_display.c