Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	Chris Wilson <chris.p.wilson@linux.intel.com>,
	Matt Roper <matthew.d.roper@intel.com>,
	John Harrison <John.C.Harrison@intel.com>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	stable@vger.kernel.org, Andi Shyti <andi.shyti@kernel.org>,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [PATCH v3 1/4] drm/i915/gt: Refactor uabi engine class/instance list creation
Date: Tue, 5 Mar 2024 11:18:45 +0100	[thread overview]
Message-ID: <ZebxhWK4axnMdLDd@ashyti-mobl2.lan> (raw)
In-Reply-To: <170963369058.35653.11240745207600457716@jlahtine-mobl.ger.corp.intel.com>

Hi Joonas,

...

> >  void intel_engines_driver_register(struct drm_i915_private *i915)
> >  {
> > -       u16 name_instance, other_instance = 0;
> > +       u16 class_instance[I915_LAST_UABI_ENGINE_CLASS + 1] = { };
> 
> Do you mean this to be size I915_LAST_UABI_ENGINE_CLASS + 2? Because ...

Yes, this is an oversight. I was playing around with indexes to
optimize the code a bit more and I forgot to restore this back.

Thanks,
Andi

> <SNIP>
> 
> > @@ -222,15 +224,14 @@ void intel_engines_driver_register(struct drm_i915_private *i915)
> >  
> >                 GEM_BUG_ON(engine->class >= ARRAY_SIZE(uabi_classes));
> >                 engine->uabi_class = uabi_classes[engine->class];
> > -               if (engine->uabi_class == I915_NO_UABI_CLASS) {
> > -                       name_instance = other_instance++;
> > -               } else {
> > -                       GEM_BUG_ON(engine->uabi_class >=
> > -                                  ARRAY_SIZE(i915->engine_uabi_class_count));
> > -                       name_instance =
> > -                               i915->engine_uabi_class_count[engine->uabi_class]++;
> > -               }
> > -               engine->uabi_instance = name_instance;
> > +
> > +               if (engine->uabi_class == I915_NO_UABI_CLASS)
> > +                       uabi_class = I915_LAST_UABI_ENGINE_CLASS + 1;
> 
> .. otherwise this ...
> 
> > +               else
> > +                       uabi_class = engine->uabi_class;
> > +
> > +               GEM_BUG_ON(uabi_class >= ARRAY_SIZE(class_instance));
> 
> .. will trigger this assertion?
> 
> Regards, Joonas

  reply	other threads:[~2024-03-05 10:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 23:28 [PATCH v3 0/4] Disable automatic load CCS load balancing Andi Shyti
2024-02-29 23:28 ` [PATCH v3 1/4] drm/i915/gt: Refactor uabi engine class/instance list creation Andi Shyti
2024-03-05 10:14   ` Joonas Lahtinen
2024-03-05 10:18     ` Andi Shyti [this message]
2024-02-29 23:28 ` [PATCH v3 2/4] drm/i915/gt: Do not exposed fused off engines Andi Shyti
2024-03-05 21:52   ` Matt Roper
2024-02-29 23:28 ` [PATCH v3 3/4] drm/i915/gt: Disable HW load balancing for CCS Andi Shyti
2024-02-29 23:28 ` [PATCH v3 4/4] drm/i915/gt: Enable only one CCS for compute workload Andi Shyti
2024-03-01  0:11 ` ✗ Fi.CI.CHECKPATCH: warning for Disable automatic load CCS load balancing (rev4) Patchwork
2024-03-01  0:35 ` ✗ 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=ZebxhWK4axnMdLDd@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=stable@vger.kernel.org \
    --cc=tvrtko.ursulin@intel.com \
    --cc=tvrtko.ursulin@linux.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