* [PATCH 3/4] drm/i915/psr: Apply Intel DPCD workaround when SDP on prior line used
[not found] <20260414112008.329217-1-jouni.hogander@intel.com>
@ 2026-04-14 11:20 ` Jouni Högander
0 siblings, 0 replies; 4+ messages in thread
From: Jouni Högander @ 2026-04-14 11:20 UTC (permalink / raw)
To: intel-gfx-trybot; +Cc: Jouni Högander, stable
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: 61e887329e33 ("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>
---
drivers/gpu/drm/i915/display/intel_psr.c | 36 +++++++++++++++++++++---
1 file changed, 32 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 1f3f0d35d52a..341186622ed4 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1385,9 +1385,36 @@ static bool psr2_granularity_check(struct intel_crtc_state *crtc_state,
return true;
}
-static bool _compute_psr2_sdp_prior_scanline_indication(struct intel_dp *intel_dp,
- struct intel_crtc_state *crtc_state)
+static bool apply_scanline_indication_wa(struct intel_crtc_state *crtc_state,
+ struct intel_connector *connector)
{
+ struct intel_dp *intel_dp = intel_attached_dp(connector);
+ u8 early_scanline_support = connector->dp.psr_caps.intel_wa_dpcd &
+ INTEL_WA_REGISTER_CAPS_PSR2_EARLYSCANLINE_SDP_SUPPORT_MASK;
+
+ if (intel_dp->edp_dpcd[0] >= DP_EDP_15)
+ return true;
+
+ switch(early_scanline_support)
+ {
+ case INTEL_WA_REGISTER_CAPS_FALL_BACK_TO_PSR1:
+ crtc_state->req_psr2_sdp_prior_scanline = false;
+ return false;
+ case INTEL_WA_REGISTER_CAPS_PSR2_WITH_EARLY_SCANLINE:
+ return true;
+ case INTEL_WA_REGISTER_CAPS_PSR2_WITHOUT_EARLY_SCANLINE:
+ crtc_state->req_psr2_sdp_prior_scanline = false;
+ return true;
+ default:
+ MISSING_CASE(early_scanline_support);
+ return false;
+ }
+}
+
+static bool _compute_psr2_sdp_prior_scanline_indication(struct intel_crtc_state *crtc_state,
+ struct intel_connector *connector)
+{
+ struct intel_dp *intel_dp = intel_attached_dp(connector);
struct intel_display *display = to_intel_display(intel_dp);
const struct drm_display_mode *adjusted_mode = &crtc_state->uapi.adjusted_mode;
u32 hblank_total, hblank_ns, req_ns;
@@ -1406,7 +1433,8 @@ static bool _compute_psr2_sdp_prior_scanline_indication(struct intel_dp *intel_d
return false;
crtc_state->req_psr2_sdp_prior_scanline = true;
- return true;
+
+ return apply_scanline_indication_wa(crtc_state, connector);
}
static int intel_psr_entry_setup_frames(struct intel_dp *intel_dp,
@@ -1687,7 +1715,7 @@ static bool intel_sel_update_config_valid(struct intel_crtc_state *crtc_state,
conn_state))
goto unsupported;
- if (!_compute_psr2_sdp_prior_scanline_indication(intel_dp, crtc_state)) {
+ if (!_compute_psr2_sdp_prior_scanline_indication(crtc_state, connector)) {
drm_dbg_kms(display->drm,
"Selective update not enabled, SDP indication do not fit in hblank\n");
goto unsupported;
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/4] drm/i915/psr: Apply Intel DPCD workaround when SDP on prior line used
[not found] <20260415054000.400070-1-jouni.hogander@intel.com>
@ 2026-04-15 5:39 ` Jouni Högander
2026-05-06 7:24 ` Kandpal, Suraj
0 siblings, 1 reply; 4+ messages in thread
From: Jouni Högander @ 2026-04-15 5:39 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: Jouni Högander, stable
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: 61e887329e33 ("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>
---
drivers/gpu/drm/i915/display/intel_psr.c | 36 +++++++++++++++++++++---
1 file changed, 32 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 1f3f0d35d52a..341186622ed4 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1385,9 +1385,36 @@ static bool psr2_granularity_check(struct intel_crtc_state *crtc_state,
return true;
}
-static bool _compute_psr2_sdp_prior_scanline_indication(struct intel_dp *intel_dp,
- struct intel_crtc_state *crtc_state)
+static bool apply_scanline_indication_wa(struct intel_crtc_state *crtc_state,
+ struct intel_connector *connector)
{
+ struct intel_dp *intel_dp = intel_attached_dp(connector);
+ u8 early_scanline_support = connector->dp.psr_caps.intel_wa_dpcd &
+ INTEL_WA_REGISTER_CAPS_PSR2_EARLYSCANLINE_SDP_SUPPORT_MASK;
+
+ if (intel_dp->edp_dpcd[0] >= DP_EDP_15)
+ return true;
+
+ switch(early_scanline_support)
+ {
+ case INTEL_WA_REGISTER_CAPS_FALL_BACK_TO_PSR1:
+ crtc_state->req_psr2_sdp_prior_scanline = false;
+ return false;
+ case INTEL_WA_REGISTER_CAPS_PSR2_WITH_EARLY_SCANLINE:
+ return true;
+ case INTEL_WA_REGISTER_CAPS_PSR2_WITHOUT_EARLY_SCANLINE:
+ crtc_state->req_psr2_sdp_prior_scanline = false;
+ return true;
+ default:
+ MISSING_CASE(early_scanline_support);
+ return false;
+ }
+}
+
+static bool _compute_psr2_sdp_prior_scanline_indication(struct intel_crtc_state *crtc_state,
+ struct intel_connector *connector)
+{
+ struct intel_dp *intel_dp = intel_attached_dp(connector);
struct intel_display *display = to_intel_display(intel_dp);
const struct drm_display_mode *adjusted_mode = &crtc_state->uapi.adjusted_mode;
u32 hblank_total, hblank_ns, req_ns;
@@ -1406,7 +1433,8 @@ static bool _compute_psr2_sdp_prior_scanline_indication(struct intel_dp *intel_d
return false;
crtc_state->req_psr2_sdp_prior_scanline = true;
- return true;
+
+ return apply_scanline_indication_wa(crtc_state, connector);
}
static int intel_psr_entry_setup_frames(struct intel_dp *intel_dp,
@@ -1687,7 +1715,7 @@ static bool intel_sel_update_config_valid(struct intel_crtc_state *crtc_state,
conn_state))
goto unsupported;
- if (!_compute_psr2_sdp_prior_scanline_indication(intel_dp, crtc_state)) {
+ if (!_compute_psr2_sdp_prior_scanline_indication(crtc_state, connector)) {
drm_dbg_kms(display->drm,
"Selective update not enabled, SDP indication do not fit in hblank\n");
goto unsupported;
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH 3/4] drm/i915/psr: Apply Intel DPCD workaround when SDP on prior line used
2026-04-15 5:39 ` [PATCH 3/4] drm/i915/psr: Apply Intel DPCD workaround when SDP on prior line used Jouni Högander
@ 2026-05-06 7:24 ` Kandpal, Suraj
2026-05-07 12:42 ` Hogander, Jouni
0 siblings, 1 reply; 4+ messages in thread
From: Kandpal, Suraj @ 2026-05-06 7:24 UTC (permalink / raw)
To: Hogander, Jouni, intel-gfx@lists.freedesktop.org,
intel-xe@lists.freedesktop.org
Cc: Hogander, Jouni, stable@vger.kernel.org
> Subject: [PATCH 3/4] 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: 61e887329e33 ("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>
> ---
> drivers/gpu/drm/i915/display/intel_psr.c | 36 +++++++++++++++++++++---
> 1 file changed, 32 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index 1f3f0d35d52a..341186622ed4 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1385,9 +1385,36 @@ static bool psr2_granularity_check(struct
> intel_crtc_state *crtc_state,
> return true;
> }
>
> -static bool _compute_psr2_sdp_prior_scanline_indication(struct intel_dp
> *intel_dp,
> - struct intel_crtc_state
> *crtc_state)
> +static bool apply_scanline_indication_wa(struct intel_crtc_state *crtc_state,
> + struct intel_connector *connector)
Should the name be apply_scanline_indicate, since you are not applying the wa here just sort of checking if it needs to be done
Regards,
Suraj Kandpal
> {
> + struct intel_dp *intel_dp = intel_attached_dp(connector);
> + u8 early_scanline_support = connector->dp.psr_caps.intel_wa_dpcd &
> +
> INTEL_WA_REGISTER_CAPS_PSR2_EARLYSCANLINE_SDP_SUPPORT_MA
> SK;
> +
> + if (intel_dp->edp_dpcd[0] >= DP_EDP_15)
> + return true;
> +
> + switch(early_scanline_support)
> + {
> + case INTEL_WA_REGISTER_CAPS_FALL_BACK_TO_PSR1:
> + crtc_state->req_psr2_sdp_prior_scanline = false;
> + return false;
> + case INTEL_WA_REGISTER_CAPS_PSR2_WITH_EARLY_SCANLINE:
> + return true;
> + case INTEL_WA_REGISTER_CAPS_PSR2_WITHOUT_EARLY_SCANLINE:
> + crtc_state->req_psr2_sdp_prior_scanline = false;
> + return true;
> + default:
> + MISSING_CASE(early_scanline_support);
> + return false;
> + }
> +}
> +
> +static bool _compute_psr2_sdp_prior_scanline_indication(struct
> intel_crtc_state *crtc_state,
> + struct intel_connector
> *connector) {
> + struct intel_dp *intel_dp = intel_attached_dp(connector);
> struct intel_display *display = to_intel_display(intel_dp);
> const struct drm_display_mode *adjusted_mode = &crtc_state-
> >uapi.adjusted_mode;
> u32 hblank_total, hblank_ns, req_ns;
> @@ -1406,7 +1433,8 @@ static bool
> _compute_psr2_sdp_prior_scanline_indication(struct intel_dp *intel_d
> return false;
>
> crtc_state->req_psr2_sdp_prior_scanline = true;
> - return true;
> +
> + return apply_scanline_indication_wa(crtc_state, connector);
> }
>
> static int intel_psr_entry_setup_frames(struct intel_dp *intel_dp, @@ -1687,7
> +1715,7 @@ static bool intel_sel_update_config_valid(struct intel_crtc_state
> *crtc_state,
>
> conn_state))
> goto unsupported;
>
> - if (!_compute_psr2_sdp_prior_scanline_indication(intel_dp,
> crtc_state)) {
> + if (!_compute_psr2_sdp_prior_scanline_indication(crtc_state,
> +connector)) {
> drm_dbg_kms(display->drm,
> "Selective update not enabled, SDP indication do not
> fit in hblank\n");
> goto unsupported;
> --
> 2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3/4] drm/i915/psr: Apply Intel DPCD workaround when SDP on prior line used
2026-05-06 7:24 ` Kandpal, Suraj
@ 2026-05-07 12:42 ` Hogander, Jouni
0 siblings, 0 replies; 4+ messages in thread
From: Hogander, Jouni @ 2026-05-07 12:42 UTC (permalink / raw)
To: Kandpal, Suraj, intel-xe@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org
Cc: stable@vger.kernel.org
On Wed, 2026-05-06 at 07:24 +0000, Kandpal, Suraj wrote:
> > Subject: [PATCH 3/4] 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: 61e887329e33 ("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>
> > ---
> > drivers/gpu/drm/i915/display/intel_psr.c | 36
> > +++++++++++++++++++++---
> > 1 file changed, 32 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index 1f3f0d35d52a..341186622ed4 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -1385,9 +1385,36 @@ static bool psr2_granularity_check(struct
> > intel_crtc_state *crtc_state,
> > return true;
> > }
> >
> > -static bool _compute_psr2_sdp_prior_scanline_indication(struct
> > intel_dp
> > *intel_dp,
> > - struct
> > intel_crtc_state
> > *crtc_state)
> > +static bool apply_scanline_indication_wa(struct intel_crtc_state
> > *crtc_state,
> > + struct intel_connector
> > *connector)
>
> Should the name be apply_scanline_indicate, since you are not
> applying the wa here just sort of checking if it needs to be done
It is actually appying WA. I.e. disabling req_psr2_sdp_prior_scanline
if panel is not inline with the eDP1.4b SDP on prior scanline
implementation in intel HW. What do you think?
BR,
Jouni Högander
>
> Regards,
> Suraj Kandpal
>
> > {
> > + struct intel_dp *intel_dp = intel_attached_dp(connector);
> > + u8 early_scanline_support = connector-
> > >dp.psr_caps.intel_wa_dpcd &
> > +
> > INTEL_WA_REGISTER_CAPS_PSR2_EARLYSCANLINE_SDP_SUPPORT_MA
> > SK;
> > +
> > + if (intel_dp->edp_dpcd[0] >= DP_EDP_15)
> > + return true;
> > +
> > + switch(early_scanline_support)
> > + {
> > + case INTEL_WA_REGISTER_CAPS_FALL_BACK_TO_PSR1:
> > + crtc_state->req_psr2_sdp_prior_scanline = false;
> > + return false;
> > + case INTEL_WA_REGISTER_CAPS_PSR2_WITH_EARLY_SCANLINE:
> > + return true;
> > + case INTEL_WA_REGISTER_CAPS_PSR2_WITHOUT_EARLY_SCANLINE:
> > + crtc_state->req_psr2_sdp_prior_scanline = false;
> > + return true;
> > + default:
> > + MISSING_CASE(early_scanline_support);
> > + return false;
> > + }
> > +}
> > +
> > +static bool _compute_psr2_sdp_prior_scanline_indication(struct
> > intel_crtc_state *crtc_state,
> > + struct
> > intel_connector
> > *connector) {
> > + struct intel_dp *intel_dp = intel_attached_dp(connector);
> > struct intel_display *display =
> > to_intel_display(intel_dp);
> > const struct drm_display_mode *adjusted_mode =
> > &crtc_state-
> > > uapi.adjusted_mode;
> > u32 hblank_total, hblank_ns, req_ns;
> > @@ -1406,7 +1433,8 @@ static bool
> > _compute_psr2_sdp_prior_scanline_indication(struct intel_dp
> > *intel_d
> > return false;
> >
> > crtc_state->req_psr2_sdp_prior_scanline = true;
> > - return true;
> > +
> > + return apply_scanline_indication_wa(crtc_state,
> > connector);
> > }
> >
> > static int intel_psr_entry_setup_frames(struct intel_dp *intel_dp,
> > @@ -1687,7
> > +1715,7 @@ static bool intel_sel_update_config_valid(struct
> > intel_crtc_state
> > *crtc_state,
> >
> > conn_state))
> > goto unsupported;
> >
> > - if (!_compute_psr2_sdp_prior_scanline_indication(intel_dp,
> > crtc_state)) {
> > + if
> > (!_compute_psr2_sdp_prior_scanline_indication(crtc_state,
> > +connector)) {
> > drm_dbg_kms(display->drm,
> > "Selective update not enabled, SDP
> > indication do not
> > fit in hblank\n");
> > goto unsupported;
> > --
> > 2.43.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-05-07 12:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260415054000.400070-1-jouni.hogander@intel.com>
2026-04-15 5:39 ` [PATCH 3/4] drm/i915/psr: Apply Intel DPCD workaround when SDP on prior line used Jouni Högander
2026-05-06 7:24 ` Kandpal, Suraj
2026-05-07 12:42 ` Hogander, Jouni
[not found] <20260414112008.329217-1-jouni.hogander@intel.com>
2026-04-14 11:20 ` Jouni Högander
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox