[Intel-gfx] [PATCH 2/4] drm/i915: move psr_setup_done to psr struct

Ville Syrjälä ville.syrjala at linux.intel.com
Fri Jan 24 15:50:29 CET 2014


On Thu, Jan 23, 2014 at 04:16:48PM -0200, Rodrigo Vivi wrote:
> v2: Avoid more than one setup. Removing initialization
>     and trusting allocation. (By Paulo Zanoni).

And what about doing PSR w/ two eDP panels on VLV? The hardware should
support it.

> 
> Cc: Paulo Zanoni <paulo.r.zanoni at intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at gmail.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h  | 1 +
>  drivers/gpu/drm/i915/intel_dp.c  | 6 ++----
>  drivers/gpu/drm/i915/intel_drv.h | 1 -
>  3 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 29e1e86..fd5fc4b 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -744,6 +744,7 @@ struct i915_fbc {
>  struct i915_psr {
>  	bool sink_support;
>  	bool source_ok;
> +	bool setup_done;
>  };
>  
>  enum intel_pch {
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index dc646ac..b082973 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1568,7 +1568,7 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  	struct edp_vsc_psr psr_vsc;
>  
> -	if (intel_dp->psr_setup_done)
> +	if (dev_priv->psr.setup_done)
>  		return;
>  
>  	/* Prepare VSC packet as per EDP 1.3 spec, Table 3.10 */
> @@ -1583,7 +1583,7 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)
>  	I915_WRITE(EDP_PSR_DEBUG_CTL(dev), EDP_PSR_DEBUG_MASK_MEMUP |
>  		   EDP_PSR_DEBUG_MASK_HPD | EDP_PSR_DEBUG_MASK_LPSP);
>  
> -	intel_dp->psr_setup_done = true;
> +	dev_priv->psr.setup_done = true;
>  }
>  
>  static void intel_edp_psr_enable_sink(struct intel_dp *intel_dp)
> @@ -3733,8 +3733,6 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
>  	WARN(error, "intel_dp_i2c_init failed with error %d for port %c\n",
>  	     error, port_name(port));
>  
> -	intel_dp->psr_setup_done = false;
> -
>  	if (!intel_edp_init_connector(intel_dp, intel_connector)) {
>  		i2c_del_adapter(&intel_dp->adapter);
>  		if (is_edp(intel_dp)) {
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index b19a43d..f3959f1 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -487,7 +487,6 @@ struct intel_dp {
>  	int backlight_off_delay;
>  	struct delayed_work panel_vdd_work;
>  	bool want_panel_vdd;
> -	bool psr_setup_done;
>  	struct intel_connector *attached_connector;
>  };
>  
> -- 
> 1.8.1.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC



More information about the Intel-gfx mailing list