summaryrefslogtreecommitdiff
path: root/tests/i915/gem_exec_balancer.c
AgeCommit message (Collapse)Author
2022-06-15i915/gem_exec_balancer: fix parallel_ordering with no-relocNirmoy Das
Make sure to allocate ahnd so that spinner starts with no-reloc execbuf otherwise this will fail on platforms with relocation disabled. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6117 Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
2022-06-09i915/gem_exec_balancer: Fix execution of parallel-submit on dg2+Chris Wilson
From dg2, there are multiple compute engines which conflict with the parallel-submit restriction; check for the illegal engine class prior to running the test. And from dg2, MI_ATOMIC is only valid for use with system memory for INC, DEC and MOV operation, not the ADD used in the test workload. Replace the ADD+1 with an INC, so that the same workload runs on all platforms. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6157 Signed-off-by: Chris Wilson <chris.p.wilson@intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
2022-02-28lib/igt_dummyload: Drop ahnd from igt_spin_tAshutosh Dixit
In 4d9396e67930 we have started storing the opts with which the spin was created as part of igt_spin_t. The ahnd stored as part of igt_spin_t is therefore redundant. We can get ahnd from opts.ahnd. Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com> Cc: Jasmine Newsome <jasmine.newsome@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2021-12-15tests/i915/gem_exec_balancer: bonding support check in invalid-balancerTejas Upadhyay
Bonding is disabled on GEN12+ platforms, except ones already supported by the i915 - TGL, RKL, and ADL-S. Currently few tests are failing for same reason, with this change they should rightly skip with proper message. Reference: https://cgit.freedesktop.org/drm-tip/commit/?id=ce7e75c7ef1bf8ea3d947da8c674d2f40fd7d734 Changes since V3 : - Initalization of bonding boolean not required - zbigniew Changes since V2 : - Solved checkpatch errors. Changes since V1 : - use function to check bonding capability so that we dont skip whole test in case bonding not supported. Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
2021-12-10tests/i915/exec_balancer: Added Skip Guc SubmissionMastan Katragadda
This test makes assumptions about the backend scheduling algorithm that a real world UMD would never assume. This test is not testing a UMD-KMD contract, rather a specific backend.It is an invalid test case thus we are skipping. Changes Since v1: -Updated commit message Cc: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Mastan Katragadda <mastanx.katragadda@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
2021-11-11i915/gem_exec_balancer: Test parallel execbufMatthew Brost
Add basic parallel execbuf submission test which more or less just submits the same BB in loop a which does an atomic increment to a memory location. The memory location is checked at the end for the correct value. Different sections use various IOCTL options (e.g. fences, location of BBs, etc...). In addition to above sections, an additional section ensure the ordering of parallel submission by submitting a spinning batch to 1 individual engine, submit a parallel execbuf to all engines instances within the class, verify none on parallel execbuf make to hardware, release spinner, and finally verify everything has completed. The parallel-ordering section assumes default timeslice / preemption timeout values. If these values are changed the test may fail. v2: (Daniele) - Add assert to ensure parallel & load_balance both not set in ctx lib - s/count/expected/g in check_bo() - use existing query library functions - clean up bb_per_execbuf / count usage - drop dead loop - add comment for parallel-ordering - don't declare loop variables inside loop v3: (Daniele) - Read timeslice from sysfs v4: (Daniele) - Add comment in timeslice sysfs function Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
2021-08-20tests/i915/exec_balancer: Added Skip invalid-bondsMastan Katragadda
Added skip which ever gen12+ platforms not supporting bonding. Disable bonding on gen12+ platforms aside from ones already supported by the i915 - TGL, RKL, and ADL-S. Link: https://cgit.freedesktop.org/drm-tip/commit/?id=ce7e75c7ef1bf8ea3d947da8c674d2f40fd7d73 Changes since V1: - Updated skip assertion logic (Ashutosh) Signed-off-by: Mastan Katragadda <mastanx.katragadda@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-08-13tests/gem_exec_balancer: Adopt to use allocatorZbigniew Kempczyński
For newer gens we're not able to rely on relocations. Adopt to use offsets acquired from the allocator. v2: use load instead of ctx in bonded test (Ashutosh) v3: fixing bonded-chain and sliced subtest (Zbigniew) Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-07-16i915: Improve the precision of command parser checksJason Ekstrand
The previous gem_has_cmdparser helper took an engine and did nothing with it. We delete the engine parameter and use the general helper for the ALL_ENGINES cases. For cases where we really do care about something more precise, we add a version which takes an intel_ctx_cfg_t and an engine specifier and is able to say whether or not that particular engine has the command parser enabled. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Cc: Lakshminarayana Vudum <lakshminarayana.vudum@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2021-07-08tests/i915/exec_balancer: Drop the bonded-slice testJason Ekstrand
This explicitly tests that you can use a submit fence to make something run on a virtual engine in parallel with a physical engine, assuming that i915 will magically sort things out so that they don't land on the same engine. We're removing this magic from i915 so this test is no longer valid. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2021-07-08tests/i915/gem_exec_balancer: Add a test for combined balancing and bonding (v2)Jason Ekstrand
v2 (Jason Ekstrand): - Use __set_param_fresh_context Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-07-08tests/i915/gem_exec_balancer: Fix invalid-balancer and invalid-bonds for the ↵Jason Ekstrand
set-once rule (v2) Upstream i915 is going to start only allowing CONTEXT_PARAM_ENGINES to be set once on any given context. This means we need to create a new context for every setparam in the test. v2 (Jason Ekstrand): - Also fix invalid-bonds Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-07-08lib/i915: Rework engine API availability checks (v4)Jason Ekstrand
Instead of relying on the context param, check for the device query or attempt to set engines as a create param. v2 (Jason Ekstrand): - Add a common gem_has_context_engines helper v3 (Jason Ekstrand): - Drop gem_has_context_engines and always check I915_QUERY_ENGINE_INFO v4 (Ashutosh Dixit): - Add a comment to the gem_has_engine_topology docs saying that it can be used to query either feature. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-07-08tests/i915/gem_exec_balancer: Convert to intel_ctx_tJason Ekstrand
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-07-08tests/i915/gem_exec_balancer: Drop bonded testsJason Ekstrand
Support for combining bonding and balancing is being removed from i915 because it's not used by media. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-07-08tests/i915/gem_exec_balancer: Stop munging ctx0 enginesJason Ekstrand
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-07-08tests/i915/gem_exec_balancer: Don't reset engines on a context (v2)Jason Ekstrand
Instead of resetting the set of engines to break implicit dependencies, just use a new context. Everything interesting gets swapped out when we set CONTEXT_PARAM_ENGINES so this is equivalent as long as SINGLE_TIMELINE isn't used. If SINGLE_TIMELINE is used then the timeline is associated with the context and that gets lost when we set CONTEXT_PARAM_ENGINES. The only test where this flag is used is the bonded tests but those wait for the GPU to idle between iterations so replacing the timeline is a no-op. v2 (Jason Ekstrand): - Improve comments and commit message Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-07-08tests/i915/gem_exec_balancer: Stop cloning enginesJason Ekstrand
We have the list of engines and bonding info in each case. It's easy enough to create a context instead of clone. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-06-10lib/dummyload: Rename igt_spin_factory::ctx to ctx_idJason Ekstrand
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2021-06-09tests/i915/gem_exec_balancer: Drop the ringsize subtestJason Ekstrand
I915_CONTEXT_PARAM_RINGSIZE is being removed from upstream i915 because it's never been used by any userspace other than IGT. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2021-05-27lib/i915/gem_create: Add gem_create_extAndrzej Turko
Add a wrapper for gem_create_ext ioctl (a version of gem_create that accepts extensions). In preparation for the driver change implementing it, a local definition of its id and necessary structs have been added, which are to be erased as soon as those definitions appear in the i915_drm.h file. The new ioctl wrapper is added to a separate file. For consistency the wrapper of the old ioctl, gem_create is moved from ioctl_wrappers to gem_create. Signed-off-by: Andrzej Turko <andrzej.turko@linux.intel.com> Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Chris P Wilson <chris.p.wilson@intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2020-12-30i915: Drop gem_cs_prefetchChris Wilson
Covered with more accuracy with selftests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-12-30i915/gem_exec_balancer: Exercise non-persistent behavioursChris Wilson
Verify that the virtual engine is destroyed when the context is lost if persistence is disabled either on the context or system-wide. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-12-29i915/gem_exec_balancer: Exercise sequential ping-pongsChris Wilson
A simple paired workload consisting of sequential nops from one context to the next. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-12-29i915/gem_exec_balancer: Exercise variable ring sizeChris Wilson
Verify that changing the ring size of the virtual engine affects the number of requests that can be queued before blocking. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-12-14i915/gem_exec_balancer: Tighter fairness thresholdChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-12-14i915/gem_exec_balancer: Measure timeslicing fairnessChris Wilson
Oversaturate the virtual engines on the system and check that each workload receives a fair share of the available GPU time. v2: Apply a modicum of statistical integrity. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-07-26i915/gem_exec_balancer: Beware being stuck on a full ringChris Wilson
As we submit a set of semaphores that wait upon us, we have to avoid overfilling the ring. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-07-17i915/gem_exec_balancer: Race breadcrumb signaling against timeslicingChris Wilson
This is an attempt to chase down some preempt-to-busy races with breadcrumb signaling on the virtual engines. By using more semaphore spinners than available engines, we encourage very short timeslices, and we make each batch of random duration to try and coincide the end of a batch with the context being scheduled out. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
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-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-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>
2020-05-21i915/gem_exec_balancer: Exercise stalls of bonded pairsChris Wilson
Broadwell doesn't allow preemption and so a request must complete within a hangcheck period or be declared hung. A bonded request may be submitted before it's master is ready to run, and if preemption is disabled there is a danger that wait may be charged against the bond, rather than the culprit that is causing the master to hang. This test tries to stall the master by blocking it with a high priority spinner (or a queue of them) and verifies that we do not accidentally reset the bonds. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-05-19i915/gem_exec_balancer: Exercise timeslicing around a hogChris Wilson
If a hog steals an engine after we are already using it for a virtual engine, it is preferrable to reschedule the virtual engine on another to run in parallel to (and complete before) the hog. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-05-19i915/gem_exec_balancer: Force timeslicing of the virtual requestChris Wilson
Investigate the impact of timeslicing on the virtal request, both with independent and dependent workloads. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-05-07lib/i915: Split igt_require_gem() into i915/Chris Wilson
igt_require_gem() is a pecularity of i915/, move it out of the core. Similar opportunistic move of gem_reopen_driver() and gem_quiescent_gpu(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-04-30i915/gem_exec_balancer: Queue all hangs togetherChris Wilson
Just in case we detect the invalid CS before we are all setup in the test to check for the expected results, use a fence to submit all the hanging spinners together. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1277 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-05i915/gem_exec_balance: Ignore the fluctuating shard-icl setupChris Wilson
Since shard-icl is split between vcs1 have and have-nots, CI reports that gem_exec_balance fluctuates between skip and pass. This noise is annoying, so keep quiet. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-04-01i915/gem_exec_balancer: Check for bonding support before exercisingChris Wilson
Don't bother trying and failing to test bonding if the kernel doesn't even support it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Andi Shyti <andi.shyti@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-03-05i915/gem_exec_balancer: Exercise bonded-payload synchronisationChris Wilson
Our goal with bonded submission is to submit the pair of user batches to the HW at roughly the same time, and so try to avoid any bubbles. If we submit the secondary batch too early, it will be running before the first and stuck on the HW preventing others from utilising the GPU. At worst, it may even appear unresponsive and trigger a GPU hang as it waits for its master. If we submit the secondary too late, the reverse situation may apply to the master as it has to wait for the secondaries. This test tries to verify that using a submit-fence to create a bonded pair does not prevent others from using the HW. By using a pair of spinners, we can create a bonded hog that when set in motion will fully utilize both engines [if the scheduling is incorrect]. We then use a third party submitted after the bonded pair to cancel the spinner from the GPU -- if it is unable to run, the spinner is never cancelled, and the bonded pair will cause a GPU hang. 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-03-02i915/gem_exec_balancer: Relax spinner checks around INVALID_CSChris Wilson
If we submit a second spinner along the same virtual engine as an INVALID_CS spinner, it may be terminated before we can check it is still alive. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-02-29i915/gem_exec_balancer: Bump priority of background load for hang detectionChris Wilson
If we ensure that the background load has elevated priority, it will kick off the preempt-timeout hang detection, ensuring that our hang detection is fast. Closes: https://gitlab.freedesktop.org/drm/intel/issues/1277 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-02-17i915/gem_exec_balancer: Impose a timeout for hang completionChris Wilson
Expect the hang to be detected and cleaned up within a short period (thanks to the error interrupt) and then we can reasonably quickly determine if the cleanup failed! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Matthew Auld <matthew.auld@intel.com>
2020-02-12tests/i915/gem_exec_balancer: Skip the test if no perf engines are availableAntonio Argenziano
Require that the test can access perf engines files. This patch also fixes the error check for perf_i915_open(). v2: - Skip based on valid perf type ID. (Chris) Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-01-28i915/gem_exec_balancer: Convert to use gem_mmap__device_coherent()Chris Wilson
Replace gem_mmap_gtt and write-once mmaps with gem_mmap__device_coherent. For use as an invalid pointer, we need only worry about having an mmap_offset (gtt or wc) as they work alike inside the kernel with respect to locking. (GTT has the extra vm->mutex, but if there's no aperture, there's never going to be such a mutex to worry about!) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-01-28i915: Inject invalid CS into hanging spinnersChris Wilson
Some spinners are used with the intent of never ending and being declared hung by the kernel. In some cases, these are being used to simulate invalid payloads and so we can use an invalid command to trigger a GPU hang. (Other cases, they are simulating infinite workloads that truly never end, but we still need to be able to curtail to provide multi-tasking). This patch adds IGT_SPIN_INVALID_CS to request the injection of 0xdeadbeef into the command stream that should trigger a GPU hang. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-01-14i915/perf: Find the associated perf-type for a particular deviceChris Wilson
Since with multiple devices, we may have multiple different perf_pmu each with their own type, we want to find the right one for the job. The tests are run with a specific fd, from which we can extract the appropriate bus-id and find the associated perf-type. The performance monitoring tools are a little more general and not yet ready to probe all device or bind to one in particular, so we just assume the default igfx for the time being. v2: Extract the bus address from out of sysfs v3: A new name for a new decade! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: "Robert M. Fosha" <robert.m.fosha@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: "Robert M. Fosha" <robert.m.fosha@intel.com> #v2 Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>