diff mbox series

drm/i915/dp: return proper DPRX link training result

Message ID 20210706152541.25021-1-shawn.c.lee@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/dp: return proper DPRX link training result | expand

Commit Message

Lee Shawn C July 6, 2021, 3:25 p.m. UTC
After DPRX link training, intel_dp_link_train_phy() did not
return the training result properly. If link training failed,
i915 driver would not run into link train fallback function.
And no hotplug uevent would be received by user space application.

Fixes: b30edfd8d0b4 ("drm/i915: Switch to LTTPR non-transparent mode link training")
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Cooper Chiou <cooper.chiou@intel.com>
Cc: William Tseng <william.tseng@intel.com>
Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_link_training.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Almahallawy, Khaled July 6, 2021, 11:21 p.m. UTC | #1
I believe Imre’s LT fallback:
https://github.com/ideak/linux/commits/linktraining-fallback-fix  and
Chrome user space fix: 
https://chromium-review.googlesource.com/c/chromium/src/+/3003487
should address Chrome concerns for LT failure and LTTPRs

Thanks
Khaled

On Tue, 2021-07-06 at 23:25 +0800, Lee Shawn C wrote:
> After DPRX link training, intel_dp_link_train_phy() did not
> return the training result properly. If link training failed,
> i915 driver would not run into link train fallback function.
> And no hotplug uevent would be received by user space application.
> 
> Fixes: b30edfd8d0b4 ("drm/i915: Switch to LTTPR non-transparent mode
> link training")
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Cooper Chiou <cooper.chiou@intel.com>
> Cc: William Tseng <william.tseng@intel.com>
> Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp_link_training.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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 08bceae40aa8..e44788b2c564 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> @@ -849,7 +849,7 @@ intel_dp_link_train_all_phys(struct intel_dp
> *intel_dp,
>  	}
>  
>  	if (ret)
> -		intel_dp_link_train_phy(intel_dp, crtc_state,
> DP_PHY_DPRX);
> +		ret = intel_dp_link_train_phy(intel_dp, crtc_state,
> DP_PHY_DPRX);
>  
>  	if (intel_dp->set_idle_link_train)
>  		intel_dp->set_idle_link_train(intel_dp, crtc_state);
Lee Shawn C July 7, 2021, 1:33 a.m. UTC | #2
On Tue, 2021-07-07, Almahallawy, Khaled <khaled.almahallawy@intel.com> wrote:
>I believe Imre's LT fallback:
>https://github.com/ideak/linux/commits/linktraining-fallback-fix  and Chrome user space fix: 
>https://chromium-review.googlesource.com/c/chromium/src/+/3003487
>should address Chrome concerns for LT failure and LTTPRs
>

Thanks for comment! The new fallback patch should help on this DPRX problem.
One more thing. If driver did not handle DPRX link train failed properly.
It would impact link layer compliance test case in below.

400.3.1.3
400.3.1.4
400.3.1.6
400.3.1.12
400.3.1.13
400.3.1.14

Best regards,
Shawn

>Thanks
>Khaled
>
>On Tue, 2021-07-06 at 23:25 +0800, Lee Shawn C wrote:
>> After DPRX link training, intel_dp_link_train_phy() did not return the 
>> training result properly. If link training failed,
>> i915 driver would not run into link train fallback function.
>> And no hotplug uevent would be received by user space application.
>> 
>> Fixes: b30edfd8d0b4 ("drm/i915: Switch to LTTPR non-transparent mode 
>> link training")
>> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
>> Cc: Imre Deak <imre.deak@intel.com>
>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>> Cc: Cooper Chiou <cooper.chiou@intel.com>
>> Cc: William Tseng <william.tseng@intel.com>
>> Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
>> ---
>>  drivers/gpu/drm/i915/display/intel_dp_link_training.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> 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 08bceae40aa8..e44788b2c564 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
>> @@ -849,7 +849,7 @@ intel_dp_link_train_all_phys(struct intel_dp 
>> *intel_dp,
>>  	}
>>  
>>  	if (ret)
>> -		intel_dp_link_train_phy(intel_dp, crtc_state,
>> DP_PHY_DPRX);
>> +		ret = intel_dp_link_train_phy(intel_dp, crtc_state,
>> DP_PHY_DPRX);
>>  
>>  	if (intel_dp->set_idle_link_train)
>>  		intel_dp->set_idle_link_train(intel_dp, crtc_state);
>
Lee Shawn C Aug. 18, 2021, 3:09 p.m. UTC | #3
On Tue, 2021-07-07, Lee Shawn C <shawn.c.lee@intel.com> wrote:
>On Tue, 2021-07-07, Almahallawy, Khaled <khaled.almahallawy@intel.com> wrote:
>>I believe Imre's LT fallback:
>>https://github.com/ideak/linux/commits/linktraining-fallback-fix  and Chrome user space fix: 
>>https://chromium-review.googlesource.com/c/chromium/src/+/3003487
>>should address Chrome concerns for LT failure and LTTPRs
>>
>
>Thanks for comment! The new fallback patch should help on this DPRX problem.
>One more thing. If driver did not handle DPRX link train failed properly.
>It would impact link layer compliance test case in below.
>
>400.3.1.3
>400.3.1.4
>400.3.1.6
>400.3.1.12
>400.3.1.13
>400.3.1.14
>
>Best regards,
>Shawn
>

Hi all, before Imre's patch series land on upstream driver. The link train failed
handling works for LTTPR only. But DPRX does not. Could you please consider to have
this change as temporary solution? Thanks!

Best regards,
Shawn

>>Thanks
>>Khaled
>>
>>On Tue, 2021-07-06 at 23:25 +0800, Lee Shawn C wrote:
>>> After DPRX link training, intel_dp_link_train_phy() did not return 
>>> the training result properly. If link training failed,
>>> i915 driver would not run into link train fallback function.
>>> And no hotplug uevent would be received by user space application.
>>> 
>>> Fixes: b30edfd8d0b4 ("drm/i915: Switch to LTTPR non-transparent mode 
>>> link training")
>>> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
>>> Cc: Imre Deak <imre.deak@intel.com>
>>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>>> Cc: Cooper Chiou <cooper.chiou@intel.com>
>>> Cc: William Tseng <william.tseng@intel.com>
>>> Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
>>> ---
>>>  drivers/gpu/drm/i915/display/intel_dp_link_training.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> 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 08bceae40aa8..e44788b2c564 100644
>>> --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
>>> +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
>>> @@ -849,7 +849,7 @@ intel_dp_link_train_all_phys(struct intel_dp 
>>> *intel_dp,
>>>  	}
>>>  
>>>  	if (ret)
>>> -		intel_dp_link_train_phy(intel_dp, crtc_state,
>>> DP_PHY_DPRX);
>>> +		ret = intel_dp_link_train_phy(intel_dp, crtc_state,
>>> DP_PHY_DPRX);
>>>  
>>>  	if (intel_dp->set_idle_link_train)
>>>  		intel_dp->set_idle_link_train(intel_dp, crtc_state);
>>
>_______________________________________________
>Intel-gfx mailing list
>Intel-gfx@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Imre Deak Aug. 18, 2021, 4:17 p.m. UTC | #4
On Wed, Aug 18, 2021 at 06:09:43PM +0300, Lee, Shawn C wrote:
> On Tue, 2021-07-07, Lee Shawn C <shawn.c.lee@intel.com> wrote:
> >On Tue, 2021-07-07, Almahallawy, Khaled <khaled.almahallawy@intel.com> wrote:
> >>I believe Imre's LT fallback:
> >>https://github.com/ideak/linux/commits/linktraining-fallback-fix  and Chrome user space fix:
> >>https://chromium-review.googlesource.com/c/chromium/src/+/3003487
> >>should address Chrome concerns for LT failure and LTTPRs
> >>
> >
> >Thanks for comment! The new fallback patch should help on this DPRX problem.
> >One more thing. If driver did not handle DPRX link train failed properly.
> >It would impact link layer compliance test case in below.
> >
> >400.3.1.3
> >400.3.1.4
> >400.3.1.6
> >400.3.1.12
> >400.3.1.13
> >400.3.1.14
> >
> >Best regards,
> >Shawn
> >
> 
> Hi all, before Imre's patch series land on upstream driver. The link train failed
> handling works for LTTPR only. But DPRX does not. Could you please consider to have
> this change as temporary solution? Thanks!

I sent already fixing this, see
https://lore.kernel.org/intel-gfx/20201027133600.3656665-1-imre.deak@intel.com/

but it fell through the cracks. Applied now your patch, thanks.

> 
> Best regards,
> Shawn
> 
> >>Thanks
> >>Khaled
> >>
> >>On Tue, 2021-07-06 at 23:25 +0800, Lee Shawn C wrote:
> >>> After DPRX link training, intel_dp_link_train_phy() did not return
> >>> the training result properly. If link training failed,
> >>> i915 driver would not run into link train fallback function.
> >>> And no hotplug uevent would be received by user space application.
> >>>
> >>> Fixes: b30edfd8d0b4 ("drm/i915: Switch to LTTPR non-transparent mode
> >>> link training")
> >>> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> >>> Cc: Imre Deak <imre.deak@intel.com>
> >>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> >>> Cc: Cooper Chiou <cooper.chiou@intel.com>
> >>> Cc: William Tseng <william.tseng@intel.com>
> >>> Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
> >>> ---
> >>>  drivers/gpu/drm/i915/display/intel_dp_link_training.c | 2 +-
> >>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> 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 08bceae40aa8..e44788b2c564 100644
> >>> --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> >>> +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> >>> @@ -849,7 +849,7 @@ intel_dp_link_train_all_phys(struct intel_dp
> >>> *intel_dp,
> >>>     }
> >>>
> >>>     if (ret)
> >>> -           intel_dp_link_train_phy(intel_dp, crtc_state,
> >>> DP_PHY_DPRX);
> >>> +           ret = intel_dp_link_train_phy(intel_dp, crtc_state,
> >>> DP_PHY_DPRX);
> >>>
> >>>     if (intel_dp->set_idle_link_train)
> >>>             intel_dp->set_idle_link_train(intel_dp, crtc_state);
> >>
> >_______________________________________________
> >Intel-gfx mailing list
> >Intel-gfx@lists.freedesktop.org
> >https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ville Syrjälä Aug. 20, 2021, 10:20 p.m. UTC | #5
On Wed, Aug 18, 2021 at 07:17:12PM +0300, Imre Deak wrote:
> On Wed, Aug 18, 2021 at 06:09:43PM +0300, Lee, Shawn C wrote:
> > On Tue, 2021-07-07, Lee Shawn C <shawn.c.lee@intel.com> wrote:
> > >On Tue, 2021-07-07, Almahallawy, Khaled <khaled.almahallawy@intel.com> wrote:
> > >>I believe Imre's LT fallback:
> > >>https://github.com/ideak/linux/commits/linktraining-fallback-fix  and Chrome user space fix:
> > >>https://chromium-review.googlesource.com/c/chromium/src/+/3003487
> > >>should address Chrome concerns for LT failure and LTTPRs
> > >>
> > >
> > >Thanks for comment! The new fallback patch should help on this DPRX problem.
> > >One more thing. If driver did not handle DPRX link train failed properly.
> > >It would impact link layer compliance test case in below.
> > >
> > >400.3.1.3
> > >400.3.1.4
> > >400.3.1.6
> > >400.3.1.12
> > >400.3.1.13
> > >400.3.1.14
> > >
> > >Best regards,
> > >Shawn
> > >
> > 
> > Hi all, before Imre's patch series land on upstream driver. The link train failed
> > handling works for LTTPR only. But DPRX does not. Could you please consider to have
> > this change as temporary solution? Thanks!
> 
> I sent already fixing this, see
> https://lore.kernel.org/intel-gfx/20201027133600.3656665-1-imre.deak@intel.com/
> 
> but it fell through the cracks. Applied now your patch, thanks.

We seem to have a tgl that fails consistently at DPRX link training:
https://intel-gfx-ci.01.org/tree/drm-tip/fi-tgl-1115g4.html

Previously the error went unnoticed.
Imre Deak Aug. 20, 2021, 11:02 p.m. UTC | #6
On Sat, Aug 21, 2021 at 01:20:04AM +0300, Ville Syrjälä wrote:
> On Wed, Aug 18, 2021 at 07:17:12PM +0300, Imre Deak wrote:
> > On Wed, Aug 18, 2021 at 06:09:43PM +0300, Lee, Shawn C wrote:
> > > On Tue, 2021-07-07, Lee Shawn C <shawn.c.lee@intel.com> wrote:
> > > >On Tue, 2021-07-07, Almahallawy, Khaled <khaled.almahallawy@intel.com> wrote:
> > > >>I believe Imre's LT fallback:
> > > >>https://github.com/ideak/linux/commits/linktraining-fallback-fix  and Chrome user space fix:
> > > >>https://chromium-review.googlesource.com/c/chromium/src/+/3003487
> > > >>should address Chrome concerns for LT failure and LTTPRs
> > > >>
> > > >
> > > >Thanks for comment! The new fallback patch should help on this DPRX problem.
> > > >One more thing. If driver did not handle DPRX link train failed properly.
> > > >It would impact link layer compliance test case in below.
> > > >
> > > >400.3.1.3
> > > >400.3.1.4
> > > >400.3.1.6
> > > >400.3.1.12
> > > >400.3.1.13
> > > >400.3.1.14
> > > >
> > > >Best regards,
> > > >Shawn
> > > >
> > > 
> > > Hi all, before Imre's patch series land on upstream driver. The link train failed
> > > handling works for LTTPR only. But DPRX does not. Could you please consider to have
> > > this change as temporary solution? Thanks!
> > 
> > I sent already fixing this, see
> > https://lore.kernel.org/intel-gfx/20201027133600.3656665-1-imre.deak@intel.com/
> > 
> > but it fell through the cracks. Applied now your patch, thanks.
> 
> We seem to have a tgl that fails consistently at DPRX link training:
> https://intel-gfx-ci.01.org/tree/drm-tip/fi-tgl-1115g4.html
> 
> Previously the error went unnoticed.

Yea, didn't notice this. Can't see anything obvious, besides that it's a
DPCD rev 1.1 monitor, so maybe not compatible with LTTPRs. I follow up
if I find something.

> 
> -- 
> Ville Syrjälä
> Intel
Saarinen, Jani Aug. 23, 2021, 8:38 a.m. UTC | #7
Hi, 

> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville Syrjälä
> Sent: lauantai 21. elokuuta 2021 1.20
> To: Deak, Imre <imre.deak@intel.com>
> Cc: Lee, Shawn C <shawn.c.lee@intel.com>; Almahallawy, Khaled
> <khaled.almahallawy@intel.com>; intel-gfx@lists.freedesktop.org; Chiou, Cooper
> <cooper.chiou@intel.com>; Tseng, William <william.tseng@intel.com>
> Subject: Re: [Intel-gfx] [PATCH] drm/i915/dp: return proper DPRX link training result
> 
> On Wed, Aug 18, 2021 at 07:17:12PM +0300, Imre Deak wrote:
> > On Wed, Aug 18, 2021 at 06:09:43PM +0300, Lee, Shawn C wrote:
> > > On Tue, 2021-07-07, Lee Shawn C <shawn.c.lee@intel.com> wrote:
> > > >On Tue, 2021-07-07, Almahallawy, Khaled <khaled.almahallawy@intel.com>
> wrote:
> > > >>I believe Imre's LT fallback:
> > > >>https://github.com/ideak/linux/commits/linktraining-fallback-fix  and Chrome
> user space fix:
> > > >>https://chromium-review.googlesource.com/c/chromium/src/+/3003487
> > > >>should address Chrome concerns for LT failure and LTTPRs
> > > >>
> > > >
> > > >Thanks for comment! The new fallback patch should help on this DPRX problem.
> > > >One more thing. If driver did not handle DPRX link train failed properly.
> > > >It would impact link layer compliance test case in below.
> > > >
> > > >400.3.1.3
> > > >400.3.1.4
> > > >400.3.1.6
> > > >400.3.1.12
> > > >400.3.1.13
> > > >400.3.1.14
> > > >
> > > >Best regards,
> > > >Shawn
> > > >
> > >
> > > Hi all, before Imre's patch series land on upstream driver. The link
> > > train failed handling works for LTTPR only. But DPRX does not. Could
> > > you please consider to have this change as temporary solution? Thanks!
> >
> > I sent already fixing this, see
> > https://lore.kernel.org/intel-gfx/20201027133600.3656665-1-imre.deak@i
> > ntel.com/
> >
> > but it fell through the cracks. Applied now your patch, thanks.
> 
> We seem to have a tgl that fails consistently at DPRX link training:
> https://intel-gfx-ci.01.org/tree/drm-tip/fi-tgl-1115g4.html
Yes, @Vudum, Lakshminarayana what is gitlab issue for this? 

> 
> Previously the error went unnoticed.
> 
> --
> Ville Syrjälä
> Intel
Vudum, Lakshminarayana Aug. 23, 2021, 3:13 p.m. UTC | #8
Here is the gitlab issue https://gitlab.freedesktop.org/drm/intel/-/issues/4002

Lakshmi.
-----Original Message-----
From: Saarinen, Jani <jani.saarinen@intel.com> 
Sent: Monday, August 23, 2021 1:39 AM
To: Ville Syrjälä <ville.syrjala@linux.intel.com>; Deak, Imre <imre.deak@intel.com>; Vudum, Lakshminarayana <lakshminarayana.vudum@intel.com>
Cc: Lee, Shawn C <shawn.c.lee@intel.com>; Almahallawy, Khaled <khaled.almahallawy@intel.com>; intel-gfx@lists.freedesktop.org; Chiou, Cooper <cooper.chiou@intel.com>; Tseng, William <william.tseng@intel.com>
Subject: RE: [Intel-gfx] [PATCH] drm/i915/dp: return proper DPRX link training result

Hi, 

> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of 
> Ville Syrjälä
> Sent: lauantai 21. elokuuta 2021 1.20
> To: Deak, Imre <imre.deak@intel.com>
> Cc: Lee, Shawn C <shawn.c.lee@intel.com>; Almahallawy, Khaled 
> <khaled.almahallawy@intel.com>; intel-gfx@lists.freedesktop.org; 
> Chiou, Cooper <cooper.chiou@intel.com>; Tseng, William 
> <william.tseng@intel.com>
> Subject: Re: [Intel-gfx] [PATCH] drm/i915/dp: return proper DPRX link 
> training result
> 
> On Wed, Aug 18, 2021 at 07:17:12PM +0300, Imre Deak wrote:
> > On Wed, Aug 18, 2021 at 06:09:43PM +0300, Lee, Shawn C wrote:
> > > On Tue, 2021-07-07, Lee Shawn C <shawn.c.lee@intel.com> wrote:
> > > >On Tue, 2021-07-07, Almahallawy, Khaled 
> > > ><khaled.almahallawy@intel.com>
> wrote:
> > > >>I believe Imre's LT fallback:
> > > >>https://github.com/ideak/linux/commits/linktraining-fallback-fix  
> > > >>and Chrome
> user space fix:
> > > >>https://chromium-review.googlesource.com/c/chromium/src/+/300348
> > > >>7 should address Chrome concerns for LT failure and LTTPRs
> > > >>
> > > >
> > > >Thanks for comment! The new fallback patch should help on this DPRX problem.
> > > >One more thing. If driver did not handle DPRX link train failed properly.
> > > >It would impact link layer compliance test case in below.
> > > >
> > > >400.3.1.3
> > > >400.3.1.4
> > > >400.3.1.6
> > > >400.3.1.12
> > > >400.3.1.13
> > > >400.3.1.14
> > > >
> > > >Best regards,
> > > >Shawn
> > > >
> > >
> > > Hi all, before Imre's patch series land on upstream driver. The 
> > > link train failed handling works for LTTPR only. But DPRX does 
> > > not. Could you please consider to have this change as temporary solution? Thanks!
> >
> > I sent already fixing this, see
> > https://lore.kernel.org/intel-gfx/20201027133600.3656665-1-imre.deak
> > @i
> > ntel.com/
> >
> > but it fell through the cracks. Applied now your patch, thanks.
> 
> We seem to have a tgl that fails consistently at DPRX link training:
> https://intel-gfx-ci.01.org/tree/drm-tip/fi-tgl-1115g4.html
Yes, @Vudum, Lakshminarayana what is gitlab issue for this? 
[Lakshmi] https://gitlab.freedesktop.org/drm/intel/-/issues/4002
> 
> Previously the error went unnoticed.
> 
> --
> Ville Syrjälä
> Intel
Rodrigo Vivi Aug. 26, 2021, 5:31 p.m. UTC | #9
On Sat, Aug 21, 2021 at 02:02:03AM +0300, Imre Deak wrote:
> On Sat, Aug 21, 2021 at 01:20:04AM +0300, Ville Syrjälä wrote:
> > On Wed, Aug 18, 2021 at 07:17:12PM +0300, Imre Deak wrote:
> > > On Wed, Aug 18, 2021 at 06:09:43PM +0300, Lee, Shawn C wrote:
> > > > On Tue, 2021-07-07, Lee Shawn C <shawn.c.lee@intel.com> wrote:
> > > > >On Tue, 2021-07-07, Almahallawy, Khaled <khaled.almahallawy@intel.com> wrote:
> > > > >>I believe Imre's LT fallback:
> > > > >>https://github.com/ideak/linux/commits/linktraining-fallback-fix  and Chrome user space fix:
> > > > >>https://chromium-review.googlesource.com/c/chromium/src/+/3003487
> > > > >>should address Chrome concerns for LT failure and LTTPRs
> > > > >>
> > > > >
> > > > >Thanks for comment! The new fallback patch should help on this DPRX problem.
> > > > >One more thing. If driver did not handle DPRX link train failed properly.
> > > > >It would impact link layer compliance test case in below.
> > > > >
> > > > >400.3.1.3
> > > > >400.3.1.4
> > > > >400.3.1.6
> > > > >400.3.1.12
> > > > >400.3.1.13
> > > > >400.3.1.14
> > > > >
> > > > >Best regards,
> > > > >Shawn
> > > > >
> > > > 
> > > > Hi all, before Imre's patch series land on upstream driver. The link train failed
> > > > handling works for LTTPR only. But DPRX does not. Could you please consider to have
> > > > this change as temporary solution? Thanks!
> > > 
> > > I sent already fixing this, see
> > > https://lore.kernel.org/intel-gfx/20201027133600.3656665-1-imre.deak@intel.com/
> > > 
> > > but it fell through the cracks. Applied now your patch, thanks.
> > 
> > We seem to have a tgl that fails consistently at DPRX link training:
> > https://intel-gfx-ci.01.org/tree/drm-tip/fi-tgl-1115g4.html
> > 
> > Previously the error went unnoticed.
> 
> Yea, didn't notice this. Can't see anything obvious, besides that it's a
> DPCD rev 1.1 monitor, so maybe not compatible with LTTPRs. I follow up
> if I find something.

I opened this thread exactly to tell that I'm avoiding this patch on
this week's pull request targeting 5.14 exactly because I saw something
strange with CI_DIF_604 on TGL that doesn't happen without this patch
CI_DIF_603.

Since I don't know what's going on there I'm also avoiding
d7f213c131ad ("drm/i915/dp: Use max params for panels < eDP 1.4")
just in case...

> 
> > 
> > -- 
> > Ville Syrjälä
> > Intel
Imre Deak Aug. 30, 2021, 6:45 a.m. UTC | #10
On Sat, Aug 21, 2021 at 02:02:03AM +0300, Imre Deak wrote:
> On Sat, Aug 21, 2021 at 01:20:04AM +0300, Ville Syrjälä wrote:
> > On Wed, Aug 18, 2021 at 07:17:12PM +0300, Imre Deak wrote:
> > > On Wed, Aug 18, 2021 at 06:09:43PM +0300, Lee, Shawn C wrote:
> > > > On Tue, 2021-07-07, Lee Shawn C <shawn.c.lee@intel.com> wrote:
> > > > >On Tue, 2021-07-07, Almahallawy, Khaled <khaled.almahallawy@intel.com> wrote:
> > > > >>I believe Imre's LT fallback:
> > > > >>https://github.com/ideak/linux/commits/linktraining-fallback-fix  and Chrome user space fix:
> > > > >>https://chromium-review.googlesource.com/c/chromium/src/+/3003487
> > > > >>should address Chrome concerns for LT failure and LTTPRs
> > > > >>
> > > > >
> > > > >Thanks for comment! The new fallback patch should help on this DPRX problem.
> > > > >One more thing. If driver did not handle DPRX link train failed properly.
> > > > >It would impact link layer compliance test case in below.
> > > > >
> > > > >400.3.1.3
> > > > >400.3.1.4
> > > > >400.3.1.6
> > > > >400.3.1.12
> > > > >400.3.1.13
> > > > >400.3.1.14
> > > > >
> > > > >Best regards,
> > > > >Shawn
> > > > >
> > > > 
> > > > Hi all, before Imre's patch series land on upstream driver. The link train failed
> > > > handling works for LTTPR only. But DPRX does not. Could you please consider to have
> > > > this change as temporary solution? Thanks!
> > > 
> > > I sent already fixing this, see
> > > https://lore.kernel.org/intel-gfx/20201027133600.3656665-1-imre.deak@intel.com/
> > > 
> > > but it fell through the cracks. Applied now your patch, thanks.
> > 
> > We seem to have a tgl that fails consistently at DPRX link training:
> > https://intel-gfx-ci.01.org/tree/drm-tip/fi-tgl-1115g4.html
> > 
> > Previously the error went unnoticed.
> 
> Yea, didn't notice this. Can't see anything obvious, besides that it's a
> DPCD rev 1.1 monitor, so maybe not compatible with LTTPRs. I follow up
> if I find something.

Power cycling the machine and replugging the monitor and Type C dongle
and native DP cable fixed it. So, it could be a flaky connection
(unlikely, because detection worked), or the port in a stuck state even
across warm-reboots. The latter would mean the machine wasn't power cycled
for a long time and that's likely because the pstore kernel didn't boot
(grub failed to load it due to a missing initrd).

One possibile root cause is the TypeC PHY getting stuck across warm
reboots issue (and nothing recovering it besides a power-cycle), that was
fixed by
151ec347b06a2fb ("drm/i915: Force a TypeC PHY disconnect during suspend/shutdown")

I'll re-check this after more CI testruns.

> > -- 
> > Ville Syrjälä
> > Intel
Saarinen, Jani Aug. 30, 2021, 7:05 a.m. UTC | #11
Hi, 

> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Imre Deak
> Sent: maanantai 30. elokuuta 2021 9.45
> To: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Lee, Shawn C <shawn.c.lee@intel.com>; Almahallawy, Khaled
> <khaled.almahallawy@intel.com>; intel-gfx@lists.freedesktop.org; Chiou, Cooper
> <cooper.chiou@intel.com>; Tseng, William <william.tseng@intel.com>
> Subject: Re: [Intel-gfx] [PATCH] drm/i915/dp: return proper DPRX link training result
> 
> On Sat, Aug 21, 2021 at 02:02:03AM +0300, Imre Deak wrote:
> > On Sat, Aug 21, 2021 at 01:20:04AM +0300, Ville Syrjälä wrote:
> > > On Wed, Aug 18, 2021 at 07:17:12PM +0300, Imre Deak wrote:
> > > > On Wed, Aug 18, 2021 at 06:09:43PM +0300, Lee, Shawn C wrote:
> > > > > On Tue, 2021-07-07, Lee Shawn C <shawn.c.lee@intel.com> wrote:
> > > > > >On Tue, 2021-07-07, Almahallawy, Khaled <khaled.almahallawy@intel.com>
> wrote:
> > > > > >>I believe Imre's LT fallback:
> > > > > >>https://github.com/ideak/linux/commits/linktraining-fallback-fix  and
> Chrome user space fix:
> > > > > >>https://chromium-review.googlesource.com/c/chromium/src/+/3003
> > > > > >>487 should address Chrome concerns for LT failure and LTTPRs
> > > > > >>
> > > > > >
> > > > > >Thanks for comment! The new fallback patch should help on this DPRX
> problem.
> > > > > >One more thing. If driver did not handle DPRX link train failed properly.
> > > > > >It would impact link layer compliance test case in below.
> > > > > >
> > > > > >400.3.1.3
> > > > > >400.3.1.4
> > > > > >400.3.1.6
> > > > > >400.3.1.12
> > > > > >400.3.1.13
> > > > > >400.3.1.14
> > > > > >
> > > > > >Best regards,
> > > > > >Shawn
> > > > > >
> > > > >
> > > > > Hi all, before Imre's patch series land on upstream driver. The
> > > > > link train failed handling works for LTTPR only. But DPRX does
> > > > > not. Could you please consider to have this change as temporary solution?
> Thanks!
> > > >
> > > > I sent already fixing this, see
> > > > https://lore.kernel.org/intel-gfx/20201027133600.3656665-1-imre.de
> > > > ak@intel.com/
> > > >
> > > > but it fell through the cracks. Applied now your patch, thanks.
> > >
> > > We seem to have a tgl that fails consistently at DPRX link training:
> > > https://intel-gfx-ci.01.org/tree/drm-tip/fi-tgl-1115g4.html
> > >
> > > Previously the error went unnoticed.
> >
> > Yea, didn't notice this. Can't see anything obvious, besides that it's
> > a DPCD rev 1.1 monitor, so maybe not compatible with LTTPRs. I follow
> > up if I find something.
> 
> Power cycling the machine and replugging the monitor and Type C dongle and native
> DP cable fixed it. So, it could be a flaky connection (unlikely, because detection
> worked), or the port in a stuck state even across warm-reboots. The latter would
> mean the machine wasn't power cycled for a long time and that's likely because the
> pstore kernel didn't boot (grub failed to load it due to a missing initrd).
Thanks Imre for checking. 

> 
> One possibile root cause is the TypeC PHY getting stuck across warm reboots issue
> (and nothing recovering it besides a power-cycle), that was fixed by
> 151ec347b06a2fb ("drm/i915: Force a TypeC PHY disconnect during
> suspend/shutdown")
> 
> I'll re-check this after more CI testruns.
Ack but now looks indeed green again. 

> 
> > > --
> > > Ville Syrjälä
> > > Intel
diff mbox series

Patch

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 08bceae40aa8..e44788b2c564 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
@@ -849,7 +849,7 @@  intel_dp_link_train_all_phys(struct intel_dp *intel_dp,
 	}
 
 	if (ret)
-		intel_dp_link_train_phy(intel_dp, crtc_state, DP_PHY_DPRX);
+		ret = intel_dp_link_train_phy(intel_dp, crtc_state, DP_PHY_DPRX);
 
 	if (intel_dp->set_idle_link_train)
 		intel_dp->set_idle_link_train(intel_dp, crtc_state);