1788 Commits

Author SHA1 Message Date
Ben Widawsky
aa6fbd18d4 gem_linear_blits: Use iterator for blit batch setup
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-09 12:52:09 -07:00
Ben Widawsky
4de3b1765e gem_exec_faulting_reloc: use iterator for batchbuffer
This will help keep the code clean for new platforms which might have
differently sized relocations.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-09 12:51:21 -07:00
Daniel Vetter
6f8c30d8ed tests: add kms_addfb
Just a bunch of testcase to check that all the addfb sanity checks
work as they should.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-09 21:20:40 +02:00
Daniel Vetter
590f610140 lib/drmtest: extract rawer __gem_set_tiling
For tests that expect failures. Also apply the existing gem_set_tiling
helper a bit wider.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-09 20:50:50 +02:00
Ben Widawsky
40599b0779 pwrite_pread: Get devid only once
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-08 20:47:28 -07:00
Ben Widawsky
a2925b0989 pwrite_pread: Extract batch building
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-08 20:47:26 -07:00
Ben Widawsky
41ae28e498 pwrite_pread: use execbuf.batch_len for size
This will make an upcoming change easier.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-08 20:33:41 -07:00
Ben Widawsky
96f665cabb gem_tiled_blits: Squash bo leak on simulation
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-08 20:32:12 -07:00
Ben Widawsky
f75dec0b41 gem_tiled_blits: Squash memory leak on simulation
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-08 18:36:32 -07:00
Daniel Vetter
304c458d54 tests/kms_flip: Skip if no clone configuration could be found
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-07 22:55:14 +02:00
Ben Widawsky
bc888c2b42 configure.ac: require dri2proto for overlay
With the introduction of

commit f9a50de3dcc501e930de6c60983a4feb57121e7e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Aug 17 11:12:07 2013 +0100

    Introduce intel-gpu-overlay

