[PATCH 1/3] drm/i915/display: Move casf_compute_config

Nemesa Garg
2025-12-23T08:16:30Z

Prefill calculations are getting screwed up as casf_compute
is getting called in later stage. So move casf_compute_config
to crtc_compute_config and check if there is a change in the
sharpness strength, if so set the flag uapi.mode_changed
so that everytime when strength changes casf_compute_config
can be called and new strength value gets updated.

v2: Remove extra casf_check [Ville]

Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 9c6d3ecdb589..568730ffe359 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -2494,6 +2494,10 @@ static int intel_crtc_compute_config(struct intel_atomic_state *state,

intel_vrr_compute_guardband(crtc_state);

+ ret = intel_casf_compute_config(crtc_state);
+ if (ret)
+ return ret;
+
return 0;
}

@@ -4286,10 +4290,6 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state,
return ret;
}

- ret = intel_casf_compute_config(crtc_state);
- if (ret)
- return ret;
-
if (DISPLAY_VER(display) >= 9) {
if (intel_crtc_needs_modeset(crtc_state) ||
intel_crtc_needs_fastset(crtc_state) ||
@@ -6431,6 +6431,10 @@ int intel_atomic_check(struct drm_device *dev,
if (new_crtc_state->uapi.scaling_filter !=
old_crtc_state->uapi.scaling_filter)
new_crtc_state->uapi.mode_changed = true;
+
+ if (new_crtc_state->uapi.sharpness_strength !=
+ old_crtc_state->uapi.sharpness_strength)
+ new_crtc_state->uapi.mode_changed = true;
}

intel_vrr_check_modeset(state);
--
2.25.1