From: Andi Shyti <andi.shyti@linux.intel.com>
To: intel-gfx <intel-gfx@lists.freedesktop.org>,
dri-devel <dri-devel@lists.freedesktop.org>
Cc: Chris Wilson <chris.p.wilson@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Matt Roper <matthew.d.roper@intel.com>,
John Harrison <John.C.Harrison@Intel.com>,
stable@vger.kernel.org, Andi Shyti <andi.shyti@linux.intel.com>,
Andi Shyti <andi.shyti@kernel.org>,
Tvrtko Ursulin <tursulin@ursulin.net>
Subject: [PATCH v8 2/3] drm/i915/gt: Do not generate the command streamer for all the CCS
Date: Thu, 28 Mar 2024 08:34:04 +0100 [thread overview]
Message-ID: <20240328073409.674098-3-andi.shyti@linux.intel.com> (raw)
In-Reply-To: <20240328073409.674098-1-andi.shyti@linux.intel.com>
We want a fixed load CCS balancing consisting in all slices
sharing one single user engine. For this reason do not create the
intel_engine_cs structure with its dedicated command streamer for
CCS slices beyond the first.
Fixes: d2eae8e98d59 ("drm/i915/dg2: Drop force_probe requirement")
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Chris Wilson <chris.p.wilson@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: <stable@vger.kernel.org> # v6.2+
Acked-by: Michal Mrozek <michal.mrozek@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
---
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index 476651bd0a21..8c44af1c3451 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -874,6 +874,23 @@ static intel_engine_mask_t init_engine_mask(struct intel_gt *gt)
info->engine_mask &= ~BIT(GSC0);
}
+ /*
+ * Do not create the command streamer for CCS slices beyond the first.
+ * All the workload submitted to the first engine will be shared among
+ * all the slices.
+ *
+ * Once the user will be allowed to customize the CCS mode, then this
+ * check needs to be removed.
+ */
+ if (IS_DG2(gt->i915)) {
+ u8 first_ccs = __ffs(CCS_MASK(gt));
+
+ /* Mask off all the CCS engine */
+ info->engine_mask &= ~GENMASK(CCS3, CCS0);
+ /* Put back in the first CCS engine */
+ info->engine_mask |= BIT(_CCS(first_ccs));
+ }
+
return info->engine_mask;
}
--
2.43.0
next prev parent reply other threads:[~2024-03-28 7:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 7:34 [PATCH v8 0/3] Disable automatic load CCS load balancing Andi Shyti
2024-03-28 7:34 ` [PATCH v8 1/3] drm/i915/gt: Disable HW load balancing for CCS Andi Shyti
2024-03-28 7:34 ` Andi Shyti [this message]
2024-03-28 7:34 ` [PATCH v8 3/3] drm/i915/gt: Enable only one CCS for compute workload Andi Shyti
2024-03-28 9:50 ` ✗ Fi.CI.CHECKPATCH: warning for Disable automatic load CCS load balancing (rev13) Patchwork
2024-03-28 9:50 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-03-28 15:30 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-03-28 17:55 ` ✓ Fi.CI.IGT: success " Patchwork
2024-03-29 3:34 ` ✗ Fi.CI.CHECKPATCH: warning for Disable automatic load CCS load balancing (rev14) Patchwork
2024-03-29 3:34 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-03-29 3:45 ` ✓ Fi.CI.BAT: success " Patchwork
2024-03-30 0:03 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-03-30 0:14 ` Andi Shyti
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=20240328073409.674098-3-andi.shyti@linux.intel.com \
--to=andi.shyti@linux.intel.com \
--cc=John.C.Harrison@Intel.com \
--cc=andi.shyti@kernel.org \
--cc=chris.p.wilson@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=matthew.d.roper@intel.com \
--cc=stable@vger.kernel.org \
--cc=tursulin@ursulin.net \
/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