From patchwork Mon Jul 28 18:37:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 4636231 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 90D01C0338 for ; Mon, 28 Jul 2014 18:37:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CEE8E2020E for ; Mon, 28 Jul 2014 18:37:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id F0FFB201B4 for ; Mon, 28 Jul 2014 18:37:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 942E26E3F1; Mon, 28 Jul 2014 11:37:43 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by gabe.freedesktop.org (Postfix) with ESMTP id EEA516E3F1 for ; Mon, 28 Jul 2014 11:37:42 -0700 (PDT) Received: by mail-vc0-f171.google.com with SMTP id hq11so11984355vcb.2 for ; Mon, 28 Jul 2014 11:37:42 -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=GsvtnqLJof0vKBL+UfaXfq0jTb4F6V88R5hijAQtbks=; b=fHQ4SSXy4GvPrHEiSnxh24xgYNPQz3wJ2/fiOdQkWVIjs+twKDoGCDNa7z0OLMxrDm wqm+Nd02T56iPgQyyBFco+ZmjWr8qxqUdMs2/EPImOw6NKo2w/ejWb/Y73ulCgHjXZax KqbHYhCGYUJIP/4+8V7agAYGBgAeY/6QLP3EIeUIz+ugvCcfawEhUiQicG0GAX9Seutz t1B1uNHm4JSIf1AiVD2SZV4EYAR7hUrUOfatGDdz/XWK44JTI5CeH+ojLUBU80x9cIVC 94H5hPdte8kyTsZKxey5iPzbgrl7piScQghzzjOZ1unE6qOnd6062B1GJ1pKC78zZ5l8 K1wA== X-Received: by 10.220.122.132 with SMTP id l4mr2793302vcr.41.1406572662342; Mon, 28 Jul 2014 11:37:42 -0700 (PDT) Received: from localhost.localdomain ([177.132.4.36]) by mx.google.com with ESMTPSA id oa3sm21542055vdb.3.2014.07.28.11.37.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jul 2014 11:37:41 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Mon, 28 Jul 2014 15:37:14 -0300 Message-Id: <1406572636-1809-4-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 2/3] drm/i915: get runtime PM when pinning sprite 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/legacy-planes Testcase: igt/pm_rpm/legacy-planes-dpms Cc: stable@vger.kernel.org Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_sprite.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index d34a569..8c5a8f7 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -821,6 +821,7 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, uint32_t src_w, uint32_t src_h) { struct drm_device *dev = plane->dev; + struct drm_i915_private *dev_priv = dev->dev_private; struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_plane *intel_plane = to_intel_plane(plane); enum pipe pipe = intel_crtc->pipe; @@ -1009,7 +1010,9 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, * primary plane requires 256KiB alignment with 64 PTE padding, * the sprite planes only require 128KiB alignment and 32 PTE padding. */ + intel_runtime_pm_get(dev_priv); ret = intel_pin_and_fence_fb_obj(dev, obj, NULL); + intel_runtime_pm_put(dev_priv); i915_gem_track_fb(old_obj, obj, INTEL_FRONTBUFFER_SPRITE(pipe));