From: Gustavo Sousa <gustavo.sousa@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] drm/xe/tuning: Use proper register offset for GAMSTLB_CTRL
Date: Mon, 13 Apr 2026 17:50:50 -0300 [thread overview]
Message-ID: <87eckioa8l.fsf@intel.com> (raw)
In-Reply-To: <20260413191755.GH6301@mdroper-desk1.amr.corp.intel.com>
Matt Roper <matthew.d.roper@intel.com> writes:
> On Mon, Apr 13, 2026 at 12:36:46PM -0300, Gustavo Sousa wrote:
>> Matt Roper <matthew.d.roper@intel.com> writes:
>>
>> > From Xe2 onward (i.e., all platforms officially supported by the Xe
>> > driver), the GAMSTLB_CTRL register is located at offset 0x477C and
>> > represented by the macro "GAMSTLB_CTRL" in code. However the register
>> > formerly resided at offset 0xCF4C on Xe1-era platforms, and we also have
>> > macro XEHP_GAMSTLB_CTRL that represents this old offset in the
>> > unofficial/developer-only Xe1 code. When tuning for the register was
>> > added for Xe3p_LPG, the old Xe1-era macro was accidentally used instead
>> > of the proper macro for Xe2 and beyond, causing the tuning to not be
>> > applied properly. Use the proper definition so that the correct offset
>> > is written to.
>> >
>> > Bspec: 59298
>> > Fixes: 377c89bfaa5d ("drm/xe/xe3p_lpg: Set STLB bank hash mode to 4KB")
>> > Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
>> > ---
>> > drivers/gpu/drm/xe/xe_tuning.c | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/gpu/drm/xe/xe_tuning.c b/drivers/gpu/drm/xe/xe_tuning.c
>> > index ea48e2a60fcd..6fb8887d1482 100644
>> > --- a/drivers/gpu/drm/xe/xe_tuning.c
>> > +++ b/drivers/gpu/drm/xe/xe_tuning.c
>> > @@ -97,7 +97,7 @@ static const struct xe_rtp_entry_sr gt_tunings[] = {
>> > { XE_RTP_NAME("Tuning: Set STLB Bank Hash Mode to 4KB"),
>> > XE_RTP_RULES(GRAPHICS_VERSION_RANGE(3510, XE_RTP_END_VERSION_UNDEFINED),
>> > IS_INTEGRATED),
>> > - XE_RTP_ACTIONS(FIELD_SET(XEHP_GAMSTLB_CTRL, BANK_HASH_MODE,
>> > + XE_RTP_ACTIONS(FIELD_SET(GAMSTLB_CTRL, BANK_HASH_MODE,
>> > BANK_HASH_4KB_MODE))
>>
>> Should we also consolidate the definitions in xe_gt_regs.h into a single
>> section as well?
>
> We've intentionally avoided doing that in Xe; when a register exists at
> different locations on different IP versions, we still maintain each
> definition at a properly offset-sorted location. Making exceptions to
> the sorting rules got too chaotic on i915 so we decided early on not to
> allow that with Xe.
Ah, okay. Makes sense. On the other hand, we end up with a
fragmentation of where the bits are defined? For example, if SOME_REG
changes the offset in a new hardware release, has new fields, but also
shares some fields with the previous version, I guess we would have the
field definitions in different places.
By the way, should we write down the rules for register headers for Xe
somewhere? (Unless it is already written somewhere and I did a poor job
searching for it.)
--
Gustavo Sousa
>
>
> Matt
>
>>
>> In any case,
>>
>> Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
>>
>> > },
>> > };
>> >
>> > --
>> > 2.53.0
>
> --
> Matt Roper
> Graphics Software Engineer
> Linux GPU Platform Enablement
> Intel Corporation
next prev parent reply other threads:[~2026-04-13 20:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 22:50 [PATCH 0/3] Xe3p tuning and workaround fixes Matt Roper
2026-04-10 22:50 ` [PATCH 1/3] drm/xe/tuning: Stop applying CCCHKNREG1 tuning from Xe3p onward Matt Roper
2026-04-13 15:28 ` Gustavo Sousa
2026-04-10 22:50 ` [PATCH 2/3] drm/xe/tuning: Use proper register offset for GAMSTLB_CTRL Matt Roper
2026-04-13 15:36 ` Gustavo Sousa
2026-04-13 19:17 ` Matt Roper
2026-04-13 20:50 ` Gustavo Sousa [this message]
2026-04-10 22:50 ` [PATCH 3/3] drm/xe: Mark ROW_CHICKEN5 as a masked register Matt Roper
2026-04-13 15:44 ` Gustavo Sousa
2026-04-10 23:35 ` ✓ CI.KUnit: success for Xe3p tuning and workaround fixes Patchwork
2026-04-11 0:17 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-11 10:51 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-13 19:42 ` Matt Roper
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=87eckioa8l.fsf@intel.com \
--to=gustavo.sousa@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox