From 276c07d8855f748c043dfe3ab8c4da954ba0fe1e Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Thu, 13 Nov 2008 13:52:04 -0800 Subject: libdrm: add support for i915 GTT mapping ioctl Add a drm_intel_gem_bo_map_gtt() function for mapping a buffer object through the aperture rather than directly to its CPU cacheable memory. --- libdrm/intel/intel_bufmgr.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libdrm/intel/intel_bufmgr.h') diff --git a/libdrm/intel/intel_bufmgr.h b/libdrm/intel/intel_bufmgr.h index e3af886b..361e4345 100644 --- a/libdrm/intel/intel_bufmgr.h +++ b/libdrm/intel/intel_bufmgr.h @@ -47,6 +47,13 @@ struct _drm_intel_bo { * allocation, such as being aligned to page size. */ unsigned long size; + /** + * Alignment requirement for object + * + * Used for GTT mapping & pinning the object. + */ + unsigned long align; + /** * Card virtual address (offset from the beginning of the aperture) for the * object. Only valid while validated. @@ -98,6 +105,7 @@ drm_intel_bo *drm_intel_bo_gem_create_from_name(drm_intel_bufmgr *bufmgr, const char *name, unsigned int handle); void drm_intel_bufmgr_gem_enable_reuse(drm_intel_bufmgr *bufmgr); +int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo); /* drm_intel_bufmgr_fake.c */ drm_intel_bufmgr *drm_intel_bufmgr_fake_init(int fd, -- cgit v1.2.3