drm/i915/psr: Move PSR workaround to intel_psr.c

Logical place for PSR workaround needing vblank delay is in
intel_psr_min_vblank_delay. Move it there.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://lore.kernel.org/r/20250423102704.1368310-2-jouni.hogander@intel.com
This commit is contained in:
Jouni Högander
2025-04-23 13:27:04 +03:00
parent 2930db123f
commit 2af5615a5b
2 changed files with 10 additions and 13 deletions

View File

@@ -2406,14 +2406,6 @@ static int intel_crtc_compute_pipe_mode(struct intel_crtc_state *crtc_state)
return 0;
}
static bool intel_crtc_needs_wa_14015401596(const struct intel_crtc_state *crtc_state)
{
struct intel_display *display = to_intel_display(crtc_state);
return intel_vrr_possible(crtc_state) && crtc_state->has_psr &&
IS_DISPLAY_VER(display, 13, 14);
}
static int intel_crtc_vblank_delay(const struct intel_crtc_state *crtc_state)
{
struct intel_display *display = to_intel_display(crtc_state);
@@ -2422,10 +2414,6 @@ static int intel_crtc_vblank_delay(const struct intel_crtc_state *crtc_state)
if (!HAS_DSB(display))
return 0;
/* Wa_14015401596 */
if (intel_crtc_needs_wa_14015401596(crtc_state))
vblank_delay = max(vblank_delay, 1);
vblank_delay = max(vblank_delay, intel_psr_min_vblank_delay(crtc_state));
return vblank_delay;

View File

@@ -48,6 +48,7 @@
#include "intel_psr_regs.h"
#include "intel_snps_phy.h"
#include "intel_vblank.h"
#include "intel_vrr.h"
#include "skl_universal_plane.h"
/**
@@ -2358,7 +2359,15 @@ int intel_psr_min_vblank_delay(const struct intel_crtc_state *crtc_state)
{
struct intel_display *display = to_intel_display(crtc_state);
if (!crtc_state->has_psr || DISPLAY_VER(display) < 20)
if (!crtc_state->has_psr)
return 0;
/* Wa_14015401596 */
if (intel_vrr_possible(crtc_state) && IS_DISPLAY_VER(display, 13, 14))
return 1;
/* Rest is for SRD_STATUS needed on LunarLake and onwards */
if (DISPLAY_VER(display) < 20)
return 0;
/*