Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Sousa <gustavo.sousa@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	Shekhar Chauhan <shekhar.chauhan@intel.com>,
	Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>,
	Matt Roper <matthew.d.roper@intel.com>,
	Tejas Upadhyay <tejas.upadhyay@intel.com>
Subject: Re: [PATCH v2 16/22] drm/xe/xe3p_xpc: Add MCR steering
Date: Thu, 16 Oct 2025 17:16:01 -0300	[thread overview]
Message-ID: <176064576184.2362.16093674347122378319@intel.com> (raw)
In-Reply-To: <ise57wnkjlhka4eivz52xfrwnxfhxfcrhuifruqvarwzuosxuv@7ejlhrrnbkmb>

Quoting Lucas De Marchi (2025-10-16 16:48:01-03:00)
>On Thu, Oct 16, 2025 at 08:44:34AM -0300, Gustavo Sousa wrote:
>>Quoting Lucas De Marchi (2025-10-15 19:06:31-03:00)
>>>From: Matt Roper <matthew.d.roper@intel.com>
>>>
>>>Xe3p_XPC's steering has a few changes from Xe3.  Aside from
>>>minor changes to the XeCore (the new name for what used to be "DSS") and
>>>INSTANCE0 tables, different rules apply to different subranges of type
>>>"GAM."  Certain GAM subranges require steering to grp/instance (0,0)
>>>(and thus use the INSTANCE0 table), while others require special
>>>steering to (1,0) instead.  Similarly, there are multiple classes of
>>>"PSMI" steering, with some requiring steering to (0,0) while others
>>>require (19,0).
>>>
>>>FIXME: There's an "L3BANK" range listed in the bspec that needs
>>>clarification.
>>
>>I think we also have a NODE range that is also missing termination
>>details.  I think a TODO/FIXME in the code for those two types of range
>>would help reminind ourselves about the need to complete the tables.
>
>Like this?

Yep, but with a few tweaks, noted below.

