[PATCH 3/3] igt/gem_concurrent_blit: Exercise wc mappings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 tests/gem_concurrent_blit.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/gem_concurrent_blit.c b/tests/gem_concurrent_blit.c
index 7d8d628..9a9169e 100644
--- a/tests/gem_concurrent_blit.c
+++ b/tests/gem_concurrent_blit.c
@@ -159,6 +159,18 @@ gttX_create_bo(drm_intel_bufmgr *bufmgr, int width, int height)
 }
 
 static drm_intel_bo *
+wc_create_bo(drm_intel_bufmgr *bufmgr, int width, int height)
+{
+	drm_intel_bo *bo;
+
+	igt_require_mmap_wc(fd);
+
+	bo = unmapped_create_bo(bufmgr, width, height);
+	bo->virtual = gem_mmap__wc(fd, bo->handle, bo->size, PROT_READ | PROT_WRITE);
+	return bo;
+}
+
+static drm_intel_bo *
 gpu_create_bo(drm_intel_bufmgr *bufmgr, int width, int height)
 {
 	return unmapped_create_bo(bufmgr, width, height);
@@ -287,6 +299,8 @@ struct access_mode access_modes[] = {
 		.create_bo = gtt_create_bo, .name = "gtt" },
 	{ .set_bo = gtt_set_bo, .cmp_bo = gtt_cmp_bo,
 		.create_bo = gttX_create_bo, .name = "gttX" },
+	{ .set_bo = gtt_set_bo, .cmp_bo = gtt_cmp_bo,
+		.create_bo = wc_create_bo, .name = "wc" },
 	{ .set_bo = gpu_set_bo, .cmp_bo = gpu_cmp_bo,
 		.create_bo = gpu_create_bo, .name = "gpu" },
 	{ .set_bo = gpu_set_bo, .cmp_bo = gpu_cmp_bo,
-- 
2.1.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux