summaryrefslogtreecommitdiff
path: root/tests/kms_flip.c
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2016-04-14 10:38:23 +0200
committerTomeu Vizoso <tomeu.vizoso@collabora.com>2016-04-25 14:21:35 +0200
commit52a5518c3eda09e50277e4f731e0383923dddbb1 (patch)
tree0d67e5339b32fa1039c3678b8a11ae9f2b92a3b5 /tests/kms_flip.c
parent39eb7043e63bb30e5e3c375a4577103c88235d2f (diff)
tests/kms_flip: Move bufmgr requirement into subtests
Because bufmgr is currently a i915-only thing and it's only needed in a subset of the subtests, require it only in the subtests that actually need it so that the other subtests aren't skipped without a reason. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Diffstat (limited to 'tests/kms_flip.c')
-rw-r--r--tests/kms_flip.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index ffa651f4..9189993a 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -246,6 +246,8 @@ static int _emit_dummy_load__bcs(struct test_output *o, int limit, int timeout)
drm_intel_bo *src_bo, *dst_bo, *fb_bo;
struct igt_fb *fb_info = &o->fb_info[o->current_fb_id];
+ igt_require(bufmgr);
+
src_bo = drm_intel_bo_alloc(bufmgr, "dummy_bo", 2048*2048*4, 4096);
igt_assert(src_bo);
@@ -298,6 +300,8 @@ static void emit_fence_stress(struct test_output *o)
drm_intel_bo **bo;
int i;
+ igt_require(bufmgr);
+
bo = calloc(sizeof(*bo), num_fences);
exec = calloc(sizeof(*exec), num_fences+1);
for (i = 0; i < num_fences - 1; i++) {
@@ -337,6 +341,8 @@ static int _emit_dummy_load__rcs(struct test_output *o, int limit, int timeout)
struct igt_buf sb[3], *src, *dst, *fb;
int i, ret = 0;
+ igt_require(bufmgr);
+
copyfunc = igt_get_render_copyfunc(devid);
if (copyfunc == NULL)
return _emit_dummy_load__bcs(o, limit, timeout);
@@ -1689,8 +1695,10 @@ int main(int argc, char **argv)
get_timestamp_format();
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
- devid = intel_get_drm_devid(drm_fd);
- batch = intel_batchbuffer_alloc(bufmgr, devid);
+ if (bufmgr) {
+ devid = intel_get_drm_devid(drm_fd);
+ batch = intel_batchbuffer_alloc(bufmgr, devid);
+ }
}
igt_subtest("nonblocking-read")