[igt-dev] [i-g-t 2/2] i915/gem_exec_schedule: Check for timeslicing
Tejas Upadhyay
tejaskumarx.surendrakumar.upadhyay at intel.com
Mon May 24 12:48:06 UTC 2021
Userspace semaphores (with arbitrary deadlock as soon by this test)
can only be handled if the kernel supports timeslicing. Now that we
explicitly report timeslicing capabilities, check for that cap.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay at intel.com>
---
tests/i915/gem_exec_schedule.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 9585059d..11ce94da 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -504,8 +504,7 @@ static void timeslice(int i915, unsigned int engine)
* switch to the other batch in order to advance.
*/
- igt_require(gem_scheduler_has_semaphores(i915));
- igt_require(gem_scheduler_has_preemption(i915));
+ igt_require(gem_scheduler_has_timeslicing(i915));
igt_require(intel_gen(intel_get_drm_devid(i915)) >= 8);
obj.handle = timeslicing_batches(i915, &offset);
@@ -601,8 +600,7 @@ static void timesliceN(int i915, unsigned int engine, int count)
* switch to the other batch in order to advance.
*/
- igt_require(gem_scheduler_has_semaphores(i915));
- igt_require(gem_scheduler_has_preemption(i915));
+ igt_require(gem_scheduler_has_timeslicing(i915));
igt_require(intel_gen(intel_get_drm_devid(i915)) >= 8);
/* No coupling between requests; free to timeslice */
@@ -634,8 +632,7 @@ static void lateslice(int i915, unsigned int engine, unsigned long flags)
igt_spin_t *spin[3];
uint32_t ctx;
- igt_require(gem_scheduler_has_semaphores(i915));
- igt_require(gem_scheduler_has_preemption(i915));
+ igt_require(gem_scheduler_has_timeslicing(i915));
igt_require(intel_gen(intel_get_drm_devid(i915)) >= 8);
ctx = gem_context_create(i915);
@@ -741,8 +738,7 @@ static void submit_slice(int i915,
* especially when that work is coperating with the spinner.
*/
- igt_require(gem_scheduler_has_semaphores(i915));
- igt_require(gem_scheduler_has_preemption(i915));
+ igt_require(gem_scheduler_has_timeslicing(i915));
igt_require(intel_gen(intel_get_drm_devid(i915)) >= 8);
__for_each_physical_engine(i915, cancel) {
@@ -819,7 +815,7 @@ static void semaphore_userlock(int i915, unsigned long flags)
igt_spin_t *spin = NULL;
uint32_t scratch;
- igt_require(gem_scheduler_has_semaphores(i915));
+ igt_require(gem_scheduler_has_timeslicing(i915));
/*
* Given the use of semaphores to govern parallel submission
@@ -2872,8 +2868,7 @@ igt_main
igt_subtest_group {
igt_fixture {
- igt_require(gem_scheduler_has_semaphores(fd));
- igt_require(gem_scheduler_has_preemption(fd));
+ igt_require(gem_scheduler_has_timeslicing(fd));
igt_require(intel_gen(intel_get_drm_devid(fd)) >= 8);
}
--
2.31.1
More information about the igt-dev
mailing list