summaryrefslogtreecommitdiff
path: root/tests/kms_atomic_transition.c
AgeCommit message (Collapse)Author
2017-07-10igt/kms: Do not wait for fence completion during commitMaarten Lankhorst
This will make the IGT tests that use fences more useful, since they can perform the waiting themselves when required. To celebrate, also add plane-use-after-nonblocking-unbind-fencing, the fence version of plane-use-after-nonblocking-unbind. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Gustavo Padovan <gustavo.padovan@collabora.com>
2017-07-10tests/kms_atomic_transition: Do not clear in-fences after atomic commit.Maarten Lankhorst
This is already done in igt_display_commit* functions. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Gustavo Padovan <gustavo.padovan@collabora.com>
2017-07-10tests/kms_atomic_transition: Only request fence on enabled pipesMaarten Lankhorst
Trying to set a fence on disabled pipes will be rejected by the kernel: [ 1275.865029] [drm:drm_atomic_check_only [drm]] [CRTC:39:pipe B] requesting event but off Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99911 Acked-by: Gustavo Padovan <gustavo.padovan@collabora.com>
2017-07-10tests/kms_atomic_transition: Add test for plane completion ordering.Maarten Lankhorst
When a plane gets disabled, that commit has to complete before an atomic commit on that disabled plane only. Else for the old commit, new_plane_state may have been freed. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Gustavo Padovan <gustavo.padovan@collabora.com>
2017-07-04tests/kms_atomic_transitions: Use igt_display_require_output().Maarten Lankhorst
Use the convenience function instead of handrolling it. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-06-16tests: Rename I915_MAX_PIPES to IGT_MAX_PIPESLeo (Sunpeng) Li
Name should not be driver-specific. Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-04-07tests/kms_*: Use correct DRM context versionDaniel Stone
DRM_EVENT_CONTEXT_VERSION is the latest context version supported by whatever version of libdrm is present. igt was blindly asserting it supported whatever version that may be, even if it actually didn't. With libdrm 2.4.78, setting a higher context version than 2 will attempt to call the page_flip_handler2 vfunc if it was non-NULL, which being a random chunk of stack memory, it might well have been. Set the version as 2, which should be bumped only with the appropriate version checks. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-03-21Restore "lib: Open debugfs files for the given DRM device"Chris Wilson
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring commit 301ad44cdf1b868b1ab89096721da91fa8541fdc Author: Tomeu Vizoso <tomeu.vizoso@collabora.com> Date: Thu Mar 2 10:37:11 2017 +0100 lib: Open debugfs files for the given DRM device with fixes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-21Revert "lib: Open debugfs files for the given DRM device"Tomeu Vizoso
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc. When a render-only device is opened and gem_quiescent_gpu is called, we need to use the debugfs dir for the master device instead. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2017-03-21lib: Open debugfs files for the given DRM deviceTomeu Vizoso
When opening a DRM debugfs file, locate the right path based on the given DRM device FD. This is needed so, in setups with more than one DRM device, any operations on debugfs files affect the expected DRM device. v2: - rebased and fixed new API additions v3: - updated chamelium test, which was missed previously - use the minor of the device for the debugfs path, not the major - have a proper exit handler for calling igt_hpd_storm_reset with the right device fd. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-27tests/kms_atomic_transition: Add missing variable declarationDorota Czaplejewicz
Signed-off-by: Dorota Czaplejewicz <dorota.czaplejewicz@collabora.co.uk> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-27kms_atomic_transition: Add test for primary plane togging vs vblank.Maarten Lankhorst
When enabling atomic rmfb a bug was found where vblank waits were timing out. Add a testcase that tests if vblanks work regardless of primary plane visibility. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-20kms_atomic_transition: Initialize pipe_crcs to avoid segfaultBrian Starkey
igt_pipe_crc_new() is skipped for non-Intel devices, but the later calls to collect_crcs_mask() will attempt to retrieve CRC values if the pipe_crcs pointers are non-NULL. Zero-initialise pipe_crcs to avoid accessing garbage pointers on non-Intel devices. Signed-off-by: Brian Starkey <brian.starkey@arm.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-02-07kms_atomic_transition: Only call unprepare_fencing when prepare_fencing is ↵Maarten Lankhorst
called. Else we get a null pointer deref on the other tests. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-03kms_atomic_transition: Do not use vblank->reserved.Maarten Lankhorst
I used it for prototyping a patch locally, was never meant to be upstreamed without upstream support. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-02tests/kms_atomic_transition: add in_fences testsGustavo Padovan
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Brian Starkey <brian.starkey@arm.com>
2017-02-02tests/kms_atomic_transition: add out_fences testsRobert Foss
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Brian Starkey <brian.starkey@arm.com>
2017-02-02tests/kms_atomic_transition: add fencing parameter to run_transition_testsGustavo Padovan
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Brian Starkey <brian.starkey@arm.com>
2017-02-02tests/kms_atomic_transition: use igt timeout instead of blockingGustavo Padovan
If the event never arrives we can timeout and end the test. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Brian Starkey <brian.starkey@arm.com>
2017-01-31tests/kms_atomic_transition: Add support for dynamic number of planesRobert Foss
Add changes reflecting the new support for dynamic number of planes per pipe. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2016-11-29kms_atomic_transition: Only run tests on valid pipes.Maarten Lankhorst
Fixes hangs on systems with less pipes, oops! Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-11-29kms_atomic_transition: Fix compileMaarten Lankhorst
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-11-29kms_atomic_transition: Add test timeout to run_modeset_testsMaarten Lankhorst
This fixes the hang on kms_atomic_transitions.1x-modeset-transitions. Underlying cause still needs more looking at.. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-11-23kms_atomic_transition: Respect limits for sprite planes on earlier platforms.Maarten Lankhorst
Usually there is a maximum amount of width/height that a sprite plane can have, and on earlier platforms alpha sprite planes are usually unsupported. In case of SKL+ and VLV/CHV this is handled by only setting a maximum width, but on earlier platforms there's a hardware limitation for stride, width and height. Handle this by starting from cursor dimensions, and then increase width to max, followed by height to max. If the TEST_ONLY commit fails immediately with -EINVAL with cursor width/height in ARGB format, assume that ARGB is unsupported and fallback to XRGB. If that fails too fail the test. This should allow tests to pass on all earlier platforms too. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-08-22kms_atomic_transition: Add modeset tests for all plane combinations.Maarten Lankhorst
With the new patch series by Lyude for fixing SKL watermarks it was shown that watermarks for disabled planes may not be updated correctly on modeset. Ensure that this is tested by doing a test similar to plane-all-transition, but with modesets! Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-08-11kms_atomic_transition: Add nonblocking tests for plane transitionsMaarten Lankhorst
There is a potential race between place transitions and nonblocking modesets, so try nonblocking tests for those too. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-08-11kms_atomic_transition: Add modeset tests too.Maarten Lankhorst
Try a series of tests in which we try to enable any combination of crtc enabled. {1,2,3}x-modeset-transitions will run any combination of enabled crtc's to and from the number being tested. Any lower amount is skipped. Extra -nonblocking tests are added, which perform the same modeset tests with nonblocking commit. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-07-26kms_atomic_transition: run correctly when hitting hw limitsMaarten Lankhorst
On CHV with a 4K hdmi display it's possible to hit the wm upper limit, 1 rgb primary plane + 2 full size rgb secondary planes will hit a HW limit. To fix this try halving the horizontal width until we're below HW limits. This requires a kernel patch to make sure that the kernel considers actual width in wm calculations, but without it we get FIFO underruns anyway. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-07-26tests: Add kms_atomic_transitionMaarten Lankhorst
This is meant as a stress test, to ensure that all combinations of atomic transitions work correctly. This could be useful for other drivers too, so I kept it generic. For i915 this will mainly be a stress test on watermark calculations. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>