2 * Copyright © 2014 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 * Daniel Vetter <daniel.vetter@ffwll.ch>
31 #include <intel_bufmgr.h>
33 /* auxialiary igt helpers from igt_aux.c */
34 /* generally useful helpers */
35 void igt_fork_signal_helper(void);
36 void igt_stop_signal_helper(void);
37 void igt_exchange_int(void *array, unsigned i, unsigned j);
38 void igt_permute_array(void *array, unsigned size,
39 void (*exchange_func)(void *array,
42 void igt_progress(const char *header, uint64_t i, uint64_t total);
43 bool igt_check_boolean_env_var(const char *env_var, bool default_value);
45 bool igt_aub_dump_enabled(void);
47 /* helpers based upon the libdrm buffer manager */
48 void igt_init_aperture_trashers(drm_intel_bufmgr *bufmgr);
49 void igt_trash_aperture(void);
50 void igt_cleanup_aperture_trashers(void);
52 /* suspend and auto-resume system */
53 void igt_system_suspend_autoresume(void);
55 /* dropping priviledges */
56 void igt_drop_root(void);
58 void igt_wait_for_keypress(void);
60 /* sysinfo cross-arch wrappers from intel_os.c */
62 /* These are separate to allow easier testing when porting, see the comment at
63 * the bottom of intel_os.c. */
64 void intel_purge_vm_caches(void);
65 uint64_t intel_get_avail_ram_mb(void);
66 uint64_t intel_get_total_ram_mb(void);
67 uint64_t intel_get_total_swap_mb(void);
69 #endif /* IGT_AUX_H */