Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1504957 > unrolled thread

[PATCH v5 2/4] drm/fence: release fence reference when canceling event

Started byGustavo Padovan <gustavo@padovan.org>
First post2016-10-20 17:00 +0200
Last post2016-10-21 15:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v5 2/4] drm/fence: release fence reference when canceling event Gustavo Padovan <gustavo@padovan.org> - 2016-10-20 17:00 +0200
    Re: [PATCH v5 2/4] drm/fence: release fence reference when canceling  event Daniel Vetter <daniel@ffwll.ch> - 2016-10-21 15:00 +0200

#1504957 — [PATCH v5 2/4] drm/fence: release fence reference when canceling event

FromGustavo Padovan <gustavo@padovan.org>
Date2016-10-20 17:00 +0200
Subject[PATCH v5 2/4] drm/fence: release fence reference when canceling event
Message-ID<sumZ3-wo-15@gated-at.bofh.it>
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

If the event gets canceled we also need to put away the fence
reference it holds.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/gpu/drm/drm_fops.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index e84faec..8bed5f4 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -663,6 +663,10 @@ void drm_event_cancel_free(struct drm_device *dev,
 		list_del(&p->pending_link);
 	}
 	spin_unlock_irqrestore(&dev->event_lock, flags);
+
+	if (p->fence)
+		fence_put(p->fence);
+
 	kfree(p);
 }
 EXPORT_SYMBOL(drm_event_cancel_free);
-- 
2.5.5

[toc] | [next] | [standalone]


#1505872 — Re: [PATCH v5 2/4] drm/fence: release fence reference when canceling event

FromDaniel Vetter <daniel@ffwll.ch>
Date2016-10-21 15:00 +0200
SubjectRe: [PATCH v5 2/4] drm/fence: release fence reference when canceling event
Message-ID<suHAu-5DG-33@gated-at.bofh.it>
In reply to#1504957
On Thu, Oct 20, 2016 at 12:50:03PM -0200, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> 
> If the event gets canceled we also need to put away the fence
> reference it holds.
> 
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

I've broken my local dim scripts right now, so can't apply ;-)
-Daniel

> ---
>  drivers/gpu/drm/drm_fops.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
> index e84faec..8bed5f4 100644
> --- a/drivers/gpu/drm/drm_fops.c
> +++ b/drivers/gpu/drm/drm_fops.c
> @@ -663,6 +663,10 @@ void drm_event_cancel_free(struct drm_device *dev,
>  		list_del(&p->pending_link);
>  	}
>  	spin_unlock_irqrestore(&dev->event_lock, flags);
> +
> +	if (p->fence)
> +		fence_put(p->fence);
> +
>  	kfree(p);
>  }
>  EXPORT_SYMBOL(drm_event_cancel_free);
> -- 
> 2.5.5
> 

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web