[igt-dev] [PATCH i-g-t 2/2] lib/igt_draw: Use device coherent and cpu coherent mappings for draw methods.
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Tue Oct 19 09:40:30 UTC 2021
This will allow kms_frontbuffer_tracking to draw buffers for frontbuffer tracking on dg1.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
lib/igt_draw.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index da1d39fcba95..62ca4761a9f2 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -341,8 +341,8 @@ static void draw_rect_mmap_cpu(int fd, struct buf_data *buf, struct rect *rect,
if (tiling != I915_TILING_NONE)
igt_require(intel_display_ver(intel_get_drm_devid(fd)) >= 5);
- ptr = gem_mmap__cpu(fd, buf->handle, 0, PAGE_ALIGN(buf->size),
- PROT_READ | PROT_WRITE);
+ ptr = gem_mmap__cpu_coherent(fd, buf->handle, 0, PAGE_ALIGN(buf->size),
+ PROT_READ | PROT_WRITE);
switch (tiling) {
case I915_TILING_NONE:
@@ -391,8 +391,8 @@ static void draw_rect_mmap_wc(int fd, struct buf_data *buf, struct rect *rect,
if (tiling != I915_TILING_NONE)
igt_require(intel_display_ver(intel_get_drm_devid(fd)) >= 5);
- ptr = gem_mmap__wc(fd, buf->handle, 0, PAGE_ALIGN(buf->size),
- PROT_READ | PROT_WRITE);
+ ptr = gem_mmap__device_coherent(fd, buf->handle, 0, PAGE_ALIGN(buf->size),
+ PROT_READ | PROT_WRITE);
switch (tiling) {
case I915_TILING_NONE:
--
2.33.0
More information about the igt-dev
mailing list