From patchwork Fri May 16 00:13:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 4186501 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 869DFBFF02 for ; Fri, 16 May 2014 00:13:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C3F8620397 for ; Fri, 16 May 2014 00:13:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E9CEC20395 for ; Fri, 16 May 2014 00:13:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8BB1D6EF3C; Thu, 15 May 2014 17:13:26 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com [209.85.160.43]) by gabe.freedesktop.org (Postfix) with ESMTP id BD08C6EF3C for ; Thu, 15 May 2014 17:13:24 -0700 (PDT) Received: by mail-pb0-f43.google.com with SMTP id up15so1771532pbc.30 for ; Thu, 15 May 2014 17:13:24 -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=fb6+yOrovzPfdmXRxOdMcTNFfGWvR7KyE+lJvRYr/Pc=; b=jR6cIPSrUo7Kj7/Sbhx+du1xD2eX/L/PfdBpjhXe4fvzx7oAiGI+H7PgGtdi+lNMIC Ybfjz0O0N11kqo3zSnOvN4fDMnPdBbKn0MEzJ3UPImvDU4n6cMyHy+J1tog3+tYDtahU jtLQozEmVOnJETtV+tMLhe170TSTlQ1CvsDFuVye4wWnlNkpuQK+NCR/UoPy8kWlL98Z 9uT92NyMtlDCb1AxY8IGsheKR13e24y0WICDPhC/hWYCSX91SrJS/dBA4d7VQzxSGWFt uQnnktIRv2UrprF/E93rBT8Gjbsy9niDchjM52jr8QzPEt0yCAJrXbg3X0g4l3CUXL2X O7xQ== X-Received: by 10.68.200.10 with SMTP id jo10mr16033656pbc.143.1400199204597; Thu, 15 May 2014 17:13:24 -0700 (PDT) Received: from localhost (jfdmzpr05-ext.jf.intel.com. [134.134.139.74]) by mx.google.com with ESMTPSA id ek2sm11197505pbd.30.2014.05.15.17.13.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 May 2014 17:13:23 -0700 (PDT) From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Thu, 15 May 2014 20:13:03 -0400 Message-Id: <1400199190-2424-5-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 04/11] drm/i915: Don't let update_psr function actually enable PSR. 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 Being more conservative by enabling PSR only on psr_enable function. Signed-off-by: Rodrigo Vivi Reviewed-by: Vijay Purushothaman --- drivers/gpu/drm/i915/intel_dp.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 58537b7..fe28eb7 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1797,9 +1797,6 @@ static void intel_edp_psr_do_enable(struct intel_dp *intel_dp) intel_edp_is_psr_enabled(dev)) return; - /* Setup PSR once */ - intel_edp_psr_setup(intel_dp); - /* Enable PSR on the panel */ intel_edp_psr_enable_sink(intel_dp); @@ -1816,6 +1813,9 @@ void intel_edp_psr_enable(struct intel_dp *intel_dp) return; } + /* Setup PSR once */ + intel_edp_psr_setup(intel_dp); + if (intel_edp_psr_match_conditions(intel_dp) && !intel_edp_is_psr_enabled(dev)) intel_edp_psr_do_enable(intel_dp); @@ -1840,12 +1840,16 @@ void intel_edp_psr_disable(struct intel_dp *intel_dp) void intel_edp_psr_update(struct drm_device *dev) { + struct drm_i915_private *dev_priv = dev->dev_private; struct intel_encoder *encoder; struct intel_dp *intel_dp = NULL; if (!HAS_PSR(dev)) return; + if (!dev_priv->psr.setup_done) + return; + list_for_each_entry(encoder, &dev->mode_config.encoder_list, base.head) if (encoder->type == INTEL_OUTPUT_EDP) { intel_dp = enc_to_intel_dp(&encoder->base);