Damien Lespiau [Tue, 8 Jul 2014 17:38:05 +0000 (18:38 +0100)]
kms_rotation_crc: Remove now unnecessary defines
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 17:36:32 +0000 (18:36 +0100)]
kms_rotation_crc: Use igt_plane_set_rotation()
More code we can remove from the test.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 17:28:53 +0000 (18:28 +0100)]
kms_rotation_crc: Don't store 'pipe' in the state
This variable is only needed for prepare_crtc(), need need to put it in
the test state.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 17:27:10 +0000 (18:27 +0100)]
kms_rotation_crc: Don't store rotate in the test state
We don't use it anywhere else than the test function.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 17:20:51 +0000 (18:20 +0100)]
kms_rotation_crc: Always disable the plane in cleanup
There's no need for this check, always use set_fb(NULL) on the plane.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 17:13:47 +0000 (18:13 +0100)]
kms_rotation_crc: Unify the two tests
The only difference is which plane we are talking about. So we really
need one function here with a paramater.
Well, almost. For the primary plane we need to ensure we support
unviversal planes.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 17:06:44 +0000 (18:06 +0100)]
kms_rotation_crc: Just store the igt_plane_t in data
Now that we're always using an igt_plane_t, we can get rid of ->type to
use ->directly without those switch() or if()/else
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 17:01:59 +0000 (18:01 +0100)]
kms_rotation_crc: Skip the tests if rotation is not supported
This happens when the kernel lacks the rotation patches.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 16:51:07 +0000 (17:51 +0100)]
kms_rotation_crc: Style issue: binary operators need spaces before and after
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 16:49:03 +0000 (17:49 +0100)]
kms_rotation_crc: Use drm_plane from igt_plane_t
So we don't need all that extra code to grab the drm_plane structure for
the primary_plane.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 12:59:42 +0000 (13:59 +0100)]
kms_rotation_crc: Remove useless comments
A typical example of what comments shouldn't be:
case DRM_PLANE_TYPE_PRIMARY: /* primary */
Well, yes!, it's written just there, PRIMARY!
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 11:59:03 +0000 (12:59 +0100)]
kms_rotation_crc: Factor out common primary/sprite code in prepare_crtc()
This results in less code, always a good thing. Also, we only really
need one reference CRC.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 11:49:03 +0000 (12:49 +0100)]
kms_rotation_crc: Factor out the square drawing function
Making function to the similar things is very common in programming.
Let's do it once again.
Cairo being a drawing library, it can be used to do the rotation!
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 11:28:41 +0000 (12:28 +0100)]
kms_rotation_crc: Fix style issue: single statement conditionals
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 11:26:38 +0000 (12:26 +0100)]
kms_rotation_crc: Fix style issue: '{' at the end of lines
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 11:18:47 +0000 (12:18 +0100)]
kms_rotation_crc: Require universal planes for the testing primary rotation
Otherwise the test will fail instead of just skipping.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 11:10:44 +0000 (12:10 +0100)]
kms_rotation_crc: Test the validity of the output first
So we don't need code to unwind what we just did.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 11:08:20 +0000 (12:08 +0100)]
kms_rotation_crc: Update the copyright to have this year as well
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 11:02:42 +0000 (12:02 +0100)]
kms_rotation_crc: Align a few wrapped lines to the opening brace
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 10:58:43 +0000 (11:58 +0100)]
kms_rotation_crc: Make more functions static
More of the same. This time no need to move code around, just adding
static.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 10:55:20 +0000 (11:55 +0100)]
kms_rotation_crc: Make check_plane_type() static
Clearly, someone tried to solve the following warning:
kms_rotation_crc.c:189:6: warning: no previous prototype for ‘check_plane_type’ [-Wmissing-prototypes]
Without really understanding what was the warning about. Make
check_plane_type() static and move it before its user to get rid of the forward
declaration.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Sonika Jindal [Wed, 18 Jun 2014 08:57:27 +0000 (14:27 +0530)]
tests/kms_rotation_crc: IGT for 180 degree HW rotation
Testcase for 180 degree HW rotation
Cc: sagar.a.kamble@intel.com
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 17:43:22 +0000 (18:43 +0100)]
igt_kms: Introduce a for_each_pipe() macro
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 15:02:05 +0000 (16:02 +0100)]
igt_kms: Add support for setting plane rotation
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 14:23:05 +0000 (15:23 +0100)]
igt_kms: Add a way to query of the plane supports rotation
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 13:56:54 +0000 (14:56 +0100)]
igt_kms: Provide a get_plane_property() shorthand
So one doesn't have to write the plane type all the time.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Tue, 8 Jul 2014 13:34:16 +0000 (14:34 +0100)]
igt_kms: Factor out a generic get_property() out of get_drm_plane_type()
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Daniel Vetter [Fri, 11 Jul 2014 08:24:30 +0000 (10:24 +0200)]
lib/igt_core: Don't log when listing subtests
I've noticed some spam in the userptr list ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Thomas Wood [Fri, 11 Jul 2014 09:47:43 +0000 (10:47 +0100)]
README: update the test run instructions
Describe using the new run-tests.sh script and also update the Piglit
instructions now that using a symlink is no longer supported.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Thomas Wood [Tue, 1 Jul 2014 10:35:16 +0000 (11:35 +0100)]
scripts: add a script to help run tests with Piglit
Add a script to facilitate running the tests with Piglit by providing
simplified options for listing, filtering and creating summaries of test
runs.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Thomas Wood [Wed, 9 Jul 2014 09:38:05 +0000 (10:38 +0100)]
lib: allow the edid to be reset
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Thomas Wood [Wed, 18 Jun 2014 13:28:43 +0000 (14:28 +0100)]
tests: enable extra connectors in kms_flip and kms_pipe_crc_basic
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Thomas Wood [Wed, 28 May 2014 13:06:01 +0000 (14:06 +0100)]
lib: add igt_enable_connectors and igt_reset_connectors
igt_enable_connectors forces connectors to be enabled where doing so is
known to work well. igt_reset_connectors resets the force state on all
connectors.
Thomas Wood [Tue, 27 May 2014 13:47:25 +0000 (14:47 +0100)]
lib: add the ability to set an EDID data block on a connector
Add a function to set an EDID data block on a connector and include a
set of generic EDID blocks for testing.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Thomas Wood [Fri, 16 May 2014 16:22:46 +0000 (17:22 +0100)]
lib: add function to change connector states
Add an API function and a test program to force a particular state on a
connector.
v2: mask the correct part of the minor number to get the card number (Chris
Wilson)
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Chris Wilson [Fri, 11 Jul 2014 09:38:32 +0000 (10:38 +0100)]
igt/gem_userptr_blits: Verify that userptr bo work on unshared memory
If the parent passes a userptr to some private memory, we expect to
still be able to use the userptr in the child.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Fri, 11 Jul 2014 09:16:54 +0000 (10:16 +0100)]
igt/gem_userptr_blits: Shared memory allocations
The forked tests allocate the bo (and thus for userptr, the memory) in
the parent and pass them to all children. The difference for userptr is
that we allocate system memory which the kernel then copies into each
child. As the children need to access the memory for their checks, it
does need to be shared - so allocate the userptr from shared memory!
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80208
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Fri, 11 Jul 2014 09:15:19 +0000 (10:15 +0100)]
Wait for any pid in order to reap failure quicker
When waiting for the forked tests, we can respond quicker to a failure
(such as oom) by waiting for any child to exit rather than waiting for
each child in order. Then when we see that a test failed, we can kill
all other children before aborting.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Daniel Vetter [Thu, 10 Jul 2014 18:19:18 +0000 (20:19 +0200)]
NEWS: Updates
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 10 Jul 2014 18:04:19 +0000 (20:04 +0200)]
tests: Run igt.cocci
New stuff caught.
Plus manually simplify the massive igt_fail_on_f(file == NULL, ...) to
a simple igt_assert(file). We already print the errno (if
applicapable) and the condition, which is equally informative.
Cc: Yi Sun <yi.sun@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Wendy Wang <wendy.wang@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 10 Jul 2014 17:46:46 +0000 (19:46 +0200)]
drv_module_reload: Unbind the right console driver
We want to unbind fbcon, but only fbcon and only if it's there.
This was broken by the recent patch in 3.16-rc to kick out the vgacon
driver. I've forgotten to push out the relevant fix from the machine
used to create the kick vgacon patches.
v2: Dropped duplicated /, spotted by Damien.
Reported-by: Damien Lespiau <damien.lespiau@intel.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Damien Lespiau [Thu, 10 Jul 2014 13:03:37 +0000 (14:03 +0100)]
drv_module_reload: Don't declare success when failing
We weren't returning straight away when failing to unload the driver, so
the test happilly executed gem_suspend and printed ""module successfully
loaded again".
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Wed, 9 Jul 2014 10:40:16 +0000 (11:40 +0100)]
core: Apply the same treatment to the in errno message in __igt_fail_assert()
Just like the it was done for the requirement message, display the errno
message only if errno is set, and display it at the end of the assert
message.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Wed, 9 Jul 2014 10:36:27 +0000 (11:36 +0100)]
core: Only display the errno message if errno is set
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Wed, 9 Jul 2014 10:32:22 +0000 (11:32 +0100)]
core: Put the requirement failure messages together
The errno message was a bit in the middle here, it makes more sense to
group the messages about why the test requirement wasn't met together.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Mika Kuoppala [Wed, 18 Jun 2014 11:34:04 +0000 (14:34 +0300)]
lib/gen6_render: removed duplicate defines
Textually the same so no harm was done and no warnings
from compiler either.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Daniel Vetter [Wed, 9 Jul 2014 18:45:54 +0000 (20:45 +0200)]
tests/gem_render_copy_redux needs legacy drm nodes
... since it uses flink. Fixes a regression due to:
commit
6d6dfcfb883818b40b58bac61cc72cab428a7a03
Author: David Herrmann <dh.herrmann@gmail.com>
AuthorDate: Sun Mar 16 14:38:40 2014 +0100
drm: enable render-nodes by default
Cc: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tim Gore [Tue, 8 Jul 2014 09:04:28 +0000 (10:04 +0100)]
intel-gpu-tools: Dont build kms_univeral_plane if no cairo
kms_univeral_plane is a new test that requires cairo.
I have added it to the list of tests not to build on
Android unless ANDROID_HAS_CAIRO is set.
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Damien Lespiau [Wed, 9 Jul 2014 10:05:06 +0000 (11:05 +0100)]
kms_plane: Specify the pipe when grabbing reference CRCs
When changing the pipe we were using, test_grab_crc() wasn't correctly
setting the pipe constraint before waiting for the CRC on the pipe, and
so we ended up waiting for a CRC on a pipe that wasn't lit up.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Mon, 7 Jul 2014 13:41:15 +0000 (14:41 +0100)]
kms_plane: Add a debug message when grabbing the CRC of a colored fb
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Yi Sun [Fri, 23 May 2014 00:28:47 +0000 (08:28 +0800)]
kms_plane: Add panning test for primary plane
Get CRCs of a full red and a full blue surface as reference.
Create a big framebuffer that is twice width and twice height as the
current display mode.
Fill the top left quarter with red, bottom right quarter with blue
Check the scanned out image with the CRTC at position (0, 0) of the
framebuffer and it should be the same CRC as the full red fb
Check the scanned out image with the CRTC at position (hdisplay,
vdisplay) and it should be the same CRC as the full blue fb
v2: Fix a few things here and there (Damien)
Cc: Lei Liu <lei.a.liu@intel.com>
Cc: Yi Sun <yi.sun@intel.com>
Signed-off-by: Lei Liu <lei.a.liu@intel.com>
Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Mon, 7 Jul 2014 12:30:41 +0000 (13:30 +0100)]
kms_plane: Make the gathering of reference CRCs test agnostic
We're going to add tests for panning. Both position and panning tests
share the need to grab reference CRCs of single coloured fb, so let's
separate this function from the position test.
Cc: Lei Liu <lei.a.liu@intel.com>
Cc: Yi Sun <yi.sun@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Mon, 7 Jul 2014 14:17:56 +0000 (15:17 +0100)]
pipe_crc: Make collect_crc() ensure the CRC looks somewhat valid
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Mon, 7 Jul 2014 14:16:51 +0000 (15:16 +0100)]
pipe_crc: Warn if the CRC values is 0xffffffff
This is what we read when the CRC logic in in a powered down well. We
really don't want that to happen.
In theory, it's possible 0xffffffff to be a valid CRC value, so I don't
assert here.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Mon, 7 Jul 2014 14:08:33 +0000 (15:08 +0100)]
lib: Reset 'position_changed' after a drmModeSetCrtc()
So the next commit won't trigger a drmModeSetCrtc() if the primary plane
doesn't have any update needing it.
This shouldn't be a problem at the moment as we don't allow the primary
plane to be of a different size than the CRTC viewport, but it will most
likely change in the future and we don't want to have that bug there.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Wed, 28 May 2014 17:59:09 +0000 (18:59 +0100)]
kms_pipe_crc_basic: Add a bit a debugging output
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Wed, 28 May 2014 16:55:06 +0000 (17:55 +0100)]
kms_pipe_crc_basic: Make the number of CRCs a parameter
Let's make the test a bit more generic and have the number of CRCs we're
collecting a define so it can be changed easily.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Wed, 28 May 2014 16:40:05 +0000 (17:40 +0100)]
kms_pipe_crc_basic: Cycle between 2 differently colored buffer
Instead of just testing if the CRCs are stable, we also test 2 different
fbs to make sure that the CRC is actually changing.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Wed, 28 May 2014 16:33:32 +0000 (17:33 +0100)]
kms_pipe_crc_basic: Split the main test function a bit more
Let's put the per-output test in its own function to get rid of 1 level
of indentation. We'll need it to cycle through 2 different framebuffers
to make sure we compute different CRCs if the fbs are different.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Matt Roper [Mon, 7 Jul 2014 16:08:29 +0000 (09:08 -0700)]
lib/kms: Provide universal plane #define's
There hasn't been a libdrm release containing the universal plane
definitions yet, so add them to igt_kms to allow compilation to succeed
in the meantime.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 7 Jul 2014 15:54:30 +0000 (17:54 +0200)]
tests/gem_exec_parse: use gem_uses_aliasing_ppgtt
Suggested by Brad Volking.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 17 Jun 2014 21:47:49 +0000 (23:47 +0200)]
tests/kms_psr_sink_crc: Fix delayed gtt/cpu write tests
- Drop the flip from the name - we don't do that. And the blt is
really just to have a bit of fun with the domain tracking.
- The real test is 1) dirty with gpu 2) grab 1st crc 3) set_domain for
cpu access 4) wait a long time 5) dirty more with cpu 6) grab 2nd
crc.
This fixes failures since with the old tests we wouldn't have noticed
the cpu rendering really.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Damien Lespiau [Thu, 3 Jul 2014 14:50:53 +0000 (15:50 +0100)]
kms_universal_plane: Don't assert outside of fixtures/subtests
Doing otherwise breaks listing the subtests. The test was throwing an
error out when universal planes were disabled as well because of that.
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Matt Roper [Mon, 30 Jun 2014 23:44:30 +0000 (16:44 -0700)]
tests/kms_cursor_crc: Call drmModeMoveCursor() directly
We're calling drmModeSetCursor() to change the cursor image and never
actually doing a display commit (aside from when we display the cursor),
so call the move ioctl directly rather than igt_plane_set_position() to
ensure the changes actually take effect.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Matt Roper [Mon, 30 Jun 2014 23:44:29 +0000 (16:44 -0700)]
tests/kms_cursor_crc: Combine data_t and test_data_t
If a subtest fails, cleanup_crtc() never gets called and then the
test_data_t structure for the test is lost, including the CRC file
descriptor that we never got a chance to release; this causes all
subsequent tests to fail with -EBUSY at igt_pipe_crc_new().
The split between permanent data_t and temporary test_data_t doesn't
seem to serve a purpose, so just combine the fields from both into
data_t. This will prevent us from losing the CRC filedescriptor so that
we can properly close and reopen it after a failed test.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Matt Roper [Mon, 30 Jun 2014 23:44:28 +0000 (16:44 -0700)]
tests/kms_universal_plane: Universal plane testing (v6)
Add a simple test to exercise universal plane support.
v6:
- Update to new universal plane interface (commit parameter rather than
state-changing function). It should now be a lot more explicit which
steps are being taken with legacy API's vs universal API's now.
v5:
- Check that we don't have more than one primary or cursor. This will
catch accidental calls to drm_plane_init() in the kernel where
drm_universal_plane_init() was intended (these don't cause a compile
warning due to type compatibility between enum and bool).
v4:
- Test disabling the primary plane explicitly when it has previously
been implicitly disabled due to clipping.
- Skip test if igt_pipe_crc_new() fails
v3:
- For testing while crtc is off, switch between several different
primary plane fb's before reenabling the crtc. This will help
catch pin/unpin mistakes.
v2:
- Test that pageflips error out gracefully when the primary plane
is disabled before the ioctl, or between ioctl and pageflip
execution.
- Test that nothing blows up if we try to disable the primary plane
immediately after a pageflip (presumably before the pageflip actually
completes).
- Test that we can setup primary + sprite planes with the CRTC off and
then have them show up properly when we enable the CRTC
(drmModeSetCrtc with fb = -1).
- Test that we can modeset properly after having disabled the primary
plane
- Test that proper error codes are returned for invalid plane
programming attempts.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Matt Roper [Mon, 30 Jun 2014 23:44:27 +0000 (16:44 -0700)]
lib/kms: Drop primary plane windowing test from igt_plane_set_position()
None of our hardware can support this today, but we'd like to be able to
write tests that check that the kernel returns the proper error code
when userspace tries it anyway.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Matt Roper [Mon, 30 Jun 2014 23:44:26 +0000 (16:44 -0700)]
lib/kms: Add universal plane support (v2)
Add support for universal planes. This involves revamping the existing
plane handling a bit to allow primary & cursor planes to come from the
DRM plane list, rather than always being manually added.
v2: Don't drop fixed ordering of internal plane list. Primary will
always be index 0, cursor will always be last in internal plane
list.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Matt Roper [Mon, 30 Jun 2014 23:44:25 +0000 (16:44 -0700)]
lib/kms: Add igt_display_try_commit2()
Add a new public API that will attempt a display commit, but will return
an error code upon failure rather than failing the IGT test. This is
intended to allow igt tests to verify that the expected error codes are
returned to userspace when invalid requests are issued.
Note that with non-atomic programming, a single commit operation has
several potential failure points internally; the first non-zero error
code encountered will be returned immediately and no further programming
will be performed by the commit. It is the caller's responsibility to
return to a sane state.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Matt Roper [Mon, 30 Jun 2014 23:44:24 +0000 (16:44 -0700)]
lib/kms: Add igt_display_commit2()
Add a new commit interface, igt_display_commit2(), that allows tests to
specify which programming API should be used to perform hardware
updates. COMMIT_LEGACY is the only option for now, but universal
and atomic interfaces will be added as additional options in the future.
igt_display_commit() remains unchanged for existing tests that wish to
place the hardware in a specific state, but that don't care which API is
used to achieve that state. The legacy API will be used by default for
now, but in the future we may decide to make the default API
configurable via an environment variable.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Matt Roper [Mon, 30 Jun 2014 23:44:23 +0000 (16:44 -0700)]
lib/kms: Track need for vblank wait locally
The need to wait for a vblank after programming is due to the way we
actually program the hardware. Move need_wait_for_vblank out of the
pipe and into a local variable in preparation for future programming
styles (e.g., atomic pageflip) that will need different logic.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Matt Roper [Mon, 30 Jun 2014 23:44:22 +0000 (16:44 -0700)]
lib/kms: Drop igt_pipe->need_set_{crtc, cursor}
The "need" flags on igt_pipe simply mirror the fb_changed field of the
primary/cursor planes. Drop them and just use fb_changed instead.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Jesse Barnes [Thu, 26 Jun 2014 15:47:08 +0000 (08:47 -0700)]
gem_exec_parse: require PPGTT as well
The command parser may be present, but not active, so check for PPGTT
before allowing this test to run.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Ville Syrjälä [Wed, 18 Jun 2014 18:14:11 +0000 (21:14 +0300)]
tests/gem_ctx_exec: Add reset-pin-leak subtest
Add a subtest to make sure the kernel doesn't leak the vma
pin_count for the last context on reset.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Chris Wilson [Sat, 21 Jun 2014 14:39:09 +0000 (15:39 +0100)]
gem_mmap_gtt: Test mmaping less than the full object
A bug was recently introduced into the kernel that happened when the vma
was smaller than the object. Test that.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Sat, 21 Jun 2014 14:38:31 +0000 (15:38 +0100)]
gem_fence_upload: Improve the contended messages
In the contended upload case, we did not distinguish between linear and
tiled uploads.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Tim Gore [Fri, 20 Jun 2014 10:28:12 +0000 (11:28 +0100)]
intel-gpu-tools: add igt_core init func calls to some tests
igt-core.h/c provides some macros and initialisation
functions to support the tests but some of the single
tests do not use these. Modifying these tests to use
the igt_simple_main macro and igt_simple_init function
is the first step towards a consistent command line
across all tests.
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Daniel Vetter [Thu, 19 Jun 2014 08:13:12 +0000 (10:13 +0200)]
tests/gem_exec_big: Re-add gem_sync
We need this to avoid hitting the slowpath and ending up with a
presumed_offset == -1. Regression reported by PRTS, bisected to
commit
eb36fc993d7ae1988c80ba5b767989059c91d0ec
Author: Chris Wilson <chris@chris-wilson.co.uk>
AuthorDate: Mon Jun 16 10:49:16 2014 +0100
Commit: Chris Wilson <chris@chris-wilson.co.uk>
CommitDate: Mon Jun 16 10:51:02 2014 +0100
igt/gem_exec_big: Update to new igt_assert_eq
Use igt_assert_eq for better test output on failures.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
v2: igt_warn_on unexpected reloc offsets.
Cc: shuang.he@intel.com
Acked-by: Chris Wilson <chris@chris-wilson.co.uk> (on irc)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 17 Jun 2014 21:06:59 +0000 (23:06 +0200)]
tests/gem_mmap: Add short mmap test
Blows up with the current full-object prefault code.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 17 Jun 2014 19:22:05 +0000 (21:22 +0200)]
Paritially revert "lib: add missing includes to headers"
This reinstates the #includes for lib/debug.h since without that the
shader debugger fails to build. You need to manually enable it with
./autogen.sh --enable-shader-debugger and the fail only happens when
running a clean build with
$ git clean -dfx && ./autogen.sh --enable-shader-debugger && make
I have no idea what breaks, but this restores the build.
Reported by Ben Widawsky.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 17 Jun 2014 16:52:08 +0000 (18:52 +0200)]
tests: Move gem_userptr_blits to the right Makefile target
We need to be able to check for this somehow ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 30 Apr 2014 16:15:36 +0000 (18:15 +0200)]
tests/Makefile.sources: Remove empty last line
Actually just whitespace change to make sure the new built rules for
tests/*.txt pick up the changes properly everywhere.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Wendy Wang [Mon, 9 Jun 2014 08:36:47 +0000 (16:36 +0800)]
Fixed the review issues for pm_rc6_residency IGT case
Why need add rc6_residency_counter subtest case:
RC6 feature support residency counter,from power consumption aspect,
the counter closer to 1,the better.If the counter is < 0.9, the residency
is not good and will impact power consumption value, if the counter is > 1,
sysfs file is inaccurate.
Attach the test result message:
root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rc6_residency
IGT-Version: 1.6-g9a70e29 (x86_64) (Linux: 3.15.0-rc7_drm-intel-nightly_0a37b5_20140604+ x86_64)
Subtest rc6-residency-check: SUCCESS
This machine doesn't support rc6pp
This machine doesn't support rc6p
The residency counter : 0.987000
This machine entry rc6 state.
Subtest rc6-residency-counter: SUCCESS
root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rc6_residency --run-subtest rc6-residency-counter
IGT-Version: 1.6-g9a70e29 (x86_64) (Linux: 3.15.0-rc7_drm-intel-nightly_0a37b5_20140604+ x86_64)
This machine doesn't support rc6pp
This machine doesn't support rc6p
The residency counter : 0.987000
This machine entry rc6 state.
Subtest rc6-residency-counter: SUCCESS
root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rc6_residency --run-subtest rc6-residency-check
IGT-Version: 1.6-g9a70e29 (x86_64) (Linux: 3.15.0-rc7_drm-intel-nightly_0a37b5_20140604+ x86_64)
Subtest rc6-residency-check: SUCCESS
root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rc6_residency --list
rc6-residency-check
rc6-residency-counter
Run as non-root
[haha@x-pk home]$ ./pm_rc6_residency
IGT-Version: 1.6-g18d2130 (x86_64) (Linux: 3.13.0-rc3_drm-intel-nightly_639e4d_20131210+ x86_64)
No intel gpu found
Subtest rc6-residency-check: SKIP
Subtest rc6-residency-counter: SKIP
Run on non-intel platform
[root@x-pk5 home]# ./pm_rc6_residency
IGT-Version: 1.6-g18d2130 (x86_64) (Linux: 3.13.0-rc3_drm-intel-nightly_639e4d_20131210+ x86_64)
Test requirement not met in function read_rc6_residency, file pm_rc6_residency.c:77:
Last errno: 2, No such file or directory
Test requirement: (!(file))
Subtest rc6-residency-check: SKIP
Subtest rc6-residency-counter: SKIP
Signed-off-by: Wendy Wang <wendy.wang@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 16 Jun 2014 21:54:43 +0000 (23:54 +0200)]
Revert "Revert "Add rc6_residency_counter subtest""
This reverts commit
35554a1bcaaea55c1cfa88c0176c58d2fb3b8013.
Apparently people are too unhappy with this.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Thomas Wood [Mon, 16 Jun 2014 15:21:35 +0000 (16:21 +0100)]
lib: add missing includes to headers
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Thomas Wood [Mon, 16 Jun 2014 15:12:21 +0000 (16:12 +0100)]
lib: ensure igt_display_init clears the memory for the display struct
Add the call to memset that was accidentally removed in:
commit
1e9e1baba389fe498be12390ceeeacb1d141a5cf
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Thu Mar 13 17:20:05 2014 +0100
lib/igt_kms: rip out custom verbose loggin support
Instead just piggy-pack on top of igt_log.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tim Gore [Mon, 16 Jun 2014 08:38:09 +0000 (09:38 +0100)]
intel-gpu-tools: remove the --cmd option from gem_seqno_wrap
gem_seqno_wrap was not being built on Android because it uses
wordexp which is not in Bionic.
After discussion with Mika Kuoppala (the test author) it seems
that wordexp was used to implement the --cmd option that was
really only intended for use during development of the test and
is no longer needed. So I have removed support for this option
and enabled this test for Android.
Signed-off-by: Tim Gore <tim.gore@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
[danvet: Resolve conflicts with cocci run.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Chris Wilson [Mon, 16 Jun 2014 09:49:16 +0000 (10:49 +0100)]
igt/gem_exec_big: Update to new igt_assert_eq
Use igt_assert_eq for better test output on failures.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Mon, 16 Jun 2014 08:01:52 +0000 (09:01 +0100)]
igt/gem_exec_parse: Convert to igt_assert_eq
For better test output on failure.
References: https://bugs.freedesktop.org/show_bug.cgi?id=80083
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Ville Syrjälä [Tue, 29 Oct 2013 16:17:39 +0000 (18:17 +0200)]
tools/intel_display_poller: Add a new tool that will poll various display registers
intel_poller can be used to poll various display registers
(IIR,scanline/pixel/flip/frame counter, live address, etc.).
It can be used to determine eg. at which scanline or pixel count certain
events occur.
v2: s/intel_poller/intel_display_poller/
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Ville Syrjälä [Tue, 10 Jun 2014 18:28:10 +0000 (21:28 +0300)]
tools: Add intel_iosf_sb_{read,write} tools
Add generic tools to poke at IOSF sideband. The user needs to
manually specify SB port as well as the register.
TODO: Maybe add symbolic names for the units? Would avoid having
to trawl the docs for the magic hex value.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Ville Syrjälä [Wed, 11 Jun 2014 16:21:27 +0000 (19:21 +0300)]
lib/igt_debufs: Add IGT_NO_FORCEWAKE environment variable
If IGT_NO_FORCEWAKE is set, skip the forcewake open. Useful when you
want to poke at register without otherwise disturbing the GPU.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Ville Syrjälä [Wed, 11 Jun 2014 16:20:19 +0000 (19:20 +0300)]
lib/igt_debugfs: Don't fail if debugfs is already mounted
Remove the igt_assert() from the debugfs mount. It will fail if debugfs
is already mounted. With the assert in place it's very annying to use
igt without i915 loaded (eg. to dump BIOS configured registers).
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Daniel Vetter [Fri, 13 Jun 2014 16:27:59 +0000 (18:27 +0200)]
tests: run igt.cocci
Re-run with correct igt_fail rules. Again manually fixup missing
includes for igt_core.h.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 13 Jun 2014 14:23:10 +0000 (16:23 +0200)]
NEWS: Mention igt.cocci
And also pimp the spatch file itself with usage hints.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 13 Jun 2014 16:01:33 +0000 (18:01 +0200)]
lib: Introduce igt_fail_on/_f
I've yet again totally screwed things up (this time automated with
cocci even, but not yet pushed luckily). So finally add a new version
for easier conversion and adjust the cocci script.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 13 Jun 2014 13:45:30 +0000 (15:45 +0200)]
lib/igt.cocci: Also add rule to use igt_warn_on_f
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 13 Jun 2014 13:45:12 +0000 (15:45 +0200)]
lib/igt.cocci: Convert abort() to igt_fail
abort should only be used for internal library checks - using
abort() we get a "crash" result, using igt_fail we get "fail"
in piglit.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 13 Jun 2014 13:41:28 +0000 (15:41 +0200)]
lib/igt.cocci: Conversion to igt logging
Also update old hunks to match on igt logging instead of fprintf.
v2: Don't forget about perror.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 13 Jun 2014 13:32:50 +0000 (15:32 +0200)]
tests: Don't use stderr for informational messages
These should go to stdout instead. The next patch will clean this up
with cocci, so no change from fprintf(stdout, to printf( here.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>