Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
return (void *)(uintptr_t)mmap_arg.addr_ptr;
}
+uint64_t gem_available_aperture_size(int fd)
+{
+ struct drm_i915_gem_get_aperture aperture;
+
+ aperture.aper_size = 256*1024*1024;
+ do_ioctl(fd, DRM_IOCTL_I915_GEM_GET_APERTURE, &aperture);
+ return aperture.aper_available_size;
+}
+
uint64_t gem_aperture_size(int fd)
{
struct drm_i915_gem_get_aperture aperture;
void *gem_mmap__cpu(int fd, uint32_t handle, int size, int prot);
#define gem_mmap gem_mmap__gtt
+uint64_t gem_available_aperture_size(int fd);
uint64_t gem_aperture_size(int fd);
uint64_t gem_mappable_aperture_size(void);
int gem_madvise(int fd, uint32_t handle, int state);