winsys/drm: Fix assert when try to accumulate an invalid fd
authorCharmaine Lee <charmainel@vmware.com>
Thu, 9 Aug 2018 23:22:52 +0000 (16:22 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 5 Sep 2018 17:22:42 +0000 (11:22 -0600)
commitf4f39fa5d9692b60a555cec8d4537f05cc93c9ac
tree8adeb81719abcf8c4ae11d89966f1e2e1aca4aa6
parent16f17e3a3c1a2f171f882e09bb69ba09a86deb49
winsys/drm: Fix assert when try to accumulate an invalid fd

This patch makes sure there is a valid fd before merging it
to the context's fd in vmw_svga_winsys_fence_server_sync().

This fixes the assert running webot.
No regression running kmscube.

Reviewed-by: Sinclair Yeh <syeh@vmware.com>
src/gallium/winsys/svga/drm/vmw_screen_svga.c