Commit e8074f75 authored by Andrey Grodzovsky's avatar Andrey Grodzovsky Committed by Eric Anholt

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: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1552409822-17230-1-git-send-email-andrey.grodzovsky@amd.comAcked-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Fixes: 222b5f04 ("drm/sched: Refactor ring mirror list handling.")
parent a83e47e4
...@@ -231,20 +231,17 @@ v3d_gpu_reset_for_timeout(struct v3d_dev *v3d, struct drm_sched_job *sched_job) ...@@ -231,20 +231,17 @@ v3d_gpu_reset_for_timeout(struct v3d_dev *v3d, struct drm_sched_job *sched_job)
mutex_lock(&v3d->reset_lock); mutex_lock(&v3d->reset_lock);
/* block scheduler */ /* block scheduler */
for (q = 0; q < V3D_MAX_QUEUES; q++) { for (q = 0; q < V3D_MAX_QUEUES; q++)
struct drm_gpu_scheduler *sched = &v3d->queue[q].sched; drm_sched_stop(&v3d->queue[q].sched);
drm_sched_stop(sched);
if(sched_job) if (sched_job)
drm_sched_increase_karma(sched_job); drm_sched_increase_karma(sched_job);
}
/* get the GPU back into the init state */ /* get the GPU back into the init state */
v3d_reset(v3d); v3d_reset(v3d);
for (q = 0; q < V3D_MAX_QUEUES; q++) 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. */ /* Unblock schedulers and restart their jobs. */
for (q = 0; q < V3D_MAX_QUEUES; q++) { for (q = 0; q < V3D_MAX_QUEUES; q++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment