From: Andi Shyti <andi.shyti@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>,
intel-gfx <intel-gfx@lists.freedesktop.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
Chris Wilson <chris.p.wilson@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
John Harrison <John.C.Harrison@intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
Michal Mrozek <michal.mrozek@intel.com>,
stable@vger.kernel.org, Andi Shyti <andi.shyti@kernel.org>
Subject: Re: [PATCH v7 2/3] drm/i915/gt: Do not generate the command streamer for all the CCS
Date: Thu, 28 Mar 2024 08:29:42 +0100 [thread overview]
Message-ID: <ZgUcZpUn5S5Vmgqu@ashyti-mobl2.lan> (raw)
In-Reply-To: <20240327220858.GG718896@mdroper-desk1.amr.corp.intel.com>
Hi Matt,
> > + /*
> > + * 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)) {
> > + intel_engine_mask_t first_ccs = BIT((CCS0 + __ffs(CCS_MASK(gt))));
> > + intel_engine_mask_t all_ccs = CCS_MASK(gt) << CCS0;
> > +
> > + info->engine_mask &= ~(all_ccs &= ~first_ccs);
>
> Shouldn't the second "&=" just be an "&" since there's no need to modify
> the all_ccs variable that never gets used again?
yes, that's a leftover from me trying different ways of removing
all the non first CCS engines.
> In fact since this is DG2-specific, it seems like it might be more
> intuitive to just write the whole thing more directly as
>
> if (IS_DG2(gt->i915)) {
> int first_ccs = __ffs(CCS_MASK(gt));
>
> info->engine_mask &= ~GENMASK(CCS3, CCS0);
> info->engine_mask |= BIT(_CCS(first_ccs));
> }
yes, looks a bit simpler. Will use this way.
> But up to you; if you just want to remove the unnecessary "=" that's
> fine too. Either way,
>
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Thanks!
Andi
next prev parent reply other threads:[~2024-03-28 7:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 15:56 [PATCH v7 0/3] Disable automatic load CCS load balancing Andi Shyti
2024-03-27 15:56 ` [PATCH v7 1/3] drm/i915/gt: Disable HW load balancing for CCS Andi Shyti
2024-03-27 15:56 ` [PATCH v7 2/3] drm/i915/gt: Do not generate the command streamer for all the CCS Andi Shyti
2024-03-27 22:08 ` Matt Roper
2024-03-28 7:29 ` Andi Shyti [this message]
2024-03-27 15:56 ` [PATCH v7 3/3] drm/i915/gt: Enable only one CCS for compute workload Andi Shyti
2024-03-27 16:28 ` ✗ Fi.CI.CHECKPATCH: warning for Disable automatic load CCS load balancing (rev12) Patchwork
2024-03-27 16:28 ` ✗ Fi.CI.SPARSE: " 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=ZgUcZpUn5S5Vmgqu@ashyti-mobl2.lan \
--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=michal.mrozek@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