From: "Souza, Jose" Subject: Re: [PATCH v3 4/4] drm/i915/debugfs: Print PSR selective update status register values Date: Thu, 17 Jan 2019 20:53:21 +0000 Message-ID: References: <20190111204435.11138-1-jose.souza@intel.com> <20190111204435.11138-4-jose.souza@intel.com> <7dcdbba894c13d68fa125976f2066ac480aa426b.camel@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0501717148==" Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 45BD46F573 for ; Thu, 17 Jan 2019 20:53:25 +0000 (UTC) In-Reply-To: <7dcdbba894c13d68fa125976f2066ac480aa426b.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 --===============0501717148== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-/sHpPoHN8UuyH7TVIuDw" --=-/sHpPoHN8UuyH7TVIuDw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2019-01-16 at 14:37 -0800, Dhinakaran Pandiyan wrote: > On Fri, 2019-01-11 at 12:44 -0800, Jos=C3=A9 Roberto de Souza wrote: > > The value of this registers will be used to test if PSR2 is doing > > selective update and if the number of blocks match with the > > expected. > >=20 > > v2: > > - Using new macros > > - Changed the string output > >=20 > > v3: > > - reading PSR2_SU_STATUS registers together(Dhinakaran) > > - printing SU blocks of frames with 0 updates(Dhinakaran) > >=20 > > Cc: Rodrigo Vivi > > Cc: Dhinakaran Pandiyan > > Signed-off-by: Jos=C3=A9 Roberto de Souza > > --- > > drivers/gpu/drm/i915/i915_debugfs.c | 23 +++++++++++++++++++++++ > > 1 file changed, 23 insertions(+) > >=20 > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c > > b/drivers/gpu/drm/i915/i915_debugfs.c > > index f8668cb05d64..5817ae0fb5f8 100644 > > --- a/drivers/gpu/drm/i915/i915_debugfs.c > > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > > @@ -2600,6 +2600,29 @@ static int i915_edp_psr_status(struct > > seq_file > > *m, void *data) > > seq_printf(m, "Last exit at: %lld\n", psr->last_exit); > > } > > =20 > > + if (psr->psr2_enabled) { > > + u32 su_frames_val[3]; > > + u8 frame; > 'int' seems like a more appropriate choice here. With that changed, > Reviewed-by: Dhinakaran Pandiyan Done and sending rebased version to mail list. Thanks for the reviews. >=20 > Also, patch 2/4 needs rebase. >=20 > -DK >=20 > > + > > + /* > > + * Reading all 3 registers before hand to minimize > > crossing a > > + * frame boundary between register reads > > + */ > > + for (frame =3D 0; frame < PSR2_SU_STATUS_FRAMES; frame +=3D > > 3) > > + su_frames_val[frame / 3] =3D > > I915_READ(PSR2_SU_STATUS(frame)); > > + > > + seq_puts(m, "Frame:\tPSR2 SU blocks:\n"); > > + > > + for (frame =3D 0; frame < PSR2_SU_STATUS_FRAMES; frame++) > > { > > + u32 su_blocks; > > + > > + su_blocks =3D su_frames_val[frame / 3] & > > + PSR2_SU_STATUS_MASK(frame); > > + su_blocks =3D su_blocks >> > > PSR2_SU_STATUS_SHIFT(frame); > > + seq_printf(m, "%d\t%d\n", frame, su_blocks); > > + } > > + } > > + > > unlock: > > mutex_unlock(&psr->lock); > > intel_runtime_pm_put(dev_priv); --=-/sHpPoHN8UuyH7TVIuDw 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/mOWkkFAlxA60AACgkQVenbO/mO Wknwqgf/ZsSicgmHz4dWROGF3nLeizTaZbNqFxp46GoGl6kVJSp/FfjbnDUzcJM2 EU2q7G+74sMsfgtOkixBkZcz23Hkn6S8sZHX+nnYBwufFepV6i8o9UeOyBWnVYz2 PAiDGkbnZa68MMMa48Wd/clEcuwzJTIfnJ1buKsmgVfjxgbXo01cue58cy8+VVFG pCUS8YdU6pHE6wf6+nX1OeYPvE/sGt/aKvQ/hmkRCinXwihpytZR/lPwQODq3PPG 8ZF2L9h8+6OjHxv2TGp0+W79U3vGzUwPoOL8xj6Cj+E33ilueEhKTubdG8fNVYxQ 2NVzlILhNUJI6P7O/l2ZJVeH/cOS8A== =AZRr -----END PGP SIGNATURE----- --=-/sHpPoHN8UuyH7TVIuDw-- --===============0501717148== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============0501717148==--