mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 09:10:11 +01:00
anv: Assume syncobj support
Sync object for i915 support has been in upstream Linux since 4.14 which is 3.5 years old at this point and, as far as we can tell, it also exists in all the ChromeOS kernels. Assuming it allows us to drop some of our more gnarly synchronization fall-back paths. At the time of merge, ChromeOS was on the following kernels: - kernel 3.18: SKL - kernel 4.4: BYT, KBL, APL - Kernel 4.14: BDW, GLK All of the pre-4.14 kernels have had syncobj support back-ported. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9777>
This commit is contained in:
parent
a62973580b
commit
3b363d5b55
1 changed files with 9 additions and 3 deletions
|
|
@ -810,12 +810,18 @@ anv_physical_device_try_create(struct anv_instance *instance,
|
||||||
goto fail_alloc;
|
goto fail_alloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_FENCE_ARRAY)) {
|
||||||
|
result = vk_errorfi(device->instance, NULL,
|
||||||
|
VK_ERROR_INITIALIZATION_FAILED,
|
||||||
|
"kernel missing syncobj support");
|
||||||
|
goto fail_base;
|
||||||
|
}
|
||||||
|
|
||||||
device->has_exec_async = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_ASYNC);
|
device->has_exec_async = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_ASYNC);
|
||||||
device->has_exec_capture = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_CAPTURE);
|
device->has_exec_capture = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_CAPTURE);
|
||||||
device->has_exec_fence = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_FENCE);
|
device->has_exec_fence = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_FENCE);
|
||||||
device->has_syncobj = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_FENCE_ARRAY);
|
device->has_syncobj = true;
|
||||||
device->has_syncobj_wait = device->has_syncobj &&
|
device->has_syncobj_wait = anv_gem_supports_syncobj_wait(fd);
|
||||||
anv_gem_supports_syncobj_wait(fd);
|
|
||||||
device->has_syncobj_wait_available =
|
device->has_syncobj_wait_available =
|
||||||
anv_gem_get_drm_cap(fd, DRM_CAP_SYNCOBJ_TIMELINE) != 0;
|
anv_gem_get_drm_cap(fd, DRM_CAP_SYNCOBJ_TIMELINE) != 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue