Commit 02f0b8c8 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Ben Skeggs

drm/nve0/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: default avatarAlexandre Courbot <acourbot@nvidia.com>
Reviewed-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent b6c4285a
...@@ -852,8 +852,8 @@ nve0_fifo_ctor(struct nouveau_object *parent, struct nouveau_object *engine, ...@@ -852,8 +852,8 @@ nve0_fifo_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return ret; return ret;
} }
ret = nouveau_gpuobj_new(nv_object(priv), NULL, 4096 * 0x200, 0x1000, ret = nouveau_gpuobj_new(nv_object(priv), NULL, impl->channels * 0x200,
NVOBJ_FLAG_ZERO_ALLOC, &priv->user.mem); 0x1000, NVOBJ_FLAG_ZERO_ALLOC, &priv->user.mem);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment