Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 02/11] drm/i915/psr: Read both Panel Replay capability registers from DPCD
Date: Tue, 20 May 2025 16:54:39 +0000	[thread overview]
Message-ID: <634b0f05ab13fbc564c35d7d4b28c62817b030a4.camel@intel.com> (raw)
In-Reply-To: <7306f80f-dc48-45cd-9289-d2e3ea842bb8@intel.com>

On Tue, 2025-05-20 at 14:15 +0530, Nautiyal, Ankit K wrote:
> 
> On 5/2/2025 2:28 PM, Jouni Högander wrote:
> > There is a second Panel Replay capability register in DPCD. Read
> > that as
> > well for later use.
> > 
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> > ---
> >   drivers/gpu/drm/i915/display/intel_display_types.h |  2 +-
> >   drivers/gpu/drm/i915/display/intel_psr.c           | 14 +++++++--
> > -----
> >   2 files changed, 8 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h
> > b/drivers/gpu/drm/i915/display/intel_display_types.h
> > index 7415564d058a2..356287309817e 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> > @@ -1665,7 +1665,7 @@ struct intel_dp {
> >   	bool use_max_params;
> >   	u8 dpcd[DP_RECEIVER_CAP_SIZE];
> >   	u8 psr_dpcd[EDP_PSR_RECEIVER_CAP_SIZE];
> > -	u8 pr_dpcd;
> > +	u8 pr_dpcd[2];
> 
> 
> As mentioned in my comments on the previous patch, defining a 
> DP_PANEL_REPLAY_CAP_SIZE could be helpful here.
> 
> Also, using pr_dpcd[Some_PR_FEATURE_CAP -
> DP_PANEL_REPLAY_CAP_SUPPORT] 
> for accessing specific Panel Replay features would allow us to avoid 
> hardcoded indices.

I have made these changes in recent version.

BR,

Jouni Högander

> 
> Regards,
> 
> Ankit
> 
> >   	u8 downstream_ports[DP_MAX_DOWNSTREAM_PORTS];
> >   	u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE];
> >   	u8 lttpr_common_caps[DP_LTTPR_COMMON_CAP_SIZE];
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index ccd66bbc72f79..2d78d64b8db8d 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -608,7 +608,7 @@ static void _panel_replay_init_dpcd(struct
> > intel_dp *intel_dp)
> >   			return;
> >   		}
> >   
> > -		if (!(intel_dp->pr_dpcd &
> > DP_PANEL_REPLAY_EARLY_TRANSPORT_SUPPORT)) {
> > +		if (!(intel_dp->pr_dpcd[0] &
> > DP_PANEL_REPLAY_EARLY_TRANSPORT_SUPPORT)) {
> >   			drm_dbg_kms(display->drm,
> >   				    "Panel doesn't support early
> > transport, eDP Panel Replay not possible\n");
> >   			return;
> > @@ -617,7 +617,7 @@ static void _panel_replay_init_dpcd(struct
> > intel_dp *intel_dp)
> >   
> >   	intel_dp->psr.sink_panel_replay_support = true;
> >   
> > -	if (intel_dp->pr_dpcd & DP_PANEL_REPLAY_SU_SUPPORT)
> > +	if (intel_dp->pr_dpcd[0] & DP_PANEL_REPLAY_SU_SUPPORT)
> >   		intel_dp->psr.sink_panel_replay_su_support = true;
> >   
> >   	drm_dbg_kms(display->drm,
> > @@ -676,10 +676,10 @@ void intel_psr_init_dpcd(struct intel_dp
> > *intel_dp)
> >   {
> >   	drm_dp_dpcd_read(&intel_dp->aux, DP_PSR_SUPPORT, intel_dp-
> > >psr_dpcd,
> >   			 sizeof(intel_dp->psr_dpcd));
> > -	drm_dp_dpcd_readb(&intel_dp->aux, DP_PANEL_REPLAY_CAP,
> > -			  &intel_dp->pr_dpcd);
> > +	drm_dp_dpcd_read(&intel_dp->aux, DP_PANEL_REPLAY_CAP,
> > +			 &intel_dp->pr_dpcd, sizeof(intel_dp-
> > >pr_dpcd));
> >   
> > -	if (intel_dp->pr_dpcd & DP_PANEL_REPLAY_SUPPORT)
> > +	if (intel_dp->pr_dpcd[0] & DP_PANEL_REPLAY_SUPPORT)
> >   		_panel_replay_init_dpcd(intel_dp);
> >   
> >   	if (intel_dp->psr_dpcd[0])
> > @@ -736,7 +736,7 @@ static bool psr2_su_region_et_valid(struct
> > intel_dp *intel_dp, bool panel_replay
> >   		return false;
> >   
> >   	return panel_replay ?
> > -		intel_dp->pr_dpcd &
> > DP_PANEL_REPLAY_EARLY_TRANSPORT_SUPPORT :
> > +		intel_dp->pr_dpcd[0] &
> > DP_PANEL_REPLAY_EARLY_TRANSPORT_SUPPORT :
> >   		intel_dp->psr_dpcd[0] ==
> > DP_PSR2_WITH_Y_COORD_ET_SUPPORTED &&
> >   		psr2_su_region_et_global_enabled(intel_dp);
> >   }
> > @@ -3909,7 +3909,7 @@ static void intel_psr_sink_capability(struct
> > intel_dp *intel_dp,
> >   	seq_printf(m, ", Panel Replay = %s", str_yes_no(psr-
> > >sink_panel_replay_support));
> >   	seq_printf(m, ", Panel Replay Selective Update = %s",
> >   		   str_yes_no(psr->sink_panel_replay_su_support));
> > -	if (intel_dp->pr_dpcd &
> > DP_PANEL_REPLAY_EARLY_TRANSPORT_SUPPORT)
> > +	if (intel_dp->pr_dpcd[0] &
> > DP_PANEL_REPLAY_EARLY_TRANSPORT_SUPPORT)
> >   		seq_printf(m, " (Early Transport)");
> >   	seq_printf(m, "\n");
> >   }


  reply	other threads:[~2025-05-20 16:54 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-02  8:58 [PATCH 00/11] Panel Replay + Adaptive sync Jouni Högander
2025-05-02  8:58 ` [PATCH 01/11] drm/dp: Add Panel Replay capability bits from DP2.1 specification Jouni Högander
2025-05-02  9:19   ` Jani Nikula
2025-05-02  9:28     ` Hogander, Jouni
2025-05-20  8:36   ` Nautiyal, Ankit K
2025-05-20 16:53     ` Hogander, Jouni
2025-05-02  8:58 ` [PATCH 02/11] drm/i915/psr: Read both Panel Replay capability registers from DPCD Jouni Högander
2025-05-20  8:45   ` Nautiyal, Ankit K
2025-05-20 16:54     ` Hogander, Jouni [this message]
2025-05-02  8:58 ` [PATCH 03/11] drm/i915/alpm: Add PR_ALPM_CTL register definitions Jouni Högander
2025-05-20  8:46   ` Nautiyal, Ankit K
2025-05-02  8:58 ` [PATCH 04/11] drm/i915/alpm: Write PR_ALPM_CTL register Jouni Högander
2025-05-20  8:49   ` Nautiyal, Ankit K
2025-05-20 16:55     ` Hogander, Jouni
2025-05-02  8:58 ` [PATCH 05/11] drm/i915/psr: Add interface to check if AUXLess ALPM is needed by PSR Jouni Högander
2025-05-20  8:52   ` Nautiyal, Ankit K
2025-05-20  9:19     ` Nautiyal, Ankit K
2025-05-20 16:56     ` Hogander, Jouni
2025-05-02  8:58 ` [PATCH 06/11] drm/i915/alpm: Add new interface to check if AUXLess ALPM is used Jouni Högander
2025-05-20  8:54   ` Nautiyal, Ankit K
2025-05-20 16:57     ` Hogander, Jouni
2025-05-02  8:58 ` [PATCH 07/11] drm/i915/alpm: Move port alpm configuration Jouni Högander
2025-05-20  9:00   ` Nautiyal, Ankit K
2025-05-20 16:59     ` Hogander, Jouni
2025-05-02  8:58 ` [PATCH 08/11] drm/i915/display: Add PHY_CMN1_CONTROL register definitions Jouni Högander
2025-05-20  9:01   ` Nautiyal, Ankit K
2025-05-02  8:59 ` [PATCH 09/11] drm/i915/display: Add function to configure LFPS sending Jouni Högander
2025-05-20  9:08   ` Nautiyal, Ankit K
2025-05-20 17:01     ` Hogander, Jouni
2025-05-02  8:59 ` [PATCH 10/11] drm/i915/psr: Fix using wrong mask in REG_FIELD_PREP Jouni Högander
2025-05-20  9:09   ` Nautiyal, Ankit K
2025-05-02  8:59 ` [PATCH 11/11] drm/i915/psr: Do not disable Panel Replay in case VRR is enabled Jouni Högander
2025-05-20  9:13   ` Nautiyal, Ankit K
2025-05-02 10:16 ` ✓ CI.Patch_applied: success for Panel Replay + Adaptive sync Patchwork
2025-05-02 10:17 ` ✗ CI.checkpatch: warning " Patchwork
2025-05-02 10:18 ` ✓ CI.KUnit: success " Patchwork
2025-05-02 10:26 ` ✓ CI.Build: " Patchwork
2025-05-02 10:29 ` ✓ CI.Hooks: " Patchwork
2025-05-02 10:30 ` ✗ CI.checksparse: warning " Patchwork
2025-05-02 14:13 ` ✗ Xe.CI.Full: failure " Patchwork
2025-05-06  7:58 ` ✓ Xe.CI.BAT: success " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=634b0f05ab13fbc564c35d7d4b28c62817b030a4.camel@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox