aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/msm_gpu.c
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2019-03-22 14:21:22 -0600
committerRob Clark <robdclark@chromium.org>2019-04-19 11:50:06 -0700
commitb0fb66043a0d471a5acfe743adf90a0c447aca6b (patch)
treec3edee628dd5affaa6103339e469054f523e3d87 /drivers/gpu/drm/msm/msm_gpu.c
parentdrm/msm: add param to retrieve # of GPU faults (global) (diff)
downloadlinux-dev-b0fb66043a0d471a5acfe743adf90a0c447aca6b.tar.xz
linux-dev-b0fb66043a0d471a5acfe743adf90a0c447aca6b.zip
drm/msm/gpu: Add submit queue queries
Add the capability to query information from a submit queue. The first available parameter is for querying the number of GPU faults (hangs) that can be attributed to the queue. This is useful for implementing context robustness. A user context can regularly query the number of faults to see if it is responsible for any and if so it can invalidate itself. This is also helpful for testing by confirming to the user driver if a particular command stream caused a fault (or not as the case may be). Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gpu.c')
-rw-r--r--drivers/gpu/drm/msm/msm_gpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index 194847a220b6..2b76657badd5 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -443,8 +443,9 @@ static void recover_worker(struct work_struct *work)
if (submit) {
struct task_struct *task;
- /* Increment the fault count */
+ /* Increment the fault counts */
gpu->global_faults++;
+ submit->queue->faults++;
task = get_pid_task(submit->pid, PIDTYPE_PID);
if (task) {