From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 05/11] drm/i915: Added debugfs support for PSR Status Date: Mon, 15 Jul 2013 15:03:29 +0100 Message-ID: <20130715140328.GE2823@cantiga.alporthouse.com> References: <1373579105-1732-1-git-send-email-rodrigo.vivi@gmail.com> <1373579105-1732-6-git-send-email-rodrigo.vivi@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (s16502780.onlinehome-server.info [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id BC682E63A0 for ; Mon, 15 Jul 2013 07:03:36 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1373579105-1732-6-git-send-email-rodrigo.vivi@gmail.com> 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: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org On Thu, Jul 11, 2013 at 06:44:59PM -0300, Rodrigo Vivi wrote: > Adding support for PSR Status, PSR entry counter and performance counters. > Heavily based on initial work from Shobhit. > > v2: Fix PSR Status Link bits by Paulo Zanoni. > v3: Prefer seq_puts to seq_printf by Paulo Zanoni. > v4: Fix identation by Paulo Zanoni. > v5: Return earlier if it isn't Haswell in order to avoid reading non-existing > registers - by Paulo Zanoni. > > CC: Paulo Zanoni > Reviewed-by: Paulo Zanoni > Credits-by: Shobhit Kumar > Signed-off-by: Rodrigo Vivi > --- > drivers/gpu/drm/i915/i915_debugfs.c | 95 +++++++++++++++++++++++++++++++++++++ > drivers/gpu/drm/i915/i915_reg.h | 24 ++++++++++ > 2 files changed, 119 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > index d413812..fe3cd5a 100644 > --- a/drivers/gpu/drm/i915/i915_debugfs.c > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > @@ -1943,6 +1943,100 @@ static int i915_dpio_info(struct seq_file *m, void *data) > return 0; > } > > +static int i915_edp_psr_status(struct seq_file *m, void *data) > +{ > + struct drm_info_node *node = m->private; > + struct drm_device *dev = node->minor->dev; > + struct drm_i915_private *dev_priv = dev->dev_private; > + u32 psrctl, psrstat, psrperf; > + > + if (!IS_HASWELL(dev)) { Introduce a HAS_PSR(dev) > + seq_puts(m, "PSR not supported on this platform\n"); > + return 0; > + } > + > + psrctl = I915_READ(EDP_PSR_CTL); Missing locking. -Chris -- Chris Wilson, Intel Open Source Technology Centre