diff --git a/src/freedreno/drm/freedreno_ringbuffer.h b/src/freedreno/drm/freedreno_ringbuffer.h index 8e6b3e90110..cf47a76e7e6 100644 --- a/src/freedreno/drm/freedreno_ringbuffer.h +++ b/src/freedreno/drm/freedreno_ringbuffer.h @@ -173,9 +173,8 @@ fd_ringbuffer_grow(struct fd_ringbuffer *ring, uint32_t ndwords) { assert(ring->funcs->grow); /* unsupported on kgsl */ - /* there is an upper bound on IB size, which appears to be 0x100000 */ - if (ring->size < 0x100000) - ring->size *= 2; + /* there is an upper bound on IB size, which appears to be 0x0fffff */ + ring->size = MIN2(ring->size << 1, 0x0fffff); ring->funcs->grow(ring, ring->size); }