linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] drm/i915/dp: Use max params for panels < eDP 1.4
@ 2021-08-20  7:52 Kai-Heng Feng
  2021-08-20 17:26 ` Ville Syrjälä
  0 siblings, 1 reply; 4+ messages in thread
From: Kai-Heng Feng @ 2021-08-20  7:52 UTC (permalink / raw)
  To: jani.nikula, joonas.lahtinen, rodrigo.vivi
  Cc: Kai-Heng Feng, Ville Syrjälä,
	David Airlie, Daniel Vetter, Imre Deak, Uma Shankar,
	Manasi Navare, Ankit Nautiyal, José Roberto de Souza,
	Sean Paul, intel-gfx, dri-devel, linux-kernel

Users reported that after commit 2bbd6dba84d4 ("drm/i915: Try to use
fast+narrow link on eDP again and fall back to the old max strategy on
failure"), the screen starts to have wobbly effect.

Commit a5c936add6a2 ("drm/i915/dp: Use slow and wide link training for
everything") doesn't help either, that means the affected eDP 1.2 panels
only work with max params.

So use max params for panels < eDP 1.4 as Windows does to solve the
issue.

v3:
 - Do the eDP rev check in intel_edp_init_dpcd()

v2:
 - Check eDP 1.4 instead of DPCD 1.1 to apply max params

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3714
Fixes: 2bbd6dba84d4 ("drm/i915: Try to use fast+narrow link on eDP again and fall back to the old max strategy on failure")
Fixes: a5c936add6a2 ("drm/i915/dp: Use slow and wide link training for everything")
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 75d4ebc669411..e0dbd35ae7bc0 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2445,11 +2445,14 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
 	 */
 	if (drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
 			     intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) ==
-			     sizeof(intel_dp->edp_dpcd))
+			     sizeof(intel_dp->edp_dpcd)) {
 		drm_dbg_kms(&dev_priv->drm, "eDP DPCD: %*ph\n",
 			    (int)sizeof(intel_dp->edp_dpcd),
 			    intel_dp->edp_dpcd);
 
+		intel_dp->use_max_params = intel_dp->edp_dpcd[0] < DP_EDP_14;
+	}
+
 	/*
 	 * This has to be called after intel_dp->edp_dpcd is filled, PSR checks
 	 * for SET_POWER_CAPABLE bit in intel_dp->edp_dpcd[1]
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] drm/i915/dp: Use max params for panels < eDP 1.4
  2021-08-20  7:52 [PATCH v3] drm/i915/dp: Use max params for panels < eDP 1.4 Kai-Heng Feng
@ 2021-08-20 17:26 ` Ville Syrjälä
  2021-08-26 17:37   ` Rodrigo Vivi
  0 siblings, 1 reply; 4+ messages in thread
From: Ville Syrjälä @ 2021-08-20 17:26 UTC (permalink / raw)
  To: Kai-Heng Feng
  Cc: jani.nikula, joonas.lahtinen, rodrigo.vivi, David Airlie,
	Daniel Vetter, Imre Deak, Uma Shankar, Manasi Navare,
	Ankit Nautiyal, José Roberto de Souza, Sean Paul, intel-gfx,
	dri-devel, linux-kernel

On Fri, Aug 20, 2021 at 03:52:59PM +0800, Kai-Heng Feng wrote:
> Users reported that after commit 2bbd6dba84d4 ("drm/i915: Try to use
> fast+narrow link on eDP again and fall back to the old max strategy on
> failure"), the screen starts to have wobbly effect.
> 
> Commit a5c936add6a2 ("drm/i915/dp: Use slow and wide link training for
> everything") doesn't help either, that means the affected eDP 1.2 panels
> only work with max params.
> 
> So use max params for panels < eDP 1.4 as Windows does to solve the
> issue.
> 
> v3:
>  - Do the eDP rev check in intel_edp_init_dpcd()
> 
> v2:
>  - Check eDP 1.4 instead of DPCD 1.1 to apply max params
> 
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3714
> Fixes: 2bbd6dba84d4 ("drm/i915: Try to use fast+narrow link on eDP again and fall back to the old max strategy on failure")
> Fixes: a5c936add6a2 ("drm/i915/dp: Use slow and wide link training for everything")
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

Slapped a cc:stable on it and pushed to drm-intel-next. Thanks.

> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 75d4ebc669411..e0dbd35ae7bc0 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2445,11 +2445,14 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
>  	 */
>  	if (drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
>  			     intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) ==
> -			     sizeof(intel_dp->edp_dpcd))
> +			     sizeof(intel_dp->edp_dpcd)) {
>  		drm_dbg_kms(&dev_priv->drm, "eDP DPCD: %*ph\n",
>  			    (int)sizeof(intel_dp->edp_dpcd),
>  			    intel_dp->edp_dpcd);
>  
> +		intel_dp->use_max_params = intel_dp->edp_dpcd[0] < DP_EDP_14;
> +	}
> +
>  	/*
>  	 * This has to be called after intel_dp->edp_dpcd is filled, PSR checks
>  	 * for SET_POWER_CAPABLE bit in intel_dp->edp_dpcd[1]
> -- 
> 2.32.0

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] drm/i915/dp: Use max params for panels < eDP 1.4
  2021-08-20 17:26 ` Ville Syrjälä
