[PATCH xf86-video-ati 04/13] Use drm_abort_one in drm_queue_handler

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

 



From: Michel Dänzer <michel.daenzer@xxxxxxx>

At this point, we've already established that e->handler is NULL, no
need to check again in drm_queue_handle_one. This also makes it clearer
what's happening.

(Ported from amdgpu commit eda571222f5a6be47f8897e82d85199bb9d95251)

Signed-off-by: Michel Dänzer <michel.daenzer@xxxxxxx>
---
 src/radeon_drm_queue.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/radeon_drm_queue.c b/src/radeon_drm_queue.c
index ea78e8e2b..ebc6a5b64 100644
--- a/src/radeon_drm_queue.c
+++ b/src/radeon_drm_queue.c
@@ -72,6 +72,19 @@ radeon_drm_queue_handle_one(struct radeon_drm_queue_entry *e)
     free(e);
 }
 
+/*
+ * Abort one queued DRM entry, removing it
+ * from the list, calling the abort function and
+ * freeing the memory
+ */
+static void
+radeon_drm_abort_one(struct radeon_drm_queue_entry *e)
+{
+    xorg_list_del(&e->list);
+    e->abort(e->crtc, e->data);
+    free(e);
+}
+
 static void
 radeon_drm_queue_handler(struct xorg_list *signalled, unsigned int frame,
 			 unsigned int sec, unsigned int usec, void *user_ptr)
@@ -82,7 +95,7 @@ radeon_drm_queue_handler(struct xorg_list *signalled, unsigned int frame,
     xorg_list_for_each_entry_safe(e, tmp, &radeon_drm_queue, list) {
 	if (e->seq == seq) {
 	    if (!e->handler) {
-		radeon_drm_queue_handle_one(e);
+		radeon_drm_abort_one(e);
 		break;
 	    }
 
@@ -173,19 +186,6 @@ radeon_drm_queue_alloc(xf86CrtcPtr crtc, ClientPtr client,
     return e->seq;
 }
 
-/*
- * Abort one queued DRM entry, removing it
- * from the list, calling the abort function and
- * freeing the memory
- */
-static void
-radeon_drm_abort_one(struct radeon_drm_queue_entry *e)
-{
-    xorg_list_del(&e->list);
-    e->abort(e->crtc, e->data);
-    free(e);
-}
-
 /*
  * Abort drm queue entries for a client
  *
-- 
2.20.1

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux