drm/vc4: Add a BO cache.
We need to allocate new BOs in the kernel as part of each frame, but
the CMA allocator is way too slow for that. As an optimization, keep
track of recently-freed BOs and reuse them, with a 1 second timeout to
fully free them back to the system.
This improves 3D performance by about 15%.
Signed-off-by:
Eric Anholt <eric@anholt.net>
Showing
- drivers/gpu/drm/vc4/vc4_bo.c 330 additions, 6 deletionsdrivers/gpu/drm/vc4/vc4_bo.c
- drivers/gpu/drm/vc4/vc4_debugfs.c 1 addition, 0 deletionsdrivers/gpu/drm/vc4/vc4_debugfs.c
- drivers/gpu/drm/vc4/vc4_drv.c 5 additions, 1 deletiondrivers/gpu/drm/vc4/vc4_drv.c
- drivers/gpu/drm/vc4/vc4_drv.h 48 additions, 1 deletiondrivers/gpu/drm/vc4/vc4_drv.h
Loading
Please register or sign in to comment