summaryrefslogtreecommitdiff
path: root/lib/igt_kms.c
AgeCommit message (Collapse)Author
2018-02-15lib/igt_kms: Fix igt_display_drop_events() to work as intendedMaarten Lankhorst
Short reads don't work, you either read the whole event or nothing at all, so follow the recommendations in the documentation and allocate a buffer of 4096 bytes for the event, if we capture multiple events read them all. Cc: Jari Tahvanainen <jari.tahvanainen@intel.com> Reported-by: Jari Tahvanainen <jari.tahvanainen@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104538 [mlankhorst: Assign ev once in the loop, instead of 2 places. (ickle)] Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-14lib/kms: Clear unused fields for getproperty ioctlChris Wilson
==24749== Syscall param ioctl(generic) points to uninitialised byte(s) ==24749== at 0x6A8ADC7: ioctl (syscall-template.S:84) ==24749== by 0x5067687: drmIoctl (in /opt/xorg/lib64/libdrm.so.2.4.0) ==24749== by 0x138531: kmstest_set_connector_dpms (igt_kms.c:1022) ==24749== by 0x112937: set_dpms (kms_flip.c:263) ==24749== by 0x112937: run_test_step (kms_flip.c:776) ==24749== by 0x112937: event_loop (kms_flip.c:1138) ==24749== by 0x115468: run_test_on_crtc_set (kms_flip.c:1378) ==24749== by 0x115468: run_test (kms_flip.c:1450) ==24749== by 0x1111CF: main (kms_flip.c:1673) ==24749== Address 0x1ffefff2a0 is on thread 1's stack ==24749== in frame #2, created by kmstest_set_connector_dpms (igt_kms.c:1012) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-01-11include inttypes.h for PRI definesMike Frysinger
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96620 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-01-10lib/igt_kms.c: Unconditionally include poll.hPetri Latvala
Commit 98c64b33a793 ("lib/igt_kms: Drop all stale events on first commit.") added a use of poll() to igt_kms.c, but that file only includes poll.h when HAVE_UDEV is defined. Move the include outside the UDEV conditional. Fixes: 98c64b33a793 ("lib/igt_kms: Drop all stale events on first commit.") Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Rhys Kidd <rhyskidd@gmail.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-12-04lib/igt_kms: Fix off-by-one bug on skip of missing pipeGabriel Krisman Bertazi
display->n_pipes is zero-indexed, so N returned in igt_display_get_n_pipes is already not a valid pipe. This patch prevents kms_ccs from going nuts when testing the first unexisting pipe. Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2017-11-29igt: Remove Android supportArkadiusz Hiler
This patch gets rid of the Android support, deleting all the hacks and moving code around to the places it belongs. Android build is not really maintained properly and rots rather fast. With recent push for Meson here and Android going for Soong it will only accelerate. It's a good time to drop the illusion of providing any support. Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Kalyan Kondapally <kalyan.kondapally@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Acked-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: Make igt_output_from_connector probe all outputsMaarten Lankhorst
igt_output_from_connector should be used for disconnected outputs too, this is useful for chamelium testing, where disconnected outputs may reappear. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
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-24lib/igt_kms: Only print changed mode objects during atomic commit.Maarten Lankhorst
When we only print mode objects that have changed properties, we reduce a lot of the spam. Fortunately we have a single bitfield now that gets printed when something is changed. Use that to decrease the amount of spam. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.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: Allow setting any output property through the !atomic pathsMaarten Lankhorst
Everything except CRTC_ID can be set in the legacy paths, we even have 2, the legacy and universal path. Excercise both. :D Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20lib/igt_kms: Allow setting any plane property through the universal pathMaarten Lankhorst
Blacklist some explicit atomic properties. We could theoretically set them but that's not what the legacy path is for. :) When adding new properties, this means we could test those through the legacy 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 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-09lib/igt_kms: Don't assert on non-existent planeVille Syrjälä
Skip when a test can't find a plane by the index. Previously in commit 5426dc0a889a ("lib/kms: Skip rather than fail when a suitable plane can't be found") we added similar handling for tests trying to find a non-existent plane by type. Saves from every test with hardcoded plane numbers having to check the number of planes available. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-04lib/igt_kms: Disable crtc in legacy path when output is unsetMaarten Lankhorst
When the output is unset, but the fb is still valid we still have to perform a disable on the crtc. This ixes the following crash in kms_color (although previous commit does as well): (gdb) bt 0 igt_output_get_mode (output=output@entry=0x0) at igt_kms.c:2828 1 0x000055555556f0d5 in igt_primary_plane_commit_legacy(..) at igt_kms.c:2341 2 igt_plane_commit (fail_on_error=true, s=COMMIT_LEGACY, ..) at igt_kms.c:2394 3 igt_pipe_commit (fail_on_error=true, s=COMMIT_LEGACY, ..) at igt_kms.c:2435 4 do_display_commit (display=0x7fffffffe5d8, s=COMMIT_LEGACY, ..) at igt_kms.c:2667 5 0x000055555556f38e in igt_display_commit2 (display=<optimized out>, s=<optimized out>) at igt_kms.c:2777 6 0x000055555555ef84 in run_tests_for_pipe (data=.., p=PIPE_B) at kms_color.c:1053 7 0x000055555555f610 in __real_main1189 () at kms_color.c:1206 8 0x000055555555cbc7 in main (argc=<optimized out>, argv=<optimized out>) at kms_color.c:1189 Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-03lib/igt_kms: Commit primary plane when a modeset is forced on a pipeMaarten Lankhorst
In between tests, some tests can do the following sequence: (pipe C configured with FB) igt_plane_set_fb(primary (pipe C), NULL); /* Clear rotation property first */ igt_display_commit2(display, COMMIT_UNIVERSAL); /* disable pipe */ igt_display_commit2(display, COMMIT_LEGACY); This would result in PIPE_C not being properly disabled, which will cause an error on the next mode. This can be seen when running the full kms_rotation_crc testcase without --subtest, it will fail on exhaust-fences because the bad-tiling subtest wasn't able to disable pipe C correctly. Testcase: kms_rotation_crc 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-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-09-08lib/kms: Skip rather than fail when a suitable plane can't be foundVille Syrjälä
If the system doesn't have the plane the test wants, let's skip the test rather than fail it. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
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-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-10lib/kms: Handle fence interaction correctly WRT TEST_ONLY.Maarten Lankhorst
All other atomic properties are reset in display_commit_changed, which is the right place because TEST_ONLY commits don't need to be reset. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Gustavo Padovan <gustavo.padovan@collabora.com>
2017-06-20lib/igt_kms: Fix override_mode handlingBrian Starkey
Changelog: - v2: removed the forced overwrite of output->config.default_mode - v1: original submission by Brian igt_display_commit isn't refreshing all outputs anymore, which means that an override mode may never get picked up. Instead of forcing a reprobe to handle copying the override_mode into default_mode, just change igt_output_get_mode() to return the override_mode if it's been set, and remove the old code which would directly overwrite default_mode. This should be more robust, as igt_output_get_mode() will always return the correct mode, without needing the output to be reprobed. This change means that output->config.default_mode always contains the "non-overridden" default mode. Signed-off-by: Brian Starkey <brian.starkey@arm.com> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@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-06-16tests: Increase value of I915_MAX_PIPES to 6Leo (Sunpeng) Li
Increasing max pipe count to 6 to support AMD GPU's. Since some tests' behavior depends on this value, small changes are made to remove this dependency: * kms_ccs: Early abort if wanted_pipe is out-of-bounds. * kms_concurrent: Check if pipe is within bounds first. * kms_pipe_color: Prevent skipping of subsequent tests by placing generated tests in a 'igt_subtest_group'. * kms_plane: Move pipe and plane index checking to subtest group level. v2: Change invalid pipe check on kmstest_pipe_name() to use I915_MAX_PIPE v3: Change tabs to spaces in 'enum pipe' Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Tested-by: Tomi Sarvela <tomi.p.sarvela@intel.com>
2017-06-14lib/igt_kms: Fix indent when try_commit fails.Maarten Lankhorst
First unindent before calling check_return, else when an expected failure happens, the unindent never happens. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-06-14lib/igt_kms: Add igt_display_require_output(/on_pipe)Maarten Lankhorst
Most KMS users open code this. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-06-09lib/igt_kms: Fix erroneous assertBrian Starkey
In trying to fix igt_display_init() for devices without cursors, I actually made matters worse. Fix the assert. Fixes: 545aa3398223 lib/igt_kms: Remove redundant cursor code Signed-off-by: Brian Starkey <brian.starkey@arm.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-05-10Revert "Revert "lib/igt_kms: Force outputs to use full range RGB""Petri Latvala
Somehow an incorrect commit was reverted. This reverts commit cda2b91da9c5209d9b3eaac2d2c6f4778a58d4a0. Signed-off-by: Petri Latvala <petri.latvala@intel.com>
2017-05-10Revert "lib/igt_kms: Force outputs to use full range RGB"Chris Wilson
This reverts commit 15ffbf378c3d9b3a75ac6b6ec6d96f917e9a7637. Some how you need to put headers in the sources, but I've forgotten how to do in the mess of automake/Android.
2017-05-10lib/igt_kms: Force outputs to use full range RGBAnder Conselvan de Oliveira
In at least SKL and GLK (possibly other devices too), using a cursor plane to scan out an fb might result in a different pipe crc than when using a regular plane at the same position with the same fb while using the CSC logic to limit the color range. The differences could be caused by the cursor plane being limited to 8 bpc while the regular planes support higher bit depths, leading to slightly different values to be used internally. This is evidenced by the failures happening with specific color values, 0.5 for example, but that's mostly speculation. To avoid misterious failures caused by limited range rgb, force all tests to use full range. It is still possible for tests to override this if necessary. v2: Add more details to the commit message. v3: Force all tests to use full range. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-04-20lib/igt_kms: Add support for 4K and audio HDMI EDID injection.Abdiel Janulgue
Based on the initial work by Marius Vlad. v3: Bring back audio injection v4: Make a helper for 3d/4k/audio HDMI injection (Petri) Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2017-03-24lib/debugfs: Phase out igt_debugfs_fopen()Chris Wilson
Wrapping fdopen() proved dangerous, the underlying fd is not refcounted, and we must close it in the library or else we easily leak and exhaust all fd. Since we can't provide igt_debugfs_fopen(), move the burden onto the caller for those that require a stream FILE*. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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-03-20lib/igt_kms: Do not refresh all outputs in igt_display_commitMaarten Lankhorst
Now that igt_output_set_pipe handles refreshing igt_output, we only have to be sure that there are no conflicting outputs in igt_display_commit. Reported-and-tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-03-13igt/kms_pipe_crc_basic: Tighten timings for CRC readbackChris Wilson
The number of vblanks that pass whilst we read back the CRCs is depended upon CPU scheduling -- we may take longer than expected and end up reading more CRCs. Align the start of the loop to a vblank. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100132 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>