diff options
author | Andrey Grodzovsky <andrey.grodzovsky@amd.com> | 2019-03-12 12:57:02 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2019-03-14 09:22:58 -0700 |
commit | e8074f75f4449b9f9315f3a81d5d72425fba0a8c (patch) | |
tree | b4bc259767bda7c2b4db806db16c9de90846c2d5 /drivers/gpu/drm/v3d/v3d_sched.c | |
parent | a83e47e421ec5c4c5d6cae099cd54e3ce5b2bd06 (diff) | |
download | linux-stable-e8074f75f4449b9f9315f3a81d5d72425fba0a8c.tar.gz linux-stable-e8074f75f4449b9f9315f3a81d5d72425fba0a8c.tar.bz2 linux-stable-e8074f75f4449b9f9315f3a81d5d72425fba0a8c.zip |
drm/v3d: Fix calling drm_sched_resubmit_jobs for same sched.
Also stop calling drm_sched_increase_karma multiple times.
v2: Fix whitespace in the code we're moving (by anholt)
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1552409822-17230-1-git-send-email-andrey.grodzovsky@amd.com
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Fixes: 222b5f044159 ("drm/sched: Refactor ring mirror list handling.")
Diffstat (limited to 'drivers/gpu/drm/v3d/v3d_sched.c')
-rw-r--r-- | drivers/gpu/drm/v3d/v3d_sched.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/drivers/gpu/drm/v3d/v3d_sched.c index 4704b2df3688..d0c68b7c8b41 100644 --- a/drivers/gpu/drm/v3d/v3d_sched.c +++ b/drivers/gpu/drm/v3d/v3d_sched.c @@ -231,20 +231,17 @@ v3d_gpu_reset_for_timeout(struct v3d_dev *v3d, struct drm_sched_job *sched_job) mutex_lock(&v3d->reset_lock); /* block scheduler */ - for (q = 0; q < V3D_MAX_QUEUES; q++) { - struct drm_gpu_scheduler *sched = &v3d->queue[q].sched; - - drm_sched_stop(sched); + for (q = 0; q < V3D_MAX_QUEUES; q++) + drm_sched_stop(&v3d->queue[q].sched); - if(sched_job) - drm_sched_increase_karma(sched_job); - } + if (sched_job) + drm_sched_increase_karma(sched_job); /* get the GPU back into the init state */ v3d_reset(v3d); for (q = 0; q < V3D_MAX_QUEUES; q++) - drm_sched_resubmit_jobs(sched_job->sched); + drm_sched_resubmit_jobs(&v3d->queue[q].sched); /* Unblock schedulers and restart their jobs. */ for (q = 0; q < V3D_MAX_QUEUES; q++) { |