summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-01-21 16:56:27 +1100
committerEric Anholt <[email protected]>2017-09-26 14:50:29 -0700
commit6cc59de9cd56498e176fa3a07326be00a7f5929f (patch)
treeeceba0b9e45d5ba6abfd370a6ca2eff5250603f4 /src/gallium/auxiliary
parentbb7c9789c2fbba0335993cb610cee3d455a8bedc (diff)
gallium: Weaken assertion about u_mm's align2 field.
vc5 MMU mappings are access-controlled at a 128kb boundary, so the 4kb here was too small for that purpose. Allowing any valid align2 value that u_mm's 32-bit addressing can represent will still catch most cases of people passing in a byte alignment. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_mm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_mm.c b/src/gallium/auxiliary/util/u_mm.c
index bd4c4e1b106..7a45e291920 100644
--- a/src/gallium/auxiliary/util/u_mm.c
+++ b/src/gallium/auxiliary/util/u_mm.c
@@ -183,7 +183,10 @@ u_mmAllocMem(struct mem_block *heap, int size, int align2, int startSearch)
assert(size >= 0);
assert(align2 >= 0);
- assert(align2 <= 12); /* sanity check, 2^12 (4KB) enough? */
+ /* Make sure that a byte alignment isn't getting passed for our
+ * power-of-two alignment arg.
+ */
+ assert(align2 < 32);
if (!heap || align2 < 0 || size <= 0)
return NULL;