diff options
author | Jammy Zhou | 2015-07-09 00:51:13 -0500 |
---|---|---|
committer | Alex Deucher | 2015-08-05 12:47:52 -0500 |
commit | f91b56dc8c604ec1c6f092d69550266d20dc9764 (patch) | |
tree | 6952e5b6e93f94a4dc8edb1889e532c229370c9b /amdgpu/amdgpu.h | |
parent | 12802da74f0e480bbde5a11df689329910893e87 (diff) | |
download | external-libdrm-f91b56dc8c604ec1c6f092d69550266d20dc9764.tar.gz external-libdrm-f91b56dc8c604ec1c6f092d69550266d20dc9764.tar.xz external-libdrm-f91b56dc8c604ec1c6f092d69550266d20dc9764.zip |
amdgpu: improve the amdgpu_cs_query_fence_status interface
make amdgpu_cs_query_fence reusable to support multi-fence query
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'amdgpu/amdgpu.h')
-rw-r--r-- | amdgpu/amdgpu.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h index a38e488e..027b549b 100644 --- a/amdgpu/amdgpu.h +++ b/amdgpu/amdgpu.h | |||
@@ -369,9 +369,6 @@ struct amdgpu_cs_query_fence { | |||
369 | /** In which context IB was sent to execution */ | 369 | /** In which context IB was sent to execution */ |
370 | amdgpu_context_handle context; | 370 | amdgpu_context_handle context; |
371 | 371 | ||
372 | /** Timeout in nanoseconds. */ | ||
373 | uint64_t timeout_ns; | ||
374 | |||
375 | /** To which HW IP type the fence belongs */ | 372 | /** To which HW IP type the fence belongs */ |
376 | unsigned ip_type; | 373 | unsigned ip_type; |
377 | 374 | ||
@@ -381,9 +378,6 @@ struct amdgpu_cs_query_fence { | |||
381 | /** Ring index of the HW IP */ | 378 | /** Ring index of the HW IP */ |
382 | uint32_t ring; | 379 | uint32_t ring; |
383 | 380 | ||
384 | /** Flags */ | ||
385 | uint64_t flags; | ||
386 | |||
387 | /** Specify fence for which we need to check submission status.*/ | 381 | /** Specify fence for which we need to check submission status.*/ |
388 | uint64_t fence; | 382 | uint64_t fence; |
389 | }; | 383 | }; |
@@ -908,8 +902,9 @@ int amdgpu_cs_submit(amdgpu_context_handle context, | |||
908 | /** | 902 | /** |
909 | * Query status of Command Buffer Submission | 903 | * Query status of Command Buffer Submission |
910 | * | 904 | * |
911 | * \param dev - \c [in] Device handle. See #amdgpu_device_initialize() | ||
912 | * \param fence - \c [in] Structure describing fence to query | 905 | * \param fence - \c [in] Structure describing fence to query |
906 | * \param timeout_ns - \c [in] Timeout value to wait | ||
907 | * \param flags - \c [in] Flags for the query | ||
913 | * \param expired - \c [out] If fence expired or not.\n | 908 | * \param expired - \c [out] If fence expired or not.\n |
914 | * 0 – if fence is not expired\n | 909 | * 0 – if fence is not expired\n |
915 | * !0 - otherwise | 910 | * !0 - otherwise |
@@ -925,6 +920,8 @@ int amdgpu_cs_submit(amdgpu_context_handle context, | |||
925 | * \sa amdgpu_cs_submit() | 920 | * \sa amdgpu_cs_submit() |
926 | */ | 921 | */ |
927 | int amdgpu_cs_query_fence_status(struct amdgpu_cs_query_fence *fence, | 922 | int amdgpu_cs_query_fence_status(struct amdgpu_cs_query_fence *fence, |
923 | uint64_t timeout_ns, | ||
924 | uint64_t flags, | ||
928 | uint32_t *expired); | 925 | uint32_t *expired); |
929 | 926 | ||
930 | /* | 927 | /* |