public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH] drm/i915/bdw: cancel the SW turbo tasks before runtime suspending
Date: Thu,  4 Sep 2014 18:07:02 -0300	[thread overview]
Message-ID: <1409864822-1924-1-git-send-email-przanoni@gmail.com> (raw)

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

If we don't cancel them, we may end up running them while the device
is runtime suspended, which will trigger lots and lots of WARNs on
dmesg.

Regression introduced by:
commit c76bb61a71083b2d90504cc6d0dda2047c5d63ca
Author: Daisy Sun <daisy.sun@intel.com>
Date:   Mon Aug 11 11:08:38 2014 -0700
    drm/i915/bdw: BDW Software Turbo

Testcase: igt/pm_rpm/gem-execbuf (you may have to run it a few times)
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 8ff3755..4ce217b 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1448,6 +1448,10 @@ static int intel_runtime_suspend(struct device *device)
 	 * intel_mark_idle().
 	 */
 	cancel_work_sync(&dev_priv->rps.work);
+	if (dev_priv->rps.is_bdw_sw_turbo) {
+		del_timer_sync(&dev_priv->rps.sw_turbo.flip_timer);
+		cancel_work_sync(&dev_priv->rps.sw_turbo.work_max_freq);
+	}
 	intel_runtime_pm_disable_interrupts(dev);
 
 	ret = intel_suspend_complete(dev_priv);
-- 
2.1.0

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04 21:07 Paulo Zanoni [this message]
2014-09-05  8:46 ` [PATCH] drm/i915/bdw: cancel the SW turbo tasks before runtime suspending Daniel Vetter
2014-09-05 13:00 ` Paulo Zanoni
2014-09-09  1:55   ` Sun, Daisy
2014-09-17 14:25     ` Paulo Zanoni

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=1409864822-1924-1-git-send-email-przanoni@gmail.com \
    --to=przanoni@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.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