From patchwork Tue Apr 1 17:55:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 3925141 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 4BFBCBF549 for ; Tue, 1 Apr 2014 17:55:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8349B20256 for ; Tue, 1 Apr 2014 17:55:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9F84F201F9 for ; Tue, 1 Apr 2014 17:55:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0DE3D6E7D7; Tue, 1 Apr 2014 10:55:40 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yh0-f45.google.com (mail-yh0-f45.google.com [209.85.213.45]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D30B6E7DF for ; Tue, 1 Apr 2014 10:55:38 -0700 (PDT) Received: by mail-yh0-f45.google.com with SMTP id a41so9363228yho.4 for ; Tue, 01 Apr 2014 10:55:37 -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=EfshlbJik1a3r1KcBayxfO4WarAHZjL3pOB6qE0DSHs=; b=QhGbgEX13boEUv7ndKTlcTpM/XHdSTJmx6Z7zJ6wci+dnxqvkDsrnT9/5hYGhdmRVN N1/8V3v7q5nvlUNvBjFUQr5ygmv0iynflddQNCva1YKfFrIjpkfrSmVvxomMUqQfdBEA +uX1d6x86sH0AL+XGrzEdF08V5L2WLMUTuY4NXuIY61VjaBKygP1MMDfdTo4N301K1ke +tLJmP3UxrnoaPTZKpRnXZvo48wq+QgWIDedYipaOdwGVYYtPz1mr0kJjYqj2CGhlU88 xoqujJkCp6zKBHm96Elj4TZiK4SemcvhgrKwHr1CQrdoWstzA4auJVpxCm+xgqWvaKrl 9QfA== X-Received: by 10.236.112.39 with SMTP id x27mr13625638yhg.103.1396374937866; Tue, 01 Apr 2014 10:55:37 -0700 (PDT) Received: from localhost.localdomain ([177.42.1.121]) by mx.google.com with ESMTPSA id u5sm31543657yhg.25.2014.04.01.10.55.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Apr 2014 10:55:37 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 1 Apr 2014 14:55:10 -0300 Message-Id: <1396374913-2030-5-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1396374913-2030-1-git-send-email-przanoni@gmail.com> References: <1396374913-2030-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 4/7] drm/i915: get runtime PM at i915_display_info 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=-3.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, 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 some WARNs complaining that we're reading a register while we're suspended. Testcase: igt/pm_pc8/debugfs-read Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/i915_debugfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 7522f97..23a6516 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -2319,9 +2319,11 @@ static int i915_display_info(struct seq_file *m, void *unused) { struct drm_info_node *node = (struct drm_info_node *) m->private; struct drm_device *dev = node->minor->dev; + struct drm_i915_private *dev_priv = dev->dev_private; struct intel_crtc *crtc; struct drm_connector *connector; + intel_runtime_pm_get(dev_priv); drm_modeset_lock_all(dev); seq_printf(m, "CRTC info\n"); seq_printf(m, "---------\n"); @@ -2349,6 +2351,7 @@ static int i915_display_info(struct seq_file *m, void *unused) intel_connector_info(m, connector); } drm_modeset_unlock_all(dev); + intel_runtime_pm_put(dev_priv); return 0; }