summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/adreno/adreno_gpu.c
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2019-04-17 01:13:28 +0200
committerRob Clark <robdclark@chromium.org>2019-04-19 20:50:00 +0200
commit48dc4241c9cd62bfbe33625e669e21d7081d35fa (patch)
treee6406acd799be59e50bc0b37af6fe5f18718ab23 /drivers/gpu/drm/msm/adreno/adreno_gpu.c
parentdrm/msm/gpu: add per-process pagetables param (diff)
downloadlinux-48dc4241c9cd62bfbe33625e669e21d7081d35fa.tar.xz
linux-48dc4241c9cd62bfbe33625e669e21d7081d35fa.zip
drm/msm: add param to retrieve # of GPU faults (global)
For KHR_robustness, userspace wants to know two things, the count of GPU faults globally, and the count of faults attributed to a given context. This patch providees the former, and the next patch provides the latter. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Diffstat (limited to 'drivers/gpu/drm/msm/adreno/adreno_gpu.c')
-rw-r--r--drivers/gpu/drm/msm/adreno/adreno_gpu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 7727917806ce..6de08cfc38aa 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -66,6 +66,9 @@ int adreno_get_param(struct msm_gpu *gpu, uint32_t param, uint64_t *value)
case MSM_PARAM_PP_PGTABLE:
*value = 0;
return 0;
+ case MSM_PARAM_FAULTS:
+ *value = gpu->global_faults;
+ return 0;
default:
DBG("%s: invalid param: %u", gpu->name, param);
return -EINVAL;