diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2015-01-26 21:25:58 -0800 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-06-30 13:44:09 +1000 |
commit | bf262b43007050180d336defd48251de80894801 (patch) | |
tree | fc93530bf4cbd456a25a3927c40733884d573f8d /hw/xfree86 | |
parent | b8ccc5d36b0436bac57f07969ff3eb8d479a8511 (diff) |
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>
Diffstat (limited to 'hw/xfree86')
-rw-r--r-- | hw/xfree86/drivers/modesetting/driver.h | 1 | ||||
-rw-r--r-- | hw/xfree86/drivers/modesetting/vblank.c | 16 |
2 files changed, 17 insertions, 0 deletions
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 |