gem_set_domain() is gem specific and not needed for dumb buffers. Signed-off-by: Deepak Rawat <drawat@xxxxxxxxxx> --- lib/igt_fb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/igt_fb.c b/lib/igt_fb.c index 0485708b..74a4b501 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -1356,15 +1356,15 @@ static void create_cairo_surface__gtt(int fd, struct igt_fb *fb) { void *ptr; - gem_set_domain(fd, fb->gem_handle, - I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); - if (fb->is_dumb) ptr = kmstest_dumb_map_buffer(fd, fb->gem_handle, fb->size, PROT_READ | PROT_WRITE); - else + else { + gem_set_domain(fd, fb->gem_handle, + I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); ptr = gem_mmap__gtt(fd, fb->gem_handle, fb->size, PROT_READ | PROT_WRITE); + } fb->cairo_surface = cairo_image_surface_create_for_data(ptr, -- 2.17.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx