summaryrefslogtreecommitdiff
path: root/lib/igt_kms.h
AgeCommit message (Collapse)Author
2019-04-01tests/plane_lowres: Test each plane individuallyJosé Roberto de Souza
ICL has some many planes per pipe that it is causing this test to skip due bandwidth limitation when combined with 4K displays. The objective of this test is test the visibility of the planes when switching between high and low resolution, more information in the patch that added this test 12e34d8c909a ("tests/kms_plane_lowres: Plane visibility after atomic modesets"). So it was setting all the planes the tested pipe in the bottom left of the display using the height of high resolution, checking the visibility and then switching to the low resolution mode and checking again the visibility and now it is expected that all planes would be invisible. So to overcome ICL bandwidth issues, here it is testing each plane individually. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Mika Kahola <mika.kahola@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-01lib: Share the 1024x768 mode among testsJosé Roberto de Souza
Three test were duplicating this 1024x768 mode so lets move it to lib and share it. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-03-13lib/igt_kms: Add zpos plane property.Marius Vlad
Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
2019-03-11lib/debugfs: Fix wraparound handling for crc frame counter checkVille Syrjälä
Deal with frame counter wraparound correcrtly. v2: Make the comparison functions available for everyone (Chris) Add some docs (gtk-doc seems obtuse so not 100% warning free) Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1 Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-04lib/igt_kms: Fix commits for planes with multiple possible CRTCsNicholas Kazlauskas
An igt_plane_t is defined per igt_pipe_t. It is treated as its own independent resource but DRM planes can be exposed to being used on a number of possible CRTCs - making it a shared resource. In IGT planes with multiple possible CRTCs are added to the plane list for each pipe that the plane supports. The internal state remains independent in IGT so when the same plane is modified for multiple pipes in a single commit the last pipe to modify it is the one whose state gets fully applied. This situation happens fairly often in practice - resetting the display at the start of the test before a commit will reset the CRTC ID and FB ID for each plane. For an example, consider the igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max test. This test will fail for any overlay plane exposed for multiple CRTCs. The test tries to set a framebuffer for pipe A but has all the other pipes reset the plane state in the same commit. If there are multiple pipes on the hardware then the last pipe will be the one to set all the plane properties. The driver will receive a commit with no overlay plane enabled since the last pipe set CRTC ID and FB ID to 0, disabling the plane. The reference CRC capture will be incorrect since not all the planes have been enabled and the subsequent CRC captures will not match, failing the test. The simplest (but hacky) fix to this problem is to only set the properties for the plane for the pipe that last had it bound. This patch introduces a global plane list on igt_display_t that keeps track of the pipe that pipe that last called igt_plane_set_fb. The properties for the plane will only be applied from that single pipe when commiting the state to DRM. No behavioral changes should be introduced by this patch for hardware whose planes are only ever exposed one CRTC. It would likely be best to eventually modify the igt_pipe_t plane list to be a list of pointers to planes instead (igt_plane_t**) instead of being the actual plane objects, but that can come later. Many areas of the code like to make use of the backpointer to the pipe on the plane which makes refactoring the code in that manner a little trickier. v2: Add igt_plane_set_fb, use igt_plane_t for global plane list (Daniel) v3: Leave TODO for filling in all state/props on global planes Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
2019-02-26lib/igt_kms: Add helpers to count and iterate planes from outputPaul Kocialkowski
With helpers to count and iterate among planes of a given type from the pipe in place, we can use them with the current pipe for the output to make it possible for tests to use them (the pipe struct is not currently easily exposed to tests and exposing it adds unnecessary complexity). Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-02-26lib/igt_kms: Add helpers to count and iterate planes from pipePaul Kocialkowski
This introduces helpers that allow counting how many planes of a given type are present from a pipe and getting the n-th plane of a given type. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-02-22tests/kms_lease: exercise ueventDaniel Vetter
And make sure we get the LEASE=1 value, indicating a lessee change. v2: Apparently netlink reading can leak EAGAIN out through udev_monitor_receive_device. No idea what's going on there, so let's wrap some duct tape around it. v3: Lyude reported that we might get a few udev events on startup of the test. Drain those first. v4: Use the igt hotplug library functions, they already take care of all the uevent special cases. Cc: Lyude Paul <lyude@redhat.com> Cc: Keith Packard <keithp@keithp.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-01-28tests: Add variable refresh rate testsNicholas Kazlauskas
There are 3 tests for basic variable refresh rate functionality. The tests measure flipping at the average between the current mode refresh rate and the minimum supported variable refresh rate. It tests that VRR is enabled and that the difference between flip timestamps converges to the requested rate. It also tests this under both S3 and DPMS. Potential ideas for future tests: - Test behavior inside VRR range with a stepping test - Test behavior outside of VRR range - Multi-monitor (limited by no async pageflips in DRM atomic API) Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
2018-12-27lib/kms: Fix documentation for for_each_pipe_staticPetri Latvala
The documentation block was copypasted from for_each_pipe without changing the name. A drive-by typo fix to for_each_pipe's docs is included. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-11-27lib/kms: Drop igt_display_initDaniel Vetter
If you need the high-level functions, then you probably need a full display. Unexport the non-requiring version, and adjust the documentation. This also gives us proper docs for the recently added igt_display_require. Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-By: Antonio Argenziano <antonio.argenziano@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2018-10-25kms_content_protection: Add Content Protection testRamalingam C
Pretty simple test: - picks the hdcp capable output with suitable pipe and apply modeset. - checks the connected sink's hdcp capability through debugfs - apply a FB and wait for the flip completion. - clears the content protection property - verifies that it clears - sets the content protection property to desired - verifies that it transitions to enabled - incase of timeout three reattempts are implemented - clear the content protection property and modeset on the crtc Above steps are repeated on all HDCP capable connectors for both legacy and atomic subtests. v2: dynamic subtests are dropped [Daniel] v3: debugfs is used to detect the sink's hdcp capability [Daniel] data structure is made as global variable. v4: debugfs file from connector's debugfs dir is used [Daniel] v5: i915_debugfs_connector_dir() usage is modified [Chris] Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-10-17lib/igt_fb: Call dumb_destroy ioctl in case of dumb buffersDeepak Rawat
vmwgfx does not support GEM interface so calling gem_close on vmwgfx results in error. v2: Use drmIoctl with error when ioctl() failed. v3: Seperate ioctl wrapper. Signed-off-by: Deepak Rawat <drawat@vmware.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-10-03lib/kms: Handle no connectors for igt_enable_connectors()Chris Wilson
Take the device fd from the caller as to which card we should try and enable connectors for (or else we may not enable the right connectors for the test!) and fail gracefully if there is no kms support on the device. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2018-10-02tests: Add kms plane alpha blending test, v2.Maarten Lankhorst
Add a few tests to test various blending modes. Some of the tests will skip if pixel mode alpha cannot be enabled with plane alpha at the same time. This is for mali-dp. I didn't test on that platform, but tested with the same check on i915. The tests won't pass i915 on pre-gen11 hw. i915 has small rounding errors with 0xff and 0x00 alpha, which gives CRC mismatches. Changes since v1: - Send the correct version, with the skips for mali-dp in place. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-10-01lib: Report if kms is enabled on the displayChris Wilson
Some drivers may have disabled KMS or there may simply nothing attached to the device. In either case KMS is unusable and we may prefer to skip. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-09-11lib/igt_fb: Make fb size 64bitVille Syrjälä
Switch all fb size handling to 64bits to accomodate >4GiB framebuffers. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-08-30lib/igt_kms: Add try_prop_enum and set_prop_enum for mode objects, v2.Maarten Lankhorst
This adds the possibility to test arbitrary enumerations in IGT without having to define mappings for each and every one. Changes since v1: - Add commit description. - Add try_prop_enum, to allow handling unknown enumerations. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-06-08lib/kms: Respect fb color_encoding/color_rangeVille Syrjälä
Configure the plane color_encoding/color_range based on what the fb contents are. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2018-05-24tests: Move wait_for_pageflip as library functionMika Kahola
Two tests uses the very same wait_for_pageflip() routine. These tests are 'kms_rotation_crc' and 'kms_flip_tiling'. In order to decrease code repetition, let's move this function as part of kms function collection in igt_kms. No functional changes. Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-04-11lib/igt_kms: Handle outputs with no modes betterMaarten Lankhorst
Pretend that outputs without modes are disabled, and try reprobing if no modes are initially detected, just in case that the reprobe will find modes. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105798 Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2018-03-21lib/kms: Constify some string arraysVille Syrjälä
Make a bunch of string arrays const. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> #irc
2018-03-19lib/igt_kms: Add functions to get only a single output for a pipe, v2.Maarten Lankhorst
igt_get_single_output_for_pipe() will give a valid output for a pipe, for_each_pipe_with_single_output will iterate over all pipes, and will be called for each pipe with an output once. Changes since v1: - pipe = __outputs - __output returned a negative number for pipe, correctly set it to __output - __outputs. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-03-16lib: Parse plane IN_FORMATS blobifiers into a nicer formVille Syrjälä
Maintain straight up arrays of format+modifier tuples for each plane, and also collect up a similar device wide array. These will make it easy to confirm whether each plane (or the whole device) supports a specific format+modifier pair. v2: s/igt_hweight64/igt_hweight/ Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-03-15lib/igt_kms: Fix enum type in igt_pipe_has_prop.Maarten Lankhorst
Found when compiling igt with clang: [284/819] Compiling C object 'tests/kms_crtc_background_color@exe/kms_crtc_background_color.c.o'. ../tests/kms_crtc_background_color.c:140:48: warning: implicit conversion from enumeration type 'enum igt_atomic_crtc_properties' to different enumeration type 'enum igt_atomic_connector_properties' [-Wenum-conversion] Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-02-27igt: Make libudev mandatoryAntonio Argenziano
Since more essential components use libudev, make its dependency mandatory. Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Petri Latvala <petri.latvala@intel.com>
2018-02-27lib/igt_kms: Remove remaining docbook warnings mentioning igt_kms files.Maarten Lankhorst
Some warnings still exist, but they are about missing descriptions for structs enums and their members. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-02-27lib/igt_kms: Fix docbook warningsMaarten Lankhorst
This gets rid of the following warnings: lib/igt_kms.c:2688: warning: Symbol name not found at the start of the comment block. lib/igt_kms.c:2738: warning: Symbol name not found at the start of the comment block. lib/igt_kms.c:2788: warning: Symbol name not found at the start of the comment block. lib/igt_kms.c:2812: warning: Parameter description for igt_pipe_obj_replace_prop_blob::pipe is not used from source code comment block. lib/igt_kms.c:2812: warning: Parameter description for igt_pipe_obj_replace_prop_blob::pipe_obj is missing in source code comment block. lib/igt_kms.c:3794: warning: Parameter description for igt_cleanup_hotplug::mon is missing in source code comment block. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-01-15lib/igt_kms: Add more braces around macrosMaarten Lankhorst
The next patch wants to call for_each_pipe_with_valid_output with *pipe and *output, this fails miserably without these braces. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-01-02lib/igt_kms: Drop all stale events on first commit.Maarten Lankhorst
I've been trying to make kms_cursor_legacy work when subtests fail. Other subtests will start failing too because of expired events or stale pipe crc. The latter can be resolved in the test, but the former could affect other tests Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Change return status to int, so callers can see how many events are swallowed.] Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-12-12igt/kms_rotation_crc: Add horizontal flip subtest.Joseph Garvey
Test that horizontal flip works with supported rotations. Includes a fix for the unrotated fb which was not being positioned correctly with portrait and landscape rectangles. v2:(from Anusha) - Change 180 degree rotation to follow the rest, use igt_swap(), make flip variable a bool. Format the patch correctly (Ville, Petri Latvala) v3: (From Anusha) - Correct the name of subtests in order to avoid duplication of names (Arek) Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com> Signed-off-by: Joseph Garvey <joseph1.garvey@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-11-22lib/igt_kms: Handle changing rotation property correctlyMaarten Lankhorst
The rotation property sucks because it may affect whether drmModeSetPlane succeeds or not. Add some code to handle this. First try to set rotation directly, if that succeeds we return immediately. If it fails we disable the plane, set the rotation property and run the rest of the code. This will hopefully make legacy rotation work in more cases when scaling is not supported. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-11-21lib/igt_kms: Add igt_display_reset function, v3.Maarten Lankhorst
A lot of code duplicates this, but it should be handled in the core. Add it and use it after igt_display_init(), the tests have to be converted one by one. Changes since v1: - Merely reset rotation to HW value. Changes since v2: - Compile. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-10-23tests/kms_plane_lowres: Rework tests to work without fbcon, v3.Maarten Lankhorst
kmstest_get_crtc was skipping because at that point the crtc was not active yet, instead we should only use igt_assert_plane_visible directly. Unexport kmstest_get_crtc, since nothing here should need it. While at it fix a small leak in igt_assert_plane_visible, the only remaining user. Additionally, it' s not allowed to obtain crc on a disabled pipe, so wait until the pipe is enabled before allocating the crc. Changes since v1: - Move igt_pipe_crc_new until after pipe is enabled. - Move test_init() into test_setup(), it's redundant.. - Remove pipe_crc from data, no need to have it there. Changes since v2: - Increment fb pointer for igt_plane_set_fb, in order to set a different fb on each plane correctly. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20tests/kms_color: Rework tests slightly to work better with new atomic apiMaarten Lankhorst
igt_pipe_get_property is about to be removed, so use igt_pipe_obj_get_prop instead. This requires adding 2 more properties to the crtc property list. Also get rid of the Broadcast RGB call, this is already handled in igt_kms. Change order for DEGAMMA_LUT and GAMMA_LUT around, else this test will fail if legacy gamma is set. In the legacy path, this will update GAMMA_LUT to the new size before DEGAMMA_LUT is set. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Remove igt_crtc_set_background()Maarten Lankhorst
This can be handled by generic properties. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Remove igt_pipe_get_propertyMaarten Lankhorst
igt_pipe_get_property has been replaced by igt_pipe_obj_get_prop. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Add igt_$obj_get_prop functionsMaarten Lankhorst
Some tests need to get the current kernel value for properties as part of the test. Add get_prop functions that will retrieve the current kernel value. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Add igt_$obj_has_prop functions, v2.Maarten Lankhorst
This allows test to test whether a property is supported, in a nice and clean way. It removes the need for special case functions like igt_plane_supports_rotation. Convert the users of igt_plane_supports_rotation and remove the extra check in drm_plane_commit, this is already checked below when setting plane properties. Changes since v1: - Use the correct has_prop in kms_crtc_background_color.c Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Unexport broadcast rgb API.Maarten Lankhorst
Setting broadcast rgb was only used by chamelium, but is now handled in igt_display by default. This means that chamelium doesn't need to set it, and this can be hidden. The broadcast RGB property is intel connector specific, so rename the enum to intel_broadcast_rgb_mode. Keep the property and enum public in case someone wants to test the property later. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Export property blob functions for output/pipe/plane, v2.Maarten Lankhorst
With the replace_prop_blob functions we can safely replace the blob for any property, without having to care about error handling ourselves. This will for example allow overriding color management blobs, or for kms_atomic set invalid mode blobs. The color management blob functions are removed, they can now be replaced by direct calls to replace the properties. Changes since v1: - Fix chamelium tests. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Rework pipe properties to be more atomic, v7.Maarten Lankhorst
In the future I want to allow tests to commit more properties, but for this to work I have to fix all properties to work better with atomic commit. Instead of special casing each property make a bitmask for all property changed flags, and try to commit all properties. This has been the most involved one, since legacy pipe commit still handles a lot of the properties differently from the rest. Changes since v1: - Dump all changed properties on commit. - Fix bug in igt_pipe_refresh(). Changes since v2: - Set pipe ACTIVE property changed flag on init. Changes since v3: - Add a missing igt_pipe_refresh() to kms_atomic_interruptible. Changes since v4: - Perform error handling when setting custom crtc properties. Changes since v5: - Only attempt to commit changes properties. Changes since v6: - Clear OUT_FENCE_PTR on succesful commit. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Rework plane properties to be more atomic, v5.Maarten Lankhorst
In the future I want to allow tests to commit more properties, but for this to work I have to fix all properties to work better with atomic commit. Instead of special casing each property make a bitmask for all property changed flags, and try to commit all properties. Changes since v1: - Remove special dumping of src and crtc coordinates. - Dump all modified coordinates. Changes since v2: - Move igt_plane_set_prop_changed up slightly. Changes since v3: - Fix wrong ordering of set_position in kms_plane_lowres causing a test failure. Changes since v4: - Back out resetting crtc position in igt_plane_set_fb() and document it during init. Tests appear to rely on it being preserved. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Rework connector properties to be more atomic, v2.Maarten Lankhorst
In the future I want to allow tests to commit more properties, but for this to work I have to fix all properties to work better with atomic commit. Instead of special casing each property make a bitmask for all property changed flags, and try to commit all properties. Changs since v1: - Mention which properties we set to what. - Assert the property to be set is valid. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-03lib/igt_kms: Change output->pending_crtc_idx_mask to output->pending_pipeMaarten Lankhorst
igt_output_set_pipe with PIPE_ANY used to mean that we bind the output to any pipe, but this is now a deprecated alias for PIPE_NONE, and means the output will be unbound. Because of this it's better to change output->pending_crtc_idx_mask to an enum pipe, because only a single choice may be given for a pipe. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-02tests: Stop looking at plane private membersMaarten Lankhorst
Most of these tests have no reason to look at those members, so try other ways of getting the information. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-09-12tests: Add kms_atomic_interruptible test, v4.Maarten Lankhorst
This tests the various parts of atomic that I want to make interruptible. Running with --debug shows the stats from __igt_sigiter_continue, which can be used to make sure that we don't fall over. The default igt kms helpers use drmIoctl, which is not intercepted by igt_while_interruptible. Only igt_ioctl is. This means we have to call the ioctls manually here. Changes since v1: - Implement interruptible DPMS checking too. - Use igt_ioctl + igt_while_interruptible, instead of the signal helper shotgun. Changes since v2: - Bump whitespace to get rid of the weird double } at same indent. - Use more newlines in the call to the atomic ioctl. Changes since v3: - Fix copyright on year. (Adrinael) - Use do_ioctl instead of do_or_die(igt_ioctl) (ickle). - Add test description. (Adrinael) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1 Reviewed-by: Petri Latvala <petri.latvala@intel.com> [mlankhorst: Document sleep values (Adrinael)]
2017-08-14lib/igt_kms: Remove vblank wait after plane update.Maarten Lankhorst
With the conversion to atomic, this is already handled in the core. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-08-14lib/kms: Check usage of for_each_*Daniel Vetter
Except for for_each_pipe_static they cannot be used outside of fixtures/subtest. Assert this. This will make the broken version of kms_ccs assert when run, which also would have made $make check fail. Cc: Daniel Stone <daniels@collabora.com> Cc: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-08-14lib/kms: Add for_each_pipe_staticDaniel Vetter
for_each_pipe cannot be used for enumerating testcases, so provide something that can. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Petri Latvala <petri.latvala@intel.com>