Skip to content

Commit 0d0c279

Browse files
committed
drm/i915: Refresh VLV/CHV PSR comments on HW PSR_state machine.
DK had pointed out a comment there was hard to understand, so I tried to read back again and I couldn't understand that as well. So let me re-phrase that in a way that anyone can understand later, even myself. Also fixed the comment block style. v2: Accept DK's suggestion on PSR_state 2 and PSR_state 3 named as spec. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20170912183059.5086-1-rodrigo.vivi@intel.com
1 parent 767a983 commit 0d0c279

1 file changed

Lines changed: 17 additions & 12 deletions

File tree

‎drivers/gpu/drm/i915/intel_psr.c‎

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static void vlv_psr_enable_source(struct intel_dp *intel_dp,
234234
struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
235235
struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
236236

237-
/* Transition from PSR_state 0 to PSR_state 1, i.e. PSR Inactive */
237+
/* Transition from PSR_state 0 (disabled) to PSR_state 1 (inactive) */
238238
I915_WRITE(VLV_PSRCTL(crtc->pipe),
239239
VLV_EDP_PSR_MODE_SW_TIMER |
240240
VLV_EDP_PSR_SRC_TRANSMITTER_STATE |
@@ -249,10 +249,11 @@ static void vlv_psr_activate(struct intel_dp *intel_dp)
249249
struct drm_crtc *crtc = dig_port->base.base.crtc;
250250
enum pipe pipe = to_intel_crtc(crtc)->pipe;
251251

252-
/* Let's do the transition from PSR_state 1 to PSR_state 2
253-
* that is PSR transition to active - static frame transmission.
254-
* Then Hardware is responsible for the transition to PSR_state 3
255-
* that is PSR active - no Remote Frame Buffer (RFB) update.
252+
/*
253+
* Let's do the transition from PSR_state 1 (inactive) to
254+
* PSR_state 2 (transition to active - static frame transmission).
255+
* Then Hardware is responsible for the transition to
256+
* PSR_state 3 (active - no Remote Frame Buffer (RFB) update).
256257
*/
257258
I915_WRITE(VLV_PSRCTL(pipe), I915_READ(VLV_PSRCTL(pipe)) |
258259
VLV_EDP_PSR_ACTIVE_ENTRY);
@@ -576,7 +577,7 @@ static void vlv_psr_disable(struct intel_dp *intel_dp,
576577
uint32_t val;
577578

578579
if (dev_priv->psr.active) {
579-
/* Put VLV PSR back to PSR_state 0 that is PSR Disabled. */
580+
/* Put VLV PSR back to PSR_state 0 (disabled). */
580581
if (intel_wait_for_register(dev_priv,
581582
VLV_PSRSTAT(crtc->pipe),
582583
VLV_EDP_PSR_IN_TRANS,
@@ -766,16 +767,20 @@ static void intel_psr_exit(struct drm_i915_private *dev_priv)
766767
} else {
767768
val = I915_READ(VLV_PSRCTL(pipe));
768769

769-
/* Here we do the transition from PSR_state 3 to PSR_state 5
770-
* directly once PSR State 4 that is active with single frame
771-
* update can be skipped. PSR_state 5 that is PSR exit then
772-
* Hardware is responsible to transition back to PSR_state 1
773-
* that is PSR inactive. Same state after vlv_psr_enable_source.
770+
/*
771+
* Here we do the transition drirectly from
772+
* PSR_state 3 (active - no Remote Frame Buffer (RFB) update) to
773+
* PSR_state 5 (exit).
774+
* PSR State 4 (active with single frame update) can be skipped.
775+
* On PSR_state 5 (exit) Hardware is responsible to transition
776+
* back to PSR_state 1 (inactive).
777+
* Now we are at Same state after vlv_psr_enable_source.
774778
*/
775779
val &= ~VLV_EDP_PSR_ACTIVE_ENTRY;
776780
I915_WRITE(VLV_PSRCTL(pipe), val);
777781

778-
/* Send AUX wake up - Spec says after transitioning to PSR
782+
/*
783+
* Send AUX wake up - Spec says after transitioning to PSR
779784
* active we have to send AUX wake up by writing 01h in DPCD
780785
* 600h of sink device.
781786
* XXX: This might slow down the transition, but without this

0 commit comments

Comments
 (0)