From 1b47aaf9a93a69a61f8cc5219fd9c758b8588a59 Mon Sep 17 00:00:00 2001 From: Gustavo Padovan Date: Thu, 2 Jun 2016 00:06:35 +0200 Subject: drm/fence: add fence to drm_pending_event Now a drm_pending_event can either send a real drm_event or signal a fence, or both. It allow us to signal via fences when the buffer is displayed on the screen. Which in turn means that the previous buffer is not in use anymore and can be freed or sent back to another driver for processing. v2: Comments from Daniel Vetter - call fence_signal in drm_send_event_locked() - remove unneeded !e->event check v3: Remove drm_pending_event->destroy to fix a leak when e->file_priv is not set. Reviewed-by: Sean Paul Signed-off-by: Gustavo Padovan (v2) [danvet: fix one e->destroy in arcpgu due to rebasing.] Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1464818821-5736-13-git-send-email-daniel.vetter@ffwll.ch --- drivers/gpu/drm/arc/arcpgu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/drm/arc') diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index 76e187a5bde0..69b5be0f9fb8 100644 --- a/drivers/gpu/drm/arc/arcpgu_drv.c +++ b/drivers/gpu/drm/arc/arcpgu_drv.c @@ -92,7 +92,7 @@ static void arcpgu_preclose(struct drm_device *drm, struct drm_file *file) if (e->base.file_priv != file) continue; list_del(&e->base.link); - e->base.destroy(&e->base); + kfree(&e->base); } spin_unlock_irqrestore(&drm->event_lock, flags); } -- cgit v1.2.3