summaryrefslogtreecommitdiff
path: root/tools/intel_error_decode.c
AgeCommit message (Collapse)Author
2017-11-17tools/error_decode: Print ASCII user buffersChris Wilson
Look at the first 16 characters of the user buffer and if they are all printable, assume that user buffer contains ASCII data (e.g. a debug log) that we want to simply print out. Otherwise, we treat it as a binary data and hexdump as before. Tvrtko: you know you could just write this as a printf (d'oh) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-09-08build: remove _GNU_SOURCE from source filesDaniel Vetter
We are, the build system takes care of that. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-05-11intel_error_decode: Tell zlib the correct amount of memory we allocatedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-05-10intel_error_decode: Fix off-by-one when dumping the binary objectsChris Wilson
Include the last line to show the last bytes, important when looking for overflows! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-08tools/intel_error_decode: Dump the GuC log if availableChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-08tools/intel_error_decode: Don't try instruction decoding on data buffersChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-06tools/intel_error_decode: Refactor matching known buffersChris Wilson
Lots of repeated code, and a few missed named buffers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-06tools/intel_error_decode: Automatically open a pagerChris Wilson
A feature I've wanted for a long time, just to save typing | less every time. Implementation nabbed from aubinator_error_decode. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-06tools/intel_error_decode: Add support for user specified boChris Wilson
See EXEC_OBJECT_CAPTURE. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-06tools/intel_error_decode: Do ascii85 decode firstChris Wilson
The dashes "---" may occur within an ascii85 block, but only an ascii85 block starts with ':' or '~'. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-08-10intel_error_decode: Skip inflation for uncompressed ascii85 streamsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30lib: Start weaning off defunct intel_chipset.hChris Wilson
Several years ago we made the plan of only having one canonical source for i915_pciids.h, the kernel and everyone importing their definitions from that. For consistency, we style the intel_device_info after the kernel, most notably using a generation mask and a per-codename bitfield. This first step converts looking up the generation for a devid tree from a massive if(devid)-chain to a (cached) table lookup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-12-31intel_error_decode: Update address parsing for 64bit offsetsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-12-31intel_error_decode: Fix decode headers for HW contextChris Wilson
As we didn't recognise the different buffer type, we confused it with whatever we last decoded (i.e. the render ring buffer). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-12-31intel_error_decode: Inflate compressed error stateChris Wilson
Recent kernels compress the active objects using zlib + ascii85 encoding. This adapts the tool to decompress those inplace. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-09lib: Make instdone initialisation fail gracefullyChris Wilson
Just report that we don't recognise the chipset rather than explode. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26tools/intel_error_decode: Add gen8+ fault data encodingsMika Kuoppala
These two registers contains the 48bit fault address. Reviewed-by: Michel Thierry <michel.thierry@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2015-03-26tools/intel_error_decode: Add decodings for FAULT_REGMika Kuoppala
Add decodings for FAULT_REG v2: fix fault encodings and ignore addr type for gen8+ (Michel) fix engine mask Reviewed-by: Michel Thierry <michel.thierry@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2015-03-26tools/intel_error_decode: Add ERROR decodings for gen8Mika Kuoppala
Add ERROR decodings for gen8 Reviewed-by: Michel Thierry <michel.thierry@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-12-05intel_error_decode: Decode the ERROR register on Sandybridge and IvybridgeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-30rendercopy/skl: Pass the context to rendercopy function on SKLZhao Yakui
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-03-22lib: rename intel_gpu_tools.h to intel_io.hDaniel Vetter
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-22lib: remove uncessary #includes from headersDaniel Vetter
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-01-23intel_error_decode: Protect against missing ring registersChris Wilson
A dodgy kernel may miss printing out the ring registers leading to a FPE. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-07intel_reg: Renamed INST_DONE to INSTDONEDamien Lespiau
That's how the registers are named in the kernel defines. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-06intel_error_decode: Factor out common decoding codeDamien Lespiau
4 pieces of code were looking very similar. Let's factor out a common function in the not so unlikely case we need to tweak that code. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-21intel_error_decode: Fix X/Y fence for gen2/3Chris Wilson
2013-08-07intel_error_decode: First try /sys/drm/card0/error for the error-stateChris Wilson
As the sysfs is almost always mounted and readable, we have a higher success rate checking for our error state there than in debugfs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-16tools/inter_error_decode: decode for ctl and acthdMika Kuoppala
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-04-23intel_error_decode: HEAD stuffBen Widawsky
Show the decoded HEAD value, as well as print the calculated head offset per ringbuffer. This will be superceded in the next commit, but that patch is way more complicated than this one (read: error prone), so I want this here. Example: ringbuffer (blitter ring) at 0x00044000; HEAD points to: 0x00044950 v2: Actually make it work for all rings. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-23intel_error_decode: Whitespacing fixBen Widawsky
The rest of igt has moved to kernel coding style. People had already been not conforming with the existing formatting in error decode, so we may as well fix it. This addresses two primary issues, tabbing (remove spaces), and space after function in function call. I may have missed some of the latter since that was done by hand. I have upcoming work in this file, and it was annoying me. v2: Fix case alignment (Chris) Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-04intel_error_decode: Don't barf on a malformed PCI ID lineChris Wilson
Whoops, someone added UTS_RELEASE with no newline before PCI ID which upsets our naive parser.
2012-10-10fix warn in intel_error_decode: ignoring return value of 'asprintf'Imre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-09intel_error_decode: Be more lax for whitespace around parsing PCI-IDChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-19decode: Use the correct start mask for gen3 fence registersChris Wilson
A cut'n'paste error from gen2 apparently. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-24intel_error_decode: fixup glibc free warningDaniel Vetter
Usually some random stack garbage doesn't equal some other random stack garbage, leading to the filename != path check succeeding. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09tools/intel_error_decode: fixup new warningsDaniel Vetter
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09tools/intel_error_decode: convert over to libdrm decoderDaniel Vetter
Note that a per-ring error decode state would make more sense - this way we could better decode the ring head and tail. But our current head tracking is already lame (we need the kernel to also dump the ringbuffer head/tail first, not just acthd), so I didn't bother. Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-21tools/intel_error_decode: decode gen4+ fencesDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-18intel/decode: print out chipset genDaniel Vetter
... instead of i965+ for almost everything that Intel is still selling. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-18tools/decode: don't move around the display register sectionDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-18tools/decode: don't forget to print the name of the last ringDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-17tools/decode: retain the ring nameDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-14Decode gen2/gen3 fences in the error_stateDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-02-14Remove confusing use of IS_9XXChris Wilson
... 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-01error decode: Search for first i915_error_stateChris Wilson
Handy for multi-GPU systems where the IGFX may not be first. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-09error: Parse ring name before gtt_offsetChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-23error decode: print out class of chipset in the error reportChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-10error-decode: stdin is 0 not 1Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-01error-decode: Operate as a pipe and accept input from stdinChris Wilson
Useful for feeding in compressed files from bugzilla: $ bzcat /tmp/i915_error_state.bz | intel_error_decode | less Next step would be to use gzfopen or bzfopen to automagically handle compressed files... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>