263 Commits

Author SHA1 Message Date
Paulo Zanoni
fd58520796 Add tools/intel_infoframes
This is a command-line tool that allows us to display and modify the
InfoFrames we send.

v2: use argv instead of stdin

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-13 15:48:08 +02:00
Daniel Vetter
c4ae3bc412 update .gitingore 2012-03-20 14:26:31 +01:00
Chris Wilson
3928569eed intel_gpu_top: Trust the register access is safe
Fixes intel_gpu_top on gen3 which otherwise refuses to do mmio.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-19 14:25:13 +00:00
Chris Wilson
bf6c480d6d decode: Use the correct start mask for gen3 fence registers
A cut'n'paste error from gen2 apparently.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-19 14:24:22 +00:00
Eugeni Dodonov
be7ca950d7 intel_reg_read: add a flag to simplify bit decoding
This allows to specify '-d' parameter which will decode individual bits in
each register being read.

The register bits are printed horizontally for space reasons. This
requires more than 80x25 terminal to see them all. An alternative solution
would be to print them vertically, but this will become much more
difficult to read when printing multiple registers at the same time.

v2: fix spacing to get us a bit closer to the code nirvana.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-03-13 17:55:51 -03:00
Eugeni Dodonov
8d45456428 intel_reg_read: support reading multiple registers
The registers must be passed on the command line and will be read
sequentially, one at a time.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-03-13 17:55:51 -03:00
Eugeni Dodonov
b7464e4032 intel_reg_read: add support for getopt
This will allow us to pass more options to it in the future.

v2: fix whitespacing issues and improve scary warning text as suggested by
Paul Menzel.

Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-03-13 17:55:51 -03:00
Eric Anholt
732547793f intel_reg_dumper: Add dumping of GPU turbo regs.
I was interested in finding why my IVB system is not getting GPU turbo
after suspend/resume.  The piece that looks weird to me is that
INTERRUPT_THRESHOLD is sitting at 0, whereas pre-suspend it's
0x12000000.
2012-02-22 10:45:01 +01:00
Eric Anholt
6624325f13 reg_dumper: Refactor duplicated reg-dumping code. 2012-02-22 10:44:42 +01:00
Daniel Vetter
8bedcae848 tests/intel_reg_dumper: s/pipe/disp_pipe/ to shut off the compiler
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 12:26:23 +01:00
Paulo Zanoni
3b65f179f2 Add intel_panel_fitter tool
The tool allows you to change the panel fitter settings, so you can
change the size of the screen being displayed on your monitor without
changing the real pixel size of your desktop. The biggest use case for
this tool is to work around overscan done by TVs and some monitors in
interlaced mode.

v2: reviews by Ben, Chris and Rodrigo
 - don't install
 - use intel_register_access_init
 - check for maximum X and Y values
 - add a disclaimer saying this is not the real solution
 - print less when pf is disabled and option '-l' is used

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 00:01:34 +01:00
Paulo Zanoni
ecad594e02 reg_dumper: change and fix behavior when using dump files
Before this patch, handling dump files was wrong:
- when HAS_PCH_SPLIT was specified, intel_reg_dumper segfaulted inside
  intel_check_pch()
- the "devid" variable was used but not set
- there was no way to specify the device id of the machine used to
  generate the dump file

This patch fixes this behavior with the following changes:
- the HAS_PCH_SPLIT variable is gone
- there is now a '-d' argument that can be used to specify the device id
  used to interpret the results
- when a dump file is used but the '-d' argument is not provided, an
  Ironlake machine is assumed

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 00:01:30 +01:00
Paulo Zanoni
ad87b06fd6 reg_dumper: add interlaced information to TRANSCONF
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 00:01:28 +01:00
Paulo Zanoni
3310db08d8 reg_dumper: add interlaced and rotation information to PIPECONF
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 00:01:25 +01:00
Daniel Vetter
24c8d2f112 remove old .c files
Oopps, I've forgotten about this in

commit 9b32894937af27f9ba95ea572ac857d376fe9034
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sat Feb 11 16:52:26 2012 +0100

    prepend 'intel_' to installed programms

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-12 12:16:25 +01:00
Daniel Vetter
9b32894937 prepend 'intel_' to installed programms
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-11 16:52:26 +01:00
Alan Coopersmith
e61b917134 Move free(cmd) to after last use of cmd in intel_gpu_top
Error: Use after free (CWE 416)
   Use after free of pointer 'cmd' in call to fprintf
        at line 496 of tools/intel_gpu_top.c in function 'main'.
          Previously freed at line 491 with free.
