mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 02:16:17 +00:00
igt/gem_cs_prefetch: Convert to intel_require_memory()
Replace the open-coded memory check with intel_require_memory. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
e10ba6b51c
commit
26507f3e21
@ -76,7 +76,6 @@ igt_simple_main
|
|||||||
{
|
{
|
||||||
uint32_t batch_end[4] = {MI_BATCH_BUFFER_END, 0, 0, 0};
|
uint32_t batch_end[4] = {MI_BATCH_BUFFER_END, 0, 0, 0};
|
||||||
int fd, i, ret;
|
int fd, i, ret;
|
||||||
uint64_t aper_size;
|
|
||||||
int count;
|
int count;
|
||||||
drm_intel_bo *sample_batch_bo;
|
drm_intel_bo *sample_batch_bo;
|
||||||
|
|
||||||
@ -89,13 +88,8 @@ igt_simple_main
|
|||||||
|
|
||||||
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
|
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
|
||||||
|
|
||||||
aper_size = gem_aperture_size(fd);
|
count = gem_aperture_size(fd) / 4096;
|
||||||
|
intel_require_memory(count, 4096, CHECK_RAM);
|
||||||
/* presume a big per-bo overhead */
|
|
||||||
igt_skip_on_f(intel_get_total_ram_mb() < (aper_size / (1024*1024)) * 3 / 2,
|
|
||||||
"not enough mem to run test\n");
|
|
||||||
|
|
||||||
count = aper_size / 4096;
|
|
||||||
|
|
||||||
batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
|
batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
|
||||||
igt_assert(batch);
|
igt_assert(batch);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user