summaryrefslogtreecommitdiff
path: root/lib/igt_aux.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-02-19 22:17:45 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-02-28 21:06:49 +0000
commit6be2dc8ddfa332d129149aa3b13db14fa2cd6c0a (patch)
tree732ce1f224a22f059f26c0c2a2de78bf518c8a6c /lib/igt_aux.h
parent0f0db14e7f4ec41251ca156d7cb5b8d531a38006 (diff)
lib: Incrementally mlock()
As we already have the previous portion of the mmap mlocked, we only need to mlock() the fresh portion for testing available memory. v2: Fixup the uint64_t pointer arithmetric and only use a single mmap to avoid subsequent mlock fail (for reasons unknown, but bet on mm/). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Caz Yokoyama <Caz.Yokoyama@intel.com> Reviewed-by: Caz Yokoyama <Caz.Yokoyama@intel.com>
Diffstat (limited to 'lib/igt_aux.h')
-rw-r--r--lib/igt_aux.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index fb02c026..09b6246b 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -194,7 +194,7 @@ void intel_purge_vm_caches(int fd);
uint64_t intel_get_avail_ram_mb(void);
uint64_t intel_get_total_ram_mb(void);
uint64_t intel_get_total_swap_mb(void);
-size_t intel_get_total_pinnable_mem(void);
+void *intel_get_total_pinnable_mem(size_t *pinned);
int __intel_check_memory(uint64_t count, uint64_t size, unsigned mode,
uint64_t *out_required, uint64_t *out_total);