path: root/src/gallium
diff options
authorEric Anholt <>2019-01-15 16:02:23 -0800
committerEric Anholt <>2019-01-16 16:28:41 -0800
commit99ef66c325a99b3e191987d8327e7e4cd4aafcd7 (patch)
tree36cceda0d97a42804eb428008f5c4c6c767da9f9 /src/gallium
parent06057267762d4ed32b22da79704139333f31e680 (diff)
vc4: Don't leak the GPU fd for renderonly usage.
Noticed while debugging V3D -- the ro->gpu_fd was freshly opened in ro setup, and it needs to stay open until screen close (since it may be used by renderonly) and should be the same one used by the vc4 screen. Fixes: 7029ec05e2c7 ("gallium: Add renderonly-based support for pl111+vc4.")
Diffstat (limited to 'src/gallium')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/winsys/vc4/drm/vc4_drm_winsys.c b/src/gallium/winsys/vc4/drm/vc4_drm_winsys.c
index b2ffa90fe19..73717d25fe4 100644
--- a/src/gallium/winsys/vc4/drm/vc4_drm_winsys.c
+++ b/src/gallium/winsys/vc4/drm/vc4_drm_winsys.c
@@ -37,5 +37,5 @@ vc4_drm_screen_create(int fd)
struct pipe_screen *
vc4_drm_screen_create_renderonly(struct renderonly *ro)
- return vc4_screen_create(fcntl(ro->gpu_fd, F_DUPFD_CLOEXEC, 3), ro);
+ return vc4_screen_create(ro->gpu_fd, ro);