summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_object.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2022-02-18 14:32:53 +0100
committerChristian König <christian.koenig@amd.com>2022-07-11 10:53:13 +0200
commit347987a2cf0d146484d1c586951ef10028bb1674 (patch)
tree7761393b1b06fc5f80e2836369c85abdcef680cb /drivers/gpu/drm/radeon/radeon_object.c
parent20529e260ff2fb4a00b54a1e625ebebe5d1a6210 (diff)
downloadlinux-stable-347987a2cf0d146484d1c586951ef10028bb1674.tar.gz
linux-stable-347987a2cf0d146484d1c586951ef10028bb1674.tar.bz2
linux-stable-347987a2cf0d146484d1c586951ef10028bb1674.zip
drm/ttm: rename and cleanup ttm_bo_init
Rename ttm_bo_init to ttm_bo_init_validate since that better matches what the function is actually doing. Remove the unused size parameter, move the function's kerneldoc to the implementation and cleanup the whole error handling. Signed-off-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220707102453.3633-2-christian.koenig@amd.com Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_object.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_object.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index 6c4a6802ca96..00c33b24d5d3 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -202,9 +202,9 @@ int radeon_bo_create(struct radeon_device *rdev,
radeon_ttm_placement_from_domain(bo, domain);
/* Kernel allocation are uninterruptible */
down_read(&rdev->pm.mclk_lock);
- r = ttm_bo_init(&rdev->mman.bdev, &bo->tbo, size, type,
- &bo->placement, page_align, !kernel, sg, resv,
- &radeon_ttm_bo_destroy);
+ r = ttm_bo_init_validate(&rdev->mman.bdev, &bo->tbo, type,
+ &bo->placement, page_align, !kernel, sg, resv,
+ &radeon_ttm_bo_destroy);
up_read(&rdev->pm.mclk_lock);
if (unlikely(r != 0)) {
return r;