All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] accel/ivpu: Limit DMA address width to 42 bits on 40XX and later
@ 2026-10-06  9:37 Karol Wachowski
  2026-10-06  9:42 ` Dawid Osuchowski
  0 siblings, 1 reply; 3+ messages in thread
From: Karol Wachowski @ 2026-10-06  9:37 UTC (permalink / raw)
  To: dri-devel
  Cc: oded.gabbay, jeff.hugo, lizhi.hou, andrzej.kacprowski,
	dawid.osuchowski, Karol Wachowski

On 40XX and later the NPU does not treat address bits 42 and above as
part of the memory address, as the hardware uses them internally, but
ivpu sets a 48-bit DMA mask for these generations.

In practice the IOMMU capabilities already limit the DMA addresses to
42 bits, so this does not fix an observed problem. Set the DMA mask to
42 bits anyway, so the driver does not depend on the IOMMU
configuration to stay within the range the NPU can address. 37XX keeps
its 38-bit mask.

Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
---
 drivers/accel/ivpu/ivpu_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c
index ab1a9448c2cc..6b71edf566e7 100644
--- a/drivers/accel/ivpu/ivpu_drv.c
+++ b/drivers/accel/ivpu/ivpu_drv.c
@@ -709,7 +709,7 @@ static int ivpu_pci_init(struct ivpu_device *vdev)
 	}
 
 	if (ivpu_hw_ip_gen(vdev) >= IVPU_HW_IP_40XX)
-		dma_bits = 48;
+		dma_bits = 42;
 	else
 		dma_bits = 38;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-08  8:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06  9:37 [PATCH] accel/ivpu: Limit DMA address width to 42 bits on 40XX and later Karol Wachowski
2026-10-06  9:42 ` Dawid Osuchowski
2026-10-08  8:20   ` Wachowski, Karol

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.