[igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: sync memory at unmap_bo()
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Wed Dec 4 15:52:49 UTC 2019
Sync memory at unmap_bo() to avoid problems with cpu gem domain.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
lib/igt_fb.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 6ce7cfe..5a70dbf 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2152,6 +2152,10 @@ int igt_dirty_fb(int fd, struct igt_fb *fb)
static void unmap_bo(struct igt_fb *fb, void *ptr)
{
+ if (is_i915_device(fb->fd))
+ gem_set_domain(fb->fd, fb->gem_handle,
+ I915_GEM_DOMAIN_GTT, 0);
+
gem_munmap(ptr, fb->size);
if (fb->is_dumb)
--
2.7.4
More information about the igt-dev
mailing list