summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2017-11-06lib/drmtest: Fix typoThierry Reding
"other" was misspelled as "otehr". Fix it. Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-11-06lib: Fix compilation on non-x86Thierry Reding
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. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-11-02lib/igt_debugfs: Remove support for legacy CRC api.Maarten Lankhorst
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 Lankhorst
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-25lib/gt: Always eat the unwanted error stateChris Wilson
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-24lib/i915: Add a query for when the guc is enabled.Chris Wilson
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 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-19lib: Free all internal buffers before measuring available memoryChris Wilson
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 Wilson
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>
2017-10-19lib: Idle the GT when quiescing the GPUChris Wilson
As part of the general procedure for ensuring the GPU is idle, we also want to ask the driver to flush its idle_worker. The idle_worker is responsible for releasing both the driver's internal cache of buffers and cache of state (such as the prolonged GT wakeref). By flushing the idle_worker we ensure that each test (each caller needing an idle gpu) has a clean slate; not carrying over caches from one test to the next. Note this is a silent no-op for kernels that do not know about DROP_IDLE, old bugs will remain. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-10-19lib: Add DROP_IDLEChris Wilson
A new flag for an old API; now we can request that the driver flush its idle_worker to release internal caches. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-10-19lib/i915: Move submission related helpers to lib/i915/gem_submissionMichał Winiarski
Since I accidentally broke the build for some, by putting the pretty printer for submission inside ifdef HAVE_PROCPS, it's time to move the whole thing into lib/i915 while fixing this mistake. Let's also rename the pretty printer and add a doc to it as well as the section. Fixes: f6dfe556659f ("lib: Extract helpers for determining submission method") Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-17lib/i915: Extract context priority setparam to a helperMichał Winiarski
Another example of something that is used across different tests, and should be moved to lib. v2: Break the trend of expanding ioctl_wrappers Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-17lib/i915: Move context related helpers to lib/i915/gem_contextMichał Winiarski
We'd like to make ioctl_wrappers a bit thinner, and we plan to add new helpers in the following patch. Let's move context related helpers before adding more content. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-17lib/i915: Extract helpers for determining scheduler capabilitiesMichał Winiarski
Couple of tests are using either determining scheduler capabilities or pretty printing. Let's move those to helpers in lib. We can also keep the value obtained from getparam static. v2: Break the trend of expanding ioctl_wrappers Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-17lib: Extract helpers for determining submission methodMichał Winiarski
Couple of tests are using either determining submission method, or pretty printing. Let's move those to helpers in lib. v2: s/igt_show/gem_show Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-16lib/igt_gt: Allow non-default contexts to hang non-render ringsVinay Belgaumkar
This limitation does not exist in latest kernel. It was removed by this patch- commit f7978a0c581a8a840a28306f8da43e06e7fef3bf v2: Added commit id that removes the limitation(Chris Wilson) V3: Generic way to find if kernel supports this instead of hardcoding gens(Chris Wilson) v4: Optimize the if block (Daniele) v5: Use the same context instead of creating a dummy (Chris Wilson) v6: Changed comment structure and removed extra brackets, local var (Chris Wilson) v7: Removed some more extra brackets Cc: Michel Thierry <michel.thierry@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-16aux: Use IGT version of system() call to run rtcwakeImre Deak
The clone() system call has difficulty to make progress if interrupted frequently by the signal helper process. At least on an APL, like in the Bugzilla ticket below, this can introduce minutes of overhead to a single system() call (leading to a global CI timeout). To get rid of the overhead suspend the signal helper process for the duration of the system() call, which is provided already by igt_system(). Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103160 Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-16aux: Suspend signal helper for shell commandsImre Deak
The clone() system call with a larger executable (like /bin/sh) may have difficulty to make progress on some platforms if interrupted frequently. So suspend the signal helper process for the duration of the syscall. This is needed to solve an actual problem by the next patch. v2: - Clarify/fix code comments. (Chris) - Update igt_system_quiet() as well accordingly. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
2017-10-12meson: Make syncobj tests buildVille Syrjälä
Include igt_syncobj.c in libigt so that tests/syncobj_basic actually builds, and let's also build tests/syncobj_wait. v2: Also update lib_headers (Petri) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-10lib: Add some syncobj helpers (v2)Jason Ekstrand
[airlied: added some initial gtk-doc for the helper library.] Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
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-04Fix compilation on some distrosAusmus, James
Some distros (such as Gentoo) are removing the include of sys/sysmacros.h from sys/types.h. Explicitly include sysmacros.h in files where we use the minor() and major() functions. Signed-off-by: James Ausmus <james.ausmus@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-03lib: Fixup __gem_create() to be 64b safe.Chris Wilson
We want to create very large objects, larger than the 2G limit imposed by using ints. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviwed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2017-10-03meson: Fix build of igt_x86-using tests on non-x86 platforms.Eric Anholt
Just stub out the features return value, and return an empty string. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-03lib: Report the error from __gem_create()Chris Wilson
We have two style of ioctl wrappers. The principle interface does error checking on behalf of the caller (to avoid having lots of repetitious code in each test), and for the few cases where the error is important for the test, we also expose a double underscore version. Fix up __gem_create() to follow this pattern and report the negative error code returned by the kernel. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-10-03lib: Reduce dependency on glibPetri Latvala
In commit ebd6eb69f57b ("Make igtrc configuration common, with configurable suspend/resume delay") .igtrc handling was moved to igt_core from igt_chamelium. That made everything in IGT depend on GLIB by accident. In short, igt_core.h declared a variable of type GKeyFile*, requiring glib.h. Everything that tried to #include igt_core.h required glib.h to be available, by use of GLIB_CFLAGS. This "worked" so far because CAIRO_CFLAGS contained GLIB_CFLAGS. As the variable is only used by other stuff in lib/, stuff it in its own header file to leave igt_core.h without a dependency to glib.h. Also add a couple of missing #ifdef HAVE_GLIBs around. Reported-by: Felipe De Jesus Ruiz Garcia <felipe.de.jesus.ruiz.garcia@intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@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-10-02meson: Distribute meson build system filesPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-02lib: Handle intel_aub.h like the other stub filesPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-10-02lib: Remove media_fill.cPetri Latvala
media_fill.c has been unused from around 2014 when its contents moved to intel_batchbuffer.c. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
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-29lib: Fix igt_sysfs_set_u32 return valueTvrtko Ursulin
Printf family functions return a number of bytes, not tokens, printed so the existing check (== 1) was wrong. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-09-28lib: Capture the error state on an unexpected hangChris Wilson
Dump debugfs/i915_error_state to the debug channel if we detect an ERROR uevent. This poses a few problems, not least that it is the auxiliary process doing the dumping (so the output may be interleaved with the test, but considering a hang occurred it is likely the test is blocked) and the average error state is around 60k, which may prove unwieldy! On the other hand, it may prove invaluable in debugging those impossible to reproduce bugs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-09-25igt_core: Rework igt_system()Petri Latvala
Instead of redirecting output to pipes and forking, redirect after forking to avoid having to carefully unredirect before logging anything. igt@tools_test@sysfs_l3_parity had a racy condition where it prints the output of intel_l3_parity prepended by [cmd], but that ended up being printed again prepended by [cmd] because output was redirected, causing outputs to appear multiple times. This patch fixes that. CC: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>