All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
To: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 2/7] drm/i915: Fix PSR disable sequence on core platforms.
Date: Mon, 24 Aug 2015 14:14:35 +0000	[thread overview]
Message-ID: <1440425675.2526.16.camel@intel.com> (raw)
In-Reply-To: <1440118544-26282-2-git-send-email-rodrigo.vivi@intel.com>

Em Qui, 2015-08-20 às 17:55 -0700, Rodrigo Vivi escreveu:
> According to spec the disable sequence is:
> Driver will do the following on PSR Disable.
> 1. Disable PSR in PSR control register, SRD_CTL[bit 31].
> 2. Poll on PSR idle
> 3. Wait for VBlank
> 4. Disable VSC DIP.

Shouldn't this be done at intel_psr_exit() instead  of
intel_psr_disable()?

In case it's yes (which is my guess), then the wait_for_vblank() is
probably going to slow down everything, so we may need to use some sort
of delayed work.

In case it's no, then I don't think we need the wait_for_vblank() since
the encoder disable only happens after the pipe disable.

> 
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_psr.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_psr.c 
> b/drivers/gpu/drm/i915/intel_psr.c
> index 51f0514..92e2b467 100644
> --- a/drivers/gpu/drm/i915/intel_psr.c
> +++ b/drivers/gpu/drm/i915/intel_psr.c
> @@ -459,6 +459,10 @@ static void hsw_psr_disable(struct intel_dp 
> *intel_dp)
>  	struct intel_digital_port *intel_dig_port = 
> dp_to_dig_port(intel_dp);
>  	struct drm_device *dev = intel_dig_port->base.base.dev;
>  	struct drm_i915_private *dev_priv = dev->dev_private;
> +	struct drm_crtc *crtc = intel_dig_port->base.base.crtc;
> +	enum pipe pipe = to_intel_crtc(crtc)->pipe;
> +	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> +	u32 ctl_reg = HSW_TVIDEO_DIP_CTL(intel_crtc->config
> ->cpu_transcoder);
>  
>  	if (dev_priv->psr.active) {
>  		I915_WRITE(EDP_PSR_CTL(dev),
> @@ -469,6 +473,12 @@ static void hsw_psr_disable(struct intel_dp 
> *intel_dp)
>  			       EDP_PSR_STATUS_STATE_MASK) == 0, 
> 2000, 10))
>  			DRM_ERROR("Timed out waiting for PSR Idle 
> State\n");
>  
> +		intel_wait_for_vblank(dev, pipe);
> +
> +		I915_WRITE(ctl_reg, I915_READ(ctl_reg)
> +			   & ~VIDEO_DIP_ENABLE_VSC_HSW);
> +		POSTING_READ(ctl_reg);
> +
>  		dev_priv->psr.active = false;
>  	} else {
>  		WARN_ON(I915_READ(EDP_PSR_CTL(dev)) & 
> EDP_PSR_ENABLE);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-08-24 14:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21  0:55 [PATCH 1/7] drm/i915: Remove duplicated dpcd write on hsw_psr_enable_sink Rodrigo Vivi
2015-08-21  0:55 ` [PATCH 2/7] drm/i915: Fix PSR disable sequence on core platforms Rodrigo Vivi
2015-08-24 14:14   ` Zanoni, Paulo R [this message]
2015-08-24 22:18     ` Vivi, Rodrigo
2015-08-21  0:55 ` [PATCH 3/7] drm/i915: PSR: Let's rely more on frontbuffer tracking Rodrigo Vivi
2015-08-24 14:29   ` Zanoni, Paulo R
2015-08-24 22:28     ` Vivi, Rodrigo
2015-08-21  0:55 ` [PATCH 4/7] drm/i915: PSR: Mask LPSP hw tracking back again Rodrigo Vivi
2015-08-26  9:11   ` Daniel Vetter
2015-09-26  1:56   ` [4/7] " Brian Norris
2015-08-21  0:55 ` [PATCH 5/7] drm/i915: Delay first PSR activation Rodrigo Vivi
2015-08-24 17:03   ` Zanoni, Paulo R
2015-08-24 22:35     ` Vivi, Rodrigo
2015-08-21  0:55 ` [PATCH 6/7] drm/i915: Remove psr re-activation delay on HSW+ Rodrigo Vivi
2015-08-21  0:55 ` [PATCH 7/7] drm/i915: Reduce PSR re-activation time for VLV/CHV Rodrigo Vivi
2015-08-28 23:38   ` shuang.he
2015-08-24 14:04 ` [PATCH 1/7] drm/i915: Remove duplicated dpcd write on hsw_psr_enable_sink Zanoni, Paulo R
2015-08-24 22:16   ` Vivi, Rodrigo
2015-09-26  1:40 ` [1/7] " Brian Norris

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=1440425675.2526.16.camel@intel.com \
    --to=paulo.r.zanoni@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.