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

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/psr: Compute PSR entry_setup_frames into intel_crtc_state

PSR entry_setup_frames is currently computed directly into struct
intel_dp:intel_psr:entry_setup_frames. This causes a problem if mode change
gets rejected after PSR compute config: Psr_entry_setup_frames computed for
this rejected state is in intel_dp:intel_psr:entry_setup_frame. Fix this by
computing it into intel_crtc_state and copy the value into
intel_dp:intel_psr:entry_setup_frames on PSR enable.

Fixes: 2b981d57e480 ("drm/i915/display: Support PSR entry VSC packet to be transmitted one frame earlier")
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: <stable@vger.kernel.org> # v6.8+
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260312083710.1593781-3-jouni.hogander@intel.com

+4 -2
+1
drivers/gpu/drm/i915/display/intel_display_types.h
··· 1188 1188 u32 dc3co_exitline; 1189 1189 u16 su_y_granularity; 1190 1190 u8 active_non_psr_pipes; 1191 + u8 entry_setup_frames; 1191 1192 const char *no_psr_reason; 1192 1193 1193 1194 /*
+3 -2
drivers/gpu/drm/i915/display/intel_psr.c
··· 1716 1716 entry_setup_frames = intel_psr_entry_setup_frames(intel_dp, conn_state, adjusted_mode); 1717 1717 1718 1718 if (entry_setup_frames >= 0) { 1719 - intel_dp->psr.entry_setup_frames = entry_setup_frames; 1719 + crtc_state->entry_setup_frames = entry_setup_frames; 1720 1720 } else { 1721 1721 crtc_state->no_psr_reason = "PSR setup timing not met"; 1722 1722 drm_dbg_kms(display->drm, ··· 1814 1814 { 1815 1815 struct intel_display *display = to_intel_display(intel_dp); 1816 1816 1817 - return (DISPLAY_VER(display) == 20 && intel_dp->psr.entry_setup_frames > 0 && 1817 + return (DISPLAY_VER(display) == 20 && crtc_state->entry_setup_frames > 0 && 1818 1818 !crtc_state->has_sel_update); 1819 1819 } 1820 1820 ··· 2190 2190 intel_dp->psr.pkg_c_latency_used = crtc_state->pkg_c_latency_used; 2191 2191 intel_dp->psr.io_wake_lines = crtc_state->alpm_state.io_wake_lines; 2192 2192 intel_dp->psr.fast_wake_lines = crtc_state->alpm_state.fast_wake_lines; 2193 + intel_dp->psr.entry_setup_frames = crtc_state->entry_setup_frames; 2193 2194 2194 2195 if (!psr_interrupt_error_check(intel_dp)) 2195 2196 return;