From 5b5ce301287fb8ef74b45fad3c10b2d4ac3a9cc6 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 11 May 2009 13:42:12 -0700 Subject: libdrm/intel: add drm_intel_bo_disable_reuse api Scanout buffers need to be freed through the kernel as it holds a reference to them; exposing this API allows applications allocating scanout buffers to flag them as not reusable. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt --- libdrm/intel/intel_bufmgr_priv.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libdrm/intel/intel_bufmgr_priv.h') diff --git a/libdrm/intel/intel_bufmgr_priv.h b/libdrm/intel/intel_bufmgr_priv.h index 82d87b4c..3484dee8 100644 --- a/libdrm/intel/intel_bufmgr_priv.h +++ b/libdrm/intel/intel_bufmgr_priv.h @@ -178,6 +178,16 @@ struct _drm_intel_bufmgr { int (*bo_flink)(drm_intel_bo *bo, uint32_t *name); int (*check_aperture_space)(drm_intel_bo **bo_array, int count); + + /** + * Disable buffer reuse for buffers which will be shared in some way, + * as with scanout buffers. When the buffer reference count goes to zero, + * it will be freed and not placed in the reuse list. + * + * \param bo Buffer to disable reuse for + */ + int (*bo_disable_reuse)(drm_intel_bo *bo); + int debug; /**< Enables verbose debugging printouts */ }; -- cgit v1.2.3