@@ -88,6 +88,9 @@ static int live_preempt(void *arg)
88
88
if (!HAS_LOGICAL_RING_PREEMPTION (i915 ))
89
89
return 0 ;
90
90
91
+ if (!(i915 -> caps .scheduler & I915_SCHEDULER_CAP_PREEMPTION ))
92
+ pr_err ("Logical preemption supported, but not exposed\n" );
93
+
91
94
mutex_lock (& i915 -> drm .struct_mutex );
92
95
wakeref = intel_runtime_pm_get (i915 );
93
96
@@ -112,6 +115,9 @@ static int live_preempt(void *arg)
112
115
for_each_engine (engine , i915 , id ) {
113
116
struct i915_request * rq ;
114
117
118
+ if (!intel_engine_has_preemption (engine ))
119
+ continue ;
120
+
115
121
rq = igt_spinner_create_request (& spin_lo , ctx_lo , engine ,
116
122
MI_ARB_CHECK );
117
123
if (IS_ERR (rq )) {
@@ -203,6 +209,9 @@ static int live_late_preempt(void *arg)
203
209
for_each_engine (engine , i915 , id ) {
204
210
struct i915_request * rq ;
205
211
212
+ if (!intel_engine_has_preemption (engine ))
213
+ continue ;
214
+
206
215
rq = igt_spinner_create_request (& spin_lo , ctx_lo , engine ,
207
216
MI_ARB_CHECK );
208
217
if (IS_ERR (rq )) {
@@ -335,6 +344,9 @@ static int live_suppress_self_preempt(void *arg)
335
344
struct i915_request * rq_a , * rq_b ;
336
345
int depth ;
337
346
347
+ if (!intel_engine_has_preemption (engine ))
348
+ continue ;
349
+
338
350
engine -> execlists .preempt_hang .count = 0 ;
339
351
340
352
rq_a = igt_spinner_create_request (& a .spin ,
@@ -481,6 +493,9 @@ static int live_suppress_wait_preempt(void *arg)
481
493
for_each_engine (engine , i915 , id ) {
482
494
int depth ;
483
495
496
+ if (!intel_engine_has_preemption (engine ))
497
+ continue ;
498
+
484
499
if (!engine -> emit_init_breadcrumb )
485
500
continue ;
486
501
@@ -602,6 +617,9 @@ static int live_chain_preempt(void *arg)
602
617
};
603
618
int count , i ;
604
619
620
+ if (!intel_engine_has_preemption (engine ))
621
+ continue ;
622
+
605
623
for_each_prime_number_from (count , 1 , 32 ) { /* must fit ring! */
606
624
struct i915_request * rq ;
607
625
0 commit comments