lib/igt_kms: Unify pipe name helpers
[platform/upstream/intel-gpu-tools.git] / tests / gem_bad_batch.c
index da2870b..7f92a93 100644 (file)
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <assert.h>
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include "drm.h"
-#include "i915_drm.h"
+#include "ioctl_wrappers.h"
 #include "drmtest.h"
 #include "intel_bufmgr.h"
 #include "intel_batchbuffer.h"
-#include "intel_gpu_tools.h"
+#include "intel_chipset.h"
+#include "intel_io.h"
 
 static drm_intel_bufmgr *bufmgr;
 struct intel_batchbuffer *batch;
@@ -56,7 +56,7 @@ bad_batch(void)
        intel_batchbuffer_flush(batch);
 }
 
-int main(int argc, char **argv)
+igt_simple_main
 {
        int fd;
 
@@ -64,7 +64,7 @@ int main(int argc, char **argv)
 
        bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
        drm_intel_bufmgr_gem_enable_reuse(bufmgr);
-       batch = intel_batchbuffer_alloc(bufmgr);
+       batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
 
        bad_batch();
 
@@ -72,6 +72,4 @@ int main(int argc, char **argv)
        drm_intel_bufmgr_destroy(bufmgr);
 
        close(fd);
-
-       return 0;
 }