summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-11runner: Fix handling of metadata values containing spacesLyude Paul
Noticed while running some tests that adding any kind of spaces into the name of a test run would stop igt_resume from working for said test run. Turns out that when we parse test metadata, we accidentally use the '%ms' specifier with fscanf() which finishes parsing strings when any kind of whitespace is encountered. So, fix this by using the proper %m[^\n] specifier, which dynamically allocates it's result and doesn't stop reading the string until a newline is encountered. Additionally, add a test for this. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2020-06-11tools/intel_gpu_top: Fix _open_pmu()Ayaz A Siddiqui
_open_pmu() was calling perf_igfx_open_group() which in turn was calling igt_perf_type_id("i915") each time. By making _open_pmu() take type as a parameter and call igt_perf_open_group() we achieve two things: * we use the correct type for engines->device instead of the hardcoded "i915" * optimization - we call igt_perf_type_id() once - it's reading sysfs Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-06-10lib/drmtest: Don't write ffffffff to a numeric paramPetri Latvala
__cancel_work_at_exit writes -1 to param "reset", with the intention that it's "any available method". Hex values to numeric params should be prefixed with 0x to be parsed as a number. Use the convention of %u with -1 as is used elsewhere with the "reset" param. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-06-10runner/resultgen: Explain why json creation might have failedArkadiusz Hiler
Sometimes creating the string representation fails. This usually happens when we have a huge logs (e.g.: something was spamming the dmesg) or the result generation was run on a very low-end system (e.g. embedded board with 256 megs of RAM). Sadly json-c call returns us NULL and provides no explanation whatsoever. Let's fix a NULL pointer dereference in such cases and print a mesage that should help people make sense out of what have just happened. Cc: Swati Sharma <swati2.sharma@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>
2020-06-10kms_atomic_transition: Avoid duplicate dynamic subtest namesPetri Latvala
In commit b943d64f95bc ("kms_atomic_transition: Make the available pipe discovery dynamic") the subtests of kms_atomic_transition were split into dynamic subtests. What avoided scrutiny however was that the looping uses for_each_pipe_with_valid_output, which gives you every valid pipe/output combo, so just using the pipe name as the dynamic subtest name causes duplicates, resulting in weird CI results. As the nature of the original test was a stress test for watermarks, keep the full combo rather than switching to for_each_pipe_with_single_output, but use the output name as well in the dynamic subtest name. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-06-09kms_cursor_legacy: Keep primary plane enabled for XRGB overlay fallbackMichel Dänzer
This allows the test to work on setups where the primary plane cannot be disabled while the CRTC is enabled. It should make no difference for the output. Signed-off-by: Michel Dänzer <mdaenzer@redhat.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2020-06-08python: Stop using cElementTreeArkadiusz Hiler
It got removed in Python 3.9 and ever since Python 3.3 it's: from xml.etree.ElementTree import * Link: https://docs.python.org/3.9/whatsnew/3.9.html#removed Issue: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/86#note_520308 Cc: Petri Latvala <petri.latvala@intel.com> Cc: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2020-06-08tools/intel_gpu_top: Add support of discrete GPU and card selectionAyaz A Siddiqui
In intel_gpu_top device path was hard coded for integrated GPU. With this patch we: * use igt_device_scan library for device scanning, * make discrete GPU the default one, * provided options for card selection. v2: * explicitly set ret to EXIT_SUCCESS after all the other uses * fix use after free of opt_device (Tvrtko) * use EXIT_FAILURE instead of "1" (Tvrtko) Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-06-08lib/igt_device_scan: Add extra helpers for intel_gpu_topAyaz A Siddiqui
Will be used in the next patch. 1. set_pci_slot_name(): stores PCI_SLOT_NAME from prop to device 2. igt_device_find_first_discrete_card(): try to find first discrete GPU 3. igt_devices_free(): Free device buffers created during scan Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2020-06-08lib/igt_device_scan: Make igt_device_scan independent from igt_coreAyaz A Siddiqui
igt_device_scan can now be used as a separate library which only depends glib and libudev - some IGT internals are being stubbed in this case. v2: (mostly) sort includes (Lucas) Cc: Lucas De Marchi <lucas.de.marchi@gmail.com> Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2020-06-08lib/igt_device_scan: Add missing Check for return value in scan_drm_devicesAyaz A Siddiqui
Return value of udev_enumerate_add_match_property() was not being checked in scan_drm_devices(). Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-06-07i915/gem_ctx_exec: Bump timeout for preempt-resetChris Wilson
Since preempt-reset is 640ms we have to wait at least that long to recover from a hostile client. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-06-06i915/i915_pm_sseu: remove libdrm dependencyZbigniew Kempczyński
Remove all "localized" functions in media spin and libdrm usage in the test. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-06-06lib/intel_batchbuffer: add bb resetZbigniew Kempczyński
For some scenarios we want to keep previous objects and their offsets and recreate only batchbuffer object. To allow user do that add bb reset function which can or not purge collected objects from previous run. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-06-06lib/intel_bufops: add fields for keeping offset and contextZbigniew Kempczyński
To avoid relocations when intel_buf is used we need to keep previous offset and context. Add addr structure with offset and ctx fields. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-06-04tests/kms_chamelium: Force reprobe after replugging the connectorImre Deak
After replugging a connector and the kernel reports the connector as connected the cached modes returned by drmModeGetConnectorCurrent() (the kernel's cached list of modes) may be stale. The modes will be only updated by a full reprobe. Ensure this by setting output->force_reprobe which will result in calling drmModeGetConnector(). This fixes sporadic test failures due to seeing no modes unexpectedly. So far things happened to work, because some in-kernel user of the output - like fbdev - does a full reprobe sometime after the hotplug event. Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-06-04lib/igt_core: Don't kill the world after a failed forkArkadiusz Hiler
If we fail to fork (e.g. due to restrictive limits) -1 gets written as PID of our child and we assert out. The cleanup that happens afterwards tries to kill all our children, which ends up in kill(-1, SIGKILL) which is not good. This patch makes sure of two things: * -1 doesn't get written down as our child * when we are killing children we make sure that pid > 0 Reported-by: Fei Yang <fei.yang@intel.com> Cc: Michael Hebenstreit <michael.hebenstreit@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Tested-by: Michael Hebenstreit <michael.hebenstreit@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2020-06-03i915: purge i915_gem_create_v2Matthew Auld
The gem_create_v2 uapi was never merged, which would have been a nice addition to allow userspace to utilise stolen memory. Since it can only get in the way at this point, let's just remove it. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-06-03i915/gem_exec_balancer: Avoid preparser woesChris Wilson
Disable the pre-parser on Tigerlake as we are dynamically rewriting the batches and so need to disable the parser cache. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-06-03runner: Adapt to device-based DRM logging changesPetri Latvala
DRM logging in the kernel has switched to device based logging, changing the pattern of logging from [drm:function_name] Message to i915 0000:00:02.0: [drm] Message Change the pattern we use with --piglit-style-dmesg to match the new style logging, catching all warnings that contain [drm]. We're no longer result-wise exactly piglit compatible but then again that ship sailed long time ago with the change of introducing dmesg-level parameter. Piglit compatibility result-wise is not a goal regardless. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2020-06-02tests/kms_psr2_su: Print debugfs when skipping testJosé Roberto de Souza
This tests is being sporadically skipped in CI as it is not due "PSR sink not reliable: yes" lets print the i915_edp_psr_status to find out the reason. This can be reverted afterwards. Reference: https://gitlab.freedesktop.org/drm/intel/-/issues/1911 Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com> Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2020-06-02tests/kms_psr2_su: Read su blocks of frame 1 if frame 0 is 0José Roberto de Souza
Not sure why but in recent kernels + IGT when PSR status debugfs is read the frame already passed, so the su blocks is set in frame 1 and causing the test to fail for page flips. So here reading from frame 1 if frame 0 has 0 blocks, as this test always changes screen with the same number of su blocks it is not a issue. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/608 Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com> Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2020-06-01tests/kms_fbcon_fbt: When restoring fbcon always set mode to text modeJosé Roberto de Souza
If by some reason or tests, this tests is executed and VT mode is already in KD_GRAPHICS the call to kmstest_set_vt_graphics_mode() will set orig_vt_mode as KD_GRAPHICS and when it was calling kmstest_restore_vt_mode() it would set KD_GRAPHICS again not returning to fbcon and causing the test to fail. As it can be seen here: (kms_fbcon_fbt:11004) igt_kms-DEBUG: VT: graphics mode set (mode was 0x1)" https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_499/fi-ehl-1/igt@kms_fbcon_fbt@fbc.html So here adding a new function to alaways set mode the KD_TEXT when we want to restore to fbcon. Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2020-06-01tests/gem_(gpgpu|media)_fill: remove the _v2 suffixZbigniew Kempczyński
Remove libdrm functions and replace them with new ones after removing _v2 suffix introduced for transition state. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-06-01lib/media_spin: localize pipeline functionsZbigniew Kempczyński
To allow remove "_v2" suffix in functions add this not-fully-clean step and localize names. Some additional requirement is needed to fulfill its needs (passing batchbuffer from the caller side). Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-06-01lib/kms_chamelium: Wait for the sink to reconnect after an FSM DPMS-offImre Deak
After Chamelium does an FSM signaling by deasserting its HPD, in response to which the test's FSM handler disables the output with a DPMS-off, we have to make sure that Chamelium has reasserted its HPD before we re-enable the output with DPMS-on (for instance to avoid link training errors, or enable the output in the wrong TypeC mode). To ensure this wait for the connector state to become asserted. On TypeC connectors with an enabled mode the IOM firmware will signal a connected state (via a connect hotplug interrupt delivered to the driver) in a deferred way only after the mode is disabled. So wait for the connected state after DPMS-off. Reported-and-tested-by: Kunal Joshi <kunal1.joshi@intel.com> Cc: Hiler Arkadiusz <arkadiusz.hiler@intel.com> Cc: Kunal Joshi <kunal1.joshi@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-06-01i915/gem_exec_schedule: Check for store-dw support before useChris Wilson
Be careful and check the engine support store-dw as we are using __igt_spin_new() which skips the requirement checks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-06-01i915/gem_eio: Drop stale check for have semaphoresChris Wilson
The test works fine if the scheduler has semaphores, strangely only being skipped for old devices adding semaphore support. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-06-01i915/gem_ctx_shared: Check for queue support before testing themChris Wilson
Can't test queues, if we don't have queues. The queue ordering tests checked for scheduler support, assuming that would mean we had full-ppgtt. Check for queues in case we solve the scheduler problem on gen6/gen7. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-06-01i915/gem_exec_balancer: Add a delayed variant to bonded-runnerChris Wilson
Add a pass that imposes a delay between submitting the master and its bonded pair. This should make it more likely that another thread is able to submit in the interval. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-05-31i915/gem_exec_balancer: Cleanup skipped bonded-sync phasesChris Wilson
Since we create a few GPU objects in the locals, if we decided to skip this bonded-sync phase, we need to jump to the cleanup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-05-31i915/gem_exec_balancer: Exercise inter-locked synchronous bondsChris Wilson
Add another bonded-runner variant for a pair of inter-locked non-preemptible waiters (each batch waits to be cancelled by the other), as we are trying to replicate the HW feature where a bonded pair is locked on HW and cannot be preempted until all members of the bond have executed (i.e. all must execute in lockstep). The key difference with this variant is that both halves contain a non-preemptible spin until the other half has executed. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-05-29i915/gem_exec_balancer: Randomise bonded submissionChris Wilson
Randomly submit a paired spinner and its cancellation as a bonded (submit fence) pair. Apply congestion to the engine with more bonded pairs to see if the execution order fails. If we prevent a cancellation from running, then the spinner will remain spinning forever. v2: Test both immediate submission and fenced submission v3: Copy-n-paste a single context variant 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>
2020-05-28kms_busy: Measure the warmup and use that as our timeoutChris Wilson
For determining whether or not we flip too fast, we don't have to wait long, just long enough. A ballpark measure of how long is reasonable is given by how fast we perform the warmup, as that is 3 flips/modesets. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-28i915/gem_exec_fence: Reduce non-preemptible workloadDominik Grzegorzek
Non-preemptible spinners should be avoided as often as possible. gem_exec_fence@[basic-await, nb-await] has no reason to use non-preemptible workload, only hanging subtests need it. Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-05-28i915/gem_ctx_engines: Take GPU relocations into account for batch busynessChris Wilson
If we are using GPU relocations, then the batch may legitimately be marked as having been written to by the GPU. As this is expected, remove the write marker, which may be a different engine to that we execute on, and the corresponding read engine if different. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-27kms_busy: Fix unpluging and remember to unplug!Chris Wilson
Actually remember to unplug to the busy buffer after waiting for the flip to complete early. Otherwise we wait for the hangcheck to kick in, which while effective at testing the flip recovery for hanging buffers is not the intent of the test and wastes 40s in BAT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-26lib/i915: Restore hangcheck modparams between testsChris Wilson
The hangcheck/reset modparam has far reaching effects and disables functionality if switch off. This can surprise a few tests causing them to skip. References: https://gitlab.freedesktop.org/drm/intel/-/issues/1929 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-26i915/gem_exec_schedule: Fix measurement of ring size to use right engineChris Wilson
gem_ring_measure_inflight() uses the legacy ring idx, whereas gem_exec_schedule is using the new dynamic ctx->engine[] indices. Mismatch and hanging tests ensue. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-26i915/gem_exec_schedule: Reduce relocation risk for store-dwordChris Wilson
The cmd-parser causes a disturbance in our priority scheme. It uses a CPU worker that does not inherit the context priority and so may use a simple FIFO that causes the requests to be ready (and so executed) in parser order rather than our expected inherited priority order. If we do not need to wait for relocations, the cmdparser is run inline, i.e. before the test unleashes the fence holding the requests back. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-26lib: Randomise spinner location to reduce relocation riskChris Wilson
Randomise the position of the spinner to reduce the number of relocations we might require. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-26i915/gem_busy: Mask out the effect of GPU relocationsChris Wilson
If we use GPU relocations, then we will mark the batch as being written to by the GPU. This can be any engine, and so may perturb the reported busyness. Take this into account before reporting an error. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-26i915/perf_pmu: Update inter-engine semaphore detectionChris Wilson
The kernel no longer uses semaphores between engines, unless it can do so by preempting them with timeslices. Update the semaphore-busy to only run when we expect semaphore usage, i.e. not on bdw/bsw. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1939 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-05-26lib/media_fill: Migrate gen11 media pipeline creation to intel_bbZbigniew Kempczyński
Function is now libdrm-free, but mixes calls to replaced and "_v2" versions. This cleanup and old code removal will be addressed in the another commit. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-05-26lib/gpu_cmds: Change gpu commands to use intel_bbZbigniew Kempczyński
As gem_media_vme uses mostly gen11 there's no need to add _v2 version and migrate from intel_batchbuffer to intel_bb to remove libdrm dependency. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-05-25i915/gem_exec_reloc: Exercise concurrent relocationsChris Wilson
While we may chide userspace if they try to use the same batches from multiple threads (the order of operations is undetermined), we do try to ensure that each ioctl appears to be atomic from the perspective of userspace. In particular, relocations within execbuf are expected to be consistent for the executing batch. That is we want the relocations applied by this execbuf to be visible for the associated batch, and we especially do not want to execute the batch with conflicting relocations from another thread. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-05-25tests/kms_flip: Don't use igt_fixture in an exit handlerPetri Latvala
kms_flip's exit handler was wrapped in an igt_fixture some 7 years ago because "it can fail". That's not a problem anymore, as igt_fail() will explicitly handle failing in an exit handler. Rather, using igt_fixture in an exit handler is harmful because on a subtest failure, we don't always keep track of the currently running context (whether we're inside a subtest anymore) and we forcefully assert correct nesting of IGT magic control blocks now. We already know the state is cleanable because we only install the handler on a successful init. Unconditional cleanup in an exit handler is the correct thing to do in general. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-05-22i915/sysfs_heartbeat_interval: Watch out for CPU scheduler delaysChris Wilson
If our CPU client is very slow to notice that the GPU spinner has started, we may consume the full heartbeat interval without noticing. This is bad if we are trying to test that a client that yield within the heartbeat interval is not selected for termination. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1879 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-22i915: Add gem_exec_endlessChris Wilson
Start our preparations for guaranteeing endless execution. First, we just want to estimate the direct userspace dispatch overhead of running an endless chain of batch buffers. The legacy binding process here will be replaced by async VM_BIND, but for the moment this suffices to construct the GTT as required for arbitrary indirect execution. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-05-22i915/gem_exec_balancer: Enforce the hang timeoutChris Wilson
Set NO_PREEMPTION on the rcs0 hanger so that we are guaranteed (hopefully, if nothing else breaks!) to timeout. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>