mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-03 15:28:15 +02:00
v3dv: allow device with only render node
When using drm-shim there is no primary node for the driver. This is fine, and hence we only mark that we don't have primary device. This fixes using v3dv with drm-shim. Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41779>
This commit is contained in:
parent
6f8a692abc
commit
1eae5ca94f
1 changed files with 4 additions and 4 deletions
|
|
@ -1359,10 +1359,10 @@ create_physical_device(struct v3dv_instance *instance,
|
|||
if (fstat(primary_fd, &primary_stat) != 0) {
|
||||
result = vk_errorf(instance, VK_ERROR_INITIALIZATION_FAILED,
|
||||
"failed to stat DRM primary node");
|
||||
goto fail;
|
||||
} else {
|
||||
device->has_primary = true;
|
||||
device->primary_devid = primary_stat.st_rdev;
|
||||
}
|
||||
device->has_primary = true;
|
||||
device->primary_devid = primary_stat.st_rdev;
|
||||
|
||||
if (fstat(render_fd, &render_stat) != 0) {
|
||||
result = vk_errorf(instance, VK_ERROR_INITIALIZATION_FAILED,
|
||||
|
|
@ -1664,7 +1664,7 @@ enumerate_devices(struct vk_instance *vk_instance)
|
|||
break;
|
||||
}
|
||||
|
||||
if (render_fd < 0 || primary_fd < 0)
|
||||
if (render_fd < 0)
|
||||
result = VK_ERROR_INCOMPATIBLE_DRIVER;
|
||||
else
|
||||
result = create_physical_device(instance, primary_fd, render_fd, display_fd);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue