With a new enough drm/msm, we can let the kernel know about buffers that are in the bo cache, so the kernel can free them under memory pressure.
eb846d4 freedreno: add madvise support
freedreno/freedreno_bo_cache.c | 10 ++++++++++
freedreno/freedreno_device.c | 10 ++++++++++
freedreno/freedreno_priv.h | 9 +++++++++
freedreno/kgsl/kgsl_bo.c | 6 ++++++
freedreno/msm/msm_bo.c | 20 ++++++++++++++++++++
5 files changed, 55 insertions(+)
Upstream: cgit.freedesktop.org