aboutsummaryrefslogtreecommitdiffstats
path: root/amdgpu
diff options
context:
space:
mode:
authorDavid Mao2017-11-27 21:22:26 -0600
committerAlex Deucher2017-11-29 21:05:25 -0600
commit1749d56ea00f350a74f662bdad82bcafa19889da (patch)
treeb793ece13dc36ca90cb0bf16d1af8a17036c7aa1 /amdgpu
parentaeab24aa9e074043965cf911f60a3736c4f6455d (diff)
downloadexternal-libdrm-1749d56ea00f350a74f662bdad82bcafa19889da.tar.gz
external-libdrm-1749d56ea00f350a74f662bdad82bcafa19889da.tar.xz
external-libdrm-1749d56ea00f350a74f662bdad82bcafa19889da.zip
amdgpu: Adding amdgpu_cs_create_syncobj2 to create syncobj as signaled initially
Signed-off-by: David Mao <david.mao@amd.com> Reviewed-by: Christian K├Ânig <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'amdgpu')
-rw-r--r--amdgpu/amdgpu.h15
-rw-r--r--amdgpu/amdgpu_cs.c10
2 files changed, 25 insertions, 0 deletions
diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
index df85a24c..c95cb03c 100644
--- a/amdgpu/amdgpu.h
+++ b/amdgpu/amdgpu.h
@@ -1344,6 +1344,21 @@ const char *amdgpu_get_marketing_name(amdgpu_device_handle dev);
1344/** 1344/**
1345 * Create kernel sync object 1345 * Create kernel sync object
1346 * 1346 *
1347 * \param dev - \c [in] device handle
1348 * \param flags - \c [in] flags that affect creation
1349 * \param syncobj - \c [out] sync object handle
1350 *
1351 * \return 0 on success\n
1352 * <0 - Negative POSIX Error code
1353 *
1354*/
1355int amdgpu_cs_create_syncobj2(amdgpu_device_handle dev,
1356 uint32_t flags,
1357 uint32_t *syncobj);
1358
1359/**
1360 * Create kernel sync object
1361 *
1347 * \param dev - \c [in] device handle 1362 * \param dev - \c [in] device handle
1348 * \param syncobj - \c [out] sync object handle 1363 * \param syncobj - \c [out] sync object handle
1349 * 1364 *
diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c
index b9fc01e7..9e157a84 100644
--- a/amdgpu/amdgpu_cs.c
+++ b/amdgpu/amdgpu_cs.c
@@ -606,6 +606,16 @@ int amdgpu_cs_destroy_semaphore(amdgpu_semaphore_handle sem)
606 return amdgpu_cs_unreference_sem(sem); 606 return amdgpu_cs_unreference_sem(sem);
607} 607}
608 608
609int amdgpu_cs_create_syncobj2(amdgpu_device_handle dev,
610 uint32_t flags,
611 uint32_t *handle)
612{
613 if (NULL == dev)
614 return -EINVAL;
615
616 return drmSyncobjCreate(dev->fd, flags, handle);
617}
618
609int amdgpu_cs_create_syncobj(amdgpu_device_handle dev, 619int amdgpu_cs_create_syncobj(amdgpu_device_handle dev,
610 uint32_t *handle) 620 uint32_t *handle)
611{ 621{