public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH] drm/i915: get/put runtime PM at i915_semaphore_status
Date: Wed, 9 Jul 2014 14:02:27 -0700	[thread overview]
Message-ID: <20140709210226.GA8324@bwidawsk.net> (raw)
In-Reply-To: <1404927117-3353-1-git-send-email-przanoni@gmail.com>

On Wed, Jul 09, 2014 at 02:31:57PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> 
> Otherwise we will print some WARNs when we read registers and the
> machine is suspended.

Do all register reads really require this? If so, shouldn't it work
similarly to forcewake? I didn't follow any of the PM mails, so feel
free to ignore if this has been discussed and addressed already.

> 
> Testcase: igt/pm_rpm/debugfs-read
> Cc: Ben Widawsky <ben@bwidawsk.net>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>

> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> I still dream with the day we will have a system that will run IGT on our
> patches/series _before_ they are applied to the tree, and tell us in case some
> testcase fails or gives us a WARN.
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 0c665df..1ff56ec 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2316,6 +2316,7 @@ static int i915_semaphore_status(struct seq_file *m, void *unused)
>  	ret = mutex_lock_interruptible(&dev->struct_mutex);
>  	if (ret)
>  		return ret;
> +	intel_runtime_pm_get(dev_priv);
>  
>  	if (IS_BROADWELL(dev)) {
>  		struct page *page;
> @@ -2365,6 +2366,7 @@ static int i915_semaphore_status(struct seq_file *m, void *unused)
>  	}
>  	seq_putc(m, '\n');
>  
> +	intel_runtime_pm_put(dev_priv);
>  	mutex_unlock(&dev->struct_mutex);
>  	return 0;
>  }
> -- 
> 2.0.0
> 

-- 
Ben Widawsky, Intel Open Source Technology Center

  reply	other threads:[~2014-07-09 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09 17:31 [PATCH] drm/i915: get/put runtime PM at i915_semaphore_status Paulo Zanoni
2014-07-09 21:02 ` Ben Widawsky [this message]
2014-07-10  6:33   ` Daniel Vetter

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=20140709210226.GA8324@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=przanoni@gmail.com \
    /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