Re: [PATCH v2] drm/i915/psr: Force fastset on debugfs write for each connector supporting PSR

"Hogander, Jouni" <[email protected]>
Newsgroups org.freedesktop.lists.intel-gfx,org.freedesktop.lists.intel-xe
Message-ID <[email protected]>
On Tue, 2026-06-23 at 06:24 +0000, Garg, Nemesa wrote:
> 
> 
> > -----Original Message-----
> > From: Garg, Nemesa
> > Sent: Tuesday, June 23, 2026 11:18 AM
> > To: 'Jouni Högander' <[email protected]>; intel-
> > [email protected]; [email protected]
> > Cc: Hogander, Jouni <[email protected]>
> > Subject: RE: [PATCH v2] drm/i915/psr: Force fastset on debugfs
> > write for each
> > connector supporting PSR
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: Intel-gfx <[email protected]> On
> > > Behalf Of
> > > Jouni Högander
> > > Sent: Thursday, June 18, 2026 3:22 PM
> > > To: [email protected];
> > > [email protected]
> > > Cc: Hogander, Jouni <[email protected]>
> > > Subject: [PATCH v2] drm/i915/psr: Force fastset on debugfs write
> > > for
> > > each connector supporting PSR
> > > 
> > > Currently intel_psr_fast_set_force is forcing fastset only for
> > > eDP connectors.
> > > Panel Replay is supported on DP as well and writing
> > > i915_edp_psr_debug
> > > is setting debug parameters for each DP transcoder (struct
> > intel_dp:psr:debug).
> > > Force fastset for each connector supporting PSR or Panel Replay.
> > > While
> > > modifying the code also switch to for_each_intel_connector_iter.
> > > 
> > > v2:
> > >   - use for_each_intel_connector_iter
> > >   - update and improve commit message
> > > 
> > > Signed-off-by: Jouni Högander <[email protected]>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_psr.c | 9 +++++----
> > >  1 file changed, 5 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > > b/drivers/gpu/drm/i915/display/intel_psr.c
> > > index 911afb9cb24e3..622edfb6a7fb2 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > > @@ -3375,7 +3375,7 @@ static int intel_psr_fastset_force(struct
> > > intel_display
> > > *display)
> > >  	struct drm_connector_list_iter conn_iter;
> > >  	struct drm_modeset_acquire_ctx ctx;
> > >  	struct drm_atomic_commit *state;
> > > -	struct drm_connector *conn;
> > > +	struct intel_connector *connector;
> > >  	int err = 0;
> > > 
> > >  	state = drm_atomic_commit_alloc(display->drm);
> > > @@ -3389,14 +3389,15 @@ static int intel_psr_fastset_force(struct
> > > intel_display *display)
> > > 
> > >  retry:
> > >  	drm_connector_list_iter_begin(display->drm, &conn_iter);
> > > -	drm_for_each_connector_iter(conn, &conn_iter) {
> > > +	for_each_intel_connector_iter(connector, &conn_iter) {
> > >  		struct drm_connector_state *conn_state;
> > >  		struct drm_crtc_state *crtc_state;
> > > 
> > > -		if (conn->connector_type !=
> > > DRM_MODE_CONNECTOR_eDP)
> > > +		if (!connector->dp.psr_caps.support &&
> > > +		    !connector->dp.panel_replay_caps.support)
> > >  			continue;
> > > 
> > > -		conn_state =
> > > drm_atomic_get_connector_state(state, conn);
> > > +		conn_state =
> > > drm_atomic_get_connector_state(state,
> > > &connector->base);
> > >  		if (IS_ERR(conn_state)) {
> > >  			err = PTR_ERR(conn_state);
> > >  			break;
> > > --
> > LGTM,
> > Reviewed-by: Nemesa Garg <[email protected]>
> > 
> Just a thought should we add a link training check before fastset to
> ensure the link is established.

I think lock taken by drm_atomic_get_connector_state is ensuring there
isn't ongoing link training.

BR,
Jouni Högander

> 
> > > 2.43.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.