intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: andi.shyti@intel.com, chris.p.wilson@linux.intel.com,
	matthew.d.roper@intel.com, Nirmoy Das <nirmoy.das@intel.com>
Subject: [Intel-gfx] [PATCH 4/7] drm/i915: Parameterize binder context creation
Date: Fri, 15 Sep 2023 10:34:09 +0200	[thread overview]
Message-ID: <20230915083412.4572-5-nirmoy.das@intel.com> (raw)
In-Reply-To: <20230915083412.4572-1-nirmoy.das@intel.com>

Add i915_ggtt_require_binder() to indicate that i915
needs to create binder context which will be used
by subsequent patch to enable i915_address_space vfuncs
that will use GPU commands to update GGTT.

Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Oak Zeng <oak.zeng@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +-
 drivers/gpu/drm/i915/gt/intel_gtt.c       | 4 ++++
 drivers/gpu/drm/i915/gt/intel_gtt.h       | 2 ++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index 18ae56ea012a..25c8afca440a 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -1478,7 +1478,7 @@ static int engine_init_common(struct intel_engine_cs *engine)
 	 * engines as well but BCS should be less busy engine so pick that for
 	 * GGTT updates.
 	 */
-	if (engine->id == BCS0) {
+	if (i915_ggtt_require_binder(engine->i915) && engine->id == BCS0) {
 		bce = create_ggtt_bind_context(engine);
 		if (IS_ERR(bce)) {
 			intel_engine_destroy_pinned_context(ce);
diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c b/drivers/gpu/drm/i915/gt/intel_gtt.c
index 13944a14ea2d..4c89eb8d9af7 100644
--- a/drivers/gpu/drm/i915/gt/intel_gtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gtt.c
@@ -21,6 +21,10 @@
 #include "intel_gt_regs.h"
 #include "intel_gtt.h"
 
+bool i915_ggtt_require_binder(struct drm_i915_private *i915)
+{
+	return false;
+}
 
 static bool intel_ggtt_update_needs_vtd_wa(struct drm_i915_private *i915)
 {
diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.h b/drivers/gpu/drm/i915/gt/intel_gtt.h
index 41e530d0a4e9..b471edac2699 100644
--- a/drivers/gpu/drm/i915/gt/intel_gtt.h
+++ b/drivers/gpu/drm/i915/gt/intel_gtt.h
@@ -691,4 +691,6 @@ static inline struct sgt_dma {
 	return (struct sgt_dma){ sg, addr, addr + sg_dma_len(sg) };
 }
 
+bool i915_ggtt_require_binder(struct drm_i915_private *i915);
+
 #endif
-- 
2.41.0


  parent reply	other threads:[~2023-09-15  8:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15  8:34 [Intel-gfx] [PATCH 0/7] Update GGTT with MI_UPDATE_GTT on MTL Nirmoy Das
2023-09-15  8:34 ` [Intel-gfx] [PATCH 1/7] drm/i915: Lift runtime-pm acquire callbacks out of intel_wakeref.mutex Nirmoy Das
2023-09-15  8:34 ` [Intel-gfx] [PATCH 2/7] drm/i915: Create a kernel context for GGTT updates Nirmoy Das
2023-09-15 15:44   ` Zeng, Oak
2023-09-15  8:34 ` [Intel-gfx] [PATCH 3/7] drm/i915: Implement for_each_sgt_daddr_next Nirmoy Das
2023-09-15  8:34 ` Nirmoy Das [this message]
2023-09-15  8:34 ` [Intel-gfx] [PATCH 5/7] drm/i915: Implement GGTT update method with MI_UPDATE_GTT Nirmoy Das
2023-09-15 15:56   ` Zeng, Oak
2023-09-15 16:06     ` Piotr Piórkowski
2023-09-18 10:25     ` Nirmoy Das
2023-09-18 14:50       ` Zeng, Oak
2023-09-15  8:34 ` [Intel-gfx] [PATCH 6/7] drm/i915: Toggle binder context ready status Nirmoy Das
2023-09-15  9:50   ` Jani Nikula
2023-09-15 14:22     ` Nirmoy Das
2023-09-15  8:34 ` [Intel-gfx] [PATCH 7/7] drm/i915: Enable GGTT updates with binder in MTL Nirmoy Das
2023-09-15 10:45 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Update GGTT with MI_UPDATE_GTT on MTL (rev5) Patchwork
2023-09-15 10:45 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-15 10:56 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-09-15 18:28 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-09-26  8:37 [Intel-gfx] [PATCH 0/7] Update GGTT with MI_UPDATE_GTT on MTL Nirmoy Das
2023-09-26  8:37 ` [Intel-gfx] [PATCH 4/7] drm/i915: Parameterize binder context creation Nirmoy Das
2023-09-18 17:02 [Intel-gfx] [PATCH 0/7] Update GGTT with MI_UPDATE_GTT on MTL Nirmoy Das
2023-09-18 17:02 ` [Intel-gfx] [PATCH 4/7] drm/i915: Parameterize binder context creation Nirmoy Das
2023-09-21 13:08   ` Andi Shyti
2023-09-13 13:09 [Intel-gfx] [PATCH 0/7] Update GGTT with MI_UPDATE_GTT on MTL Nirmoy Das
2023-09-13 13:09 ` [Intel-gfx] [PATCH 4/7] drm/i915: Parameterize binder context creation Nirmoy Das
2023-09-13 16:47   ` Zeng, Oak

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=20230915083412.4572-5-nirmoy.das@intel.com \
    --to=nirmoy.das@intel.com \
    --cc=andi.shyti@intel.com \
    --cc=chris.p.wilson@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).