anv: Fix close(fd) before import issue in vkCreateDmaBufImageINTEL
authorKevin Strasser <kevin.strasser@intel.com>
Tue, 3 Apr 2018 21:21:34 +0000 (14:21 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 4 Apr 2018 01:33:17 +0000 (18:33 -0700)
commit5bbde9b80fe2e6a384db5d636725b8f8065bc5c5
tree578dada38418a641ab4056707c11cd87077068bc
parentb42633db8e3711e54a5bd10495b1436b8e362801
anv: Fix close(fd) before import issue in vkCreateDmaBufImageINTEL

If we close the fd before calling DRM_IOCTL_PRIME_FD_TO_HANDLE the kernel
will hit a -EBADF error. Move the close(fd) call to the end of
anv_CreateDmaBufImageINTEL().

Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_intel.c