mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-24 08:16:10 +00:00
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>
This commit is contained in:
parent
39eb7043e6
commit
52a5518c3e
@ -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;
|
drm_intel_bo *src_bo, *dst_bo, *fb_bo;
|
||||||
struct igt_fb *fb_info = &o->fb_info[o->current_fb_id];
|
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);
|
src_bo = drm_intel_bo_alloc(bufmgr, "dummy_bo", 2048*2048*4, 4096);
|
||||||
igt_assert(src_bo);
|
igt_assert(src_bo);
|
||||||
|
|
||||||
@ -298,6 +300,8 @@ static void emit_fence_stress(struct test_output *o)
|
|||||||
drm_intel_bo **bo;
|
drm_intel_bo **bo;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
igt_require(bufmgr);
|
||||||
|
|
||||||
bo = calloc(sizeof(*bo), num_fences);
|
bo = calloc(sizeof(*bo), num_fences);
|
||||||
exec = calloc(sizeof(*exec), num_fences+1);
|
exec = calloc(sizeof(*exec), num_fences+1);
|
||||||
for (i = 0; i < num_fences - 1; i++) {
|
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;
|
struct igt_buf sb[3], *src, *dst, *fb;
|
||||||
int i, ret = 0;
|
int i, ret = 0;
|
||||||
|
|
||||||
|
igt_require(bufmgr);
|
||||||
|
|
||||||
copyfunc = igt_get_render_copyfunc(devid);
|
copyfunc = igt_get_render_copyfunc(devid);
|
||||||
if (copyfunc == NULL)
|
if (copyfunc == NULL)
|
||||||
return _emit_dummy_load__bcs(o, limit, timeout);
|
return _emit_dummy_load__bcs(o, limit, timeout);
|
||||||
@ -1689,9 +1695,11 @@ int main(int argc, char **argv)
|
|||||||
get_timestamp_format();
|
get_timestamp_format();
|
||||||
|
|
||||||
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
|
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
|
||||||
|
if (bufmgr) {
|
||||||
devid = intel_get_drm_devid(drm_fd);
|
devid = intel_get_drm_devid(drm_fd);
|
||||||
batch = intel_batchbuffer_alloc(bufmgr, devid);
|
batch = intel_batchbuffer_alloc(bufmgr, devid);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
igt_subtest("nonblocking-read")
|
igt_subtest("nonblocking-read")
|
||||||
test_nonblocking_read(drm_fd);
|
test_nonblocking_read(drm_fd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user