From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Francois Dugast <francois.dugast@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH] drm/xe/hw_engine: Document difference between instance and logical instance
Date: Thu, 5 Oct 2023 10:53:11 -0400 [thread overview]
Message-ID: <ZR7N15hfKDSAn/m+@intel.com> (raw)
In-Reply-To: <20231005095729.7-1-francois.dugast@intel.com>
On Thu, Oct 05, 2023 at 09:57:29AM +0000, Francois Dugast wrote:
> Add explanation provided by Matt next to the definition, so that
> it can easily found later.
First of all, thank you so much for adding this here. Just for the record
yesterday I was confused when I noticed that the logical_engines are actually
per gt and not a global number, and though that it was identical to the
@instance itself. My bad, but then Matt reminded us about the gaps in TGL.
>
> Signed-off-by: Francois Dugast <francois.dugast@intel.com>
> ---
> drivers/gpu/drm/xe/xe_hw_engine_types.h | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_hw_engine_types.h b/drivers/gpu/drm/xe/xe_hw_engine_types.h
> index 5d4ee2904240..aa8b5a2165c5 100644
> --- a/drivers/gpu/drm/xe/xe_hw_engine_types.h
> +++ b/drivers/gpu/drm/xe/xe_hw_engine_types.h
> @@ -114,7 +114,13 @@ struct xe_hw_engine {
> enum xe_engine_class class;
> /** @instance: physical instance of this hw engine */
> u16 instance;
> - /** @logical_instance: logical instance of this hw engine */
> + /**
> + * @logical_instance: logical instance of this hw engine. This is
> + * different from @instance because there can be gaps in physical
> + * engines. For example on TGL VCS0 and CVS2 map to logical
here I believe we could avoid the specific platform codename and have
something more generic. but if we need the platform we should to with
the full platform name.
Then there's the typo in VCS2.
> + * instances 0 and 1. Only logical instances should be exposed to
> + * user space.
Maybe also worth mentioning that the construct is a sequence from 0..n
per engine-class, per-gt. And then remove that FIXME comment around the
assignment?
maybe something like:
"Logical identification of this hardware engine. A 0..n sequencing number
assigned at driver initialization for each engine of a giving class of
a specific GT. Although it is per-class and per-GT, it might be different
from the @engine on platforms where we can have gaps on the hardware
assigned number such as platforms where we have VCS0 and VCS2, but no
VCS1. Only logical instance numbers should be exposed to user space."
(Although I confess I keep asking myself why don't we align with the
hardware assigned number. User space drivers also use the same spec
as kernel)
> + */
> u16 logical_instance;
> /** @mmio_base: MMIO base address of this hw engine*/
> u32 mmio_base;
> --
> 2.34.1
>
prev parent reply other threads:[~2023-10-05 14:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 9:57 [Intel-xe] [PATCH] drm/xe/hw_engine: Document difference between instance and logical instance Francois Dugast
2023-10-05 10:21 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-10-05 10:21 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-10-05 10:22 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-10-05 10:29 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-10-05 10:30 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork
2023-10-05 10:31 ` [Intel-xe] ✓ CI.checksparse: success " Patchwork
2023-10-05 11:11 ` [Intel-xe] ✓ CI.BAT: " Patchwork
2023-10-05 14:53 ` Rodrigo Vivi [this message]
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=ZR7N15hfKDSAn/m+@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=francois.dugast@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/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