summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@intel.com>2017-10-06 17:37:31 +0300
committerMika Kuoppala <mika.kuoppala@linux.intel.com>2017-10-10 17:06:50 +0300
commit58aa53e990c0dabdf9fcbcccc0bc2d3a5879a7ff (patch)
treefcb63b0367285d0cf11677798ef039a26d350fcd
parent3f02e8c92add5bfdd3ca4e7be066f9a7600d489d (diff)
drm/i915: Move execlists port head instead of memmoving arraytest
As we access the first port through accessors which use port_head, we can now also move the head instead of memmoving the array. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index fc0f4a31f12e..328bdbd35143 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -572,12 +572,13 @@ static inline void
execlists_port_complete(struct intel_engine_execlists * const execlists,
struct execlist_port * const port)
{
- const unsigned int m = execlists->port_mask;
+ GEM_BUG_ON(port_index(port, execlists) != execlists->port_head);
+ GEM_BUG_ON(!port_isset(port));
- GEM_BUG_ON(port_index(port, execlists) != 0);
+ port->request_count = 0;
+ GEM_DEBUG_DECL(port->context_id = 0);
- memmove(port, port + 1, m * sizeof(struct execlist_port));
- memset(port + m, 0, sizeof(struct execlist_port));
+ execlists->port_head = port_n(execlists, 1);
}
static inline unsigned int