@@ -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")
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> --- tests/kms_flip.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)