[Intel-gfx] [PATCH 20/42] drm/i915: remove use of crtc->config from intel_atomic.c and intel_sprite.c

Daniel Vetter daniel at ffwll.ch
Tue May 12 02:03:52 PDT 2015


On Mon, May 11, 2015 at 04:24:56PM +0200, Maarten Lankhorst wrote:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_atomic.c | 10 +++-------
>  drivers/gpu/drm/i915/intel_sprite.c |  4 ++--
>  2 files changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
> index 7ed8033aae60..ace6aeeb1359 100644
> --- a/drivers/gpu/drm/i915/intel_atomic.c
> +++ b/drivers/gpu/drm/i915/intel_atomic.c
> @@ -176,7 +176,7 @@ int intel_atomic_commit(struct drm_device *dev,
>  			continue;
>  		}
>  
> -		to_intel_crtc(crtc)->config->scaler_state =
> +		to_intel_crtc_state(crtc->state)->scaler_state =
>  			to_intel_crtc_state(state->crtc_states[i])->scaler_state;
>  
>  		if (INTEL_INFO(dev)->gen >= 9)
> @@ -241,14 +241,10 @@ intel_connector_atomic_get_property(struct drm_connector *connector,
>  struct drm_crtc_state *
>  intel_crtc_duplicate_state(struct drm_crtc *crtc)
>  {
> -	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
>  	struct intel_crtc_state *crtc_state;
>  
> -	if (WARN_ON(!intel_crtc->config))
> -		crtc_state = kzalloc(sizeof(*crtc_state), GFP_KERNEL);
> -	else
> -		crtc_state = kmemdup(intel_crtc->config,
> -				     sizeof(*intel_crtc->config), GFP_KERNEL);
> +	crtc_state = kmemdup(crtc->state,
> +			     sizeof(*crtc_state), GFP_KERNEL);

Separate patch for this hunk please.
-Daniel

>  
>  	if (!crtc_state)
>  		return NULL;
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 28291ab0993f..dfb6656ef544 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -81,7 +81,7 @@ static int usecs_to_scanlines(const struct drm_display_mode *mode, int usecs)
>  bool intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl_count)
>  {
>  	struct drm_device *dev = crtc->base.dev;
> -	const struct drm_display_mode *mode = &crtc->config->base.adjusted_mode;
> +	const struct drm_display_mode *mode = &crtc->base.state->adjusted_mode;
>  	enum pipe pipe = crtc->pipe;
>  	long timeout = msecs_to_jiffies_timeout(1);
>  	int scanline, min, max, vblank_start;
> @@ -187,7 +187,7 @@ skl_update_plane(struct drm_plane *drm_plane, struct drm_crtc *crtc,
>  	u32 tile_height, plane_offset, plane_size;
>  	unsigned int rotation;
>  	int x_offset, y_offset;
> -	struct intel_crtc_state *crtc_state = to_intel_crtc(crtc)->config;
> +	struct intel_crtc_state *crtc_state = to_intel_crtc_state(crtc->state);
>  	int scaler_id;
>  
>  	plane_ctl = PLANE_CTL_ENABLE |
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list