From: "Souza, Jose" Subject: Re: [PATCH v5 6/9] drm/i915: Disable PSR2 while getting pipe CRC Date: Thu, 7 Mar 2019 23:16:46 +0000 Message-ID: References: <20190306064728.8234-1-jose.souza@intel.com> <20190306064728.8234-6-jose.souza@intel.com> <486d27f8a40f392c871427760b132d6b8cd11d7c.camel@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0126503870==" Return-path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 293206E24A for ; Thu, 7 Mar 2019 23:16:50 +0000 (UTC) In-Reply-To: <486d27f8a40f392c871427760b132d6b8cd11d7c.camel@intel.com> 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" List-Id: intel-gfx@lists.freedesktop.org --===============0126503870== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-Sm47bcpMrMH0ofKa3UM8" --=-Sm47bcpMrMH0ofKa3UM8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2019-03-07 at 12:47 -0800, Dhinakaran Pandiyan wrote: > On Tue, 2019-03-05 at 22:47 -0800, Jos=C3=A9 Roberto de Souza wrote: > > When PSR2 is active aka after the number of frames programmed in > > PSR2_CTL 'Frames Before SU Entry' hardware stops to generate CRC > > interruptions causing IGT tests to fail due timeout. > s/interruptions/interrupts >=20 > I suppose there are no bugzilla references, since we do not check > CRCs > in kms_psr and PSR2 is not enabled in kms_frontbuffer_tracking=20 Exacly, I have added simple CRC tests in kms_psr to test the expected behavior with PSR1 and PSR2 enabled, will send it after get PSR2 enabled by default. > > This same behavior don't happen with PSR1, as soon as pipe CRC is > > enabled it blocks PSR1 activation > The hardware also deactivates PSR1, not just block future PSR1 > activation. Right? It do not exit PSR1 when writing PIPE CRC registers that is why 'drm/i915: Force PSR exit when getting pipe CRC' is needed. >=20 > > so CRC calculation continues to > > happens normaly. > >=20 > > This patch also set mode_changed as true when PSR is available to > > force atomic check functions to compute new PSR state, otherwise > > PSR2 > > would not be disabled. > >=20 > > v4: Only setting mode_changed if has_psr is set(Dhinakaran) > >=20 > > v3: Reusing intel_crtc_crc_prepare() and crc_enabled, only setting > > mode_changed if it can do PSR. > >=20 > > v2: Changed commit description to describe that PSR2 inhibit CRC > > calculations. > >=20 > > Cc: Dhinakaran Pandiyan > > Cc: Ville Syrj=C3=A4l=C3=A4 > > Reviewed-by: Rodrigo Vivi > > Signed-off-by: Jos=C3=A9 Roberto de Souza > > --- > > drivers/gpu/drm/i915/intel_pipe_crc.c | 1 + > > drivers/gpu/drm/i915/intel_psr.c | 3 +++ > > 2 files changed, 4 insertions(+) > >=20 > > diff --git a/drivers/gpu/drm/i915/intel_pipe_crc.c > > b/drivers/gpu/drm/i915/intel_pipe_crc.c > > index af64597c5c6e..c17f02b88453 100644 > > --- a/drivers/gpu/drm/i915/intel_pipe_crc.c > > +++ b/drivers/gpu/drm/i915/intel_pipe_crc.c > > @@ -307,6 +307,7 @@ intel_crtc_crc_setup_workarounds(struct > > intel_crtc *crtc, bool enable) > > goto put_state; > > } > > =20 > > + pipe_config->base.mode_changed =3D pipe_config->has_psr; > > pipe_config->crc_enabled =3D enable; > > =20 > > if (IS_HASWELL(dev_priv) && crtc->pipe =3D=3D PIPE_A) { > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > > b/drivers/gpu/drm/i915/intel_psr.c > > index 2d9f64c362e2..73453d89a841 100644 > > --- a/drivers/gpu/drm/i915/intel_psr.c > > +++ b/drivers/gpu/drm/i915/intel_psr.c > > @@ -572,6 +572,9 @@ static bool intel_psr2_config_valid(struct > > intel_dp *intel_dp, > > return false; > > } > > =20 > > + if (crtc_state->crc_enabled) > > + return false; > No DRM_DEBUG_KMS()?=20 Done: DRM_DEBUG_KMS("PSR2 not enabled because it would inhibit pipe CRC calculati= on\n"); >=20 > with that added > Reviewed-by: Dhinakaran Pandiyan > > + > > return true; > > } > > =20 --=-Sm47bcpMrMH0ofKa3UM8 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/mOWkkFAlyBpl0ACgkQVenbO/mO WklDlAgAnlgRQkhPcyNGOIYbviF4wjcY0oY7Ntysraodwtpnv3vWx2mRDBk5T8m6 Z03RxYgwV0r8tO663+FGhFcPvHi+OhARuZQnPWfPV047fNrIqOCQtobVr7WTzTZP a+R/N9yxVyTF//TXLMwZDQQTt0wUuFNYP4J5waV96aYCD9BNVQDkEk+4orGaAV1f /d2MMbgOnJl8Rm7sFzDZ1mc+sRYwRktv0AQaUysSAlMu9pnERuv7nFK36jGVvQCM TPxfRyoizbPtP/RZ1/EwzGLlCKQrPP/lMZMkVPH/EGYXSKG2jzUqX8f/oumr/4kj bvNni91zCD1a11NBgA/Lj2uQkIIywg== =ARUj -----END PGP SIGNATURE----- --=-Sm47bcpMrMH0ofKa3UM8-- --===============0126503870== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4 --===============0126503870==--