amd/common: Add detection of the syncobj wait/signal/reset ioctls.

First amdgpu bump after inclusion was 20 (which was done for local BOs).

Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Bas Nieuwenhuizen 2017-11-27 01:06:11 +01:00
parent 1c3cda7d27
commit b308bb8773
2 changed files with 2 additions and 0 deletions

View File

@ -277,6 +277,7 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
vce.available_rings ? vce_version : 0;
info->has_userptr = true;
info->has_syncobj = has_syncobj(fd);
info->has_syncobj_wait = info->has_syncobj && info->drm_minor >= 20;
info->has_sync_file = info->has_syncobj && info->drm_minor >= 21;
info->has_ctx_priority = info->drm_minor >= 22;
info->num_render_backends = amdinfo->rb_pipes;

View File

@ -81,6 +81,7 @@ struct radeon_info {
uint32_t drm_patchlevel;
bool has_userptr;
bool has_syncobj;
bool has_syncobj_wait;
bool has_sync_file;
bool has_ctx_priority;