[Intel-gfx] [PATCH 17/17] drm/i915: Track DisplayPort DPMS state to retrain on hotplug as needed

Eric Anholt eric at anholt.net
Fri Jun 5 15:23:48 CEST 2009


On Sat, 2009-05-30 at 20:42 -0700, Keith Packard wrote:
> When a DP monitor is plugged back in, it needs to be retrained if it was
> active before.

Looks like this should be squashed into #14 that uses it?

> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index c9dd28b..88a3906 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -47,6 +47,7 @@ struct intel_dp_priv {
>  	uint32_t save_DP;
>  	uint8_t  save_link_configuration[DP_LINK_CONFIGURATION_SIZE];
>  	bool has_audio;
> +	int dpms_mode;
>  	uint8_t link_bw;
>  	uint8_t lane_count;
>  	uint8_t dpcd[4];
> @@ -546,6 +547,7 @@ intel_dp_dpms(struct drm_encoder *encoder, int mode)
>  		if (!(dp_reg & DP_PORT_EN))
>  			intel_dp_link_train(intel_output, dp_priv->DP, dp_priv->link_configuration);
>  	}
> +	dp_priv->dpms_mode = mode;
>  }
>  
>  /*
> @@ -1103,6 +1105,7 @@ intel_dp_init(struct drm_device *dev, int output_reg)
>  	dp_priv->intel_output = intel_output;
>  	dp_priv->output_reg = output_reg;
>  	dp_priv->has_audio = false;
> +	dp_priv->dpms_mode = DRM_MODE_DPMS_ON;
>  	intel_output->dev_priv = dp_priv;
>  
>  	drm_encoder_init(dev, &intel_output->enc, &intel_dp_enc_funcs,
-- 
Eric Anholt
eric at anholt.net                         eric.anholt at intel.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090605/4eb36de5/attachment.sig>


More information about the Intel-gfx mailing list