From patchwork Mon Jun 25 05:47:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dhinakaran Pandiyan X-Patchwork-Id: 10485089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9F7A16031B for ; Mon, 25 Jun 2018 05:48:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AF40288AC for ; Mon, 25 Jun 2018 05:48:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D844288B4; Mon, 25 Jun 2018 05:48:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 434B3288AC for ; Mon, 25 Jun 2018 05:48:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 905616E149; Mon, 25 Jun 2018 05:47:59 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pl0-x241.google.com (mail-pl0-x241.google.com [IPv6:2607:f8b0:400e:c01::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id A1F216E149 for ; Mon, 25 Jun 2018 05:47:57 +0000 (UTC) Received: by mail-pl0-x241.google.com with SMTP id g20-v6so6311298plq.1 for ; Sun, 24 Jun 2018 22:47:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JpMwMiL+pGu5bPXVm5suI2N3Bo/ilFl0NrS1cGmufHQ=; b=FgDR3MG/GxgsBEH2TxE9OfIjygvCPzvMNoG3fqH/CuG4tw+rO9gmPI9rjHGovQw9Cn 7bicWmTz9NRfWdvSBKwcDloOnDOVX9gI0TQ1gaaxNSnmgF3khmChJIqHoav/Zes6UQWe opyV62ijqEuQVHu0TertsO5//0ykAVTIshtCeYpoPb7GluZsJT0J+JlAH7RBtiPa2vjp rVLFJRv+w2wGpLfoJOKimKsywNHgpZpmget5B9gmDgmjgaS0fUuP79sSumSkT/HAcEOe APMOhayTX08sEeis1WIadR+i+JqEpQz/gmr+wS8va5PXK13hcv7JJKXDzE8LM6Ks4fOv MtnQ== X-Gm-Message-State: APt69E014wHG3uyM1yPRrLTqVWeyQuqYf12+dKTHtVpPGlHnub18bCQO +AiuMyK2Fccrzz57b0D4mMg+cA== X-Google-Smtp-Source: ADUXVKI3elqSpQBVy1Z1M3glqMqEvGaxftgU/FWrEoPT7jT8+tqyjSzHsRR/AgabYPihFFBuXM1+2g== X-Received: by 2002:a17:902:8f94:: with SMTP id z20-v6mr10883688plo.337.1529905676852; Sun, 24 Jun 2018 22:47:56 -0700 (PDT) Received: from dk-ThinkPad-X260.hsd1.or.comcast.net ([2601:1c0:6000:88e0:9890:201e:b8a1:a770]) by smtp.gmail.com with ESMTPSA id x17-v6sm18105818pgv.15.2018.06.24.22.47.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jun 2018 22:47:55 -0700 (PDT) From: Dhinakaran Pandiyan X-Google-Original-From: Dhinakaran Pandiyan To: intel-gfx@lists.freedesktop.org Date: Sun, 24 Jun 2018 22:47:41 -0700 Message-Id: <20180625054741.3919-2-dhinakaran.pandiyan@intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180625054741.3919-1-dhinakaran.pandiyan@intel.com> References: <20180625054741.3919-1-dhinakaran.pandiyan@intel.com> Subject: [Intel-gfx] [PATCH 2/2] drm/i915/psr: Warn for erroneous enabling of both PSR1 and PSR2. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dhinakaran Pandiyan MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Depending whether PSR1 or PSR2 was configured, we print a warning if the corresponding control mmio indicated PSR was erroneously enabled. As Chris pointed out, it makes more sense to check for both the mmio's since we expect neither PSR1 nor PSR2 to be enabled when psr_activate() is called. Cc: Chris Wilson Signed-off-by: Dhinakaran Pandiyan --- drivers/gpu/drm/i915/intel_psr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c index 7aa324f0d1f7..970b8ced46a3 100644 --- a/drivers/gpu/drm/i915/intel_psr.c +++ b/drivers/gpu/drm/i915/intel_psr.c @@ -576,10 +576,8 @@ static void intel_psr_activate(struct intel_dp *intel_dp) struct drm_device *dev = intel_dig_port->base.base.dev; struct drm_i915_private *dev_priv = to_i915(dev); - if (dev_priv->psr.psr2_enabled) - WARN_ON(I915_READ(EDP_PSR2_CTL) & EDP_PSR2_ENABLE); - else - WARN_ON(I915_READ(EDP_PSR_CTL) & EDP_PSR_ENABLE); + WARN_ON(I915_READ(EDP_PSR2_CTL) & EDP_PSR2_ENABLE); + WARN_ON(I915_READ(EDP_PSR_CTL) & EDP_PSR_ENABLE); WARN_ON(dev_priv->psr.active); lockdep_assert_held(&dev_priv->psr.lock);