diff options
author | Marek Olšák <marek.olsak@amd.com> | 2015-05-05 21:23:02 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-05 13:47:49 -0400 |
commit | 4b39a8e7cfff20a9cf8512541b9fc764b42da974 (patch) | |
tree | 03dfa7572f8e2a441f6b8f27deecf84005d95485 /amdgpu/amdgpu.h | |
parent | d3e7195066c37e242b16ec67c732eeee1f693ab0 (diff) |
amdgpu: implement amdgpu_cs_query_reset_state
v2: also return the number of hangs
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'amdgpu/amdgpu.h')
-rw-r--r-- | amdgpu/amdgpu.h | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h index 0997bd73..c48af922 100644 --- a/amdgpu/amdgpu.h +++ b/amdgpu/amdgpu.h @@ -98,26 +98,6 @@ enum amdgpu_bo_handle_type { }; /** - * Enum describing possible context reset states - * - * \sa amdgpu_cs_query_reset_state() - * -*/ -enum amdgpu_cs_ctx_reset_state { - /** No reset was detected */ - amdgpu_cs_reset_no_error = 0, - - /** Reset/TDR was detected and context caused */ - amdgpu_cs_reset_guilty = 1, - - /** Reset/TDR was detected caused by other context */ - amdgpu_cs_reset_innocent = 2, - - /** Reset TDR was detected by cause of it unknown */ - amdgpu_cs_reset_unknown = 3 -}; - -/** * For performance reasons and to simplify logic libdrm_amdgpu will handle * IBs only some pre-defined sizes. * @@ -920,7 +900,8 @@ int amdgpu_cs_ctx_free(amdgpu_context_handle context); * Query reset state for the specific GPU Context * * \param context - \c [in] GPU Context handle - * \param state - \c [out] Reset state status + * \param state - \c [out] One of AMDGPU_CTX_*_RESET + * \param hangs - \c [out] Number of hangs caused by the context. * * \return 0 on success\n * >0 - AMD specific error code\n @@ -930,7 +911,7 @@ int amdgpu_cs_ctx_free(amdgpu_context_handle context); * */ int amdgpu_cs_query_reset_state(amdgpu_context_handle context, - enum amdgpu_cs_ctx_reset_state *state); + uint32_t *state, uint32_t *hangs); /* |