Alexandre Courbot
2014-Feb-10 05:57 UTC
[Nouveau] [PATCH] 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. Signed-off-by: Alexandre Courbot <acourbot at nvidia.com> --- drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c index 9a850fe19515..99c9deea248f 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c @@ -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; -- 1.8.5.4
Thierry Reding
2014-Feb-10 12:14 UTC
[Nouveau] [PATCH] drm/nouveau/fifo: allocate usermem as needed
On Mon, Feb 10, 2014 at 02:57:01PM +0900, Alexandre Courbot wrote:> Memory was always allocated for 4096 channels. Change this to allocate > what we actually need according to the number of channels we use. > > Signed-off-by: Alexandre Courbot <acourbot at nvidia.com> > --- > drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-)Looks good to me: Reviewed-by: Thierry Reding <treding at nvidia.com> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20140210/96c146ce/attachment-0001.pgp>
Ben Skeggs
2014-Feb-14 02:02 UTC
[Nouveau] [PATCH] drm/nouveau/fifo: allocate usermem as needed
On Mon, Feb 10, 2014 at 10:14 PM, Thierry Reding <thierry.reding at gmail.com> wrote:> On Mon, Feb 10, 2014 at 02:57:01PM +0900, Alexandre Courbot wrote: >> Memory was always allocated for 4096 channels. Change this to allocate >> what we actually need according to the number of channels we use. >> >> Signed-off-by: Alexandre Courbot <acourbot at nvidia.com> >> --- >> drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) > > Looks good to me: > > Reviewed-by: Thierry Reding <treding at nvidia.com>Thanks guys!> > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/nouveau >
Reasonably Related Threads
- [RFC 11/16] drm/nouveau/fifo: allocate usermem as needed
- [RFC 12/16] drm/nouveau/fifo: add GK20A support
- [PATCH] drm/nouveau/fifo: allocate usermem as needed
- [PATCH 04/12] drm/nouveau/bar/nvc0: support chips without BAR3
- [RFC 07/16] drm/nouveau/bar/nvc0: support chips without BAR3