mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-20 22:36:24 +00:00
tests/gem_(cpu|gtt)_concurrent_blit: Restore the old tests and add the new interruptible as new tests
Daniel preferred to keep the old tests intact lest we accidentally break them, and to add the new interruptible tests as new subtests. In the process also make sure the GPU is idle before starting each loop. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
95426dc206
commit
4c6f2d4e0c
@ -118,9 +118,43 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* try to overwrite the source values */
|
||||
drmtest_fork_signal_helper();
|
||||
if (drmtest_run_subtest("overwrite-source")) {
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
intel_copy_bo(batch, dst[i], src[i], width, height);
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xdeadbeef, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
cmp_bo(dst[i], i, width, height);
|
||||
}
|
||||
|
||||
/* try to read the results before the copy completes */
|
||||
if (drmtest_run_subtest("early-read")) {
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xdeadbeef, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
intel_copy_bo(batch, dst[i], src[i], width, height);
|
||||
for (i = num_buffers; i--; )
|
||||
cmp_bo(dst[i], 0xdeadbeef, width, height);
|
||||
}
|
||||
|
||||
/* and finally try to trick the kernel into loosing the pending write */
|
||||
if (drmtest_run_subtest("gpu-read-after-write")) {
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xabcdabcd, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
intel_copy_bo(batch, dst[i], src[i], width, height);
|
||||
for (i = num_buffers; i--; )
|
||||
intel_copy_bo(batch, dummy, dst[i], width, height);
|
||||
for (i = num_buffers; i--; )
|
||||
cmp_bo(dst[i], 0xabcdabcd, width, height);
|
||||
}
|
||||
|
||||
drmtest_fork_signal_helper();
|
||||
|
||||
/* try to overwrite the source values */
|
||||
if (drmtest_run_subtest("overwrite-source-interruptible")) {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
intel_copy_bo(batch, dst[i], src[i], width, height);
|
||||
for (i = num_buffers; i--; )
|
||||
@ -131,8 +165,9 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* try to read the results before the copy completes */
|
||||
if (drmtest_run_subtest("early-read")) {
|
||||
if (drmtest_run_subtest("early-read-interruptible")) {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xdeadbeef, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
@ -143,8 +178,9 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* and finally try to trick the kernel into loosing the pending write */
|
||||
if (drmtest_run_subtest("gpu-read-after-write")) {
|
||||
if (drmtest_run_subtest("gpu-read-after-write-interruptible")) {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xabcdabcd, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
@ -155,6 +191,7 @@ main(int argc, char **argv)
|
||||
cmp_bo(dst[i], 0xabcdabcd, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_fork_signal_helper();
|
||||
|
||||
return 0;
|
||||
|
@ -121,9 +121,43 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* try to overwrite the source values */
|
||||
drmtest_fork_signal_helper();
|
||||
if (drmtest_run_subtest("overwrite-source")) {
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
intel_copy_bo(batch, dst[i], src[i], width, height);
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xdeadbeef, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
cmp_bo(dst[i], i, width, height);
|
||||
}
|
||||
|
||||
/* try to read the results before the copy completes */
|
||||
if (drmtest_run_subtest("early-read")) {
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xdeadbeef, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
intel_copy_bo(batch, dst[i], src[i], width, height);
|
||||
for (i = num_buffers; i--; )
|
||||
cmp_bo(dst[i], 0xdeadbeef, width, height);
|
||||
}
|
||||
|
||||
/* and finally try to trick the kernel into loosing the pending write */
|
||||
if (drmtest_run_subtest("gpu-read-after-write")) {
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xabcdabcd, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
intel_copy_bo(batch, dst[i], src[i], width, height);
|
||||
for (i = num_buffers; i--; )
|
||||
intel_copy_bo(batch, dummy, dst[i], width, height);
|
||||
for (i = num_buffers; i--; )
|
||||
cmp_bo(dst[i], 0xabcdabcd, width, height);
|
||||
}
|
||||
|
||||
drmtest_fork_signal_helper();
|
||||
|
||||
/* try to read the results before the copy completes */
|
||||
if (drmtest_run_subtest("overwrite-source-interruptible")) {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
intel_copy_bo(batch, dst[i], src[i], width, height);
|
||||
for (i = num_buffers; i--; )
|
||||
@ -134,8 +168,9 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* try to read the results before the copy completes */
|
||||
if (drmtest_run_subtest("early-read")) {
|
||||
if (drmtest_run_subtest("early-read-interruptible")) {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xdeadbeef, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
@ -146,8 +181,9 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* and finally try to trick the kernel into loosing the pending write */
|
||||
if (drmtest_run_subtest("gpu-read-after-write")) {
|
||||
if (drmtest_run_subtest("gpu-read-after-write-interruptible")) {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xabcdabcd, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
@ -158,6 +194,7 @@ main(int argc, char **argv)
|
||||
cmp_bo(dst[i], 0xabcdabcd, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_stop_signal_helper();
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user