13 Commits

Author SHA1 Message Date
Daniel Vetter
c03c6ceb29 lib: rename intel_gpu_tools.h to intel_io.h
With the header cleanup we can now give this header a suitable name,
since it now really only contains register access and other I/O
functions and assorted definitions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:34:29 +01:00
Daniel Vetter
6cfcd71589 lib: remove uncessary #includes from headers
Only include what the header itself needs. The big fish here is
intel-gpu-tools.h. More will follow.

One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one
of which was broken.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 20:08:13 +01:00
Ben Widawsky
d92c2cf1de intel_gtt: Dump the whole GTT
The tool formerly only dumped the aperture size, which is fine, but not
everything interesting. Most of the patch is just the variable rename.
The real work happens with using the BAR0 size divided by 2 instead of
the BAR2 size.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-03-19 10:14:57 -07:00
Ben Widawsky
612252f3f9 intel_gtt: Raw PTE dumper mode
./tools/intel_gtt -d | head
GTT offset |                 PTEs
--------------------------------------------------------
  0x000000 | 0xe4005015 0xe2854015 0xe283e015 0xe283f015
  0x004000 | 0xe28ba015 0xe28bb015 0xe28b6015 0xe28b7015
  0x008000 | 0xe2828015 0xe2829015 0xe282a015 0xe282b015
  0x00c000 | 0xe2928015 0xe2929015 0xe292a015 0xe292b015
  0x010000 | 0xe2918015 0xe2919015 0xe291a015 0xe291b015
  0x014000 | 0xe291c015 0xe291d015 0xe291e015 0xe291f015
  0x018000 | 0xe2920015 0xe2921015 0xe2922015 0xe2923015
  0x01c000 | 0xe2924015 0xe2925015 0xe2926015 0xe2927015

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-09-03 15:31:14 -07:00
Ben Widawsky
c6f9bdc66f intel_gtt: Properly support gen6+ GTT PTEs
This finishes the objective in the last patch which was to actually deal
with physical addresses, and not the PTEs.

GEN6+ Provided support for physical addresses above 4GB. I'm not
actually sure what Ironlake supported, and don't feel like firing up the
timemachine.

v2: Add support for gen4, gen5, and haswell.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-09-03 15:31:14 -07:00
Ben Widawsky
8adfb5886d intel_gtt: Use function to get the physical address
The GTT PTEs that the tool is trying to compare is really about
addresses, and not the PTE itself. To accomplish this, make which
calculates the physical address we actually want.

This commit itself doesn't change any functionality; just the wording in
the code.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-09-03 15:31:14 -07:00
Ben Widawsky
f5c3e5811e intel_gtt: Fix PTE offsets
Vincent sent me a patch which I think didn't go far enough.

Honestly, I don't even know what this tool does.

Reported-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-04 17:53:48 -08:00
Chris Wilson
a4783f9485 intel_gtt: Harden against changes to kernel mappings of the GTT
Rather than use the common mmio segment which will be in future
restricted to just the registers and so exclude the GTT portion on all
architectures, explicitly mmap the GTT ourselves. Repeat this mmapping
with a couple of flags until we matching the existing kernel mapping.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-27 09:34:30 +02:00
Daniel Vetter
faf3dd1135 tools/intel_gtt: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Chris Wilson
41570d9bf5 Remove confusing use of IS_9XX
... and test for what we mean instead.

Reported-by: Diego Celix <dcelix@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-14 15:57:40 +00:00
Chris Wilson
3c5c8ba71c Search for the first Intel dri device.
This is vital in a multi-GPU system so that we only test the Intel card
and not the discrete GPUs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-01 13:37:04 +00:00
Chris Wilson
95374225e8 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>
2010-04-08 12:17:31 +01:00
Eric Anholt
a5846bff27 intel_gtt: Add intel_gtt from the 2D driver.
We've used it several times in bringing up the AGP driver, so it seems
useful to have aronud.
2010-02-01 15:02:57 -08:00