From patchwork Wed Sep 17 14:25:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 4924751 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 7A7609F2EC for ; Wed, 17 Sep 2014 14:25:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D04920158 for ; Wed, 17 Sep 2014 14:26:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D003A20108 for ; Wed, 17 Sep 2014 14:26:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B38A6E526; Wed, 17 Sep 2014 07:26:26 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qc0-f173.google.com (mail-qc0-f173.google.com [209.85.216.173]) by gabe.freedesktop.org (Postfix) with ESMTP id 9AACF6E526 for ; Wed, 17 Sep 2014 07:26:24 -0700 (PDT) Received: by mail-qc0-f173.google.com with SMTP id i8so2168840qcq.18 for ; Wed, 17 Sep 2014 07:26:24 -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:in-reply-to:references; bh=7TXqtf4GGb/iC6yBL/UDiWCJyXpIqNXqDOZK/eoma4E=; b=NL2jzPO6pPODaFZM9+TyFMbIilMUilJOAkc3JF0bwgZOlpdWJJNzhWfVXGZhQ2eYcF XIIFuvk+qOroa7BeOEkNyhqC+f4Dkd2h60oUaqQYlBca+EJraBv95TthyUTwiLqU/k+1 wY1aSYMCOx7Tm35W8M63CObgfveFOilKc/FBl+6vmJVtq6iSIZTK1qol0gwJIyKOs5N9 +zJMq6c8mkZSL5Ub6S5+NtwEH9cHpWM+wniinFMNxhg5VYxM7R0raZDt1II0fgAhDCqO ZJWWgGSS9WkqlXruxFMeZby800yrEzmmdzc4KWVaVqOQ/6/RYJVHVvCgH5VW94xqf9hG Q1vQ== X-Received: by 10.224.89.10 with SMTP id c10mr58011516qam.51.1410963983695; Wed, 17 Sep 2014 07:26:23 -0700 (PDT) Received: from localhost.localdomain ([187.59.12.155]) by mx.google.com with ESMTPSA id i1sm14351564qaz.28.2014.09.17.07.26.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Sep 2014 07:26:23 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Wed, 17 Sep 2014 11:25:35 -0300 Message-Id: <1410963935-2004-1-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <540E5E20.3050007@intel.com> References: <540E5E20.3050007@intel.com> 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=-4.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 v2: Also set flip_received to false (Daisy) Testcase: igt/pm_rpm/gem-execbuf (you may have to run it a few times) Cc: Daisy Sun Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/i915_drv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index b8bd008..857f0f9 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1447,6 +1447,11 @@ 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); + atomic_set(&dev_priv->rps.sw_turbo.flip_received, false); + } intel_runtime_pm_disable_interrupts(dev); ret = intel_suspend_complete(dev_priv);