mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
Use xorg_list_append for the DRM event list
We were adding entries at the start of the list, i.e. the list was ordered from most recently added to least recently added. However, the corresponding DRM events are generally expected to arrive in the same order as they are queued, which means that amdgpu_drm_queue_alloc would generally have to traverse the whole list to find the entry corresponding to an arrived event. Fix this by adding entries at the end of the list. (Ported from radeon commit 3e24770b1b472fc15df56d06f5f04778c9db63dd) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
22740f86d0
commit
828fb44cf9
@@ -105,7 +105,7 @@ amdgpu_drm_queue_alloc(xf86CrtcPtr crtc, ClientPtr client,
|
||||
e->handler = handler;
|
||||
e->abort = abort;
|
||||
|
||||
xorg_list_add(&e->list, &amdgpu_drm_queue);
|
||||
xorg_list_append(&e->list, &amdgpu_drm_queue);
|
||||
|
||||
return e->seq;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,13 @@
|
||||
#define xorg_list_del list_del
|
||||
#define xorg_list_for_each_entry list_for_each_entry
|
||||
#define xorg_list_for_each_entry_safe list_for_each_entry_safe
|
||||
|
||||
static inline void
|
||||
xorg_list_append(struct list *entry, struct list *head)
|
||||
{
|
||||
__list_add(entry, head->prev, head);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _AMDGPU_LIST_H_ */
|
||||
|
||||
Reference in New Issue
Block a user