Skip to content

Commit d92df66

Browse files
committed
drm/i915/psr: Implement Wa 14019834836
This patch implements HW workaround 14019834836 for display version 30. v2: - move Wa 14019834836 to it's own function - apply only for display version 30 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 f3c2503 commit d92df66

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

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

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

2522+
/* Wa 14019834836 */
2523+
static void intel_psr_apply_pr_link_on_su_wa(struct intel_crtc_state *crtc_state)
2524+
{
2525+
struct intel_display *display = to_intel_display(crtc_state);
2526+
struct intel_encoder *encoder;
2527+
int hactive_limit;
2528+
2529+
if (crtc_state->psr2_su_area.y1 != 0 ||
2530+
crtc_state->psr2_su_area.y2 != 0)
2531+
return;
2532+
2533+
if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420)
2534+
hactive_limit = intel_dp_is_uhbr(crtc_state) ? 1230 : 546;
2535+
else
2536+
hactive_limit = intel_dp_is_uhbr(crtc_state) ? 615 : 273;
2537+
2538+
if (crtc_state->hw.adjusted_mode.hdisplay < hactive_limit)
2539+
return;
2540+
2541+
for_each_intel_encoder_mask_with_psr(display->drm, encoder,
2542+
crtc_state->uapi.encoder_mask) {
2543+
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
2544+
2545+
if (!intel_dp_is_edp(intel_dp) &&
2546+
intel_dp->psr.panel_replay_enabled &&
2547+
intel_dp->psr.sel_update_enabled) {
2548+
crtc_state->psr2_su_area.y2++;
2549+
return;
2550+
}
2551+
}
2552+
}
2553+
25222554
static void
25232555
intel_psr_apply_su_area_workarounds(struct intel_crtc_state *crtc_state)
25242556
{
@@ -2531,6 +2563,10 @@ intel_psr_apply_su_area_workarounds(struct intel_crtc_state *crtc_state)
25312563
IS_ALDERLAKE_P(i915) || IS_TIGERLAKE(i915))) &&
25322564
crtc_state->splitter.enable)
25332565
crtc_state->psr2_su_area.y1 = 0;
2566+
2567+
/* Wa 14019834836 */
2568+
if (DISPLAY_VER(display) == 30)
2569+
intel_psr_apply_pr_link_on_su_wa(crtc_state);
25342570
}
25352571

25362572
int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,

0 commit comments

Comments
 (0)