From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [CI 2/3] drm/i915: Move execlists port head instead of memmoving array
Date: Thu, 30 Nov 2017 14:45:53 +0200 [thread overview]
Message-ID: <20171130124554.21746-2-mika.kuoppala@linux.intel.com> (raw)
In-Reply-To: <20171130124554.21746-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.
v2: use memset (Chris)
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@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_ringbuffer.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index 17f1fb4ded89..6a3cb8e09ed6 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -685,13 +685,13 @@ static inline struct execlist_port *
execlists_head_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) != 0);
+ GEM_BUG_ON(port_index(port, execlists) != execlists->port_head);
+ GEM_BUG_ON(!port_isset(port));
GEM_BUG_ON(!execlists_is_active(execlists, EXECLISTS_ACTIVE_USER));
- memmove(port, port + 1, m * sizeof(struct execlist_port));
- memset(port + m, 0, sizeof(struct execlist_port));
+ memset(port, 0, sizeof(*port));
+
+ execlists->port_head = port_head_add(execlists, 1);
return execlists_port_head(execlists);
}
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-11-30 12:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 12:45 [CI 1/3] drm/i915: Introduce execlist_port_* accessors Mika Kuoppala
2017-11-30 12:45 ` Mika Kuoppala [this message]
2017-11-30 12:45 ` [CI 3/3] HAX Enable GuC Submission for CI Mika Kuoppala
2017-11-30 17:13 ` ✗ Fi.CI.BAT: failure for series starting with [CI,1/3] drm/i915: Introduce execlist_port_* accessors Patchwork
2017-12-01 8:47 ` Mika Kuoppala
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=20171130124554.21746-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox