summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorChunming Zhou <david1.zhou@amd.com>2015-08-12 12:58:31 +0800
committerAlex Deucher <alexander.deucher@amd.com>2015-08-17 16:51:17 -0400
commit281b42230175608dec0cd8dab9908250e7aa36a9 (patch)
tree67266406331dc1f0aef6534a197c3ff6402919c1 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parent1ffd265243803ac5de9927dfc32541f41da2acf3 (diff)
drm/amdgpu: add reference for **fence
fix fence is released when pass to **fence sometimes. add reference for it. Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index b3f5d0484980..de882b0db350 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -366,6 +366,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
&fence);
if (!r)
amdgpu_bo_fence(bo, fence, true);
+ fence_put(fence);
if (amdgpu_enable_scheduler) {
amdgpu_bo_unreserve(bo);
return 0;
@@ -495,6 +496,7 @@ int amdgpu_vm_update_page_directory(struct amdgpu_device *adev,
if (r)
goto error_free;
amdgpu_bo_fence(pd, fence, true);
+ fence_put(fence);
}
if (!amdgpu_enable_scheduler || ib->length_dw == 0) {
@@ -812,6 +814,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
fence_put(*fence);
*fence = fence_get(f);
}
+ fence_put(f);
if (!amdgpu_enable_scheduler) {
amdgpu_ib_free(adev, ib);
kfree(ib);