Le 12/09/2025 à 13:47, Jörg Rödel a écrit :
On Thu, Sep 11, 2025 at 05:57:13PM +0200, Benjamin Gaignard wrote:
quoted
The Verisilicon IOMMU hardware block can be found in combination
with Verisilicon hardware video codecs (encoders or decoders) on
different SoCs.
Enable it will allow us to use non contiguous memory allocators
for Verisilicon video codecs.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
drivers/iommu/Kconfig | 11 +
drivers/iommu/Makefile | 1 +
drivers/iommu/vsi-iommu.c | 808 ++++++++++++++++++++++++++++++++++++++
include/linux/vsi-iommu.h | 21 +
4 files changed, 841 insertions(+)
create mode 100644 drivers/iommu/vsi-iommu.c
create mode 100644 include/linux/vsi-iommu.h
This will not go in before Will Deacons comment about code duplication with the
Rockchip driver is addressed.
It isn't the same hardware block, not from the same IP vendor and the bits set aren't the same.
pm_runtime, clock, spin_lock aren't managed differently.
The common point is they both use 2-level page table.
VSI iommu need an additional function to restore iommu context before decoding
each frame, rockchip doesn't need it.
Regards,
Benjamin
Joerg