freedreno/drm: Add support to query device suspend count
Signed-off-by: Rob Clark <robdclark@chromium.org> Acked-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>
This commit is contained in:
@@ -76,6 +76,7 @@ struct drm_msm_timespec {
|
||||
#define MSM_PARAM_NR_RINGS 0x07
|
||||
#define MSM_PARAM_PP_PGTABLE 0x08 /* => 1 for per-process pagetables, else 0 */
|
||||
#define MSM_PARAM_FAULTS 0x09
|
||||
#define MSM_PARAM_SUSPENDS 0x0a
|
||||
|
||||
struct drm_msm_param {
|
||||
__u32 pipe; /* in, MSM_PIPE_x */
|
||||
|
@@ -61,6 +61,7 @@ enum fd_param_id {
|
||||
FD_PP_PGTABLE, /* are per-process pagetables used for the pipe/ctx */
|
||||
FD_CTX_FAULTS, /* # of per context faults */
|
||||
FD_GLOBAL_FAULTS, /* # of global (all context) faults */
|
||||
FD_SUSPEND_COUNT, /* # of times the GPU has suspended, and potentially lost state */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -99,6 +99,8 @@ msm_pipe_get_param(struct fd_pipe *pipe, enum fd_param_id param,
|
||||
return query_queue_param(pipe, MSM_SUBMITQUEUE_PARAM_FAULTS, value);
|
||||
case FD_GLOBAL_FAULTS:
|
||||
return query_param(pipe, MSM_PARAM_FAULTS, value);
|
||||
case FD_SUSPEND_COUNT:
|
||||
return query_param(pipe, MSM_PARAM_SUSPENDS, value);
|
||||
default:
|
||||
ERROR_MSG("invalid param id: %d", param);
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user