diff options
author | Christian König <christian.koenig@amd.com> | 2016-07-05 08:48:17 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-14 16:46:05 -0400 |
commit | 22a77cf6d87e0cfadf91bf7d09bae71359bc85f6 (patch) | |
tree | 99f3d92e688847a8d17c47996709ed43d11e4b00 /drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | |
parent | 0808663517dd7e1583c1a8e48f0acfb2c0a127cd (diff) |
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_vce.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c index 718f22712335..aeeeb72ebbc4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | |||
@@ -432,7 +432,7 @@ int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle, | |||
432 | ib->ptr[i] = 0x0; | 432 | ib->ptr[i] = 0x0; |
433 | 433 | ||
434 | r = amdgpu_ib_schedule(ring, 1, ib, NULL, NULL, &f); | 434 | r = amdgpu_ib_schedule(ring, 1, ib, NULL, NULL, &f); |
435 | job->fence = f; | 435 | job->fence = fence_get(f); |
436 | if (r) | 436 | if (r) |
437 | goto err; | 437 | goto err; |
438 | 438 | ||
@@ -494,7 +494,7 @@ int amdgpu_vce_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle, | |||
494 | 494 | ||
495 | if (direct) { | 495 | if (direct) { |
496 | r = amdgpu_ib_schedule(ring, 1, ib, NULL, NULL, &f); | 496 | r = amdgpu_ib_schedule(ring, 1, ib, NULL, NULL, &f); |
497 | job->fence = f; | 497 | job->fence = fence_get(f); |
498 | if (r) | 498 | if (r) |
499 | goto err; | 499 | goto err; |
500 | 500 | ||