From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH] drm/i915: get/put runtime PM at i915_semaphore_status Date: Wed, 9 Jul 2014 14:02:27 -0700 Message-ID: <20140709210226.GA8324@bwidawsk.net> References: <1404927117-3353-1-git-send-email-przanoni@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.bwidawsk.net (bwidawsk.net [166.78.191.112]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F8A889856 for ; Wed, 9 Jul 2014 14:02:40 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1404927117-3353-1-git-send-email-przanoni@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Paulo Zanoni Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org On Wed, Jul 09, 2014 at 02:31:57PM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > > 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 > Signed-off-by: Paulo Zanoni Reviewed-by: Ben Widawsky > --- > 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