summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-09-06igt/kms_addfb_basic: Exercise legacy interface to addfb2Chris Wilson
The legacy interface passes in a single handle, and instead of providing the pixel_format fourcc, passes in a bpp/depth combination that the kernel translates into a fourcc. If that is an illegal combination, the kernel should be reporting EINVAL rather than pass an unknown framebuffer to the drivers. As the number of possible permutations of bpp/depth (both are strictly u32 parameters) is huge, we simply fuzz the interface for 1s. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-09-06tests/kms_rotation_crc: Fix bad-pixel-format not to be run on gen11 and laterJuha-Pekka Heikkila
gen11 enables 90/270 rotation for RGB565 mode. IGT would need support for C8 mode to enable running this subtest on gen11 and later. v2 (Mika Kahola): Combine gen checks into one comparison. Update comment on why bad-pixel-format is disabled beyond gen11. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-09-06tests/kms_plane_scaling: Allow DRM_FORMAT_RGB565 rotation on gen>=11Juha-Pekka Heikkila
Test DRM_FORMAT_RGB565 rotation when gen is 11 or higher. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-09-05tests/fbcon_fbt: Enable PSR1 via debugfsDhinakaran Pandiyan
Test only PSR1 on PSR2 panels by making use of the debugfs toggle. Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2018-09-05tests/psr: Test PSR1 in kms_psrDhinakaran Pandiyan
The tests we have work only with PSR1, but setting the module parameter enable_psr enables PSR2 if the panel supports it. Make use of the newly added debugfs toggle to enable only PSR1 when testing. Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2018-09-05tests/fbcon_fbt: Avoid opening debugfs dir repeatedlyDhinakaran Pandiyan
Make use of igt_debugfs_simple_read() to open debugfs dir just once. v2: Renamed function parameters s/fd/debugfs_fd (Jose) Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2018-09-05tests/psr: Avoid opening of already open debugfs dirDhinakaran Pandiyan
The tests calls igt_debugfs_dir() to open the debugfs dir and further along calls igt_debugfs_read() each time i915_edp_psr_status needs to be read. As igt_debugfs_read() opens the directory unnecessarily, switch to using the newly added igt_debugfs_simple_read() v2: Commit message typo (Jose) Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2018-09-05lib/debugfs: Function to read debugfs with the directory already openDhinakaran Pandiyan
tests/kms_frontbuffer_tracking and tests/kms_psr read debugfs nodes several times after opening the directory once. There is already an implementation of this in the kms_frontbuffer_tracking, moving that functionality to the library will allow us to share the code with kms_psr and kms_fbcon_fbt Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2018-09-05igt/pm_backlight: Skip if pm is not supportedChris Wilson
If we cannot do runtime suspend, testing it's impact on the backlight is moot. Simply skip on systems that cannot runtime suspend. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107789 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107790 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107794 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-09-05lib/pm: Fail gracefully if CONFIG_PM is not built into the kernelChris Wilson
We report the failure from igt_setup_runtime_pm() so that the caller can decide how they may proceed, so replace the hard assert with the error propagation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-09-05intel_reg: Fix truncate string in the snprintfRodrigo Siqueira
This patch fix the following GCC warning: ../tools/intel_reg.c: In function ‘dump_decode’: ../tools/intel_reg.c:203:41: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] snprintf(decode, sizeof(decode), "\n%s", bin); [..] ../tools/intel_reg.c:200:40: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1022 [-Wformat-truncation=] snprintf(decode, sizeof(decode), " (%s)\n%s", tmp, bin); [..] ../tools/intel_reg.c:200:4: note: ‘snprintf’ output between 5 and 2051 bytes into a destination of size 1024 snprintf(decode, sizeof(decode), " (%s)\n%s", tmp, bin); [..] The decode[] variable contains concatenated contents of bin[] and tmp[], both of which are allocated as 1024 bytes. Allocating 1024 chars for bin[] seems like an overkill, since all it ever holds it the output of to_binary(). to_binary outputs fixed format: -------------------------------------------------------------------- 24 16 8 0 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 -------------------------------------------------------------------- Which is 138 chars long (sans the new line). We can limit the size of char bin[] to that number (-ish), and then slightly bump the size of decode[] to accommodate for combined sizes of tmp[] and bin[]. Changes since V1: - Improve commit message Changes since V2: - updated commit message - limit the amount of stack abuse Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
2018-09-05igt/pm_backlight: Require a connected output for the backlightChris Wilson
We cannot control the backlight if its attached output is not connected. Don't assert, but require. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
2018-09-05igt/kms_vblank: Exercise some EINVALChris Wilson
Feed some impossible garbage into drmWaitVblank and expect the kernel to report EINVAL. v2: Cancel the double negative of ~invalid_flags Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-09-04igt/pm_rpm: Reload the module with full mmio debuggingChris Wilson
Our unclaimed mmio access debugging is lazy, doing cheap checks periodically and only if they fail do a full check around every mmio access. When testing for runtime pm, enable the full mmio debugging from the initial load. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
2018-09-04lib/pm: Increase snd module probe timeout to 10sChris Wilson
5s is often not enough for the sound module to finish loading, so bump the timeout to 10s. For fun, poll quicker over the first 1s! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.linux.com> Reviewed-by: Imre Deak <imre.deak@intel.linux.com>
2018-09-04igt/pm_rps: Clear previous high load on high->low transitionChris Wilson
Make sure we do flush out the previous spinner and delay signaling transition completion until we do. References: https://bugs.freedesktop.org/show_bug.cgi?id=102250 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-09-04igt/pm_rps: Wait for the load-helper to signal receipt of commandChris Wilson
Actually wait for the load-helper to complete it switch over to the new load by using a pipe(22) between the two. References: https://bugs.freedesktop.org/show_bug.cgi?id=102250 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-09-04lib/pm: Wait a little for sound module load to completeChris Wilson
Sometimes we may probe the sound module as it is still being registered and its debugfs not yet fully populated. If we do not find a file we expect to exist, sleep a little and check again. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107801 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.linux.com> Reviewed-by: Imre Deak <imre.deak@intel.linux.com>
2018-09-04lib/pm: Squelch warning for failing to enable audio powermanagementChris Wilson
It doesn't seem to be preventing rpm (see the pm_rpm tests) if we fail to enable runtime-powermanagement for audio, so reduce the warning to a debug. It will still be visible if it fails, but only if it fails. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
2018-09-03lib: Check for a specific match if requested.Chris Wilson
We only want to allow driver_open to match an unknown driver if asked for DRIVER_ANY, so we need to double check. Fixes: 9e5fa9112546 ("lib/drmtest: Move open device to separate function") Reported-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-09-03lib: Fix strcmp() direction for bsearch.Chris Wilson
I fluked out as vgem was the initial mid value, hiding the worst of the errors as i915 matched with DRIVER_ANY. Fixes: 20087bf22698 ("lib: Use a bsearch to find the module name") Reported-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-09-03lib: Use a bsearch to find the module nameChris Wilson
Even with a small number of known drivers (6), a bsearch will take at most 3 steps, whereas the linear search will take 3 steps on average. In the future with more known drivers, the logN bsearch will be even more advantageous. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-09-01lib/drmtest: Move open device to separate functionKatarzyna Dec
While working on IGT code and during reviewes I've noticed that it could be nice to have function that is opening particular device. Let's move out conditions for opening device and rename __open_device to __search_and_open() function. v2: Refactored open_device even more by getting device name once and returning fd for it. (Chris) v3: Added name_size to __get_drm_device_name, removed unused is_X_device. v4: Fixed cases with failing virtio_gpu v5: Rebase, indent fixes Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-08-31tests/kms_vblank: Test if we have functional rpm before testingChris Wilson
We want to test that provoking a vblank interrupt works correctly after waking up from runtime-pm. First though, we must wait for the device to enter runtime-suspend. If the device cannot, e.g. we haven't enabled the DMC firmware, the test should skip because our external requirements are not met. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107768 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
2018-08-31tests/pm_backlight.c : Brightness test with DPMS and System suspend.Jyoti
BIOS programs few of PWM related registers during initial boot. But during System suspend those registers are cleared. This test aim to check whether display programs those registers properly after system resume. Also checks brightness programming during DPMS ON/OFF cycle to check backlight programming is done properly from display side. v2 : Optimize the code to avoid code redundancy. (Rodrigo) Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2018-08-31igt/perf_pmu: Improve the presentation of the accuracy calibrationChris Wilson
Normalize the variance to stddev, and remove some redundant steps in computing the time from itself. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-08-31igt/perf_pmu: Aim for a fixed number of iterations for calibrating accuracyChris Wilson
Our observation is that the systematic error is proportional to the number of iterations we perform; the suspicion is that it directly correlates with the number of sleeps. Reduce the number of iterations, to try and keep the error in check. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-08-31lib: Stop caching __drm_device_idChris Wilson
In a multi-device system there is no guarantee that the fd being probed in intel_get_drm_devid() is the same as was opened earlier. Any cache may outlive the fd, so is frought with lifetime issues. The primary reason for caching the devid was to avoid extra ioctls in the dmesg/strace, but hopefully all users now grab the id in their fixture and not inside every function. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-08-31runner: Introduce --piglit-style-dmesgPetri Latvala
With the flag, dmesg handling is done exactly as piglit does it: Level 5 (info) and higher dmesg lines, if they match a regexp, cause test result to change to dmesg-*. The default is false (use new method). Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Acked-by: Martin Peres <martin.peres@linux.intel.com>
2018-08-31runner/resultgen: Add a new field to carry overall runtimesPetri Latvala
Previously, the total runtime of binary foo with subtests bar and quz was accumulated to the tests field under 'igt@foo' with just a TimeAttribute field. This confuses piglit-derived scripts deep down the CI pipeline, so move the overall binary runtime to a new field 'runtimes', with TimeAttribute fields for 'igt@foo'. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Acked-by: Martin Peres <martin.peres@linux.intel.com>
2018-08-30lib/sysfs: Avoid using FILE* temporary for igt_sysfs_[v]printfChris Wilson
Currently we wrap our fd inside a FILE* stream to make use of vfprintf, but the man page leaves the question of errno and signal handling in doubt. It is documented as returning a negative value and setting ferror(), but we have been interpreting errno to handle signal restarting. As that is in doubt, reduce it to a sprintf and reuse our common interrupt handling write() that already returns -errno. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-08-30lib/core: Use libdw to decode stack trace with debugging symbols, v2.Maarten Lankhorst
libdw is a new dependency built from the elfutils package. It provides us a way to generate line numbers and file names from the instruction pointer. elfutils is LGPLv3 or GPLv2, so it's ok to link against it. Before: IGT-Version: 1.23-g8ae86abd419d (x86_64) (Linux: 4.16.0-1-amd64 x86_64) Starting subtest: fail-result (meta_test:29661) CRITICAL: Test assertion failure function test_result, file ../tests/meta_test.c:94: (meta_test:29661) CRITICAL: Failed assertion: result == 1 (meta_test:29661) CRITICAL: error: 0 != 1 Stack trace: #0 [__igt_fail_assert+0x20a] #1 [test_result+0x7a] #2 [__real_main120+0x240] #3 [main+0x4a] #4 (../csu/libc-start.c) __libc_start_main:344 #5 [_start+0x2a] After: IGT-Version: 1.23-g8ae86abd419d (x86_64) (Linux: 4.16.0-1-amd64 x86_64) Starting subtest: fail-result (meta_test:1357) CRITICAL: Test assertion failure function test_result, file ../tests/meta_test.c:94: (meta_test:1357) CRITICAL: Failed assertion: result == 1 (meta_test:1357) CRITICAL: error: 0 != 1 Stack trace: #0 ../lib/igt_core.c:1467 __igt_fail_assert() #1 ../tests/meta_test.c:95 test_result() #2 ../tests/meta_test.c:137 __real_main120() #3 ../tests/meta_test.c:120 main() #4 ../csu/libc-start.c:344 __libc_start_main() #5 [_start+0x2a] Changes since v1: - Add libdw dependency to readme. - Change backtrace format slightly. Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Add description about libdw in commit msg, name -> dwfl_name] Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-08-30tests/kms_frontbuffer_tracking: Don't unset mode after reading CRCMaarten Lankhorst
Until the previous commit we had to disable the mode after reading CRC because otherwise we might not have been enable features correctly. Now we can just stage the disable without applying it, so each subtest can set its desired mode and igt_display will update the state as required. Behavior with legacy PSR: - Modeset enable, read CRC, enable legacy PSR switch, disable CRTC if using legacy PSR by calling igt_display_commit. Next enable CRTC will enable PSR. Behavior with debugfs PSR: - Modeset enable - Read CRC - Enable debugfs PSR switch. PSR enabled. - Next commit will be done by test, which can disable the mode or set a mode. The latter case will be a compatible mode, in which case we avoid the modeset. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
2018-08-30tests/kms_frontbuffer_tracking: Remove redundant modesets for toggling ↵Maarten Lankhorst
features, v5. Disabling PSR and FBC used to require a commit, but now that changes to FBC take effect after the next commit, and PSR is toggled through debugfs we can skip those modesets. Changes since v1: - Try to avoid modesets for PSR if the kernel supports it, but otherwise force a modeset for the changes to take effect. Changes since v2: - Rebase on top of previous PSR changes. Changes since v3: - Rebase on move to lib/igt_psr. Changes since v4: - Split out related changes. (dhnkrn) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
2018-08-30tests/kms_frontbuffer_tracking: Attempt to enable both screens simultaneously.Maarten Lankhorst
This might save a modeset when the second screen is disabled in the first step, and re-enabled when enabling the secondary screen. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
2018-08-30lib/psr: Add support for toggling edp psr through debugfs, v5.Maarten Lankhorst
It's harmful to write to enable_psr at runtime, and the patch that allows us to change i915_edp_psr_debug with the panel running will require us to abandon the module parameter. Hence the userspace change needs to be put in IGT first before we can change it at kernel time. Toggling it to debugfs will mean we can skip a modeset when changing our feature set. Changes since v1: - Rebase with the previous patches dropped. Changes since v2: - Rebase on top of new api in i915_edp_psr_debug. Changes since v3: - Enable IRQ debugging for extra logging. - Force PSR1 mode. (dhnkrn) - Move PSR enable/disable functions to lib/igt_psr. (dhnkrn) Changes since v4: - Redisable irqs right away when debugfs api doesn't work. (dhnkrn) - Use hex everywhere. (dhnkrn) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Fix -ENODEV explanation in has_psr_debugfs (dhnkrn)] Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
2018-08-30lib/kms: Remove special enum handling and replace with call to ↵Maarten Lankhorst
igt_plane_set_prop_enum, v2. We now have infrastructure for generic enum handling. This will make it easier to write new tests without defining all enum constants beforehand. Changes since v1: - Fix compile error, sent old version by accident. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
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-08-28tests/gem_render_copy: Fix clipped heightVille Syrjälä
Assign the clipped height to 'h', not 'w'. This didn't cause any problems so far because we use square buffers. Also get rid of the gcc variable shadowing warnings by not nesting the min()/max(). Fixes: aaa23eff21a1 ("tests/gem_render_copy: Use a more elaborate pattern of pixels") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
2018-08-27Make string commands dynamic allocateRodrigo Siqueira
This patch fix the following GCC warning: intel_gvtg_test.c: In function ‘create_guest’: intel_gvtg_test.c:127:50: warning: ‘%s’ directive writing up to 4095 bytes into a region of size 4077 [-Wformat-overflow=] [..] intel_gvtg_test.c:127:5: note: ‘sprintf’ output between 36 and 8226 bytes into a destination of size 4096 [..] This patch changes the approach for allocating memory to handle QEMU commands by dynamically allocate space to save the whole command. Changes since v1: Arkadiusz Hiler: - Remove overkill allocation for handling commands - Remove unnecessary use of memset Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-08-23gem_storedw_loop: Remove unused variableAntonio Argenziano
'long-*' subtests didn't make any sense now so removed those as well. Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-08-21tests/kms_cursor_crc: Open DRM device with DRIVER_ANYHaneen Mohammed
So that this test can be run in drivers other than i915. Remove devid and only check it if the driver is i915. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2018-08-20pm_rpm: Require DMC loaded before testing runtime_pm for gen9+Rodrigo Vivi
Since we block runtime PM if DMC is not loaded, let's skip the test. v2: Use i915_dmc_info presence to detect dmc requirement instead of gen check as Chris suggested. v3: Add missing \0 before using buf. (Chris) v4: read only 14 bytes [0:13] so buf[len] is the 15th position. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.com> Cc: Anusha Srivatsa <anusha.srivatsa@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-08-17lib: Poll for snd_hda_intel discoveryChris Wilson
Loading the sounds modules is asynchronous with the sysfs device hierarchy being instantiated sometime after modprobe returns. As such while we are probing for the sound device, poll a few times to accommodate the async discovery. v2: closedir() after use Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
2018-08-17runner/resultgen: Implement the totals fieldPetri Latvala
The totals field in the results json lists the total amount of particular test results, both overall and by binary. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-08-17runner/resultgen: Be more robust with incomplete testsPetri Latvala
If a test is incomplete and didn't have time to print that it's entering a subtest, the generated results will think the test binary does not have subtests. If that case is known, make sure to attribute blame correctly. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-08-16igt/pm_rpm: Skip counting modes if modprobed with disable_displayChris Wilson
If we've explicitly disabled the display, we will never find any connected outputs or modes. Checking for them will fail and report the missing requirement instead. v2: Sigh, avoid more comparisons against enabled displays v3: Try occasionally compiling patches Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
2018-08-16runner: Match the piglit name with -t and -x optionsPetri Latvala
Instead of just matching the binary/subtest name. Originally not implemented to get the runner landed faster. Turned out to be simple enough. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-08-16Revert "lib: Keep upto half of RAM reserved for test runner"Chris Wilson
This reverts commit 2c7224e488457afb7bb76664c4b7c857baef1e08 as it was accidentally pushed when fixing up the pm_rpm compilation. Oops. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Petri Latvala <petri.latvala@intel.com>
2018-08-16igt/pm_rpm: Include igt_device.hChris Wilson
../tests/pm_rpm.c: In function ‘setup_environment’: ../tests/pm_rpm.c:702:2: warning: implicit declaration of function ‘igt_device_set_master’; did you mean ‘pci_device_cfg_write’? [-Wimplicit-function-declaration] igt_device_set_master(drm_fd); Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Imre Deak <imre.deak@intel.com>