v3dv: Output a message if file open fails in physical_device_init

In the caller, this error simply gets mapped to VK_ERROR_INIT[...].
Especially for users it is very valuable to know what the driver
tried and what kind of failure occured. Thus just straight out log
to stderr.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9317>
This commit is contained in:
Andreas Bergmeier
2021-02-27 22:28:19 +00:00
committed by Marge Bot
parent 55e23f32c3
commit b4772d15ab
+1
View File
@@ -613,6 +613,7 @@ physical_device_init(struct v3dv_physical_device *device,
const char *path = drm_render_device->nodes[DRM_NODE_RENDER];
render_fd = open(path, O_RDWR | O_CLOEXEC);
if (render_fd < 0) {
fprintf(stderr, "Opening %s failed: %s\n", path, strerror(errno));
result = VK_ERROR_INCOMPATIBLE_DRIVER;
goto fail;
}