From patchwork Thu Dec 28 13:16:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianfeng Liu X-Patchwork-Id: 13506056 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB9E58839; Thu, 28 Dec 2023 13:16:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DvlVOF/l" Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6d9cb95ddd1so835326b3a.1; Thu, 28 Dec 2023 05:16:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703769415; x=1704374215; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ryeoFuAvKhes97Kz9LboAlOnpJ0eP7zbuN7MA5+dcVU=; b=DvlVOF/lc78V5YLw2tqIK6mALwLwejRgIvQNXfO04Q1pK8cg5CwPeVqJTBJg4Vpn0g JewKMYxLowAgri3kHrZbj3+vMgtwF3+hxprUhz1sy7dmQBXgVDjZeihBQledGZk+0gXY beMlbwcd03jLj0MRqhtG93kenpIV63Nn1pshWv4XJzJdgeELv0xQHkZPjKEIDqkMyYaI TzrhSzyS7GuXC+BZrUc76/iKIxmDYRJGHDyMK/yTyRLZEOZR0XzzINjZUhki69PYbNRJ TsaIBUjqpyZGHGHDWgW6CzPce4unIq7nBN1G/DkzThJSj1dSA0JozjfvliRS7vVzpfYQ +goA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703769415; x=1704374215; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ryeoFuAvKhes97Kz9LboAlOnpJ0eP7zbuN7MA5+dcVU=; b=u16inqTn2Tb2sr4qUkxqZ/otkUjJG6Je+C4HgShs3133oN2IhPjKeKPXblZCrCZVZ3 f1LKwS8WbA5tsEV2y1jeRNzANzUxFl1orvfwRfKbFZl7+5fCCosvFa/hT0+O7ncoHk36 pXFWTo9VL3TYoLRhBISE0Fh1pEW24rvkLzKguimlTZp82QK33eH9IU5IYwQUy8i0EzNS JUL9EyeJBPr1wEAqZBqCdli5IaMyRSqnmP7fnXuUbIl65FUnWbpKcA5TnXbEh14inala E0BvA6kH+SeiuUUYmaFL7xnKMZIX+Sbrnox+Mvg1o8HU9AHG3pscu7+FO116zN/GrX2c 3J1A== X-Gm-Message-State: AOJu0YyjOqC2DTID0YIczCP37Cu2asEAN7EX/ON7iIB0zK7e77Z2TQJw POucOZF6iTa5zgWgDuq90QM= X-Google-Smtp-Source: AGHT+IHcpt2DYZLoqCeTFaYbserpY4VrjDSfDMGQyRlnv7vg7FZ26ANwqK9BvLR5rMSHJCN22ZYV0w== X-Received: by 2002:a17:903:22c7:b0:1d4:4fa3:2125 with SMTP id y7-20020a17090322c700b001d44fa32125mr3592329plg.126.1703769414990; Thu, 28 Dec 2023 05:16:54 -0800 (PST) Received: from localhost.localdomain ([2408:8207:2540:8c00:3708:559:ea20:9883]) by smtp.gmail.com with ESMTPSA id m10-20020a170902db0a00b001d0b4693539sm13864221plx.189.2023.12.28.05.16.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 05:16:54 -0800 (PST) From: Jianfeng Liu To: ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, heiko@sntech.de, sfr@canb.auug.org.au Cc: liujianfeng1994@gmail.com, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/3] media: verisilicon: Add support for Hantro G1 on RK3588 Date: Thu, 28 Dec 2023 21:16:15 +0800 Message-Id: <20231228131617.3411561-2-liujianfeng1994@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231228131617.3411561-1-liujianfeng1994@gmail.com> References: <20231228131617.3411561-1-liujianfeng1994@gmail.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This patch adds support for existing Hantro G1 video decoder on RK3588. Tested with FFmpeg v4l2_request code taken from [1] with MPEG2, H.264 and VP8 samples. [1] https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/multimedia/ffmpeg/patches/v4l2-request/ffmpeg-001-v4l2-request.patch Signed-off-by: Jianfeng Liu --- drivers/media/platform/verisilicon/hantro_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c index db3df6cc4..21334bb64 100644 --- a/drivers/media/platform/verisilicon/hantro_drv.c +++ b/drivers/media/platform/verisilicon/hantro_drv.c @@ -723,6 +723,7 @@ static const struct of_device_id of_hantro_match[] = { { .compatible = "rockchip,rk3568-vepu", .data = &rk3568_vepu_variant, }, { .compatible = "rockchip,rk3568-vpu", .data = &rk3568_vpu_variant, }, { .compatible = "rockchip,rk3588-av1-vpu", .data = &rk3588_vpu981_variant, }, + { .compatible = "rockchip,rk3588-vpu", .data = &rk3568_vpu_variant, }, #endif #ifdef CONFIG_VIDEO_HANTRO_IMX8M { .compatible = "nxp,imx8mm-vpu-g1", .data = &imx8mm_vpu_g1_variant, }, From patchwork Thu Dec 28 13:16:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianfeng Liu X-Patchwork-Id: 13506057 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26D5ADDCE; Thu, 28 Dec 2023 13:17:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MWZ5jh9y" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1d2e6e14865so28594555ad.0; Thu, 28 Dec 2023 05:17:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703769421; x=1704374221; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NOHuqM4F/gVoKxBS/slc+DUydkCrv1+Pt87gLb5xJoo=; b=MWZ5jh9yZSaehe2sWp56QK3V1aaGfqQvcdCSfisUdEGYT2LWbH+VB3KgvqkQ+FpZBy oG1C39X50JgBR7/zBzYlUPZfiBPJDphie4JBJVecebVLHr17wNMeEsqxdfw90Qxd0P1e +Egn4di/Cp0FqZ7zoTk5TzSbY0X+S/sHKV0uVLbTmqcSERjQteDS4tK+mSbhHFr/dL9X R6QPop8hRrv430T6lfV3XlRHlRsNz0DwqtQvL9zjkT2jNOErHzpPzRnzZMtuGW0htk08 XcdPxFx9XsY/vAnUXBfBB3xg093Kpa/MOoYKiCO4Mj1ZwtWlfZiAnMU2pR/EDxfWeTAx IILw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703769421; x=1704374221; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NOHuqM4F/gVoKxBS/slc+DUydkCrv1+Pt87gLb5xJoo=; b=jdr9sSF+bl3vAK3IzvjDk7KcS6qcczRvzwJauTyUMuHgrdIzGcjnznveKIbZ3HtLNa FxIoR+aCsXGegMWejJOmojNK0ISGGS/nmkfFycLhGJyKGkwJO75Q4+KtdZGcd/Jd4jwE 0c3wuWtMpv5bZdOPa4bOY6quZ8wW/HaRUzKRIVSdnFyrE6iuJ5UIL8JFWpaVDfTKkDO1 0VvO/A6DcdrllOQXH8fQMeV89NOKWi22gGrpfmH1f69ymOrJL5IDegF+NdpiTvH1NI6/ nl1/idBPlagegU1oyYU7aKiD+hN3XNuOkR24FkiBHmoquNYJRZw9/03fZkXISuEg9yVL wPRg== X-Gm-Message-State: AOJu0YwHeBnAIV5gRJPntGC4oVjLRPwmW6oxyNdEwBxWRPfRXUMta4pK czEz3cewEcxMgz9u3LVWeQ4= X-Google-Smtp-Source: AGHT+IHvUsAwqSISFkKD1q5Fd4VOygs5kVC7ixxcSE+3BDhaHyTfFWCWW9C2vOMKZbZAHKCAuX0wFw== X-Received: by 2002:a17:902:b598:b0:1d4:2e75:9b65 with SMTP id a24-20020a170902b59800b001d42e759b65mr3648629pls.108.1703769421504; Thu, 28 Dec 2023 05:17:01 -0800 (PST) Received: from localhost.localdomain ([2408:8207:2540:8c00:3708:559:ea20:9883]) by smtp.gmail.com with ESMTPSA id m10-20020a170902db0a00b001d0b4693539sm13864221plx.189.2023.12.28.05.16.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 05:17:01 -0800 (PST) From: Jianfeng Liu To: ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, heiko@sntech.de, sfr@canb.auug.org.au Cc: liujianfeng1994@gmail.com, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/3] arm64: dts: rockchip: Add Hantro G1 VPU support for RK3588 Date: Thu, 28 Dec 2023 21:16:16 +0800 Message-Id: <20231228131617.3411561-3-liujianfeng1994@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231228131617.3411561-1-liujianfeng1994@gmail.com> References: <20231228131617.3411561-1-liujianfeng1994@gmail.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This patch enables Hantro G1 video decoder in RK3588's devicetree. Tested with FFmpeg v4l2_request code taken from [1] with MPEG2, H.264 and VP8 samples. [1] https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/multimedia/ffmpeg/patches/v4l2-request/ffmpeg-001-v4l2-request.patch Signed-off-by: Jianfeng Liu --- arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi index 5fb0baf8a..5da668184 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi @@ -640,6 +640,26 @@ i2c0: i2c@fd880000 { status = "disabled"; }; + vpu: video-codec@fdb50400 { + compatible = "rockchip,rk3588-vpu"; + reg = <0x0 0xfdb50000 0x0 0x800>; + interrupts = ; + clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>; + clock-names = "aclk", "hclk"; + iommus = <&vdpu_mmu>; + power-domains = <&power RK3588_PD_VDPU>; + }; + + vdpu_mmu: iommu@fdb50800 { + compatible = "rockchip,rk3588-iommu", "rockchip,rk3568-iommu"; + reg = <0x0 0xfdb50800 0x0 0x40>; + interrupts = ; + clock-names = "aclk", "iface"; + clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>; + power-domains = <&power RK3588_PD_VDPU>; + #iommu-cells = <0>; + }; + vop: vop@fdd90000 { compatible = "rockchip,rk3588-vop"; reg = <0x0 0xfdd90000 0x0 0x4200>, <0x0 0xfdd95000 0x0 0x1000>; From patchwork Thu Dec 28 13:16:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianfeng Liu X-Patchwork-Id: 13506058 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33C77F4E1; Thu, 28 Dec 2023 13:17:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cP++dU7l" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1d3ef33e68dso40191615ad.1; Thu, 28 Dec 2023 05:17:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703769428; x=1704374228; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yN/BwR58sjs6Z6HNo7x/JKwvYgjONzYk0BGkAM4zBTw=; b=cP++dU7l5K23F16rYhlsogkj0dJtZJCvNtVYdyTjBBHkjRb66U3XV4AK0jX33kJqHS bPOOnHUuhmhg7J8YGUdJpHgfm/L1yWcF6o2FGHolmOzrIhmTVHm3gNzVAOJuB0PSNYIK r9cMkwtvftKbTYJ2cVd1c/KHEQ21KINi2ZMC81Ua0Vl5ExLsnjQAUl9NSscJhbHSDf+E 6pDxTDpB+WrB9ju/fP9qdlDmPKbofpGhpIbarR4fIcEi3t5XQzJ7W8iWpnZ8Qt4yv76e +Tjl1yArr6V6Gpa5ya+I+IiQg71WoW255gxfpk1XSIBqwXvHIUPRuWAVxaXzBlolMWKj pfWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703769428; x=1704374228; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yN/BwR58sjs6Z6HNo7x/JKwvYgjONzYk0BGkAM4zBTw=; b=qOs74FatyujBwn3l9jHdoKKcnaxt8MpFHAOwx888esrYeMukwSYKv1ZI/F7tdXGjz/ rkpeEq2OeknqT/dXuy5GqZK+tG5OM8IhWM0/B50OxWpl7V6JRfhZQ2V8YlDIiKwVSxyy FNNaO3PyoJHMixLGvtZLmdwVcjZzSZXItqgKEHHBpROKcbFoN7A2WSL6xv6luq2mzLcO lyqEBTLSizDwerNRUFTSx/TC0PvJFdya3hbKkh3iIWbN4U+wzX+BKFYwORm6eUiW6nw4 5FH36mgcx/WVDGu5MAiGpfoBn+bfvl6xXhTZzLWzuRoShn7yUIC7QMO68tFUpqbIlTrC ZUoQ== X-Gm-Message-State: AOJu0YwKv7l/XT3TdII29F6waWQyhRUCmYvFbRnmXeOs/hZaw37jTSuv 8xYMguprrVaJG6HswJf9FUc= X-Google-Smtp-Source: AGHT+IF+99H9vFulPcHP15rmUhxkM0gfuVWxtxhJUptQjIgcwPzGk7WYL5NXp8Vf+AEfz6qattXg1g== X-Received: by 2002:a17:902:784c:b0:1d4:7855:cdf6 with SMTP id e12-20020a170902784c00b001d47855cdf6mr3456088pln.30.1703769428408; Thu, 28 Dec 2023 05:17:08 -0800 (PST) Received: from localhost.localdomain ([2408:8207:2540:8c00:3708:559:ea20:9883]) by smtp.gmail.com with ESMTPSA id m10-20020a170902db0a00b001d0b4693539sm13864221plx.189.2023.12.28.05.17.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 05:17:08 -0800 (PST) From: Jianfeng Liu To: ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, heiko@sntech.de, sfr@canb.auug.org.au Cc: liujianfeng1994@gmail.com, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/3] dt-bindings: media: rockchip-vpu: Add RK3588 compatible Date: Thu, 28 Dec 2023 21:16:17 +0800 Message-Id: <20231228131617.3411561-4-liujianfeng1994@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231228131617.3411561-1-liujianfeng1994@gmail.com> References: <20231228131617.3411561-1-liujianfeng1994@gmail.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add compatible for rk3588 Hantro G1 vpu decoder. Signed-off-by: Jianfeng Liu --- Documentation/devicetree/bindings/media/rockchip-vpu.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml index c57e1f488..ba41446f6 100644 --- a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml +++ b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml @@ -25,6 +25,7 @@ properties: - rockchip,px30-vpu - rockchip,rk3568-vpu - rockchip,rk3588-av1-vpu + - rockchip,rk3588-vpu - items: - const: rockchip,rk3188-vpu - const: rockchip,rk3066-vpu