summaryrefslogtreecommitdiff
path: root/tools/intel_gtt.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/intel_gtt.c')
-rw-r--r--tools/intel_gtt.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/intel_gtt.c b/tools/intel_gtt.c
index 5740e794..311694ba 100644
--- a/tools/intel_gtt.c
+++ b/tools/intel_gtt.c
@@ -34,8 +34,6 @@
#include <pciaccess.h>
#include <unistd.h>
-#include "drmtest.h"
-#include "igt_device.h"
#include "intel_io.h"
#include "intel_chipset.h"
@@ -142,17 +140,13 @@ int main(int argc, char **argv)
{
struct pci_device *pci_dev;
unsigned int start, gtt_size;
- int fd;
int flag[] = {
PCI_DEV_MAP_FLAG_WRITE_COMBINE,
PCI_DEV_MAP_FLAG_WRITABLE,
0
}, f;
- fd = drm_open_driver(DRIVER_INTEL);
- pci_dev = igt_device_get_pci_device(fd);
- close(fd);
-
+ pci_dev = intel_get_pci_device();
devid = pci_dev->device_id;
if (IS_GEN2(devid)) {