mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-24 16:26:13 +00:00
lib: add gem_available_aperture_size helper
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
33ef528490
commit
1a95c710f9
@ -588,6 +588,15 @@ void *gem_mmap__cpu(int fd, uint32_t handle, int size, int prot)
|
||||
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;
|
||||
|
@ -79,6 +79,7 @@ void *gem_mmap__gtt(int fd, uint32_t handle, int size, int prot);
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user