diff options
author | Joonbum Ko <joonbum.ko@samsung.com> | 2020-01-07 17:25:48 +0900 |
---|---|---|
committer | Joonbum Ko <joonbum.ko@samsung.com> | 2020-01-07 17:25:48 +0900 |
commit | 66e8036f89597ac277a1ac3caa09b81c41a92d8b (patch) | |
tree | 31d3cbc7337f33e5448c048ec5b71cfa43c5adba | |
parent | ad98e5ed4e87577245afcf429f562604a5eaea73 (diff) | |
download | mesa-66e8036f89597ac277a1ac3caa09b81c41a92d8b.tar.gz mesa-66e8036f89597ac277a1ac3caa09b81c41a92d8b.tar.bz2 mesa-66e8036f89597ac277a1ac3caa09b81c41a92d8b.zip |
Fixed to close GEM handle of renderonly_scanout.submit/tizen/20200107.093413accepted/tizen/unified/20200109.065452
Change-Id: Ie7e29567aa0f504cef4c08e72a88fa9cc5a9a183
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
-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); } |