From: Paulo Zanoni Subject: [PATCH] drm/i915/bdw: cancel the SW turbo tasks before runtime suspending Date: Thu, 4 Sep 2014 18:07:02 -0300 Message-ID: <1409864822-1924-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-qc0-f171.google.com (mail-qc0-f171.google.com [209.85.216.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 28BEB6E5C8 for ; Thu, 4 Sep 2014 14:07:34 -0700 (PDT) Received: by mail-qc0-f171.google.com with SMTP id x3so11419484qcv.30 for ; Thu, 04 Sep 2014 14:07:32 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org Cc: Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org From: Paulo Zanoni 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 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 --- 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