When running on the real hardware we have two devices: the v3d render node and the vc4 display node. We need the latter to allocate winsys BOs for v3d to render into. Since exporting these BOs is a privileged operation, we need to obtain the fd for this device through the display server. For now we only support doing this through the XCB DRI3 platform.
Also, do not duplicate or re-open the DRM devices when creating logical devices. The simulator checks that the file descriptor is exactly the same we used to initialize it when we created the physical device and aborts if it sees a different fd number, even if it points to the same device.
1d92c314f85 v3dv: implement device detection on actual hardware
src/broadcom/vulkan/v3dv_device.c | 160 ++++++++++++++++++++++++++++++++-----
src/broadcom/vulkan/v3dv_private.h | 2 +
2 files changed, 140 insertions(+), 22 deletions(-)