summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-11-06lib/drmtest: Allow the test device to be overriddenHEADmasterThierry Reding1-35/+56
On setups where the device to be tested is not the first one, allow users to override it using the IGT_DEVICE environment variable. Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-11-06lib/drmtest: Support TegraThierry Reding2-0/+11
Add a driver definition for Tegra and wire up all the necessary pieces to identify its devices. Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-11-06lib/drmtest: Support nouveauThierry Reding2-2/+13
Add a driver definition for nouveau and wire up all the necessary pieces to identify its devices. Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-11-06lib/drmtest: Fix typoThierry Reding1-1/+1
"other" was misspelled as "otehr". Fix it. Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-11-06lib: Fix compilation on non-x86Thierry Reding3-5/+4
The meson build avoids the failure by excluding the igt_x86.c file from the compilation. autotools being what they are don't support that in an easy way, so just use the preprocessor to avoid the duplicate function definitions. Since igt_x86.c will now be ignored for non-x86 builds, the meson work- around can be removed. Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-11-06tools/aubdump: Avoid ISO C90 warningThierry Reding1-1/+2
GCC will warn about ISO C90 forbidding to mix declarations and code. Declare the variable at the beginning of the function to suppress the warning. Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-11-06tests/perf: Fix a bunch of warnings on 32-bit systemsThierry Reding1-16/+16
Data types are defined differently on 32-bit systems, causing gcc to complain about printf format specifiers not matching the size of the variables passed in. Use PRIu64 and %zu where appropriate. Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-11-06igt/gem_exec_fence: Add subtest for invalid flagsTvrtko Ursulin1-0/+31
We need to check that the kernel rejects attempts to pass in unknown flags. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-03tests/debugfs_test: Pretty print subdirectoriesMaarten Lankhorst1-7/+18
Instead of: (debugfs_test:1499) DEBUG: Reading file "data" (debugfs_test:1499) DEBUG: Could not open file "data" with error: Input/output error Print: (debugfs_test:1360) DEBUG: Entering subdir crtc-2 (debugfs_test:1360) DEBUG: Entering subdir crc (debugfs_test:1360) DEBUG: Reading file "data" (debugfs_test:1360) DEBUG: Could not open file "data" with error: Input/output error (debugfs_test:1360) DEBUG: Reading file "control" Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-11-02lib/igt_debugfs: Remove support for legacy CRC api.Maarten Lankhorst1-204/+23
In kernel v4.10 the legacy crc api has been replaced by a generic drm crc API. Remove support of the i915 legacy CRC api, since this is no longer needed. Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> [mlankhorst: Put the igt_require_pipes_crc() changes in their own commit.] Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #irc
2017-11-02lib/igt_debugfs: Use fstat instead of open for testing CRC support.Maarten Lankhorst1-3/+9
commit 8038e09be5a3ac06 ("drm/crc: Only open CRC on atomic drivers when the CRTC is active.") rejects opens on the CRC when the CRTC is not configured. Use fstat instead to check this file exists, so we don't accidentally rely on the legacy CRC path. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #irc
2017-10-30assembler: Fix bashism in run-test.shRhys Kidd1-1/+1
[[ a != b ]] is a bashism. As it's just comparing $1 to an empty string, use -n with a normal [ ]. Noticed whilst testing meson builds. /bin/sh is apparently dash in Intel's CI. v2: - keep this as a /bin/sh script (Joonas Lahtinen) Fixes: c3863e19 ("assembler/test: Prep work for meson") CC: Daniel Vetter <daniel.vetter@ffwll.ch> CC: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
2017-10-26igt/gem_exec_latency: Wire up an interloper for preemptionChris Wilson1-29/+59
For measuring the cost of preemption, inject a low priority spinner between the two measurements; the difference between the preemption and the normal dispatch includes both the cost of the spinner dispatch and of preempting it. Close enough for us to estimate the cost of preemption, though we don't measure the cost of preemption on the local ring! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> CC: Michał Winiarski <michal.winiarski@intel.com>
2017-10-25igt/drv_hangman: Skip aliased I915_EXEC_BSDChris Wilson1-0/+15
If the system has bsd2, we do not know which ring the kernel will alias I915_EXEC_BSD onto and so we do not what the matching string should be. Skip the unknown. v2: Deny the aliased I915_EXEC_BSD exists at all; be specific! Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103324 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> CC: Michał Winiarski <michal.winiarski@intel.com>
2017-10-25igt/gem_exec_nop: Headless requires DRM_MASTER for modesettingChris Wilson1-1/+4
Since the headless subtest wants to compare execution latency of a headless mode vs a single head, it needs to be able to do a modeset and ergo it requires DRM_MASTER. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-10-25igt/gem_fd_exhaustion: Remove stale assertChris Wilson1-17/+4
__gem_create() doesn't touch the outparam *handle on failure, so we can no longer assert that it zero. This is reasonable to remove as it is just testing the library itself and not the kernel, so no loss in coverage. We already had to remove the false assertion that gem_create() must fail following fd exhaustion (as we can not prevent the kernel from freeing VFS fdspace in between calls). The last remaining change is that we do no need to rely on an external path for open() as dup() will do the job of exhausting the fdtable. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103365 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-10-25lib/gt: Always eat the unwanted error stateChris Wilson1-15/+16
We only suppress the error state from the context, iff we trigger the GPU reset by hangcheck (igt_hang_ring). If we trigger an immediate reset via igt_force_gpu_reset(), we will populate the error-state but not free it because we thought we have it suppressed by the context parameter. Always eat the error after we expect a GPU reset and have not specified that we want to keep it. The side-effect of keeping the error-state around after we deliberately created it is that subsequent GPU hangs are not prominently recorded, as the kernel believes they are secondary hangs (and we only announce the first). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-10-24igt/prime_mmap_coherency: Remove manual gem_sync() callsChris Wilson1-4/+0
Emphasize that we want to test synchronisation using the dmabuf API (prime_sync_start, prime_sync_end) and so drop the manual synchronisation using the GEM API (gem_sync). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-24igt/drv_misssed_irq: Skip on gucChris Wilson1-0/+1
Since the driver's guc submission method requires the breadcrumbs irq for feeding requests to the guc, we cannot simply simulate a missing irq by disabling the interrupts. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-10-24lib/i915: Add a query for when the guc is enabled.Chris Wilson2-0/+13
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-10-24lib/igt_kms: Only print changed mode objects during atomic commit.Maarten Lankhorst1-3/+5
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-24meson: intel_dp_compliance depends on libudevJani Nikula1-4/+9
Only build intel_dp_compliance when libudev is available, also include libudev in the list of dependencies. Fixes error when libudev isn't there: ../tools/intel_dp_compliance_hotplug.c:33:21: fatal error: libudev.h: No such file or directory #include <libudev.h> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-24meson: don't assume xmlrpc-c-config is thereJani Nikula1-3/+4
xmlrpc is an optional dependency. If pkg-config can't find it, don't assume xmlrpc-c-config will be there either. Make xmlrpc-c-config optional too. Fixes error: Meson encountered an error in file meson.build, line 73, column 1: Program or command 'xmlrpc-c-config' not foundor not executable Fixes: 892abc602a8a ("meson: Add fallback for xmlrpc discovery") Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-24tests/kms_atomic_transition: Do not update unbound planes.Maarten Lankhorst1-3/+6
kms_atomic_transition was updating already disabled planes and committing them nonblockingly. This results in sporadic -EBUSY failures because planes that are unbound have their own timeline. The solution is not unbinding already unbound planes, making the test pass. There was also a related kernel bug causing failures in the same way, but that is now fixed. While at it, only check for fd completion in the nonblocking case, in the blocking case it's theoretically possible the commit completes before we check the that the commit didn't complete, most probably when the test is run in a debugger. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102671 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 Lankhorst3-69/+50
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-20tools/intel_vbt_decode: abstract child devices printing moreJani Nikula1-39/+31
Unify the common code for current and legacy blocks. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: dump more child device data for version < 152Jani Nikula1-3/+0
There's no evidence that this is the limit. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: unify legacy child device block dumpingJani Nikula2-43/+24
It's the same stuff as in the new child devices. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: unify child device printing across versionsJani Nikula1-57/+71
Make it easier to compare dumping against the struct definition. v2: Fix version comparison for flags, aux channel and dongle detect, and fix some typos while at it (Ville) Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: abstract DSI bridge type dumpJani Nikula1-15/+16
Cleaner than having it inline. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: use %.*s instead of duplicating a stringJani Nikula1-5/+1
child->device_id may not be terminated, but we can use %.*s format specifier to define the max length to print. No need to make a copy. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: update dvo port name dumpingJani Nikula2-34/+25
Add names for new ports, throw out unused macros. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: make a copy of child devices before dumpingJani Nikula1-2/+18
Take child device size into account, avoid reading past the actual child device. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tests/kms_concurrent: Fix testcase fails.Maarten Lankhorst1-23/+20
igt_pipe_refresh was added for the forked helper, we could just call it from the fork to prevent races against MODE_ID. The static 1024x768 mode is allocated on the stack and returned, which will result in a garbage mode. Make the fallback mode global to prevent this. igt_output_set_pipe is unneeded, override_mode is enough to force the right mode. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103342 Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20tests/kms_atomic: Convert/rewrite tests to use igt_kms framework, v2.Maarten Lankhorst1-1160/+509
Now that we can set individual properties through the igt_kms api, we no longer need to duplicate functionality from igt_kms. Set invalid properties directly, and rewrite kms_atomic.c to use igt_display. This will allow us to remove a lot of code in kms_atomic.c, and benefit from how igt_kms can set up a valid configuration, instead of having to inherit it from fbcon. Changes since v1: - Fix test failure when atomic_invalid_params is run standalone. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Daniel Stone <daniels@collabora.com> [mlankhorst: Use kmstest_set_connector_dpms (mkahola)] Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-10-20tests/chamelium: Remove reliance on output->config.pipeMaarten Lankhorst1-3/+14
IGT has an api that can find a matching pipe for a given connector, so use that. igt_output_override_mode already forces a modeset on an affected pipe since an earlier commit, so the second call to igt_output_set_pipe can be removed. 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 Lankhorst3-142/+83
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 Lankhorst3-31/+9
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 Lankhorst2-13/+0
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 Lankhorst2-0/+105
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 Lankhorst4-12/+62
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 Lankhorst3-45/+9
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 Lankhorst4-44/+110
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 Lankhorst1-16/+37
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 Lankhorst1-6/+33
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 Lankhorst5-161/+159
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 Lankhorst4-209/+165
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 Lankhorst4-40/+45
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-19lib: Free all internal buffers before measuring available memoryChris Wilson1-1/+1
Release the internal caches (by flushing the idle_worker) to maximise the available memory for use by tests (and to reduce sporadic skipping when on the cusp). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-10-19lib: Flush the driver's internal cache of objects before countingChris Wilson1-1/+2
As the driver itself keeps a cache of objects, these too need to be flushed prior to producing a stable count of objects. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102655 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>