Commit 4876b391 authored by Antonino Maniscalco's avatar Antonino Maniscalco Committed by Rob Clark
Browse files

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: 6a4d287a ("drm/msm: Mark VM as unusable on GPU hangs")
Signed-off-by: default avatarAntonino Maniscalco <antomani103@gmail.com>
Reviewed-by: default avatarAkhil P Oommen <akhilpo@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/668314/


Signed-off-by: default avatarRob Clark <robin.clark@oss.qualcomm.com>
parent 1ba9fbe4
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -558,8 +558,15 @@ static void recover_worker(struct kthread_work *work)
			unsigned long flags;

			spin_lock_irqsave(&ring->submit_lock, flags);
			list_for_each_entry(submit, &ring->submits, node)
			list_for_each_entry(submit, &ring->submits, node) {
				/*
				 * If the submit uses an unusable vm make sure
				 * we don't actually run it
				 */
				if (to_msm_vm(submit->vm)->unusable)
					submit->nr_cmds = 0;
				gpu->funcs->submit(gpu, submit);
			}
			spin_unlock_irqrestore(&ring->submit_lock, flags);
		}
	}