From: "Almahallawy, Khaled" <khaled.almahallawy@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Cavitt, Jonathan" <jonathan.cavitt@intel.com>
Cc: "Shankar, Uma" <uma.shankar@intel.com>,
"Nikula, Jani" <jani.nikula@intel.com>
Subject: Re: [PATCH] drm/i915/display: Read DP_ADAPTER_CAP to pass LinkLayer DPCD&EDID tests
Date: Wed, 2 Jul 2025 04:53:22 +0000 [thread overview]
Message-ID: <6e084fa193864dec9237bdbd7f7978f15d8da0e9.camel@intel.com> (raw)
In-Reply-To: <CH0PR11MB54442C75AC8F390EA7B8AAD8E541A@CH0PR11MB5444.namprd11.prod.outlook.com>
On Tue, 2025-07-01 at 21:50 +0000, Cavitt, Jonathan wrote:
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf
> Of Khaled Almahallawy
> Sent: Tuesday, July 1, 2025 12:27 PM
> To: intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org
> Cc: Almahallawy, Khaled <khaled.almahallawy@intel.com>; Shankar, Uma
> <uma.shankar@intel.com>; Nikula, Jani <jani.nikula@intel.com>
> Subject: [PATCH] drm/i915/display: Read DP_ADAPTER_CAP to pass
> LinkLayer DPCD&EDID tests
> >
> > 4.2.2.1 LinkLayer test states:
> > "Verify that Source DUT does the following within 5 seconds after
> > HPD
> > being asserted:
> > Reads the DPCD Receiver Capability field (DPCD: 00000h:0000Fh)"
> > ...
> >
> > Fail1:
> > Source DUT failed to read the DPCD Receiver Capability field (DPCD:
> > 00000h:0000Fh) through AUX_CH before link training."
> >
> > Fix this by reading DP_ADAPTER_CAP(0x000F & 0x220F)
> >
> > Cc: Uma Shankar <uma.shankar@intel.com>
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > Signed-off-by: Khaled Almahallawy <khaled.almahallawy@intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_dp_link_training.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> > b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> > index a479b63112ea..762dc073b824 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> > @@ -252,6 +252,7 @@ int intel_dp_init_lttpr_and_dprx_caps(struct
> > intel_dp *intel_dp)
> > {
> > struct intel_display *display =
> > to_intel_display(intel_dp);
> > int lttpr_count = 0;
> > + u8 adapter_cap = 0;
> >
> > /*
> > * Detecting LTTPRs must be avoided on platforms with an
> > AUX timeout
> > @@ -277,6 +278,12 @@ int intel_dp_init_lttpr_and_dprx_caps(struct
> > intel_dp *intel_dp)
> > return -EIO;
> > }
> >
> > + /* Read DP_ADAPTET_CAP to pass LinkLayer CTS */
> > + drm_dp_dpcd_readb(&intel_dp->aux, DP_ADAPTER_CAP,
> > + &adapter_cap);
>
> I'm working under the assumption that we're reading these registers
> not to actually use
> the values they hold but because reading them has some other effect
> during runtime.
>
> Does reading that location clear the register field? Or does it
> signal to the system to
> perform some other process?
We read these two bytes for the sole purpose of passing the test. If we
don't read these two addresses, the test equipment will fail the test.
Unfortunately, this issue affects nearly all DPCD/EDID LL tests. It
seems that reading these two bytes has no side effect at all, as it
appears that no one is using DP_ADAPTER_CAP at all.
>
> > + drm_dp_dpcd_readb(&intel_dp->aux, 0x220f,
> > + &adapter_cap);
>
> 0x220f should probably have a #define macro associated with it.
> Could you please create one?
> Maybe it needs to be added to drm_dp.h. Or is there a better
> location for it?
sure, I can do that.
Another approach I considered is to increase DP_RECEIVER_CAP_SIZE from
0xf to 0x10, in line with DP2.1 section 5.1.4 "If the link is unstable
or lost, the Source device then reads the DPCD Receiver Capabilities
registers at DPCD 00000h through 0000Fh to determine the appropriate
information needed to train the link.".
This adjustment might also ensure the test succeeds with other drivers!
Thank You for your review
Khaled
> -Jonathan Cavitt
>
> > +
> > return lttpr_count;
> > }
> >
> > --
> > 2.43.0
> >
> >
next prev parent reply other threads:[~2025-07-02 4:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 19:26 [PATCH] drm/i915/display: Read DP_ADAPTER_CAP to pass LinkLayer DPCD&EDID tests Khaled Almahallawy
2025-07-01 19:31 ` ✗ CI.checkpatch: warning for " Patchwork
2025-07-01 19:32 ` ✓ CI.KUnit: success " Patchwork
2025-07-01 21:50 ` [PATCH] " Cavitt, Jonathan
2025-07-02 4:53 ` Almahallawy, Khaled [this message]
2025-07-02 8:14 ` Jani Nikula
2025-07-02 22:41 ` Almahallawy, Khaled
2025-07-02 6:06 ` ✗ CI.checkpatch: warning for drm/i915/display: Read DP_ADAPTER_CAP to pass LinkLayer DPCD&EDID tests (rev2) Patchwork
2025-07-02 6:07 ` ✓ CI.KUnit: success " Patchwork
2025-07-02 6:46 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-03 12:05 ` ✗ Xe.CI.Full: failure for drm/i915/display: Read DP_ADAPTER_CAP to pass LinkLayer DPCD&EDID tests Patchwork
2025-07-03 19:46 ` ✓ Xe.CI.Full: success for drm/i915/display: Read DP_ADAPTER_CAP to pass LinkLayer DPCD&EDID tests (rev2) 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=6e084fa193864dec9237bdbd7f7978f15d8da0e9.camel@intel.com \
--to=khaled.almahallawy@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=jonathan.cavitt@intel.com \
--cc=uma.shankar@intel.com \
/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