mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 02:16:17 +00:00
igt/gem_ringfill: Check full rings across suspend/hibernate
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
d8842d385c
commit
1985459b09
@ -76,6 +76,8 @@ static void fill_ring(int fd, struct drm_i915_gem_execbuffer2 *execbuf)
|
|||||||
#define CHILD 0x8
|
#define CHILD 0x8
|
||||||
#define FORKED 0x8
|
#define FORKED 0x8
|
||||||
#define BOMB 0x10
|
#define BOMB 0x10
|
||||||
|
#define SUSPEND 0x20
|
||||||
|
#define HIBERNATE 0x40
|
||||||
|
|
||||||
static void run_test(int fd, unsigned ring, unsigned flags)
|
static void run_test(int fd, unsigned ring, unsigned flags)
|
||||||
{
|
{
|
||||||
@ -92,6 +94,9 @@ static void run_test(int fd, unsigned ring, unsigned flags)
|
|||||||
igt_skip_on_f(gen == 6 && (ring & ~(3<<13)) == I915_EXEC_BSD,
|
igt_skip_on_f(gen == 6 && (ring & ~(3<<13)) == I915_EXEC_BSD,
|
||||||
"MI_STORE_DATA broken on gen6 bsd\n");
|
"MI_STORE_DATA broken on gen6 bsd\n");
|
||||||
|
|
||||||
|
if (flags & (SUSPEND | HIBERNATE))
|
||||||
|
run_test(fd, ring, 0);
|
||||||
|
|
||||||
gem_quiescent_gpu(fd);
|
gem_quiescent_gpu(fd);
|
||||||
|
|
||||||
memset(&execbuf, 0, sizeof(execbuf));
|
memset(&execbuf, 0, sizeof(execbuf));
|
||||||
@ -169,6 +174,12 @@ static void run_test(int fd, unsigned ring, unsigned flags)
|
|||||||
igt_fork(child, nchild)
|
igt_fork(child, nchild)
|
||||||
fill_ring(fd, &execbuf);
|
fill_ring(fd, &execbuf);
|
||||||
|
|
||||||
|
if (flags & SUSPEND)
|
||||||
|
igt_system_suspend_autoresume();
|
||||||
|
|
||||||
|
if (flags & HIBERNATE)
|
||||||
|
igt_system_hibernate_autoresume();
|
||||||
|
|
||||||
igt_waitchildren();
|
igt_waitchildren();
|
||||||
} else
|
} else
|
||||||
fill_ring(fd, &execbuf);
|
fill_ring(fd, &execbuf);
|
||||||
@ -183,6 +194,11 @@ static void run_test(int fd, unsigned ring, unsigned flags)
|
|||||||
|
|
||||||
gem_close(fd, obj[1].handle);
|
gem_close(fd, obj[1].handle);
|
||||||
gem_close(fd, obj[0].handle);
|
gem_close(fd, obj[0].handle);
|
||||||
|
|
||||||
|
gem_quiescent_gpu(fd);
|
||||||
|
|
||||||
|
if (flags & (SUSPEND | HIBERNATE))
|
||||||
|
run_test(fd, ring, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
igt_main
|
igt_main
|
||||||
@ -197,6 +213,8 @@ igt_main
|
|||||||
{ "-child", CHILD },
|
{ "-child", CHILD },
|
||||||
{ "-forked", FORKED },
|
{ "-forked", FORKED },
|
||||||
{ "-bomb", BOMB | INTERRUPTIBLE },
|
{ "-bomb", BOMB | INTERRUPTIBLE },
|
||||||
|
{ "-S3", BOMB | SUSPEND },
|
||||||
|
{ "-S4", BOMB | HIBERNATE },
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
}, *mode;
|
}, *mode;
|
||||||
const struct intel_execution_engine *e;
|
const struct intel_execution_engine *e;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user