aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_screen.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-12-13 15:27:39 -0800
committerEric Anholt <[email protected]>2014-12-17 16:07:01 -0800
commit06890c444a893a96b6ec1cfb36f77915ec9acda8 (patch)
tree779fd6b1c624a69cbebae7ad4ab118d29889015a /src/gallium/drivers/vc4/vc4_screen.c
parent39bc9360116e1c944c1d0d04f67a6ec5f010371f (diff)
vc4: Add a userspace BO cache.
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%.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_screen.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_screen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
index b532cc6782f..8d216338bf7 100644
--- a/src/gallium/drivers/vc4/vc4_screen.c
+++ b/src/gallium/drivers/vc4/vc4_screen.c
@@ -76,6 +76,7 @@ vc4_screen_get_vendor(struct pipe_screen *pscreen)
static void
vc4_screen_destroy(struct pipe_screen *pscreen)
{
+ vc4_bufmgr_destroy(pscreen);
ralloc_free(pscreen);
}
@@ -449,6 +450,7 @@ vc4_screen_create(int fd)
pscreen->is_format_supported = vc4_screen_is_format_supported;
screen->fd = fd;
+ make_empty_list(&screen->bo_cache.time_list);
vc4_fence_init(screen);