diff options
author | Boris Brezillon <[email protected]> | 2017-09-26 13:37:40 +0200 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2017-11-09 10:57:17 -0800 |
commit | 359a8f6ae5a2e33ffd8dd2a06883fad83e7e09c9 (patch) | |
tree | fd3ec9fcbf75c81dcd381306c4d682819c57bee2 /src/gallium/drivers/vc4/vc4_screen.h | |
parent | 7d72af4f09c0482661096797594287e6d7d5c1b2 (diff) |
broadcom/vc4: Mark BOs as purgeable when they enter the BO cache
This patch makes use of the DRM_IOCTL_VC4_GEM_MADVISE ioctl to mark all
BOs placed in the mesa BO cache as purgeable so that the system can
reclaim this memory under memory pressure.
v2:
- Removed BOs from the cache when they've been purged by the kernel
- Check whether the madvise ioctl is supported or not before using it
v3: Don't walk the whole list when we find a busy BO (by anholt, acked by
Boris)
Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_screen.h')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_screen.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_screen.h b/src/gallium/drivers/vc4/vc4_screen.h index 85108219ee3..09d1c342ed1 100644 --- a/src/gallium/drivers/vc4/vc4_screen.h +++ b/src/gallium/drivers/vc4/vc4_screen.h @@ -95,6 +95,7 @@ struct vc4_screen { bool has_control_flow; bool has_etc1; bool has_threaded_fs; + bool has_madvise; bool has_tiling_ioctl; struct vc4_simulator_file *sim_file; |