From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Expose energy counter on SNB+ through debugfs Date: Tue, 20 Aug 2013 15:16:58 +0200 Message-ID: <20130820131658.GQ776@phenom.ffwll.local> References: <1376990963-13889-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f179.google.com (mail-ea0-f179.google.com [209.85.215.179]) by gabe.freedesktop.org (Postfix) with ESMTP id 46C0BE6F20 for ; Tue, 20 Aug 2013 06:16:48 -0700 (PDT) Received: by mail-ea0-f179.google.com with SMTP id b10so216162eae.10 for ; Tue, 20 Aug 2013 06:16:47 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1376990963-13889-1-git-send-email-chris@chris-wilson.co.uk> 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: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Tue, Aug 20, 2013 at 10:29:23AM +0100, Chris Wilson wrote: > From: Jesse Barnes > > On SNB and IVB, there's an MSR (also exposed through MCHBAR) we can use > to read out the amount of energy used over time. Expose this in sysfs > to make it easy to do power comparisons with different configurations. > > If the platform supports it, the file will show up under the > drm/card0/power subdirectory of the PCI device in sysfs as gt_energy_uJ. > The value in the file is a running total of energy (in microjoules) > consumed by the graphics device. > > v2: move to sysfs (Ben, Daniel) > expose a simple value (Chris) > drop unrelated hunk (Ben) > > Signed-off-by: Jesse Barnes > > v3: by Ben > Tied it into existing rc6 sysfs entries and named that a more generic > "power attrs." Fixed rebase conflicts. > > Signed-off-by: Ben Widawsky > > v4: Since RAPL is a real driver that already exists to serve power > monitoring, place our entry in debugfs. This gives me a fallback > location for systems that do not expose it otherwise. > > Signed-off-by: Chris Wilson Yeah, makes sense to keep this handy for our own tooling. Queued for -next, thanks for the patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch