178 Commits

Author SHA1 Message Date
Imre Deak
4dec89aef7 lib: fix exit handler when multiple handlers are registered
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-22 18:18:28 +02:00
Imre Deak
cf26435be8 lib: add helper to set VT graphics mode
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-08 21:00:42 +02:00
Damien Lespiau
6587f66ff3 lib: Add the declaration of intel_register_access_needs_fakewake()
Otherwise gcc complains that the function hasn't been declared.
2013-05-08 13:34:35 +01:00
Damien Lespiau
f5f6036bbe lib: Remove the execution bit of intel_chipset.h 2013-05-08 13:34:26 +01:00
Zhong Li
8ddf84d129 i-g-t: check kernel enable rings or not
1. add functions check kernel enable a ring or not.
2. add function gem_get_num_rings() to check how many rings kernel has
enable.
3. gem_ring_sync_loop.c will call gem_get_num_rings() directly instead
of original static fucntion get_number_rings().

Signed-off-by: Zhong Li <zhong.li@intel.com>
[Ben: Wrapped commit message + whitespace fixes]
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-05-03 17:39:14 -07:00
Ben Widawsky
8be812b86c intel_mmio: Add intel_register_access_needs_fakewake
I screwed this up in my recent patch:
commit c7b6ec50007e2e524a208572c34faf1380eeab1b
Author: Ben Widawsky <ben@bwidawsk.net>
Date:   Wed Apr 24 19:05:18 2013 -0700

    clean warnings: Silence unused (or private) functions

I've clarified the functions now, and added the proper call from the
python script.

Time to get a regression tester for our tools?

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-26 14:34:48 -07:00
Chris Wilson
2facc1368d Check for vebox support before testing
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63941
2013-04-26 08:30:52 +01:00
Jesse Barnes
cae610a2e5 fix breakage from newly used functions vs rebase 2013-04-25 15:18:19 -07:00
Jesse Barnes
d6917cf72d add punit and nc read/write tools for vlv
Good for testing/debugging.
2013-04-25 14:43:23 -07:00
Ben Widawsky
c7b6ec5000 clean warnings: Silence unused (or private) functions
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-24 19:11:03 -07:00
Xiang, Haihao
96baf59f3e tests: storedw on VEBOX
v2 (Ben): Define LOCAL_I915_EXEC_VEBOX
Small copyright fixes

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-24 18:56:10 -07:00
Ben Widawsky
f60dd51535 intel_mmio: a query for forcewake requirement
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-16 14:06:02 -07:00
Ben Widawsky
8904d29416 intel_mmio: Allow mmio without debugfs
With the introduction of the forcewake dance:

commit cac8f8b52621f246a7cff412f340a7db28cb1b99
Author: Ben Widawsky <ben@bwidawsk.net>
Date:   Thu Jul 28 13:40:19 2011 -0700

    forcewake: Add mmio code to do proper forcewake stuff for gen6

We lost the ability to do register access when either debugfs isn't
mounted, or when the driver isn't loaded. The latter can be beneficial
in debugging situations.

This patch will allow the driver to still do mmio (leaving forcewake
management up to the callers) provided that the i915 driver appears to
not be loaded (according to sysfs)

Requested by Jesse.

Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-16 14:06:02 -07:00
Jesse Barnes
25339595a7 add VLV punit & north cluster read tools 2013-04-16 13:41:23 -07:00
Paulo Zanoni
b0c63a781d intel_reg_dumper: improve the dumping of backlight registers
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-04-09 13:52:54 -03:00
Daniel Vetter
cb3a44fa26 lib/drmtest: tune down signal handler stats
Avoids tests with a spurious WARN result in piglit.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-04-08 00:31:06 +02:00
Daniel Vetter
16e44f5499 lib: fixup register access on gen2/3
This wreaked havoc with intel_reg_dumper since it's been broken in

commit c6fe31bc473a7ae44bc42bad7da5faca3c924821
Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
Date:   Thu Jun 21 14:31:34 2012 -0300

    intel_reg_dumper: use intel_register_access_init/fini

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-04-03 00:22:41 +02:00
Paulo Zanoni
1043b22bb0 lib: fix HAS_PCH_SPLIT check
So HAS_PCH_SPLIT on't be true on VLV.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Paulo Zanoni
051e327247 intel_reg_dumper: dump HSW watermark registers
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Paulo Zanoni
5c0ce0f2a9 intel_reg_dumper: make Haswell dump useful
It was previously printing ironlake_debug_regs and haswell_debug_regs.
Since ironlake_debug_regs contains a lot of registers that don't exist
on Haswell, running intel_reg_dumper on Haswell caused "unclaimed
register" messages. Now I've copied the existing registers from
ironlake_debug_regs to haswell_debug_regs, so we won't print the
registers that don't exist anymore.

Also removed DP_TP_STATUS_A since it doesn't exist.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Paulo Zanoni
29abdb96dc lib: detect PCH_LPT and PCH_NONE
So we don't assign PCH_IBX to anything that's not PCH_CPT nor PCH_LPT.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Damien Lespiau
c6c6f0f593 lib: Add a comment about why we only parse long options for subtests
For thet next one wondering about that.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-22 11:08:17 +00:00
Damien Lespiau
7ee278f176 build: Guard the inclusions of config.h with HAVE_CONFIG_H
autoconf can be configured to not generate a config.h but to give the
defines with command line arguments instead. In this case, there's no
config.h to include.

