[PATCH 16/21] drm/rcar: Nuke preclose hook

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sun Jan 10 16:01:07 PST 2016


Hi Daniel,

Thank you for the patch.

On Friday 08 January 2016 21:36:48 Daniel Vetter wrote:
> Again since the drm core takes care of event unlinking/disarming this
> is now just needless code.

This looks good to me assuming that the mechanism works in the core, which 
looks like magic to me at the moment :-) After closing the "[PATCH] drm: Clean 
up pending events in the core" discussion (and assuming the conclusion is that 
is works),

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

> Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
>  drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 20 --------------------
>  drivers/gpu/drm/rcar-du/rcar_du_crtc.h |  2 --
>  drivers/gpu/drm/rcar-du/rcar_du_drv.c  | 10 ----------
>  3 files changed, 32 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index 88a4b706be16..4ec80ae1fa99
> 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> @@ -282,26 +282,6 @@ static void rcar_du_crtc_update_planes(struct
> rcar_du_crtc *rcrtc) * Page Flip
>   */
> 
> -void rcar_du_crtc_cancel_page_flip(struct rcar_du_crtc *rcrtc,
> -				   struct drm_file *file)
> -{
> -	struct drm_pending_vblank_event *event;
> -	struct drm_device *dev = rcrtc->crtc.dev;
> -	unsigned long flags;
> -
> -	/* Destroy the pending vertical blanking event associated with the
> -	 * pending page flip, if any, and disable vertical blanking interrupts.
> -	 */
> -	spin_lock_irqsave(&dev->event_lock, flags);
> -	event = rcrtc->event;
> -	if (event && event->base.file_priv == file) {
> -		rcrtc->event = NULL;
> -		event->base.destroy(&event->base);
> -		drm_crtc_vblank_put(&rcrtc->crtc);
> -	}
> -	spin_unlock_irqrestore(&dev->event_lock, flags);
> -}
> -
>  static void rcar_du_crtc_finish_page_flip(struct rcar_du_crtc *rcrtc)
>  {
>  	struct drm_pending_vblank_event *event;
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.h
> b/drivers/gpu/drm/rcar-du/rcar_du_crtc.h index 4b95d9d08c49..2bbe3f5aab65
> 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.h
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.h
> @@ -67,8 +67,6 @@ enum rcar_du_output {
> 
>  int rcar_du_crtc_create(struct rcar_du_group *rgrp, unsigned int index);
>  void rcar_du_crtc_enable_vblank(struct rcar_du_crtc *rcrtc, bool enable);
> -void rcar_du_crtc_cancel_page_flip(struct rcar_du_crtc *rcrtc,
> -				   struct drm_file *file);
>  void rcar_du_crtc_suspend(struct rcar_du_crtc *rcrtc);
>  void rcar_du_crtc_resume(struct rcar_du_crtc *rcrtc);
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index 40422f6b645e..0bb2b31555bf
> 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> @@ -220,15 +220,6 @@ done:
>  	return ret;
>  }
> 
> -static void rcar_du_preclose(struct drm_device *dev, struct drm_file *file)
> -{
> -	struct rcar_du_device *rcdu = dev->dev_private;
> -	unsigned int i;
> -
> -	for (i = 0; i < rcdu->num_crtcs; ++i)
> -		rcar_du_crtc_cancel_page_flip(&rcdu->crtcs[i], file);
> -}
> -
>  static void rcar_du_lastclose(struct drm_device *dev)
>  {
>  	struct rcar_du_device *rcdu = dev->dev_private;
> @@ -271,7 +262,6 @@ static struct drm_driver rcar_du_driver = {
> 
>  				| DRIVER_ATOMIC,
> 
>  	.load			= rcar_du_load,
>  	.unload			= rcar_du_unload,
> -	.preclose		= rcar_du_preclose,
>  	.lastclose		= rcar_du_lastclose,
>  	.set_busid		= drm_platform_set_busid,
>  	.get_vblank_counter	= drm_vblank_no_hw_counter,

-- 
Regards,

Laurent Pinchart



More information about the dri-devel mailing list