From patchwork Fri Mar 7 23:05:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 3795111 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 9F69DBF540 for ; Fri, 7 Mar 2014 23:06:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DDAF5202E9 for ; Fri, 7 Mar 2014 23:06:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0FD2E202BE for ; Fri, 7 Mar 2014 23:06:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C56ABFB605; Fri, 7 Mar 2014 15:06:33 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yh0-f47.google.com (mail-yh0-f47.google.com [209.85.213.47]) by gabe.freedesktop.org (Postfix) with ESMTP id 014DEFB4D3 for ; Fri, 7 Mar 2014 15:06:16 -0800 (PST) Received: by mail-yh0-f47.google.com with SMTP id c41so5024611yho.34 for ; Fri, 07 Mar 2014 15:06:16 -0800 (PST) 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=kwm3iI2RZlg76BMriZYBX2OzKpA1bsxWHZHTwQE2ob8=; b=rJWne0hzg4sfpZFgKc6HL/idxfDQ+Krht0HlyeXza/9cEhMjrPbEKZV8kadOxJu7iX BnhmIpmD6BqlJAppZODWQKdGIbHdo3qBhTdr19H+NYMk0IuyBohxKbn1OqjJVwL4TCUI Sm48Eq0X/6O+zRp+y4nxVnZafsqGD4cwP0T8dgxndfuVugmtsZVDqfUEKzwilX93NGT2 0av2fUBM7Aty9//T2cz0P7qs9SwmvBdCJCeWqyR/2WM6g9rI5GjFjG9J4Sqg7cdLrMPX yJOyqH4Zfldejmk/VmS+N/SOCc4n/B3n3DHt8Q93LYAdwyUJOAGIgjbKvoYw4c7zFRAC vikQ== X-Received: by 10.236.53.135 with SMTP id g7mr14346314yhc.106.1394233576694; Fri, 07 Mar 2014 15:06:16 -0800 (PST) Received: from localhost.localdomain ([177.132.70.215]) by mx.google.com with ESMTPSA id m9sm32523558yha.2.2014.03.07.15.06.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Mar 2014 15:06:16 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Fri, 7 Mar 2014 20:05:23 -0300 Message-Id: <1394233524-3522-6-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1394233524-3522-1-git-send-email-przanoni@gmail.com> References: <1394233524-3522-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 5/6] drm/i915: don't read pp_ctrl_reg if we're suspended X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 ... at edp_have_panel_vdd. Just return false, saying we don't have the panel VDD since the device is suspended. We started getting WARNs about this problem since the patch that started checking if we're suspended while reading registers. Testcase: igt/pm_pc8 Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index e936f36..0d051ef 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -313,7 +313,8 @@ static bool edp_have_panel_vdd(struct intel_dp *intel_dp) struct drm_device *dev = intel_dp_to_dev(intel_dp); struct drm_i915_private *dev_priv = dev->dev_private; - return (I915_READ(_pp_ctrl_reg(intel_dp)) & EDP_FORCE_VDD) != 0; + return !dev_priv->pm.suspended && + (I915_READ(_pp_ctrl_reg(intel_dp)) & EDP_FORCE_VDD) != 0; } static void