vc4: Add a userspace BO cache

Graphics / Mesa 3D Graphics Library / Mesa - Eric Anholt [anholt.net] - 17 December 2014 18:07 UTC

Since our kernel BOs require CMA allocation, and the use of them requires new mmaps, it's pretty expensive and we should avoid it if possible. Copying my original design for Intel, make a userspace cache that reuses BOs that haven't been shared to other processes but frees BOs that have sat in the cache for over a second.

Improves glxgears framerate on RPi by around 30%.

06890c4 vc4: Add a userspace BO cache.
src/gallium/drivers/vc4/vc4_bufmgr.c | 131 +++++++++++++++++++++++++++++++++-
src/gallium/drivers/vc4/vc4_bufmgr.h | 34 ++++++++-
src/gallium/drivers/vc4/vc4_screen.c | 2 +
src/gallium/drivers/vc4/vc4_screen.h | 12 ++++
4 files changed, 175 insertions(+), 4 deletions(-)

Upstream: cgit.freedesktop.org


  • Share