Skip to contentSkip to conversation

drm/nouveau/fifo: allocate usermem as needed

PATCH In review Alexandre Courbot 3 participants 3 messages Feb 10, 2014 – Feb 14, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau/fifo: allocate usermem as needed

Memory was always allocated for 4096 channels. Change this to allocate what we actually need according to the number of channels we use.

---
 drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c +2 -2
index 9a850fe19515..99c9deea248f 100644
@@ -852,8 +852,8 @@ nve0_fifo_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
 			return ret;
 	}
 
-	ret = nouveau_gpuobj_new(nv_object(priv), NULL, 4096 * 0x200, 0x1000,
-				 NVOBJ_FLAG_ZERO_ALLOC, &priv->user.mem);
+	ret = nouveau_gpuobj_new(nv_object(priv), NULL, impl->channels * 0x200,
+				0x1000, NVOBJ_FLAG_ZERO_ALLOC, &priv->user.mem);
 	if (ret)
 		return ret;
 
Signature · 1 line
1.8.5.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Alexandre Courbot

Memory was always allocated for 4096 channels. Change this to allocate what we actually need according to the number of channels we use.

---
 drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Looks good to me:

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#2 lore raw
Quoted 4 lines · Thierry Reding
Quoted 3 lines · Alexandre Courbot

Memory was always allocated for 4096 channels. Change this to allocate what we actually need according to the number of channels we use.

Quoted 8 lines
Quoted 4 lines
---
 drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Looks good to me:

Thanks guys!

Quoted 6 lines

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau