From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 1/2] drm/i915: add rc6 residency times to debugfs Date: Tue, 10 Apr 2012 11:52:14 +0200 Message-ID: <20120410095214.GD4115@phenom.ffwll.local> References: <1332899982-16324-1-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by gabe.freedesktop.org (Postfix) with ESMTP id C35B39E8B3 for ; Tue, 10 Apr 2012 02:51:22 -0700 (PDT) Received: by wgbdr12 with SMTP id dr12so3917499wgb.12 for ; Tue, 10 Apr 2012 02:51:22 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1332899982-16324-1-git-send-email-ben@bwidawsk.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Ben Widawsky Cc: intel-gfx@lists.freedesktop.org, Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Tue, Mar 27, 2012 at 06:59:38PM -0700, Ben Widawsky wrote: > RC6 residency should be in intervals of 1.28us, and the counter wraps. > Here is an example using awk to get the various RC6 and RC6+ residency > times in seconds, since boot. > > cat /sys/kernel/debug/dri/0/i915_drpc_info | grep residency | awk -F':' -F' ' '{print $5 * 1.28 / 1000000}' > > This is primarily for QA, but has other applications as well. An > upcoming patch to add interfaces should be more interesting to > application developers. > > v2: move comment to the correct place > > v3: display with %u instead of %d, for Ouping > > CC: Ouping Zhang > Reviewed-by: Eugeni Dodonov > Signed-off-by: Ben Widawsky Queued for -next, thanks for the patch. I've stalled on the 2nd one due to Chris' bikeshed. Personally, I prefer the _residency_ms names. Also, please update the i-g-t patches when resending. Thanks, Daniel > --- > drivers/gpu/drm/i915/i915_debugfs.c | 11 +++++++++++ > drivers/gpu/drm/i915/i915_reg.h | 5 +++++ > 2 files changed, 16 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > index 66c90d4..0b9c1e8 100644 > --- a/drivers/gpu/drm/i915/i915_debugfs.c > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > @@ -1133,6 +1133,17 @@ static int gen6_drpc_info(struct seq_file *m) > > seq_printf(m, "Core Power Down: %s\n", > yesno(gt_core_status & GEN6_CORE_CPD_STATE_MASK)); > + > + /* Not exactly sure what this is */ > + seq_printf(m, "RC6 \"Locked to RPn\" residency since boot: %u\n", > + I915_READ(GEN6_GT_GFX_RC6_LOCKED)); > + seq_printf(m, "RC6 residency since boot: %u\n", > + I915_READ(GEN6_GT_GFX_RC6)); > + seq_printf(m, "RC6+ residency since boot: %u\n", > + I915_READ(GEN6_GT_GFX_RC6p)); > + seq_printf(m, "RC6++ residency since boot: %u\n", > + I915_READ(GEN6_GT_GFX_RC6pp)); > + > return 0; > } > > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h > index f3609f2..b1c3d35 100644 > --- a/drivers/gpu/drm/i915/i915_reg.h > +++ b/drivers/gpu/drm/i915/i915_reg.h > @@ -3799,6 +3799,11 @@ > GEN6_PM_RP_DOWN_THRESHOLD | \ > GEN6_PM_RP_DOWN_TIMEOUT) > > +#define GEN6_GT_GFX_RC6_LOCKED 0x138104 > +#define GEN6_GT_GFX_RC6 0x138108 > +#define GEN6_GT_GFX_RC6p 0x13810C > +#define GEN6_GT_GFX_RC6pp 0x138110 > + > #define GEN6_PCODE_MAILBOX 0x138124 > #define GEN6_PCODE_READY (1<<31) > #define GEN6_READ_OC_PARAMS 0xc > -- > 1.7.9.4 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48