Re: [PATCH 3/3] drm: Factor-out drm_emit_vblank_event code.

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

 



On Mit, 2011-04-27 at 16:10 +1000, christopher.halse.rogers@xxxxxxxxxxxxx wrote:
> From: Christopher James Halse Rogers <christopher.halse.rogers@xxxxxxxxxxxxx>
> 
> Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@xxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_irq.c |   39 ++++++++++++++++-----------------------
>  1 files changed, 16 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index 72407fa..485714b 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -930,6 +930,18 @@ void drm_vblank_put(struct drm_device *dev, int crtc)
>  }
>  EXPORT_SYMBOL(drm_vblank_put);
>  
> +static void drm_emit_vblank_event (struct drm_pending_vblank_event *e,
> +				   unsigned int seq, struct timeval *now)
> +{
> +	e->event.sequence = seq;
> +	e->event.tv_sec = now->tv_sec;
> +	e->event.tv_usec = now->tv_usec;
> +	list_move_tail(&e->base.link, &e->base.file_priv->event_list);
> +	wake_up_interruptible(&e->base.file_priv->event_wait);
> +	trace_drm_vblank_event_delivered(e->base.pid, e->pipe,
> +					 e->event.sequence);
> +}
> +
>  void drm_vblank_off(struct drm_device *dev, int crtc)
>  {
>  	struct drm_pending_vblank_event *e, *t;
> @@ -950,14 +962,8 @@ void drm_vblank_off(struct drm_device *dev, int crtc)
>  			  wanted %d, current %d\n",
>  			  e->event.sequence, seq);
>  
> -		e->event.sequence = seq;
> -		e->event.tv_sec = now.tv_sec;
> -		e->event.tv_usec = now.tv_usec;
>  		drm_vblank_put(dev, e->pipe);
> -		list_move_tail(&e->base.link, &e->base.file_priv->event_list);
> -		wake_up_interruptible(&e->base.file_priv->event_wait);
> -		trace_drm_vblank_event_delivered(e->base.pid, e->pipe,
> -						 e->event.sequence);
> +		drm_emit_vblank_event(e, seq, &now);
>  	}

Makes sense, but shouldn't the drm_vblank_put() calls move into
drm_emit_vblank_event() as well?


-- 
Earthling Michel DÃnzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux