From cbf9fe50b5f848c6be380ab37cf034618c9a851e Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 13 Oct 2018 12:34:09 -0400 Subject: [PATCH] freedreno: fix off-by-one error in BEGIN_RING() Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/freedreno_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h index 30e3c6a735f..6b9da675300 100644 --- a/src/gallium/drivers/freedreno/freedreno_util.h +++ b/src/gallium/drivers/freedreno/freedreno_util.h @@ -274,7 +274,7 @@ OUT_RB(struct fd_ringbuffer *ring, struct fd_ringbuffer *target) static inline void BEGIN_RING(struct fd_ringbuffer *ring, uint32_t ndwords) { - if (ring->cur + ndwords >= ring->end) + if (ring->cur + ndwords > ring->end) fd_ringbuffer_grow(ring, ndwords); } -- 2.30.2