[Intel-gfx] [PATCH] drm/i915: do not set redundant DP dpms mode

Daniel Vetter daniel at ffwll.ch
Tue Oct 23 22:35:17 CEST 2012


On Tue, Oct 23, 2012 at 01:18:46PM -0700, Simon Que wrote:
> Add a check to intel_dp_dpms() to skip setting the DP's DPMS mode if
> the current mode is the same as the new one.
> 
> Signed-off-by: Simon Que <sque at chromium.org>

The modeset rework, merged into 3.7 solves this entire disaster rather
neatly ... We won't ever touch the hw if it's already in the desired
state.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_dp.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index c71e0f0..ba86b4f 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1311,8 +1311,13 @@ intel_dp_dpms(struct drm_encoder *encoder, int mode)
>  	struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
>  	struct drm_device *dev = encoder->dev;
>  	struct drm_i915_private *dev_priv = dev->dev_private;
> +	struct drm_connector *connector;
>  	uint32_t dp_reg = I915_READ(intel_dp->output_reg);
>  
> +	list_for_each_entry(connector, &dev->mode_config.connector_list, head)
> +		if (connector->encoder == encoder && connector->dpms == mode)
> +			return;
> +
>  	if (mode != DRM_MODE_DPMS_ON) {
>  		ironlake_edp_backlight_off(intel_dp);
>  		ironlake_edp_panel_off(intel_dp);
> -- 
> 1.7.8.6
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list