return fd;
gem_quiescent_gpu(fd);
- drmtest_install_exit_handler(quiescent_gpu_at_exit);
+ igt_install_exit_handler(quiescent_gpu_at_exit);
return 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();
}
}
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);
}
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);
signal_helper = pid;
}
-void drmtest_stop_signal_helper(void)
+void igt_stop_signal_helper(void)
{
int exitcode;
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[] = {
/*
* 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);
}
}
-bool drmtest_only_list_subtests(void)
+bool igt_only_list_subtests(void)
{
return list_subtests;
}
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)
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;
}
}
-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
return atoi(val) != 0;
}
-bool drmtest_run_in_simulation(void)
+bool igt_run_in_simulation(void)
{
static int simulation = -1;
/* 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;
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))
}
}
-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;
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;
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;
}
}
-void drmtest_cleanup_aperture_trashers(void)
+void igt_cleanup_aperture_trashers(void)
{
int i;
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;
exit_handler_fn[i](sig);
}
-static void drmtest_atexit_handler(void)
+static void igt_atexit_handler(void)
{
restore_all_sig_handler();
call_exit_handlers(0);
}
-static void drmtest_sig_handler(int sig)
+static void igt_sig_handler(int sig)
{
restore_all_sig_handler();
* 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;
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;
return -1;
}
-void drmtest_disable_exit_handler(void)
+void igt_disable_exit_handler(void)
{
sigset_t set;
int i;
exit_handler_disabled = true;
}
-void drmtest_enable_exit_handler(void)
+void igt_enable_exit_handler(void)
{
if (!exit_handler_disabled)
return;
* 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;
}
}
#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;
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;
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);
-
-/* check functions which auto-skip tests by calling drmtest_skip() */
+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 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;
}
if (HAS_BSD_RING(intel_get_drm_devid(fd)))
return true;
- drmtest_skip();
+ igt_skip();
return false;
}
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;
#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);
int i;
char *ptr;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
char *ptr;
drm_intel_bo *load_bo;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
int i;
char *ptr;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
int i;
char *ptr;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
{
int fd;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
{
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;
if (bo->offset < mappable_gtt_limit &&
(IS_G33(devid) || intel_gen(devid) >= 4))
- drmtest_trash_aperture();
+ igt_trash_aperture();
copy_bo(tmp_bo, bo);
}
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);
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");
}
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");
}
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");
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();
}
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();
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);
}
/* 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);
}
/* 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++)
}
/* 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++)
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++) {
}
/* 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--; )
}
/* 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--; )
}
}
- drmtest_stop_signal_helper();
+ igt_stop_signal_helper();
return 0;
}
}
count = aper_size / 4096 * 2;
- if (drmtest_run_in_simulation())
+ if (igt_run_in_simulation())
count = 10;
handles = malloc (count * sizeof(uint32_t));
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 */
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? */
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");
int count;
drm_intel_bo *sample_batch_bo;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
// 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");
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,
{
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();
}
uint32_t ctx_id;
int ret, fd;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
uint32_t ctx_id;
int fd;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
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;
}
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();
uint32_t ctx_id;
int fd;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
int fd;
int devid;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
if (argc != 1) {
fprintf(stderr, "usage: %s\n", argv[0]);
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);
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");
}
}
- drmtest_subtest("blt") {
+ igt_subtest("blt") {
if (gem_check_blt(fd)) {
sleep(2);
printf("running dummy loop on blt\n");
}
}
- drmtest_subtest("vebox") {
+ igt_subtest("vebox") {
if (gem_check_vebox(fd)) {
sleep(2);
printf("running dummy loop on vebox\n");
}
}
- drmtest_subtest("mixed") {
+ igt_subtest("mixed") {
if (num_rings > 1) {
sleep(2);
printf("running dummy loop on random rings\n");
close(fd);
- return drmtest_retval();
+ return igt_retval();
}
int fd, ret;
drm_intel_bo *tmp;
- drmtest_subtest_init(argc, argv);
+ igt_subtest_init(argc, argv);
fd = drm_open_any();
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);
}
}
- drmtest_subtest("gtt-domain") {
+ igt_subtest("gtt-domain") {
BEGIN_BATCH(2);
OUT_BATCH(0);
OUT_RELOC(tmp, I915_GEM_DOMAIN_GTT, 0, 0);
#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,
}
#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),
uint32_t reloc_ofs;
unsigned batch_size;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
{
int i;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
if (argc > 1) {
for (i = 1; i < argc; i++) {
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;
{ .name = NULL },
}, *p;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
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");
close(fd);
- return drmtest_retval();
+ return igt_retval();
}
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;
int num_fences;
uint32_t devid;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
num_fences = get_num_fences(fd);
{
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;
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;
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();
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);
}
/* 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);
}
/* 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++)
}
/* 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++)
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++) {
}
/* 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--; )
}
/* 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--; )
}
}
- drmtest_stop_signal_helper();
+ igt_stop_signal_helper();
return 0;
}
uint32_t *ptr;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
int loop, i, tiling;
int fd;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
if (argc > 1)
size = atoi(argv[1]);
unsigned long pitch, act_size;
int fd, i, devid;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
memset(blob, 'A', sizeof(blob));
{
int fd;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
{
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)
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;
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);
{
int fd, i;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
if (bo->offset < mappable_gtt_limit &&
(IS_G33(devid) || intel_gen(devid) >= 4))
- drmtest_trash_aperture();
+ igt_trash_aperture();
copy_bo(tmp_bo, bo);
}
}
}
- drmtest_progress("partial reads test: ", i, ROUNDS);
+ igt_progress("partial reads test: ", i, ROUNDS);
}
}
}
drm_intel_gem_bo_unmap_gtt(staging_bo);
- drmtest_progress("partial writes test: ", i, ROUNDS);
+ igt_progress("partial writes test: ", i, ROUNDS);
}
}
}
drm_intel_gem_bo_unmap_gtt(staging_bo);
- drmtest_progress("partial read/writes test: ", i, ROUNDS);
+ igt_progress("partial read/writes test: ", i, ROUNDS);
}
}
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();
}
{
srandom(0xdeadbeef);
- drmtest_subtest_init(argc, argv);
- drmtest_skip_on_simulation();
+ igt_subtest_init(argc, argv);
+ igt_skip_on_simulation();
fd = drm_open_any();
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, "");
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();
}
uint32_t *handle, *offset;
int fd, i;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
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++) {
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;
}
{ -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]);
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;
}
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) {
close(fd);
- return drmtest_retval();
+ return igt_retval();
}
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();
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]);
close(fd);
- return drmtest_retval();
+ return igt_retval();
}
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();
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);
}
/* 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);
}
/* 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++)
}
/* 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++)
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++) {
}
/* 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--; )
}
/* 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--; )
}
}
- drmtest_stop_signal_helper();
+ igt_stop_signal_helper();
return 0;
}
{ -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]);
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;
}
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) {
close(fd);
- return drmtest_retval();
+ return igt_retval();
}
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]);
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;
}
}
- 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;
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;
}
}
- 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;
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;
}
}
- 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;
close(fd);
- return drmtest_retval();
+ return igt_retval();
}
int ret;
int handle;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
int fd, i, ring;
uint32_t test;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
memset(blob, 'A', sizeof(blob));
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]);
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");
uint32_t start = 0;
int i, j, fd, count;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
int x = i % width;
int y = i / width;
- drmtest_progress(output, i, width*height);
+ igt_progress(output, i, width*height);
assert(y < height);
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();
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,
*/
copy = get_render_copyfunc(batch->devid);
- drmtest_subtest("render") {
+ igt_subtest("render") {
if (copy)
fails += check_ring(bufmgr, batch, "render", copy);
}
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);
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;
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;
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;
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;
bool tiling_changed;
int tile_height;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
int i;
uint32_t handle;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
int fd;
int devid;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
if (argc != 1) {
fprintf(stderr, "usage: %s\n", argv[0]);
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);
}
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);
}
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);
}
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);
}
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++;
/* start our little helper early before too may allocations occur */
if (options.use_signal_helper)
- drmtest_fork_signal_helper();
+ igt_fork_signal_helper();
init();
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);
close(drm_fd);
- drmtest_stop_signal_helper();
+ igt_stop_signal_helper();
return 0;
}
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++)
{
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);
unsigned long pitch = 0;
int r;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
assert(fd >= 0);
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");
{
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]);
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);
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;
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);
}
}
}
- drmtest_progress("partial reads test: ", i, ROUNDS);
+ igt_progress("partial reads test: ", i, ROUNDS);
}
}
}
drm_intel_gem_bo_unmap_gtt(staging_bo);
- drmtest_progress("partial writes test: ", i, ROUNDS);
+ igt_progress("partial writes test: ", i, ROUNDS);
}
}
}
drm_intel_gem_bo_unmap_gtt(staging_bo);
- drmtest_progress("partial read/writes test: ", i, ROUNDS);
+ igt_progress("partial read/writes test: ", i, ROUNDS);
}
}
{
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);
&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);
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);
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 */
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. */
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;
{
int fd, i;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
uint32_t start = 0;
int i, fd, count;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
bool done = false;
int i, iter = 1;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
fd = drm_open_any();
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
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);
};
int i;
- drmtest_subtest_init(argc, argv);
- drmtest_skip_on_simulation();
+ igt_subtest_init(argc, argv);
+ igt_skip_on_simulation();
fd = drm_open_any();
}
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);
};
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();
}
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);
!(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);
};
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;
{
int ret;
- drmtest_subtest_init(argc, argv);
+ igt_subtest_init(argc, argv);
ret = find_and_open_devices();
if (ret < 0)
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;
}
intel_batch = intel_batchbuffer_alloc(bufmgr, devid);
#define xtest(name) \
- drmtest_subtest(#name) \
+ igt_subtest(#name) \
if (test_##name()) \
exit(2);
{
int ret, failed = 0, run = 0;
- drmtest_subtest_init(argc, argv);
+ igt_subtest_init(argc, argv);
ret = find_and_open_devices();
if (ret < 0)
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;
}
batch = intel_batchbuffer_alloc(bufmgr, devid);
#define xtest(x, args...) \
- drmtest_subtest( #x ) { \
+ igt_subtest( #x ) { \
ret = ((x)(args)); \
++run; \
if (ret) { \
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;
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;
}
intel_batch = intel_batchbuffer_alloc(bufmgr, devid);
#define xtest(name) \
- drmtest_subtest(#name) \
+ igt_subtest(#name) \
if (test_##name()) \
exit(2);
};
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();
}
{
int ret;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
ret = find_and_open_devices();
if (ret < 0)
FILE *file;
int diff;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
/* Use drm_open_any to verify device existence */
fd = drm_open_any();
struct junk *junk = stuff;
int fd, ret;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
if (argc > 1)
verbose++;
GMainLoop *mainloop;
float force_clock;
- drmtest_skip_on_simulation();
+ igt_skip_on_simulation();
enter_exec_path( 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) {