summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2025-11-13 18:26:25 +0200
committerBjorn Helgaas <bhelgaas@google.com>2025-11-14 12:34:11 -0600
commit1a3c05b32bf06f3440ddd8a6fef97e628f14aaec (patch)
tree2f1adb0c98dfae2da38e7970bebca20017a46c8f
parentd787018e2dfdc4c1331538e7a8717690d1b7c9b3 (diff)
downloadlinux-1a3c05b32bf06f3440ddd8a6fef97e628f14aaec.tar.gz
linux-1a3c05b32bf06f3440ddd8a6fef97e628f14aaec.zip
drm/xe: Remove driver side BAR release before resize
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 <ilpo.jarvinen@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patch.msgid.link/20251113162628.5946-9-ilpo.jarvinen@linux.intel.com
-rw-r--r--drivers/gpu/drm/xe/xe_vram.c3
1 files changed, 0 insertions, 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",