From: Alex Deucher <[email protected]> Add an API to query whether a queue is broken because it is hung or VRAM has been lost. Report either condition through a single BROKEN flag.
Reviewed-by: Christian König <[email protected]> Reviewed-by: Sunil Khatri <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Prike Liang <[email protected]> --- include/uapi/drm/amdgpu_drm.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h index cd1b8034a2fb..71936418b0db 100644 --- a/include/uapi/drm/amdgpu_drm.h +++ b/include/uapi/drm/amdgpu_drm.h @@ -340,6 +340,7 @@ union drm_amdgpu_ctx { /* user queue IOCTL operations */ #define AMDGPU_USERQ_OP_CREATE 1 #define AMDGPU_USERQ_OP_FREE 2 +#define AMDGPU_USERQ_OP_QUERY_STATUS 3 /* queue priority levels */ /* low < normal low < normal high < high */ @@ -352,6 +353,9 @@ union drm_amdgpu_ctx { /* for queues that need access to protected content */ #define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_SECURE (1 << 2) +/* the queue is broken because it is hung or VRAM was lost */ +#define AMDGPU_USERQ_QUERY_STATUS_FLAGS_BROKEN (1 << 0) + /* * This structure is a container to pass input configuration * info for all supported userqueue related operations. @@ -433,9 +437,16 @@ struct drm_amdgpu_userq_out { __u32 _pad; }; +/* The structure to carry output of userqueue ops */ +struct drm_amdgpu_userq_out_query_state { + __u32 flags; + __u32 _pad; +}; + union drm_amdgpu_userq { struct drm_amdgpu_userq_in in; struct drm_amdgpu_userq_out out; + struct drm_amdgpu_userq_out_query_state out_qs; }; /* GFX V11 IP specific MQD parameters */ -- 2.34.1
