Skip to content

Commit 439fc29

Browse files
committed
Merge tag 'drm-fixes-2025-11-09' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fix from Dave Airlie: "Brown paper bag, the dma mask fix which I applied and actually looked through for bad things, actually broke newer GPUs, there might be some latent part in the boot path that is assuming 32-bit still, but we will figure that out elsewhere. nouveau: - revert DMA mask change" * tag 'drm-fixes-2025-11-09' of https://gitlab.freedesktop.org/drm/kernel: Revert "drm/nouveau: set DMA mask before creating the flush page"
2 parents 41d318c + 4113361 commit 439fc29

File tree

1 file changed

+12
-12
lines changed
  • drivers/gpu/drm/nouveau/nvkm/engine/device

1 file changed

+12
-12
lines changed

drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,18 +1695,6 @@ nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg,
16951695
*pdevice = &pdev->device;
16961696
pdev->pdev = pci_dev;
16971697

1698-
/* Set DMA mask based on capabilities reported by the MMU subdev. */
1699-
if (pdev->device.mmu && !pdev->device.pci->agp.bridge)
1700-
bits = pdev->device.mmu->dma_bits;
1701-
else
1702-
bits = 32;
1703-
1704-
ret = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(bits));
1705-
if (ret && bits != 32) {
1706-
dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32));
1707-
pdev->device.mmu->dma_bits = 32;
1708-
}
1709-
17101698
ret = nvkm_device_ctor(&nvkm_device_pci_func, quirk, &pci_dev->dev,
17111699
pci_is_pcie(pci_dev) ? NVKM_DEVICE_PCIE :
17121700
pci_find_capability(pci_dev, PCI_CAP_ID_AGP) ?
@@ -1720,5 +1708,17 @@ nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg,
17201708
if (ret)
17211709
return ret;
17221710

1711+
/* Set DMA mask based on capabilities reported by the MMU subdev. */
1712+
if (pdev->device.mmu && !pdev->device.pci->agp.bridge)
1713+
bits = pdev->device.mmu->dma_bits;
1714+
else
1715+
bits = 32;
1716+
1717+
ret = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(bits));
1718+
if (ret && bits != 32) {
1719+
dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32));
1720+
pdev->device.mmu->dma_bits = 32;
1721+
}
1722+
17231723
return 0;
17241724
}

0 commit comments

Comments
 (0)