mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-22 14:55:02 +07:00
drm/amdgpu: If amdgpu_ib_schedule fails return back the error.
Use ERR_PTR to return back the error happened during amdgpu_ib_schedule. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@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
167bf96014
commit
57c0f58e9f
@ -218,7 +218,7 @@ static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job)
|
|||||||
struct amdgpu_ring *ring = to_amdgpu_ring(sched_job->sched);
|
struct amdgpu_ring *ring = to_amdgpu_ring(sched_job->sched);
|
||||||
struct dma_fence *fence = NULL, *finished;
|
struct dma_fence *fence = NULL, *finished;
|
||||||
struct amdgpu_job *job;
|
struct amdgpu_job *job;
|
||||||
int r;
|
int r = 0;
|
||||||
|
|
||||||
job = to_amdgpu_job(sched_job);
|
job = to_amdgpu_job(sched_job);
|
||||||
finished = &job->base.s_fence->finished;
|
finished = &job->base.s_fence->finished;
|
||||||
@ -243,6 +243,8 @@ static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job)
|
|||||||
job->fence = dma_fence_get(fence);
|
job->fence = dma_fence_get(fence);
|
||||||
|
|
||||||
amdgpu_job_free_resources(job);
|
amdgpu_job_free_resources(job);
|
||||||
|
|
||||||
|
fence = r ? ERR_PTR(r) : fence;
|
||||||
return fence;
|
return fence;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user