aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák2015-05-05 14:23:02 -0500
committerAlex Deucher2015-08-05 12:47:49 -0500
commit4b39a8e7cfff20a9cf8512541b9fc764b42da974 (patch)
tree03dfa7572f8e2a441f6b8f27deecf84005d95485 /include
parentd3e7195066c37e242b16ec67c732eeee1f693ab0 (diff)
downloadexternal-libgbm-4b39a8e7cfff20a9cf8512541b9fc764b42da974.tar.gz
external-libgbm-4b39a8e7cfff20a9cf8512541b9fc764b42da974.tar.xz
external-libgbm-4b39a8e7cfff20a9cf8512541b9fc764b42da974.zip
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 'include')
-rw-r--r--include/drm/amdgpu_drm.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h
index f61ec0cc..81b495ed 100644
--- a/include/drm/amdgpu_drm.h
+++ b/include/drm/amdgpu_drm.h
@@ -149,6 +149,12 @@ union drm_amdgpu_bo_list {
149 149
150#define AMDGPU_CTX_OP_STATE_RUNNING 1 150#define AMDGPU_CTX_OP_STATE_RUNNING 1
151 151
152/* GPU reset status */
153#define AMDGPU_CTX_NO_RESET 0
154#define AMDGPU_CTX_GUILTY_RESET 1 /* this the context caused it */
155#define AMDGPU_CTX_INNOCENT_RESET 2 /* some other context caused it */
156#define AMDGPU_CTX_UNKNOWN_RESET 3 /* unknown cause */
157
152struct drm_amdgpu_ctx_in { 158struct drm_amdgpu_ctx_in {
153 uint32_t op; 159 uint32_t op;
154 uint32_t flags; 160 uint32_t flags;
@@ -164,7 +170,10 @@ union drm_amdgpu_ctx_out {
164 170
165 struct { 171 struct {
166 uint64_t flags; 172 uint64_t flags;
167 uint64_t hangs; 173 /** Number of resets caused by this context so far. */
174 uint32_t hangs;
175 /** Reset status since the last call of the ioctl. */
176 uint32_t reset_status;
168 } state; 177 } state;
169}; 178};
170 179