summaryrefslogtreecommitdiff
path: root/tools/intel_gtt.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-04-08 11:56:57 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-04-08 12:17:31 +0100
commit95374225e865da3a30153f73e8bb536700d15459 (patch)
treeab8797a6f255a0d76e5d8e7439b8fe4a9b34ca90 /tools/intel_gtt.c
parentcd64e193299be4b9733a5e804cedd99e2072830f (diff)
Enable compilation on non-Intel, non-DRM systems.
A few of the tools can be performed post-mortem from a different system, so it is useful to be able to compile those tools on those foreign systems. Obviously, any program to interact with the PCI device or talk to GEM will fail on a non-Intel system. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools/intel_gtt.c')
-rw-r--r--tools/intel_gtt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/intel_gtt.c b/tools/intel_gtt.c
index 2e71104c..2c1639cd 100644
--- a/tools/intel_gtt.c
+++ b/tools/intel_gtt.c
@@ -42,10 +42,14 @@
int main(int argc, char **argv)
{
+ struct pci_device *pci_dev;
int start, aper_size;
unsigned char *gtt;
+ uint32_t devid;
- intel_get_mmio();
+ pci_dev = intel_get_pci_device();
+ devid = pci_dev->device_id;
+ intel_get_mmio(pci_dev);
if (!IS_9XX(devid)) {
printf("Unsupported chipset for gtt dumper\n");