mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-26 17:26:14 +00:00
lib: Restore gem_available_aperture_size()
Missed an error whilst rebasing and trying to modify the previous patch to keep this function intact... Instead, I now have to add this patch to restore gem_available_aperture_size() and its one usage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
391b32c382
commit
16038908de
@ -1226,6 +1226,25 @@ bool gem_has_bsd2(int fd)
|
|||||||
has_bsd2 = gem_has_enable_ring(fd,LOCAL_I915_PARAM_HAS_BSD2);
|
has_bsd2 = gem_has_enable_ring(fd,LOCAL_I915_PARAM_HAS_BSD2);
|
||||||
return has_bsd2;
|
return has_bsd2;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* gem_available_aperture_size:
|
||||||
|
* @fd: open i915 drm file descriptor
|
||||||
|
*
|
||||||
|
* Feature test macro to query the kernel for the available gpu aperture size
|
||||||
|
* usable in a batchbuffer.
|
||||||
|
*
|
||||||
|
* Returns: The available gtt address space size.
|
||||||
|
*/
|
||||||
|
uint64_t gem_available_aperture_size(int fd)
|
||||||
|
{
|
||||||
|
struct drm_i915_gem_get_aperture aperture;
|
||||||
|
|
||||||
|
memset(&aperture, 0, sizeof(aperture));
|
||||||
|
aperture.aper_size = 256*1024*1024;
|
||||||
|
do_ioctl(fd, DRM_IOCTL_I915_GEM_GET_APERTURE, &aperture);
|
||||||
|
|
||||||
|
return aperture.aper_available_size;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gem_aperture_size:
|
* gem_aperture_size:
|
||||||
|
@ -143,6 +143,7 @@ int gem_gtt_type(int fd);
|
|||||||
bool gem_uses_ppgtt(int fd);
|
bool gem_uses_ppgtt(int fd);
|
||||||
bool gem_uses_full_ppgtt(int fd);
|
bool gem_uses_full_ppgtt(int fd);
|
||||||
int gem_available_fences(int fd);
|
int gem_available_fences(int fd);
|
||||||
|
uint64_t gem_available_aperture_size(int fd);
|
||||||
uint64_t gem_aperture_size(int fd);
|
uint64_t gem_aperture_size(int fd);
|
||||||
uint64_t gem_global_aperture_size(int fd);
|
uint64_t gem_global_aperture_size(int fd);
|
||||||
uint64_t gem_mappable_aperture_size(void);
|
uint64_t gem_mappable_aperture_size(void);
|
||||||
|
@ -418,7 +418,7 @@ static void test_plane_rotation_exhaust_fences(data_t *data, enum igt_plane plan
|
|||||||
* for creating (MAX_FENCES+1) framebuffers.
|
* for creating (MAX_FENCES+1) framebuffers.
|
||||||
*/
|
*/
|
||||||
total_fbs_size = size * (MAX_FENCES + 1);
|
total_fbs_size = size * (MAX_FENCES + 1);
|
||||||
total_aperture_size = gem_global_aperture_size(fd);
|
total_aperture_size = gem_available_aperture_size(fd);
|
||||||
igt_require(total_fbs_size < total_aperture_size * 0.9);
|
igt_require(total_fbs_size < total_aperture_size * 0.9);
|
||||||
|
|
||||||
igt_plane_set_fb(plane, NULL);
|
igt_plane_set_fb(plane, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user