All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/2] drm/i915: Move execlists port head instead of memmoving array
Date: Thu, 19 Oct 2017 17:39:42 +0300	[thread overview]
Message-ID: <20171019143942.909-2-mika.kuoppala@linux.intel.com> (raw)
In-Reply-To: <20171019143942.909-1-mika.kuoppala@linux.intel.com>

From: Mika Kuoppala <mika.kuoppala@intel.com>

As all our access to execlist ports are through head and tail
helpers, we can now move the head instead of memmoving the array.

Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index cfec73400d0f..27f5c42ae7c8 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -573,12 +573,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 = NULL;
+	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_head_add(execlists, 1);
 }
 
 static inline unsigned int
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-10-19 14:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19 14:39 [PATCH 1/2] drm/i915: Introduce execlist_port_* accessors Mika Kuoppala
2017-10-19 14:39 ` Mika Kuoppala [this message]
2017-10-19 15:54   ` [PATCH 2/2] drm/i915: Move execlists port head instead of memmoving array Chris Wilson
2017-10-19 14:48 ` [PATCH 1/2] drm/i915: Introduce execlist_port_* accessors Chris Wilson
2017-10-20 12:00   ` Mika Kuoppala
2017-10-19 14:50 ` Chris Wilson
2017-10-19 14:59 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] " Patchwork
2017-10-20 10:34 ` [PATCH 1/2] " Joonas Lahtinen
2017-10-20 11:12   ` Mika Kuoppala
2017-10-20 11:26     ` Chris Wilson
2017-10-20 12:53     ` Mika Kuoppala
2017-10-31 15:27 Mika Kuoppala
2017-10-31 15:27 ` [PATCH 2/2] drm/i915: Move execlists port head instead of memmoving array Mika Kuoppala
2017-10-31 15:42   ` Chris Wilson
2017-11-02 15:07   ` Chris Wilson
2017-11-22 13:52     ` Mika Kuoppala
2017-11-22 13:57       ` Chris Wilson
2017-11-30  9:10 [PATCH 0/2] execlist port handling improvements Mika Kuoppala
2017-11-30  9:10 ` [PATCH 2/2] drm/i915: Move execlists port head instead of memmoving array Mika Kuoppala
2017-11-30 10:26   ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171019143942.909-2-mika.kuoppala@linux.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.