diff options
| author | 2016-07-05 14:48:17 +0200 | |
|---|---|---|
| committer | 2016-07-14 16:46:05 -0400 | |
| commit | 22a77cf6d87e0cfadf91bf7d09bae71359bc85f6 (patch) | |
| tree | 99f3d92e688847a8d17c47996709ed43d11e4b00 /drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | |
| parent | drm/amdgpu: cleanup UVD coding style (diff) | |
| download | linux-dev-22a77cf6d87e0cfadf91bf7d09bae71359bc85f6.tar.xz linux-dev-22a77cf6d87e0cfadf91bf7d09bae71359bc85f6.zip | |
drm/amdgpu: cleanup hw reference handling in the IB tests
Reference should be taken when we make the assignment, not anywhere else.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_job.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c index aaee0c8f6731..6674d40eb3ab 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c @@ -172,15 +172,13 @@ static struct fence *amdgpu_job_run(struct amd_sched_job *sched_job) trace_amdgpu_sched_run_job(job); r = amdgpu_ib_schedule(job->ring, job->num_ibs, job->ibs, job->sync.last_vm_update, job, &fence); - if (r) { + if (r) DRM_ERROR("Error scheduling IBs (%d)\n", r); - goto err; - } -err: /* if gpu reset, hw fence will be replaced here */ fence_put(job->fence); - job->fence = fence; + job->fence = fence_get(fence); + amdgpu_job_free_resources(job); return fence; } |
