[PATCH 15/31] drm/i915: extract readout_hw_state from setup_hw_state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 05, 2013 at 01:34:17PM +0200, Daniel Vetter wrote:
> Simply grew too big. This also makes the fixup and restore logic in
> setup_hw_state stand out a bit more clearly.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>

So I've managed to massively botch up patch ordering here, due to the lack
of refcount rescostruction but the fact that we already have hw state
readout for the pll selection we hit a bunch of WARNs in the crtc disable
path.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65673

Damien, can you please take a good hard look at just this patch so that we
can shut up the WARNs?

Thanks, Daniel

> ---
>  drivers/gpu/drm/i915/intel_display.c | 20 +++++++++++++++-----
>  1 file changed, 15 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 998ba5c..95ed27b 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9630,14 +9630,10 @@ void i915_redisable_vga(struct drm_device *dev)
>  	}
>  }
>  
> -/* Scan out the current hw modeset state, sanitizes it and maps it into the drm
> - * and i915 state tracking structures. */
> -void intel_modeset_setup_hw_state(struct drm_device *dev,
> -				  bool force_restore)
> +static void intel_modeset_readout_hw_state(struct drm_device *dev)
>  {
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  	enum pipe pipe;
> -	struct drm_plane *plane;
>  	struct intel_crtc *crtc;
>  	struct intel_encoder *encoder;
>  	struct intel_connector *connector;
> @@ -9713,6 +9709,20 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,
>  			      drm_get_connector_name(&connector->base),
>  			      connector->base.encoder ? "enabled" : "disabled");
>  	}
> +}
> +
> +/* Scan out the current hw modeset state, sanitizes it and maps it into the drm
> + * and i915 state tracking structures. */
> +void intel_modeset_setup_hw_state(struct drm_device *dev,
> +				  bool force_restore)
> +{
> +	struct drm_i915_private *dev_priv = dev->dev_private;
> +	enum pipe pipe;
> +	struct drm_plane *plane;
> +	struct intel_crtc *crtc;
> +	struct intel_encoder *encoder;
> +
> +	intel_modeset_readout_hw_state(dev);
>  
>  	/* HW state is read out, now we need to sanitize this mess. */
>  	list_for_each_entry(encoder, &dev->mode_config.encoder_list,
> -- 
> 1.7.11.7
> 

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


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux