Use xorg_list_append for the DRM event list
PATCH 1/1 Use xorg_list_append for the DRM event list
From: Michel Dänzer <[email protected]>
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 radeon_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.
--- src/radeon_drm_queue.c | 2 +- src/radeon_list.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-)
src/radeon_drm_queue.c +1 -1
@@ -105,7 +105,7 @@ radeon_drm_queue_alloc(xf86CrtcPtr crtc, ClientPtr client, e->handler = handler; e->abort = abort; -xorg_list_add (&e->list, &radeon_drm_queue); +xorg_list_append (&e->list, &radeon_drm_queue);return e->seq; }
src/radeon_list.h +7 -0
@@ -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 /* _RADEON_LIST_H_ */
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20170816093557.11618-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 18 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Wednesday, August 16, 2017 5:36 AM
To: [email protected]
Subject: [PATCH xf86-video-ati] Usexorg_list_appendfor the DRM event listFrom: Michel Dänzer <[email protected]>
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
radeon_drm_queue_allocwould
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.
Quoted 1 line
Signed-off-by Michel Dänzer <[email protected]>
Quoted 40 lines
--- src/radeon_drm_queue.c | 2 +- src/radeon_list.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-)src/radeon_drm_queue.c +1
-1@@ -105,7 +105,7 @@ radeon_drm_queue_alloc(xf86CrtcPtr crtc, ClientPtr client, e->handler = handler; e->abort = abort; -xorg_list_add (&e->list, &radeon_drm_queue); +xorg_list_append (&e->list, &radeon_drm_queue);return e->seq;}
src/radeon_list.h +7
-1@@ -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 /* _RADEON_LIST_H_ */ --2.14.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx