mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-21 05:13:47 +00:00
tests: use igt_assert/igt_require more
With the new _f variants we can replace almost all of them. Also remove a ton of checks for argc != 1, they're a bit useless ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -81,11 +81,6 @@ int main(int argc, char **argv)
|
||||
int fd;
|
||||
int devid;
|
||||
|
||||
if (argc != 1) {
|
||||
fprintf(stderr, "usage: %s\n", argv[0]);
|
||||
igt_fail(-1);
|
||||
}
|
||||
|
||||
fd = drm_open_any();
|
||||
devid = intel_get_drm_devid(fd);
|
||||
|
||||
@@ -99,17 +94,11 @@ int main(int argc, char **argv)
|
||||
printf("num rings detected: %i\n", num_rings);
|
||||
|
||||
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
|
||||
if (!bufmgr) {
|
||||
fprintf(stderr, "failed to init libdrm\n");
|
||||
igt_fail(-1);
|
||||
}
|
||||
igt_assert(bufmgr);
|
||||
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
|
||||
|
||||
batch = intel_batchbuffer_alloc(bufmgr, devid);
|
||||
if (!batch) {
|
||||
fprintf(stderr, "failed to create batch buffer\n");
|
||||
igt_fail(-1);
|
||||
}
|
||||
igt_assert(batch);
|
||||
|
||||
mi_lri_loop();
|
||||
gem_quiescent_gpu(fd);
|
||||
|
||||
Reference in New Issue
Block a user