Re: [PATCH v2 2/2] drm/i915: Kill intel_crtc->vbl_wait

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

 



On Thu, May 22, 2014 at 07:00:50PM +0300, ville.syrjala@xxxxxxxxxxxxxxx wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> Share the waitqueue that drm_irq uses when performing the vblank evade
> trick for atomic pipe updates.
> 
> v2: Keep intel_pipe_handle_vblank() (Chris)
> 
> Suggested-by: Daniel Vetter <daniel@xxxxxxxx>
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Both patches merged to dinq, thanks.
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_irq.c      | 5 -----
>  drivers/gpu/drm/i915/intel_display.c | 2 --
>  drivers/gpu/drm/i915/intel_drv.h     | 2 --
>  drivers/gpu/drm/i915/intel_sprite.c  | 5 +++--
>  4 files changed, 3 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 304f86a..bc4cdbd 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1726,14 +1726,9 @@ static void gen6_rps_irq_handler(struct drm_i915_private *dev_priv, u32 pm_iir)
>  
>  static bool intel_pipe_handle_vblank(struct drm_device *dev, enum pipe pipe)
>  {
> -	struct intel_crtc *crtc;
> -
>  	if (!drm_handle_vblank(dev, pipe))
>  		return false;
>  
> -	crtc = to_intel_crtc(intel_get_crtc_for_pipe(dev, pipe));
> -	wake_up(&crtc->vbl_wait);
> -
>  	return true;
>  }
>  
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 019e9e1..aab638c 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -10966,8 +10966,6 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
>  		intel_crtc->plane = !pipe;
>  	}
>  
> -	init_waitqueue_head(&intel_crtc->vbl_wait);
> -
>  	BUG_ON(pipe >= ARRAY_SIZE(dev_priv->plane_to_crtc_mapping) ||
>  	       dev_priv->plane_to_crtc_mapping[intel_crtc->plane] != NULL);
>  	dev_priv->plane_to_crtc_mapping[intel_crtc->plane] = &intel_crtc->base;
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index d7c52b2..0071138 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -408,8 +408,6 @@ struct intel_crtc {
>  		struct intel_pipe_wm active;
>  	} wm;
>  
> -	wait_queue_head_t vbl_wait;
> -
>  	int scanline_offset;
>  };
>  
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index d6acd6b..7cd6a4f 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -53,6 +53,7 @@ static bool intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl
>  	enum pipe pipe = crtc->pipe;
>  	long timeout = msecs_to_jiffies_timeout(1);
>  	int scanline, min, max, vblank_start;
> +	wait_queue_head_t *wq = drm_crtc_vblank_waitqueue(&crtc->base);
>  	DEFINE_WAIT(wait);
>  
>  	WARN_ON(!mutex_is_locked(&crtc->base.mutex));
> @@ -81,7 +82,7 @@ static bool intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl
>  		 * other CPUs can see the task state update by the time we
>  		 * read the scanline.
>  		 */
> -		prepare_to_wait(&crtc->vbl_wait, &wait, TASK_UNINTERRUPTIBLE);
> +		prepare_to_wait(wq, &wait, TASK_UNINTERRUPTIBLE);
>  
>  		scanline = intel_get_crtc_scanline(crtc);
>  		if (scanline < min || scanline > max)
> @@ -100,7 +101,7 @@ static bool intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl
>  		local_irq_disable();
>  	}
>  
> -	finish_wait(&crtc->vbl_wait, &wait);
> +	finish_wait(wq, &wait);
>  
>  	drm_vblank_put(dev, pipe);
>  
> -- 
> 1.8.5.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





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