mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 10:26:12 +00:00
tests/gem_cs_tlb: convert to subtests
Again required a bit of shuffling to avoid expensive setup and some logic to properly handling 'skip' when only running a subtest. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
4f6ab180a1
commit
9d65d484f6
@ -16,6 +16,7 @@ TESTS_progs_M = \
|
|||||||
gem_basic \
|
gem_basic \
|
||||||
gem_cacheing \
|
gem_cacheing \
|
||||||
gem_cpu_concurrent_blit \
|
gem_cpu_concurrent_blit \
|
||||||
|
gem_cs_tlb \
|
||||||
flip_test \
|
flip_test \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
@ -23,7 +24,6 @@ TESTS_progs = \
|
|||||||
getversion \
|
getversion \
|
||||||
getclient \
|
getclient \
|
||||||
getstats \
|
getstats \
|
||||||
gem_cs_tlb \
|
|
||||||
gem_gtt_concurrent_blit \
|
gem_gtt_concurrent_blit \
|
||||||
gem_exec_nop \
|
gem_exec_nop \
|
||||||
gem_exec_big \
|
gem_exec_big \
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
#include "intel_gpu_tools.h"
|
#include "intel_gpu_tools.h"
|
||||||
|
|
||||||
#define BATCH_SIZE (1024*1024)
|
#define BATCH_SIZE (1024*1024)
|
||||||
|
bool skipped_all = true;
|
||||||
|
|
||||||
static int exec(int fd, uint32_t handle, int split,
|
static int exec(int fd, uint32_t handle, int split,
|
||||||
uint64_t *gtt_ofs, unsigned ring_id)
|
uint64_t *gtt_ofs, unsigned ring_id)
|
||||||
@ -102,6 +103,7 @@ static void run_on_ring(int fd, unsigned ring_id, const char *ring_name)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
sprintf(buf, "testing %s cs tlb coherency: ", ring_name);
|
sprintf(buf, "testing %s cs tlb coherency: ", ring_name);
|
||||||
|
skipped_all = false;
|
||||||
|
|
||||||
/* Shut up gcc, too stupid. */
|
/* Shut up gcc, too stupid. */
|
||||||
batch_ptr_old = NULL;
|
batch_ptr_old = NULL;
|
||||||
@ -148,23 +150,30 @@ int main(int argc, char **argv)
|
|||||||
int fd;
|
int fd;
|
||||||
uint32_t devid;
|
uint32_t devid;
|
||||||
|
|
||||||
|
drmtest_subtest_init(argc, argv);
|
||||||
|
|
||||||
fd = drm_open_any();
|
fd = drm_open_any();
|
||||||
devid = intel_get_drm_devid(fd);
|
devid = intel_get_drm_devid(fd);
|
||||||
|
|
||||||
/* This test is very sensitive to residual gtt_mm noise from previous
|
if (!drmtest_only_list_subtests()) {
|
||||||
* tests. Try to quiet thing down first. */
|
/* This test is very sensitive to residual gtt_mm noise from previous
|
||||||
gem_quiescent_gpu(fd);
|
* tests. Try to quiet thing down first. */
|
||||||
sleep(5); /* needs more serious ducttape */
|
gem_quiescent_gpu(fd);
|
||||||
|
sleep(5); /* needs more serious ducttape */
|
||||||
|
}
|
||||||
|
|
||||||
run_on_ring(fd, I915_EXEC_RENDER, "render");
|
if (drmtest_run_subtest("render"))
|
||||||
|
run_on_ring(fd, I915_EXEC_RENDER, "render");
|
||||||
|
|
||||||
if (HAS_BSD_RING(devid))
|
if (drmtest_run_subtest("bsd"))
|
||||||
run_on_ring(fd, I915_EXEC_BSD, "bsd");
|
if (HAS_BSD_RING(devid))
|
||||||
|
run_on_ring(fd, I915_EXEC_BSD, "bsd");
|
||||||
|
|
||||||
if (HAS_BLT_RING(devid))
|
if (drmtest_run_subtest("blt"))
|
||||||
run_on_ring(fd, I915_EXEC_BLT, "blt");
|
if (HAS_BLT_RING(devid))
|
||||||
|
run_on_ring(fd, I915_EXEC_BLT, "blt");
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
return 0;
|
return skipped_all ? 77 : 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user