From patchwork Wed Jun 24 08:09:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 6666231 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E9FBFC05AC for ; Wed, 24 Jun 2015 08:09:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 29CE320616 for ; Wed, 24 Jun 2015 08:09:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 255332060D for ; Wed, 24 Jun 2015 08:09:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 73EE36E63B; Wed, 24 Jun 2015 01:09:22 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id 644376E63B for ; Wed, 24 Jun 2015 01:09:20 -0700 (PDT) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 41442092-1500048 for multiple; Wed, 24 Jun 2015 09:09:46 +0100 Received: by haswell.alporthouse.com (sSMTP sendmail emulation); Wed, 24 Jun 2015 09:09:04 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Wed, 24 Jun 2015 09:09:03 +0100 Message-Id: <1435133343-15563-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.1.4 X-Originating-IP: 78.156.65.138 X-Country: code=GB country="United Kingdom" ip=78.156.65.138 Cc: Akash Goel Subject: [Intel-gfx] [PATCH] drm/i915: Do a lightweight pm_get() from intel_mark_busy() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham 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 Akash noticed that we were recursing from the call to intel_runtime_pm_get() inside intel_mark_busy() when we were already waking the device (through another intel_runtime_pm_get()). In intel_mark_busy() we know the device is awake and purpose of the reference here is to simply keep the device awake until the GPU is idle again. As such we do not need the full resume, and can call the lighter intel_runtime_pm_get_noresume() instead. Signed-off-by: Chris Wilson Cc: Akash Goel Cc: Imre Deak --- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index a43abc38af90..da0d882cc71e 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -10668,7 +10668,7 @@ void intel_mark_busy(struct drm_device *dev) if (dev_priv->mm.busy) return; - intel_runtime_pm_get(dev_priv); + intel_runtime_pm_get_noresume(dev_priv); intel_rps_busy(dev_priv); dev_priv->mm.busy = true; }