Skip to content

Commit 617562b

Browse files
dramforeverThomas Gleixner
authored andcommitted
drm/radeon: Make MSI address limit based on the device DMA limit
The radeon driver restricts the MSI message address for devices older than the BONAIR generation to 32-bit MSI addresses due to the former restrictions of the PCI/MSI code which only allowed either 32-bit or full 64-bit address range. This does not work on platforms which have a MSI doorbell address above the 32-bit boundary but do not support the full 64 bit address range. The PCI/MSI core converted this binary decision to a DMA_BIT_MASK() based decision, which allows to describe the device limitations precisely. Convert the driver to provide the exact DMA address limitations to the PCI/MSI core. That allows devices which do not support the full 64-bit address space to work on platforms which have a MSI doorbell address above the 32-bit limit as long as it is within the hardware's addressable range. [ tglx: Massage changelog ] Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patch.msgid.link/20260129-pci-msi-addr-mask-v4-3-70da998f2750@iscas.ac.cn
1 parent 52f0d86 commit 617562b

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

drivers/gpu/drm/radeon/radeon_device.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,7 @@ int radeon_device_init(struct radeon_device *rdev,
13741374
pr_warn("radeon: No suitable DMA available\n");
13751375
return r;
13761376
}
1377+
rdev->pdev->msi_addr_mask = DMA_BIT_MASK(dma_bits);
13771378
rdev->need_swiotlb = drm_need_swiotlb(dma_bits);
13781379

13791380
/* Registers mapping */

drivers/gpu/drm/radeon/radeon_irq_kms.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -245,16 +245,6 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
245245
if (rdev->flags & RADEON_IS_AGP)
246246
return false;
247247

248-
/*
249-
* Older chips have a HW limitation, they can only generate 40 bits
250-
* of address for "64-bit" MSIs which breaks on some platforms, notably
251-
* IBM POWER servers, so we limit them
252-
*/
253-
if (rdev->family < CHIP_BONAIRE) {
254-
dev_info(rdev->dev, "radeon: MSI limited to 32-bit\n");
255-
rdev->pdev->msi_addr_mask = DMA_BIT_MASK(32);
256-
}
257-
258248
/* force MSI on */
259249
if (radeon_msi == 1)
260250
return true;

0 commit comments

Comments
 (0)