mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
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>
This commit is contained in:
committed by
Michel Daenzer
parent
426f9a4965
commit
eda571222f
@@ -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;
|
||||
}
|
||||
|
||||
@@ -173,19 +186,6 @@ amdgpu_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
|
||||
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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user