From: "Souza, Jose" Subject: Re: [PATCH v2 01/11] drm/i915: Disable PSR in Apple panels Date: Mon, 3 Dec 2018 22:53:08 +0000 Message-ID: <3b9f0cf778284a4036e2a505abad0b16da22233b.camel@intel.com> References: <20181130022525.25676-1-jose.souza@intel.com> <3c68a361ab976d11a355937fdeea53dc5da85506.camel@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1389288391==" Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "intel-gfx@lists.freedesktop.org" , "Pandiyan, Dhinakaran" , "Nikula, Jani" Cc: "dri-devel@lists.freedesktop.org" , "Vivi, Rodrigo" List-Id: dri-devel@lists.freedesktop.org --===============1389288391== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-sE+EmqPvep4hDzrXd4h3" --=-sE+EmqPvep4hDzrXd4h3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2018-12-03 at 14:45 -0800, Dhinakaran Pandiyan wrote: > On Mon, 2018-12-03 at 12:14 -0800, Souza, Jose wrote: > > On Fri, 2018-11-30 at 15:35 -0800, Dhinakaran Pandiyan wrote: > > > On Thu, 2018-11-29 at 18:25 -0800, Jos=C3=A9 Roberto de Souza wrote: > > > > i915 yet don't support PSR in Apple panels, so lets keep it > > > > disabled > > > > while we work on that. > > > >=20 > > > > v2: Renamed DP_DPCD_QUIRK_PSR_NOT_CURRENTLY_SUPPORTED to > > > > DP_DPCD_QUIRK_NO_PSR (Ville) > > > >=20 > > > > Fixes: 598c6cfe0690 (drm/i915/psr: Enable PSR1 on gen-9+ HW) > > > > Cc: Ville Syrj=C3=A4l=C3=A4 > > > > Cc: Rodrigo Vivi > > > > Cc: Dhinakaran Pandiyan > > > > Signed-off-by: Jos=C3=A9 Roberto de Souza > > > > --- > > > > drivers/gpu/drm/drm_dp_helper.c | 2 ++ > > > > drivers/gpu/drm/i915/intel_psr.c | 6 ++++++ > > > > include/drm/drm_dp_helper.h | 1 + > > > > 3 files changed, 9 insertions(+) > > > >=20 > > > > diff --git a/drivers/gpu/drm/drm_dp_helper.c > > > > b/drivers/gpu/drm/drm_dp_helper.c > > > > index 2d6c491a0542..b00fd5ced0a0 100644 > > > > --- a/drivers/gpu/drm/drm_dp_helper.c > > > > +++ b/drivers/gpu/drm/drm_dp_helper.c > > > > @@ -1273,6 +1273,8 @@ static const struct dpcd_quirk > > > > dpcd_quirk_list[] =3D { > > > > { OUI(0x00, 0x22, 0xb9), DEVICE_ID_ANY, true, > > > > BIT(DP_DPCD_QUIRK_CONSTANT_N) }, > > > > /* LG LP140WF6-SPM1 eDP panel */ > > > > { OUI(0x00, 0x22, 0xb9), DEVICE_ID('s', 'i', 'v', 'a', > > > > 'r', > > > > 'T'), false, BIT(DP_DPCD_QUIRK_CONSTANT_N) }, > > > > + /* Apple panels needs some additional handling to > > > > support PSR > > > > */ > > > > + { OUI(0x00, 0x10, 0xfa), DEVICE_ID_ANY, false, > > > > BIT(DP_DPCD_QUIRK_NO_PSR) } > > > > }; > > > > =20 > > > > #undef OUI > > > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > > > > b/drivers/gpu/drm/i915/intel_psr.c > > > > index 2084784f320d..40ca6cc43cc4 100644 > > > > --- a/drivers/gpu/drm/i915/intel_psr.c > > > > +++ b/drivers/gpu/drm/i915/intel_psr.c > > > > @@ -278,6 +278,12 @@ void intel_psr_init_dpcd(struct intel_dp > > > > *intel_dp) > > > > DRM_DEBUG_KMS("Panel lacks power state control, > > > > PSR > > > > cannot be enabled\n"); > > > > return; > > > > } > > > > + > > > > + if (drm_dp_has_quirk(&intel_dp->desc, > > > > DP_DPCD_QUIRK_NO_PSR)) { > > > > + DRM_DEBUG_KMS("PSR support not currently > > > > available for > > > > this panel\n"); > > > > + return; > > > > + } > > > > + > > > > dev_priv->psr.sink_support =3D true; > > > > dev_priv->psr.sink_sync_latency =3D > > > > intel_dp_get_sink_sync_latency(intel_dp); > > > > diff --git a/include/drm/drm_dp_helper.h > > > > b/include/drm/drm_dp_helper.h > > > > index 5736c942c85b..047314ce25d6 100644 > > > > --- a/include/drm/drm_dp_helper.h > > > > +++ b/include/drm/drm_dp_helper.h > > > > @@ -1365,6 +1365,7 @@ enum drm_dp_quirk { > > > > * to 16 bits. So will give a constant value (0x8000) > > > > for > > > > compatability. > > > > */ > > > > DP_DPCD_QUIRK_CONSTANT_N, > > >=20 > > > nit: Documentation missing here. I guess we need something along > > > the > > > lines of "PSR not supported" without referring to the specific DP > > > device. With that, > > > Reviewed-by: Dhinakaran Pandiyan > >=20 > > Adding here: > >=20 > > /** > > * @DP_DPCD_QUIRK_NO_PSR > > * > > * The device don't properly support PSR even if reports that > nit: "device does not support" Thanks > > it > > * supports or driver still need to implement proper handling > ^needs > > for such > > * device. > > */ > >=20 > > >=20 > > > > + DP_DPCD_QUIRK_NO_PSR, > > > > }; > > > > =20 > > > > /** --=-sE+EmqPvep4hDzrXd4h3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEVNG051EijGa0MiaQVenbO/mOWkkFAlwFs9MACgkQVenbO/mO Wkl9pQgAsDAC8hdl83treysZTC5QXAWd9gLmafuzSPCWX5qk0pPKmyz3sjznEyZt ozcbfeX4Et+RuQsGXIYBKvAUKtj8f5YwJr2zFX0WSfAi31oWISiWfdGM9Dd0hPfL 3+Jo1Sn+PWGQW9GqvMQjbGQryrQ9mDUiuG2Bl/h6LXu0C06jbWgs5Z9/eWDDFb/B rXB9AMJEnH/2Q1R4K6hAR2jLW/mDG2GVUq9nW+8og51HcF8+rgK4WvR0vV2p6x0d 5o4qLoJPr9TmHQe6DlJPUv1MtxBw03qk8GP0iDVy+Zq+nA1WUQ0157iXsWocfvYX 1vkHrDhdRFGmWrs82LQKvBSnTVwBxA== =COW3 -----END PGP SIGNATURE----- --=-sE+EmqPvep4hDzrXd4h3-- --===============1389288391== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============1389288391==--