aboutsummaryrefslogtreecommitdiffstats
path: root/drmtest.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-11-18 11:07:29 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-11-18 11:07:29 +0100
commitcc9d41b2ac8a257201abe39bf9fc23dfd89d73b9 (patch)
treeeeb17420b98bc98c2d2c2ec91565cea350775d19 /drmtest.c
parent663e643064b76602a9b121c52d907ac859e8f810 (diff)
downloaddrminfo-cc9d41b2ac8a257201abe39bf9fc23dfd89d73b9.tar.gz
try zap mappings with madvise
Diffstat (limited to 'drmtest.c')
-rw-r--r--drmtest.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drmtest.c b/drmtest.c
index 490c0d5..6eb7e2b 100644
--- a/drmtest.c
+++ b/drmtest.c
@@ -209,6 +209,12 @@ static void drm_check_content(const char *grp)
}
}
+static void drm_zap_mappings(void)
+{
+ madvise(fbmem, creq.size, MADV_DONTNEED);
+ madvise(dmabuf_mem, creq.size, MADV_DONTNEED);
+}
+
/* ------------------------------------------------------------------ */
static void drm_init_dumb_fb(bool use_pixman, bool create_dmabuf)
@@ -471,6 +477,8 @@ int main(int argc, char **argv)
drm_check_content("pre-show content");
drm_show_fb();
drm_check_content("post-show content");
+ drm_zap_mappings();
+ drm_check_content("post-zap content");
pid = fork();
if (pid == 0) {