summaryrefslogtreecommitdiff
path: root/tests/kms_busy.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-07-16 16:28:41 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-09-07 19:10:28 +0100
commita380134e5e553661ffa06e92460465ec9a3de29d (patch)
tree6943c8aaf4d2959f9c5da59a55e0b616cf4f0365 /tests/kms_busy.c
parent61f8de7d04e6b69d1cb43770bbef522311ebc3cc (diff)
igt/gem_exec_schedule: Basic tests for preemption
We queue N low priority hanging batches across the engines and check that our high priority write over takes them. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: MichaƂ Winiarski <michal.winiarski@intel.com>
Diffstat (limited to 'tests/kms_busy.c')
-rw-r--r--tests/kms_busy.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/kms_busy.c b/tests/kms_busy.c
index ecf0b2eb..7e31c2c8 100644
--- a/tests/kms_busy.c
+++ b/tests/kms_busy.c
@@ -91,7 +91,8 @@ static void flip_to_fb(igt_display_t *dpy, int pipe,
struct timespec tv = { 1, 0 };
struct drm_event_vblank ev;
- igt_spin_t *t = igt_spin_batch_new(dpy->drm_fd, ring, fb->gem_handle);
+ igt_spin_t *t = igt_spin_batch_new(dpy->drm_fd,
+ 0, ring, fb->gem_handle);
if (modeset) {
/*
@@ -203,7 +204,8 @@ static void test_flip(igt_display_t *dpy, unsigned ring, int pipe, bool modeset)
static void test_atomic_commit_hang(igt_display_t *dpy, igt_plane_t *primary,
struct igt_fb *busy_fb, unsigned ring)
{
- igt_spin_t *t = igt_spin_batch_new(dpy->drm_fd, ring, busy_fb->gem_handle);
+ igt_spin_t *t = igt_spin_batch_new(dpy->drm_fd,
+ 0, ring, busy_fb->gem_handle);
struct pollfd pfd = { .fd = dpy->drm_fd, .events = POLLIN };
unsigned flags = 0;
struct drm_event_vblank ev;
@@ -290,7 +292,7 @@ static void test_pageflip_modeset_hang(igt_display_t *dpy,
igt_display_commit2(dpy, dpy->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
- t = igt_spin_batch_new(dpy->drm_fd, ring, fb.gem_handle);
+ t = igt_spin_batch_new(dpy->drm_fd, 0, ring, fb.gem_handle);
do_or_die(drmModePageFlip(dpy->drm_fd, dpy->pipes[pipe].crtc_id, fb.fb_id, DRM_MODE_PAGE_FLIP_EVENT, &fb));