All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 3/6] drm/i915/guc: reserve the doorbell before selecting the cacheline
Date: Wed, 17 Oct 2018 17:46:07 -0700	[thread overview]
Message-ID: <20181018004610.22895-3-daniele.ceraolospurio@intel.com> (raw)
In-Reply-To: <20181018004610.22895-1-daniele.ceraolospurio@intel.com>

Cacheline selection is only needed if we actually manage to reserve a
doorbell.

Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
 drivers/gpu/drm/i915/intel_guc_submission.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
index b089e5283307..8c3b5a9facee 100644
--- a/drivers/gpu/drm/i915/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/intel_guc_submission.c
@@ -955,6 +955,10 @@ guc_client_alloc(struct drm_i915_private *dev_priv,
 	}
 	client->vaddr = vaddr;
 
+	ret = reserve_doorbell(client);
+	if (ret)
+		goto err_vaddr;
+
 	client->doorbell_offset = __select_cacheline(guc);
 
 	/*
@@ -967,10 +971,6 @@ guc_client_alloc(struct drm_i915_private *dev_priv,
 	else
 		client->proc_desc_offset = (GUC_DB_SIZE / 2);
 
-	ret = reserve_doorbell(client);
-	if (ret)
-		goto err_vaddr;
-
 	DRM_DEBUG_DRIVER("new priority %u client %p for engine(s) 0x%x: stage_id %u\n",
 			 priority, client, client->engines, client->stage_id);
 	DRM_DEBUG_DRIVER("doorbell id %u, cacheline offset 0x%lx\n",
-- 
2.19.0

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

  parent reply	other threads:[~2018-10-18  0:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18  0:46 [PATCH v2 1/6] drm/i915/guc: drop negative doorbell alloc selftest Daniele Ceraolo Spurio
2018-10-18  0:46 ` [PATCH v2 2/6] drm/i915/guc: rename __create/destroy_doorbell Daniele Ceraolo Spurio
2018-10-18  0:46 ` Daniele Ceraolo Spurio [this message]
2018-10-18  0:46 ` [PATCH v2 4/6] drm/i915/guc: doorbell checking cleanup Daniele Ceraolo Spurio
2018-10-18 12:50   ` Michal Wajdeczko
2018-10-18 23:10   ` [PATCH v3] " Daniele Ceraolo Spurio
2018-10-19 10:22     ` Michal Wajdeczko
2018-10-18  0:46 ` [PATCH v2 5/6] drm/i915/guc: fix comment about fallback to execlists Daniele Ceraolo Spurio
2018-10-18 12:51   ` Michal Wajdeczko
2018-10-18  0:46 ` [PATCH v2 6/6] HAX enable GuC for CI Daniele Ceraolo Spurio
2018-10-18  1:07 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/6] drm/i915/guc: drop negative doorbell alloc selftest Patchwork
2018-10-18  1:32 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-10-18 12:21 ` [PATCH v2 1/6] " Michal Wajdeczko
2018-10-18 12:43   ` Chris Wilson
2018-10-18 23:22 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/6] drm/i915/guc: drop negative doorbell alloc selftest (rev2) Patchwork
2018-10-18 23:44 ` ✗ Fi.CI.BAT: failure " 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=20181018004610.22895-3-daniele.ceraolospurio@intel.com \
    --to=daniele.ceraolospurio@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.