[igt-dev] [PATCH i-g-t 4/7] lib/igt_fb: Don't call gem_set_domain() for dumb buffer
Deepak Rawat
drawat at vmware.com
Fri Sep 28 00:43:47 UTC 2018
gem_set_domain() is gem specific and not needed for dumb buffers.
Signed-off-by: Deepak Rawat <drawat at vmware.com>
---
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
More information about the igt-dev
mailing list