Skip to content

Commit 4876b39

Browse files
pac85Rob Clark
authored andcommitted
drm/msm: skip re-emitting IBs for unusable VMs
When a VM is marked as an usuable we disallow new submissions from it, however submissions that where already scheduled on the ring would still be re-sent. Since this can lead to further hangs, avoid emitting the actual IBs. Fixes: 6a4d287 ("drm/msm: Mark VM as unusable on GPU hangs") Signed-off-by: Antonino Maniscalco <antomani103@gmail.com> Reviewed-by: Akhil P Oommen <akhilpo@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/668314/ Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
1 parent 1ba9fbe commit 4876b39

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

drivers/gpu/drm/msm/msm_gpu.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,15 @@ static void recover_worker(struct kthread_work *work)
558558
unsigned long flags;
559559

560560
spin_lock_irqsave(&ring->submit_lock, flags);
561-
list_for_each_entry(submit, &ring->submits, node)
561+
list_for_each_entry(submit, &ring->submits, node) {
562+
/*
563+
* If the submit uses an unusable vm make sure
564+
* we don't actually run it
565+
*/
566+
if (to_msm_vm(submit->vm)->unusable)
567+
submit->nr_cmds = 0;
562568
gpu->funcs->submit(gpu, submit);
569+
}
563570
spin_unlock_irqrestore(&ring->submit_lock, flags);
564571
}
565572
}

0 commit comments

Comments
 (0)