[ This bug was found by the Parfait 0.4.2 bug checking tool.
  For more information see http://labs.oracle.com/projects/parfait/ ]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-06 20:44:51 +01:00
Daniel Vetter
611e0cb333 intel_reg_dumper: add TRANS_VSYNCSHIFT
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-27 18:50:21 +01:00
Ben Widawsky
6b6b13906a intel_reg_write: use register access init/fini
This will do the proper forcewake stuff.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-01-25 21:06:25 -08:00
Ben Widawsky
6e3066c9c3 intel_reg_read: use register access init/fini
This will do the proper forcewake stuff.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-01-25 21:05:15 -08:00
Chris Wilson
1ffe6b0ee8 intel_bios_reader: Sanitize input to ensure all data blocks are within bounds
Running intel_bios_reader upon itself causes the reader to crash and
burn. It obviously finds a VBT signature inside the binary, but then
does not rigorously check that all data blocks are valid before
dereferencing them.

Reported-by: Emanuel Bronshtein
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45205
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-25 10:16:21 +00:00
Daniel Vetter
ca10c7231d intel_error_decode: fixup glibc free warning
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-24 21:41:17 +01:00
Wu Fengguang
e64abe581a intel_audio_dump: show more AUD_CONFIG bits
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-21 23:35:09 +01:00
Wu Fengguang
3beea0bd0c intel_audio_dump: fix missing Audio DIP tabs
This makes the SNB/IVY Audio DIP values aligned with others.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-21 23:34:47 +01:00
Gaetan Nadon
91a01e0348 tools: use correct src and build location
Headers are found under top_srcdir/
Headers are CPP flags, not C Flags
libintel_tools.la is located in top_builddir.
Use dist_bin_SCRIPTS so it is included in tarball
Line-up the line continuation characters

Acked-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2012-01-12 09:13:08 -05:00
Daniel Vetter
bd811d2d39 tools/intel_stepping: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01: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
Daniel Vetter
5774fadf7d tools/intel_reg_dumper: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Daniel Vetter
d50e6368ab remove tools/intel_decode
Everyone's using the libdrm decoder now.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Daniel Vetter
904bcab7ba tools/intel_gpu_top: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Daniel Vetter
2ca6c6b4fd tools/intel_dump_decode: use libdrm decoder
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Daniel Vetter
24a33db7f0 tools/intel_bios_reader: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Daniel Vetter
74b70baf14 tools/intel_bios_dumper: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:28 +01:00
Daniel Vetter
03ab1328a7 tools/intel_audio_dump: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:28 +01:00
Daniel Vetter
391e6aa89a tools/intel_error_decode: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:28 +01:00
Daniel Vetter
7ee9f16e51 tools/intel_error_decode: convert over to libdrm decoder
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>
2012-01-09 23:38:17 +01:00
Alan Coopersmith
c461006bac List out array values instead of using gcc range extension
Required to compile with Solaris Studio cc compiler.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-08 21:49:03 +01:00
Alan Coopersmith
f73dddc767 Solaris defines struct winsize in termios.h
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-08 21:49:03 +01:00
Gaetan Nadon
665b86664a config: use project wide xorg warnings variable
Use CWARNFLAGS as in all of xorg. There seems to be no reason why this
module should be different. The warnings were updated recently
for those who install the latest util-macros.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-04 10:47:11 +01:00
Gaetan Nadon
6540ed2112 Use standard .gitignore file and layout
Reusing xorg code saves maintenance in the long term.

Now that m4/.gitignore is removed, the -I m4 ${ACLOCAL_FLAGS}
must be removed to avoid build breakage as m4 is generated and not
part of the git source.

Acked-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-04 10:47:10 +01:00
Eugeni Dodonov
47a5bc505c tools/intel_reg_dumper: retrieve rc6 residency values
This allows to check if rc6 works, and how long have we been in each
state.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-01-03 15:18:06 -02:00
Eugeni Dodonov
1649ab350f tools/intel_reg_dumper: Add support for debug register
Right now, we only check for hardware DRRS support. But much more can be
done with it. Some day.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-01-03 15:18:06 -02:00
Wu Fengguang
f3f84bb350 intel_audio_dump: show Gamut Metadata DIP
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:23 +01:00
Wu Fengguang
821e07d00d intel_audio_dump: show interrupt enable bit
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:23 +01:00
Wu Fengguang
ee94958d13 intel_audio_dump: show HDMI encoding
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:23 +01:00
Wu Fengguang
e321f1315b intel_audio_dump: show VIDEO_DIP_CTL_* for CPT
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:23 +01:00
Wu Fengguang
c0635c3f5c intel_audio_dump: show ironlake ELD_access_address
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:23 +01:00
Wu Fengguang
f32aecb296 intel_audio_dump: show ELD contents for G45
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
6fcb5cdcbc intel_audio_dump: show detected chipset name
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
b5ca6b4410 intel_audio_dump: show DP control registers for Ironlake
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00