diff options
author | Mika Kuoppala | 2017-09-22 14:43:07 +0200 |
---|---|---|
committer | Mika Kuoppala | 2017-09-25 10:33:53 +0200 |
commit | 76e70087d360fdbe97f24c205d585ada04126e5f (patch) | |
tree | 2ad0fd9d5614b6d79367055577528318ececda1d /drivers/gpu/drm/i915/i915_guc_submission.c | |
parent | drm/i915: Add execlist_port_complete (diff) | |
download | kernel-qcow2-linux-76e70087d360fdbe97f24c205d585ada04126e5f.tar.gz kernel-qcow2-linux-76e70087d360fdbe97f24c205d585ada04126e5f.tar.xz kernel-qcow2-linux-76e70087d360fdbe97f24c205d585ada04126e5f.zip |
drm/i915: Make execlist port count variable
As we emulate execlists on top of the GuC workqueue, it is not
restricted to just 2 ports and we can increase that number arbitrarily
to trade-off queue depth (i.e. scheduling latency) against pipeline
bubbles.
v2: rebase. better commit msg (Chris)
v3: rebase
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20170922124307.10914-5-mika.kuoppala@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_guc_submission.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_guc_submission.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c index 55e15a57c3d9..04f1281d81a5 100644 --- a/drivers/gpu/drm/i915/i915_guc_submission.c +++ b/drivers/gpu/drm/i915/i915_guc_submission.c @@ -562,6 +562,8 @@ static void i915_guc_dequeue(struct intel_engine_cs *engine) struct intel_engine_execlists * const execlists = &engine->execlists; struct execlist_port *port = execlists->port; struct drm_i915_gem_request *last = NULL; + const struct execlist_port * const last_port = + &execlists->port[execlists->port_mask]; bool submit = false; struct rb_node *rb; @@ -577,7 +579,7 @@ static void i915_guc_dequeue(struct intel_engine_cs *engine) list_for_each_entry_safe(rq, rn, &p->requests, priotree.link) { if (last && rq->ctx != last->ctx) { - if (port != execlists->port) { + if (port == last_port) { __list_del_many(&p->requests, &rq->priotree.link); goto done; @@ -617,6 +619,8 @@ static void i915_guc_irq_handler(unsigned long data) struct intel_engine_cs * const engine = (struct intel_engine_cs *)data; struct intel_engine_execlists * const execlists = &engine->execlists; struct execlist_port *port = execlists->port; + const struct execlist_port * const last_port = + &execlists->port[execlists->port_mask]; struct drm_i915_gem_request *rq; rq = port_request(&port[0]); @@ -629,7 +633,7 @@ static void i915_guc_irq_handler(unsigned long data) rq = port_request(&port[0]); } - if (!port_isset(&port[1])) + if (!port_isset(last_port)) i915_guc_dequeue(engine); } |