[PATCH xf86-video-ati 1/2] drm_queue: Don't abort events immediately from radeon_drm_abort_client
Alex Deucher
alexdeucher at gmail.com
Fri Feb 26 17:50:58 UTC 2016
On Thu, Feb 25, 2016 at 2:50 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Keep them around until the DRM event arrives, but then call the abort
> functions instead of the handler functions.
>
> This is a prerequisite for the following fix.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
For the series:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> src/radeon_drm_queue.c | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/src/radeon_drm_queue.c b/src/radeon_drm_queue.c
> index 5e54ef8..a50a1fd 100644
> --- a/src/radeon_drm_queue.c
> +++ b/src/radeon_drm_queue.c
> @@ -64,8 +64,12 @@ radeon_drm_queue_handler(int fd, unsigned int frame, unsigned int sec,
> xorg_list_for_each_entry_safe(e, tmp, &radeon_drm_queue, list) {
> if (e == user_data) {
> xorg_list_del(&e->list);
> - e->handler(e->scrn, frame,
> - (uint64_t)sec * 1000000 + usec, e->data);
> + if (e->handler)
> + e->handler(e->scrn, frame,
> + (uint64_t)sec * 1000000 + usec,
> + e->data);
> + else
> + e->abort(e->scrn, e->data);
> free(e);
> break;
> }
> @@ -115,15 +119,19 @@ radeon_drm_abort_one(struct radeon_drm_queue_entry *e)
>
> /*
> * Abort drm queue entries for a client
> + *
> + * NOTE: This keeps the entries in the list until the DRM event arrives,
> + * but then it calls the abort functions instead of the handler
> + * functions.
> */
> void
> radeon_drm_abort_client(ClientPtr client)
> {
> - struct radeon_drm_queue_entry *e, *tmp;
> + struct radeon_drm_queue_entry *e;
>
> - xorg_list_for_each_entry_safe(e, tmp, &radeon_drm_queue, list) {
> + xorg_list_for_each_entry(e, &radeon_drm_queue, list) {
> if (e->client == client)
> - radeon_drm_abort_one(e);
> + e->handler = NULL;
> }
> }
>
> --
> 2.7.0
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> https://lists.x.org/mailman/listinfo/xorg-driver-ati
More information about the xorg-driver-ati
mailing list