public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH 08/10] drm/i915: eb_engine_select only needs flags
Date: Tue, 31 Jan 2017 13:15:44 +0000	[thread overview]
Message-ID: <1485868546-4927-9-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <1485868546-4927-1-git-send-email-tvrtko.ursulin@linux.intel.com>

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Not the whole args struct needs to be passed in.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 51cf3ff3e21d..ae94cc27c9ba 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -1519,11 +1519,10 @@ static const enum intel_engine_id user_ring_map[I915_USER_RINGS + 1] = {
 };
 
 static struct intel_engine_cs *
-eb_select_engine(struct drm_i915_private *dev_priv,
-		 struct drm_file *file,
-		 struct drm_i915_gem_execbuffer2 *args)
+eb_select_engine(struct drm_i915_private *dev_priv, struct drm_file *file,
+		 u64 flags)
 {
-	unsigned int user_ring_id = args->flags & I915_EXEC_RING_MASK;
+	unsigned int user_ring_id = flags & I915_EXEC_RING_MASK;
 	struct intel_engine_cs *engine;
 
 	if (user_ring_id > I915_USER_RINGS) {
@@ -1532,14 +1531,14 @@ eb_select_engine(struct drm_i915_private *dev_priv,
 	}
 
 	if ((user_ring_id != I915_EXEC_BSD) &&
-	    ((args->flags & I915_EXEC_BSD_MASK) != 0)) {
+	    ((flags & I915_EXEC_BSD_MASK) != 0)) {
 		DRM_DEBUG("execbuf with non bsd ring but with invalid "
-			  "bsd dispatch flags: %d\n", (int)(args->flags));
+			  "bsd dispatch flags: %d\n", (int)(flags));
 		return NULL;
 	}
 
 	if (user_ring_id == I915_EXEC_BSD && HAS_BSD2(dev_priv)) {
-		unsigned int bsd_idx = args->flags & I915_EXEC_BSD_MASK;
+		unsigned int bsd_idx = flags & I915_EXEC_BSD_MASK;
 
 		if (bsd_idx == I915_EXEC_BSD_DEFAULT) {
 			bsd_idx = gen8_dispatch_bsd_engine(dev_priv, file);
@@ -1604,7 +1603,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
 	if (args->flags & I915_EXEC_IS_PINNED)
 		dispatch_flags |= I915_DISPATCH_PINNED;
 
-	engine = eb_select_engine(dev_priv, file, args);
+	engine = eb_select_engine(dev_priv, file, args->flags);
 	if (!engine)
 		return -EINVAL;
 
-- 
2.7.4

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

  parent reply	other threads:[~2017-01-31 13:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 13:15 [PATCH 00/10] do_execbuffer tidy Tvrtko Ursulin
2017-01-31 13:15 ` [PATCH 01/10] drm/i915: Tidy i915_gem_do_execbuffer Tvrtko Ursulin
2017-02-01  7:14   ` Joonas Lahtinen
2017-01-31 13:15 ` [PATCH 02/10] drm/i915: Drop some unused fields from i915_execbuffer_params Tvrtko Ursulin
2017-02-01  7:20   ` Joonas Lahtinen
2017-02-01 16:08     ` Tvrtko Ursulin
2017-01-31 13:15 ` [PATCH 03/10] drm/i915: Tidy execbuf_submit Tvrtko Ursulin
2017-02-01  7:19   ` Joonas Lahtinen
2017-01-31 13:15 ` [PATCH 04/10] drm/i915: Remove batch field from i915_execbuffer_params Tvrtko Ursulin
2017-01-31 13:15 ` [PATCH 05/10] drm/i915: Nuke i915_execbuffer_params Tvrtko Ursulin
2017-01-31 13:15 ` [PATCH 06/10] drm/i915: Remove some single use locals i915_gem_do_execbuffer Tvrtko Ursulin
2017-01-31 13:15 ` [PATCH 07/10] drm/i915: Drop unused engine parameter from i915_gem_validate_context Tvrtko Ursulin
2017-01-31 13:15 ` Tvrtko Ursulin [this message]
2017-01-31 13:15 ` [PATCH 09/10] drm/i915: Pass file_priv to eb_select_engine Tvrtko Ursulin
2017-01-31 13:15 ` [PATCH 10/10] drm/i915: Remove some unecessary line breaks Tvrtko Ursulin
2017-01-31 13:20 ` [PATCH 00/10] do_execbuffer tidy Chris Wilson
2017-01-31 15:24 ` ✗ Fi.CI.BAT: warning for " Patchwork

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=1485868546-4927-9-git-send-email-tvrtko.ursulin@linux.intel.com \
    --to=tursulin@ursulin.net \
    --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