diff --git a/hw/xfree86/drivers/modesetting/driver.h b/hw/xfree86/drivers/modesetting/driver.h index 4b6ae87fa..843a105ed 100644 --- a/hw/xfree86/drivers/modesetting/driver.h +++ b/hw/xfree86/drivers/modesetting/driver.h @@ -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); diff --git a/hw/xfree86/drivers/modesetting/vblank.c b/hw/xfree86/drivers/modesetting/vblank.c index 91cfcf2d5..776dcef9b 100644 --- a/hw/xfree86/drivers/modesetting/vblank.c +++ b/hw/xfree86/drivers/modesetting/vblank.c @@ -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