modesetting: Implement an ms_drm_abort_seq() function.
This is a specialization of ms_drm_abort that matches based on the drm event queue's sequence number. Based on code by Keith Packard. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
b8ccc5d36b
commit
bf262b4300
|
@ -117,6 +117,7 @@ uint32_t ms_drm_queue_alloc(xf86CrtcPtr crtc,
|
|||
void ms_drm_abort(ScrnInfoPtr scrn,
|
||||
Bool (*match)(void *data, void *match_data),
|
||||
void *match_data);
|
||||
void ms_drm_abort_seq(ScrnInfoPtr scrn, uint32_t seq);
|
||||
|
||||
Bool ms_crtc_on(xf86CrtcPtr crtc);
|
||||
|
||||
|
|
|
@ -323,6 +323,22 @@ ms_drm_abort_scrn(ScrnInfoPtr scrn)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Abort by drm queue sequence number.
|
||||
*/
|
||||
void
|
||||
ms_drm_abort_seq(ScrnInfoPtr scrn, uint32_t seq)
|
||||
{
|
||||
struct ms_drm_queue *q, *tmp;
|
||||
|
||||
xorg_list_for_each_entry_safe(q, tmp, &ms_drm_queue, list) {
|
||||
if (q->seq == seq) {
|
||||
ms_drm_abort_one(q);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Externally usable abort function that uses a callback to match a single
|
||||
* queued entry to abort
|
||||
|
|
Loading…
Reference in New Issue
Block a user