[PATCH 10/22] drm: Nuke vblank event file cleanup code

2016-01-25 Thread Laurent Pinchart
Hi Daniel,

Thank you for the patch.

On Monday 11 January 2016 22:41:04 Daniel Vetter wrote:
> The core code now takes care of unlinking drm_events from the file in
> a generic way, so this code isn't needed any more.
> 
> For those wondering where the drm_vblank_put went to: With the new
> logic events only get unlinked, but still exist. Hence any resources
> (like vblank counters) don't need to be released since the event user
> will still process the event normally. In this case this is the
> callsites of send_vblank_event, which of course already have a
> drm_vblank_put.
> 
> Cc: Laurent Pinchart 
> Acked-by: Daniel Stone 
> Reviewed-by: Alex Deucher 
> Signed-off-by: Daniel Vetter 

Reviewed-by: Laurent Pinchart 

> ---
>  drivers/gpu/drm/drm_fops.c | 9 -
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
> index 109903f5b68a..faae642390a6 100644
> --- a/drivers/gpu/drm/drm_fops.c
> +++ b/drivers/gpu/drm/drm_fops.c
> @@ -354,19 +354,10 @@ static void drm_events_release(struct drm_file
> *file_priv) {
>   struct drm_device *dev = file_priv->minor->dev;
>   struct drm_pending_event *e, *et;
> - struct drm_pending_vblank_event *v, *vt;
>   unsigned long flags;
> 
>   spin_lock_irqsave(>event_lock, flags);
> 
> - /* Remove pending flips */
> - list_for_each_entry_safe(v, vt, >vblank_event_list, base.link)
> - if (v->base.file_priv == file_priv) {
> - list_del(>base.link);
> - drm_vblank_put(dev, v->pipe);
> - v->base.destroy(>base);
> - }
> -
>   /* Unlink pending events */
>   list_for_each_entry_safe(e, et, _priv->pending_event_list,
>pending_link) {

-- 
Regards,

Laurent Pinchart



[PATCH 10/22] drm: Nuke vblank event file cleanup code

2016-01-11 Thread Daniel Vetter
The core code now takes care of unlinking drm_events from the file in
a generic way, so this code isn't needed any more.

For those wondering where the drm_vblank_put went to: With the new
logic events only get unlinked, but still exist. Hence any resources
(like vblank counters) don't need to be released since the event user
will still process the event normally. In this case this is the
callsites of send_vblank_event, which of course already have a
drm_vblank_put.

Cc: Laurent Pinchart 
Acked-by: Daniel Stone 
Reviewed-by: Alex Deucher 
Signed-off-by: Daniel Vetter 
---
 drivers/gpu/drm/drm_fops.c | 9 -
 1 file changed, 9 deletions(-)

diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index 109903f5b68a..faae642390a6 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -354,19 +354,10 @@ static void drm_events_release(struct drm_file *file_priv)
 {
struct drm_device *dev = file_priv->minor->dev;
struct drm_pending_event *e, *et;
-   struct drm_pending_vblank_event *v, *vt;
unsigned long flags;

spin_lock_irqsave(>event_lock, flags);

-   /* Remove pending flips */
-   list_for_each_entry_safe(v, vt, >vblank_event_list, base.link)
-   if (v->base.file_priv == file_priv) {
-   list_del(>base.link);
-   drm_vblank_put(dev, v->pipe);
-   v->base.destroy(>base);
-   }
-
/* Unlink pending events */
list_for_each_entry_safe(e, et, _priv->pending_event_list,
 pending_link) {
-- 
2.6.4