Commit e84e697d authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: abort submissions during prepare on error

Forward errors from previous submissions to this one.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 89fae8dc
......@@ -258,16 +258,27 @@ amdgpu_job_prepare_job(struct drm_sched_job *sched_job,
struct dma_fence *fence = NULL;
int r;
/* Ignore soft recovered fences here */
r = drm_sched_entity_error(s_entity);
if (r && r != -ENODATA)
goto error;
if (!fence && job->gang_submit)
fence = amdgpu_device_switch_gang(ring->adev, job->gang_submit);
while (!fence && job->vm && !job->vmid) {
r = amdgpu_vmid_grab(job->vm, ring, job, &fence);
if (r)
if (r) {
DRM_ERROR("Error getting VM ID (%d)\n", r);
goto error;
}
}
return fence;
error:
dma_fence_set_error(&job->base.s_fence->finished, r);
return NULL;
}
static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job)
......
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