public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Deepak S <deepak.s@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Read power well status before other registers for drpc info
Date: Thu, 20 Nov 2014 10:26:58 +0100	[thread overview]
Message-ID: <20141120092658.GD25711@phenom.ffwll.local> (raw)
In-Reply-To: <546EB0CA.2040600@linux.intel.com>

On Fri, Nov 21, 2014 at 08:56:02AM +0530, Deepak S wrote:
> 
> On Wednesday 19 November 2014 11:37 PM, ville.syrjala@linux.intel.com wrote:
> >From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> >Trying to read the status of the power wells right after taking forcewake
> >for the other register reads makes little sense. Most of the time the
> >power wells will still be up due to the recent forcewake. Instead do the
> >power well status read first, and only then read the register needing
> >forcewake. This way the reported power well status can actually reflect
> >what's going on in the system.
> >
> >Cc: Deepak S <deepak.s@intel.com>
> >Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >---
> >  drivers/gpu/drm/i915/i915_debugfs.c | 9 ++++-----
> >  1 file changed, 4 insertions(+), 5 deletions(-)
> >
> >diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> >index 319da61..2d4f870 100644
> >--- a/drivers/gpu/drm/i915/i915_debugfs.c
> >+++ b/drivers/gpu/drm/i915/i915_debugfs.c
> >@@ -1240,11 +1240,12 @@ static int vlv_drpc_info(struct seq_file *m)
> >  	struct drm_info_node *node = m->private;
> >  	struct drm_device *dev = node->minor->dev;
> >  	struct drm_i915_private *dev_priv = dev->dev_private;
> >-	u32 rpmodectl1, rcctl1;
> >+	u32 rpmodectl1, rcctl1, pw_status;
> >  	unsigned fw_rendercount = 0, fw_mediacount = 0;
> >  	intel_runtime_pm_get(dev_priv);
> >+	pw_status = I915_READ(VLV_GTLC_PW_STATUS);
> >  	rpmodectl1 = I915_READ(GEN6_RP_CONTROL);
> >  	rcctl1 = I915_READ(GEN6_RC_CONTROL);
> >@@ -1263,11 +1264,9 @@ static int vlv_drpc_info(struct seq_file *m)
> >  		   yesno(rcctl1 & (GEN7_RC_CTL_TO_MODE |
> >  					GEN6_RC_CTL_EI_MODE(1))));
> >  	seq_printf(m, "Render Power Well: %s\n",
> >-			(I915_READ(VLV_GTLC_PW_STATUS) &
> >-				VLV_GTLC_PW_RENDER_STATUS_MASK) ? "Up" : "Down");
> >+		   (pw_status & VLV_GTLC_PW_RENDER_STATUS_MASK) ? "Up" : "Down");
> >  	seq_printf(m, "Media Power Well: %s\n",
> >-			(I915_READ(VLV_GTLC_PW_STATUS) &
> >-				VLV_GTLC_PW_MEDIA_STATUS_MASK) ? "Up" : "Down");
> >+		   (pw_status & VLV_GTLC_PW_MEDIA_STATUS_MASK) ? "Up" : "Down");
> >  	seq_printf(m, "Render RC6 residency since boot: %u\n",
> >  		   I915_READ(VLV_GT_RENDER_RC6));
> 
> Reviewed-by: Deepak S<deepak.s@linux.intel.com>

Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2014-11-20  9:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 18:07 [PATCH] drm/i915: Read power well status before other registers for drpc info ville.syrjala
2014-11-21  3:26 ` Deepak S
2014-11-20  9:26   ` Daniel Vetter [this message]
2014-11-21  4:58 ` [PATCH] drm/i915: Read power well status before other shuang.he

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141120092658.GD25711@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=deepak.s@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox