summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2016-01-07 11:18:32 +0000
committerRussell King <rmk@arm.linux.org.uk>2016-01-07 11:18:32 +0000
commitb38171be4051bf9269359567d4dada15f249060a (patch)
treebd24d67a099f2bfd9aa56fef0adce9f6b68396e3
parentbb978f5326b6c6c9d6d6267624f5de7325e962a1 (diff)
etnaviv: fix size calculation in EL_START()
Dennis Gilmore reports that Fedora sees assert()s from the etnaviv backend when XFCE starts up. This is due to an incorrect calculation in EL_START() which mistakenly multiplied the operation size by 4 (sizeof(uint32_t)) before adding it to the current batch buffer index. This resulted in the calculated size overflowing the maximum batch size, and causing the false assert(). Signed-off-by: Russell King <rmk@arm.linux.org.uk>
-rw-r--r--etnaviv/etnaviv_op.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/etnaviv/etnaviv_op.c b/etnaviv/etnaviv_op.c
index 8d5bf7f..eb53175 100644
--- a/etnaviv/etnaviv_op.c
+++ b/etnaviv/etnaviv_op.c
@@ -48,7 +48,7 @@
do { \
struct etnaviv *_et = etp; \
unsigned int _batch_size = _et->batch_size; \
- unsigned int _batch_max = _batch_size + 4 * max_sz; \
+ unsigned int _batch_max = _batch_size + max_sz; \
uint32_t *_batch = &_et->batch[_batch_size]; \
assert(_batch_max <= MAX_BATCH_SIZE)