mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
drm/amdgpu: skip all jobs of guilty vm
If the vm is guilty of a GPU reset, skips all its jobs. Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
f1892138ab
commit
15d73ce6f9
@ -171,6 +171,7 @@ static struct dma_fence *amdgpu_job_run(struct amd_sched_job *sched_job)
|
||||
{
|
||||
struct dma_fence *fence = NULL;
|
||||
struct amdgpu_job *job;
|
||||
struct amdgpu_fpriv *fpriv = NULL;
|
||||
int r;
|
||||
|
||||
if (!sched_job) {
|
||||
@ -182,10 +183,16 @@ static struct dma_fence *amdgpu_job_run(struct amd_sched_job *sched_job)
|
||||
BUG_ON(amdgpu_sync_peek_fence(&job->sync, NULL));
|
||||
|
||||
trace_amdgpu_sched_run_job(job);
|
||||
if (job->vm)
|
||||
fpriv = container_of(job->vm, struct amdgpu_fpriv, vm);
|
||||
/* skip ib schedule when vram is lost */
|
||||
if (fpriv && amdgpu_kms_vram_lost(job->adev, fpriv))
|
||||
DRM_ERROR("Skip scheduling IBs!\n");
|
||||
else {
|
||||
r = amdgpu_ib_schedule(job->ring, job->num_ibs, job->ibs, job, &fence);
|
||||
if (r)
|
||||
DRM_ERROR("Error scheduling IBs (%d)\n", r);
|
||||
|
||||
}
|
||||
/* if gpu reset, hw fence will be replaced here */
|
||||
dma_fence_put(job->fence);
|
||||
job->fence = dma_fence_get(fence);
|
||||
|
Loading…
Reference in New Issue
Block a user