From patchwork Fri Feb 28 23:44:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 3745281 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DE41F9F489 for ; Fri, 28 Feb 2014 23:45:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1BC40202A7 for ; Fri, 28 Feb 2014 23:45:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5017920263 for ; Fri, 28 Feb 2014 23:45:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 566CDFBDD8; Fri, 28 Feb 2014 15:45:11 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yk0-f172.google.com (mail-yk0-f172.google.com [209.85.160.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CF6BFBDD6 for ; Fri, 28 Feb 2014 15:45:06 -0800 (PST) Received: by mail-yk0-f172.google.com with SMTP id 200so3899835ykr.3 for ; Fri, 28 Feb 2014 15:45:05 -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=8aKWNyA4yGLpx6pWArUyLEDfECipRXeFZ06LJRj4rP8=; b=oouBzV/Thof/JtQYGRB0H0xgik6NImGM5MpGBzEzdxuxvPB5PNf7WT0SxSoidREGUb J+MzjIyEmBgPLtp6FFzr1Qj3/5N26c+iZcYq52YmCN+ktsu74DGpKQ83eB2UceEmjpGv a83R2hVw2hoUZKEsUez9ZwudQUfj3oZxlsQoctTzRgqoWLZBU7RfsrXk6ZMwyw6H5oiX eO5hG8adToRHOYXU2MOdp5eVtmztU/sA1s0ceQVnWfh5EK9aas0GsTeZDWKUTch4R/uF DaEpswalIIJTD5PVL0hQHZa6zZzbKuW/buchOui9lXPcOD1dm6zCBuPMXbjWQyCVR3KF eA6A== X-Received: by 10.236.182.229 with SMTP id o65mr4833744yhm.86.1393631105824; Fri, 28 Feb 2014 15:45:05 -0800 (PST) Received: from localhost.localdomain ([189.67.129.152]) by mx.google.com with ESMTPSA id h23sm10769779yhc.0.2014.02.28.15.45.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Feb 2014 15:45:05 -0800 (PST) From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Fri, 28 Feb 2014 20:44:41 -0300 Message-Id: <1393631086-3880-7-git-send-email-rodrigo.vivi@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1393631086-3880-1-git-send-email-rodrigo.vivi@gmail.com> References: <1393631086-3880-1-git-send-email-rodrigo.vivi@gmail.com> Subject: [Intel-gfx] [PATCH 06/11] drm/i915: Do not try to enable PSR when Panel doesn't suport it. 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, 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 Also do not cache aux info. That info could be related to another panel. Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/intel_dp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 68baa8c..0799882 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1605,11 +1605,9 @@ static void intel_dp_get_config(struct intel_encoder *encoder, } } -static bool is_edp_psr(struct drm_device *dev) +static bool is_edp_psr(struct intel_dp *intel_dp) { - struct drm_i915_private *dev_priv = dev->dev_private; - - return dev_priv->psr.sink_support; + return intel_dp->psr_dpcd[0] & DP_PSR_IS_SUPPORTED; } static bool intel_edp_is_psr_enabled(struct drm_device *dev) @@ -1815,6 +1813,11 @@ void intel_edp_psr_enable(struct intel_dp *intel_dp) return; } + if (!is_edp_psr(intel_dp)) { + DRM_DEBUG_KMS("PSR not supported by this panel\n"); + return; + } + /* Setup PSR once */ intel_edp_psr_setup(intel_dp); @@ -1856,9 +1859,6 @@ void intel_edp_psr_update(struct drm_device *dev) if (encoder->type == INTEL_OUTPUT_EDP) { intel_dp = enc_to_intel_dp(&encoder->base); - if (!is_edp_psr(dev)) - return; - if (!intel_edp_psr_match_conditions(intel_dp)) intel_edp_psr_disable(intel_dp); else