Skip to content

Commit f3c2503

Browse files
committed
drm/i915/psr: Add new SU area calculation helper to apply workarounds
intel_psr2_sel_fetch_update is already quite long function. Now we are about to add one more HW workaround. Let's split applying workarounds to selective update area into a separate function. Signed-off-by: Jouni Högander <[email protected]> Reviewed-by: Mika Kahola <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent e5ffdd8 commit f3c2503

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

drivers/gpu/drm/i915/display/intel_psr.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,11 +2519,24 @@ static bool psr2_sel_fetch_pipe_state_supported(const struct intel_crtc_state *c
25192519
return true;
25202520
}
25212521

2522+
static void
2523+
intel_psr_apply_su_area_workarounds(struct intel_crtc_state *crtc_state)
2524+
{
2525+
struct intel_display *display = to_intel_display(crtc_state);
2526+
struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
2527+
2528+
/* Wa_14014971492 */
2529+
if (!crtc_state->has_panel_replay &&
2530+
((IS_DISPLAY_VER_STEP(display, IP_VER(14, 0), STEP_A0, STEP_B0) ||
2531+
IS_ALDERLAKE_P(i915) || IS_TIGERLAKE(i915))) &&
2532+
crtc_state->splitter.enable)
2533+
crtc_state->psr2_su_area.y1 = 0;
2534+
}
2535+
25222536
int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
25232537
struct intel_crtc *crtc)
25242538
{
25252539
struct intel_display *display = to_intel_display(state);
2526-
struct drm_i915_private *dev_priv = to_i915(state->base.dev);
25272540
struct intel_crtc_state *crtc_state = intel_atomic_get_new_crtc_state(state, crtc);
25282541
struct intel_plane_state *new_plane_state, *old_plane_state;
25292542
struct intel_plane *plane;
@@ -2628,12 +2641,7 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
26282641
if (full_update)
26292642
goto skip_sel_fetch_set_loop;
26302643

2631-
/* Wa_14014971492 */
2632-
if (!crtc_state->has_panel_replay &&
2633-
((IS_DISPLAY_VER_STEP(display, IP_VER(14, 0), STEP_A0, STEP_B0) ||
2634-
IS_ALDERLAKE_P(dev_priv) || IS_TIGERLAKE(dev_priv))) &&
2635-
crtc_state->splitter.enable)
2636-
crtc_state->psr2_su_area.y1 = 0;
2644+
intel_psr_apply_su_area_workarounds(crtc_state);
26372645

26382646
ret = drm_atomic_add_affected_planes(&state->base, &crtc->base);
26392647
if (ret)

0 commit comments

Comments
 (0)