@ 2021-08-26 17:37   ` Rodrigo Vivi
  2021-08-30 16:42     ` [Intel-gfx] " Rodrigo Vivi
  0 siblings, 1 reply; 4+ messages in thread
From: Rodrigo Vivi @ 2021-08-26 17:37 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Kai-Heng Feng, jani.nikula, joonas.lahtinen, David Airlie,
	Daniel Vetter, Imre Deak, Uma Shankar, Manasi Navare,
	Ankit Nautiyal, José Roberto de Souza, Sean Paul, intel-gfx,
	dri-devel, linux-kernel

On Fri, Aug 20, 2021 at 08:26:14PM +0300, Ville Syrjälä wrote:
> On Fri, Aug 20, 2021 at 03:52:59PM +0800, Kai-Heng Feng wrote:
> > Users reported that after commit 2bbd6dba84d4 ("drm/i915: Try to use
> > fast+narrow link on eDP again and fall back to the old max strategy on
> > failure"), the screen starts to have wobbly effect.
> > 
> > Commit a5c936add6a2 ("drm/i915/dp: Use slow and wide link training for
> > everything") doesn't help either, that means the affected eDP 1.2 panels
> > only work with max params.
> > 
> > So use max params for panels < eDP 1.4 as Windows does to solve the
> > issue.
> > 
> > v3:
> >  - Do the eDP rev check in intel_edp_init_dpcd()
> > 
> > v2:
> >  - Check eDP 1.4 instead of DPCD 1.1 to apply max params
> > 
> > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3714
> > Fixes: 2bbd6dba84d4 ("drm/i915: Try to use fast+narrow link on eDP again and fall back to the old max strategy on failure")
> > Fixes: a5c936add6a2 ("drm/i915/dp: Use slow and wide link training for everything")
> > Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> 
> Slapped a cc:stable on it and pushed to drm-intel-next. Thanks.

Since I got a strange failure on CI_DIF_604 that I don't see on CI_DIF_603,
I'm avoiding the display patches. This one and also
dab1b47e57e0 ("drm/i915/dp: return proper DPRX link training result")

I know, it is probably the other one, but I had to remove both patches for
now and I'm not confident the CI will allow me to test with this one alone.

If we have -rc8 I will check again later. Otherwise we will have to send
to the stable mailing list later.

> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_dp.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > index 75d4ebc669411..e0dbd35ae7bc0 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -2445,11 +2445,14 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
> >  	 */
> >  	if (drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
> >  			     intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) ==
> > -			     sizeof(intel_dp->edp_dpcd))
> > +			     sizeof(intel_dp->edp_dpcd)) {
> >  		drm_dbg_kms(&dev_priv->drm, "eDP DPCD: %*ph\n",
> >  			    (int)sizeof(intel_dp->edp_dpcd),
> >  			    intel_dp->edp_dpcd);
> >  
> > +		intel_dp->use_max_params = intel_dp->edp_dpcd[0] < DP_EDP_14;
> > +	}
> > +
> >  	/*
> >  	 * This has to be called after intel_dp->edp_dpcd is filled, PSR checks
> >  	 * for SET_POWER_CAPABLE bit in intel_dp->edp_dpcd[1]
> > -- 
> > 2.32.0
> 
> -- 
> Ville Syrjälä
> Intel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/dp: Use max params for panels < eDP 1.4
  2021-08-26 17:37   ` Rodrigo Vivi
@ 2021-08-30 16:42     ` Rodrigo Vivi
  0 siblings, 0 replies; 4+ messages in thread
From: Rodrigo Vivi @ 2021-08-30 16:42 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Kai-Heng Feng, jani.nikula, joonas.lahtinen, David Airlie,
	Daniel Vetter, Imre Deak, Uma Shankar, Manasi Navare,
	Ankit Nautiyal, José Roberto de Souza, Sean Paul, intel-gfx,
	dri-devel, linux-kernel

On Thu, Aug 26, 2021 at 01:37:34PM -0400, Rodrigo Vivi wrote:
> On Fri, Aug 20, 2021 at 08:26:14PM +0300, Ville Syrjälä wrote:
> > On Fri, Aug 20, 2021 at 03:52:59PM +0800, Kai-Heng Feng wrote:
> > > Users reported that after commit 2bbd6dba84d4 ("drm/i915: Try to use
> > > fast+narrow link on eDP again and fall back to the old max strategy on
> > > failure"), the screen starts to have wobbly effect.
> > > 
> > > Commit a5c936add6a2 ("drm/i915/dp: Use slow and wide link training for
> > > everything") doesn't help either, that means the affected eDP 1.2 panels
> > > only work with max params.
> > > 
> > > So use max params for panels < eDP 1.4 as Windows does to solve the
> > > issue.
> > > 
> > > v3:
> > >  - Do the eDP rev check in intel_edp_init_dpcd()
> > > 
> > > v2:
> > >  - Check eDP 1.4 instead of DPCD 1.1 to apply max params
> > > 
> > > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3714
> > > Fixes: 2bbd6dba84d4 ("drm/i915: Try to use fast+narrow link on eDP again and fall back to the old max strategy on failure")
> > > Fixes: a5c936add6a2 ("drm/i915/dp: Use slow and wide link training for everything")
> > > Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > 
> > Slapped a cc:stable on it and pushed to drm-intel-next. Thanks.
> 
> Since I got a strange failure on CI_DIF_604 that I don't see on CI_DIF_603,
> I'm avoiding the display patches. This one and also
> dab1b47e57e0 ("drm/i915/dp: return proper DPRX link training result")
> 
> I know, it is probably the other one, but I had to remove both patches for
> now and I'm not confident the CI will allow me to test with this one alone.
> 
> If we have -rc8 I will check again later. Otherwise we will have to send
> to the stable mailing list later.

CI didn't run on TGL again, so I couldn't send this patch last week.
And 5.14 got released.

If this is important for 5.14 or any other stable release, please
confirm this is not the one breaking linking training on TGL and then
please send it to the stable mailing list.

https://www.kernel.org/doc/Documentation/process/stable-kernel-rules.rst

Sorry,
Rodrigo.

> 
> > 
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_dp.c | 5 ++++-
> > >  1 file changed, 4 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > > index 75d4ebc669411..e0dbd35ae7bc0 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > > @@ -2445,11 +2445,14 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
> > >  	 */
> > >  	if (drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
> > >  			     intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) ==
> > > -			     sizeof(intel_dp->edp_dpcd))
> > > +			     sizeof(intel_dp->edp_dpcd)) {
> > >  		drm_dbg_kms(&dev_priv->drm, "eDP DPCD: %*ph\n",
> > >  			    (int)sizeof(intel_dp->edp_dpcd),
> > >  			    intel_dp->edp_dpcd);
> > >  
> > > +		intel_dp->use_max_params = intel_dp->edp_dpcd[0] < DP_EDP_14;
> > > +	}
> > > +
> > >  	/*
> > >  	 * This has to be called after intel_dp->edp_dpcd is filled, PSR checks
> > >  	 * for SET_POWER_CAPABLE bit in intel_dp->edp_dpcd[1]
> > > -- 
> > > 2.32.0
> > 
> > -- 
> > Ville Syrjälä
> > Intel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-30 16:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20  7:52 [PATCH v3] drm/i915/dp: Use max params for panels < eDP 1.4 Kai-Heng Feng
2021-08-20 17:26 ` Ville Syrjälä
2021-08-26 17:37   ` Rodrigo Vivi
2021-08-30 16:42     ` [Intel-gfx] " Rodrigo Vivi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).