dri2proto became a dependency (and there is no way to disable overlay
explicitly. The actual version chosen was arbitrarily stolen from mesa.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-05 16:21:11 -07:00
Daniel Vetter
ae599546fa tests/pc8: Fail harder
If the test enviroment isn't properly set up we should fail the
testcase, since otherwise there's no way to make sure a feature
actually works.

To cut down on bug triaging time extract the basic test (which was
previously used to skip all subtests) into a "basic" subtest.

Also fail the test hard if the msr interface isn't available. And
switch all other check in setup_enviroment to igt_require.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69838
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-04 19:59:03 +02:00
Daniel Vetter
3dc91f3242 tests/pc8+: Only skip i2c subtest if i2c /dev interface is unavailable
Through the magic of igt_skip we only need to fail this subtest, not
the entire thing.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-04 19:58:11 +02:00
Daniel Vetter
37e5b318c5 tests/kms_flip: use igt_assert more
I've left the time delta checks as-is since those are tricky math and
my mind is feeble.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-04 18:42:26 +02:00
Daniel Vetter
54b5f7251a tests/kms_flip: check flip count in both directions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-04 18:12:39 +02:00
Daniel Vetter
47d0a6fa69 NEWS: Mention gen7 perf counters release
This is too great to be omitted!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-04 11:10:48 +02:00
Chris Wilson
b53f22cee7 tests: Simulate missed breadcrumb irqs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-04 09:54:21 +01:00
Kenneth Graunke
11d5859b28 intel_perf_counters: Add support for Gen7 platforms.
We finally received permission to release this; the counters should be
properly documented in the Haswell PRMs.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2013-10-03 15:27:52 -07:00
Daniel Vetter
16b61932bb tests/kms_flip: use igt_assert in the dpms helpers
No need to route the error code around really.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-03 22:45:53 +02:00
Daniel Vetter
0b19cb5dc2 tests/kms_flip: Check the dpms confusion
Some kernels inadvertedly forwarded dpms changes to crtcs connected to
shared encoders even though that specific output wasn't enabled.
Hilarity ensued.

Note that we only have shared encoders on hsw (DP+HDMI) and with sdvo
cards (multi-function encoders).

v2: Do a full OFF->ON->OFF transition to make sure something actually
happens.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-03 22:31:11 +02:00
Daniel Vetter
a8bf10c9cf NEWS: testdisplay now with 3d support! 2013-10-01 22:20:38 +02:00
Daniel Vetter
1f0addb689 tests/kms_flip: scale test runtime
On machines with many outputs and many crtcs it takes too long.
So scale the runtime by the number of output combinations we're trying
to light up.

Compensate the test runtime a bit by doubling most subtests' duration.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-30 22:55:12 +02:00
Daniel Vetter
3f89d5403e tests/kms_flip: fail harder
At least for pipe A/B we should always fail the test if we can't light
up the preferred mode - the kernel should filter out impossible modes
and for our hw pipe A/B are the least constrained.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-30 22:55:12 +02:00
Damien Lespiau
6de613f8e5 testdisplay: Print the stereo mode being tested
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:22 +01:00
Damien Lespiau
e836b60d37 testdisplay: Make -o and -3 work together
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:22 +01:00
Damien Lespiau
8393bb41a1 testdisplay: Remove mode resetting now that we don't adjust the timings
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:22 +01:00
Damien Lespiau
c128b731dc testdisplay: Respect specified_disp_id in the stereo loop
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:22 +01:00
Damien Lespiau
28cf66de94 testdisplay: Remove printing out the eyes geometry
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:22 +01:00
Damien Lespiau
21a89a9f07 lib: Adjust dump_modes() to the new stereo encoding
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:22 +01:00
Damien Lespiau
a7d1937cd7 testdisplay: Use DRM_MODE_FLAG_3D_MASK
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:22 +01:00
Damien Lespiau
578c1cefc9 testdisplay: Remove the timing adjustements now that the kernel does it
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:22 +01:00
Damien Lespiau
d89f4a2c1a intel_infoframe: Display the VIC in decimal
It's not customary to display the VIC in hexadecimal and lead me to
scratch my head for a couple of seconds. Print it in decimal instead.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:22 +01:00
Damien Lespiau
9a8fda7a4a testdisplay: Test the stereo 3D modes
Now that modes have flags to describe which 3d formats the sink
supports, it's time to test them.

The new test cycles through the supported 3D formats and paint 3D
stereoscopic images taken from publicly available samples:
  http://www.quantumdata.com/apps/3D/sample_BMP.asp

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:22 +01:00
Damien Lespiau
951b37e2d0 testdisplay: Provide a full path when opening pngs
This way one doesn't have to be in tests/ for testsdisplay to be able to
open pass.png.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:22 +01:00
Damien Lespiau
5d99634913 testdisplay: Free the array of connectors
That's an array we allocated earlier in this function. Let's be symetric
and free it once done.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:22 +01:00
Damien Lespiau
66477a230f testdisplay: Untangle dump_info() from the main testing loop
-i is just supposed to show some information about the DRM resources.
Right now it works in a quite convoluted way. Untangle this to call
dump_info() when -i is given, exit the program and be done with it.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:22 +01:00
Damien Lespiau
b9db1a6a96 testdisplay: Fix CRTS typo
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:21 +01:00
Damien Lespiau
eecd0061eb testdisplay: Properly handle the life cycle of framebuffers
When cycling through the modes, let's make sure to free the previous
framebuffers. This is the perfect occasion to use kmstest_remove_fb().

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:21 +01:00
Damien Lespiau
5a1d84300b testdisplay: Map the fb inside paint_color_key()
So the code for this is self-contained. This goes along the way of
reducing the number of global variables in testdisplay.

Take the opportunity to unmap the fb after use as well.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:21 +01:00
Damien Lespiau
0396273972 testdisplay: Move the code sanitizing depth into main()
It'll be shared by the set_mode() and set_3d_mode() functions.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:21 +01:00
Damien Lespiau
79f4cfedbf lib: Add a helper to write a png from a struct kmstest_fb
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:21 +01:00
Damien Lespiau
dac45f5f06 lib: Split create_image_surface() out of create_cairo_ctx()
So we can use it in the next commit.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:21 +01:00
Damien Lespiau
bde7060e3c lib: Add a helper to paint a PNG using cairo
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:21 +01:00
Damien Lespiau
30e0710ca3 lib: Dump information about the supported 3D stereo formats
When dumping the details of a mode, let's add the 3D formats the mode
supports.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:21 +01:00
Damien Lespiau
9edaf7fa73 testdisplay: Add left/right images of a lovely scene
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 18:04:21 +01:00
Damien Lespiau
05493f736d testdisplay: Distribute pass.png 2013-09-30 18:04:20 +01:00
Daniel Vetter
76dfa9195a tests/gem_evict_everything: tune down forked subtests
On new machines with gobloads of memory and cpu cores, but slow swap
on spinning rust we need to limit the runtime a bit for sanity.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-30 16:04:38 +02:00
Daniel Vetter
f3c54d0cb4 tests: use igt_assert/igt_require more
With the new _f variants we can replace almost all of them.

Also remove a ton of checks for argc != 1, they're a bit useless ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-25 14:37:07 +02:00
Ben Widawsky
88ad6d7be8 intel_l3_parity: Make compilation possible without udev
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-09-23 13:46:06 -07:00
Paulo Zanoni
6020b951df tests/pc8: fix supports_pc8_plus_residencies
Bug caused by bad copy+paste+replace.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-09-23 16:17:41 -03:00