diff options
author | Deepak Rawat <drawat@vmware.com> | 2018-10-16 15:23:37 -0700 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-10-17 09:40:51 +0200 |
commit | 4ca3d1de874bd269b37055f1a4cc6de04ea2d050 (patch) | |
tree | 4d618d24b802f2e10d71525d4b46e4c9bf739296 /lib/igt_fb.c | |
parent | 0ac43db33e116b546e5704fe0b4dde21f391e09c (diff) |
lib/igt_fb: Call dumb_destroy ioctl in case of dumb buffers
vmwgfx does not support GEM interface so calling gem_close on vmwgfx
results in error.
v2: Use drmIoctl with error when ioctl() failed.
v3: Seperate ioctl wrapper.
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/igt_fb.c')
-rw-r--r-- | lib/igt_fb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c index 35be2e88..335ece69 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -2121,7 +2121,10 @@ void igt_remove_fb(int fd, struct igt_fb *fb) cairo_surface_destroy(fb->cairo_surface); do_or_die(drmModeRmFB(fd, fb->fb_id)); - gem_close(fd, fb->gem_handle); + if (fb->is_dumb) + kmstest_dumb_destroy(fd, fb->gem_handle); + else + gem_close(fd, fb->gem_handle); fb->fb_id = 0; } |