diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-06-23 02:42:15 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-06-23 02:42:15 +1000 |
commit | 01e8f0ea426970859bafba72e067590df1a64eb0 (patch) | |
tree | 28a165156ee843a15fd36731cc48f85f7de3dad7 /shared-core | |
parent | 89cf2ee2e5b3930b36f2347f35933fc29bc42518 (diff) |
nv50: oops, keep VRAM allocations aligned at 64KiB - that's our page size..
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/nouveau_mem.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shared-core/nouveau_mem.c b/shared-core/nouveau_mem.c index 207d7860..58942829 100644 --- a/shared-core/nouveau_mem.c +++ b/shared-core/nouveau_mem.c @@ -593,8 +593,11 @@ nouveau_mem_alloc(struct drm_device *dev, int alignment, uint64_t size, /* Align allocation sizes to 64KiB blocks on G8x. We use a 64KiB * page size in the GPU VM. */ - if (flags & NOUVEAU_MEM_FB && dev_priv->card_type >= NV_50) + if (flags & NOUVEAU_MEM_FB && dev_priv->card_type >= NV_50) { size = (size + (64 * 1024)) & ~((64 * 1024) - 1); + if (alignment < 16) + alignment = 16; + } /* * Warn about 0 sized allocations, but let it go through. It'll return 1 page |