From: Paul Menzel Subject: Re: [PATCH] drm/i915: add a tracepoint for gpu frequency changes Date: Thu, 30 Aug 2012 15:51:16 +0200 Message-ID: <1346334676.4104.1.camel@mattotaupa> References: <1346326008-11186-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2129314493==" Return-path: In-Reply-To: <1346326008-11186-1-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: Intel Graphics Development , Arjan van de Ven , DRI Development List-Id: dri-devel@lists.freedesktop.org --===============2129314493== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-Lo0pCd4GIhksiOkZlj3F" --=-Lo0pCd4GIhksiOkZlj3F Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Am Donnerstag, den 30.08.2012, 13:26 +0200 schrieb Daniel Vetter: > We've had and still have too many issues where the gpu turbot doesn't s,turbot,turbo, > quite to what it's supposed to do (or what we want it to do). s,to,do, > Adding a tracepoint to track when the desired gpu frequence changes frequenc*y* > should help a lot in characterizing and understanding problematic > workloads. >=20 > Also, this should be fairly interesting for power tuning (and > especially noticing when the gpu is stuck in high frequencies, as has > happened in the past) and hence for integration into powertop and > similar tools. If this can be used from user space already, it would be nice to add some notes to the commit how this can be done. > Cc: Arjan van de Ven > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/i915_trace.h | 15 +++++++++++++++ > drivers/gpu/drm/i915/intel_pm.c | 2 ++ > 2 files changed, 17 insertions(+) >=20 > diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i91= 5_trace.h > index 3c4093d..8134421 100644 > --- a/drivers/gpu/drm/i915/i915_trace.h > +++ b/drivers/gpu/drm/i915/i915_trace.h > @@ -430,6 +430,21 @@ TRACE_EVENT(i915_reg_rw, > (u32)(__entry->val >> 32)) > ); > =20 > +TRACE_EVENT(intel_gpu_freq_change, > + TP_PROTO(u32 freq), > + TP_ARGS(freq), > + > + TP_STRUCT__entry( > + __field(u32, freq) > + ), > + > + TP_fast_assign( > + __entry->freq =3D freq; > + ), > + > + TP_printk("new_freq=3D%u", __entry->freq) > +); > + > #endif /* _I915_TRACE_H_ */ > =20 > /* This part must be outside protection */ > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel= _pm.c > index ebe3498..194a72f 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -2343,6 +2343,8 @@ void gen6_set_rps(struct drm_device *dev, u8 val) > I915_WRITE(GEN6_RP_INTERRUPT_LIMITS, limits); > =20 > dev_priv->rps.cur_delay =3D val; > + > + trace_intel_gpu_freq_change(val * 50); > } > =20 > static void gen6_disable_rps(struct drm_device *dev) Acked-by: Paul Menzel Thanks, Paul --=-Lo0pCd4GIhksiOkZlj3F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEABECAAYFAlA/b9QACgkQPX1aK2wOHVgqmQCeMC2BbLLE7q3jmC5r7Vh3rcek Ud4AmwdkxAKN0R8rPVJrhEroi+KHbfZW =hEbe -----END PGP SIGNATURE----- --=-Lo0pCd4GIhksiOkZlj3F-- --===============2129314493== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============2129314493==--