summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-11-05 18:07:54 +0100
committerMichel Daenzer <michel@daenzer.net>2018-11-16 15:47:44 +0000
commiteda571222f5a6be47f8897e82d85199bb9d95251 (patch)
tree880e4c0f5d0f30e0ed1c02af925f1448db32083c /src
parent426f9a49655f01863cf4d898f525e5f95984e0c4 (diff)
Use drm_abort_one in drm_queue_handler
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. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/amdgpu_drm_queue.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/amdgpu_drm_queue.c b/src/amdgpu_drm_queue.c
index 0353562..4b51d46 100644
--- a/src/amdgpu_drm_queue.c
+++ b/src/amdgpu_drm_queue.c
@@ -72,6 +72,19 @@ amdgpu_drm_queue_handle_one(struct amdgpu_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
+amdgpu_drm_abort_one(struct amdgpu_drm_queue_entry *e)
+{
+ xorg_list_del(&e->list);
+ e->abort(e->crtc, e->data);
+ free(e);
+}
+
static void
amdgpu_drm_queue_handler(struct xorg_list *signalled, unsigned int frame,
unsigned int sec, unsigned int usec, void *user_ptr)
@@ -82,7 +95,7 @@ amdgpu_drm_queue_handler(struct xorg_list *signalled, unsigned int frame,
xorg_list_for_each_entry_safe(e, tmp, &amdgpu_drm_queue, list) {
if (e->seq == seq) {
if (!e->handler) {
- amdgpu_drm_queue_handle_one(e);
+ amdgpu_drm_abort_one(e);
break;
}
@@ -174,19 +187,6 @@ amdgpu_drm_queue_alloc(xf86CrtcPtr crtc, ClientPtr client,
}
/*
- * Abort one queued DRM entry, removing it
- * from the list, calling the abort function and
- * freeing the memory
- */
-static void
-amdgpu_drm_abort_one(struct amdgpu_drm_queue_entry *e)
-{
- xorg_list_del(&e->list);
- e->abort(e->crtc, e->data);
- free(e);
-}
-
-/*
* Abort drm queue entries for a client
*
* NOTE: This keeps the entries in the list until the DRM event arrives,