summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-04-16tests/perf: Fix timeout for RC6 re-enablingImre Deak
After closing the perf stream the parking the GPU engines may easily take more than 1 second: releasing the FD itself results in a new request submission via i915_perf_release()->i915_oa_stream_destroy()-> gen8_disable_metric_set(). That means a >1sec delay for the delayed unpark to be called due to the delay from queue_delayed_work(retire_work, round_jiffies_up_relative(HZ)) + the delay from mod_delayed_work(idle_work, msecs_to_jiffies(100)) Scheduling may push this delay even further, I measured >2sec delays on my GLK. Fix this by calling gem_quiescent_gpu() which syncs up with the idle work, thus making sure we'll see RC6 residency afterwards. v2: - Use gem_quiescent_gpu() instead of increasing the timeout. (Chris) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103179 Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-04-16lib/intel_reg: fix shift undefined behaviourSimon Ser
1<<31 (same as 2<<30) is undefined behaviour in C. When compiling with GCC and UBSan, it gives this error: ../tools/intel_reg_decode.c: In function ‘ivb_debug_port’: ../tools/intel_reg_decode.c:398:3: error: case label does not reduce to an integer constant case PORT_DBG_DRRS_HW_STATE_HIGH: ^~~~ This happens because 1<<31 isn't representable as a signed int. Instead, use an unsigned int. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-16tests/kms_vrr: fix compilation with ClangSimon Ser
Clang fails to compile this file with this error: ../tests/kms_vrr.c:203:20: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] drmVBlank vbl = { 0 }; ^ {} As discussed in [1], using an empty initializer list is the preferred way to fix this. [1]: https://lists.freedesktop.org/archives/igt-dev/2019-March/010841.html Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-16kms_content_protection: Disable authentication when failedRamalingam C
When content protection authentication is failed in kernel after all requried retries, before declaring the test failure, set the content protection to UNDESIRED state. This will avoid the HDCP authentication attempts in subsequent modesets from other tests. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110376 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110224 Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-04-16runner/job_list: print error when job list is emptySimon Ser
Using a filter that doesn't match any test name resulted in the runner silently failing. Print an error message so that the user understands why the runner fails. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-16i915/gem_mmap_gtt: Markup a couple of GTT set-domainsChris Wilson
We have to control the cache domains, especially important before first writing into the object. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-04-15tests/fbcon_fbt: Do not keep opening debugfs_fd at every setup_drm() callJosé Roberto de Souza
As debugfs_fd is used even after the teardown_drm(), it is not closed in this function or in any other place. And then it gets worse as every call to setup_drm() will open another file descriptor to debugfs dir. So lets move the opening of debugfs_fd to setup_environment() and only open it once and close it before leave the test. Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-15tests/fbcon_fbt: Do not try to open the same driver twice as masterJosé Roberto de Souza
If a subtest fail before the teardown_drm() call it will keep the driver open as master causing the test to fail when trying to open the driver again as master, so lets share the drm_info struct and check if driver is already open. Starting subtest: psr (kms_fbcon_fbt:5270) CRITICAL: Test assertion failure function subtest, file ../tests/kms_fbcon_fbt.c:259: (kms_fbcon_fbt:5270) CRITICAL: Failed assertion: feature->wait_until_update(drm.debugfs_fd) Stack trace: #0 ../lib/igt_core.c:1474 __igt_fail_assert() #1 ../tests/kms_fbcon_fbt.c:261 subtest() #2 ../tests/kms_fbcon_fbt.c:316 __real_main309() #3 ../tests/kms_fbcon_fbt.c:309 main() #4 ../csu/libc-start.c:325 __libc_start_main() #5 [_start+0x29] #6 [<unknown>+0x0] Subtest psr failed. **** DEBUG **** (kms_fbcon_fbt:5270) drmtest-DEBUG: Test requirement passed: !(fd<0) (kms_fbcon_fbt:5270) igt_debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/1' (kms_fbcon_fbt:5270) DEBUG: Test requirement passed: drm->res (kms_fbcon_fbt:5270) igt_kms-DEBUG: VT: graphics mode set (mode was 0x0) (kms_fbcon_fbt:5270) DEBUG: Test requirement passed: feature->supported_on_chipset(drm.debugfs_fd) (kms_fbcon_fbt:5270) CRITICAL: Test assertion failure function subtest, file ../tests/kms_fbcon_fbt.c:259: (kms_fbcon_fbt:5270) CRITICAL: Failed assertion: feature->wait_until_update(drm.debugfs_fd) (kms_fbcon_fbt:5270) igt_core-INFO: Stack trace: (kms_fbcon_fbt:5270) igt_core-INFO: #0 ../lib/igt_core.c:1474 __igt_fail_assert() (kms_fbcon_fbt:5270) igt_core-INFO: #1 ../tests/kms_fbcon_fbt.c:261 subtest() (kms_fbcon_fbt:5270) igt_core-INFO: #2 ../tests/kms_fbcon_fbt.c:316 __real_main309() (kms_fbcon_fbt:5270) igt_core-INFO: #3 ../tests/kms_fbcon_fbt.c:309 main() (kms_fbcon_fbt:5270) igt_core-INFO: #4 ../csu/libc-start.c:325 __libc_start_main() (kms_fbcon_fbt:5270) igt_core-INFO: #5 [_start+0x29] (kms_fbcon_fbt:5270) igt_core-INFO: #6 [<unknown>+0x0] **** END **** Subtest psr: FAIL (0.845s) Starting subtest: fbc-suspend Test requirement not met in function igt_device_set_master, file ../lib/igt_device.c:55: Test requirement: __igt_device_set_master(fd) == 0 Can't become DRM master, please check if no other DRM client is running. Subtest fbc-suspend: SKIP (0.001s) Starting subtest: psr-suspend Test requirement not met in function igt_device_set_master, file ../lib/igt_device.c:55: Test requirement: __igt_device_set_master(fd) == 0 Can't become DRM master, please check if no other DRM client is running. Subtest psr-suspend: SKIP (0.000s) Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-15tests/fbcon_fbt: Add and user psr_long_wait_update()José Roberto de Souza
When fbcon is enabled, PSR will be active between cursor blinks so what it should really use to test PSR is psr_wait_entry(), so a new feature callback was added. But the fbcon cursor blinks at 5hz what give us 200ms between each screen update what make psr_wait_update() prone to fail the test because it timed out before a blink could happen, so here adding and using psr_long_wait_update() that have a longer timeout. v3: - 3 previous patches squashed in this one (Maarten) - Back to !feature->wait_until_enabled() to test feature state when all CRTCS are disabled(Dhinakaran) Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Dhinkaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-15tests/fbcon_fbt: Enable cursor blinkingJosé Roberto de Souza
If cursor blinking is disabled no screen updates will happen and fbcon_fbt subtests will fail, so lets enable cursor blink while running this test and restore to the previous value when exiting it. v4: - renaming restore fd (Dhinakaran) - saving previous value as char (Dhinakaran) - skipping test if not able to open cursor blink file (Dhinakaran) Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-15tests/fbcon_fbt: Allow fbcon to bind when running this testJosé Roberto de Souza
9c4114ec5d87 (lib: Always unbind the fbcon around igt) broke fbcon_fbt test as fbcon is not allowed to bind when executing any IGT test, so lets allow it again just for this test. Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-15tests/fbcon_fbt: Use psr_wait_entry() to wait PSR be enabledJosé Roberto de Souza
kms_fbcon_fbt was doing its own handling to wait for PSR to get enabled while it is already available in lib. v2: splitted previous patch into this one and the previous one(Dhinakaran) Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-15tests: Add kms_plane_cursor testsNicholas Kazlauskas
Tests various cursor plane interactions with primary and overlay planes. Correctness is verified by comparing CRC values to reference buffers drawn on the primary plane. There are existing generic multi-plane interaction tests but these don't test positional output on overlapping planes or extensively cover edge and corner cases for offseting and positioning planes based on DRM parameters. On hardware without dedicated cursor planes (such as AMDGPU) these tests are helpful for verifying software calculations done for positioning the cursor plane. Cc: Leo Li <sunpeng.li@amd.com> Cc: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Leo Li <sunpeng.li@amd.com>
2019-04-15meson: missed dependency of liblzmaSergii Romantsov
Failed to configure intel-gpu-tools with error: meson.build:151:0: ERROR: Could not generate cargs for libdw: libdw depends on liblzma. Installation of liblzma-dev fixes issue. At least it has to be pointed in Readme. v2: just readme updated Cc: Petri Latvala <petri.latvala@intel.com> CC: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-12runner: Make sure oom-killer doesn't kill the runnerPetri Latvala
Tests that eat all of the RAM and then some to invoke the oom-killer deliberately sometimes cause extra casualties. Make sure the runner stays alive. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-04-12tests/gem_create: Test unaligned BO size updateMichał Winiarski
The driver is supposed to update the size when it's trying to outsmart userspace. Let's test it. v2: Rework to use local ioctl wrapper (Chris) v3: s/16/15, move test a bit earlier (Chris) Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Janusz Krzysztofik <janusz.krzysztofik@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-04-11intel-ci: Sanitycheck CRC readback on the first pipe onlyChris Wilson
For fast-feedback, we need to sanitycheck that CRC reads work, otherwise the display validation tests are flawed. However, we don't need to extensively test each pipe as the HW is fundamentally the same. Instead, do the full suite of tests on one pipe, and just verify that the interface works for the other pipes. This should speed BAT up by reducing NUM_PIPES suspend and resume cycles to just 1. The shards should cover the extended test suite on all pipes for complete validation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Martin Peres <martin.peres@free.fr> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Martin Peres <martin.peres@free.fr> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2019-04-11igt/tests/kms_atomic_transition: Tolerate if can't have all planesStanislav Lisovskiy
With some upcoming changes i915 might not allow all sprite planes enabled, depending on available bandwidth limitation. Thus the test need to decrement amount of planes and try again, instead of panicking. v2: Removed excessive nested conditions, making code a bit more readable(hopefully). v3: Stopped using global n_planes variable as it might cause resources being unreleased. Using now parms[i].mask as a way to determine if plane has to be included into commit. v4: Removed unneeded n_overlays initialization. v5: Randomize which of sprite planes to remove if hitting resource limits. v6: Replace igt_warn with igt_info, to make IGT tests happier. v7: Removed unneeded retry logic, made plane random removal simplier. Great thanks to Maarten Lankhorst for suggestions. v8: Fail if we have less than 3 planes v9: Remove unneeded diffs Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2019-04-11igt/tests/kms_atomic_transition: Skip transition, if no changes doneStanislav Lisovskiy
While fixing used amount of planes, discovered that if wm_setup_plane is called with specific parameter that gives parms[i].mask & mask == 0 for all used planes, then subsequent wait_transition fails in assertion on fd_completed. So added return value to wm_setup_plane, which would allow to determine, if we really need to wait for any transitions. v2: Fixed commit message, to properly describe a reasoning for wm_setup_plane changes. Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2019-04-11igt/tests: Remove redundant alpha retryStanislav Lisovskiy
Using igt_plane_has_format_mod allows to save time not doing redundant retry, knowing if plane supports alpha beforehand. v2: Remove unneeded assertion also. Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2019-04-10tests/kms_dp_dsc: Restore the value of force dsc enableManasi Navare
This patch saves off the original value of force_dsc_en and restores it back after each test and in the igt exit handler so that it gets restored on any failure/assertion. Suggested-by: Imre Deak <imre.deak@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Anusha Srivatsa <anusha.srivatsa@intel.com> Cc: Imre Deak <imre.deak@intel.com> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
2019-04-10tests/kms_dp_dsc: Force a full modeset when we force dsc enableManasi Navare
DSC enable gets configured during compute_config and needs a full modeset to force DSC. Sometimes in between the tests, if the initial output is same as the mode being set for DSC then it will not do a full modeset. So we disable the output before forcing a mode with DSC enable. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110270 Fixes: db19bccc1c22 ("test/kms_dp_dsc: Basic KMS test to validate VESA DSC on DP/eDP") Cc: Petri Latvala <petri.latvala@intel.com> Cc: Anusha Srivatsa <anusha.srivatsa@intel.com> Cc: Imre Deak <imre.deak@intel.com> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
2019-04-10tests/kms_flip: Do not request event for flips we expect to fail.Maarten Lankhorst
If we unexpectedly pass, we get a cryptic (kms_flip:935) CRITICAL: Test assertion failure function set_flag, file kms_flip.c:271: (kms_flip:935) CRITICAL: Failed assertion: !(*v & flag) (kms_flip:935) CRITICAL: Last errno: 25, Inappropriate ioctl for device Instead of a more descriptive assertion error, clear the request for event to fix this. This will change the error reported in bug #103257. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=103257 [mlankhorst: Replace igt_assert with igt_assert_eq based on ickle's suggestion] Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-04-10tests/kms_flip: Reduce runtime to 1s for busy-flip.Maarten Lankhorst
We don't actually care about running this for 30 seconds, all we care is that we get a -EBUSY if a flip is already queued. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-04-10tests/kms_flip: Make busy-flip test less strict.Maarten Lankhorst
Remove the -interruptible test, the test only tests that we get an -EBUSY after doing a pageflip. Doing this interruptibly adds the possibility the test will take too long from retrying. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-04-10tests/kms_dp_dsc: Cosmetic touch-upArkadiusz Hiler
Missing \n at the end of log message caused some hard to read logs. Cc: Martin Peres <martin.peres@linux.intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-10debugger: Remove shader debuggerArkadiusz Hiler
Compilation support was dropped in January 2019, since then it's just a dead code in the repo and no one seems to be missing it. Anyway, it can always be reintroduced from the chasms of git history. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2019-04-10tests/kms_plane_multiple: Run only on the first valid outputArkadiusz Hiler
There is no real need for testing on each output, as they do not affect CRC coming out from the pipe. Let's use first viable one. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-04-10lib: Reset errno to 0 after isattyArkadiusz Hiler
Since igt_assert family of functions logs last errno we get a lot of those: "Last errno: 25, Inappropriate ioctl for device" isatty() seems to be the biggest offender in that area, so this patch should limit amount of confusing messages significantly. Cc: Martin Peres <martin.peres@linux.intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-10tests/kms_color: Fix CRC mismatch issues with ctm testUma Shankar
Due to Gamma/Degamma limitation wrt representation of intermediate values between 0 and 1.0 causing rounding issues and inaccuracies, applying linear gamma affects crc. This patch fixes the same by making ctm max test independent of gamma/degamma. v2: Disable degamma/gamma programming for ctm max test as it leads to crc mimsmatch. Limiting it to this test case alone as other tests need it to be enabled, hence not touching those scenarios. v3: Fixed a fumble with compilation. v4: Disabling degamma and gamma for ctm max tests, after the logic in kernel has been updated by Ville's series. v5: Disabled gamma/degamma for all ctm tests as suggested by Ville. v6: Restricting disabling of linear gamma luts for ctm max test. Updated the commit message and comment as suggested by Daniel. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108147 Signed-off-by: Uma Shankar <uma.shankar@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-04-10igt: tests: kms_vblank: Stop using magic valueStanislav Lisovskiy
Lot of tests fail, when assertion checking how many vblanks should have passed during suspend/resume is compared to magic value 150. At the same time even for failed cases, sometimes it is clearly visible that there were no issue - simply suspend took longer on that machine. If suspend took around 10 s and we get roughly 60 vblanks per second the value then should be around 600 and not 150. This change removes 150 magic value and starts to use calculation of what it is expected to be instead of being hardcoded. v2: Add possible error delta interval, where expected vblanks must lie, i.e: [estimated_vblanks - err, estimated_vblanks + err] v3: Made an error range for estimated vblanks a bit less strict. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104894 Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-04-10lib/igt_fb: Create AMD YUV buffers with AMD GEM IOCTLNicholas Kazlauskas
The kmstest_dumb_create API isn't suitable for creating multi-planar buffers since it tries to calculate the size based on the first plane's pitch only. AMDGPU requires that the luma pitch be aligned to 256 for YUV buffers which results in crashes on kms_plane@pixel-format-pipe-*-planes tests when using kmstest_dumb_create since the buffer returned is smaller than needed (16384 size returned, 24576 size required). Create and map the buffer with the correct size by using the AMD helpers introduced by this patch: igt_amd_create_bo and igt_amd_mmap_bo. Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Leo Li <sunpeng.li@amd.com>
2019-04-10tests/kms_plane_scaling: Check supported pixel formatMika Kahola
Let's add a check for supported pixel format. Otherwise, we fail the test, for example, with the following error message "[drm:intel_framebuffer_init [i915]] unsupported pixel format Y210 little-endian (0x30313259) / modifier 0x100000000000003" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110369 Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-04-09i915/gem_exec_schedule: Trick semaphores into a GPU hangChris Wilson
If we have two tasks running on xcs0 and xcs1 independently, but who queue subsequent work onto rcs, we may insert semaphores before the rcs work and pick unwisely which task to run first. To maximise throughput, we want to run on rcs whichever task is ready first. Conversely, if we pick wrongly that can be used to trigger a GPU hang with unaware userspace. 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>
2019-04-09tests/i915/gem_fd_exhaustion.c: Remove unused sysfs functionsAntonio Argenziano
The test uses the new library helper so it doesn't need any local helper. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-04-09lib: Use nr_open not file-max for setting fd rlimitChris Wilson
Petri pointed out that the maximum allowed number of files per process is nr_open, not the system cap of file-max. Suggested-by: Petri Latvala <petri.latvala@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110351 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-08tests/kms_plane_scaling: Check supported format for rotationMika Kahola
Let's check if 90/270 rotation is supported for the format that we are trying to test. Currently, if we try to test unsupported format the kernel complains with the following message. "[drm:skl_plane_check [i915]] Unsupported pixel format Y210 little-endian (0x30313259) for 90/270!" v2: Use igt_plane_has_format_mod() function to select formats that are capable of 90/270 rotation (Ville) Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-04-05gem_exec_parallel: allow unlimited open filesLucas De Marchi
I was looking into a failure in which I had libkmod: ERROR ../libkmod/libkmod-config.c:790 conf_files_list: opendir(/etc/modprobe.d): Too many open files libkmod: ERROR ../libkmod/libkmod-config.c:790 conf_files_list: opendir(/lib/modprobe.d): Too many open files (gem_exec_parallel:1315) igt_kmod-WARNING: Could not load i915 (gem_exec_parallel:1315) igt_kmod-WARNING: Could not load i915 I got curious because libkmod doesn't open more than one config file at a time. What's happening is that libkmod is not the culprit, it's just the one that failed because we open /dev/dri/card0 -ETOOMANYTIMES. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-04-05lib: add igt_allow_unlimited_files()Lucas De Marchi
Share the implementation to tweak the maximum number of open files. The version in tests/i915/gem_exec_reuse.c was a little bit different, but I don't think it needs to be because it would still return a failure if any of the calls to setrlimit() fail. So I'm using the other one. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-04-05lib: ioctl_wrappers: reach engines by index as wellAndi Shyti
With the new engine query method engines are reachable through an index and context they are combined with. The 'gem_has_ring()' becomes 'gem_context_has_engine()' that requires the index that the engine is mapped within the driver. The function has been moved from lib/ioctl_wappers to lib/i915/gem_context where it is more appropriate. The previous 'gem_has_ring()' function becomes a wrapper to the new 'gem_context_has_engine()'. Signed-off-by: Andi Shyti <andi.shyti@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-04-05lib/igt_gt: remove unnecessary argumentAndi Shyti
__for_each_engine_class_instance(fd, e) doesn't need and doesn't use the fd argument. Remove it. Signed-off-by: Andi Shyti <andi.shyti@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-04-05lib/igt_kms: Be more verbose about failure in kmstest_wait_for_pageflipArkadiusz Hiler
First, we set errno to 0 before doing select() to avoid random pollution of the assert message with things like: "Last errno: 25, Inappropriate ioctl for device" Second, we log explicitly if we exceeded the timeout (ret == 0). Third, if we fail the select() we log that with some explanation. Cc: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-04i915/pm_backlight: Do not turn off DPMS before system suspendHarish Chegondi
backlight fade with suspend test turns off dpms which turns off the edp backlight. Then it does a system suspend and resume. After resume, the edp backlight would still be off, but the test sets the brightness value and reads it back. Since the edp backlight is off, the brightness values written and read are different causing the test to fail. Do not turn off the DPMS before suspend so that after system resume, the edp backlight would be on and setting the brightness value would be successful. v2: Remove "DPMS off" before system suspend instead of adding "DPMS on" after system resume. Cc: Jyoti Yadav <jyoti.r.yadav@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Clinton Taylor <clinton.a.taylor@intel.com> Signed-off-by: Harish Chegondi <harish.chegondi@intel.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=107820 Fixes: 377752242995 ("Brightness test with DPMS and System suspend.") Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2019-04-04i915/gem_exec_big: Only warn for the first sign of a pagefaultChris Wilson
We only need the warning once, not for the several thousand relocations we try. The current execbuf implementation will set all presumed_offset to -1 so this loop should quit on the first entry if we hit the pagefault, but for the sake of completeness check all. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110269 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-04-04lib/rendercopy: Assert that buffer dimensions/stride are acceptableVille Syrjälä
Sprinkle some asserts into rendercopy to make sure we don't try to exceed the render engine surface size/stride limitations. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-04-04prime_vgem: Downgrade the severity of a single missed vblank on flippingChris Wilson
Not displaying the flip on the next vblank is bad, but not the end of the world -- so long as that is only a temporary glitch. Give the vblank a few more frames to complete, and warn instead of failing if it takes more than one vblank interval to flip. v2: Bump the warning to >1 missed flip, to spare us the noise. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-04-04lib/igt_kms: Clear pipe color management properties on reset.Maarten Lankhorst
Just like we try to sanitize all properties in igt_plane_reset, we should do the same for pipe properties. Loading a wrong lut could affect passing and failing tests, so we need to be careful and set sane defaults for everything. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2019-04-03tests: Remove i915_missed_irqJosé Roberto de Souza
i915_ring_missed_irq was removed from debugfs in kernel patch 789659f4307a ("drm/i915: Drop fake breadcrumb irq") and it was the base of which i915_missed_irq was written, so removing this test for good. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-04-03tests/frontbuffer_tracking: Assert the status of other features on ↵José Roberto de Souza
stridechange subtest As explained in c1edee186d18 ("tests/frontbuffer_tracking: Do not assert FBC state after a page flip changing stride") after changing the plane stride there is the possibility that CFB will not be big enough to keep FBC enabled, that is why do_assertions() is called with DONT_ASSERT_FEATURE_STATUS but DONT_ASSERT_FEATURE_STATUS is overkill and will not check the status of the other features like PSR and DRRS when running combined feature tests and possibly hiding bugs. So lets add a new flag that will only not assert FBC. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
2019-04-03tests/frontbuffer_tracking: Do not assert FBC state after a page flip ↵José Roberto de Souza
changing stride When the stridechange subtest was introduced f23ea58f1fbb ("kms_frontbuffer_tracking: expand badstride and stridechange") atomic was not around and change the stride using drmModePageFlip() was not allowed so it was expected that it would return -EINVAL and kernel would keep the old framebuffer with the smaller plane that is know to fit on CFB(if it don't fit the test will skip on the first full-modeset because "not enough stolen memory" is set). But after the introduction of atomic the subtest was updated by f63e070b469d ("kms_frontbuffer_tracking: Fix tests with the new atomic reality.") to accept a no error return from drmModePageFlip() but the do_assertions() that follows it was not updated. As the subtest function comment states, kernel will do fastsets in this scenario and the allocated CFB could not be enough to keep FBC enabled over the new framebuffer, so here adding the missing DONT_ASSERT_FEATURE_STATUS to ignore the FBC state and just test if CRC match and if kernel do not misbehave. Other way to solve this issue would be make the kernel do a full-modeset when CFB is not enough for the new plane so FBC is disabled with the CRC freeing the actual CFB and then after enable CRTC again it will try to enable FBC again if it can allocate the required CFB but by the subtest comment this is not intended. v2: Assert features when drmModePageFlip() fails aka non-atomic driver(Dhinakaran) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105683 Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>