All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915: HSW PSR fix inverted sink DP_PSR_CFG link setup.
Date: Fri, 7 Feb 2014 21:14:27 +0200	[thread overview]
Message-ID: <20140207191427.GB3891@intel.com> (raw)
In-Reply-To: <1391796588-2015-1-git-send-email-rodrigo.vivi@gmail.com>

On Fri, Feb 07, 2014 at 04:09:47PM -0200, Rodrigo Vivi wrote:
> As pointed out by Ville we were using inverted logic here.
> According to spec:
> For link standby mode set 170h[1] = 1.
> For full link disabling set 170h[1] = 0.
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 50381f7..4ecda72 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1661,12 +1661,12 @@ static void intel_edp_psr_enable_sink(struct intel_dp *intel_dp)
>  	/* Enable PSR in sink */
>  	if (intel_dp->psr_dpcd[1] & DP_PSR_NO_TRAIN_ON_EXIT)
>  		intel_dp_aux_native_write_1(intel_dp, DP_PSR_EN_CFG,
> -					    DP_PSR_ENABLE &
> -					    ~DP_PSR_MAIN_LINK_ACTIVE);
> -	else
> -		intel_dp_aux_native_write_1(intel_dp, DP_PSR_EN_CFG,
>  					    DP_PSR_ENABLE |
>  					    DP_PSR_MAIN_LINK_ACTIVE);
> +	else
> +		intel_dp_aux_native_write_1(intel_dp, DP_PSR_EN_CFG,
> +					    DP_PSR_ENABLE &
> +					    ~DP_PSR_MAIN_LINK_ACTIVE);

I think this is now the opposite of what we want. Ie. if the sink
doesn't require training we should disable the main link. Otherwise we
should keep the main link on, and that way avoid the need to train on
PSR exit.

Actually I'm not sure that's really what we want. I think the hardware
can do the training on its own, so in theory we should just always disable
the main link. Although the PM guide has a comment indicating that the
hardware training can fail, in which case software must repeat it. We
don't have code to do that, so I guess leaving the main link on is the
safer option. Would be nice to have a comment in the code stating as
much, if this is indeed the reason why the code was written this way.

>  
>  	/* Setup AUX registers */
>  	I915_WRITE(EDP_PSR_AUX_DATA1(dev), EDP_PSR_DPCD_COMMAND);
> -- 
> 1.7.11.7

-- 
Ville Syrjälä
Intel OTC

  parent reply	other threads:[~2014-02-07 19:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07 18:09 [PATCH 1/2] drm/i915: HSW PSR fix inverted sink DP_PSR_CFG link setup Rodrigo Vivi
2014-02-07 18:09 ` [PATCH 2/2] drm/i915: PSR HSW: update after enabling sprite Rodrigo Vivi
2014-02-07 19:00   ` Daniel Vetter
2014-02-07 19:17   ` Ville Syrjälä
2014-02-07 19:24     ` Rodrigo Vivi
2014-02-07 19:14 ` Ville Syrjälä [this message]
2014-02-07 19:29   ` [PATCH 1/2] drm/i915: HSW PSR fix inverted sink DP_PSR_CFG link setup 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=20140207191427.GB3891@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@gmail.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.