diff options
-rw-r--r-- | src/gallium/auxiliary/renderonly/renderonly.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/renderonly/renderonly.c b/src/gallium/auxiliary/renderonly/renderonly.c index d6a34400937..541631d3339 100644 --- a/src/gallium/auxiliary/renderonly/renderonly.c +++ b/src/gallium/auxiliary/renderonly/renderonly.c @@ -58,8 +58,15 @@ renderonly_scanout_destroy(struct renderonly_scanout *scanout, struct drm_mode_destroy_dumb destroy_dumb = { }; if (ro->kms_fd != -1) { + struct drm_gem_close gem_close; + destroy_dumb.handle = scanout->handle; drmIoctl(ro->kms_fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroy_dumb); + + memset(&gem_close, 0, sizeof gem_close); + gem_close.handle = scanout->handle; + if (drmIoctl(ro->kms_fd, DRM_IOCTL_GEM_CLOSE, &gem_close) < 0) + fprintf(stderr, "Failed to close GEM: %s\n", strerror(errno)); } FREE(scanout); } |