On Tue, Dec 22, 2015 at 04:00:51PM +0000, Tvrtko Ursulin wrote: > > > On 22/12/15 10:07, ankitprasad.r.sharma@xxxxxxxxx wrote: > >From: Ankitprasad Sharma <ankitprasad.r.sharma@xxxxxxxxx> > > > >This patch verifies if the contents of the stolen backed object were > >preserved across hibernation. This is to validate kernel changes related > >to moving stolen-backed objects to shmem on hibernation. > > > >v2: Added comment, Use igt_assert_eq() instead of igt_assert(), Made loops > >more readable (Tvrtko) > > > >Signed-off-by: Ankitprasad Sharma <ankitprasad.r.sharma@xxxxxxxxx> > >--- > > tests/gem_stolen.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 98 insertions(+) > > > >diff --git a/tests/gem_stolen.c b/tests/gem_stolen.c > >index 5dc2117..8a0bcb7 100644 > >--- a/tests/gem_stolen.c > >+++ b/tests/gem_stolen.c > >@@ -290,6 +290,101 @@ static void stolen_fill_purge_test(int fd) > > gem_close(fd, handle[i]); > > } > > > >+static void stolen_hibernate(int fd) > >+{ > >+ drm_intel_bo *bo; > >+ drm_intel_bo *src, *dest; > >+ int obj_count = 0, i = 0; > >+ int ret, j; > >+ uint32_t handle[MAX_OBJECTS], src_handle; > >+ uint32_t *virt; > >+ > >+ gem_require_stolen_support(fd); > >+ > >+ src_handle = gem_create(fd, SIZE); > >+ src = gem_handle_to_libdrm_bo(bufmgr, fd, > >+ "bo", src_handle); Why? Just use gem_map__gtt. -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx