Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/6] drm/i915/psr: Check for SET_POWER_CAPABLE bit at PSR init time.
Date: Fri, 11 May 2018 15:14:33 -0700	[thread overview]
Message-ID: <1526076873.17473.31.camel@intel.com> (raw)
In-Reply-To: <20180511195145.3829-2-dhinakaran.pandiyan@intel.com>

On Fri, 2018-05-11 at 12:51 -0700, Dhinakaran Pandiyan wrote:
> By moving the check from psr_compute_config() to psr_init_dpcd(), we
> get
> to set the dev_priv->psr.sink_support flag only when the panel is
> capable of changing power state. An additional benefit is that the
> check
> will be performed only at init time instead of every atomic_check.
> 
> This should change the psr_basic IGT failures on HSW to skips.
> 
> v2: Return early when SET_POWER_CAPABLE bit is 0 (Jose)
> 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106217
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106346
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c  |  8 ++++++--
>  drivers/gpu/drm/i915/intel_psr.c | 11 +++++------
>  2 files changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c
> b/drivers/gpu/drm/i915/intel_dp.c
> index dde92e4af5d3..cfd95eaa0d0d 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3762,8 +3762,6 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
>  		dev_priv->no_aux_handshake = intel_dp-
> >dpcd[DP_MAX_DOWNSPREAD] &
>  			DP_NO_AUX_HANDSHAKE_LINK_TRAINING;
>  
> -	intel_psr_init_dpcd(intel_dp);
> -
>  	/*
>  	 * Read the eDP display control registers.
>  	 *
> @@ -3779,6 +3777,12 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
>  		DRM_DEBUG_KMS("eDP DPCD: %*ph\n", (int)
> sizeof(intel_dp->edp_dpcd),
>  			      intel_dp->edp_dpcd);
>  
> +	/*
> +	 * This has to be called after intel_dp->edp_dpcd is filled,
> PSR checks
> +	 * for SET_POWER_CAPABLE bit in intel_dp->edp_dpcd[1]
> +	 */
> +	intel_psr_init_dpcd(intel_dp);
> +
>  	/* Read the eDP 1.4+ supported link rates. */
>  	if (intel_dp->edp_dpcd[0] >= DP_EDP_14) {
>  		__le16 sink_rates[DP_MAX_SUPPORTED_RATES];
> diff --git a/drivers/gpu/drm/i915/intel_psr.c
> b/drivers/gpu/drm/i915/intel_psr.c
> index 8fe6d2f9ab2b..61ade81576f5 100644
> --- a/drivers/gpu/drm/i915/intel_psr.c
> +++ b/drivers/gpu/drm/i915/intel_psr.c
> @@ -252,9 +252,13 @@ void intel_psr_init_dpcd(struct intel_dp
> *intel_dp)
>  
>  	if (!intel_dp->psr_dpcd[0])
>  		return;
> -
>  	DRM_DEBUG_KMS("eDP panel supports PSR version %x\n",
>  		      intel_dp->psr_dpcd[0]);
> +
> +	if (!(intel_dp->edp_dpcd[1] & DP_EDP_SET_POWER_CAP)) {
> +		DRM_DEBUG_KMS("Panel lacks power state control, PSR
> cannot be enabled\n");
> +		return;
> +	}
>  	dev_priv->psr.sink_support = true;
>  
>  	if (INTEL_GEN(dev_priv) >= 9 &&
> @@ -642,11 +646,6 @@ void intel_psr_compute_config(struct intel_dp
> *intel_dp,
>  		return;
>  	}
>  
> -	if (!(intel_dp->edp_dpcd[1] & DP_EDP_SET_POWER_CAP)) {
> -		DRM_DEBUG_KMS("PSR condition failed: panel lacks
> power state control\n");
> -		return;
> -	}
> -
>  	crtc_state->has_psr = true;
>  	crtc_state->has_psr2 = intel_psr2_config_valid(intel_dp,
> crtc_state);
>  	DRM_DEBUG_KMS("Enabling PSR%s\n", crtc_state->has_psr2 ? "2"
> : "");
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-05-11 21:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-11 19:51 [PATCH 1/6] drm/i915/psr: Avoid DPCD reads when panel does not support PSR Dhinakaran Pandiyan
2018-05-11 19:51 ` [PATCH 2/6] drm/i915/psr: Check for SET_POWER_CAPABLE bit at PSR init time Dhinakaran Pandiyan
2018-05-11 22:14   ` Dhinakaran Pandiyan [this message]
2018-05-24 13:28     ` Jani Nikula
2018-05-11 19:51 ` [PATCH 3/6] drm/psr: Fix missed entry in PSR setup time table Dhinakaran Pandiyan
2018-05-24 14:00   ` Jani Nikula
2018-05-11 19:51 ` [PATCH 4/6] drm/i915/psr: Avoid unnecessary DPCD read of DP_PSR_CAPS Dhinakaran Pandiyan
2018-05-20 23:01   ` Tarun Vyas
2018-05-24 14:01     ` Jani Nikula
2018-05-22 12:32   ` Nagaraju, Vathsala
2018-05-11 19:51 ` [PATCH 5/6] drm/i915/psr: Fall back to max. synchronization latency if DPCD read fails Dhinakaran Pandiyan
2018-05-21 23:58   ` Souza, Jose
2018-05-11 19:51 ` [PATCH 6/6] drm/i915/psr: Fix ALPM cap check for PSR2 Dhinakaran Pandiyan
2018-05-22  9:33   ` Nagaraju, Vathsala
2018-05-22 14:37   ` Tarun Vyas
2018-05-22 20:21     ` Dhinakaran Pandiyan
2018-05-11 20:26 ` ✓ Fi.CI.BAT: success for series starting with [1/6] drm/i915/psr: Avoid DPCD reads when panel does not support PSR Patchwork
2018-05-11 21:17 ` ✓ Fi.CI.IGT: " Patchwork
2018-05-18  0:27 ` [PATCH 1/6] " Tarun Vyas
2018-05-21 23:40   ` Dhinakaran Pandiyan
2018-05-24 13:29   ` Jani Nikula
2018-05-22 12:29 ` Nagaraju, Vathsala

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=1526076873.17473.31.camel@intel.com \
    --to=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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