From patchwork Thu Sep 4 21:07:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 4848011 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DE9729F314 for ; Thu, 4 Sep 2014 21:07:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 279C4201D3 for ; Thu, 4 Sep 2014 21:07:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3EC84201CD for ; Thu, 4 Sep 2014 21:07:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C786C6E5C8; Thu, 4 Sep 2014 14:07:35 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=K+ovoySi2FSZiddG+WFgSdoRN9N5JCqeWf4sh/kE3UQ=; b=A28pdy1TjF04EwKicMB6l6oQsBkGAA0SboRlH0W0z9G6B6rrDVUEU+bSLrKpmGvyT/ O08V+ICYtZz13pO0ECH4LNerYTme42/P1nrjqXsYUftbvzYOycmUj7czXW5XjO7adScr fCF5Jd3GouFrtjkXvQHAk7sZ/mpzzYLAs0CEffrAvlG4tHHdZwGXPew9s9x6B4OJfKdP ciiRKyuKIgM93pGjXa42L/9l4ijbfw5ZEBk0DLtCQc+F6wtqQIXS0z+LbRQY/EF4vCo+ sHRfjaGcAi9tD8l2TEDXQsVI5qTxFVhDaoQYnCfUbP4hn1v0Vzd5FEY8pVmPk/+XbriK cFUg== X-Received: by 10.140.22.19 with SMTP id 19mr10977044qgm.18.1409864852764; Thu, 04 Sep 2014 14:07:32 -0700 (PDT) Received: from localhost.localdomain ([187.112.63.208]) by mx.google.com with ESMTPSA id b7sm134303qan.37.2014.09.04.14.07.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Sep 2014 14:07:32 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Thu, 4 Sep 2014 18:07:02 -0300 Message-Id: <1409864822-1924-1-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH] drm/i915/bdw: cancel the SW turbo tasks before runtime suspending X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);