mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 17:36:11 +00:00
s/drmtest_/igt_/
Requested-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
814b135541
commit
1caaf0a6b6
102
lib/drmtest.c
102
lib/drmtest.c
@ -277,7 +277,7 @@ int drm_open_any(void)
|
||||
return fd;
|
||||
|
||||
gem_quiescent_gpu(fd);
|
||||
drmtest_install_exit_handler(quiescent_gpu_at_exit);
|
||||
igt_install_exit_handler(quiescent_gpu_at_exit);
|
||||
|
||||
return fd;
|
||||
}
|
||||
@ -406,9 +406,9 @@ void gem_check_caching(int fd)
|
||||
gem_close(fd, arg.handle);
|
||||
|
||||
if (ret != 0) {
|
||||
if (!drmtest_only_list_subtests())
|
||||
if (!igt_only_list_subtests())
|
||||
printf("no set_caching support detected\n");
|
||||
drmtest_skip();
|
||||
igt_skip();
|
||||
}
|
||||
}
|
||||
|
||||
@ -422,7 +422,7 @@ void gem_set_caching(int fd, uint32_t handle, int caching)
|
||||
ret = ioctl(fd, LOCAL_DRM_IOCTL_I915_GEM_SET_CACHEING, &arg);
|
||||
|
||||
if (ret != 0 && (errno == ENOTTY || errno == EINVAL))
|
||||
drmtest_skip();
|
||||
igt_skip();
|
||||
else
|
||||
assert(ret == 0);
|
||||
}
|
||||
@ -635,15 +635,15 @@ static void sig_handler(int i)
|
||||
|
||||
static void signal_helper_exit_handler(int sig)
|
||||
{
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
}
|
||||
|
||||
void drmtest_fork_signal_helper(void)
|
||||
void igt_fork_signal_helper(void)
|
||||
{
|
||||
pid_t pid;
|
||||
sighandler_t oldsig;
|
||||
|
||||
drmtest_install_exit_handler(signal_helper_exit_handler);
|
||||
igt_install_exit_handler(signal_helper_exit_handler);
|
||||
|
||||
signal(SIGUSR1, sig_handler);
|
||||
oldsig = signal(SIGQUIT, SIG_DFL);
|
||||
@ -657,7 +657,7 @@ void drmtest_fork_signal_helper(void)
|
||||
signal_helper = pid;
|
||||
}
|
||||
|
||||
void drmtest_stop_signal_helper(void)
|
||||
void igt_stop_signal_helper(void)
|
||||
{
|
||||
int exitcode;
|
||||
|
||||
@ -680,7 +680,7 @@ static bool in_subtest = false;
|
||||
static bool test_with_subtests = false;
|
||||
static bool skip_subtests_henceforth = false;
|
||||
|
||||
void drmtest_subtest_init(int argc, char **argv)
|
||||
void igt_subtest_init(int argc, char **argv)
|
||||
{
|
||||
int c, option_index = 0;
|
||||
static struct option long_options[] = {
|
||||
@ -714,10 +714,10 @@ out:
|
||||
|
||||
/*
|
||||
* Note: Testcases which use these helpers MUST NOT output anything to stdout
|
||||
* outside of places protected by drmtest_run_subtest checks - the piglit
|
||||
* outside of places protected by igt_run_subtest checks - the piglit
|
||||
* runner adds every line to the subtest list.
|
||||
*/
|
||||
bool __drmtest_run_subtest(const char *subtest_name)
|
||||
bool __igt_run_subtest(const char *subtest_name)
|
||||
{
|
||||
assert(in_subtest == false);
|
||||
|
||||
@ -739,7 +739,7 @@ bool __drmtest_run_subtest(const char *subtest_name)
|
||||
}
|
||||
}
|
||||
|
||||
bool drmtest_only_list_subtests(void)
|
||||
bool igt_only_list_subtests(void)
|
||||
{
|
||||
return list_subtests;
|
||||
}
|
||||
@ -747,16 +747,16 @@ bool drmtest_only_list_subtests(void)
|
||||
static bool skipped_one = false;
|
||||
static bool succeeded_one = false;
|
||||
static bool failed_one = false;
|
||||
static int drmtest_exitcode;
|
||||
static int igt_exitcode;
|
||||
|
||||
static void exit_subtest(void) __attribute__((noreturn));
|
||||
static void exit_subtest(void)
|
||||
{
|
||||
in_subtest = false;
|
||||
longjmp(drmtest_subtest_jmpbuf, 1);
|
||||
longjmp(igt_subtest_jmpbuf, 1);
|
||||
}
|
||||
|
||||
void drmtest_skip(void)
|
||||
void igt_skip(void)
|
||||
{
|
||||
skipped_one = true;
|
||||
if (in_subtest)
|
||||
@ -767,19 +767,19 @@ void drmtest_skip(void)
|
||||
exit(77);
|
||||
}
|
||||
|
||||
void drmtest_success(void)
|
||||
void igt_success(void)
|
||||
{
|
||||
succeeded_one = true;
|
||||
if (in_subtest)
|
||||
exit_subtest();
|
||||
}
|
||||
|
||||
void drmtest_fail(int exitcode)
|
||||
void igt_fail(int exitcode)
|
||||
{
|
||||
assert(exitcode != 0 && exitcode != 77);
|
||||
|
||||
if (!failed_one)
|
||||
drmtest_exitcode = exitcode;
|
||||
igt_exitcode = exitcode;
|
||||
|
||||
failed_one = true;
|
||||
|
||||
@ -791,16 +791,16 @@ void drmtest_fail(int exitcode)
|
||||
}
|
||||
}
|
||||
|
||||
int drmtest_retval(void)
|
||||
int igt_retval(void)
|
||||
{
|
||||
if (drmtest_only_list_subtests())
|
||||
if (igt_only_list_subtests())
|
||||
return 0;
|
||||
|
||||
/* Calling this without calling one of the above is a failure */
|
||||
assert(skipped_one || succeeded_one || failed_one);
|
||||
|
||||
if (failed_one)
|
||||
return drmtest_exitcode;
|
||||
return igt_exitcode;
|
||||
else if (succeeded_one)
|
||||
return 0;
|
||||
else
|
||||
@ -818,7 +818,7 @@ static bool env_set(const char *env_var, bool default_value)
|
||||
return atoi(val) != 0;
|
||||
}
|
||||
|
||||
bool drmtest_run_in_simulation(void)
|
||||
bool igt_run_in_simulation(void)
|
||||
{
|
||||
static int simulation = -1;
|
||||
|
||||
@ -830,17 +830,17 @@ bool drmtest_run_in_simulation(void)
|
||||
|
||||
/* Skip the test when running on simulation (and that's relevant only when
|
||||
* we're not in the mode where we list the subtests) */
|
||||
void drmtest_skip_on_simulation(void)
|
||||
void igt_skip_on_simulation(void)
|
||||
{
|
||||
if (drmtest_only_list_subtests())
|
||||
if (igt_only_list_subtests())
|
||||
return;
|
||||
|
||||
if (drmtest_run_in_simulation())
|
||||
if (igt_run_in_simulation())
|
||||
exit(77);
|
||||
}
|
||||
|
||||
/* other helpers */
|
||||
void drmtest_exchange_int(void *array, unsigned i, unsigned j)
|
||||
void igt_exchange_int(void *array, unsigned i, unsigned j)
|
||||
{
|
||||
int *int_arr, tmp;
|
||||
int_arr = array;
|
||||
@ -850,7 +850,7 @@ void drmtest_exchange_int(void *array, unsigned i, unsigned j)
|
||||
int_arr[j] = tmp;
|
||||
}
|
||||
|
||||
void drmtest_permute_array(void *array, unsigned size,
|
||||
void igt_permute_array(void *array, unsigned size,
|
||||
void (*exchange_func)(void *array,
|
||||
unsigned i,
|
||||
unsigned j))
|
||||
@ -865,7 +865,7 @@ void drmtest_permute_array(void *array, unsigned size,
|
||||
}
|
||||
}
|
||||
|
||||
void drmtest_progress(const char *header, uint64_t i, uint64_t total)
|
||||
void igt_progress(const char *header, uint64_t i, uint64_t total)
|
||||
{
|
||||
int divider = 200;
|
||||
|
||||
@ -891,7 +891,7 @@ void drmtest_progress(const char *header, uint64_t i, uint64_t total)
|
||||
drm_intel_bo **trash_bos;
|
||||
int num_trash_bos;
|
||||
|
||||
void drmtest_init_aperture_trashers(drm_intel_bufmgr *bufmgr)
|
||||
void igt_init_aperture_trashers(drm_intel_bufmgr *bufmgr)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -904,7 +904,7 @@ void drmtest_init_aperture_trashers(drm_intel_bufmgr *bufmgr)
|
||||
trash_bos[i] = drm_intel_bo_alloc(bufmgr, "trash bo", 1024*1024, 4096);
|
||||
}
|
||||
|
||||
void drmtest_trash_aperture(void)
|
||||
void igt_trash_aperture(void)
|
||||
{
|
||||
int i;
|
||||
uint8_t *gtt_ptr;
|
||||
@ -917,7 +917,7 @@ void drmtest_trash_aperture(void)
|
||||
}
|
||||
}
|
||||
|
||||
void drmtest_cleanup_aperture_trashers(void)
|
||||
void igt_cleanup_aperture_trashers(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1397,7 +1397,7 @@ static struct {
|
||||
bool installed;
|
||||
} orig_sig[MAX_SIGNALS];
|
||||
|
||||
static drmtest_exit_handler_t exit_handler_fn[MAX_EXIT_HANDLERS];
|
||||
static igt_exit_handler_t exit_handler_fn[MAX_EXIT_HANDLERS];
|
||||
static int exit_handler_count;
|
||||
static bool exit_handler_disabled;
|
||||
static sigset_t saved_sig_mask;
|
||||
@ -1443,7 +1443,7 @@ static void call_exit_handlers(int sig)
|
||||
exit_handler_fn[i](sig);
|
||||
}
|
||||
|
||||
static void drmtest_atexit_handler(void)
|
||||
static void igt_atexit_handler(void)
|
||||
{
|
||||
restore_all_sig_handler();
|
||||
|
||||
@ -1451,7 +1451,7 @@ static void drmtest_atexit_handler(void)
|
||||
call_exit_handlers(0);
|
||||
}
|
||||
|
||||
static void drmtest_sig_handler(int sig)
|
||||
static void igt_sig_handler(int sig)
|
||||
{
|
||||
restore_all_sig_handler();
|
||||
|
||||
@ -1475,7 +1475,7 @@ static void drmtest_sig_handler(int sig)
|
||||
* The handler will be passed the signal number if called due to a signal, or
|
||||
* 0 otherwise.
|
||||
*/
|
||||
int drmtest_install_exit_handler(drmtest_exit_handler_t fn)
|
||||
int igt_install_exit_handler(igt_exit_handler_t fn)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1490,11 +1490,11 @@ int drmtest_install_exit_handler(drmtest_exit_handler_t fn)
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(handled_signals); i++) {
|
||||
if (install_sig_handler(handled_signals[i],
|
||||
drmtest_sig_handler))
|
||||
igt_sig_handler))
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (atexit(drmtest_atexit_handler))
|
||||
if (atexit(igt_atexit_handler))
|
||||
goto err;
|
||||
|
||||
return 0;
|
||||
@ -1505,7 +1505,7 @@ err:
|
||||
return -1;
|
||||
}
|
||||
|
||||
void drmtest_disable_exit_handler(void)
|
||||
void igt_disable_exit_handler(void)
|
||||
{
|
||||
sigset_t set;
|
||||
int i;
|
||||
@ -1525,7 +1525,7 @@ void drmtest_disable_exit_handler(void)
|
||||
exit_handler_disabled = true;
|
||||
}
|
||||
|
||||
void drmtest_enable_exit_handler(void)
|
||||
void igt_enable_exit_handler(void)
|
||||
{
|
||||
if (!exit_handler_disabled)
|
||||
return;
|
||||
@ -1575,16 +1575,16 @@ static void restore_vt_mode_at_exit(int sig)
|
||||
* original mode.
|
||||
*/
|
||||
|
||||
int drmtest_set_vt_graphics_mode(void)
|
||||
int igt_set_vt_graphics_mode(void)
|
||||
{
|
||||
if (drmtest_install_exit_handler(restore_vt_mode_at_exit))
|
||||
if (igt_install_exit_handler(restore_vt_mode_at_exit))
|
||||
return -1;
|
||||
|
||||
drmtest_disable_exit_handler();
|
||||
igt_disable_exit_handler();
|
||||
orig_vt_mode = set_vt_mode(KD_GRAPHICS);
|
||||
if (orig_vt_mode < 0)
|
||||
orig_vt_mode = -1UL;
|
||||
drmtest_enable_exit_handler();
|
||||
igt_enable_exit_handler();
|
||||
|
||||
return orig_vt_mode < 0 ? -1 : 0;
|
||||
}
|
||||
@ -1725,7 +1725,7 @@ void kmstest_free_connector_config(struct kmstest_connector_config *config)
|
||||
}
|
||||
|
||||
#define PREFAULT_DEBUGFS "/sys/module/i915/parameters/prefault_disable"
|
||||
static int drmtest_prefault_control(bool enable)
|
||||
static int igt_prefault_control(bool enable)
|
||||
{
|
||||
const char *name = PREFAULT_DEBUGFS;
|
||||
int fd;
|
||||
@ -1758,22 +1758,22 @@ static int drmtest_prefault_control(bool enable)
|
||||
|
||||
static void enable_prefault_at_exit(int sig)
|
||||
{
|
||||
drmtest_enable_prefault();
|
||||
igt_enable_prefault();
|
||||
}
|
||||
|
||||
int drmtest_disable_prefault(void)
|
||||
int igt_disable_prefault(void)
|
||||
{
|
||||
drmtest_install_exit_handler(enable_prefault_at_exit);
|
||||
igt_install_exit_handler(enable_prefault_at_exit);
|
||||
|
||||
return drmtest_prefault_control(false);
|
||||
return igt_prefault_control(false);
|
||||
}
|
||||
|
||||
int drmtest_enable_prefault(void)
|
||||
int igt_enable_prefault(void)
|
||||
{
|
||||
return drmtest_prefault_control(true);
|
||||
return igt_prefault_control(true);
|
||||
}
|
||||
|
||||
void drmtest_system_suspend_autoresume(void)
|
||||
void igt_system_suspend_autoresume(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -86,36 +86,36 @@ int prime_handle_to_fd(int fd, uint32_t handle);
|
||||
uint32_t prime_fd_to_handle(int fd, int dma_buf_fd);
|
||||
|
||||
/* generally useful helpers */
|
||||
void drmtest_fork_signal_helper(void);
|
||||
void drmtest_stop_signal_helper(void);
|
||||
void drmtest_exchange_int(void *array, unsigned i, unsigned j);
|
||||
void drmtest_permute_array(void *array, unsigned size,
|
||||
void igt_fork_signal_helper(void);
|
||||
void igt_stop_signal_helper(void);
|
||||
void igt_exchange_int(void *array, unsigned i, unsigned j);
|
||||
void igt_permute_array(void *array, unsigned size,
|
||||
void (*exchange_func)(void *array,
|
||||
unsigned i,
|
||||
unsigned j));
|
||||
void drmtest_progress(const char *header, uint64_t i, uint64_t total);
|
||||
void igt_progress(const char *header, uint64_t i, uint64_t total);
|
||||
|
||||
/* subtest infrastructure */
|
||||
jmp_buf drmtest_subtest_jmpbuf;
|
||||
void drmtest_subtest_init(int argc, char **argv);
|
||||
bool __drmtest_run_subtest(const char *subtest_name);
|
||||
#define drmtest_subtest(name) for (; __drmtest_run_subtest((name)) && \
|
||||
(setjmp(drmtest_subtest_jmpbuf) == 0); \
|
||||
drmtest_success())
|
||||
bool drmtest_only_list_subtests(void);
|
||||
void drmtest_skip(void);
|
||||
void drmtest_success(void);
|
||||
void drmtest_fail(int exitcode) __attribute__((noreturn));
|
||||
int drmtest_retval(void);
|
||||
jmp_buf igt_subtest_jmpbuf;
|
||||
void igt_subtest_init(int argc, char **argv);
|
||||
bool __igt_run_subtest(const char *subtest_name);
|
||||
#define igt_subtest(name) for (; __igt_run_subtest((name)) && \
|
||||
(setjmp(igt_subtest_jmpbuf) == 0); \
|
||||
igt_success())
|
||||
bool igt_only_list_subtests(void);
|
||||
void igt_skip(void);
|
||||
void igt_success(void);
|
||||
void igt_fail(int exitcode) __attribute__((noreturn));
|
||||
int igt_retval(void);
|
||||
|
||||
/* check functions which auto-skip tests by calling drmtest_skip() */
|
||||
/* check functions which auto-skip tests by calling igt_skip() */
|
||||
void gem_check_caching(int fd);
|
||||
static inline bool gem_check_vebox(int fd)
|
||||
{
|
||||
if (gem_has_vebox(fd))
|
||||
return true;
|
||||
|
||||
drmtest_skip();
|
||||
igt_skip();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ static inline bool gem_check_bsd(int fd)
|
||||
if (HAS_BSD_RING(intel_get_drm_devid(fd)))
|
||||
return true;
|
||||
|
||||
drmtest_skip();
|
||||
igt_skip();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -133,19 +133,19 @@ static inline bool gem_check_blt(int fd)
|
||||
if (HAS_BLT_RING(intel_get_drm_devid(fd)))
|
||||
return true;
|
||||
|
||||
drmtest_skip();
|
||||
igt_skip();
|
||||
return false;
|
||||
}
|
||||
|
||||
/* helpers to automatically reduce test runtime in simulation */
|
||||
bool drmtest_run_in_simulation(void);
|
||||
#define SLOW_QUICK(slow,quick) (drmtest_run_in_simulation() ? (quick) : (slow))
|
||||
void drmtest_skip_on_simulation(void);
|
||||
bool igt_run_in_simulation(void);
|
||||
#define SLOW_QUICK(slow,quick) (igt_run_in_simulation() ? (quick) : (slow))
|
||||
void igt_skip_on_simulation(void);
|
||||
|
||||
/* helpers based upon the libdrm buffer manager */
|
||||
void drmtest_init_aperture_trashers(drm_intel_bufmgr *bufmgr);
|
||||
void drmtest_trash_aperture(void);
|
||||
void drmtest_cleanup_aperture_trashers(void);
|
||||
void igt_init_aperture_trashers(drm_intel_bufmgr *bufmgr);
|
||||
void igt_trash_aperture(void);
|
||||
void igt_cleanup_aperture_trashers(void);
|
||||
|
||||
struct kmstest_connector_config {
|
||||
drmModeCrtc *crtc;
|
||||
@ -220,19 +220,19 @@ inline static void _do_or_die(const char *function, int line, int ret)
|
||||
#define do_or_die(x) _do_or_die(__FUNCTION__, __LINE__, x)
|
||||
#define do_ioctl(fd, ptr, sz) do_or_die(drmIoctl((fd), (ptr), (sz)))
|
||||
|
||||
typedef void (*drmtest_exit_handler_t)(int sig);
|
||||
typedef void (*igt_exit_handler_t)(int sig);
|
||||
|
||||
/* reliable atexit helpers, also work when killed by a signal (if possible) */
|
||||
int drmtest_install_exit_handler(drmtest_exit_handler_t fn);
|
||||
void drmtest_enable_exit_handler(void);
|
||||
void drmtest_disable_exit_handler(void);
|
||||
int igt_install_exit_handler(igt_exit_handler_t fn);
|
||||
void igt_enable_exit_handler(void);
|
||||
void igt_disable_exit_handler(void);
|
||||
|
||||
/* set vt into graphics mode, required to prevent fbcon from interfering */
|
||||
int drmtest_set_vt_graphics_mode(void);
|
||||
int igt_set_vt_graphics_mode(void);
|
||||
|
||||
/* prefault disabling, needs the corresponding debugfs interface */
|
||||
int drmtest_disable_prefault(void);
|
||||
int drmtest_enable_prefault(void);
|
||||
int igt_disable_prefault(void);
|
||||
int igt_enable_prefault(void);
|
||||
|
||||
/* suspend and auto-resume system */
|
||||
void drmtest_system_suspend_autoresume(void);
|
||||
void igt_system_suspend_autoresume(void);
|
||||
|
@ -60,7 +60,7 @@ int main(int argc, char **argv)
|
||||
int i;
|
||||
char *ptr;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -61,7 +61,7 @@ int main(int argc, char **argv)
|
||||
char *ptr;
|
||||
drm_intel_bo *load_bo;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -61,7 +61,7 @@ int main(int argc, char **argv)
|
||||
int i;
|
||||
char *ptr;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -62,7 +62,7 @@ int main(int argc, char **argv)
|
||||
int i;
|
||||
char *ptr;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -122,7 +122,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int fd;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -80,15 +80,15 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int fd;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
drmtest_subtest("bad-close")
|
||||
igt_subtest("bad-close")
|
||||
test_bad_close(fd);
|
||||
drmtest_subtest("create-close")
|
||||
igt_subtest("create-close")
|
||||
test_create_close(fd);
|
||||
drmtest_subtest("create-fd-close")
|
||||
igt_subtest("create-fd-close")
|
||||
test_create_fd_close(fd);
|
||||
|
||||
return 0;
|
||||
|
@ -94,7 +94,7 @@ blt_bo_fill(drm_intel_bo *tmp_bo, drm_intel_bo *bo, uint8_t val)
|
||||
|
||||
if (bo->offset < mappable_gtt_limit &&
|
||||
(IS_G33(devid) || intel_gen(devid) >= 4))
|
||||
drmtest_trash_aperture();
|
||||
igt_trash_aperture();
|
||||
|
||||
copy_bo(tmp_bo, bo);
|
||||
}
|
||||
@ -111,8 +111,8 @@ int main(int argc, char **argv)
|
||||
uint8_t *cpu_ptr;
|
||||
uint8_t *gtt_ptr;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
srandom(0xdeadbeef);
|
||||
|
||||
@ -138,12 +138,12 @@ int main(int argc, char **argv)
|
||||
|
||||
staging_bo = drm_intel_bo_alloc(bufmgr, "staging bo", BO_SIZE, 4096);
|
||||
|
||||
drmtest_init_aperture_trashers(bufmgr);
|
||||
igt_init_aperture_trashers(bufmgr);
|
||||
mappable_gtt_limit = gem_mappable_aperture_size();
|
||||
|
||||
drmtest_subtest("reads") {
|
||||
igt_subtest("reads") {
|
||||
if (!(flags & TEST_READ))
|
||||
drmtest_skip();
|
||||
igt_skip();
|
||||
|
||||
printf("checking partial reads\n");
|
||||
|
||||
@ -167,13 +167,13 @@ int main(int argc, char **argv)
|
||||
}
|
||||
drm_intel_bo_unmap(scratch_bo);
|
||||
|
||||
drmtest_progress("partial reads test: ", i, ROUNDS);
|
||||
igt_progress("partial reads test: ", i, ROUNDS);
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_subtest("writes") {
|
||||
igt_subtest("writes") {
|
||||
if (!(flags & TEST_WRITE))
|
||||
drmtest_skip();
|
||||
igt_skip();
|
||||
|
||||
printf("checking partial writes\n");
|
||||
|
||||
@ -219,13 +219,13 @@ int main(int argc, char **argv)
|
||||
}
|
||||
drm_intel_gem_bo_unmap_gtt(staging_bo);
|
||||
|
||||
drmtest_progress("partial writes test: ", i, ROUNDS);
|
||||
igt_progress("partial writes test: ", i, ROUNDS);
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_subtest("read-writes") {
|
||||
igt_subtest("read-writes") {
|
||||
if (!((flags & TEST_BOTH) == TEST_BOTH))
|
||||
drmtest_skip();
|
||||
igt_skip();
|
||||
|
||||
printf("checking partial writes after partial reads\n");
|
||||
|
||||
@ -292,14 +292,14 @@ int main(int argc, char **argv)
|
||||
drm_intel_gem_bo_unmap_gtt(staging_bo);
|
||||
drm_intel_bo_unmap(scratch_bo);
|
||||
|
||||
drmtest_progress("partial read/writes test: ", i, ROUNDS);
|
||||
igt_progress("partial read/writes test: ", i, ROUNDS);
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_cleanup_aperture_trashers();
|
||||
igt_cleanup_aperture_trashers();
|
||||
drm_intel_bufmgr_destroy(bufmgr);
|
||||
|
||||
close(fd);
|
||||
|
||||
return drmtest_retval();
|
||||
return igt_retval();
|
||||
}
|
||||
|
@ -95,8 +95,8 @@ main(int argc, char **argv)
|
||||
int width = 512, height = 512;
|
||||
int i, loop, fd;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
@ -108,7 +108,7 @@ main(int argc, char **argv)
|
||||
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
|
||||
batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
|
||||
|
||||
if (!drmtest_only_list_subtests()) {
|
||||
if (!igt_only_list_subtests()) {
|
||||
for (i = 0; i < num_buffers; i++) {
|
||||
src[i] = create_bo(bufmgr, i, width, height);
|
||||
dst[i] = create_bo(bufmgr, ~i, width, height);
|
||||
@ -117,7 +117,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* try to overwrite the source values */
|
||||
drmtest_subtest("overwrite-source") {
|
||||
igt_subtest("overwrite-source") {
|
||||
for (i = 0; i < num_buffers; i++) {
|
||||
set_bo(src[i], i, width, height);
|
||||
set_bo(dst[i], i, width, height);
|
||||
@ -131,7 +131,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* try to read the results before the copy completes */
|
||||
drmtest_subtest("early-read") {
|
||||
igt_subtest("early-read") {
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xdeadbeef, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
@ -141,7 +141,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* and finally try to trick the kernel into loosing the pending write */
|
||||
drmtest_subtest("gpu-read-after-write") {
|
||||
igt_subtest("gpu-read-after-write") {
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xabcdabcd, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
@ -152,10 +152,10 @@ main(int argc, char **argv)
|
||||
cmp_bo(dst[i], 0xabcdabcd, width, height);
|
||||
}
|
||||
|
||||
drmtest_fork_signal_helper();
|
||||
igt_fork_signal_helper();
|
||||
|
||||
/* try to overwrite the source values */
|
||||
drmtest_subtest("overwrite-source-interruptible") {
|
||||
igt_subtest("overwrite-source-interruptible") {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = 0; i < num_buffers; i++) {
|
||||
@ -172,7 +172,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* try to read the results before the copy completes */
|
||||
drmtest_subtest("early-read-interruptible") {
|
||||
igt_subtest("early-read-interruptible") {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = num_buffers; i--; )
|
||||
@ -185,7 +185,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* and finally try to trick the kernel into loosing the pending write */
|
||||
drmtest_subtest("gpu-read-after-write-interruptible") {
|
||||
igt_subtest("gpu-read-after-write-interruptible") {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = num_buffers; i--; )
|
||||
@ -199,7 +199,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
count = aper_size / 4096 * 2;
|
||||
if (drmtest_run_in_simulation())
|
||||
if (igt_run_in_simulation())
|
||||
count = 10;
|
||||
|
||||
handles = malloc (count * sizeof(uint32_t));
|
||||
@ -177,7 +177,7 @@ int main(int argc, char **argv)
|
||||
exec(fd, bad);
|
||||
gem_close(fd, bad);
|
||||
|
||||
drmtest_progress("gem_cpu_reloc: ", i, 2*count);
|
||||
igt_progress("gem_cpu_reloc: ", i, 2*count);
|
||||
}
|
||||
|
||||
/* And again in reverse to try and catch the relocation code out */
|
||||
@ -192,7 +192,7 @@ int main(int argc, char **argv)
|
||||
exec(fd, bad);
|
||||
gem_close(fd, bad);
|
||||
|
||||
drmtest_progress("gem_cpu_reloc: ", count+i, 3*count);
|
||||
igt_progress("gem_cpu_reloc: ", count+i, 3*count);
|
||||
}
|
||||
|
||||
/* Third time lucky? */
|
||||
@ -209,7 +209,7 @@ int main(int argc, char **argv)
|
||||
exec(fd, bad);
|
||||
gem_close(fd, bad);
|
||||
|
||||
drmtest_progress("gem_cpu_reloc: ", 2*count+i, 3*count);
|
||||
igt_progress("gem_cpu_reloc: ", 2*count+i, 3*count);
|
||||
}
|
||||
|
||||
printf("Test suceeded, cleanup up - this might take a while.\n");
|
||||
|
@ -96,7 +96,7 @@ int main(int argc, char **argv)
|
||||
int count;
|
||||
drm_intel_bo *sample_batch_bo;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
@ -162,7 +162,7 @@ int main(int argc, char **argv)
|
||||
|
||||
// leak buffers
|
||||
//drm_intel_bo_unreference(batch_bo);
|
||||
drmtest_progress("gem_cs_prefetch: ", i, count);
|
||||
igt_progress("gem_cs_prefetch: ", i, count);
|
||||
}
|
||||
|
||||
printf("Test suceeded, cleanup up - this might take a while.\n");
|
||||
|
@ -110,7 +110,7 @@ static void run_on_ring(int fd, unsigned ring_id, const char *ring_name)
|
||||
gtt_offset = 0;
|
||||
|
||||
for (split = 0; split < BATCH_SIZE/8 - 1; split += 2) {
|
||||
drmtest_progress(buf, split, BATCH_SIZE/8 - 1);
|
||||
igt_progress(buf, split, BATCH_SIZE/8 - 1);
|
||||
|
||||
handle_new = gem_create(fd, BATCH_SIZE);
|
||||
batch_ptr = gem_mmap__cpu(fd, handle_new, BATCH_SIZE,
|
||||
@ -148,34 +148,34 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int fd;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
if (!drmtest_only_list_subtests()) {
|
||||
if (!igt_only_list_subtests()) {
|
||||
/* This test is very sensitive to residual gtt_mm noise from previous
|
||||
* tests. Try to quiet thing down first. */
|
||||
gem_quiescent_gpu(fd);
|
||||
sleep(5); /* needs more serious ducttape */
|
||||
}
|
||||
|
||||
drmtest_subtest("render")
|
||||
igt_subtest("render")
|
||||
run_on_ring(fd, I915_EXEC_RENDER, "render");
|
||||
|
||||
drmtest_subtest("bsd")
|
||||
igt_subtest("bsd")
|
||||
if (gem_check_bsd(fd))
|
||||
run_on_ring(fd, I915_EXEC_BSD, "bsd");
|
||||
|
||||
drmtest_subtest("blt")
|
||||
igt_subtest("blt")
|
||||
if (gem_check_blt(fd))
|
||||
run_on_ring(fd, I915_EXEC_BLT, "blt");
|
||||
|
||||
drmtest_subtest("vebox")
|
||||
igt_subtest("vebox")
|
||||
if (gem_check_vebox(fd))
|
||||
run_on_ring(fd, LOCAL_I915_EXEC_VEBOX, "vebox");
|
||||
|
||||
close(fd);
|
||||
|
||||
return drmtest_retval();
|
||||
return igt_retval();
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
|
||||
uint32_t ctx_id;
|
||||
int ret, fd;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -111,7 +111,7 @@ int main(int argc, char *argv[])
|
||||
uint32_t ctx_id;
|
||||
int fd;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -143,7 +143,7 @@ int main(int argc, char *argv[])
|
||||
fd = drm_open_any();
|
||||
devid = intel_get_drm_devid(fd);
|
||||
|
||||
if (drmtest_run_in_simulation()) {
|
||||
if (igt_run_in_simulation()) {
|
||||
num_contexts = 2;
|
||||
iter = 4;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ int main(int argc, char *argv[])
|
||||
int ret, fd;
|
||||
struct local_drm_i915_gem_context_create create;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
create.ctx_id = rand();
|
||||
create.pad = rand();
|
||||
|
@ -122,7 +122,7 @@ int main(int argc, char *argv[])
|
||||
uint32_t ctx_id;
|
||||
int fd;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -98,7 +98,7 @@ int main(int argc, char **argv)
|
||||
int fd;
|
||||
int devid;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
if (argc != 1) {
|
||||
fprintf(stderr, "usage: %s\n", argv[0]);
|
||||
|
@ -130,8 +130,8 @@ int main(int argc, char **argv)
|
||||
int devid;
|
||||
int num_rings;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
devid = intel_get_drm_devid(fd);
|
||||
@ -160,13 +160,13 @@ int main(int argc, char **argv)
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
drmtest_subtest("render") {
|
||||
igt_subtest("render") {
|
||||
printf("running dummy loop on render\n");
|
||||
dummy_reloc_loop(I915_EXEC_RENDER);
|
||||
printf("dummy loop run on render completed\n");
|
||||
}
|
||||
|
||||
drmtest_subtest("bsd") {
|
||||
igt_subtest("bsd") {
|
||||
if (gem_check_bsd(fd)) {
|
||||
sleep(2);
|
||||
printf("running dummy loop on bsd\n");
|
||||
@ -175,7 +175,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_subtest("blt") {
|
||||
igt_subtest("blt") {
|
||||
if (gem_check_blt(fd)) {
|
||||
sleep(2);
|
||||
printf("running dummy loop on blt\n");
|
||||
@ -184,7 +184,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_subtest("vebox") {
|
||||
igt_subtest("vebox") {
|
||||
if (gem_check_vebox(fd)) {
|
||||
sleep(2);
|
||||
printf("running dummy loop on vebox\n");
|
||||
@ -193,7 +193,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_subtest("mixed") {
|
||||
igt_subtest("mixed") {
|
||||
if (num_rings > 1) {
|
||||
sleep(2);
|
||||
printf("running dummy loop on random rings\n");
|
||||
@ -208,5 +208,5 @@ int main(int argc, char **argv)
|
||||
|
||||
close(fd);
|
||||
|
||||
return drmtest_retval();
|
||||
return igt_retval();
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ int main(int argc, char **argv)
|
||||
int fd, ret;
|
||||
drm_intel_bo *tmp;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
@ -166,7 +166,7 @@ int main(int argc, char **argv)
|
||||
|
||||
tmp = drm_intel_bo_alloc(bufmgr, "tmp", 128 * 128, 4096);
|
||||
|
||||
drmtest_subtest("cpu-domain") {
|
||||
igt_subtest("cpu-domain") {
|
||||
BEGIN_BATCH(2);
|
||||
OUT_BATCH(0);
|
||||
OUT_RELOC(tmp, I915_GEM_DOMAIN_CPU, 0, 0);
|
||||
@ -188,7 +188,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_subtest("gtt-domain") {
|
||||
igt_subtest("gtt-domain") {
|
||||
BEGIN_BATCH(2);
|
||||
OUT_BATCH(0);
|
||||
OUT_RELOC(tmp, I915_GEM_DOMAIN_GTT, 0, 0);
|
||||
@ -212,7 +212,7 @@ int main(int argc, char **argv)
|
||||
|
||||
#if 0 /* kernel checks have been eased, doesn't reject conflicting write domains
|
||||
any more */
|
||||
drmtest_subtest("conflicting-write-domain") {
|
||||
igt_subtest("conflicting-write-domain") {
|
||||
BEGIN_BATCH(4);
|
||||
OUT_BATCH(0);
|
||||
OUT_RELOC(tmp, I915_GEM_DOMAIN_RENDER,
|
||||
@ -229,10 +229,10 @@ int main(int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
|
||||
drmtest_subtest("double-write-domain")
|
||||
igt_subtest("double-write-domain")
|
||||
multi_write_domain(fd);
|
||||
|
||||
drmtest_subtest("invalid-gpu-domain") {
|
||||
igt_subtest("invalid-gpu-domain") {
|
||||
BEGIN_BATCH(2);
|
||||
OUT_BATCH(0);
|
||||
OUT_RELOC(tmp, ~(I915_GEM_GPU_DOMAINS | I915_GEM_DOMAIN_GTT | I915_GEM_DOMAIN_CPU),
|
||||
|
@ -107,7 +107,7 @@ int main(int argc, char **argv)
|
||||
uint32_t reloc_ofs;
|
||||
unsigned batch_size;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -250,7 +250,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
if (argc > 1) {
|
||||
for (i = 1; i < argc; i++) {
|
||||
|
@ -220,14 +220,14 @@ static void run(int object_size)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
drmtest_subtest("normal")
|
||||
igt_subtest("normal")
|
||||
run(OBJECT_SIZE);
|
||||
drmtest_subtest("no-prefault") {
|
||||
drmtest_disable_prefault();
|
||||
igt_subtest("no-prefault") {
|
||||
igt_disable_prefault();
|
||||
run(OBJECT_SIZE);
|
||||
drmtest_enable_prefault();
|
||||
igt_enable_prefault();
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -126,7 +126,7 @@ int main(int argc, char **argv)
|
||||
{ .name = NULL },
|
||||
}, *p;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -112,25 +112,25 @@ int main(int argc, char **argv)
|
||||
uint32_t handle;
|
||||
int fd;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
handle = gem_create(fd, 4096);
|
||||
gem_write(fd, handle, 0, batch, sizeof(batch));
|
||||
|
||||
drmtest_subtest("render")
|
||||
igt_subtest("render")
|
||||
loop(fd, handle, I915_EXEC_RENDER, "render");
|
||||
|
||||
drmtest_subtest("bsd")
|
||||
igt_subtest("bsd")
|
||||
if (gem_check_blt(fd))
|
||||
loop(fd, handle, I915_EXEC_BSD, "bsd");
|
||||
|
||||
drmtest_subtest("blt")
|
||||
igt_subtest("blt")
|
||||
if (gem_check_blt(fd))
|
||||
loop(fd, handle, I915_EXEC_BLT, "blt");
|
||||
|
||||
drmtest_subtest("vebox")
|
||||
igt_subtest("vebox")
|
||||
if (gem_check_vebox(fd))
|
||||
loop(fd, handle, LOCAL_I915_EXEC_VEBOX, "vebox");
|
||||
|
||||
@ -138,5 +138,5 @@ int main(int argc, char **argv)
|
||||
|
||||
close(fd);
|
||||
|
||||
return drmtest_retval();
|
||||
return igt_retval();
|
||||
}
|
||||
|
@ -207,36 +207,36 @@ static int run_test(int threads_per_fence, void *f, int tiling,
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
drmtest_subtest("bo-write-verify-none")
|
||||
igt_subtest("bo-write-verify-none")
|
||||
assert (run_test(0, bo_write_verify, I915_TILING_NONE, 80) == 0);
|
||||
|
||||
drmtest_subtest("bo-write-verify-x")
|
||||
igt_subtest("bo-write-verify-x")
|
||||
assert (run_test(0, bo_write_verify, I915_TILING_X, 80) == 0);
|
||||
|
||||
drmtest_subtest("bo-write-verify-y")
|
||||
igt_subtest("bo-write-verify-y")
|
||||
assert (run_test(0, bo_write_verify, I915_TILING_Y, 80) == 0);
|
||||
|
||||
drmtest_subtest("bo-write-verify-threaded-none")
|
||||
igt_subtest("bo-write-verify-threaded-none")
|
||||
assert (run_test(5, bo_write_verify, I915_TILING_NONE, 2) == 0);
|
||||
|
||||
drmtest_subtest("bo-write-verify-threaded-x") {
|
||||
igt_subtest("bo-write-verify-threaded-x") {
|
||||
assert (run_test(2, bo_write_verify, I915_TILING_X, 2) == 0);
|
||||
assert (run_test(5, bo_write_verify, I915_TILING_X, 2) == 0);
|
||||
assert (run_test(10, bo_write_verify, I915_TILING_X, 2) == 0);
|
||||
assert (run_test(20, bo_write_verify, I915_TILING_X, 2) == 0);
|
||||
}
|
||||
|
||||
drmtest_subtest("bo-write-verify-threaded-y") {
|
||||
igt_subtest("bo-write-verify-threaded-y") {
|
||||
assert (run_test(2, bo_write_verify, I915_TILING_Y, 2) == 0);
|
||||
assert (run_test(5, bo_write_verify, I915_TILING_Y, 2) == 0);
|
||||
assert (run_test(10, bo_write_verify, I915_TILING_Y, 2) == 0);
|
||||
assert (run_test(20, bo_write_verify, I915_TILING_Y, 2) == 0);
|
||||
}
|
||||
|
||||
drmtest_subtest("bo-copy")
|
||||
igt_subtest("bo-copy")
|
||||
assert(run_test(1, bo_copy, I915_TILING_X, 1) == 0);
|
||||
|
||||
return 0;
|
||||
|
@ -163,7 +163,7 @@ main(int argc, char **argv)
|
||||
int num_fences;
|
||||
uint32_t devid;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
num_fences = get_num_fences(fd);
|
||||
|
@ -154,19 +154,19 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int fd;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
drmtest_subtest("basic")
|
||||
igt_subtest("basic")
|
||||
test_flink(fd);
|
||||
drmtest_subtest("double-flink")
|
||||
igt_subtest("double-flink")
|
||||
test_double_flink(fd);
|
||||
drmtest_subtest("bad-flink")
|
||||
igt_subtest("bad-flink")
|
||||
test_bad_flink(fd);
|
||||
drmtest_subtest("bad-open")
|
||||
igt_subtest("bad-open")
|
||||
test_bad_open(fd);
|
||||
drmtest_subtest("flink-lifetime")
|
||||
igt_subtest("flink-lifetime")
|
||||
test_flink_lifetime(fd);
|
||||
|
||||
return 0;
|
||||
|
@ -193,14 +193,14 @@ static void test_flink_close(void)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
drmtest_subtest("flink_name")
|
||||
igt_subtest("flink_name")
|
||||
test_flink_name();
|
||||
|
||||
drmtest_subtest("flink_close")
|
||||
igt_subtest("flink_close")
|
||||
test_flink_close();
|
||||
|
||||
return 0;
|
||||
|
@ -98,8 +98,8 @@ main(int argc, char **argv)
|
||||
int width = 512, height = 512;
|
||||
int fd, loop, i;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
@ -111,7 +111,7 @@ main(int argc, char **argv)
|
||||
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
|
||||
batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
|
||||
|
||||
if (!drmtest_only_list_subtests()) {
|
||||
if (!igt_only_list_subtests()) {
|
||||
for (i = 0; i < num_buffers; i++) {
|
||||
src[i] = create_bo(bufmgr, i, width, height);
|
||||
dst[i] = create_bo(bufmgr, ~i, width, height);
|
||||
@ -120,7 +120,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* try to overwrite the source values */
|
||||
drmtest_subtest("overwrite-source") {
|
||||
igt_subtest("overwrite-source") {
|
||||
for (i = 0; i < num_buffers; i++) {
|
||||
set_bo(src[i], i, width, height);
|
||||
set_bo(dst[i], i, width, height);
|
||||
@ -134,7 +134,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* try to read the results before the copy completes */
|
||||
drmtest_subtest("early-read") {
|
||||
igt_subtest("early-read") {
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xdeadbeef, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
@ -144,7 +144,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* and finally try to trick the kernel into loosing the pending write */
|
||||
drmtest_subtest("gpu-read-after-write") {
|
||||
igt_subtest("gpu-read-after-write") {
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xabcdabcd, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
@ -155,10 +155,10 @@ main(int argc, char **argv)
|
||||
cmp_bo(dst[i], 0xabcdabcd, width, height);
|
||||
}
|
||||
|
||||
drmtest_fork_signal_helper();
|
||||
igt_fork_signal_helper();
|
||||
|
||||
/* try to read the results before the copy completes */
|
||||
drmtest_subtest("overwrite-source-interruptible") {
|
||||
igt_subtest("overwrite-source-interruptible") {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = 0; i < num_buffers; i++) {
|
||||
@ -175,7 +175,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* try to read the results before the copy completes */
|
||||
drmtest_subtest("early-read-interruptible") {
|
||||
igt_subtest("early-read-interruptible") {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = num_buffers; i--; )
|
||||
@ -188,7 +188,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* and finally try to trick the kernel into loosing the pending write */
|
||||
drmtest_subtest("gpu-read-after-write-interruptible") {
|
||||
igt_subtest("gpu-read-after-write-interruptible") {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = num_buffers; i--; )
|
||||
@ -202,7 +202,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ main(int argc, char **argv)
|
||||
|
||||
uint32_t *ptr;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -61,7 +61,7 @@ int main(int argc, char **argv)
|
||||
int loop, i, tiling;
|
||||
int fd;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
if (argc > 1)
|
||||
size = atoi(argv[1]);
|
||||
|
@ -65,7 +65,7 @@ int main(int argc, char **argv)
|
||||
unsigned long pitch, act_size;
|
||||
int fd, i, devid;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
memset(blob, 'A', sizeof(blob));
|
||||
|
||||
|
@ -87,7 +87,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int fd;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -240,13 +240,13 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int fd, count = 0;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
if (!drmtest_only_list_subtests()) {
|
||||
if (!igt_only_list_subtests()) {
|
||||
if (argc > 1)
|
||||
count = atoi(argv[1]);
|
||||
if (count == 0)
|
||||
@ -264,13 +264,13 @@ int main(int argc, char **argv)
|
||||
printf("Using %d 1MiB buffers\n", count);
|
||||
}
|
||||
|
||||
drmtest_subtest("normal")
|
||||
igt_subtest("normal")
|
||||
run_test(fd, count);
|
||||
|
||||
drmtest_subtest("interruptible") {
|
||||
drmtest_fork_signal_helper();
|
||||
igt_subtest("interruptible") {
|
||||
igt_fork_signal_helper();
|
||||
run_test(fd, count);
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -148,35 +148,35 @@ static void
|
||||
run_without_prefault(int fd,
|
||||
void (*func)(int fd))
|
||||
{
|
||||
drmtest_disable_prefault();
|
||||
igt_disable_prefault();
|
||||
func(fd);
|
||||
drmtest_enable_prefault();
|
||||
igt_enable_prefault();
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int fd;
|
||||
|
||||
if (drmtest_run_in_simulation())
|
||||
if (igt_run_in_simulation())
|
||||
OBJECT_SIZE = 1 * 1024 * 1024;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
drmtest_subtest("copy")
|
||||
igt_subtest("copy")
|
||||
test_copy(fd);
|
||||
drmtest_subtest("read")
|
||||
igt_subtest("read")
|
||||
test_read(fd);
|
||||
drmtest_subtest("write")
|
||||
igt_subtest("write")
|
||||
test_write(fd);
|
||||
drmtest_subtest("write-gtt")
|
||||
igt_subtest("write-gtt")
|
||||
test_write_gtt(fd);
|
||||
drmtest_subtest("read-no-prefault")
|
||||
igt_subtest("read-no-prefault")
|
||||
run_without_prefault(fd, test_read);
|
||||
drmtest_subtest("write-no-prefault")
|
||||
igt_subtest("write-no-prefault")
|
||||
run_without_prefault(fd, test_write);
|
||||
drmtest_subtest("write-gtt-no-prefault")
|
||||
igt_subtest("write-gtt-no-prefault")
|
||||
run_without_prefault(fd, test_write_gtt);
|
||||
|
||||
close(fd);
|
||||
|
@ -83,7 +83,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int fd, i;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -96,7 +96,7 @@ blt_bo_fill(drm_intel_bo *tmp_bo, drm_intel_bo *bo, int val)
|
||||
|
||||
if (bo->offset < mappable_gtt_limit &&
|
||||
(IS_G33(devid) || intel_gen(devid) >= 4))
|
||||
drmtest_trash_aperture();
|
||||
igt_trash_aperture();
|
||||
|
||||
copy_bo(tmp_bo, bo);
|
||||
}
|
||||
@ -128,7 +128,7 @@ static void test_partial_reads(void)
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_progress("partial reads test: ", i, ROUNDS);
|
||||
igt_progress("partial reads test: ", i, ROUNDS);
|
||||
}
|
||||
|
||||
}
|
||||
@ -179,7 +179,7 @@ static void test_partial_writes(void)
|
||||
}
|
||||
drm_intel_gem_bo_unmap_gtt(staging_bo);
|
||||
|
||||
drmtest_progress("partial writes test: ", i, ROUNDS);
|
||||
igt_progress("partial writes test: ", i, ROUNDS);
|
||||
}
|
||||
|
||||
}
|
||||
@ -249,7 +249,7 @@ static void test_partial_read_writes(void)
|
||||
}
|
||||
drm_intel_gem_bo_unmap_gtt(staging_bo);
|
||||
|
||||
drmtest_progress("partial read/writes test: ", i, ROUNDS);
|
||||
igt_progress("partial read/writes test: ", i, ROUNDS);
|
||||
}
|
||||
}
|
||||
|
||||
@ -261,15 +261,15 @@ static void do_tests(int cache_level, const char *suffix)
|
||||
gem_set_caching(fd, scratch_bo->handle, cache_level);
|
||||
|
||||
snprintf(name, sizeof(name), "reads%s", suffix);
|
||||
drmtest_subtest(name)
|
||||
igt_subtest(name)
|
||||
test_partial_reads();
|
||||
|
||||
snprintf(name, sizeof(name), "writes%s", suffix);
|
||||
drmtest_subtest(name)
|
||||
igt_subtest(name)
|
||||
test_partial_writes();
|
||||
|
||||
snprintf(name, sizeof(name), "writes-after-reads%s", suffix);
|
||||
drmtest_subtest(name)
|
||||
igt_subtest(name)
|
||||
test_partial_read_writes();
|
||||
}
|
||||
|
||||
@ -277,8 +277,8 @@ int main(int argc, char **argv)
|
||||
{
|
||||
srandom(0xdeadbeef);
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
@ -291,7 +291,7 @@ int main(int argc, char **argv)
|
||||
scratch_bo = drm_intel_bo_alloc(bufmgr, "scratch bo", BO_SIZE, 4096);
|
||||
staging_bo = drm_intel_bo_alloc(bufmgr, "staging bo", BO_SIZE, 4096);
|
||||
|
||||
drmtest_init_aperture_trashers(bufmgr);
|
||||
igt_init_aperture_trashers(bufmgr);
|
||||
mappable_gtt_limit = gem_mappable_aperture_size();
|
||||
|
||||
do_tests(-1, "");
|
||||
@ -301,10 +301,10 @@ int main(int argc, char **argv)
|
||||
do_tests(1, "-snoop");
|
||||
do_tests(2, "-display");
|
||||
|
||||
drmtest_cleanup_aperture_trashers();
|
||||
igt_cleanup_aperture_trashers();
|
||||
drm_intel_bufmgr_destroy(bufmgr);
|
||||
|
||||
close(fd);
|
||||
|
||||
return drmtest_retval();
|
||||
return igt_retval();
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ int main(int argc, char **argv)
|
||||
uint32_t *handle, *offset;
|
||||
int fd, i;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
@ -214,7 +214,7 @@ int main(int argc, char **argv)
|
||||
offset = malloc(sizeof(uint32_t)*100);
|
||||
|
||||
/* Race creation/use against interrupts */
|
||||
drmtest_fork_signal_helper();
|
||||
igt_fork_signal_helper();
|
||||
gettimeofday(&start, NULL);
|
||||
do {
|
||||
for (i = 0; i < 100; i++) {
|
||||
@ -242,7 +242,7 @@ int main(int argc, char **argv)
|
||||
gem_close(fd, handle[i]);
|
||||
gettimeofday(&now, NULL);
|
||||
} while ((now.tv_sec - start.tv_sec)*1000 + (now.tv_usec - start.tv_usec) / 1000 < 10000);
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -93,8 +93,8 @@ int main(int argc, char **argv)
|
||||
{ -1 },
|
||||
}, *c;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
if (argc > 1 && atoi(argv[1]))
|
||||
object_size = atoi(argv[1]);
|
||||
@ -107,7 +107,7 @@ int main(int argc, char **argv)
|
||||
dst = gem_create(fd, object_size);
|
||||
src = malloc(object_size);
|
||||
|
||||
drmtest_subtest("normal") {
|
||||
igt_subtest("normal") {
|
||||
for (count = 1; count <= 1<<17; count <<= 1) {
|
||||
struct timeval start, end;
|
||||
|
||||
@ -123,7 +123,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
for (c = cache; c->level != -1; c++) {
|
||||
drmtest_subtest(c->name) {
|
||||
igt_subtest(c->name) {
|
||||
gem_set_caching(fd, dst, c->level);
|
||||
|
||||
for (count = 1; count <= 1<<17; count <<= 1) {
|
||||
@ -146,5 +146,5 @@ int main(int argc, char **argv)
|
||||
|
||||
close(fd);
|
||||
|
||||
return drmtest_retval();
|
||||
return igt_retval();
|
||||
}
|
||||
|
@ -176,8 +176,8 @@ main(int argc, char **argv)
|
||||
drm_intel_bo *src[2], *dst[2];
|
||||
int fd;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
@ -191,40 +191,40 @@ main(int argc, char **argv)
|
||||
dst[0] = drm_intel_bo_alloc(bufmgr, "dst bo", size, 4096);
|
||||
dst[1] = drm_intel_bo_alloc(bufmgr, "dst bo", size, 4096);
|
||||
|
||||
drmtest_subtest("normal")
|
||||
igt_subtest("normal")
|
||||
do_test(fd, -1, src, start, dst, 1);
|
||||
|
||||
drmtest_subtest("interruptible") {
|
||||
drmtest_fork_signal_helper();
|
||||
igt_subtest("interruptible") {
|
||||
igt_fork_signal_helper();
|
||||
do_test(fd, -1, src, start, dst, 100);
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
}
|
||||
|
||||
drmtest_subtest("normal-uncached")
|
||||
igt_subtest("normal-uncached")
|
||||
do_test(fd, 0, src, start, dst, 1);
|
||||
|
||||
drmtest_subtest("interruptible-uncached") {
|
||||
drmtest_fork_signal_helper();
|
||||
igt_subtest("interruptible-uncached") {
|
||||
igt_fork_signal_helper();
|
||||
do_test(fd, 0, src, start, dst, 100);
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
}
|
||||
|
||||
drmtest_subtest("normal-snoop")
|
||||
igt_subtest("normal-snoop")
|
||||
do_test(fd, 1, src, start, dst, 1);
|
||||
|
||||
drmtest_subtest("interruptible-snoop") {
|
||||
drmtest_fork_signal_helper();
|
||||
igt_subtest("interruptible-snoop") {
|
||||
igt_fork_signal_helper();
|
||||
do_test(fd, 1, src, start, dst, 100);
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
}
|
||||
|
||||
drmtest_subtest("normal-display")
|
||||
igt_subtest("normal-display")
|
||||
do_test(fd, 2, src, start, dst, 1);
|
||||
|
||||
drmtest_subtest("interruptible-display") {
|
||||
drmtest_fork_signal_helper();
|
||||
igt_subtest("interruptible-display") {
|
||||
igt_fork_signal_helper();
|
||||
do_test(fd, 2, src, start, dst, 100);
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
}
|
||||
drm_intel_bo_unreference(src[0]);
|
||||
drm_intel_bo_unreference(src[1]);
|
||||
@ -236,5 +236,5 @@ main(int argc, char **argv)
|
||||
|
||||
close(fd);
|
||||
|
||||
return drmtest_retval();
|
||||
return igt_retval();
|
||||
}
|
||||
|
@ -98,8 +98,8 @@ main(int argc, char **argv)
|
||||
int width = 512, height = 512;
|
||||
int fd, loop, i;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
@ -111,7 +111,7 @@ main(int argc, char **argv)
|
||||
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
|
||||
batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
|
||||
|
||||
if (!drmtest_only_list_subtests()) {
|
||||
if (!igt_only_list_subtests()) {
|
||||
for (i = 0; i < num_buffers; i++) {
|
||||
src[i] = create_bo(bufmgr, i, width, height);
|
||||
dst[i] = create_bo(bufmgr, ~i, width, height);
|
||||
@ -120,7 +120,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* try to overwrite the source values */
|
||||
drmtest_subtest("overwrite-source") {
|
||||
igt_subtest("overwrite-source") {
|
||||
for (i = 0; i < num_buffers; i++) {
|
||||
set_bo(src[i], i, width, height);
|
||||
set_bo(dst[i], i, width, height);
|
||||
@ -134,7 +134,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* try to read the results before the copy completes */
|
||||
drmtest_subtest("early-read") {
|
||||
igt_subtest("early-read") {
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xdeadbeef, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
@ -144,7 +144,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* and finally try to trick the kernel into loosing the pending write */
|
||||
drmtest_subtest("gpu-read-after-write") {
|
||||
igt_subtest("gpu-read-after-write") {
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xabcdabcd, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
@ -155,10 +155,10 @@ main(int argc, char **argv)
|
||||
cmp_bo(dst[i], 0xabcdabcd, width, height);
|
||||
}
|
||||
|
||||
drmtest_fork_signal_helper();
|
||||
igt_fork_signal_helper();
|
||||
|
||||
/* try to read the results before the copy completes */
|
||||
drmtest_subtest("overwrite-source-interruptible") {
|
||||
igt_subtest("overwrite-source-interruptible") {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = 0; i < num_buffers; i++) {
|
||||
@ -175,7 +175,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* try to read the results before the copy completes */
|
||||
drmtest_subtest("early-read-interruptible") {
|
||||
igt_subtest("early-read-interruptible") {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = num_buffers; i--; )
|
||||
@ -188,7 +188,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* and finally try to trick the kernel into loosing the pending write */
|
||||
drmtest_subtest("gpu-read-after-write-interruptible") {
|
||||
igt_subtest("gpu-read-after-write-interruptible") {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = num_buffers; i--; )
|
||||
@ -202,7 +202,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -99,10 +99,10 @@ int main(int argc, char **argv)
|
||||
{ -1 },
|
||||
}, *c;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
if (argc > 1 && atoi(argv[1]))
|
||||
object_size = atoi(argv[1]);
|
||||
@ -115,7 +115,7 @@ int main(int argc, char **argv)
|
||||
dst = gem_create(fd, object_size);
|
||||
src = malloc(object_size);
|
||||
|
||||
drmtest_subtest("normal") {
|
||||
igt_subtest("normal") {
|
||||
for (count = 1; count <= 1<<17; count <<= 1) {
|
||||
struct timeval start, end;
|
||||
|
||||
@ -131,7 +131,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
for (c = cache; c->level != -1; c++) {
|
||||
drmtest_subtest(c->name) {
|
||||
igt_subtest(c->name) {
|
||||
gem_set_caching(fd, dst, c->level);
|
||||
|
||||
for (count = 1; count <= 1<<17; count <<= 1) {
|
||||
@ -154,5 +154,5 @@ int main(int argc, char **argv)
|
||||
|
||||
close(fd);
|
||||
|
||||
return drmtest_retval();
|
||||
return igt_retval();
|
||||
}
|
||||
|
@ -383,8 +383,8 @@ int main(int argc, char **argv)
|
||||
uint32_t *tmp, src, dst;
|
||||
int fd, count;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
if (argc > 1)
|
||||
object_size = atoi(argv[1]);
|
||||
@ -401,9 +401,9 @@ int main(int argc, char **argv)
|
||||
gem_set_caching(fd, src, 0);
|
||||
gem_set_caching(fd, dst, 0);
|
||||
|
||||
drmtest_subtest("uncached-copy-correctness")
|
||||
igt_subtest("uncached-copy-correctness")
|
||||
test_copy(fd, src, dst, tmp, object_size);
|
||||
drmtest_subtest("uncached-copy-performance") {
|
||||
igt_subtest("uncached-copy-performance") {
|
||||
for (count = 1; count <= 1<<17; count <<= 1) {
|
||||
struct timeval start, end;
|
||||
|
||||
@ -418,9 +418,9 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_subtest("uncached-pwrite-blt-gtt_mmap-correctness")
|
||||
igt_subtest("uncached-pwrite-blt-gtt_mmap-correctness")
|
||||
test_as_gtt_mmap(fd, src, dst, object_size);
|
||||
drmtest_subtest("uncached-pwrite-blt-gtt_mmap-performance") {
|
||||
igt_subtest("uncached-pwrite-blt-gtt_mmap-performance") {
|
||||
for (count = 1; count <= 1<<17; count <<= 1) {
|
||||
struct timeval start, end;
|
||||
|
||||
@ -438,9 +438,9 @@ int main(int argc, char **argv)
|
||||
gem_set_caching(fd, src, 1);
|
||||
gem_set_caching(fd, dst, 1);
|
||||
|
||||
drmtest_subtest("snooped-copy-correctness")
|
||||
igt_subtest("snooped-copy-correctness")
|
||||
test_copy(fd, src, dst, tmp, object_size);
|
||||
drmtest_subtest("snooped-copy-performance") {
|
||||
igt_subtest("snooped-copy-performance") {
|
||||
for (count = 1; count <= 1<<17; count <<= 1) {
|
||||
struct timeval start, end;
|
||||
|
||||
@ -455,9 +455,9 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_subtest("snooped-pwrite-blt-cpu_mmap-correctness")
|
||||
igt_subtest("snooped-pwrite-blt-cpu_mmap-correctness")
|
||||
test_as_cpu_mmap(fd, src, dst, object_size);
|
||||
drmtest_subtest("snooped-pwrite-blt-cpu_mmap-performance") {
|
||||
igt_subtest("snooped-pwrite-blt-cpu_mmap-performance") {
|
||||
for (count = 1; count <= 1<<17; count <<= 1) {
|
||||
struct timeval start, end;
|
||||
|
||||
@ -475,9 +475,9 @@ int main(int argc, char **argv)
|
||||
gem_set_caching(fd, src, 2);
|
||||
gem_set_caching(fd, dst, 2);
|
||||
|
||||
drmtest_subtest("display-copy-correctness")
|
||||
igt_subtest("display-copy-correctness")
|
||||
test_copy(fd, src, dst, tmp, object_size);
|
||||
drmtest_subtest("display-copy-performance") {
|
||||
igt_subtest("display-copy-performance") {
|
||||
for (count = 1; count <= 1<<17; count <<= 1) {
|
||||
struct timeval start, end;
|
||||
|
||||
@ -492,9 +492,9 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_subtest("display-pwrite-blt-gtt_mmap-correctness")
|
||||
igt_subtest("display-pwrite-blt-gtt_mmap-correctness")
|
||||
test_as_gtt_mmap(fd, src, dst, object_size);
|
||||
drmtest_subtest("display-pwrite-blt-gtt_mmap-performance") {
|
||||
igt_subtest("display-pwrite-blt-gtt_mmap-performance") {
|
||||
for (count = 1; count <= 1<<17; count <<= 1) {
|
||||
struct timeval start, end;
|
||||
|
||||
@ -515,5 +515,5 @@ int main(int argc, char **argv)
|
||||
|
||||
close(fd);
|
||||
|
||||
return drmtest_retval();
|
||||
return igt_retval();
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ int main(int argc, char **argv)
|
||||
int ret;
|
||||
int handle;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -148,7 +148,7 @@ int main(int argc, char **argv)
|
||||
int fd, i, ring;
|
||||
uint32_t test;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
memset(blob, 'A', sizeof(blob));
|
||||
|
||||
|
@ -81,7 +81,7 @@ int main(int argc, char **argv)
|
||||
batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
|
||||
|
||||
count = 0;
|
||||
if (drmtest_run_in_simulation())
|
||||
if (igt_run_in_simulation())
|
||||
count = 2;
|
||||
if (argc > 1)
|
||||
count = atoi(argv[1]);
|
||||
@ -130,7 +130,7 @@ int main(int argc, char **argv)
|
||||
for (i = 0; i < count; i++)
|
||||
check_bo(fd, bo[i]->handle, start_val[i]);
|
||||
|
||||
if (drmtest_run_in_simulation())
|
||||
if (igt_run_in_simulation())
|
||||
return 0;
|
||||
|
||||
printf("Cyclic blits, backward...\n");
|
||||
|
@ -71,7 +71,7 @@ int main(int argc, char **argv)
|
||||
uint32_t start = 0;
|
||||
int i, j, fd, count;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -157,7 +157,7 @@ static int check_ring(drm_intel_bufmgr *bufmgr,
|
||||
int x = i % width;
|
||||
int y = i / width;
|
||||
|
||||
drmtest_progress(output, i, width*height);
|
||||
igt_progress(output, i, width*height);
|
||||
|
||||
assert(y < height);
|
||||
|
||||
@ -205,8 +205,8 @@ int main(int argc, char **argv)
|
||||
render_copyfunc_t copy;
|
||||
int fd, fails = 0;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
@ -214,7 +214,7 @@ int main(int argc, char **argv)
|
||||
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
|
||||
batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
|
||||
|
||||
drmtest_subtest("blitter")
|
||||
igt_subtest("blitter")
|
||||
fails += check_ring(bufmgr, batch, "blt", blt_copy);
|
||||
|
||||
/* Strictly only required on architectures with a separate BLT ring,
|
||||
@ -222,7 +222,7 @@ int main(int argc, char **argv)
|
||||
*/
|
||||
copy = get_render_copyfunc(batch->devid);
|
||||
|
||||
drmtest_subtest("render") {
|
||||
igt_subtest("render") {
|
||||
if (copy)
|
||||
fails += check_ring(bufmgr, batch, "render", copy);
|
||||
}
|
||||
|
@ -243,8 +243,8 @@ static int run_sync_test(int num_buffers, bool verify)
|
||||
init_buffer(bufmgr, &s_dst[i], dst1[i], width, height);
|
||||
}
|
||||
|
||||
drmtest_permute_array(p_dst1, num_buffers, exchange_uint);
|
||||
drmtest_permute_array(p_dst2, num_buffers, exchange_uint);
|
||||
igt_permute_array(p_dst1, num_buffers, exchange_uint);
|
||||
igt_permute_array(p_dst2, num_buffers, exchange_uint);
|
||||
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
render_copyfunc(&s_src[i], &s_dst[p_dst1[i]], width, height);
|
||||
|
@ -233,8 +233,8 @@ int main(int argc, char **argv)
|
||||
int i, fd;
|
||||
uint32_t tiling, tiling_after;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
for (i = 0; i < 1024*256; i++)
|
||||
data[i] = i;
|
||||
@ -246,7 +246,7 @@ int main(int argc, char **argv)
|
||||
devid = intel_get_drm_devid(fd);
|
||||
batch = intel_batchbuffer_alloc(bufmgr, devid);
|
||||
|
||||
drmtest_subtest("untiled-to-tiled") {
|
||||
igt_subtest("untiled-to-tiled") {
|
||||
printf("testing untiled->tiled transisition:\n");
|
||||
tiling = I915_TILING_NONE;
|
||||
tiling_after = I915_TILING_X;
|
||||
@ -255,7 +255,7 @@ int main(int argc, char **argv)
|
||||
assert(tiling_after == I915_TILING_X);
|
||||
}
|
||||
|
||||
drmtest_subtest("tiled-to-untiled") {
|
||||
igt_subtest("tiled-to-untiled") {
|
||||
printf("testing tiled->untiled transisition:\n");
|
||||
tiling = I915_TILING_X;
|
||||
tiling_after = I915_TILING_NONE;
|
||||
@ -264,7 +264,7 @@ int main(int argc, char **argv)
|
||||
assert(tiling_after == I915_TILING_NONE);
|
||||
}
|
||||
|
||||
drmtest_subtest("tiled-to-tiled") {
|
||||
igt_subtest("tiled-to-tiled") {
|
||||
printf("testing tiled->tiled transisition:\n");
|
||||
tiling = I915_TILING_X;
|
||||
tiling_after = I915_TILING_X;
|
||||
|
@ -58,7 +58,7 @@ int main(int argc, char **argv)
|
||||
bool tiling_changed;
|
||||
int tile_height;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -56,7 +56,7 @@ int main(int argc, char **argv)
|
||||
int i;
|
||||
uint32_t handle;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -137,7 +137,7 @@ int main(int argc, char **argv)
|
||||
int fd;
|
||||
int devid;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
if (argc != 1) {
|
||||
fprintf(stderr, "usage: %s\n", argv[0]);
|
||||
@ -172,7 +172,7 @@ int main(int argc, char **argv)
|
||||
|
||||
store_dword_loop(1);
|
||||
store_dword_loop(2);
|
||||
if (!drmtest_run_in_simulation()) {
|
||||
if (!igt_run_in_simulation()) {
|
||||
store_dword_loop(3);
|
||||
store_dword_loop(5);
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ int main(int argc, char **argv)
|
||||
|
||||
store_dword_loop(1);
|
||||
store_dword_loop(2);
|
||||
if (!drmtest_run_in_simulation()) {
|
||||
if (!igt_run_in_simulation()) {
|
||||
store_dword_loop(3);
|
||||
store_dword_loop(5);
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ int main(int argc, char **argv)
|
||||
|
||||
store_dword_loop(1);
|
||||
store_dword_loop(2);
|
||||
if (!drmtest_run_in_simulation()) {
|
||||
if (!igt_run_in_simulation()) {
|
||||
store_dword_loop(3);
|
||||
store_dword_loop(5);
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ int main(int argc, char **argv)
|
||||
|
||||
store_dword_loop(1);
|
||||
store_dword_loop(2);
|
||||
if (!drmtest_run_in_simulation()) {
|
||||
if (!igt_run_in_simulation()) {
|
||||
store_dword_loop(3);
|
||||
store_dword_loop(5);
|
||||
}
|
||||
|
@ -498,7 +498,7 @@ static void init_set(unsigned set)
|
||||
long int r;
|
||||
int i;
|
||||
|
||||
drmtest_permute_array(buffers[set], num_buffers, exchange_buf);
|
||||
igt_permute_array(buffers[set], num_buffers, exchange_buf);
|
||||
|
||||
if (current_set == 1 && options.gpu_busy_load == 0) {
|
||||
gpu_busy_load++;
|
||||
@ -871,7 +871,7 @@ int main(int argc, char **argv)
|
||||
|
||||
/* start our little helper early before too may allocations occur */
|
||||
if (options.use_signal_helper)
|
||||
drmtest_fork_signal_helper();
|
||||
igt_fork_signal_helper();
|
||||
|
||||
init();
|
||||
|
||||
@ -898,7 +898,7 @@ int main(int argc, char **argv)
|
||||
|
||||
for (j = 0; j < num_total_tiles; j++)
|
||||
current_permutation[j] = j;
|
||||
drmtest_permute_array(current_permutation, num_total_tiles, exchange_uint);
|
||||
igt_permute_array(current_permutation, num_total_tiles, exchange_uint);
|
||||
|
||||
copy_tiles(current_permutation);
|
||||
|
||||
@ -921,7 +921,7 @@ int main(int argc, char **argv)
|
||||
|
||||
close(drm_fd);
|
||||
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ test_fence_restore(int fd, bool tiled2untiled)
|
||||
else
|
||||
gem_set_tiling(fd, handle_tiled, I915_TILING_X, 2048);
|
||||
|
||||
drmtest_system_suspend_autoresume();
|
||||
igt_system_suspend_autoresume();
|
||||
|
||||
printf("checking the first canary object\n");
|
||||
for (i = 0; i < OBJECT_SIZE/sizeof(uint32_t); i++)
|
||||
@ -101,14 +101,14 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int fd;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
drmtest_subtest("fence-restore-tiled2untiled")
|
||||
igt_subtest("fence-restore-tiled2untiled")
|
||||
test_fence_restore(fd, true);
|
||||
|
||||
drmtest_subtest("fence-restore-untiled")
|
||||
igt_subtest("fence-restore-untiled")
|
||||
test_fence_restore(fd, false);
|
||||
|
||||
close(fd);
|
||||
|
@ -95,7 +95,7 @@ int main(int argc, char **argv)
|
||||
unsigned long pitch = 0;
|
||||
int r;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
assert(fd >= 0);
|
||||
|
@ -150,7 +150,7 @@ static void run_test(int count)
|
||||
for (i = 0; i < count; i++)
|
||||
check_bo(bo[i], bo_start_val[i]);
|
||||
|
||||
if (drmtest_run_in_simulation())
|
||||
if (igt_run_in_simulation())
|
||||
return;
|
||||
|
||||
printf("Cyclic blits, backward...\n");
|
||||
@ -190,12 +190,12 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int fd, count = 0;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
if (!drmtest_only_list_subtests()) {
|
||||
if (drmtest_run_in_simulation())
|
||||
if (!igt_only_list_subtests()) {
|
||||
if (igt_run_in_simulation())
|
||||
count = 2;
|
||||
if (argc > 1)
|
||||
count = atoi(argv[1]);
|
||||
@ -220,13 +220,13 @@ int main(int argc, char **argv)
|
||||
drm_intel_bufmgr_gem_set_vma_cache_size(bufmgr, 32);
|
||||
batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
|
||||
|
||||
drmtest_subtest("normal")
|
||||
igt_subtest("normal")
|
||||
run_test(count);
|
||||
|
||||
drmtest_subtest("interruptible") {
|
||||
drmtest_fork_signal_helper();
|
||||
igt_subtest("interruptible") {
|
||||
igt_fork_signal_helper();
|
||||
run_test(count);
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
}
|
||||
|
||||
intel_batchbuffer_free(batch);
|
||||
|
@ -108,7 +108,7 @@ int main(int argc, char **argv)
|
||||
uint32_t start = 0;
|
||||
int fd, i, count;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
count = 3 * gem_aperture_size(fd) / (1024*1024) / 2;
|
||||
|
@ -118,7 +118,7 @@ blt_bo_fill(drm_intel_bo *tmp_bo, drm_intel_bo *bo, int val)
|
||||
|
||||
if (bo->offset < mappable_gtt_limit &&
|
||||
(IS_G33(devid) || intel_gen(devid) >= 4))
|
||||
drmtest_trash_aperture();
|
||||
igt_trash_aperture();
|
||||
|
||||
copy_bo(tmp_bo, 0, bo, 1);
|
||||
}
|
||||
@ -151,7 +151,7 @@ static void test_partial_reads(void)
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_progress("partial reads test: ", i, ROUNDS);
|
||||
igt_progress("partial reads test: ", i, ROUNDS);
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ static void test_partial_writes(void)
|
||||
}
|
||||
drm_intel_gem_bo_unmap_gtt(staging_bo);
|
||||
|
||||
drmtest_progress("partial writes test: ", i, ROUNDS);
|
||||
igt_progress("partial writes test: ", i, ROUNDS);
|
||||
}
|
||||
}
|
||||
|
||||
@ -268,7 +268,7 @@ static void test_partial_read_writes(void)
|
||||
}
|
||||
drm_intel_gem_bo_unmap_gtt(staging_bo);
|
||||
|
||||
drmtest_progress("partial read/writes test: ", i, ROUNDS);
|
||||
igt_progress("partial read/writes test: ", i, ROUNDS);
|
||||
}
|
||||
}
|
||||
|
||||
@ -276,8 +276,8 @@ int main(int argc, char **argv)
|
||||
{
|
||||
uint32_t tiling_mode = I915_TILING_X;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
srandom(0xdeadbeef);
|
||||
|
||||
@ -300,19 +300,19 @@ int main(int argc, char **argv)
|
||||
&tiling_mode,
|
||||
&scratch_pitch, 0);
|
||||
|
||||
drmtest_init_aperture_trashers(bufmgr);
|
||||
igt_init_aperture_trashers(bufmgr);
|
||||
mappable_gtt_limit = gem_mappable_aperture_size();
|
||||
|
||||
drmtest_subtest("reads")
|
||||
igt_subtest("reads")
|
||||
test_partial_reads();
|
||||
|
||||
drmtest_subtest("writes")
|
||||
igt_subtest("writes")
|
||||
test_partial_writes();
|
||||
|
||||
drmtest_subtest("writes-after-reads")
|
||||
igt_subtest("writes-after-reads")
|
||||
test_partial_read_writes();
|
||||
|
||||
drmtest_cleanup_aperture_trashers();
|
||||
igt_cleanup_aperture_trashers();
|
||||
drm_intel_bufmgr_destroy(bufmgr);
|
||||
|
||||
close(fd);
|
||||
|
@ -151,7 +151,7 @@ main(int argc, char **argv)
|
||||
gem_madvise(fd, handle_target, I915_MADV_DONTNEED);
|
||||
gem_madvise(fd, handle, I915_MADV_DONTNEED);
|
||||
|
||||
drmtest_progress("gem_tiled_pread_pwrite: ", i, count/2);
|
||||
igt_progress("gem_tiled_pread_pwrite: ", i, count/2);
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
@ -101,7 +101,7 @@ main(int argc, char **argv)
|
||||
int count;
|
||||
current_tiling_mode = I915_TILING_X;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
/* need slightly more than total ram */
|
||||
@ -133,8 +133,8 @@ main(int argc, char **argv)
|
||||
for (i = 0; i < count; i++)
|
||||
idx_arr[i] = i;
|
||||
|
||||
drmtest_permute_array(idx_arr, count,
|
||||
drmtest_exchange_int);
|
||||
igt_permute_array(idx_arr, count,
|
||||
igt_exchange_int);
|
||||
|
||||
for (i = 0; i < count/2; i++) {
|
||||
/* Check the target bo's contents. */
|
||||
|
@ -70,7 +70,7 @@ int main(int argc, char **argv)
|
||||
drm_intel_bo *busy_bo, *test_bo;
|
||||
uint32_t tiling = I915_TILING_X;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
for (i = 0; i < 1024*256; i++)
|
||||
data[i] = i;
|
||||
|
@ -56,7 +56,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int fd, i;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -262,7 +262,7 @@ int main(int argc, char **argv)
|
||||
uint32_t start = 0;
|
||||
int i, fd, count;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
|
@ -122,7 +122,7 @@ int main(int argc, char **argv)
|
||||
bool done = false;
|
||||
int i, iter = 1;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
@ -171,7 +171,7 @@ int main(int argc, char **argv)
|
||||
printf("%d iters is enough work\n", iter);
|
||||
gem_quiescent_gpu(fd);
|
||||
if (do_signals)
|
||||
drmtest_fork_signal_helper();
|
||||
igt_fork_signal_helper();
|
||||
|
||||
/* We should be able to do half as much work in the same amount of time,
|
||||
* but because we might schedule almost twice as much as required, we
|
||||
@ -220,7 +220,7 @@ int main(int argc, char **argv)
|
||||
|
||||
|
||||
if (do_signals)
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
drm_intel_bo_unreference(dst2);
|
||||
drm_intel_bo_unreference(dst);
|
||||
intel_batchbuffer_free(batch);
|
||||
|
@ -173,8 +173,8 @@ int main(int argc, char **argv)
|
||||
};
|
||||
int i;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
@ -206,20 +206,20 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(tests); i++) {
|
||||
drmtest_subtest(tests[i].name) {
|
||||
igt_subtest(tests[i].name) {
|
||||
if (has_ring(tests[i].ring))
|
||||
run_test(tests[i].ring, tests[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_fork_signal_helper();
|
||||
igt_fork_signal_helper();
|
||||
for (i = 0; i < ARRAY_SIZE(tests); i++) {
|
||||
char name[180];
|
||||
snprintf(name, sizeof(name), "%s-interruptible", tests[i].name);
|
||||
drmtest_subtest(name)
|
||||
igt_subtest(name)
|
||||
run_test(tests[i].ring, name);
|
||||
}
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
|
||||
drm_intel_bufmgr_destroy(bufmgr);
|
||||
|
||||
|
@ -1170,14 +1170,14 @@ int main(int argc, char **argv)
|
||||
};
|
||||
int i;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
drm_fd = drm_open_any();
|
||||
|
||||
if (!drmtest_only_list_subtests()) {
|
||||
do_or_die(drmtest_set_vt_graphics_mode());
|
||||
do_or_die(drmtest_install_exit_handler(kms_flip_exit_handler));
|
||||
if (!igt_only_list_subtests()) {
|
||||
do_or_die(igt_set_vt_graphics_mode());
|
||||
do_or_die(igt_install_exit_handler(kms_flip_exit_handler));
|
||||
get_timestamp_format();
|
||||
}
|
||||
|
||||
@ -1186,13 +1186,13 @@ int main(int argc, char **argv)
|
||||
batch = intel_batchbuffer_alloc(bufmgr, devid);
|
||||
|
||||
for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
|
||||
drmtest_subtest(tests[i].name) {
|
||||
igt_subtest(tests[i].name) {
|
||||
printf("running testcase: %s\n", tests[i].name);
|
||||
run_test(tests[i].duration, tests[i].flags, tests[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
drmtest_fork_signal_helper();
|
||||
igt_fork_signal_helper();
|
||||
for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
|
||||
char name[160];
|
||||
snprintf(name, sizeof(name), "%s-interruptible", tests[i].name);
|
||||
@ -1203,12 +1203,12 @@ int main(int argc, char **argv)
|
||||
!(tests[i].flags & TEST_VBLANK_ABSOLUTE))
|
||||
continue;
|
||||
|
||||
drmtest_subtest(name) {
|
||||
igt_subtest(name) {
|
||||
printf("running testcase: %s\n", name);
|
||||
run_test(tests[i].duration, tests[i].flags, name);
|
||||
}
|
||||
}
|
||||
drmtest_stop_signal_helper();
|
||||
igt_stop_signal_helper();
|
||||
|
||||
close(drm_fd);
|
||||
|
||||
|
@ -233,25 +233,25 @@ int main(int argc, char **argv)
|
||||
};
|
||||
int i;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
drmtest_skip_on_simulation();
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
if (!drmtest_only_list_subtests()) {
|
||||
if (!igt_only_list_subtests()) {
|
||||
drm_fd = drm_open_any();
|
||||
|
||||
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
|
||||
devid = intel_get_drm_devid(drm_fd);
|
||||
batch = intel_batchbuffer_alloc(bufmgr, devid);
|
||||
|
||||
do_or_die(drmtest_set_vt_graphics_mode());
|
||||
do_or_die(igt_set_vt_graphics_mode());
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(tests); i++) {
|
||||
drmtest_subtest(tests[i].name)
|
||||
igt_subtest(tests[i].name)
|
||||
run_test(tests[i].name, tests[i].flags);
|
||||
}
|
||||
|
||||
if (!drmtest_only_list_subtests())
|
||||
if (!igt_only_list_subtests())
|
||||
close(drm_fd);
|
||||
|
||||
return 0;
|
||||
|
@ -514,7 +514,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int ret;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
ret = find_and_open_devices();
|
||||
if (ret < 0)
|
||||
@ -522,7 +522,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (nouveau_fd == -1 || intel_fd == -1 || nouveau_fd2 == -1 || intel_fd2 == -1) {
|
||||
fprintf(stderr,"failed to find intel and nouveau GPU\n");
|
||||
if (!drmtest_only_list_subtests())
|
||||
if (!igt_only_list_subtests())
|
||||
return 77;
|
||||
}
|
||||
|
||||
@ -569,7 +569,7 @@ int main(int argc, char **argv)
|
||||
intel_batch = intel_batchbuffer_alloc(bufmgr, devid);
|
||||
|
||||
#define xtest(name) \
|
||||
drmtest_subtest(#name) \
|
||||
igt_subtest(#name) \
|
||||
if (test_##name()) \
|
||||
exit(2);
|
||||
|
||||
|
@ -1267,7 +1267,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int ret, failed = 0, run = 0;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
ret = find_and_open_devices();
|
||||
if (ret < 0)
|
||||
@ -1275,7 +1275,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (nouveau_fd == -1 || intel_fd == -1) {
|
||||
fprintf(stderr,"failed to find intel and nouveau GPU\n");
|
||||
if (!drmtest_only_list_subtests())
|
||||
if (!igt_only_list_subtests())
|
||||
return 77;
|
||||
}
|
||||
|
||||
@ -1296,7 +1296,7 @@ int main(int argc, char **argv)
|
||||
batch = intel_batchbuffer_alloc(bufmgr, devid);
|
||||
|
||||
#define xtest(x, args...) \
|
||||
drmtest_subtest( #x ) { \
|
||||
igt_subtest( #x ) { \
|
||||
ret = ((x)(args)); \
|
||||
++run; \
|
||||
if (ret) { \
|
||||
@ -1331,7 +1331,7 @@ int main(int argc, char **argv)
|
||||
close(intel_fd);
|
||||
close(nouveau_fd);
|
||||
|
||||
if (!drmtest_only_list_subtests())
|
||||
if (!igt_only_list_subtests())
|
||||
printf("Tests: %u run, %u failed\n", run, failed);
|
||||
|
||||
return failed;
|
||||
|
@ -471,11 +471,11 @@ int main(int argc, char **argv)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
if (nouveau_fd == -1 || intel_fd == -1) {
|
||||
fprintf(stderr,"failed to find intel and nouveau GPU\n");
|
||||
if (!drmtest_only_list_subtests())
|
||||
if (!igt_only_list_subtests())
|
||||
return 77;
|
||||
}
|
||||
|
||||
@ -504,7 +504,7 @@ int main(int argc, char **argv)
|
||||
intel_batch = intel_batchbuffer_alloc(bufmgr, devid);
|
||||
|
||||
#define xtest(name) \
|
||||
drmtest_subtest(#name) \
|
||||
igt_subtest(#name) \
|
||||
if (test_##name()) \
|
||||
exit(2);
|
||||
|
||||
|
@ -381,10 +381,10 @@ int main(int argc, char **argv)
|
||||
};
|
||||
int i;
|
||||
|
||||
drmtest_subtest_init(argc, argv);
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(tests); i++) {
|
||||
drmtest_subtest(tests[i].name)
|
||||
igt_subtest(tests[i].name)
|
||||
tests[i].fn();
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int ret;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
ret = find_and_open_devices();
|
||||
if (ret < 0)
|
||||
|
@ -63,7 +63,7 @@ int main(int argc, char *argv[])
|
||||
FILE *file;
|
||||
int diff;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
/* Use drm_open_any to verify device existence */
|
||||
fd = drm_open_any();
|
||||
|
@ -133,7 +133,7 @@ int main(int argc, char *argv[])
|
||||
struct junk *junk = stuff;
|
||||
int fd, ret;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
if (argc > 1)
|
||||
verbose++;
|
||||
|
@ -531,7 +531,7 @@ int main(int argc, char **argv)
|
||||
GMainLoop *mainloop;
|
||||
float force_clock;
|
||||
|
||||
drmtest_skip_on_simulation();
|
||||
igt_skip_on_simulation();
|
||||
|
||||
enter_exec_path( argv );
|
||||
|
||||
@ -593,7 +593,7 @@ int main(int argc, char **argv)
|
||||
|
||||
drm_fd = drm_open_any();
|
||||
|
||||
do_or_die(drmtest_set_vt_graphics_mode());
|
||||
do_or_die(igt_set_vt_graphics_mode());
|
||||
|
||||
mainloop = g_main_loop_new(NULL, FALSE);
|
||||
if (!mainloop) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user