mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-21 21:32:56 +00:00
tests/gem_*_blits: reduce buffer count to not trash swap
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/sysinfo.h>
|
||||
|
||||
#include "intel_gpu_tools.h"
|
||||
#include "i915_drm.h"
|
||||
@@ -73,3 +74,19 @@ int intel_gen(uint32_t devid)
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
intel_get_total_ram_mb(void)
|
||||
{
|
||||
struct sysinfo sysinf;
|
||||
uint64_t retval;
|
||||
int ret;
|
||||
|
||||
ret = sysinfo(&sysinf);
|
||||
assert(ret == 0);
|
||||
|
||||
retval = sysinf.totalram;
|
||||
retval *= sysinf.mem_unit;
|
||||
|
||||
return retval / (1024*1024);
|
||||
}
|
||||
|
||||
@@ -80,6 +80,7 @@ struct pci_device *intel_get_pci_device(void);
|
||||
|
||||
uint32_t intel_get_drm_devid(int fd);
|
||||
int intel_gen(uint32_t devid);
|
||||
uint64_t intel_get_total_ram_mb(void);
|
||||
|
||||
void intel_map_file(char *);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user