aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_object.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_object.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_object.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index df6a4dbd93f8..830f1a7b486f 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -104,7 +104,7 @@ void radeon_ttm_placement_from_domain(struct radeon_bo *rbo, u32 domain)
104 104
105int radeon_bo_create(struct radeon_device *rdev, 105int radeon_bo_create(struct radeon_device *rdev,
106 unsigned long size, int byte_align, bool kernel, u32 domain, 106 unsigned long size, int byte_align, bool kernel, u32 domain,
107 struct radeon_bo **bo_ptr) 107 struct sg_table *sg, struct radeon_bo **bo_ptr)
108{ 108{
109 struct radeon_bo *bo; 109 struct radeon_bo *bo;
110 enum ttm_bo_type type; 110 enum ttm_bo_type type;
@@ -120,6 +120,8 @@ int radeon_bo_create(struct radeon_device *rdev,
120 } 120 }
121 if (kernel) { 121 if (kernel) {
122 type = ttm_bo_type_kernel; 122 type = ttm_bo_type_kernel;
123 } else if (sg) {
124 type = ttm_bo_type_sg;
123 } else { 125 } else {
124 type = ttm_bo_type_device; 126 type = ttm_bo_type_device;
125 } 127 }
@@ -155,7 +157,7 @@ retry:
155 mutex_lock(&rdev->vram_mutex); 157 mutex_lock(&rdev->vram_mutex);
156 r = ttm_bo_init(&rdev->mman.bdev, &bo->tbo, size, type, 158 r = ttm_bo_init(&rdev->mman.bdev, &bo->tbo, size, type,
157 &bo->placement, page_align, 0, !kernel, NULL, 159 &bo->placement, page_align, 0, !kernel, NULL,
158 acc_size, &radeon_ttm_bo_destroy); 160 acc_size, sg, &radeon_ttm_bo_destroy);
159 mutex_unlock(&rdev->vram_mutex); 161 mutex_unlock(&rdev->vram_mutex);
160 if (unlikely(r != 0)) { 162 if (unlikely(r != 0)) {
161 if (r != -ERESTARTSYS) { 163 if (r != -ERESTARTSYS) {