aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drv.h8
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_object.c2
-rw-r--r--drivers/gpu/drm/nouveau/nv04_instmem.c2
-rw-r--r--drivers/gpu/drm/nouveau/nv50_instmem.c10
-rw-r--r--drivers/gpu/drm/nouveau/nvc0_instmem.c6
5 files changed, 14 insertions, 14 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
index d152bc334fd6..1d474f526986 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
@@ -265,7 +265,7 @@ struct nouveau_instmem_engine {
265 void (*resume)(struct drm_device *dev); 265 void (*resume)(struct drm_device *dev);
266 266
267 int (*populate)(struct drm_device *, struct nouveau_gpuobj *, 267 int (*populate)(struct drm_device *, struct nouveau_gpuobj *,
268 uint32_t *size); 268 u32 *size, u32 align);
269 void (*clear)(struct drm_device *, struct nouveau_gpuobj *); 269 void (*clear)(struct drm_device *, struct nouveau_gpuobj *);
270 int (*bind)(struct drm_device *, struct nouveau_gpuobj *); 270 int (*bind)(struct drm_device *, struct nouveau_gpuobj *);
271 int (*unbind)(struct drm_device *, struct nouveau_gpuobj *); 271 int (*unbind)(struct drm_device *, struct nouveau_gpuobj *);
@@ -1121,7 +1121,7 @@ extern void nv04_instmem_takedown(struct drm_device *);
1121extern int nv04_instmem_suspend(struct drm_device *); 1121extern int nv04_instmem_suspend(struct drm_device *);
1122extern void nv04_instmem_resume(struct drm_device *); 1122extern void nv04_instmem_resume(struct drm_device *);
1123extern int nv04_instmem_populate(struct drm_device *, struct nouveau_gpuobj *, 1123extern int nv04_instmem_populate(struct drm_device *, struct nouveau_gpuobj *,
1124 uint32_t *size); 1124 u32 *size, u32 align);
1125extern void nv04_instmem_clear(struct drm_device *, struct nouveau_gpuobj *); 1125extern void nv04_instmem_clear(struct drm_device *, struct nouveau_gpuobj *);
1126extern int nv04_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); 1126extern int nv04_instmem_bind(struct drm_device *, struct nouveau_gpuobj *);
1127extern int nv04_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); 1127extern int nv04_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *);
@@ -1133,7 +1133,7 @@ extern void nv50_instmem_takedown(struct drm_device *);
1133extern int nv50_instmem_suspend(struct drm_device *); 1133extern int nv50_instmem_suspend(struct drm_device *);
1134extern void nv50_instmem_resume(struct drm_device *); 1134extern void nv50_instmem_resume(struct drm_device *);
1135extern int nv50_instmem_populate(struct drm_device *, struct nouveau_gpuobj *, 1135extern int nv50_instmem_populate(struct drm_device *, struct nouveau_gpuobj *,
1136 uint32_t *size); 1136 u32 *size, u32 align);
1137extern void nv50_instmem_clear(struct drm_device *, struct nouveau_gpuobj *); 1137extern void nv50_instmem_clear(struct drm_device *, struct nouveau_gpuobj *);
1138extern int nv50_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); 1138extern int nv50_instmem_bind(struct drm_device *, struct nouveau_gpuobj *);
1139extern int nv50_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); 1139extern int nv50_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *);
@@ -1147,7 +1147,7 @@ extern void nvc0_instmem_takedown(struct drm_device *);
1147extern int nvc0_instmem_suspend(struct drm_device *); 1147extern int nvc0_instmem_suspend(struct drm_device *);
1148extern void nvc0_instmem_resume(struct drm_device *); 1148extern void nvc0_instmem_resume(struct drm_device *);
1149extern int nvc0_instmem_populate(struct drm_device *, struct nouveau_gpuobj *, 1149extern int nvc0_instmem_populate(struct drm_device *, struct nouveau_gpuobj *,
1150 uint32_t *size); 1150 u32 *size, u32 align);
1151extern void nvc0_instmem_clear(struct drm_device *, struct nouveau_gpuobj *); 1151extern void nvc0_instmem_clear(struct drm_device *, struct nouveau_gpuobj *);
1152extern int nvc0_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); 1152extern int nvc0_instmem_bind(struct drm_device *, struct nouveau_gpuobj *);
1153extern int nvc0_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); 1153extern int nvc0_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *);
diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c
index ce9958a30175..0b8183edfcd7 100644
--- a/drivers/gpu/drm/nouveau/nouveau_object.c
+++ b/drivers/gpu/drm/nouveau/nouveau_object.c
@@ -112,7 +112,7 @@ nouveau_gpuobj_new(struct drm_device *dev, struct nouveau_channel *chan,
112 NV_DEBUG(dev, "global heap\n"); 112 NV_DEBUG(dev, "global heap\n");
113 113
114 /* allocate backing pages, sets vinst */ 114 /* allocate backing pages, sets vinst */
115 ret = engine->instmem.populate(dev, gpuobj, &size); 115 ret = engine->instmem.populate(dev, gpuobj, &size, align);
116 if (ret) { 116 if (ret) {
117 nouveau_gpuobj_ref(NULL, &gpuobj); 117 nouveau_gpuobj_ref(NULL, &gpuobj);
118 return ret; 118 return ret;
diff --git a/drivers/gpu/drm/nouveau/nv04_instmem.c b/drivers/gpu/drm/nouveau/nv04_instmem.c
index 0b5ae297abde..554e55d0ec48 100644
--- a/drivers/gpu/drm/nouveau/nv04_instmem.c
+++ b/drivers/gpu/drm/nouveau/nv04_instmem.c
@@ -99,7 +99,7 @@ nv04_instmem_takedown(struct drm_device *dev)
99 99
100int 100int
101nv04_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj, 101nv04_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj,
102 uint32_t *sz) 102 u32 *size, u32 align)
103{ 103{
104 return 0; 104 return 0;
105} 105}
diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c
index 0651e7629235..2c98eb176d64 100644
--- a/drivers/gpu/drm/nouveau/nv50_instmem.c
+++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
@@ -322,19 +322,19 @@ nv50_instmem_resume(struct drm_device *dev)
322 322
323int 323int
324nv50_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj, 324nv50_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj,
325 uint32_t *sz) 325 u32 *size, u32 align)
326{ 326{
327 int ret; 327 int ret;
328 328
329 if (gpuobj->im_backing) 329 if (gpuobj->im_backing)
330 return -EINVAL; 330 return -EINVAL;
331 331
332 *sz = ALIGN(*sz, 4096); 332 *size = ALIGN(*size, 4096);
333 if (*sz == 0) 333 if (*size == 0)
334 return -EINVAL; 334 return -EINVAL;
335 335
336 ret = nouveau_bo_new(dev, NULL, *sz, 0, TTM_PL_FLAG_VRAM, 0, 0x0000, 336 ret = nouveau_bo_new(dev, NULL, *size, align, TTM_PL_FLAG_VRAM,
337 true, false, &gpuobj->im_backing); 337 0, 0x0000, true, false, &gpuobj->im_backing);
338 if (ret) { 338 if (ret) {
339 NV_ERROR(dev, "error getting PRAMIN backing pages: %d\n", ret); 339 NV_ERROR(dev, "error getting PRAMIN backing pages: %d\n", ret);
340 return ret; 340 return ret;
diff --git a/drivers/gpu/drm/nouveau/nvc0_instmem.c b/drivers/gpu/drm/nouveau/nvc0_instmem.c
index 13a0f78a9088..7b4e71f5c274 100644
--- a/drivers/gpu/drm/nouveau/nvc0_instmem.c
+++ b/drivers/gpu/drm/nouveau/nvc0_instmem.c
@@ -28,7 +28,7 @@
28 28
29int 29int
30nvc0_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj, 30nvc0_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj,
31 uint32_t *size) 31 u32 *size, u32 align)
32{ 32{
33 int ret; 33 int ret;
34 34
@@ -36,8 +36,8 @@ nvc0_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj,
36 if (*size == 0) 36 if (*size == 0)
37 return -EINVAL; 37 return -EINVAL;
38 38
39 ret = nouveau_bo_new(dev, NULL, *size, 0, TTM_PL_FLAG_VRAM, 0, 0x0000, 39 ret = nouveau_bo_new(dev, NULL, *size, align, TTM_PL_FLAG_VRAM,
40 true, false, &gpuobj->im_backing); 40 0, 0x0000, true, false, &gpuobj->im_backing);
41 if (ret) { 41 if (ret) {
42 NV_ERROR(dev, "error getting PRAMIN backing pages: %d\n", ret); 42 NV_ERROR(dev, "error getting PRAMIN backing pages: %d\n", ret);
43 return ret; 43 return ret;