From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eugeni Dodonov Subject: Re: [PATCH] drm/i915: expose energy counter on SNB and IVB Date: Sun, 24 Jun 2012 20:06:31 -0300 Message-ID: <4FE79D77.3030905@linux.intel.com> References: <1340228938-16489-1-git-send-email-jbarnes@virtuousgeek.org> Reply-To: eugeni.dodonov@intel.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 57AD39EBAC for ; Sun, 24 Jun 2012 16:04:42 -0700 (PDT) In-Reply-To: <1340228938-16489-1-git-send-email-jbarnes@virtuousgeek.org> 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: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On 06/20/2012 06:48 PM, Jesse Barnes wrote: > 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 (Assuming I haven't checked all the magic register values but I trust that they work): Reviewed-by: Eugeni Dodonov Eugeni