Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/psr: Ignore enable_psr parameter on Panel Replay

Currently we are disabling Panel Replay if enable_psr != -1. Lets ignore
enable_psr completely on Panel Replay.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250715105509.4146806-3-jouni.hogander@intel.com

+7 -20
+7 -20
drivers/gpu/drm/i915/display/intel_psr.c
··· 233 233 234 234 static bool psr_global_enabled(struct intel_dp *intel_dp) 235 235 { 236 - struct intel_display *display = to_intel_display(intel_dp); 237 236 struct intel_connector *connector = intel_dp->attached_connector; 238 237 239 238 switch (intel_dp->psr.debug & I915_PSR_DEBUG_MODE_MASK) { 240 239 case I915_PSR_DEBUG_DEFAULT: 241 - if (display->params.enable_psr == -1) 242 - return intel_dp_is_edp(intel_dp) ? 243 - connector->panel.vbt.psr.enable : 244 - true; 245 - return display->params.enable_psr; 240 + return intel_dp_is_edp(intel_dp) ? 241 + connector->panel.vbt.psr.enable : true; 246 242 case I915_PSR_DEBUG_DISABLE: 247 243 return false; 248 244 default: ··· 246 250 } 247 251 } 248 252 249 - static bool psr2_global_enabled(struct intel_dp *intel_dp) 253 + static bool sel_update_global_enabled(struct intel_dp *intel_dp) 250 254 { 251 - struct intel_display *display = to_intel_display(intel_dp); 252 - 253 255 switch (intel_dp->psr.debug & I915_PSR_DEBUG_MODE_MASK) { 254 256 case I915_PSR_DEBUG_DISABLE: 255 257 case I915_PSR_DEBUG_FORCE_PSR1: 256 258 return false; 257 259 default: 258 - if (display->params.enable_psr == 1) 259 - return false; 260 260 return true; 261 261 } 262 262 } 263 263 264 264 static bool panel_replay_global_enabled(struct intel_dp *intel_dp) 265 265 { 266 - struct intel_display *display = to_intel_display(intel_dp); 267 - 268 - if ((display->params.enable_psr != -1) || 269 - (intel_dp->psr.debug & I915_PSR_DEBUG_PANEL_REPLAY_DISABLE)) 270 - return false; 271 - return true; 266 + return !(intel_dp->psr.debug & I915_PSR_DEBUG_PANEL_REPLAY_DISABLE); 272 267 } 273 268 274 269 static u32 psr_irq_psr_error_bit_get(struct intel_dp *intel_dp) ··· 1399 1412 int crtc_vdisplay = crtc_state->hw.adjusted_mode.crtc_vdisplay; 1400 1413 int psr_max_h = 0, psr_max_v = 0, max_bpp = 0; 1401 1414 1402 - if (!intel_dp->psr.sink_psr2_support) 1415 + if (!intel_dp->psr.sink_psr2_support || display->params.enable_psr == 1) 1403 1416 return false; 1404 1417 1405 1418 /* JSL and EHL only supports eDP 1.3 */ ··· 1504 1517 goto unsupported; 1505 1518 } 1506 1519 1507 - if (!psr2_global_enabled(intel_dp)) { 1520 + if (!sel_update_global_enabled(intel_dp)) { 1508 1521 drm_dbg_kms(display->drm, 1509 1522 "Selective update disabled by flag\n"); 1510 1523 goto unsupported; ··· 1552 1565 const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; 1553 1566 int entry_setup_frames; 1554 1567 1555 - if (!CAN_PSR(intel_dp)) 1568 + if (!CAN_PSR(intel_dp) || !display->params.enable_psr) 1556 1569 return false; 1557 1570 1558 1571 /*