From patchwork Fri May 16 00:13:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 4186511 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 6806A9F387 for ; Fri, 16 May 2014 00:13:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A7FB420398 for ; Fri, 16 May 2014 00:13:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D5D4120395 for ; Fri, 16 May 2014 00:13:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6105C6EF41; Thu, 15 May 2014 17:13:29 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 57CCB6EF3C for ; Thu, 15 May 2014 17:13:26 -0700 (PDT) Received: by mail-pa0-f52.google.com with SMTP id fa1so1749846pad.11 for ; Thu, 15 May 2014 17:13:26 -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=RHMZquniIH++RFoxHRsrAYOuQcMvPTS7abx/rfXzfHY=; b=ykXFiEzrDPsIspsZ9Yw+BxsfhUo4t8byN6ilIqot7B22PeANemNQMqvnEmPwtMuhjR g/CpTmJ5Gu8GLwW+GcvOkt9QMIPzZxSTACBjECPI2u6PbqnHKnd5cWhoDDmY+nhzF5N3 NNN99ZuvtgODIr3jGcEwMpKVjwa5xywxBKdcJI3Lh5uuv0Oc6RUkIS6jSTG44+3tib9f 8VGAmC32yk2ejQKoVivnr4VignpNfiyfjngaWdfL6Zd9S7IISNVeVckXI/6+XxoVL98F 3iPpnwiII8x+YyCMWTex89NF7+UPxB+xXNmBLhCdtiR77mXe7unAD7VvVmaovgasWpEh 0OJA== X-Received: by 10.68.171.4 with SMTP id aq4mr16334420pbc.150.1400199206213; Thu, 15 May 2014 17:13:26 -0700 (PDT) Received: from localhost (jfdmzpr05-ext.jf.intel.com. [134.134.139.74]) by mx.google.com with ESMTPSA id g6sm26914344pat.2.2014.05.15.17.13.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 May 2014 17:13:25 -0700 (PDT) From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Thu, 15 May 2014 20:13:04 -0400 Message-Id: <1400199190-2424-6-git-send-email-rodrigo.vivi@gmail.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1400199190-2424-1-git-send-email-rodrigo.vivi@gmail.com> References: <1400199190-2424-1-git-send-email-rodrigo.vivi@gmail.com> Subject: [Intel-gfx] [PATCH 05/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.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.7 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 fe28eb7..8b2f1a4 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) @@ -1813,6 +1811,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); @@ -1854,9 +1857,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