diff options
Diffstat (limited to 'tools/intel_gpu_time.c')
-rw-r--r-- | tools/intel_gpu_time.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/intel_gpu_time.c b/tools/intel_gpu_time.c index 56d65fe0..0fc73f92 100644 --- a/tools/intel_gpu_time.c +++ b/tools/intel_gpu_time.c @@ -34,8 +34,9 @@ #include <sys/resource.h> #include <sys/wait.h> +#include "drmtest.h" +#include "igt_device.h" #include "intel_io.h" -#include "intel_chipset.h" #include "intel_reg.h" #define SAMPLES_PER_SEC 10000 @@ -66,8 +67,11 @@ int main(int argc, char **argv) struct timeval start, end; static struct rusage rusage; int status; + int fd; - intel_mmio_use_pci_bar(intel_get_pci_device()); + fd = drm_open_driver(DRIVER_INTEL); + intel_mmio_use_pci_bar(igt_device_get_pci_device(fd)); + close(fd); if (argc == 1) { fprintf(stderr, "usage: %s cmd [args...]\n", argv[0]); |