summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/intel_display.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2024-05-23 21:28:16 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2024-05-27 14:29:51 +0300
commit5f128aa1052e7d28074ac9b5279d0a09232b699a (patch)
tree093150711c2155db1f9bc49f9b7fd071d0a47c5f /drivers/gpu/drm/i915/display/intel_display.c
parentfabdb275e5ed13271d8fa218a22616ba7ae5aeea (diff)
downloadlinux-5f128aa1052e7d28074ac9b5279d0a09232b699a.tar.gz
linux-5f128aa1052e7d28074ac9b5279d0a09232b699a.tar.bz2
linux-5f128aa1052e7d28074ac9b5279d0a09232b699a.zip
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>
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_display.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 58a4060f90b4..61c073fc0a46 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4255,7 +4255,7 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state,
crtc_state->uapi.color_mgmt_changed = true;
if (intel_crtc_needs_color_update(crtc_state)) {
- ret = intel_color_check(crtc_state);
+ ret = intel_color_check(state, crtc);
if (ret)
return ret;
}