From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 11/11] drm/i915/pvc: read fuses for link copy engines
Date: Tue, 3 May 2022 09:19:37 +0100 [thread overview]
Message-ID: <6ee8bdd0-15af-4967-5723-e86482f76072@linux.intel.com> (raw)
In-Reply-To: <20220502163417.2635462-12-matthew.d.roper@intel.com>
On 02/05/2022 17:34, Matt Roper wrote:
> From: Lucas De Marchi <lucas.demarchi@intel.com>
>
> The new Link Copy engines in PVC may be fused off according to the
> mslice_mask. Each bit of the MEML3_EN_MASK we read from the
> GEN10_MIRROR_FUSE3 register disables a pair of link copy engines.
>
> Bspec: 44483
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_engine_cs.c | 28 +++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index c6e93db134b1..d10cdeff5072 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -686,6 +686,33 @@ static void engine_mask_apply_compute_fuses(struct intel_gt *gt)
> }
> }
>
> +static void engine_mask_apply_copy_fuses(struct intel_gt *gt)
> +{
> + struct drm_i915_private *i915 = gt->i915;
> + struct intel_gt_info *info = >->info;
> + unsigned long meml3_mask;
> + u8 quad;
Any hidden reason u8 is the right type here and not unsigned long like bitops expect? (Yes I did notice GEN12_MAX_MSLICES only goes to 4 but generally u8 sucks.)
> +
> + meml3_mask = intel_uncore_read(gt->uncore, GEN10_MIRROR_FUSE3);
> + meml3_mask = REG_FIELD_GET(GEN12_MEML3_EN_MASK, meml3_mask);
> +
> + /*
> + * Link Copy engines may be fused off according to meml3_mask. Each
> + * bit is a quad that houses 2 Link Copy and two Sub Copy engines.
> + */
> + for_each_clear_bit(quad, &meml3_mask, GEN12_MAX_MSLICES) {
> + intel_engine_mask_t mask = GENMASK(BCS1 + quad * 2 + 1,
> + BCS1 + quad * 2);
So internally we will be sure BCS1 to BCS9 are link copy engines? I mean enum names hardcoded/fixed to function. Should we have a comment to that effect somewhere? In intel_engine_types.h maybe?
> +
> + if (mask & info->engine_mask) {
> + drm_dbg(&i915->drm, "bcs%u fused off\n", quad * 2 + 1);
> + drm_dbg(&i915->drm, "bcs%u fused off\n", quad * 2 + 2);
Bikeshed - I'd be tempted to decrease the amount of "quad * 2 + 1" by having a local variable.
unsigned int instance = quad * 2 + 1;
intel_engine_mask_t mask = GENMASK(_BCS(instance + 1), _BCS(instance));
Etc.
Regards,
Tvrtko
> +
> + info->engine_mask &= ~mask;
> + }
> + }
> +}
> +
> /*
> * Determine which engines are fused off in our particular hardware.
> * Note that we have a catch-22 situation where we need to be able to access
> @@ -768,6 +795,7 @@ static intel_engine_mask_t init_engine_mask(struct intel_gt *gt)
> GEM_BUG_ON(vebox_mask != VEBOX_MASK(gt));
>
> engine_mask_apply_compute_fuses(gt);
> + engine_mask_apply_copy_fuses(gt);
>
> return info->engine_mask;
> }
next prev parent reply other threads:[~2022-05-03 8:19 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-02 16:34 [Intel-gfx] [PATCH 00/11] i915: Introduce Ponte Vecchio Matt Roper
2022-05-02 16:34 ` Matt Roper
2022-05-02 16:34 ` [Intel-gfx] [PATCH 01/11] drm/i915/pvc: add initial Ponte Vecchio definitions Matt Roper
2022-05-02 16:34 ` Matt Roper
2022-05-02 20:44 ` [Intel-gfx] " Lucas De Marchi
2022-05-02 20:44 ` Lucas De Marchi
2022-05-02 16:34 ` [Intel-gfx] [PATCH 02/11] drm/i915/pvc: Add forcewake support Matt Roper
2022-05-02 16:34 ` Matt Roper
2022-05-02 22:33 ` [Intel-gfx] " Summers, Stuart
2022-05-02 22:33 ` Summers, Stuart
2022-05-05 0:34 ` [Intel-gfx] " Matt Roper
2022-05-05 0:34 ` Matt Roper
2022-05-02 16:34 ` [Intel-gfx] [PATCH 03/11] drm/i915/pvc: Define MOCS table for PVC Matt Roper
2022-05-02 16:34 ` Matt Roper
2022-05-02 16:50 ` [Intel-gfx] " Matt Roper
2022-05-02 16:50 ` Matt Roper
2022-05-02 18:39 ` [Intel-gfx] " Lucas De Marchi
2022-05-02 18:50 ` Matt Roper
2022-05-02 19:27 ` Lucas De Marchi
2022-05-02 19:42 ` Matt Roper
2022-05-02 21:03 ` Lucas De Marchi
2022-05-02 21:03 ` Lucas De Marchi
2022-05-02 21:14 ` [Intel-gfx] " Matt Roper
2022-05-02 21:14 ` Matt Roper
2022-05-03 6:22 ` [Intel-gfx] " Lucas De Marchi
2022-05-03 6:22 ` Lucas De Marchi
2022-05-02 16:34 ` [Intel-gfx] [PATCH 04/11] drm/i915/pvc: Read correct RP_STATE_CAP register Matt Roper
2022-05-02 16:34 ` Matt Roper
2022-05-02 16:55 ` [Intel-gfx] " Rodrigo Vivi
2022-05-02 16:55 ` Rodrigo Vivi
2022-05-02 16:34 ` [Intel-gfx] [PATCH 05/11] drm/i915/pvc: Remove additional 3D flags from PIPE_CONTROL Matt Roper
2022-05-02 16:34 ` Matt Roper
2022-05-02 16:34 ` [Intel-gfx] [PATCH 06/11] drm/i915/pvc: Reduce stack usage in reset selftest with extra blitter engine Matt Roper
2022-05-02 16:34 ` Matt Roper
2022-05-02 18:46 ` [Intel-gfx] " Souza, Jose
2022-05-02 18:46 ` Souza, Jose
2022-05-03 8:25 ` [Intel-gfx] " Tvrtko Ursulin
2022-05-02 16:34 ` [Intel-gfx] [PATCH 07/11] drm/i915/pvc: Engines definitions for new copy engines Matt Roper
2022-05-02 16:34 ` Matt Roper
2022-05-02 18:45 ` [Intel-gfx] " Souza, Jose
2022-05-03 8:05 ` Tvrtko Ursulin
2022-05-03 8:05 ` Tvrtko Ursulin
2022-05-05 20:59 ` Matt Roper
2022-05-05 20:59 ` Matt Roper
2022-05-06 7:21 ` Tvrtko Ursulin
2022-05-06 7:21 ` Tvrtko Ursulin
2022-05-06 14:29 ` Matt Roper
2022-05-06 14:29 ` Matt Roper
2022-05-02 16:34 ` [Intel-gfx] [PATCH 08/11] drm/i915/pvc: Interrupt support " Matt Roper
2022-05-02 16:34 ` Matt Roper
2022-05-02 22:23 ` [Intel-gfx] " Summers, Stuart
2022-05-02 22:23 ` Summers, Stuart
2022-05-02 16:34 ` [Intel-gfx] [PATCH 09/11] drm/i915/pvc: Reset " Matt Roper
2022-05-02 16:34 ` Matt Roper
2022-05-02 18:44 ` [Intel-gfx] " Souza, Jose
2022-05-02 22:23 ` Summers, Stuart
2022-05-02 16:34 ` [Intel-gfx] [PATCH 10/11] drm/i915/pvc: skip all copy engines from aux table invalidate Matt Roper
2022-05-02 16:34 ` Matt Roper
2022-05-02 18:40 ` [Intel-gfx] " Souza, Jose
2022-05-02 22:58 ` Kumar Valsan, Prathap
2022-05-02 22:58 ` Kumar Valsan, Prathap
2022-05-02 16:34 ` [Intel-gfx] [PATCH 11/11] drm/i915/pvc: read fuses for link copy engines Matt Roper
2022-05-02 16:34 ` Matt Roper
2022-05-02 18:48 ` [Intel-gfx] " Souza, Jose
2022-05-02 18:48 ` Souza, Jose
2022-05-03 8:19 ` Tvrtko Ursulin [this message]
2022-05-02 16:58 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for i915: Introduce Ponte Vecchio Patchwork
2022-05-02 16:58 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-05-02 17:22 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-05-02 22:58 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-05-03 17:32 ` Matt Roper
2022-05-04 17:03 ` Vudum, Lakshminarayana
2022-05-03 8:21 ` [Intel-gfx] [PATCH 00/11] " Tvrtko Ursulin
2022-05-03 14:56 ` Matt Roper
2022-05-03 15:01 ` Tvrtko Ursulin
2022-05-04 16:22 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork
2022-05-04 16:43 ` 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=6ee8bdd0-15af-4967-5723-e86482f76072@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--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 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.