aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/radeon/radeon.h1
-rw-r--r--drivers/gpu/drm/radeon/radeon_gart.c1
-rw-r--r--drivers/gpu/drm/radeon/radeon_object.h2
-rw-r--r--drivers/gpu/drm/radeon/radeon_ring.c1
-rw-r--r--drivers/gpu/drm/radeon/radeon_sa.c7
5 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 7b7d23ae3f27..82e8e36064e3 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -455,6 +455,7 @@ struct radeon_sa_manager {
455 uint64_t gpu_addr; 455 uint64_t gpu_addr;
456 void *cpu_ptr; 456 void *cpu_ptr;
457 uint32_t domain; 457 uint32_t domain;
458 uint32_t align;
458}; 459};
459 460
460struct radeon_sa_bo; 461struct radeon_sa_bo;
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
index 43ec4a401f07..5ce190b8bd1f 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu/drm/radeon/radeon_gart.c
@@ -467,6 +467,7 @@ int radeon_vm_manager_init(struct radeon_device *rdev)
467 size *= 2; 467 size *= 2;
468 r = radeon_sa_bo_manager_init(rdev, &rdev->vm_manager.sa_manager, 468 r = radeon_sa_bo_manager_init(rdev, &rdev->vm_manager.sa_manager,
469 RADEON_GPU_PAGE_ALIGN(size), 469 RADEON_GPU_PAGE_ALIGN(size),
470 RADEON_GPU_PAGE_SIZE,
470 RADEON_GEM_DOMAIN_VRAM); 471 RADEON_GEM_DOMAIN_VRAM);
471 if (r) { 472 if (r) {
472 dev_err(rdev->dev, "failed to allocate vm bo (%dKB)\n", 473 dev_err(rdev->dev, "failed to allocate vm bo (%dKB)\n",
diff --git a/drivers/gpu/drm/radeon/radeon_object.h b/drivers/gpu/drm/radeon/radeon_object.h
index 91519a5622b4..49c82c480013 100644
--- a/drivers/gpu/drm/radeon/radeon_object.h
+++ b/drivers/gpu/drm/radeon/radeon_object.h
@@ -174,7 +174,7 @@ static inline void * radeon_sa_bo_cpu_addr(struct radeon_sa_bo *sa_bo)
174 174
175extern int radeon_sa_bo_manager_init(struct radeon_device *rdev, 175extern int radeon_sa_bo_manager_init(struct radeon_device *rdev,
176 struct radeon_sa_manager *sa_manager, 176 struct radeon_sa_manager *sa_manager,
177 unsigned size, u32 domain); 177 unsigned size, u32 align, u32 domain);
178extern void radeon_sa_bo_manager_fini(struct radeon_device *rdev, 178extern void radeon_sa_bo_manager_fini(struct radeon_device *rdev,
179 struct radeon_sa_manager *sa_manager); 179 struct radeon_sa_manager *sa_manager);
180extern int radeon_sa_bo_manager_start(struct radeon_device *rdev, 180extern int radeon_sa_bo_manager_start(struct radeon_device *rdev,
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index 5f1c51a776ed..fb5ea6208970 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -224,6 +224,7 @@ int radeon_ib_pool_init(struct radeon_device *rdev)
224 } 224 }
225 r = radeon_sa_bo_manager_init(rdev, &rdev->ring_tmp_bo, 225 r = radeon_sa_bo_manager_init(rdev, &rdev->ring_tmp_bo,
226 RADEON_IB_POOL_SIZE*64*1024, 226 RADEON_IB_POOL_SIZE*64*1024,
227 RADEON_GPU_PAGE_SIZE,
227 RADEON_GEM_DOMAIN_GTT); 228 RADEON_GEM_DOMAIN_GTT);
228 if (r) { 229 if (r) {
229 return r; 230 return r;
diff --git a/drivers/gpu/drm/radeon/radeon_sa.c b/drivers/gpu/drm/radeon/radeon_sa.c
index 0abe5a9431bb..f0bac68254b7 100644
--- a/drivers/gpu/drm/radeon/radeon_sa.c
+++ b/drivers/gpu/drm/radeon/radeon_sa.c
@@ -49,7 +49,7 @@ static void radeon_sa_bo_try_free(struct radeon_sa_manager *sa_manager);
49 49
50int radeon_sa_bo_manager_init(struct radeon_device *rdev, 50int radeon_sa_bo_manager_init(struct radeon_device *rdev,
51 struct radeon_sa_manager *sa_manager, 51 struct radeon_sa_manager *sa_manager,
52 unsigned size, u32 domain) 52 unsigned size, u32 align, u32 domain)
53{ 53{
54 int i, r; 54 int i, r;
55 55
@@ -57,13 +57,14 @@ int radeon_sa_bo_manager_init(struct radeon_device *rdev,
57 sa_manager->bo = NULL; 57 sa_manager->bo = NULL;
58 sa_manager->size = size; 58 sa_manager->size = size;
59 sa_manager->domain = domain; 59 sa_manager->domain = domain;
60 sa_manager->align = align;
60 sa_manager->hole = &sa_manager->olist; 61 sa_manager->hole = &sa_manager->olist;
61 INIT_LIST_HEAD(&sa_manager->olist); 62 INIT_LIST_HEAD(&sa_manager->olist);
62 for (i = 0; i < RADEON_NUM_RINGS; ++i) { 63 for (i = 0; i < RADEON_NUM_RINGS; ++i) {
63 INIT_LIST_HEAD(&sa_manager->flist[i]); 64 INIT_LIST_HEAD(&sa_manager->flist[i]);
64 } 65 }
65 66
66 r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true, 67 r = radeon_bo_create(rdev, size, align, true,
67 domain, NULL, &sa_manager->bo); 68 domain, NULL, &sa_manager->bo);
68 if (r) { 69 if (r) {
69 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);
@@ -317,7 +318,7 @@ int radeon_sa_bo_new(struct radeon_device *rdev,
317 unsigned tries[RADEON_NUM_RINGS]; 318 unsigned tries[RADEON_NUM_RINGS];
318 int i, r; 319 int i, r;
319 320
320 BUG_ON(align > RADEON_GPU_PAGE_SIZE); 321 BUG_ON(align > sa_manager->align);
321 BUG_ON(size > sa_manager->size); 322 BUG_ON(size > sa_manager->size);
322 323
323 *sa_bo = kmalloc(sizeof(struct radeon_sa_bo), GFP_KERNEL); 324 *sa_bo = kmalloc(sizeof(struct radeon_sa_bo), GFP_KERNEL);