diff options
author | Christian König <christian.koenig@amd.com> | 2014-11-19 08:01:20 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-11-20 13:00:15 -0500 |
commit | 85761f605a21ef7f3feda9d272565f97ecf1aa56 (patch) | |
tree | 30e6081a8673840eccc2d8ad628385fbed20f555 | |
parent | faffaf620f32c6e907d06570f8f75845ecb1349f (diff) |
drm/radeon: stop re-reserving the BO in radeon_vm_bo_set_addr
That's useless when all callers drop the reservation
immediately after calling the function.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_gem.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_vm.c | 4 |
3 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index c194497aa586..f752c7f56015 100644 --- a/drivers/gpu/drm/radeon/radeon_gem.c +++ b/drivers/gpu/drm/radeon/radeon_gem.c | |||
@@ -601,6 +601,7 @@ int radeon_gem_va_ioctl(struct drm_device *dev, void *data, | |||
601 | if (bo_va->it.start) { | 601 | if (bo_va->it.start) { |
602 | args->operation = RADEON_VA_RESULT_VA_EXIST; | 602 | args->operation = RADEON_VA_RESULT_VA_EXIST; |
603 | args->offset = bo_va->it.start * RADEON_GPU_PAGE_SIZE; | 603 | args->offset = bo_va->it.start * RADEON_GPU_PAGE_SIZE; |
604 | radeon_bo_unreserve(rbo); | ||
604 | goto out; | 605 | goto out; |
605 | } | 606 | } |
606 | r = radeon_vm_bo_set_addr(rdev, bo_va, args->offset, args->flags); | 607 | r = radeon_vm_bo_set_addr(rdev, bo_va, args->offset, args->flags); |
@@ -616,7 +617,6 @@ int radeon_gem_va_ioctl(struct drm_device *dev, void *data, | |||
616 | args->operation = RADEON_VA_RESULT_ERROR; | 617 | args->operation = RADEON_VA_RESULT_ERROR; |
617 | } | 618 | } |
618 | out: | 619 | out: |
619 | radeon_bo_unreserve(rbo); | ||
620 | drm_gem_object_unreference_unlocked(gobj); | 620 | drm_gem_object_unreference_unlocked(gobj); |
621 | return r; | 621 | return r; |
622 | } | 622 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 6eb561d33eba..f4dd26ae33e5 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c | |||
@@ -628,8 +628,6 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) | |||
628 | RADEON_VA_IB_OFFSET, | 628 | RADEON_VA_IB_OFFSET, |
629 | RADEON_VM_PAGE_READABLE | | 629 | RADEON_VM_PAGE_READABLE | |
630 | RADEON_VM_PAGE_SNOOPED); | 630 | RADEON_VM_PAGE_SNOOPED); |
631 | |||
632 | radeon_bo_unreserve(rdev->ring_tmp_bo.bo); | ||
633 | if (r) { | 631 | if (r) { |
634 | radeon_vm_fini(rdev, vm); | 632 | radeon_vm_fini(rdev, vm); |
635 | kfree(fpriv); | 633 | kfree(fpriv); |
diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c index 9d0f87be6fa0..db0ed3af8e82 100644 --- a/drivers/gpu/drm/radeon/radeon_vm.c +++ b/drivers/gpu/drm/radeon/radeon_vm.c | |||
@@ -450,7 +450,7 @@ error: | |||
450 | * Validate and set the offset requested within the vm address space. | 450 | * Validate and set the offset requested within the vm address space. |
451 | * Returns 0 for success, error for failure. | 451 | * Returns 0 for success, error for failure. |
452 | * | 452 | * |
453 | * Object has to be reserved! | 453 | * Object has to be reserved and gets unreserved by this function! |
454 | */ | 454 | */ |
455 | int radeon_vm_bo_set_addr(struct radeon_device *rdev, | 455 | int radeon_vm_bo_set_addr(struct radeon_device *rdev, |
456 | struct radeon_bo_va *bo_va, | 456 | struct radeon_bo_va *bo_va, |
@@ -576,7 +576,7 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev, | |||
576 | } | 576 | } |
577 | 577 | ||
578 | mutex_unlock(&vm->mutex); | 578 | mutex_unlock(&vm->mutex); |
579 | return radeon_bo_reserve(bo_va->bo, false); | 579 | return 0; |
580 | } | 580 | } |
581 | 581 | ||
582 | /** | 582 | /** |