Skip to content

Commit 4703049

Browse files
hogandertursulin
authored andcommitted
drm/i915/psr: Apply Intel DPCD workaround when SDP on prior line used
There is Intel specific workaround DPCD address containing workaround for case where SDP is on prior line. Apply this workaround according to values in the offset. Fixes: 61e8873 ("drm/i915/xelpd: Handle PSR2 SDP indication in the prior scanline") Cc: <stable@vger.kernel.org> # v5.15+ Signed-off-by: Jouni Högander <jouni.hogander@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260515095756.2799483-4-jouni.hogander@intel.com (cherry picked from commit c3fe899) Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
1 parent f30bece commit 4703049

1 file changed

Lines changed: 31 additions & 4 deletions

File tree

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

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,9 +1365,35 @@ static bool psr2_granularity_check(struct intel_crtc_state *crtc_state,
13651365
return true;
13661366
}
13671367

1368-
static bool _compute_psr2_sdp_prior_scanline_indication(struct intel_dp *intel_dp,
1369-
struct intel_crtc_state *crtc_state)
1368+
static bool apply_scanline_indication_wa(struct intel_crtc_state *crtc_state,
1369+
struct intel_connector *connector)
13701370
{
1371+
struct intel_dp *intel_dp = intel_attached_dp(connector);
1372+
u8 early_scanline_support = connector->dp.psr_caps.intel_wa_dpcd &
1373+
INTEL_DPCD_INTEL_WA_REGISTER_CAPS_PSR2_EARLYSCANLINE_SDP_SUPPORT_MASK;
1374+
1375+
if (intel_dp->edp_dpcd[0] >= DP_EDP_15)
1376+
return true;
1377+
1378+
switch (early_scanline_support) {
1379+
case INTEL_DPCD_INTEL_WA_REGISTER_CAPS_FALL_BACK_TO_PSR1:
1380+
crtc_state->req_psr2_sdp_prior_scanline = false;
1381+
return false;
1382+
case INTEL_DPCD_INTEL_WA_REGISTER_CAPS_PSR2_WITH_EARLY_SCANLINE:
1383+
return true;
1384+
case INTEL_DPCD_INTEL_WA_REGISTER_CAPS_PSR2_WITHOUT_EARLY_SCANLINE:
1385+
crtc_state->req_psr2_sdp_prior_scanline = false;
1386+
return true;
1387+
default:
1388+
MISSING_CASE(early_scanline_support);
1389+
return false;
1390+
}
1391+
}
1392+
1393+
static bool _compute_psr2_sdp_prior_scanline_indication(struct intel_crtc_state *crtc_state,
1394+
struct intel_connector *connector)
1395+
{
1396+
struct intel_dp *intel_dp = intel_attached_dp(connector);
13711397
struct intel_display *display = to_intel_display(intel_dp);
13721398
const struct drm_display_mode *adjusted_mode = &crtc_state->uapi.adjusted_mode;
13731399
u32 hblank_total, hblank_ns, req_ns;
@@ -1386,7 +1412,8 @@ static bool _compute_psr2_sdp_prior_scanline_indication(struct intel_dp *intel_d
13861412
return false;
13871413

13881414
crtc_state->req_psr2_sdp_prior_scanline = true;
1389-
return true;
1415+
1416+
return apply_scanline_indication_wa(crtc_state, connector);
13901417
}
13911418

13921419
static int intel_psr_entry_setup_frames(struct intel_dp *intel_dp,
@@ -1667,7 +1694,7 @@ static bool intel_sel_update_config_valid(struct intel_crtc_state *crtc_state,
16671694
conn_state))
16681695
goto unsupported;
16691696

1670-
if (!_compute_psr2_sdp_prior_scanline_indication(intel_dp, crtc_state)) {
1697+
if (!_compute_psr2_sdp_prior_scanline_indication(crtc_state, connector)) {
16711698
drm_dbg_kms(display->drm,
16721699
"Selective update not enabled, SDP indication do not fit in hblank\n");
16731700
goto unsupported;

0 commit comments

Comments
 (0)