File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1739,11 +1739,26 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
1739
1739
1740
1740
if (submit ) {
1741
1741
* port = execlists_schedule_in (last , port - execlists -> pending );
1742
- memset (port + 1 , 0 , (last_port - port ) * sizeof (* port ));
1743
1742
execlists -> switch_priority_hint =
1744
1743
switch_prio (engine , * execlists -> pending );
1744
+
1745
+ /*
1746
+ * Skip if we ended up with exactly the same set of requests,
1747
+ * e.g. trying to timeslice a pair of ordered contexts
1748
+ */
1749
+ if (!memcmp (execlists -> active , execlists -> pending ,
1750
+ (port - execlists -> pending + 1 ) * sizeof (* port ))) {
1751
+ do
1752
+ execlists_schedule_out (fetch_and_zero (port ));
1753
+ while (port -- != execlists -> pending );
1754
+
1755
+ goto skip_submit ;
1756
+ }
1757
+
1758
+ memset (port + 1 , 0 , (last_port - port ) * sizeof (* port ));
1745
1759
execlists_submit_ports (engine );
1746
1760
} else {
1761
+ skip_submit :
1747
1762
ring_set_paused (engine , 0 );
1748
1763
}
1749
1764
}
You can’t perform that action at this time.
0 commit comments