mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-05-05 06:43:48 +00:00
drm/i915/execlists: Skip redundant resubmission
If we unwind the active requests, and on resubmission discover that we intend to preempt the active contexts with themselves, simply skip the ELSP submission. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191003210100.22250-1-chris@chris-wilson.co.uk
This commit is contained in:
parent
3032c0b47e
commit
44d0a9c05b
1 changed files with 16 additions and 1 deletions
|
@ -1739,11 +1739,26 @@ done:
|
||||||
|
|
||||||
if (submit) {
|
if (submit) {
|
||||||
*port = execlists_schedule_in(last, port - execlists->pending);
|
*port = execlists_schedule_in(last, port - execlists->pending);
|
||||||
memset(port + 1, 0, (last_port - port) * sizeof(*port));
|
|
||||||
execlists->switch_priority_hint =
|
execlists->switch_priority_hint =
|
||||||
switch_prio(engine, *execlists->pending);
|
switch_prio(engine, *execlists->pending);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Skip if we ended up with exactly the same set of requests,
|
||||||
|
* e.g. trying to timeslice a pair of ordered contexts
|
||||||
|
*/
|
||||||
|
if (!memcmp(execlists->active, execlists->pending,
|
||||||
|
(port - execlists->pending + 1) * sizeof(*port))) {
|
||||||
|
do
|
||||||
|
execlists_schedule_out(fetch_and_zero(port));
|
||||||
|
while (port-- != execlists->pending);
|
||||||
|
|
||||||
|
goto skip_submit;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(port + 1, 0, (last_port - port) * sizeof(*port));
|
||||||
execlists_submit_ports(engine);
|
execlists_submit_ports(engine);
|
||||||
} else {
|
} else {
|
||||||
|
skip_submit:
|
||||||
ring_set_paused(engine, 0);
|
ring_set_paused(engine, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue