summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>2026-05-17 17:27:52 +0300
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>2026-05-25 13:33:30 +0300
commitd69da4f92d27c8ee178fc73dc5b035ad6d3201ae (patch)
tree5027d86830c2de54bf10d007bdea32d30ed1ec0c
parent3638d90b23798290ae9a34af1481fdcf617238b2 (diff)
downloadlinux-d69da4f92d27c8ee178fc73dc5b035ad6d3201ae.tar.xz
drm/i915/psr: Simplify the conditions for SCL computation
'needs_sel_update' is common for both display version branches, so check it once and keep the version specific checks as separate early returns. v2: Split into separate early returns. (Jani) Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patch.msgid.link/20260517142753.2813959-2-ankit.k.nautiyal@intel.com
-rw-r--r--drivers/gpu/drm/i915/display/intel_psr.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 19cfb23fe9f8..6d3801cb0612 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1508,15 +1508,18 @@ int _intel_psr_min_set_context_latency(const struct intel_crtc_state *crtc_state
* SRD_STATUS is used by PSR1 and Panel Replay DP on LunarLake.
*/
- if (DISPLAY_VER(display) >= 30 && (needs_panel_replay ||
- needs_sel_update))
+ if (needs_sel_update)
return 0;
- else if (DISPLAY_VER(display) < 30 && (needs_sel_update ||
- intel_crtc_has_type(crtc_state,
- INTEL_OUTPUT_EDP)))
+
+ if (DISPLAY_VER(display) < 30 &&
+ intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
return 0;
- else
- return 1;
+
+ if (DISPLAY_VER(display) >= 30 &&
+ needs_panel_replay)
+ return 0;
+
+ return 1;
}
static bool _wake_lines_fit_into_vblank(const struct intel_crtc_state *crtc_state,