[Intel-gfx] [PATCH 04/11] drm/i915: Don't let update_psr function actually enable PSR.

Vijay Purushothaman vijay.a.purushothaman at intel.com
Tue Jun 3 13:04:15 CEST 2014


On 5/16/2014 5:43 AM, Rodrigo Vivi wrote:
> Being more conservative by enabling PSR only on psr_enable function.
>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at gmail.com>
> ---
>   drivers/gpu/drm/i915/intel_dp.c | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 58537b7..fe28eb7 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1797,9 +1797,6 @@ static void intel_edp_psr_do_enable(struct intel_dp *intel_dp)
>   	    intel_edp_is_psr_enabled(dev))
>   		return;
>
> -	/* Setup PSR once */
> -	intel_edp_psr_setup(intel_dp);
> -
>   	/* Enable PSR on the panel */
>   	intel_edp_psr_enable_sink(intel_dp);
>
> @@ -1816,6 +1813,9 @@ void intel_edp_psr_enable(struct intel_dp *intel_dp)
>   		return;
>   	}
>
> +	/* Setup PSR once */
> +	intel_edp_psr_setup(intel_dp);
> +
>   	if (intel_edp_psr_match_conditions(intel_dp) &&
>   	    !intel_edp_is_psr_enabled(dev))
>   		intel_edp_psr_do_enable(intel_dp);
> @@ -1840,12 +1840,16 @@ void intel_edp_psr_disable(struct intel_dp *intel_dp)
>
>   void intel_edp_psr_update(struct drm_device *dev)
>   {
> +	struct drm_i915_private *dev_priv = dev->dev_private;
>   	struct intel_encoder *encoder;
>   	struct intel_dp *intel_dp = NULL;
>
>   	if (!HAS_PSR(dev))
>   		return;
>
> +	if (!dev_priv->psr.setup_done)
> +		return;
> +
>   	list_for_each_entry(encoder, &dev->mode_config.encoder_list, base.head)
>   		if (encoder->type == INTEL_OUTPUT_EDP) {
>   			intel_dp = enc_to_intel_dp(&encoder->base);
>

Reviewed-by: Vijay Purushothaman <vijay.a.purushothaman at intel.com>





More information about the Intel-gfx mailing list