From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 999A9C7115A for ; Thu, 19 Jun 2025 15:49:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=KxOrmJuvwCACiDkia+2IKmRWoZnTHvbBQ0cNmd04Mbc=; b=AG5 NaW5l7r8Wi9H2fGg/PkTPLKZL6Df51LYQN56A9UkgRpFuOUXd1JeoIttgtgJ24zg0AhGzeIF9R0Ou lrUXkOEtJh5MhsMw4E6692pzJZexemFx6+GOiI5HDnrUEJTY7e9+NJk12c4zubZMj34Wh4BQ11QXR FClxkwAvS6POCfm2HlgUv3ZZUAt0wNzLGgWx8wcp4n0u6zEEE5R65v3YxCGOlacZai1PtivhsFsBw juws8m7BdG7jmw3Xpuq9zOUr+w7d52nia/iaQzG1Z3yVb6jydA15xwcF3pEeIrtkcARp+LXruYYFk 9x0GIT0gxs/XGyKyr1iSvdEgMGKe8bw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uSHVf-0000000DXn5-18Ue; Thu, 19 Jun 2025 15:49:03 +0000 Received: from bali.collaboradmins.com ([2a01:4f8:201:9162::2]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uSF4K-0000000D8AL-2i4P; Thu, 19 Jun 2025 13:12:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1750338757; bh=Ork85X//Hh9e5Enb36KwQRqXelZ7oSr9ZRWSSzEpQ7k=; h=From:To:Cc:Subject:Date:From; b=iTr9XAn4jvk5BZir348XWWxi2oAsbZH9f8i1/44hpdnevwibIx6O4tBTxRUgIKLoM Slm1yEbcZ/hQxdJ5C6+27qnwa9PLfIpphg1pLqFPlNof60zCpTn9SBHhI4tuVJsLAE 5S3Fi2SZU5uY6ab1W+L1pYX+Ml+aDksUPJlfr6hVBzIn2fTZi20nuJMRAu88oitk2n VajsAfEgnomxFXn0dGdWKYBdxshHPz3ksTXz6ddkuhu99JwHLIvG2FWs3cEmZqlHdc 6Irkih+YYpOwBr6BsGkFrXch1qK7Nau4oSHr2vGrAxBEf9hDmg1LtaGEUL9z7jCenx xAvAqKWWUY4gQ== Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:ba4e:a6e2:6d63:7f02]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by bali.collaboradmins.com (Postfix) with ESMTPSA id 0FC0C17E05C1; Thu, 19 Jun 2025 15:12:37 +0200 (CEST) From: Benjamin Gaignard To: joro@8bytes.org, will@kernel.org, robin.murphy@arm.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de, nicolas.dufresne@collabora.com, jgg@ziepe.ca Cc: iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v3 0/5] Add support for Verisilicon IOMMU used by media codec blocks Date: Thu, 19 Jun 2025 15:12:21 +0200 Message-ID: <20250619131232.69208-1-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250619_061240_845989_2C5B9372 X-CRM114-Status: GOOD ( 19.60 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============5441223258856977743==" Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org --===============5441223258856977743== Content-Type: text/plain; charset=y Content-Transfer-Encoding: 8bit Hi all, This patch series adds support for the Verisilicon IOMMU, which is found in front of hardware encoder and decoder blocks in several SoCs using Verisilicon IP. A first implementation of this IOMMU is available on the Rockchip RK3588 SoC. Rockchip provides a driver for this hardware in their 6.1 kernel branch: https://github.com/rockchip-linux/kernel/blob/develop-6.1/drivers/iommu/rockchip-iommu-av1d.c This series includes: - a new binding for the Verisilicon IOMMU - a basic driver implementation - DT updates for RK3588 The driver was forward-ported from Rockchip’s 6.1 implementation, the prefix was renamed to vsi for generality, and several fixes were applied. AV1 decoding was tested using the stateless VPU driver and Fluster. The test results show a score of 205/239, which confirms that no regressions were introduced by this series. Feedback and testing welcome. changes in version 3: - Change compatible to "rockchip,rk3588-iommu-1.2" - Fix compatible in .yaml - Update DT and driver to use "rockchip,rk3588-iommu-1.2" compatible - Set CONFIG_VSI_IOMMU as module in defconfig - Create an identity domain for the driver - Fix double flush issue - Rework attach/detach logic - Simplify xlate function - Discover iommu device like done in ARM driver - Remove ARM_DMA_USE_IOMMU from Kconfig changes in version 2: - Add a compatible "rockchip,rk3588-av1-iommu" - Fix clock-names in binding - Remove "vsi_mmu" label in binding example. - Rework driver probe function - Remove double flush - Rework driver internal structures and avoid allocate in xlate function. - Do not touch to VPU driver anymore (path removed) - Add a patch to enable the driver in arm64 defconfig Benjamin Gaignard (5): dt-bindings: vendor-prefixes: Add Verisilicon dt-bindings: iommu: verisilicon: Add binding for VSI IOMMU iommu: Add verisilicon IOMMU driver arm64: dts: rockchip: Add verisilicon IOMMU node on RK3588 arm64: defconfig: enable Verisilicon IOMMU .../bindings/iommu/verisilicon,iommu.yaml | 71 ++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 11 + arch/arm64/configs/defconfig | 1 + drivers/iommu/Kconfig | 11 + drivers/iommu/Makefile | 1 + drivers/iommu/vsi-iommu.c | 874 ++++++++++++++++++ 7 files changed, 971 insertions(+) create mode 100644 Documentation/devicetree/bindings/iommu/verisilicon,iommu.yaml create mode 100644 drivers/iommu/vsi-iommu.c -- 2.43.0 --===============5441223258856977743== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip --===============5441223258856977743==--