public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/xe: Fix some rebar issues
@ 2025-09-18 20:58 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-09-18 20:58 ` [PATCH 2/2] drm/xe: Move rebar to be done earlier Lucas De Marchi
  0 siblings, 2 replies; 10+ messages in thread
From: Lucas De Marchi @ 2025-09-18 20:58 UTC (permalink / raw)
  To: intel-xe, linux-pci, dri-devel
  Cc: Lucas De Marchi, Ilpo Järvinen, Icenowy Zheng, Vivian Wang,
	Thomas Hellström, Rodrigo Vivi, Bjorn Helgaas, Simon Richter,
	linux-kernel, stable

Our implementation for BAR2 (lmembar) resize works at the xe_vram layer
and only releases that BAR before resizing. That is not always
sufficient. If the parent bridge needs to move, the BAR0 also needs to
be released, otherwise the resize fails. This is the case of not having
enough space allocated from the beginning.

Also, there's a BAR0 in the upstream port of the pcie switch in BMG
preventing the resize to propagate to the bridge as previously discussed
in https://lore.kernel.org/intel-xe/20250721173057.867829-1-uwu@icenowy.me/
and https://lore.kernel.org/intel-xe/wqukxnxni2dbpdhri3cbvlrzsefgdanesgskzmxi5sauvsirsl@xor663jw2cdw
I'm bringing that commit from Ilpo here so this can be tested with the
xe changes and propagate to stable. Note that the use of a pci fixup is
not ideal, but without intrusive changes on resource fitting it's
possibly the best alternative. I also have confirmation from HW folks
that the BAR in the upstream port has no production use.

I have more cleanups on top on the xe side, but those conflict with some
refactors Ilpo is working on as prep for the resource fitting, so I will
wait things settle to submit again.

I propose to take this through the drm tree.

With this I could resize the lmembar on some problematic hosts and after
doing an SBR, with one caveat: the audio device also prevents the BAR
from moving and it needs to be manually removed before resizing. With
the PCI refactors and BAR fitting logic that Ilpo is working on, it's
expected that it won't be needed for a long time.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
Ilpo Järvinen (1):
      PCI: Release BAR0 of an integrated bridge to allow GPU BAR resize

Lucas De Marchi (1):
      drm/xe: Move rebar to be done earlier

 drivers/gpu/drm/xe/xe_pci.c  |  2 ++
 drivers/gpu/drm/xe/xe_vram.c | 34 ++++++++++++++++++++++++++--------
 drivers/gpu/drm/xe/xe_vram.h |  1 +
 drivers/pci/quirks.c         | 23 +++++++++++++++++++++++
 4 files changed, 52 insertions(+), 8 deletions(-)

base-commit: 8031d70dbb4201841897de480cec1f9750d4a5dc
change-id: 20250917-xe-pci-rebar-2-c0fe2f04c879

Lucas De Marchi


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-10-27 15:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-10-10  5:18       ` Lucas De Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox