diff options
author | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2014-09-18 08:11:56 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-10-03 09:19:17 -0400 |
commit | 831b6966a60fe72d85ae3576056b4e4e0775b112 (patch) | |
tree | 7c7600d7c26b68e45726019e9c082e5f80e5f7e6 /drivers | |
parent | 392a250bd080e296f97ccc7e91b051a6b5da0ff1 (diff) |
drm/radeon: export reservation_object from dmabuf to ttm
Adds an extra argument to radeon_bo_create, which is only used in radeon_prime.c.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/cik.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_benchmark.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_gart.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_gem.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_object.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_object.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_prime.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ring.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_sa.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_test.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ttm.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_uvd.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_vce.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_vm.c | 5 |
17 files changed, 35 insertions, 25 deletions
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index fc49a8d0fe00..d48a539b038a 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c | |||
@@ -4687,7 +4687,7 @@ static int cik_mec_init(struct radeon_device *rdev) | |||
4687 | r = radeon_bo_create(rdev, | 4687 | r = radeon_bo_create(rdev, |
4688 | rdev->mec.num_mec *rdev->mec.num_pipe * MEC_HPD_SIZE * 2, | 4688 | rdev->mec.num_mec *rdev->mec.num_pipe * MEC_HPD_SIZE * 2, |
4689 | PAGE_SIZE, true, | 4689 | PAGE_SIZE, true, |
4690 | RADEON_GEM_DOMAIN_GTT, 0, NULL, | 4690 | RADEON_GEM_DOMAIN_GTT, 0, NULL, NULL, |
4691 | &rdev->mec.hpd_eop_obj); | 4691 | &rdev->mec.hpd_eop_obj); |
4692 | if (r) { | 4692 | if (r) { |
4693 | dev_warn(rdev->dev, "(%d) create HDP EOP bo failed\n", r); | 4693 | dev_warn(rdev->dev, "(%d) create HDP EOP bo failed\n", r); |
@@ -4858,7 +4858,7 @@ static int cik_cp_compute_resume(struct radeon_device *rdev) | |||
4858 | sizeof(struct bonaire_mqd), | 4858 | sizeof(struct bonaire_mqd), |
4859 | PAGE_SIZE, true, | 4859 | PAGE_SIZE, true, |
4860 | RADEON_GEM_DOMAIN_GTT, 0, NULL, | 4860 | RADEON_GEM_DOMAIN_GTT, 0, NULL, |
4861 | &rdev->ring[idx].mqd_obj); | 4861 | NULL, &rdev->ring[idx].mqd_obj); |
4862 | if (r) { | 4862 | if (r) { |
4863 | dev_warn(rdev->dev, "(%d) create MQD bo failed\n", r); | 4863 | dev_warn(rdev->dev, "(%d) create MQD bo failed\n", r); |
4864 | return r; | 4864 | return r; |
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index c09e40a0d3d0..8fe9f870fb5a 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -4022,7 +4022,7 @@ int sumo_rlc_init(struct radeon_device *rdev) | |||
4022 | if (rdev->rlc.save_restore_obj == NULL) { | 4022 | if (rdev->rlc.save_restore_obj == NULL) { |
4023 | r = radeon_bo_create(rdev, dws * 4, PAGE_SIZE, true, | 4023 | r = radeon_bo_create(rdev, dws * 4, PAGE_SIZE, true, |
4024 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, | 4024 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, |
4025 | &rdev->rlc.save_restore_obj); | 4025 | NULL, &rdev->rlc.save_restore_obj); |
4026 | if (r) { | 4026 | if (r) { |
4027 | dev_warn(rdev->dev, "(%d) create RLC sr bo failed\n", r); | 4027 | dev_warn(rdev->dev, "(%d) create RLC sr bo failed\n", r); |
4028 | return r; | 4028 | return r; |
@@ -4101,7 +4101,7 @@ int sumo_rlc_init(struct radeon_device *rdev) | |||
4101 | if (rdev->rlc.clear_state_obj == NULL) { | 4101 | if (rdev->rlc.clear_state_obj == NULL) { |
4102 | r = radeon_bo_create(rdev, dws * 4, PAGE_SIZE, true, | 4102 | r = radeon_bo_create(rdev, dws * 4, PAGE_SIZE, true, |
4103 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, | 4103 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, |
4104 | &rdev->rlc.clear_state_obj); | 4104 | NULL, &rdev->rlc.clear_state_obj); |
4105 | if (r) { | 4105 | if (r) { |
4106 | dev_warn(rdev->dev, "(%d) create RLC c bo failed\n", r); | 4106 | dev_warn(rdev->dev, "(%d) create RLC c bo failed\n", r); |
4107 | sumo_rlc_fini(rdev); | 4107 | sumo_rlc_fini(rdev); |
@@ -4178,7 +4178,7 @@ int sumo_rlc_init(struct radeon_device *rdev) | |||
4178 | r = radeon_bo_create(rdev, rdev->rlc.cp_table_size, | 4178 | r = radeon_bo_create(rdev, rdev->rlc.cp_table_size, |
4179 | PAGE_SIZE, true, | 4179 | PAGE_SIZE, true, |
4180 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, | 4180 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, |
4181 | &rdev->rlc.cp_table_obj); | 4181 | NULL, &rdev->rlc.cp_table_obj); |
4182 | if (r) { | 4182 | if (r) { |
4183 | dev_warn(rdev->dev, "(%d) create RLC cp table bo failed\n", r); | 4183 | dev_warn(rdev->dev, "(%d) create RLC cp table bo failed\n", r); |
4184 | sumo_rlc_fini(rdev); | 4184 | sumo_rlc_fini(rdev); |
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index f8eb519c3286..85414283fccc 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -1430,7 +1430,7 @@ int r600_vram_scratch_init(struct radeon_device *rdev) | |||
1430 | if (rdev->vram_scratch.robj == NULL) { | 1430 | if (rdev->vram_scratch.robj == NULL) { |
1431 | r = radeon_bo_create(rdev, RADEON_GPU_PAGE_SIZE, | 1431 | r = radeon_bo_create(rdev, RADEON_GPU_PAGE_SIZE, |
1432 | PAGE_SIZE, true, RADEON_GEM_DOMAIN_VRAM, | 1432 | PAGE_SIZE, true, RADEON_GEM_DOMAIN_VRAM, |
1433 | 0, NULL, &rdev->vram_scratch.robj); | 1433 | 0, NULL, NULL, &rdev->vram_scratch.robj); |
1434 | if (r) { | 1434 | if (r) { |
1435 | return r; | 1435 | return r; |
1436 | } | 1436 | } |
@@ -3368,7 +3368,7 @@ int r600_ih_ring_alloc(struct radeon_device *rdev) | |||
3368 | r = radeon_bo_create(rdev, rdev->ih.ring_size, | 3368 | r = radeon_bo_create(rdev, rdev->ih.ring_size, |
3369 | PAGE_SIZE, true, | 3369 | PAGE_SIZE, true, |
3370 | RADEON_GEM_DOMAIN_GTT, 0, | 3370 | RADEON_GEM_DOMAIN_GTT, 0, |
3371 | NULL, &rdev->ih.ring_obj); | 3371 | NULL, NULL, &rdev->ih.ring_obj); |
3372 | if (r) { | 3372 | if (r) { |
3373 | DRM_ERROR("radeon: failed to create ih ring buffer (%d).\n", r); | 3373 | DRM_ERROR("radeon: failed to create ih ring buffer (%d).\n", r); |
3374 | return r; | 3374 | return r; |
diff --git a/drivers/gpu/drm/radeon/radeon_benchmark.c b/drivers/gpu/drm/radeon/radeon_benchmark.c index 1e8855060fc7..9e7f23dd14bd 100644 --- a/drivers/gpu/drm/radeon/radeon_benchmark.c +++ b/drivers/gpu/drm/radeon/radeon_benchmark.c | |||
@@ -93,7 +93,7 @@ static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size, | |||
93 | int time; | 93 | int time; |
94 | 94 | ||
95 | n = RADEON_BENCHMARK_ITERATIONS; | 95 | n = RADEON_BENCHMARK_ITERATIONS; |
96 | r = radeon_bo_create(rdev, size, PAGE_SIZE, true, sdomain, 0, NULL, &sobj); | 96 | r = radeon_bo_create(rdev, size, PAGE_SIZE, true, sdomain, 0, NULL, NULL, &sobj); |
97 | if (r) { | 97 | if (r) { |
98 | goto out_cleanup; | 98 | goto out_cleanup; |
99 | } | 99 | } |
@@ -105,7 +105,7 @@ static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size, | |||
105 | if (r) { | 105 | if (r) { |
106 | goto out_cleanup; | 106 | goto out_cleanup; |
107 | } | 107 | } |
108 | r = radeon_bo_create(rdev, size, PAGE_SIZE, true, ddomain, 0, NULL, &dobj); | 108 | r = radeon_bo_create(rdev, size, PAGE_SIZE, true, ddomain, 0, NULL, NULL, &dobj); |
109 | if (r) { | 109 | if (r) { |
110 | goto out_cleanup; | 110 | goto out_cleanup; |
111 | } | 111 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index e84a76e6656a..6fbab1582112 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c | |||
@@ -430,7 +430,7 @@ int radeon_wb_init(struct radeon_device *rdev) | |||
430 | 430 | ||
431 | if (rdev->wb.wb_obj == NULL) { | 431 | if (rdev->wb.wb_obj == NULL) { |
432 | r = radeon_bo_create(rdev, RADEON_GPU_PAGE_SIZE, PAGE_SIZE, true, | 432 | r = radeon_bo_create(rdev, RADEON_GPU_PAGE_SIZE, PAGE_SIZE, true, |
433 | RADEON_GEM_DOMAIN_GTT, 0, NULL, | 433 | RADEON_GEM_DOMAIN_GTT, 0, NULL, NULL, |
434 | &rdev->wb.wb_obj); | 434 | &rdev->wb.wb_obj); |
435 | if (r) { | 435 | if (r) { |
436 | dev_warn(rdev->dev, "(%d) create WB bo failed\n", r); | 436 | dev_warn(rdev->dev, "(%d) create WB bo failed\n", r); |
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index a053a0779aac..84146d5901aa 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c | |||
@@ -128,7 +128,7 @@ int radeon_gart_table_vram_alloc(struct radeon_device *rdev) | |||
128 | if (rdev->gart.robj == NULL) { | 128 | if (rdev->gart.robj == NULL) { |
129 | r = radeon_bo_create(rdev, rdev->gart.table_size, | 129 | r = radeon_bo_create(rdev, rdev->gart.table_size, |
130 | PAGE_SIZE, true, RADEON_GEM_DOMAIN_VRAM, | 130 | PAGE_SIZE, true, RADEON_GEM_DOMAIN_VRAM, |
131 | 0, NULL, &rdev->gart.robj); | 131 | 0, NULL, NULL, &rdev->gart.robj); |
132 | if (r) { | 132 | if (r) { |
133 | return r; | 133 | return r; |
134 | } | 134 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index 4b7c8ec36c2f..c194497aa586 100644 --- a/drivers/gpu/drm/radeon/radeon_gem.c +++ b/drivers/gpu/drm/radeon/radeon_gem.c | |||
@@ -67,7 +67,7 @@ int radeon_gem_object_create(struct radeon_device *rdev, unsigned long size, | |||
67 | 67 | ||
68 | retry: | 68 | retry: |
69 | r = radeon_bo_create(rdev, size, alignment, kernel, initial_domain, | 69 | r = radeon_bo_create(rdev, size, alignment, kernel, initial_domain, |
70 | flags, NULL, &robj); | 70 | flags, NULL, NULL, &robj); |
71 | if (r) { | 71 | if (r) { |
72 | if (r != -ERESTARTSYS) { | 72 | if (r != -ERESTARTSYS) { |
73 | if (initial_domain == RADEON_GEM_DOMAIN_VRAM) { | 73 | if (initial_domain == RADEON_GEM_DOMAIN_VRAM) { |
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 0e82f0223fd4..99a960a4f302 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c | |||
@@ -167,8 +167,10 @@ void radeon_ttm_placement_from_domain(struct radeon_bo *rbo, u32 domain) | |||
167 | } | 167 | } |
168 | 168 | ||
169 | int radeon_bo_create(struct radeon_device *rdev, | 169 | int radeon_bo_create(struct radeon_device *rdev, |
170 | unsigned long size, int byte_align, bool kernel, u32 domain, | 170 | unsigned long size, int byte_align, bool kernel, |
171 | u32 flags, struct sg_table *sg, struct radeon_bo **bo_ptr) | 171 | u32 domain, u32 flags, struct sg_table *sg, |
172 | struct reservation_object *resv, | ||
173 | struct radeon_bo **bo_ptr) | ||
172 | { | 174 | { |
173 | struct radeon_bo *bo; | 175 | struct radeon_bo *bo; |
174 | enum ttm_bo_type type; | 176 | enum ttm_bo_type type; |
@@ -216,7 +218,7 @@ int radeon_bo_create(struct radeon_device *rdev, | |||
216 | down_read(&rdev->pm.mclk_lock); | 218 | down_read(&rdev->pm.mclk_lock); |
217 | r = ttm_bo_init(&rdev->mman.bdev, &bo->tbo, size, type, | 219 | r = ttm_bo_init(&rdev->mman.bdev, &bo->tbo, size, type, |
218 | &bo->placement, page_align, !kernel, NULL, | 220 | &bo->placement, page_align, !kernel, NULL, |
219 | acc_size, sg, NULL, &radeon_ttm_bo_destroy); | 221 | acc_size, sg, resv, &radeon_ttm_bo_destroy); |
220 | up_read(&rdev->pm.mclk_lock); | 222 | up_read(&rdev->pm.mclk_lock); |
221 | if (unlikely(r != 0)) { | 223 | if (unlikely(r != 0)) { |
222 | return r; | 224 | return r; |
diff --git a/drivers/gpu/drm/radeon/radeon_object.h b/drivers/gpu/drm/radeon/radeon_object.h index 98a47fdf3625..1b8ec7917154 100644 --- a/drivers/gpu/drm/radeon/radeon_object.h +++ b/drivers/gpu/drm/radeon/radeon_object.h | |||
@@ -126,6 +126,7 @@ extern int radeon_bo_create(struct radeon_device *rdev, | |||
126 | unsigned long size, int byte_align, | 126 | unsigned long size, int byte_align, |
127 | bool kernel, u32 domain, u32 flags, | 127 | bool kernel, u32 domain, u32 flags, |
128 | struct sg_table *sg, | 128 | struct sg_table *sg, |
129 | struct reservation_object *resv, | ||
129 | struct radeon_bo **bo_ptr); | 130 | struct radeon_bo **bo_ptr); |
130 | extern int radeon_bo_kmap(struct radeon_bo *bo, void **ptr); | 131 | extern int radeon_bo_kmap(struct radeon_bo *bo, void **ptr); |
131 | extern void radeon_bo_kunmap(struct radeon_bo *bo); | 132 | extern void radeon_bo_kunmap(struct radeon_bo *bo); |
diff --git a/drivers/gpu/drm/radeon/radeon_prime.c b/drivers/gpu/drm/radeon/radeon_prime.c index 171daf7fc483..f3609c97496b 100644 --- a/drivers/gpu/drm/radeon/radeon_prime.c +++ b/drivers/gpu/drm/radeon/radeon_prime.c | |||
@@ -61,12 +61,15 @@ struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev, | |||
61 | struct dma_buf_attachment *attach, | 61 | struct dma_buf_attachment *attach, |
62 | struct sg_table *sg) | 62 | struct sg_table *sg) |
63 | { | 63 | { |
64 | struct reservation_object *resv = attach->dmabuf->resv; | ||
64 | struct radeon_device *rdev = dev->dev_private; | 65 | struct radeon_device *rdev = dev->dev_private; |
65 | struct radeon_bo *bo; | 66 | struct radeon_bo *bo; |
66 | int ret; | 67 | int ret; |
67 | 68 | ||
69 | ww_mutex_lock(&resv->lock, NULL); | ||
68 | ret = radeon_bo_create(rdev, attach->dmabuf->size, PAGE_SIZE, false, | 70 | ret = radeon_bo_create(rdev, attach->dmabuf->size, PAGE_SIZE, false, |
69 | RADEON_GEM_DOMAIN_GTT, 0, sg, &bo); | 71 | RADEON_GEM_DOMAIN_GTT, 0, sg, resv, &bo); |
72 | ww_mutex_unlock(&resv->lock); | ||
70 | if (ret) | 73 | if (ret) |
71 | return ERR_PTR(ret); | 74 | return ERR_PTR(ret); |
72 | 75 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index 6f2a9bd6bb54..3d17af34afa7 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c | |||
@@ -383,7 +383,7 @@ int radeon_ring_init(struct radeon_device *rdev, struct radeon_ring *ring, unsig | |||
383 | /* Allocate ring buffer */ | 383 | /* Allocate ring buffer */ |
384 | if (ring->ring_obj == NULL) { | 384 | if (ring->ring_obj == NULL) { |
385 | r = radeon_bo_create(rdev, ring->ring_size, PAGE_SIZE, true, | 385 | r = radeon_bo_create(rdev, ring->ring_size, PAGE_SIZE, true, |
386 | RADEON_GEM_DOMAIN_GTT, 0, | 386 | RADEON_GEM_DOMAIN_GTT, 0, NULL, |
387 | NULL, &ring->ring_obj); | 387 | NULL, &ring->ring_obj); |
388 | if (r) { | 388 | if (r) { |
389 | dev_err(rdev->dev, "(%d) ring create failed\n", r); | 389 | dev_err(rdev->dev, "(%d) ring create failed\n", r); |
diff --git a/drivers/gpu/drm/radeon/radeon_sa.c b/drivers/gpu/drm/radeon/radeon_sa.c index b84f97c8718c..c507896aca45 100644 --- a/drivers/gpu/drm/radeon/radeon_sa.c +++ b/drivers/gpu/drm/radeon/radeon_sa.c | |||
@@ -65,7 +65,7 @@ int radeon_sa_bo_manager_init(struct radeon_device *rdev, | |||
65 | } | 65 | } |
66 | 66 | ||
67 | r = radeon_bo_create(rdev, size, align, true, | 67 | r = radeon_bo_create(rdev, size, align, true, |
68 | domain, flags, NULL, &sa_manager->bo); | 68 | domain, flags, NULL, NULL, &sa_manager->bo); |
69 | if (r) { | 69 | if (r) { |
70 | dev_err(rdev->dev, "(%d) failed to allocate bo for manager\n", r); | 70 | dev_err(rdev->dev, "(%d) failed to allocate bo for manager\n", r); |
71 | return r; | 71 | return r; |
diff --git a/drivers/gpu/drm/radeon/radeon_test.c b/drivers/gpu/drm/radeon/radeon_test.c index ce943e1a5e51..07b506b41008 100644 --- a/drivers/gpu/drm/radeon/radeon_test.c +++ b/drivers/gpu/drm/radeon/radeon_test.c | |||
@@ -67,7 +67,7 @@ static void radeon_do_test_moves(struct radeon_device *rdev, int flag) | |||
67 | } | 67 | } |
68 | 68 | ||
69 | r = radeon_bo_create(rdev, size, PAGE_SIZE, true, RADEON_GEM_DOMAIN_VRAM, | 69 | r = radeon_bo_create(rdev, size, PAGE_SIZE, true, RADEON_GEM_DOMAIN_VRAM, |
70 | 0, NULL, &vram_obj); | 70 | 0, NULL, NULL, &vram_obj); |
71 | if (r) { | 71 | if (r) { |
72 | DRM_ERROR("Failed to create VRAM object\n"); | 72 | DRM_ERROR("Failed to create VRAM object\n"); |
73 | goto out_cleanup; | 73 | goto out_cleanup; |
@@ -87,7 +87,8 @@ static void radeon_do_test_moves(struct radeon_device *rdev, int flag) | |||
87 | struct radeon_fence *fence = NULL; | 87 | struct radeon_fence *fence = NULL; |
88 | 88 | ||
89 | r = radeon_bo_create(rdev, size, PAGE_SIZE, true, | 89 | r = radeon_bo_create(rdev, size, PAGE_SIZE, true, |
90 | RADEON_GEM_DOMAIN_GTT, 0, NULL, gtt_obj + i); | 90 | RADEON_GEM_DOMAIN_GTT, 0, NULL, NULL, |
91 | gtt_obj + i); | ||
91 | if (r) { | 92 | if (r) { |
92 | DRM_ERROR("Failed to create GTT object %d\n", i); | 93 | DRM_ERROR("Failed to create GTT object %d\n", i); |
93 | goto out_lclean; | 94 | goto out_lclean; |
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 738a2f248b36..8624979afb65 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c | |||
@@ -865,7 +865,7 @@ int radeon_ttm_init(struct radeon_device *rdev) | |||
865 | radeon_ttm_set_active_vram_size(rdev, rdev->mc.visible_vram_size); | 865 | radeon_ttm_set_active_vram_size(rdev, rdev->mc.visible_vram_size); |
866 | 866 | ||
867 | r = radeon_bo_create(rdev, 256 * 1024, PAGE_SIZE, true, | 867 | r = radeon_bo_create(rdev, 256 * 1024, PAGE_SIZE, true, |
868 | RADEON_GEM_DOMAIN_VRAM, 0, | 868 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, |
869 | NULL, &rdev->stollen_vga_memory); | 869 | NULL, &rdev->stollen_vga_memory); |
870 | if (r) { | 870 | if (r) { |
871 | return r; | 871 | return r; |
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c index ba4f38916026..11b662469253 100644 --- a/drivers/gpu/drm/radeon/radeon_uvd.c +++ b/drivers/gpu/drm/radeon/radeon_uvd.c | |||
@@ -141,7 +141,8 @@ int radeon_uvd_init(struct radeon_device *rdev) | |||
141 | RADEON_UVD_STACK_SIZE + RADEON_UVD_HEAP_SIZE + | 141 | RADEON_UVD_STACK_SIZE + RADEON_UVD_HEAP_SIZE + |
142 | RADEON_GPU_PAGE_SIZE; | 142 | RADEON_GPU_PAGE_SIZE; |
143 | r = radeon_bo_create(rdev, bo_size, PAGE_SIZE, true, | 143 | r = radeon_bo_create(rdev, bo_size, PAGE_SIZE, true, |
144 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, &rdev->uvd.vcpu_bo); | 144 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, |
145 | NULL, &rdev->uvd.vcpu_bo); | ||
145 | if (r) { | 146 | if (r) { |
146 | dev_err(rdev->dev, "(%d) failed to allocate UVD bo\n", r); | 147 | dev_err(rdev->dev, "(%d) failed to allocate UVD bo\n", r); |
147 | return r; | 148 | return r; |
diff --git a/drivers/gpu/drm/radeon/radeon_vce.c b/drivers/gpu/drm/radeon/radeon_vce.c index c7190aadbd89..9e85757d5599 100644 --- a/drivers/gpu/drm/radeon/radeon_vce.c +++ b/drivers/gpu/drm/radeon/radeon_vce.c | |||
@@ -126,7 +126,8 @@ int radeon_vce_init(struct radeon_device *rdev) | |||
126 | size = RADEON_GPU_PAGE_ALIGN(rdev->vce_fw->size) + | 126 | size = RADEON_GPU_PAGE_ALIGN(rdev->vce_fw->size) + |
127 | RADEON_VCE_STACK_SIZE + RADEON_VCE_HEAP_SIZE; | 127 | RADEON_VCE_STACK_SIZE + RADEON_VCE_HEAP_SIZE; |
128 | r = radeon_bo_create(rdev, size, PAGE_SIZE, true, | 128 | r = radeon_bo_create(rdev, size, PAGE_SIZE, true, |
129 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, &rdev->vce.vcpu_bo); | 129 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, NULL, |
130 | &rdev->vce.vcpu_bo); | ||
130 | if (r) { | 131 | if (r) { |
131 | dev_err(rdev->dev, "(%d) failed to allocate VCE bo\n", r); | 132 | dev_err(rdev->dev, "(%d) failed to allocate VCE bo\n", r); |
132 | return r; | 133 | return r; |
diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c index 8af1a94e7448..4532cc76a0a6 100644 --- a/drivers/gpu/drm/radeon/radeon_vm.c +++ b/drivers/gpu/drm/radeon/radeon_vm.c | |||
@@ -548,7 +548,8 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev, | |||
548 | 548 | ||
549 | r = radeon_bo_create(rdev, RADEON_VM_PTE_COUNT * 8, | 549 | r = radeon_bo_create(rdev, RADEON_VM_PTE_COUNT * 8, |
550 | RADEON_GPU_PAGE_SIZE, true, | 550 | RADEON_GPU_PAGE_SIZE, true, |
551 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, &pt); | 551 | RADEON_GEM_DOMAIN_VRAM, 0, |
552 | NULL, NULL, &pt); | ||
552 | if (r) | 553 | if (r) |
553 | return r; | 554 | return r; |
554 | 555 | ||
@@ -1127,7 +1128,7 @@ int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm) | |||
1127 | 1128 | ||
1128 | r = radeon_bo_create(rdev, pd_size, align, true, | 1129 | r = radeon_bo_create(rdev, pd_size, align, true, |
1129 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, | 1130 | RADEON_GEM_DOMAIN_VRAM, 0, NULL, |
1130 | &vm->page_directory); | 1131 | NULL, &vm->page_directory); |
1131 | if (r) | 1132 | if (r) |
1132 | return r; | 1133 | return r; |
1133 | 1134 | ||