From patchwork Mon Jul 28 18:37:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 4636261 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9D59AC0338 for ; Mon, 28 Jul 2014 18:37:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C04602020E for ; Mon, 28 Jul 2014 18:37:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id CA5EF20211 for ; Mon, 28 Jul 2014 18:37:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 688246E3F9; Mon, 28 Jul 2014 11:37:48 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by gabe.freedesktop.org (Postfix) with ESMTP id A39FB6E3F9 for ; Mon, 28 Jul 2014 11:37:45 -0700 (PDT) Received: by mail-vc0-f169.google.com with SMTP id le20so3138318vcb.14 for ; Mon, 28 Jul 2014 11:37:45 -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=MSU7izA+2vzOVSzJtm4887JiQeF6D2F+IHMPe2dI6TY=; b=N5A+kNMg/CDYLxSwM+dGnF3P9xdJNNq4jaHGj/jK7hGKRwTwgCUb3MN7GUAwPlDOkp X1AWWfsyHn8WxydALrjsDJQv/nHN1fDl0YQwVjgnNGfBVHelF4H8YFkg62SUcIKytQA7 Ai1YNvuwt4xzJnCfLwOyYUKtfrXbdJbb80zcp7kIdaFy5rSWb5mNhMfGkWE0XHtUdVU/ 0U8p+gYsaC5SeB6NK1sToaICopx3bowUHoN/IhWpWVhRrURTaFeSTI8u7pJkQ1+3fPnV Xz0NbgOppqO7k3ZOz1T0yQiyardDPHnY6XpQDaRUKteN8Tc4yXoDJGpYjBGq3zvIJ4pL MM1Q== X-Received: by 10.52.69.172 with SMTP id f12mr40846697vdu.9.1406572665085; Mon, 28 Jul 2014 11:37:45 -0700 (PDT) Received: from localhost.localdomain ([177.132.4.36]) by mx.google.com with ESMTPSA id oa3sm21542055vdb.3.2014.07.28.11.37.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jul 2014 11:37:44 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Mon, 28 Jul 2014 15:37:16 -0300 Message-Id: <1406572636-1809-6-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1406572636-1809-1-git-send-email-przanoni@gmail.com> References: <1406572636-1809-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni , stable@vger.kernel.org Subject: [Intel-gfx] [PATCH 3/3] drm/i915: get runtime PM when pinning primary plane objects 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.8 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 Otherwise we may get WARNs saying we're writing registers while runtime suspended. Testcase: igt/pm_rpm/universal-planes Testcase: igt/pm_rpm/universal-planes-dpms Cc: stable@vger.kernel.org Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f1a9b5c..5948207 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -11531,7 +11531,9 @@ intel_primary_plane_setplane(struct drm_plane *plane, struct drm_crtc *crtc, INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe)); /* Pin and return without programming hardware */ + intel_runtime_pm_get(dev_priv); ret = intel_pin_and_fence_fb_obj(dev, obj, NULL); + intel_runtime_pm_put(dev_priv); mutex_unlock(&dev->struct_mutex); return ret; @@ -11553,7 +11555,9 @@ intel_primary_plane_setplane(struct drm_plane *plane, struct drm_crtc *crtc, * fail. */ if (plane->fb != fb) { + intel_runtime_pm_get(dev_priv); ret = intel_pin_and_fence_fb_obj(dev, obj, NULL); + intel_runtime_pm_put(dev_priv); if (ret) { mutex_unlock(&dev->struct_mutex); return ret;