>
>
>| diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
>| index e5506ec28e147..f35d8a31c1079 100644
>| --- a/drivers/gpu/drm/xe/xe_gt_mcr.c
>| +++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
>| @@ -515,6 +515,12 @@ void xe_gt_mcr_init_early(struct xe_gt *gt)
>|                 }
>|         } else {
>|                 if (GRAPHICS_VERx100(xe) == 3511) {
>| +                       /*
>| +                        * TODO: there are 2 ranges in bspec with missing
>| +                        * termination: [0x00B000, 0x00B0FF] (NODE) and

The range [0x00D880, 0x00D8FF] is also tagged as NODE.

>| +                        * [0x00B100, 0x00B3FF] (L3BANK). Updated them here once


s/Updated/Update/


--
Gustavo Sousa

>| +                        * bspec is updated.
>| +                        */
>|                         gt->steering[DSS].ranges = xe3p_xpc_xecore_steering_table;
>|                         gt->steering[GAM1].ranges = xe3p_xpc_gam_grp1_steering_table;
>|                         gt->steering[INSTANCE0].ranges = xe3p_xpc_instance0_steering_table;
>
>>
>>For the ranges added in this patch, I checked and they match the Bspec,
>>so:
>>
>>Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
>
>thanks
>Lucas De Marchi
>
>>
>>>
>>>Bspec: 74418
>>>Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
>>>Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
>>>---
>>> drivers/gpu/drm/xe/xe_gt_mcr.c   | 56 ++++++++++++++++++++++++++++++++++++++--
>>> drivers/gpu/drm/xe/xe_gt_types.h | 15 +++++++++++
>>> 2 files changed, 69 insertions(+), 2 deletions(-)
>>>
>>>diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
>>>index e1a2b38fc2a86..e5506ec28e147 100644
>>>--- a/drivers/gpu/drm/xe/xe_gt_mcr.c
>>>+++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
>>>@@ -169,6 +169,15 @@ static const struct xe_mmio_range xelpg_dss_steering_table[] = {
>>>         {},
>>> };
>>>
>>>+static const struct xe_mmio_range xe3p_xpc_xecore_steering_table[] = {
>>>+        { 0x008140, 0x00817F },         /* SLICE, XeCore, SLICE */
>>>+        { 0x009480, 0x00955F },         /* SLICE, XeCore */
>>>+        { 0x00D800, 0x00D87F },                /* SLICE */
>>>+        { 0x00DC00, 0x00E9FF },         /* SLICE, rsvd, XeCore, rsvd, XeCore, rsvd, XeCore */
>>>+        { 0x013000, 0x0135FF },         /* XeCore, SLICE */
>>>+        {},
>>>+};
>>>+
>>> static const struct xe_mmio_range xelpmp_oaddrm_steering_table[] = {
>>>         { 0x393200, 0x39323F },
>>>         { 0x393400, 0x3934FF },
>>>@@ -247,6 +256,30 @@ static const struct xe_mmio_range xe3lpm_instance0_steering_table[] = {
>>>         {},
>>> };
>>>
>>>+/*
>>>+ * Different "GAM" ranges have different rules; GAMWKRS, STLB, and GAMREQSTRM
>>>+ * range subtypes need to be steered to (1,0), while all other GAM subtypes
>>>+ * are steered to (0,0) and are included in the "INSTANCE0" table farther
>>>+ * down.
>>>+ */
>>>+static const struct xe_mmio_range xe3p_xpc_gam_grp1_steering_table[] = {
>>>+        { 0x004000, 0x004AFF },                /* GAMREQSTRM, rsvd, STLB, GAMWKRS, GAMREQSTRM */
>>>+        { 0x00F100, 0x00FFFF },                /* GAMWKRS */
>>>+        {},
>>>+};
>>>+
>>>+static const struct xe_mmio_range xe3p_xpc_psmi_grp19_steering_table[] = {
>>>+        { 0x00B500, 0x00B5FF },
>>>+        {},
>>>+};
>>>+
>>>+static const struct xe_mmio_range xe3p_xpc_instance0_steering_table[] = {
>>>+        { 0x00B600, 0x00B6FF },                /* PSMI0 */
>>>+        { 0x00C800, 0x00CFFF },                /* GAMCTRL */
>>>+        { 0x00F000, 0x00F0FF },                /* GAMCTRL */
>>>+        {},
>>>+};
>>>+
>>> static void init_steering_l3bank(struct xe_gt *gt)
>>> {
>>>         struct xe_mmio *mmio = &gt->mmio;
>>>@@ -419,6 +452,18 @@ static void init_steering_sqidi_psmi(struct xe_gt *gt)
>>>         gt->steering[SQIDI_PSMI].instance_target = select & 0x1;
>>> }
>>>
>>>+static void init_steering_psmi(struct xe_gt *gt)
>>>+{
>>>+        gt->steering[PSMI19].group_target = 19;
>>>+        gt->steering[PSMI19].instance_target = 0;
>>>+}
>>>+
>>>+static void init_steering_gam1(struct xe_gt *gt)
>>>+{
>>>+        gt->steering[GAM1].group_target = 1;
>>>+        gt->steering[GAM1].instance_target = 0;
>>>+}
>>>+
>>> static const struct {
>>>         const char *name;
>>>         void (*init)(struct xe_gt *gt);
>>>@@ -426,9 +471,11 @@ static const struct {
>>>         [L3BANK] =        { "L3BANK",        init_steering_l3bank },
>>>         [MSLICE] =        { "MSLICE",        init_steering_mslice },
>>>         [LNCF] =        { "LNCF",        NULL }, /* initialized by mslice init */
>>>-        [DSS] =                { "DSS",        init_steering_dss },
>>>+        [DSS] =                { "DSS / XeCore", init_steering_dss },
>>>         [OADDRM] =        { "OADDRM / GPMXMT", init_steering_oaddrm },
>>>         [SQIDI_PSMI] =  { "SQIDI_PSMI", init_steering_sqidi_psmi },
>>>+        [PSMI19] =        { "PSMI[19]",        init_steering_psmi },
>>>+        [GAM1] =        { "GAMWKRS / STLB / GAMREQSTRM", init_steering_gam1 },
>>>         [INSTANCE0] =        { "INSTANCE 0",        NULL },
>>>         [IMPLICIT_STEERING] = { "IMPLICIT", NULL },
>>> };
>>>@@ -467,7 +514,12 @@ void xe_gt_mcr_init_early(struct xe_gt *gt)
>>>                         gt->steering[OADDRM].ranges = xelpmp_oaddrm_steering_table;
>>>                 }
>>>         } else {
>>>-                if (GRAPHICS_VER(xe) >= 20) {
>>>+                if (GRAPHICS_VERx100(xe) == 3511) {
>>>+                        gt->steering[DSS].ranges = xe3p_xpc_xecore_steering_table;
>>>+                        gt->steering[GAM1].ranges = xe3p_xpc_gam_grp1_steering_table;
>>>+                        gt->steering[INSTANCE0].ranges = xe3p_xpc_instance0_steering_table;
>>>+                        gt->steering[PSMI19].ranges = xe3p_xpc_psmi_grp19_steering_table;
>>>+                } else if (GRAPHICS_VER(xe) >= 20) {
>>>                         gt->steering[DSS].ranges = xe2lpg_dss_steering_table;
>>>                         gt->steering[SQIDI_PSMI].ranges = xe2lpg_sqidi_psmi_steering_table;
>>>                         gt->steering[INSTANCE0].ranges = xe2lpg_instance0_steering_table;
>>>diff --git a/drivers/gpu/drm/xe/xe_gt_types.h b/drivers/gpu/drm/xe/xe_gt_types.h
>>>index 8b5f604d7883a..d93faa1eedef8 100644
>>>--- a/drivers/gpu/drm/xe/xe_gt_types.h
>>>+++ b/drivers/gpu/drm/xe/xe_gt_types.h
>>>@@ -72,6 +72,21 @@ enum xe_steering_type {
>>>         OADDRM,
>>>         SQIDI_PSMI,
>>>
>>>+        /*
>>>+         * The bspec lists multiple ranges as "PSMI," but the different
>>>+         * ranges with that label have different grpid steering values so we
>>>+         * treat them independently in code.  Note that the ranges with grpid=0
>>>+         * are included in the INSTANCE0 group above.
>>>+         */
>>>+        PSMI19,
>>>+
>>>+        /*
>>>+         * Although most GAM ranges must be steered to (0,0) and thus use the
>>>+         * INSTANCE0 type farther down, some platforms have special rules
>>>+         * for specific subtypes that require steering to (1,0) instead.
>>>+         */
>>>+        GAM1,
>>>+
>>>         /*
>>>          * On some platforms there are multiple types of MCR registers that
>>>          * will always return a non-terminated value at instance (0, 0).  We'll
>>>
>>>--
>>>2.51.0
>>>

  reply	other threads:[~2025-10-16 20:16 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15 22:06 [PATCH v2 00/22] drm/xe: Add Xe3p support Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 01/22] drm/xe/xe3: Add support for graphics IP versions 30.04 & 30.05 Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 02/22] drm/xe/xe3p_lpm: Add support for media IP versions 35.00 & 35.03 Lucas De Marchi
2025-10-16 16:12   ` Gustavo Sousa
2025-10-16 16:46     ` Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 03/22] drm/xe: Drop CTC_MODE register read Lucas De Marchi
2025-10-15 23:26   ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 04/22] drm/xe: Add GT_VER() to check version specific to gt type Lucas De Marchi
2025-10-15 23:34   ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 05/22] drm/xe/xe3p_lpm: Skip disabling NOA on unsupported IPs Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 06/22] drm/xe/xe3p_lpm: Handle MCR steering Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 07/22] drm/xe/xe3p: Stop programming RCU_MODE's fixed slice mode setting Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 08/22] drm/xe/xe3p: Determine service copy availability from fuse Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 09/22] drm/xe: Dump CURRENT_LRCA register Lucas De Marchi
2025-10-15 23:28   ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 10/22] drm/xe/xe3p: Dump CSMQDEBUG register Lucas De Marchi
2025-10-15 23:33   ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 11/22] drm/xe/nvl: Define NVL-S platform Lucas De Marchi
2025-10-16 16:41   ` Gustavo Sousa
2025-10-15 22:06 ` [PATCH v2 12/22] drm/xe/nvls: Define GuC firmware for NVL-S Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 13/22] drm/xe/nvls: Attach MOCS table " Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 14/22] drm/xe/xe3p_xpc: Add Xe3p_XPC IP definition Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 15/22] drm/xe/xe3p_xpc: Add L3 bank mask Lucas De Marchi
2025-10-15 23:29   ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 16/22] drm/xe/xe3p_xpc: Add MCR steering Lucas De Marchi
2025-10-16 11:44   ` Gustavo Sousa
2025-10-16 19:48     ` Lucas De Marchi
2025-10-16 20:16       ` Gustavo Sousa [this message]
2025-10-15 22:06 ` [PATCH v2 17/22] drm/xe/irq: Rename fuse mask variables Lucas De Marchi
2025-10-15 23:39   ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 18/22] drm/xe/irq: Split irq mask per engine class Lucas De Marchi
2025-10-15 23:52   ` Matt Roper
2025-10-16  4:38     ` Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 19/22] drm/xe/xe3p_xpc: Add support for compute walker for non-MSIx Lucas De Marchi
2025-10-16  0:07   ` Matt Roper
2025-10-16  5:33     ` Lucas De Marchi
2025-10-16  6:52       ` Muqthyar Ahmed, Syed Abdul
2025-10-16 13:59         ` Lucas De Marchi
2025-10-17  6:52           ` Joonas Lahtinen
2025-10-15 22:06 ` [PATCH v2 20/22] drm/xe/xe3p_xpc: Skip compression tuning on platforms without flatccs Lucas De Marchi
2025-10-16 12:30   ` Gustavo Sousa
2025-10-16 16:54     ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 21/22] drm/xe/xe3p_xpc: Setup PAT table Lucas De Marchi
2025-10-16 14:30   ` Vivekanandan, Balasubramani
2025-10-16 20:22     ` Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 22/22] drm/xe/xe3p: Add xe3p EU stall data format Lucas De Marchi
2025-10-15 23:58   ` Dixit, Ashutosh
2025-10-16  3:25     ` Lucas De Marchi
2025-10-16  5:11 ` ✗ CI.checkpatch: warning for drm/xe: Add Xe3p support (rev2) Patchwork
2025-10-16  5:13 ` ✓ CI.KUnit: success " Patchwork
2025-10-16  5:55 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-10-16 23:29 ` ✗ Xe.CI.Full: " 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=176064576184.2362.16093674347122378319@intel.com \
    --to=gustavo.sousa@intel.com \
    --cc=balasubramani.vivekanandan@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=shekhar.chauhan@intel.com \
    --cc=tejas.upadhyay@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