From 3a7dfcdfafdd6ac83a4d3e7b4c1c52fd901b93ae Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Tue, 6 Oct 2009 14:34:06 -0700 Subject: intel: Add a bo_alloc function for tiled BOs. This simplifies driver code in handling object allocation, and also gives us an opportunity to possibly cache tiled buffers if it turns out to be a win. [anholt: This is chopped out of the execbuf2 patch, as it seems to be useful separately and cleans up the execbuf2 changes to be more obvious] --- libdrm/intel/intel_bufmgr.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libdrm/intel/intel_bufmgr.c') diff --git a/libdrm/intel/intel_bufmgr.c b/libdrm/intel/intel_bufmgr.c index fd5a2e75..2469cd84 100644 --- a/libdrm/intel/intel_bufmgr.c +++ b/libdrm/intel/intel_bufmgr.c @@ -58,6 +58,15 @@ drm_intel_bo *drm_intel_bo_alloc_for_render(drm_intel_bufmgr *bufmgr, return bufmgr->bo_alloc_for_render(bufmgr, name, size, alignment); } +drm_intel_bo * +drm_intel_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name, + int x, int y, int cpp, uint32_t *tiling_mode, + unsigned long *pitch, unsigned long flags) +{ + return bufmgr->bo_alloc_tiled(bufmgr, name, x, y, cpp, + tiling_mode, pitch, flags); +} + void drm_intel_bo_reference(drm_intel_bo *bo) { bo->bufmgr->bo_reference(bo); -- cgit v1.2.3