diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2009-01-30 11:18:54 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2009-02-04 13:22:56 +1000 |
commit | cb85630c02ddb46f168064befb2296d46b69f57a (patch) | |
tree | 551821123ef3f73431fcc1ac81c52abcd0fa44b5 /shared-core/nouveau_mem.c | |
parent | 7a389aab86bde183de8806878b8cf055f662ee73 (diff) |
nouveau: bring in new mm api definitions, without the actual mm code
Use of the new bits is guarded with a mm_enabled=0 hardcode.
Diffstat (limited to 'shared-core/nouveau_mem.c')
-rw-r--r-- | shared-core/nouveau_mem.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/shared-core/nouveau_mem.c b/shared-core/nouveau_mem.c index d79c1a52..0d590276 100644 --- a/shared-core/nouveau_mem.c +++ b/shared-core/nouveau_mem.c @@ -587,18 +587,21 @@ nouveau_mem_alloc(struct drm_device *dev, int alignment, uint64_t size, * Make things easier on ourselves: all allocations are page-aligned. * We need that to map allocated regions into the user space */ - if (alignment < PAGE_SHIFT) - alignment = PAGE_SHIFT; + if (alignment < PAGE_SIZE) + alignment = PAGE_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) { size = (size + 65535) & ~65535; - if (alignment < 16) - alignment = 16; + if (alignment < 65536) + alignment = 65536; } + /* Further down wants alignment in pages, not bytes */ + alignment >>= PAGE_SHIFT; + /* * Warn about 0 sized allocations, but let it go through. It'll return 1 page */ |