diff options
author | Christian König <christian.koenig@amd.com> | 2016-05-06 16:14:00 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-05-11 13:30:32 -0400 |
commit | 758ac17f963f3497aae4e767d3a9eb68fea71f71 (patch) | |
tree | e2007d7fa5077f91d7b6b5a05437fc0c1faef41d /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |
parent | d88bf583bd06eecb31f82871c90ef6a5a09b5766 (diff) |
drm/amdgpu: fix and cleanup user fence handling v2
We leaked the BO in the error pass, additional to that we only have
one user fence for all IBs in a job.
v2: remove white space changes
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_ib.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 201aceb01d8a..34e35423b78e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |||
@@ -203,10 +203,11 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, | |||
203 | } | 203 | } |
204 | 204 | ||
205 | /* wrap the last IB with fence */ | 205 | /* wrap the last IB with fence */ |
206 | if (ib->user) { | 206 | if (job && job->uf_bo) { |
207 | uint64_t addr = amdgpu_bo_gpu_offset(ib->user->bo); | 207 | uint64_t addr = amdgpu_bo_gpu_offset(job->uf_bo); |
208 | addr += ib->user->offset; | 208 | |
209 | amdgpu_ring_emit_fence(ring, addr, ib->sequence, | 209 | addr += job->uf_offset; |
210 | amdgpu_ring_emit_fence(ring, addr, job->uf_sequence, | ||
210 | AMDGPU_FENCE_FLAG_64BIT); | 211 | AMDGPU_FENCE_FLAG_64BIT); |
211 | } | 212 | } |
212 | 213 | ||