Re: [PATCH 3/5] iommu: Add verisilicon IOMMU driver
From: Diederik de Haas <hidden>
Date: 2025-06-17 13:05:09
Also in:
linux-devicetree, linux-iommu, linux-media, linux-rockchip, lkml
Hi, On Mon Jun 16, 2025 at 4:55 PM CEST, Benjamin Gaignard wrote:
Verisilicon IOMMU hardware block can be found in combination
Can there be only 1 hardware block or is multiple possible? If only 1, then I'd start with "The Verisilicon ...". If more then one, then I'd use "blocks".
with hardware video codecs (encoders or decoders) on different SoCs.
This makes it sound like it can also be used with non-Verisilicon codecs and based on the DT binding description, I get the _impression_ that that is not the case? But it's actually not clear to me if that's the case or not.
Enable it will allows to use non contiguous memory
"Enabling it will allow us to use non ..." or "Enable it to allow [the] use of non ..." or "Enabling allows the use of non ..."
allocators for Verisilicon video codecs.
And the wrapping of the whole commit message is not following the standards.
quoted hunk ↗ jump to hunk
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> --- drivers/iommu/Kconfig | 8 + drivers/iommu/Makefile | 1 + drivers/iommu/vsi-iommu.c | 900 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 909 insertions(+) create mode 100644 drivers/iommu/vsi-iommu.cdiff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index 0a33d995d15d..4cf4504dcc25 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig@@ -383,4 +383,12 @@ config SPRD_IOMMU Say Y here if you want to use the multimedia devices listed above. +config VSI_IOMMU + bool "Verisilicon IOMMU Support" + depends on ARM64 + select IOMMU_API + select ARM_DMA_USE_IOMMU + help + Support for IOMMUs used by Verisilicon video decoders. + endif # IOMMU_SUPPORTdiff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile index 355294fa9033..68aeff31af8b 100644 --- a/drivers/iommu/Makefile +++ b/drivers/iommu/Makefile@@ -34,3 +34,4 @@ obj-$(CONFIG_IOMMU_SVA) += iommu-sva.o obj-$(CONFIG_IOMMU_IOPF) += io-pgfault.o obj-$(CONFIG_SPRD_IOMMU) += sprd-iommu.o obj-$(CONFIG_APPLE_DART) += apple-dart.o +obj-$(CONFIG_VSI_IOMMU) += vsi-iommu.odiff --git a/drivers/iommu/vsi-iommu.c b/drivers/iommu/vsi-iommu.c new file mode 100644 index 000000000000..f2fa1197916c --- /dev/null +++ b/drivers/iommu/vsi-iommu.c@@ -0,0 +1,900 @@ +// SPDX-License-Identifier: GPL-2.0-only +
No copyright statement? (or an informational header block?) Cheers, Diederik
+#include <linux/clk.h> + <snip>
Attachments
- signature.asc [application/pgp-signature] 228 bytes