Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915: 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 i915 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-10-ilpo.jarvinen@linux.intel.com

authored by

Ilpo Järvinen and committed by
Bjorn Helgaas
4efaa80b 1a3c05b3

-12
-12
drivers/gpu/drm/i915/gt/intel_region_lmem.c
··· 18 18 #include "gt/intel_gt_regs.h" 19 19 20 20 #ifdef CONFIG_64BIT 21 - static void _release_bars(struct pci_dev *pdev) 22 - { 23 - int resno; 24 - 25 - for (resno = PCI_STD_RESOURCES; resno < PCI_STD_RESOURCE_END; resno++) { 26 - if (pci_resource_len(pdev, resno)) 27 - pci_release_resource(pdev, resno); 28 - } 29 - } 30 - 31 21 static void 32 22 _resize_bar(struct drm_i915_private *i915, int resno, resource_size_t size) 33 23 { 34 24 struct pci_dev *pdev = to_pci_dev(i915->drm.dev); 35 25 int bar_size = pci_rebar_bytes_to_size(size); 36 26 int ret; 37 - 38 - _release_bars(pdev); 39 27 40 28 ret = pci_resize_resource(pdev, resno, bar_size, 0); 41 29 if (ret) {