From: Gustavo Sousa <gustavo.sousa@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/4] drm/i915/bw: Deduplicate intel_sa_info instances
Date: Fri, 10 Apr 2026 11:49:14 -0300 [thread overview]
Message-ID: <87fr52x445.fsf@intel.com> (raw)
In-Reply-To: <20260409232630.GC6301@mdroper-desk1.amr.corp.intel.com>
Matt Roper <matthew.d.roper@intel.com> writes:
> On Wed, Apr 08, 2026 at 03:53:00PM -0300, Gustavo Sousa wrote:
>> Now that intel_sa_info contains bandwidth parameters specific to the
>> display IP, we can drop many duplicates and reuse from previous
>> releases.
>>
>> Let's do that and also simplify intel_bw_init_hw() while at it.
>>
>> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
>> ---
>> drivers/gpu/drm/i915/display/intel_bw.c | 44 ++++++---------------------------
>> 1 file changed, 8 insertions(+), 36 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c
>> index ed840b592eff..654876215ace 100644
>> --- a/drivers/gpu/drm/i915/display/intel_bw.c
>> +++ b/drivers/gpu/drm/i915/display/intel_bw.c
>> @@ -516,27 +516,7 @@ static const struct intel_sa_info rkl_sa_info = {
>> .displayrtids = 128,
>> };
>>
>> -static const struct intel_sa_info adls_sa_info = {
>> - .deburst = 16,
>> - .displayrtids = 256,
>> -};
>> -
>> -static const struct intel_sa_info adlp_sa_info = {
>> - .deburst = 16,
>> - .displayrtids = 256,
>> -};
>> -
>> -static const struct intel_sa_info mtl_sa_info = {
>> - .deburst = 32,
>> - .displayrtids = 256,
>> -};
>> -
>> -static const struct intel_sa_info xe3lpd_sa_info = {
>> - .deburst = 32,
>> - .displayrtids = 256,
>> -};
>> -
>> -static const struct intel_sa_info xe3lpd_3002_sa_info = {
>> +static const struct intel_sa_info xelpdp_sa_info = {
>> .deburst = 32,
>> .displayrtids = 256,
>> };
>> @@ -903,25 +883,17 @@ void intel_bw_init_hw(struct intel_display *display)
>> if (DISPLAY_VER(display) >= 35)
>> drm_WARN_ON(display->drm, dram_info->ecc_impacting_de_bw);
>>
>> - if (DISPLAY_VER(display) >= 30) {
>> - if (DISPLAY_VERx100(display) == 3002)
>> - tgl_get_bw_info(display, dram_info, &xe3lpd_3002_sa_info);
>> - else
>> - tgl_get_bw_info(display, dram_info, &xe3lpd_sa_info);
>> - } else if (DISPLAY_VERx100(display) >= 1401 && display->platform.dgfx) {
>> + if (DISPLAY_VERx100(display) >= 1401 && display->platform.dgfx) {
>> xe2_hpd_get_bw_info(display, dram_info);
>> } else if (DISPLAY_VER(display) >= 14) {
>> - tgl_get_bw_info(display, dram_info, &mtl_sa_info);
>> + tgl_get_bw_info(display, dram_info, &xelpdp_sa_info);
>> } else if (display->platform.dg2) {
>> dg2_get_bw_info(display);
>> - } else if (display->platform.alderlake_p) {
>> - tgl_get_bw_info(display, dram_info, &adlp_sa_info);
>> - } else if (display->platform.alderlake_s) {
>> - tgl_get_bw_info(display, dram_info, &adls_sa_info);
>> - } else if (display->platform.rocketlake) {
>> - tgl_get_bw_info(display, dram_info, &rkl_sa_info);
>> - } else if (DISPLAY_VER(display) == 12) {
>> - tgl_get_bw_info(display, dram_info, &tgl_sa_info);
>> + } else if (DISPLAY_VER(display) >= 12) {
>> + if (display->platform.rocketlake)
>> + tgl_get_bw_info(display, dram_info, &rkl_sa_info);
>> + else
>> + tgl_get_bw_info(display, dram_info, &tgl_sa_info);
>
> It seems strange to need to need to drop back to a platform check here
> on something that's supposed to be tied to IP version. But if I recall
> correctly, RKL was a bit of a strange frankenstein platform where TGL's
> "gen12" IP got backported onto an ICL-style chassis, which caused it to
> inherit various ICL traits despite the new IP. It might actually be
> more clear to just re-use the icl_sa_info for that one and leave a
> comment admitting that yeah, RKL was an oddball platform that didn't
> really follow the rules.
Huh. Yep, using icl_sa_info sounds good; I totally missed the fact that
rkl_sa_info matched icl_sa_info.
>
> We might also want to rename tgl_sa_info to "gen12_sa_info" since that's
> a more accurate description (and is the last version where we're allowed
> to use the "gen" terminology rather than the new marketing names for the
> IP). By similar logic, "icl_sa_info" should become "gen11_sa_info"
> since it does indeed get used on the other gen11 platforms too
> (jsl/ehl).
Sounds good. Since I'm renaming the struct type name to
intel_display_bw_params (to indicate that those are tied to the display
IP) in a separate patch, I think it makes sense to do the instances
renaming there as well. Ack on moving back to mtl_sa_info here and then
doing all renaming in the patch that also renames the struct type?
--
Gustavo Sousa
>
>
> Matt
>
>> } else if (DISPLAY_VER(display) == 11) {
>> icl_get_bw_info(display, dram_info, &icl_sa_info);
>> }
>>
>> --
>> 2.53.0
>>
>
> --
> Matt Roper
> Graphics Software Engineer
> Linux GPU Platform Enablement
> Intel Corporation
next prev parent reply other threads:[~2026-04-10 14:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 18:52 [PATCH 0/4] drm/i915/bw: Split bandwidth params into platform- and display-IP-specific structs Gustavo Sousa
2026-04-08 18:52 ` [PATCH 1/4] drm/i915/bw: Extract platform-specific parameters Gustavo Sousa
2026-04-08 19:16 ` Jani Nikula
2026-04-08 19:41 ` Gustavo Sousa
2026-04-09 23:12 ` Matt Roper
2026-04-10 14:39 ` Gustavo Sousa
2026-04-10 17:33 ` Matt Roper
2026-04-10 21:15 ` Gustavo Sousa
2026-04-08 18:53 ` [PATCH 2/4] drm/i915/bw: Deduplicate intel_sa_info instances Gustavo Sousa
2026-04-09 23:26 ` Matt Roper
2026-04-10 14:49 ` Gustavo Sousa [this message]
2026-04-10 17:36 ` Matt Roper
2026-04-08 18:53 ` [PATCH 3/4] drm/i915/bw: Rename struct intel_sa_info to intel_display_bw_params Gustavo Sousa
2026-04-08 19:20 ` Jani Nikula
2026-04-08 19:51 ` Gustavo Sousa
2026-04-09 23:32 ` Matt Roper
2026-04-08 18:53 ` [PATCH 4/4] drm/i915/bw: Extract get_display_bw_params() Gustavo Sousa
2026-04-08 19:21 ` Jani Nikula
2026-04-09 1:23 ` ✓ i915.CI.BAT: success for drm/i915/bw: Split bandwidth params into platform- and display-IP-specific structs Patchwork
2026-04-09 8:33 ` ✓ i915.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=87fr52x445.fsf@intel.com \
--to=gustavo.sousa@intel.com \
--cc=intel-gfx@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