intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH 08/13] drm/i915: Hook PSR functionality
Date: Wed, 12 Jun 2013 17:55:49 -0300	[thread overview]
Message-ID: <1371070554-1947-8-git-send-email-rodrigo.vivi@gmail.com> (raw)
In-Reply-To: <1371070554-1947-1-git-send-email-rodrigo.vivi@gmail.com>

PSR must be enabled after transcoder and port are running.
And it is only available for HSW.

v2: move enable/disable to intel_ddi
v3: The spec suggests PSR should be disabled even before backlight (by pzanoni)
v4: also disabling and enabling whenever panel is disabled/enabled.

CC: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 2 ++
 drivers/gpu/drm/i915/intel_dp.c  | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 224ce25..45042c0 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1117,6 +1117,7 @@ static void intel_enable_ddi(struct intel_encoder *intel_encoder)
 			intel_dp_stop_link_train(intel_dp);
 
 		ironlake_edp_backlight_on(intel_dp);
+		intel_edp_psr_enable(intel_dp);
 	}
 
 	if (intel_crtc->eld_vld && type != INTEL_OUTPUT_EDP) {
@@ -1147,6 +1148,7 @@ static void intel_disable_ddi(struct intel_encoder *intel_encoder)
 	if (type == INTEL_OUTPUT_EDP) {
 		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
 
+		intel_edp_psr_disable(intel_dp);
 		ironlake_edp_backlight_off(intel_dp);
 	}
 }
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index c105236..e7cd6e0 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1603,6 +1603,7 @@ static void intel_disable_dp(struct intel_encoder *encoder)
 	/* 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. */
 	ironlake_edp_panel_vdd_on(intel_dp);
+	intel_edp_psr_disable(intel_dp);
 	ironlake_edp_backlight_off(intel_dp);
 	intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
 	ironlake_edp_panel_off(intel_dp);
@@ -1643,6 +1644,7 @@ static void intel_enable_dp(struct intel_encoder *encoder)
 	intel_dp_complete_link_train(intel_dp);
 	intel_dp_stop_link_train(intel_dp);
 	ironlake_edp_backlight_on(intel_dp);
+	intel_edp_psr_enable(intel_dp);
 
 	if (IS_VALLEYVIEW(dev)) {
 		struct intel_digital_port *dport =
-- 
1.7.11.7

  parent reply	other threads:[~2013-06-12 20:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 20:55 [PATCH 01/13] drm: Added SDP and VSC structures for handling PSR for eDP Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 02/13] drm/i915: Read the EDP DPCD and PSR Capability Rodrigo Vivi
2013-06-14 16:42   ` Paulo Zanoni
2013-06-25  1:58     ` [PATCH] " Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 03/13] drm/i915: VBT Parsing for the PSR Feature Block for HSW Rodrigo Vivi
2013-06-13 13:41   ` Chris Wilson
2013-06-14 17:02   ` Paulo Zanoni
2013-06-12 20:55 ` [PATCH 04/13] drm/i915: split aux_clock_divider logic in a separated function for reuse Rodrigo Vivi
2013-06-14 17:18   ` Paulo Zanoni
2013-06-12 20:55 ` [PATCH 05/13] drm/i915: Enable/Disable PSR Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 06/13] drm/i915: Added debugfs support for PSR Status Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 07/13] drm/i915: Match all PSR mode entry conditions before enabling it Rodrigo Vivi
2013-06-12 20:55 ` Rodrigo Vivi [this message]
2013-06-12 20:55 ` [PATCH 09/13] drm/i915: add update function to disable/enable-back PSR Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 10/13] drm/intel: add enable_psr module option Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 11/13] drm/i915: PSR: Make a clear separation between Sink (Panel) and Source (HW) enabling Rodrigo Vivi
2013-06-13 13:01   ` Daniel Vetter
2013-06-12 20:55 ` [PATCH 12/13] drm/i915: Adding global I915_PARAM for PSR ACTIVE Rodrigo Vivi
2013-06-12 20:55 ` [PATCH 13/13] drm/i915: force psr exit when busy Rodrigo Vivi
2013-06-14 16:21 ` [PATCH 01/13] drm: Added SDP and VSC structures for handling PSR for eDP Paulo Zanoni
2013-06-25  1:56   ` [PATCH] " Rodrigo Vivi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371070554-1947-8-git-send-email-rodrigo.vivi@gmail.com \
    --to=rodrigo.vivi@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).