summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ca5584)
raw | patch | inline | side by side (parent: 7ca5584)
author | Chris Wilson <chris@chris-wilson.co.uk> | |
Tue, 11 May 2010 07:54:06 +0000 (08:54 +0100) | ||
committer | Chris Wilson <chris@chris-wilson.co.uk> | |
Tue, 11 May 2010 07:54:06 +0000 (08:54 +0100) |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
intel/intel_bufmgr.c | patch | blob | history | |
intel/intel_bufmgr.h | patch | blob | history | |
intel/intel_bufmgr_gem.c | patch | blob | history | |
intel/intel_bufmgr_priv.h | patch | blob | history |
diff --git a/intel/intel_bufmgr.c b/intel/intel_bufmgr.c
index ce21a332341f1c6c8b3835beac12316654c3d3fa..9144fdd4732dc3eb4fd0ad1a84920468fadf5603 100644 (file)
--- a/intel/intel_bufmgr.c
+++ b/intel/intel_bufmgr.c
return 0;
}
+int drm_intel_bo_is_reusable(drm_intel_bo *bo)
+{
+ if (bo->bufmgr->bo_is_reusable)
+ return bo->bufmgr->bo_is_reusable(bo);
+ return 0;
+}
+
int drm_intel_bo_busy(drm_intel_bo *bo)
{
if (bo->bufmgr->bo_busy)
diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h
index 0984ab0875ca2b041b8d6a9abfbffb1adebedd44..cbcddb651f2b0c4dd12b6420c14493cc8a9061db 100644 (file)
--- a/intel/intel_bufmgr.h
+++ b/intel/intel_bufmgr.h
int drm_intel_bo_madvise(drm_intel_bo *bo, int madv);
int drm_intel_bo_disable_reuse(drm_intel_bo *bo);
+int drm_intel_bo_is_reusable(drm_intel_bo *bo);
int drm_intel_bo_references(drm_intel_bo *bo, drm_intel_bo *target_bo);
/* drm_intel_bufmgr_gem.c */
index 8fa5631d17ff914cfa1c48547d23e60e1ec3b933..9daa89ade989b5deac64793a4f8b034cc6dc3958 100644 (file)
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
return 0;
}
+static int
+drm_intel_gem_bo_is_reusable(drm_intel_bo *bo)
+{
+ drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
+
+ return bo_gem->reusable;
+}
+
static int
_drm_intel_gem_bo_references(drm_intel_bo *bo, drm_intel_bo *target_bo)
{
bufmgr_gem->bufmgr.check_aperture_space =
drm_intel_gem_check_aperture_space;
bufmgr_gem->bufmgr.bo_disable_reuse = drm_intel_gem_bo_disable_reuse;
+ bufmgr_gem->bufmgr.bo_is_reusable = drm_intel_gem_bo_is_reusable;
bufmgr_gem->bufmgr.get_pipe_from_crtc_id =
drm_intel_gem_get_pipe_from_crtc_id;
bufmgr_gem->bufmgr.bo_references = drm_intel_gem_bo_references;
index fb84e70f3b8a9c9db8417305b5fcccd9b4ccf768..f987d97afa5750e444a9a6cd43d85228411aefb4 100644 (file)
*/
int (*bo_disable_reuse) (drm_intel_bo *bo);
+ /**
+ * Query whether a buffer is reusable.
+ *
+ * \param bo Buffer to query
+ */
+ int (*bo_is_reusable) (drm_intel_bo *bo);
+
/**
*
* Return the pipe associated with a crtc_id so that vblank