aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
diff options
context:
space:
mode:
authorMonk Liu <Monk.Liu@amd.com>2016-03-17 01:48:13 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-03-17 11:54:11 -0400
commit73cfa5f5cec3f4b99185d3535928dee6d01ba2f6 (patch)
tree98dc76f0278ae75f41b597610e70879076b2b3bd /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
parentcc55c45db5e2c97445d4663d45348a0fc27bf9ad (diff)
drm/amdgpu: move ib.fence to job.fence
Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index 345cac9948be..8443cea6821a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -92,7 +92,6 @@ int amdgpu_ib_get(struct amdgpu_device *adev, struct amdgpu_vm *vm,
92void amdgpu_ib_free(struct amdgpu_device *adev, struct amdgpu_ib *ib, struct fence *f) 92void amdgpu_ib_free(struct amdgpu_device *adev, struct amdgpu_ib *ib, struct fence *f)
93{ 93{
94 amdgpu_sa_bo_free(adev, &ib->sa_bo, f); 94 amdgpu_sa_bo_free(adev, &ib->sa_bo, f);
95 fence_put(ib->fence);
96} 95}
97 96
98/** 97/**
@@ -124,6 +123,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
124 struct amdgpu_ib *ib = &ibs[0]; 123 struct amdgpu_ib *ib = &ibs[0];
125 struct amdgpu_ctx *ctx, *old_ctx; 124 struct amdgpu_ctx *ctx, *old_ctx;
126 struct amdgpu_vm *vm; 125 struct amdgpu_vm *vm;
126 struct fence *hwf;
127 unsigned i; 127 unsigned i;
128 int r = 0; 128 int r = 0;
129 129
@@ -180,7 +180,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
180 amdgpu_ring_emit_hdp_invalidate(ring); 180 amdgpu_ring_emit_hdp_invalidate(ring);
181 } 181 }
182 182
183 r = amdgpu_fence_emit(ring, &ib->fence); 183 r = amdgpu_fence_emit(ring, &hwf);
184 if (r) { 184 if (r) {
185 dev_err(adev->dev, "failed to emit fence (%d)\n", r); 185 dev_err(adev->dev, "failed to emit fence (%d)\n", r);
186 ring->current_ctx = old_ctx; 186 ring->current_ctx = old_ctx;
@@ -199,7 +199,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
199 } 199 }
200 200
201 if (f) 201 if (f)
202 *f = fence_get(ib->fence); 202 *f = fence_get(hwf);
203 203
204 amdgpu_ring_commit(ring); 204 amdgpu_ring_commit(ring);
205 return 0; 205 return 0;