public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-xe@lists.freedesktop.org, linux-pci@vger.kernel.org,
	dri-devel@lists.freedesktop.org, "Icenowy Zheng" <uwu@icenowy.me>,
	"Vivian Wang" <wangruikang@iscas.ac.cn>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Simon Richter" <Simon.Richter@hogyros.de>,
	LKML <linux-kernel@vger.kernel.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/xe: Move rebar to be done earlier
Date: Mon, 29 Sep 2025 16:56:03 +0300 (EEST)	[thread overview]
Message-ID: <dfdd45b2-5a8c-cfea-ecd3-495e947022d1@linux.intel.com> (raw)
In-Reply-To: <5osrqzgrh47n6rpjulvsixwbhbh5vwxrrn6p6hpodnwisjfung@lmivgjb66oed>

[-- Attachment #1: Type: text/plain, Size: 2960 bytes --]

On Mon, 29 Sep 2025, Lucas De Marchi wrote:

> Hi,
> 
> On Thu, Sep 18, 2025 at 01:58:57PM -0700, Lucas De Marchi wrote:
> > There may be cases in which the BAR0 also needs to move to accommodate
> > the bigger BAR2. However if it's not released, the BAR2 resize fails.
> > During the vram probe it can't be released as it's already in use by
> > xe_mmio for early register access.
> > 
> > Add a new function in xe_vram and let xe_pci call it directly before
> > even early device probe. This allows the BAR2 to resize in cases BAR0
> > also needs to move:
> > 
> > 	[] xe 0000:03:00.0: vgaarb: deactivate vga console
> > 	[] xe 0000:03:00.0: [drm] Attempting to resize bar from 8192MiB ->
> > 16384MiB
> > 	[] xe 0000:03:00.0: BAR 0 [mem 0x83000000-0x83ffffff 64bit]: releasing
> > 	[] xe 0000:03:00.0: BAR 2 [mem 0x4000000000-0x41ffffffff 64bit pref]:
> > releasing
> > 	[] pcieport 0000:02:01.0: bridge window [mem 0x4000000000-0x41ffffffff
> > 64bit pref]: releasing
> > 	[] pcieport 0000:01:00.0: bridge window [mem 0x4000000000-0x41ffffffff
> > 64bit pref]: releasing
> > 	[] pcieport 0000:01:00.0: bridge window [mem 0x4000000000-0x43ffffffff
> > 64bit pref]: assigned
> > 	[] pcieport 0000:02:01.0: bridge window [mem 0x4000000000-0x43ffffffff
> > 64bit pref]: assigned
> > 	[] xe 0000:03:00.0: BAR 2 [mem 0x4000000000-0x43ffffffff 64bit pref]:
> > assigned
> > 	[] xe 0000:03:00.0: BAR 0 [mem 0x83000000-0x83ffffff 64bit]: assigned
> > 	[] pcieport 0000:00:01.0: PCI bridge to [bus 01-04]
> > 	[] pcieport 0000:00:01.0:   bridge window [mem 0x83000000-0x840fffff]
> > 	[] pcieport 0000:00:01.0:   bridge window [mem
> > 0x4000000000-0x44007fffff 64bit pref]
> > 	[] pcieport 0000:01:00.0: PCI bridge to [bus 02-04]
> > 	[] pcieport 0000:01:00.0:   bridge window [mem 0x83000000-0x840fffff]
> > 	[] pcieport 0000:01:00.0:   bridge window [mem
> > 0x4000000000-0x43ffffffff 64bit pref]
> > 	[] pcieport 0000:02:01.0: PCI bridge to [bus 03]
> > 	[] pcieport 0000:02:01.0:   bridge window [mem 0x83000000-0x83ffffff]
> > 	[] pcieport 0000:02:01.0:   bridge window [mem
> > 0x4000000000-0x43ffffffff 64bit pref]
> > 	[] xe 0000:03:00.0: [drm] BAR2 resized to 16384M
> > 	[] xe 0000:03:00.0: [drm:xe_pci_probe [xe]] BATTLEMAGE  e221:0000
> > dgfx:1 gfx:Xe2_HPG (20.02) ...
> > 
> > As shown above, it happens even before we try to read any register for
> > platform identification.
> > 
> > All the rebar logic is more pci-specific than xe-specific and can be
> > done very early in the probe sequence. In future it would be good to
> > move it out of xe_vram.c, but this refactor is left for later.
> 
> Ilpo, can you take a look on this patch? It fixed the issue that I had
> with BMG. It needs the first patch for the full fix, but the fixes are
> more or less orthogonal.

FWIW, it looks okay to me from PCI perspective,

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

-- 
 i.

  reply	other threads:[~2025-09-29 13:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-18 20:58 [PATCH 0/2] drm/xe: Fix some rebar issues Lucas De Marchi
2025-09-18 20:58 ` [PATCH 1/2] PCI: Release BAR0 of an integrated bridge to allow GPU BAR resize Lucas De Marchi
2025-10-02 16:09   ` Lucas De Marchi
2025-10-24 22:44   ` Bjorn Helgaas
2025-10-24 23:00     ` Lucas De Marchi
2025-10-27 15:04     ` Ilpo Järvinen
2025-09-18 20:58 ` [PATCH 2/2] drm/xe: Move rebar to be done earlier Lucas De Marchi
2025-09-29 13:37   ` Lucas De Marchi
2025-09-29 13:56     ` Ilpo Järvinen [this message]
2025-10-10  5:18       ` Lucas De Marchi

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=dfdd45b2-5a8c-cfea-ecd3-495e947022d1@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=Simon.Richter@hogyros.de \
    --cc=bhelgaas@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=uwu@icenowy.me \
    --cc=wangruikang@iscas.ac.cn \
    /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