On Fri, 14 Nov 2025, Alex Bennée wrote: > Ilpo Järvinen <[email protected]> writes: > > > PCI core handles releasing device's resources and their rollback in > > case of failure of a BAR resizing operation. Releasing resource prior > > to calling pci_resize_resource() prevents PCI core from restoring the > > BARs as they were. > > > > Remove driver-side release of BARs from the xe driver. > > > > Signed-off-by: Ilpo Järvinen <[email protected]> > > Cc: Lucas De Marchi <[email protected]> > > --- > > drivers/gpu/drm/xe/xe_vram.c | 3 --- > > 1 file changed, 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/xe/xe_vram.c b/drivers/gpu/drm/xe/xe_vram.c > > index 00dd027057df..5aacab9358a4 100644 > > --- a/drivers/gpu/drm/xe/xe_vram.c > > +++ b/drivers/gpu/drm/xe/xe_vram.c > > @@ -33,9 +33,6 @@ _resize_bar(struct xe_device *xe, int resno, > > resource_size_t size) > > int bar_size = pci_rebar_bytes_to_size(size); > > int ret; > > > > - if (pci_resource_len(pdev, resno)) > > - pci_release_resource(pdev, resno); > > - > > ret = pci_resize_resource(pdev, resno, bar_size, 0); > > if (ret) { > > drm_info(&xe->drm, "Failed to resize BAR%d to %dM (%pe). > > Consider enabling 'Resizable BAR' support in your BIOS\n", > > This didn't apply, I assume due to a clash with: > > d30203739be79 (drm/xe: Move rebar to be done earlier)
The xe driver changes do not matter if you using only amdgpu. We know those xe changes in the drm tree conflict as the need for this BAR resizing rework was not know when the xe changes were made. The resolution is just to remove the release_bars() function from xe driver completely as BAR releasing prior to resize is now handled by pci_resize_resource(). -- i.
