From patchwork Fri Feb 28 23:44:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 3745291 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 906FEBF13A for ; Fri, 28 Feb 2014 23:45:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CAC3A202A7 for ; Fri, 28 Feb 2014 23:45:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 90FC6201BA for ; Fri, 28 Feb 2014 23:45:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D618FBDD9; Fri, 28 Feb 2014 15:45:23 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yk0-f173.google.com (mail-yk0-f173.google.com [209.85.160.173]) by gabe.freedesktop.org (Postfix) with ESMTP id 7873AFBDD9 for ; Fri, 28 Feb 2014 15:45:16 -0800 (PST) Received: by mail-yk0-f173.google.com with SMTP id 10so3907330ykt.4 for ; Fri, 28 Feb 2014 15:45: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=8NO9MBKztxP+7fCGHciheOmjTNc+c0cDWlGtUSrJMEw=; b=cHcP6cJlmqCtBriAMplT5um+HSfXlMLkB/xEhPgfPe3N9w9oEfMYpMnirD2EX8j8wY cmH75fSVhJMKAAV/8FId45Ba9t7bISI18tww+bEkwySy3n7Adwz1WZpyA8Dq4zOhLOb7 Z/CK36EDHBfy0SNgSsr5jjYFp/laLNp9yKv0FfFJS7mXThWUrgFRdJ5ju75ieZhi5shw D8Wmr7h1wfhM9wTOt5KwrTFDWzfiCL1fdo5Rhtk+2qXwKsKXT4HYb6qlFDwZi5POPf89 KCqsEEmhFRGd7frkoE6JUbfaO0/vrgjnI0mRy/QKVx8l2PtanxaUQSP6mawIpYbIEQDe kYkQ== X-Received: by 10.236.182.229 with SMTP id o65mr4834413yhm.86.1393631116122; Fri, 28 Feb 2014 15:45:16 -0800 (PST) Received: from localhost.localdomain ([189.67.129.152]) by mx.google.com with ESMTPSA id h23sm10769779yhc.0.2014.02.28.15.45.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Feb 2014 15:45:15 -0800 (PST) From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Fri, 28 Feb 2014 20:44:46 -0300 Message-Id: <1393631086-3880-12-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 11/11] drm/i915: Enable PSR on Baytrail. 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 This patch is the last in series that finnaly enable PSR on Baytrail by adding it to HAS_PSR and calling the propper enable and disable functions on the right places. Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/intel_dp.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index a4e666c..194ee3e 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1919,7 +1919,8 @@ struct drm_i915_file_private { #define HAS_DDI(dev) (INTEL_INFO(dev)->has_ddi) #define HAS_FPGA_DBG_UNCLAIMED(dev) (INTEL_INFO(dev)->has_fpga_dbg) -#define HAS_PSR(dev) (IS_HASWELL(dev) || IS_BROADWELL(dev)) +#define HAS_PSR(dev) (IS_HASWELL(dev) || IS_BROADWELL(dev) || \ + IS_VALLEYVIEW(dev)) #define HAS_PC8(dev) (IS_HASWELL(dev)) /* XXX HSW:ULX */ #define HAS_RUNTIME_PM(dev) (IS_HASWELL(dev)) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index f386860..70b2fbf 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -2080,6 +2080,9 @@ static void intel_disable_dp(struct intel_encoder *encoder) enum port port = dp_to_dig_port(intel_dp)->port; struct drm_device *dev = encoder->base.dev; + if (IS_VALLEYVIEW(dev)) + vlv_edp_psr_disable(intel_dp); + /* Make sure the panel is off before trying to change the mode. But also * ensure that we have vdd while we switch off the panel. */ intel_edp_backlight_off(intel_dp); @@ -2136,6 +2139,7 @@ static void vlv_enable_dp(struct intel_encoder *encoder) struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base); intel_edp_backlight_on(intel_dp); + intel_edp_psr_enable(intel_dp); } static void g4x_pre_enable_dp(struct intel_encoder *encoder)