summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-07-11igt/gem_tiled_swapping: Speed up slightlyChris Wilson
The exercise is moving tiled objects in and out of swap. They are moved en-block and we test them all, therefore we can randomly test different bytes from each buffer to have reasonable coverage of all tiles. This shifts the bulk of the work from checking the tiled bo to kswapd. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-11lib/igt.cocci: Add stanza for for_each_pipeDaniel Vetter
Damien dodged this ... Also run the script while at it. v2: Don't just capture identifiers for pipe, but also expressions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-11lib: Extract gem_get_tiling() from a couple of tests.Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Use the igt_kms enum to encode the plane rotationDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Remove unnecessary includesDamien Lespiau
Turns out we didn't need most of them. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Always use the primary plane to compute the reference CRCDamien Lespiau
Trying to disable the primary planes isn't exactly working at the moment. W/A it until it works. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Document the two steps in prepare_crtc()Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Don't compile the test on Android with no cairo supportDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Add the test to .gitignoreDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Properly paint the whole frame bufferDamien Lespiau
The -1 meant we weren't properly filling the whole fb. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Don't commit with no fb set upDamien Lespiau
prepare_crtc() was trying to commit a display state without any fb to scan out... Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Allow the sprite test to run even without universal planesDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: No need to test for NULL before freeing the pipe CRC objectDamien Lespiau
igt_pipe_crc_free() does that check already. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Remove plane from the stateDamien Lespiau
having everythin in the data_t structure makes it hard to understand what should be set when. Replace that by explicit function parameters. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Remove the sleep(2)Damien Lespiau
One can inspect the output of the igt_kms API by setting IGT_DISPLAY_WAIT_AT_COMMIT=1. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Remove 'output' from the stateDamien Lespiau
This restore the balance between prepare_crtc() and cleanup_crtc(), both now taking the output as a parameter. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Remove the test on output->validDamien Lespiau
This test is already done by the for_each_connected_output() macro. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Use for_each_pipe()Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Remove now unnecessary definesDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Use igt_plane_set_rotation()Damien Lespiau
More code we can remove from the test. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Don't store 'pipe' in the stateDamien Lespiau
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>
2014-07-11kms_rotation_crc: Don't store rotate in the test stateDamien Lespiau
We don't use it anywhere else than the test function. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Always disable the plane in cleanupDamien Lespiau
There's no need for this check, always use set_fb(NULL) on the plane. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Unify the two testsDamien Lespiau
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>
2014-07-11kms_rotation_crc: Just store the igt_plane_t in dataDamien Lespiau
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>
2014-07-11kms_rotation_crc: Skip the tests if rotation is not supportedDamien Lespiau
This happens when the kernel lacks the rotation patches. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Style issue: binary operators need spaces before and afterDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Use drm_plane from igt_plane_tDamien Lespiau
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>
2014-07-11kms_rotation_crc: Remove useless commentsDamien Lespiau
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>
2014-07-11kms_rotation_crc: Factor out common primary/sprite code in prepare_crtc()Damien Lespiau
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>
2014-07-11kms_rotation_crc: Factor out the square drawing functionDamien Lespiau
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>
2014-07-11kms_rotation_crc: Fix style issue: single statement conditionalsDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Fix style issue: '{' at the end of linesDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Require universal planes for the testing primary rotationDamien Lespiau
Otherwise the test will fail instead of just skipping. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Test the validity of the output firstDamien Lespiau
So we don't need code to unwind what we just did. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Update the copyright to have this year as wellDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Align a few wrapped lines to the opening braceDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Make more functions staticDamien Lespiau
More of the same. This time no need to move code around, just adding static. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Make check_plane_type() staticDamien Lespiau
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>
2014-07-11tests/kms_rotation_crc: IGT for 180 degree HW rotationSonika Jindal
Testcase for 180 degree HW rotation Cc: sagar.a.kamble@intel.com Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
2014-07-11lib: allow the edid to be resetThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-11tests: enable extra connectors in kms_flip and kms_pipe_crc_basicThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-11lib: add the ability to set an EDID data block on a connectorThomas Wood
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>
2014-07-11lib: add function to change connector statesThomas Wood
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>
2014-07-11igt/gem_userptr_blits: Verify that userptr bo work on unshared memoryChris Wilson
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>
2014-07-11igt/gem_userptr_blits: Shared memory allocationsChris Wilson
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>
2014-07-10tests: Run igt.cocciDaniel Vetter
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>
2014-07-10drv_module_reload: Unbind the right console driverDaniel Vetter
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>
2014-07-10drv_module_reload: Don't declare success when failingDamien Lespiau
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>
2014-07-09tests/gem_render_copy_redux needs legacy drm nodesDaniel Vetter
... 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>