To work in both cases autoconf adds a HAVE_CONFIG_H define on the command
line to signal there's a config.h to include.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:45:34 +00:00
Damien Lespiau
aa2bd8a692 lib: Allow to override the device id at run time
Using the same environment variable as libdrm so one doesn't have to
remember two different things. This is helpful to run a test under a
fake identity, to, say, dump an aub file.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:45:18 +00:00
Damien Lespiau
75f52a6e3b lib: Factor out a function to check if an environment variable is set
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:45:18 +00:00
Kenneth Graunke
6c04309579 intel_chipset: Fix Haswell CRW PCI IDs.
The second digit was off by one, which meant we accidentally treated
GT(n) as GT(n-1).  This also meant no support for GT1 at all.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-03 19:54:32 +01:00
Ville Syrjälä
84b525cf46 intel_chipset: Add multiple inclusion guards into intel_chipset.h
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-02-19 13:55:08 +01:00
Ville Syrjälä
d7b06f50d2 intel_chipset: Use parens around macro arguments
Protect the macro argument evaluations with parens.

This is already touching most lines, so while at it, fix up all white
space to uniform style throughout the file.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-02-19 13:55:00 +01:00
Damien Lespiau
bb33d08845 lib: Add a way to specify values for "quick" runs
In some environments, we don't really want to loop 100000 times or
allocate 152352621 buffers because it makes the tests too long to run.

This adds a way to specify "quick" values to reduce the time taken by
certain tests.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-02-13 18:09:11 +01:00
Jesse Barnes
34c66d0739 add more VLV PCI IDs
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2013-02-02 11:24:56 +01:00
Daniel Vetter
0af2b184ad lib: extract kmstest_get_pipe_from_crtc_id 2012-12-17 15:30:54 +01:00
Chris Wilson
1945e2a7f1 Implement a working gen7 rendercopy
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57825
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-06 19:52:10 +00:00
Chris Wilson
50fdf32e46 pci: Search for the first Intel GPU, rather than assume a fixed slot
Everywhere else we search for a match based on an Intel display
device, so if the quick check of the fixed slot fails, fallback to
walking the PCI bus looking for a match.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-06 12:18:58 +00:00
Daniel Vetter
da6473184c tools/intel_reg_dumper: add some cpt/ppt debug regs
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-01 00:57:36 +01:00
Daniel Vetter
64f669f7a9 lib: extract get_render_copyfunc
Otherwise we won't update all the tests if we add new render
copyfuncs.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-29 14:59:57 +01:00
Daniel Vetter
9fc7e1386a lib/drmtest: subtest infrastructure
To make these helpers as least invasive as possible simply initialize
the options with a getopt parser and let the control flow be steered
with a simple helper which gets the subtest name as an argument.

The only tricky part for using it is that the subtest check helper
doubles up as the conduit to enumerate tests (and in that mode
prevents any test from being run). It is therefore important that
nothing gets printed to stdout outside of these checks.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 11:57:58 +01:00
Daniel Vetter
021909e10d tests: dont polute stderr if the test succeeds/skips
Results in spurious 'warn' results in piglit. Also don't print
progress indicators when not outputting to a terminal.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 11:08:37 +01:00
Imre Deak
21393431f1 drmtest: add function to remove an DRM FB
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-16 16:51:56 +02:00
Daniel Vetter
50d46750d9 lib/mmio: gen2 has a bigger register window, too
It's split up into two parts, with the gtt pte range in between.
Without this I couldn't read the ADPA register ...
2012-10-12 10:45:52 +02:00
Imre Deak
6456e75f0d fix warn: 'div' shadows a global declaration
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-10 15:59:02 +02:00
Daniel Vetter
5f94468f52 lib: remove auto-quiescenting of the gpu
In retrospective, this is an ugly idea. Any tests that needs this
can call it themselves.
2012-10-09 19:27:41 +02:00
Daniel Vetter
b8e384a4d5 lib: make drmtest_progress more robust 2012-10-09 17:50:40 +02:00
Daniel Vetter
df7edaab90 lib: helper to convert gem_hanlde to drm_intel_bo 2012-10-02 10:32:10 +02:00
Daniel Vetter
9d1a3587ac drmtest: use do_or_die 2012-10-01 11:34:10 +02:00
Ben Widawsky
54ed938d39 clang: Fix warnings found through clang.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-30 14:19:10 -07:00
Chris Wilson
51baabb562 Add bare-metal interface to adjust cacheing (i.e. snoop status) of a bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-27 09:39:45 +01:00
Chris Wilson
7a02aa4cbf mmio: Limit the uc- mapping to only map the registers
In the future, we may like to enable wc mapping of at least the GATT,
and so causing a conflict if we attempt to map the entire bar as uc-
here. Obviously we need a better fallback plan, but for the moment only
attempt to map the portion of the pci space that we use for register
access.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-27 09:34:33 +02:00
Daniel Vetter
3d148e164d s/NO_PID/NOP_ID
Alan typo'ed it, I've failed to notice :(
2012-08-25 00:01:27 +02:00
Alan Coopersmith
6b3e6f28d2 Rename NOPID to NO_PID to avoid conflict with Solaris NOPID
Solaris <sys/types.h> already has #define NOPID (pid_t)(-1)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-24 23:20:22 +02:00
Vijay Purushothaman
4fc76adf31 tools: Added intel_dpio_read and intel_dpio_write
In Valleyview the DPLL and lane control registers are accessible only
through side band fabric called DPIO. Added two tools to read and write
registers residing in this space.

v2: Moved the core read/write functions to lib/intel_dpio.c based on
Ben's feedback

Signed-off-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-21 09:30:29 +02:00