mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-13 02:46:23 +00:00
tests/pm_rpm: add gem-evict-pwrite subtest
This triggers a device suspended WARN in the kernel in gen6_ggtt_insert_entries() while calling the GEM pwrite ioctl. The sequence is suggested by Daniel. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
f12ed83058
commit
b35b1505f7
@ -31,6 +31,9 @@
|
|||||||
#include <intel_bufmgr.h>
|
#include <intel_bufmgr.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
extern drm_intel_bo **trash_bos;
|
||||||
|
extern int num_trash_bos;
|
||||||
|
|
||||||
/* auxialiary igt helpers from igt_aux.c */
|
/* auxialiary igt helpers from igt_aux.c */
|
||||||
/* generally useful helpers */
|
/* generally useful helpers */
|
||||||
void igt_fork_signal_helper(void);
|
void igt_fork_signal_helper(void);
|
||||||
|
@ -1319,6 +1319,29 @@ static void gem_idle_subtest(void)
|
|||||||
gem_quiescent_gpu(drm_fd);
|
gem_quiescent_gpu(drm_fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void gem_evict_pwrite_subtest(void)
|
||||||
|
{
|
||||||
|
static drm_intel_bufmgr *bufmgr;
|
||||||
|
uint32_t buf;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
|
||||||
|
igt_assert(bufmgr);
|
||||||
|
igt_init_aperture_trashers(bufmgr);
|
||||||
|
|
||||||
|
igt_trash_aperture();
|
||||||
|
|
||||||
|
disable_or_dpms_all_screens_and_wait(&ms_data, true);
|
||||||
|
igt_assert(wait_for_suspended());
|
||||||
|
|
||||||
|
buf = 0;
|
||||||
|
for (i = 0; i < num_trash_bos; i++)
|
||||||
|
gem_write(drm_fd, trash_bos[i]->handle, 0, &buf, sizeof(buf));
|
||||||
|
|
||||||
|
igt_cleanup_aperture_trashers();
|
||||||
|
drm_intel_bufmgr_destroy(bufmgr);
|
||||||
|
}
|
||||||
|
|
||||||
/* This also triggered WARNs on dmesg at some point. */
|
/* This also triggered WARNs on dmesg at some point. */
|
||||||
static void reg_read_ioctl_subtest(void)
|
static void reg_read_ioctl_subtest(void)
|
||||||
{
|
{
|
||||||
@ -1830,6 +1853,8 @@ int main(int argc, char *argv[])
|
|||||||
gem_execbuf_subtest();
|
gem_execbuf_subtest();
|
||||||
igt_subtest("gem-idle")
|
igt_subtest("gem-idle")
|
||||||
gem_idle_subtest();
|
gem_idle_subtest();
|
||||||
|
igt_subtest("gem-evict-pwrite")
|
||||||
|
gem_evict_pwrite_subtest();
|
||||||
|
|
||||||
/* Planes and cursors */
|
/* Planes and cursors */
|
||||||
igt_subtest("cursor")
|
igt_subtest("cursor")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user