[igt-dev] [PATCH i-g-t v2 1/2] tests/intel_dp_compliance: use device coherent mapping instead of mmap_gtt

Ramalingam C ramalingam.c at intel.com
Fri Feb 7 13:45:26 UTC 2020


As tiling is not used we use the device coherent mapping instead of
mmap_gtt.

v2:
  instead of skipping device coherent mapping is used. [Ashutosh]

Signed-off-by: Ramalingam C <ramalingam.c at intel.com>
---
 tools/intel_dp_compliance.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/intel_dp_compliance.c b/tools/intel_dp_compliance.c
index 5cc3d37a71d6..2d42cb1a7b6f 100644
--- a/tools/intel_dp_compliance.c
+++ b/tools/intel_dp_compliance.c
@@ -451,9 +451,9 @@ static int setup_framebuffers(struct connector *dp_conn)
 	igt_assert(dp_conn->fb);
 
 	/* Map the mapping of GEM object into the virtual address space */
-	dp_conn->pixmap = gem_mmap__gtt(drm_fd,
+	dp_conn->pixmap = gem_mmap__device_coherent(drm_fd,
 					dp_conn->fb_video_pattern.gem_handle,
-					dp_conn->fb_video_pattern.size,
+					0, dp_conn->fb_video_pattern.size,
 					PROT_READ | PROT_WRITE);
 	if (dp_conn->pixmap == NULL)
 		return -1;
@@ -481,9 +481,9 @@ static int setup_failsafe_framebuffer(struct connector *dp_conn)
 	igt_assert(dp_conn->failsafe_fb);
 
 	/* Map the mapping of GEM object into the virtual address space */
-	dp_conn->failsafe_pixmap = gem_mmap__gtt(drm_fd,
+	dp_conn->failsafe_pixmap = gem_mmap__device_coherent(drm_fd,
 						 dp_conn->fb_failsafe_pattern.gem_handle,
-						 dp_conn->fb_failsafe_pattern.size,
+						 0, dp_conn->fb_failsafe_pattern.size,
 						 PROT_READ | PROT_WRITE);
 	if (dp_conn->failsafe_pixmap == NULL)
 		return -1;
@@ -518,9 +518,9 @@ static int setup_video_pattern_framebuffer(struct connector *dp_conn)
 	igt_assert(dp_conn->test_pattern.fb);
 
 	/* Map the mapping of GEM object into the virtual address space */
-	dp_conn->test_pattern.pixmap = gem_mmap__gtt(drm_fd,
+	dp_conn->test_pattern.pixmap = gem_mmap__device_coherent(drm_fd,
 						     dp_conn->test_pattern.fb_pattern.gem_handle,
-						     dp_conn->test_pattern.fb_pattern.size,
+						     0, dp_conn->test_pattern.fb_pattern.size,
 						     PROT_READ | PROT_WRITE);
 	if (dp_conn->test_pattern.pixmap == NULL)
 		return -1;
-- 
2.20.1



More information about the igt-dev mailing list