From patchwork Tue Jun 18 18:18:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 102545 X-Patchwork-Delegate: sebastian.fricke@collabora.com Received: from ny.mirrors.kernel.org ([147.75.199.223]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sJdjK-0005Cu-1E for patchwork@linuxtv.org; Tue, 18 Jun 2024 18:38:55 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5196F1C22F00 for ; Tue, 18 Jun 2024 18:38:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 523F115EFC4; Tue, 18 Jun 2024 18:38:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="cNu4QMr4" X-Original-To: linux-media@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1137156F25; Tue, 18 Jun 2024 18:38:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718735902; cv=none; b=KTJAJuwKvQqk9GGNa/nJ8z6K8OHiMsQGTafi+Kj+NG+B2k2FwNXmuidb/qt/Raaj2lywhE8rtrEB6cGZ5F2OdoRQc+0ySw8vSwZw4JqZRwwiBq6LSUin/H+co4grNXMKRQYHnm3cB/fLMRhYejCKrJcPsvlTzMlLPNz71BX8AK4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718735902; c=relaxed/simple; bh=ewO028FP+/fLIGrTwi46vVYeQqRp4FQ65WxGYZ1bq94=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NUKTzFsE67o7+w06WK/j/g7AYs6ZpQHUtcmuYKKPBqljTX5nyeXbxrr0zsafJlnEw9dhAwxf+Tq1bEaCQqWa3qHb5WXpoBJLcTf/jYNsiqReCAgkLokw0Kq98CpiDH/H+GU4bImmYdLhomSjkzfoct/OcsyYuJmS79ePsTdHF4s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=cNu4QMr4; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718735897; bh=ewO028FP+/fLIGrTwi46vVYeQqRp4FQ65WxGYZ1bq94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cNu4QMr4W6+iL0HYbR8gw5sDoyO1SbWARXZq6VmtX3p3M/ahMCS/ysaOF27bSTDez zZXyNDWhE4T24bE22Y61KNCwd8p1e04YAE8WdkMUH+FgmuFKsIPqAUW2RdM467duMd kStKyMPSjSIiXwoW8pFTgJgDF45uSYvCm7wtfV4oW+RcZXL9c55gn98fQIfGGIjfnd ZfI80k/HiO7p+LYV4ntHtTx4E33zswntOnC4Hx9hEhzh0h2z8b7YcBNOtpw+4HqG7x +9df9up0g9YDicRnk5xBmChLCguB6ZeW2QlScUzhAxJXjb9i+PxAiIWUO01sAEwZNO Yarbm3ZqxLwpw== Received: from jupiter.universe (cola.collaboradmins.com [195.201.22.229]) (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: sre) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 99EA53782196; Tue, 18 Jun 2024 18:38:17 +0000 (UTC) Received: by jupiter.universe (Postfix, from userid 1000) id 2BFCC4800C7; Tue, 18 Jun 2024 20:38:17 +0200 (CEST) From: Sebastian Reichel To: Ezequiel Garcia , Philipp Zabel , Nicolas Frattaroli , Heiko Stuebner Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jianfeng Liu , Emmanuel Gil Peyrot , Nicolas Dufresne , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Conor Dooley , Sebastian Reichel Subject: [PATCH v7 1/6] media: dt-bindings: rk3568-vepu: Add RK3588 VEPU121 Date: Tue, 18 Jun 2024 20:18:32 +0200 Message-ID: <20240618183816.77597-2-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240618183816.77597-1-sebastian.reichel@collabora.com> References: <20240618183816.77597-1-sebastian.reichel@collabora.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-LSpam-Score: -2.6 (--) X-LSpam-Report: No, score=-2.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no From: Emmanuel Gil Peyrot This encoder-only device is present four times on this SoC, and should support everything the rk3568 vepu supports (so JPEG, H.264 and VP8 encoding). No fallback compatible has been added, since the operating systems might already support RK3568 VEPU and want to avoid registering four of them separately considering they can be used as a cluster. Signed-off-by: Emmanuel Gil Peyrot Acked-by: Conor Dooley Signed-off-by: Sebastian Reichel --- .../devicetree/bindings/media/rockchip,rk3568-vepu.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/rockchip,rk3568-vepu.yaml b/Documentation/devicetree/bindings/media/rockchip,rk3568-vepu.yaml index 9d90d8d0565a..947ad699cc5e 100644 --- a/Documentation/devicetree/bindings/media/rockchip,rk3568-vepu.yaml +++ b/Documentation/devicetree/bindings/media/rockchip,rk3568-vepu.yaml @@ -17,6 +17,7 @@ properties: compatible: enum: - rockchip,rk3568-vepu + - rockchip,rk3588-vepu121 reg: maxItems: 1 From patchwork Tue Jun 18 18:18:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 102548 X-Patchwork-Delegate: sebastian.fricke@collabora.com Received: from ny.mirrors.kernel.org ([147.75.199.223]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sJdkI-0005UB-0N for patchwork@linuxtv.org; Tue, 18 Jun 2024 18:39:54 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B37C81C22611 for ; Tue, 18 Jun 2024 18:39:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E5791607AD; Tue, 18 Jun 2024 18:38:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="rJ5aQ72s" X-Original-To: linux-media@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A117B15E5CC; Tue, 18 Jun 2024 18:38:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718735904; cv=none; b=QASY6Rl04Rpn7vSIuqn9fYeeUt+8a+F4PY99+4PLHS4t4+q2RberIRCUfUgTI1F+8j2HL0qSFNYXiXW05fZ2NkVT9l4dA+Zh3QlLGR11X1zFbAsbMMdwh+MnewGChuJXnZeb8LoYwNIJ+HPzt69EH8ZMOcq5RglDbTuaIxfZ9sw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718735904; c=relaxed/simple; bh=qT3T7wi3nE+eFhkZ2bUnCRb/SyRrxFgNwM5t87xUarI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kXZZgiY6tubvZ31tUvTuplBw5uaPCm3Ep/4GzSvr4nYcbcC2Hpzs0z/TQ7UWPcx2BFcYajnHxa8BCRDLf7WSklQPjeRWRTyYKLQEw/94cozhXNqF/IxCbYzpRLPTOXf3UR1UWsDwm6QV7Mx30WoArgBpzKM4jUCfh1zamLDou2w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=rJ5aQ72s; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718735897; bh=qT3T7wi3nE+eFhkZ2bUnCRb/SyRrxFgNwM5t87xUarI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rJ5aQ72sPeXhwnzso7uqCjUAN+VTUR4UmBRnnDUM+MUTh3xgjkCihUmma85lUEOGP NOw15Hcn/d7ibvyC1WhLWnWRqSHNJyFZqGdtYPVgmWiylNLxDYQTjMTk2vdF3sLm8J z8mELH+a7SzBUSmxZNNnXPZA9PPiVs+8STwrf0h8Q8nTs0S3/hGbZ7fp1BKa7//AjX zva10Jfk70dkqZ4HSk2WfLiBTAmjrYWqRDPi0DiVxSOmC5cx9pLOrU6Ooxxao3IdZH oIlBwUGAMhUzohdB4o7yZdrKlOzOzYejh9vazGyb4V5FZC2KUmPpZanD33bL9/noV9 y1WDPqPvPXryA== Received: from jupiter.universe (cola.collaboradmins.com [195.201.22.229]) (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: sre) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 8D1C83781139; Tue, 18 Jun 2024 18:38:17 +0000 (UTC) Received: by jupiter.universe (Postfix, from userid 1000) id 2DFF84800CD; Tue, 18 Jun 2024 20:38:17 +0200 (CEST) From: Sebastian Reichel To: Ezequiel Garcia , Philipp Zabel , Nicolas Frattaroli , Heiko Stuebner Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jianfeng Liu , Emmanuel Gil Peyrot , Nicolas Dufresne , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Conor Dooley , Sebastian Reichel Subject: [PATCH v7 2/6] media: dt-bindings: rockchip-vpu: Add RK3588 VPU121 Date: Tue, 18 Jun 2024 20:18:33 +0200 Message-ID: <20240618183816.77597-3-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240618183816.77597-1-sebastian.reichel@collabora.com> References: <20240618183816.77597-1-sebastian.reichel@collabora.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-LSpam-Score: -2.6 (--) X-LSpam-Report: No, score=-2.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no From: Jianfeng Liu RK3588 has four Hantro H1 VEPUs (encoder-only) modules and one combined Hantro H1/G1 VPU (decoder and encoder). These are not described as separate IP, since they are sharing an internal cache. This adds the RK3588 specific compatible string for the combined VPU, which seems to be identical to the version found in the RK3568. Signed-off-by: Jianfeng Liu Acked-by: Conor Dooley Signed-off-by: Sebastian Reichel --- Documentation/devicetree/bindings/media/rockchip-vpu.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml index c57e1f488895..2710bb2fb0d1 100644 --- a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml +++ b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml @@ -31,6 +31,9 @@ properties: - items: - const: rockchip,rk3228-vpu - const: rockchip,rk3399-vpu + - items: + - const: rockchip,rk3588-vpu121 + - const: rockchip,rk3568-vpu reg: maxItems: 1 From patchwork Tue Jun 18 18:18:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 102543 X-Patchwork-Delegate: sebastian.fricke@collabora.com Received: from ny.mirrors.kernel.org ([147.75.199.223]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sJdj4-00057y-2H for patchwork@linuxtv.org; Tue, 18 Jun 2024 18:38:39 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 143571C22584 for ; Tue, 18 Jun 2024 18:38:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C1DDE15ECF0; Tue, 18 Jun 2024 18:38:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Ye9sOwwJ" X-Original-To: linux-media@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9A9015E5CF; Tue, 18 Jun 2024 18:38:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718735901; cv=none; b=cwSm7pus5ZvmelH3zV1eiT0nVJ1kgG4K1PkwN5RDdpkS4c9NGuLvcCzYIK17wNbDdOCBbEUgCc8O2b2dx+GWqpfTqm75Vmf4CkmEhnEcQaVp5K8rJT7ud/KoRQH5cZfypKvy+kFrOxLosbTaeTzVZTJq2j8fjUbQbhKFnL+jkGY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718735901; c=relaxed/simple; bh=pgX34qM//hg5kqXfNWtX3zkJ2uIiYClJs5SfTuN4s/I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=imiRLidcRf6J8GjdPQcXbeBuqH+n9YpKZkeV7ZA6Yf42Tn5EZB+B4yijJN8Ov/o0zejDdhc0Ds5UOOlzyZZ2UohkVfEUsHRj0iXa/tYFObWF2lWoiiMM8pfvRpPoHwZta/0+qau82Bp1UUX0NpJTjV8JVyzD6j95tMPYZphXFQg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=Ye9sOwwJ; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718735897; bh=pgX34qM//hg5kqXfNWtX3zkJ2uIiYClJs5SfTuN4s/I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ye9sOwwJzUb0wqRSYgfAMOB/II/ka0Ctx/xNJPTxxwtgTXCDNSgmRHnrJ8Z6A7VDa Is1NEM1EwVwEEnOKBqQW2XMwIoUlvMbRt6e9xKDPvcX4xriBdhZCgK9CXi1rhUKYcA NLSy0vTYvxlpG03XJkBEY0ZkGPKxjBykq5a4EtgqPlmMrqwI63KPOH582n4M+qa+Mu phlBLrnKW23fIUzFp0XEprtOaptJDZIls2paRSpwCntmIU0IJ47qV7sSJdbB0ET6H3 5Ujsf3tUZxDgC31xmLp38EXfurrruOL1ILItmEHyHqfqCtBHTl8OMnpi5z7lWihH15 31ZqOVdL32yDg== Received: from jupiter.universe (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madrid.collaboradmins.com (Postfix) with ESMTPSA id A510E378219A; Tue, 18 Jun 2024 18:38:17 +0000 (UTC) Received: by jupiter.universe (Postfix, from userid 1000) id 2FE4E4800CE; Tue, 18 Jun 2024 20:38:17 +0200 (CEST) From: Sebastian Reichel To: Ezequiel Garcia , Philipp Zabel , Nicolas Frattaroli , Heiko Stuebner Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jianfeng Liu , Emmanuel Gil Peyrot , Nicolas Dufresne , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCH v7 3/6] media: hantro: Disable multicore support Date: Tue, 18 Jun 2024 20:18:34 +0200 Message-ID: <20240618183816.77597-4-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240618183816.77597-1-sebastian.reichel@collabora.com> References: <20240618183816.77597-1-sebastian.reichel@collabora.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-LSpam-Score: -2.6 (--) X-LSpam-Report: No, score=-2.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no Avoid exposing equal Hantro video codecs to userspace. Equal video codecs allow scheduling work between the cores. For that kernel support is required, which does not yet exist. Until that is implemented avoid exposing each core separately to userspace so that multicore can be added in the future without breaking userspace ABI. This was written with Rockchip RK3588 in mind (which has 4 Hantro H1 cores), but applies to all SoCs. Signed-off-by: Sebastian Reichel --- .../media/platform/verisilicon/hantro_drv.c | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c index 34b123dafd89..748187623990 100644 --- a/drivers/media/platform/verisilicon/hantro_drv.c +++ b/drivers/media/platform/verisilicon/hantro_drv.c @@ -992,6 +992,49 @@ static const struct media_device_ops hantro_m2m_media_ops = { .req_queue = v4l2_m2m_request_queue, }; +/* + * Some SoCs, like RK3588 have multiple identical Hantro cores, but the + * kernel is currently missing support for multi-core handling. Exposing + * separate devices for each core to userspace is bad, since that does + * not allow scheduling tasks properly (and creates ABI). With this workaround + * the driver will only probe for the first core and early exit for the other + * cores. Once the driver gains multi-core support, the same technique + * for detecting the main core can be used to cluster all cores together. + */ +static int hantro_disable_multicore(struct hantro_dev *vpu) +{ + struct device_node *node = NULL; + const char *compatible; + bool is_main_core; + int ret; + + /* Intentionally ignores the fallback strings */ + ret = of_property_read_string(vpu->dev->of_node, "compatible", &compatible); + if (ret) + return ret; + + /* The first compatible and available node found is considered the main core */ + do { + node = of_find_compatible_node(node, NULL, compatible); + if (of_device_is_available(node)) + break; + } while (node); + + if (!node) + return -EINVAL; + + is_main_core = (vpu->dev->of_node == node); + + of_node_put(node); + + if (!is_main_core) { + dev_info(vpu->dev, "missing multi-core support, ignoring this instance\n"); + return -ENODEV; + } + + return 0; +} + static int hantro_probe(struct platform_device *pdev) { const struct of_device_id *match; @@ -1011,6 +1054,10 @@ static int hantro_probe(struct platform_device *pdev) match = of_match_node(of_hantro_match, pdev->dev.of_node); vpu->variant = match->data; + ret = hantro_disable_multicore(vpu); + if (ret) + return ret; + /* * Support for nxp,imx8mq-vpu is kept for backwards compatibility * but it's deprecated. Please update your DTS file to use From patchwork Tue Jun 18 18:18:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 102544 X-Patchwork-Delegate: sebastian.fricke@collabora.com Received: from am.mirrors.kernel.org ([147.75.80.249]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sJdj8-00058W-01 for patchwork@linuxtv.org; Tue, 18 Jun 2024 18:38:42 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F26D31F22630 for ; Tue, 18 Jun 2024 18:38:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB67015ECFA; Tue, 18 Jun 2024 18:38:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="P/uqjpOb" X-Original-To: linux-media@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFC5B15E5D1; Tue, 18 Jun 2024 18:38:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718735901; cv=none; b=VH31qyE9WPFeAAw6N3N4rRfjlkfn1pbtuhoINZvTyek0RXguBqbpb5eyfzrp7LGVYH6nmPhG17d9dQC1Qe71KWoGyUsR8rdJT4mnCIX8SiLgwn2JffqQ/9e9NVnPEyVM+warwSeHGvhEdGncrxNMU0vr620mcXbjT68psvh21FE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718735901; c=relaxed/simple; bh=MFNRvjjOnL3WyEggZraz6UQzsDlOzpQ/AuHM8WKL9bw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PNhydD5OItPL+7bsrhY8imTjAFgPpeyirSABkoG4uRCLOfz9ekXxbhE/SYY99iHreHR6js6gfYBTB2Hzu6YgB2QkkhIB8pXklxHewh03dqgFEOyBktWRFfa/jI/3uqv9Is0k8YcdsjqA497sto9RZMAy71cZ6qwPt/YYv8HvGmw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=P/uqjpOb; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718735897; bh=MFNRvjjOnL3WyEggZraz6UQzsDlOzpQ/AuHM8WKL9bw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P/uqjpObsCm+ulQU4wZsplU14ylDkRchw7eGdqdlT2uNHRMUIruyv/z5jW4L8qb8B vH1mgFRta+TpEtT8hMhISLWI2ub22ANtMQLM1P8g1vw6UvFagRsxyp2zP18EyT7Gxz 1AKRnFFtElcMtqRz03K0Vj/U7KWoMVv5Ptact/deehc1exvHOq8Zr9OmN85g+qBg4K hKvXRPc2qrx9Rhg0eU5y+tnY+o2lsGqDe1xiV2WC3L1ODVWf9NoGW5SA3js0hm5Ggf khynaCHsVsvmTD7E7DJPN0hR5gQyNAuYzk7FmVQ4jJKFeze3E1qo6sn/WrKFcerMG1 +aegEDxW3PbOg== Received: from jupiter.universe (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madrid.collaboradmins.com (Postfix) with ESMTPSA id AA831378219B; Tue, 18 Jun 2024 18:38:17 +0000 (UTC) Received: by jupiter.universe (Postfix, from userid 1000) id 31DE24800CF; Tue, 18 Jun 2024 20:38:17 +0200 (CEST) From: Sebastian Reichel To: Ezequiel Garcia , Philipp Zabel , Nicolas Frattaroli , Heiko Stuebner Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jianfeng Liu , Emmanuel Gil Peyrot , Nicolas Dufresne , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCH v7 4/6] media: hantro: Add RK3588 VEPU121 Date: Tue, 18 Jun 2024 20:18:35 +0200 Message-ID: <20240618183816.77597-5-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240618183816.77597-1-sebastian.reichel@collabora.com> References: <20240618183816.77597-1-sebastian.reichel@collabora.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-LSpam-Score: -2.6 (--) X-LSpam-Report: No, score=-2.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no RK3588 handling is exactly the same as RK3568. This is not handled using fallback compatibles to avoid exposing multiple video devices on kernels not having the multicore disable patch. Signed-off-by: Sebastian Reichel --- 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 748187623990..05bbac853c4f 100644 --- a/drivers/media/platform/verisilicon/hantro_drv.c +++ b/drivers/media/platform/verisilicon/hantro_drv.c @@ -722,6 +722,7 @@ static const struct of_device_id of_hantro_match[] = { { .compatible = "rockchip,rk3399-vpu", .data = &rk3399_vpu_variant, }, { .compatible = "rockchip,rk3568-vepu", .data = &rk3568_vepu_variant, }, { .compatible = "rockchip,rk3568-vpu", .data = &rk3568_vpu_variant, }, + { .compatible = "rockchip,rk3588-vepu121", .data = &rk3568_vepu_variant, }, { .compatible = "rockchip,rk3588-av1-vpu", .data = &rk3588_vpu981_variant, }, #endif #ifdef CONFIG_VIDEO_HANTRO_IMX8M From patchwork Tue Jun 18 18:18:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 102547 X-Patchwork-Delegate: sebastian.fricke@collabora.com Received: from ny.mirrors.kernel.org ([147.75.199.223]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sJdkG-0005U9-2h for patchwork@linuxtv.org; Tue, 18 Jun 2024 18:39:54 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 70F241C22525 for ; Tue, 18 Jun 2024 18:39:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 36C011607A4; Tue, 18 Jun 2024 18:38:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="URTLKdO8" X-Original-To: linux-media@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5D2215EFDA; Tue, 18 Jun 2024 18:38:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718735904; cv=none; b=gVVqxJA/zV2I7o+GNagvHfExnUNmNswNDtefdxtIljdolmV4nu+Xw1/WGvbNaAXb2eVRp4kEUglFAKYwBHQdUn1jBBFVpsHF1WFF9u3ooSKkJuVN8lYh+NFpLPJgujQICnUGw67bIrO/X5l7CHcwxYuD9Mx3fwaUByzsL/Wuo8Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718735904; c=relaxed/simple; bh=JWRpO8n0qfJ/LE7k1lFWnR99Wqz0mOCN8aOE7S7nk+M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SpLRm8OKFeNDz3OysgI1/PQTOLO0E4gVTwfKJBpZ8v8h+edTZytxIrlc2IfYHE6EZ7UmfubjaSA3XPU5Obvfti/6/CgN3pU4QOyeoQDDCZdBKYFeAKt7ziM7aOcWlm6ImaYvh1ahpJGjjdjxwis1j8MHoxLp27EFx9M4gV0KhYg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=URTLKdO8; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718735898; bh=JWRpO8n0qfJ/LE7k1lFWnR99Wqz0mOCN8aOE7S7nk+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=URTLKdO8gtshe8Dpssr/ERwHwKlx9awqT1KHKsKpTFzfRcsf7d7y0ys7tOOC7W+hf vs4vkAViUm0zGQeAhqLGVeqgAOyTi8vVKxy0MG3ZtIIgFyBr873nRYQ56oycgcxH7v W3jl8LVBPkVCn/pUUIHu3hDsrGT50oytb1kWGXZUxZRy9kQhjdkPZu5bT4Pb9T5W3J U7Dx9u2Zxuf+7CikFyBfo/r44f7Iza/PHhUUsyPmn8f9QruYp8xPYmRgO03qSZcgn1 9j3W/FqOAoxzfgcczsXLyGKZrpz52z5r/DnpUqE3L3O39wk7agtlm3USXyMJxGZAfe kvsZPyPvD1wcQ== Received: from jupiter.universe (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 0EF87378219E; Tue, 18 Jun 2024 18:38:18 +0000 (UTC) Received: by jupiter.universe (Postfix, from userid 1000) id 33CB54800D0; Tue, 18 Jun 2024 20:38:17 +0200 (CEST) From: Sebastian Reichel To: Ezequiel Garcia , Philipp Zabel , Nicolas Frattaroli , Heiko Stuebner Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jianfeng Liu , Emmanuel Gil Peyrot , Nicolas Dufresne , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Sebastian Reichel Subject: [PATCH v7 5/6] arm64: dts: rockchip: Add VEPU121 to RK3588 Date: Tue, 18 Jun 2024 20:18:36 +0200 Message-ID: <20240618183816.77597-6-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240618183816.77597-1-sebastian.reichel@collabora.com> References: <20240618183816.77597-1-sebastian.reichel@collabora.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-LSpam-Score: -2.6 (--) X-LSpam-Report: No, score=-2.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no From: Emmanuel Gil Peyrot RK3588 has 4 Hantro G1 encoder-only cores. They are all independent IP, but can be used as a cluster (i.e. sharing work between the cores). These cores are called VEPU121 in the TRM. The TRM describes one more VEPU121, but that is combined with a Hantro H1. That one will be handled using the VPU binding instead. Signed-off-by: Emmanuel Gil Peyrot Signed-off-by: Sebastian Reichel --- arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 80 +++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi index 6ac5ac8b48ab..dd85d4e55922 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi @@ -1159,6 +1159,86 @@ power-domain@RK3588_PD_SDMMC { }; }; + vepu121_0: video-codec@fdba0000 { + compatible = "rockchip,rk3588-vepu121"; + reg = <0x0 0xfdba0000 0x0 0x800>; + interrupts = ; + clocks = <&cru ACLK_JPEG_ENCODER0>, <&cru HCLK_JPEG_ENCODER0>; + clock-names = "aclk", "hclk"; + iommus = <&vepu121_0_mmu>; + power-domains = <&power RK3588_PD_VDPU>; + }; + + vepu121_0_mmu: iommu@fdba0800 { + compatible = "rockchip,rk3588-iommu", "rockchip,rk3568-iommu"; + reg = <0x0 0xfdba0800 0x0 0x40>; + interrupts = ; + clocks = <&cru ACLK_JPEG_ENCODER0>, <&cru HCLK_JPEG_ENCODER0>; + clock-names = "aclk", "iface"; + power-domains = <&power RK3588_PD_VDPU>; + #iommu-cells = <0>; + }; + + vepu121_1: video-codec@fdba4000 { + compatible = "rockchip,rk3588-vepu121"; + reg = <0x0 0xfdba4000 0x0 0x800>; + interrupts = ; + clocks = <&cru ACLK_JPEG_ENCODER1>, <&cru HCLK_JPEG_ENCODER1>; + clock-names = "aclk", "hclk"; + iommus = <&vepu121_1_mmu>; + power-domains = <&power RK3588_PD_VDPU>; + }; + + vepu121_1_mmu: iommu@fdba4800 { + compatible = "rockchip,rk3588-iommu", "rockchip,rk3568-iommu"; + reg = <0x0 0xfdba4800 0x0 0x40>; + interrupts = ; + clocks = <&cru ACLK_JPEG_ENCODER1>, <&cru HCLK_JPEG_ENCODER1>; + clock-names = "aclk", "iface"; + power-domains = <&power RK3588_PD_VDPU>; + #iommu-cells = <0>; + }; + + vepu121_2: video-codec@fdba8000 { + compatible = "rockchip,rk3588-vepu121"; + reg = <0x0 0xfdba8000 0x0 0x800>; + interrupts = ; + clocks = <&cru ACLK_JPEG_ENCODER2>, <&cru HCLK_JPEG_ENCODER2>; + clock-names = "aclk", "hclk"; + iommus = <&vepu121_2_mmu>; + power-domains = <&power RK3588_PD_VDPU>; + }; + + vepu121_2_mmu: iommu@fdba8800 { + compatible = "rockchip,rk3588-iommu", "rockchip,rk3568-iommu"; + reg = <0x0 0xfdba8800 0x0 0x40>; + interrupts = ; + clocks = <&cru ACLK_JPEG_ENCODER2>, <&cru HCLK_JPEG_ENCODER2>; + clock-names = "aclk", "iface"; + power-domains = <&power RK3588_PD_VDPU>; + #iommu-cells = <0>; + }; + + vepu121_3: video-codec@fdbac000 { + compatible = "rockchip,rk3588-vepu121"; + reg = <0x0 0xfdbac000 0x0 0x800>; + interrupts = ; + clocks = <&cru ACLK_JPEG_ENCODER3>, <&cru HCLK_JPEG_ENCODER3>; + clock-names = "aclk", "hclk"; + iommus = <&vepu121_3_mmu>; + power-domains = <&power RK3588_PD_VDPU>; + }; + + vepu121_3_mmu: iommu@fdbac800 { + compatible = "rockchip,rk3588-iommu", "rockchip,rk3568-iommu"; + reg = <0x0 0xfdbac800 0x0 0x40>; + interrupts = ; + clocks = <&cru ACLK_JPEG_ENCODER3>, <&cru HCLK_JPEG_ENCODER3>; + clock-names = "aclk", "iface"; + power-domains = <&power RK3588_PD_VDPU>; + #iommu-cells = <0>; + }; + av1d: video-codec@fdc70000 { compatible = "rockchip,rk3588-av1-vpu"; reg = <0x0 0xfdc70000 0x0 0x800>; From patchwork Tue Jun 18 18:18:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 102546 X-Patchwork-Delegate: sebastian.fricke@collabora.com Received: from ny.mirrors.kernel.org ([147.75.199.223]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sJdk6-0005Pp-13 for patchwork@linuxtv.org; Tue, 18 Jun 2024 18:39:43 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D4DC01C2261A for ; Tue, 18 Jun 2024 18:39:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E875815FD11; Tue, 18 Jun 2024 18:38:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="MEMVXWoW" X-Original-To: linux-media@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2088715F3FE; Tue, 18 Jun 2024 18:38:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718735904; cv=none; b=ZJQxm3Waz1skCc2gfCCO7tDyVPSuiHvx6YfW4zLJ/lzdkbeNnvL/0ANSIQiZ5jnPFaYtitJGCSSNM1R7POK1Jb2R4VJ2M12LBBaD6v/esgHkq5KvihVR4Y+g1Hazdg3mfq2TOmbVMdjzFYxFifXRdlIUr/j+nmscG3Xzp/Xc3Y0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718735904; c=relaxed/simple; bh=cqxhYAbbW9RM1md+oyI3TV89a9uLQWQLY+gbU0lSp64=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pnICvZxclaVZrJWMOtpQ5BMAupsFkwj9dT9lrZdLXzLBJHSoSzxea4+cq2pC660OaaUeCguD8atGpwGMOyjih/fy7lBXKP9KG0gzJ0esV3DmZL/kaFvbU4DigJ8D4KOpUBAERZFxErvS01InnsnhPMnNLHz0bapojYXuhi38r+I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=MEMVXWoW; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1718735898; bh=cqxhYAbbW9RM1md+oyI3TV89a9uLQWQLY+gbU0lSp64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MEMVXWoWX6DVACd5wKvk58SUSRT7VswErtSexVBwD5U7bU8R5/5mEtQpUijEqEjQb K1+8fYvfGdATRoHH+bABTPrSg8Gk9aVng8EfFfriRS1JHwidxYRyqX3KDKHsBsir0z 9j6kW282YGCvoN5e+9ad+1pHhu0aTpWAbG3gSruX71qvZPqNNi26KxNTzNmqPInIFp QR6RABLEMcNchMblHSBKuse2WXCKjbsnQuyK+TaRZ+JY29N9JKLbnk4Gmz3tD5T802 Lc+ak/tk+S5TDSq1WL+R4TXRsxAakZwTFk+R7u6in3CwvMG7Ao4UyZmX6IqqerahcL B9LyEVoGoWH4Q== Received: from jupiter.universe (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 11236378219F; Tue, 18 Jun 2024 18:38:18 +0000 (UTC) Received: by jupiter.universe (Postfix, from userid 1000) id 35ED54800D1; Tue, 18 Jun 2024 20:38:17 +0200 (CEST) From: Sebastian Reichel To: Ezequiel Garcia , Philipp Zabel , Nicolas Frattaroli , Heiko Stuebner Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jianfeng Liu , Emmanuel Gil Peyrot , Nicolas Dufresne , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Hugh Cole-Baker , Sebastian Reichel Subject: [PATCH v7 6/6] arm64: dts: rockchip: Add VPU121 support for RK3588 Date: Tue, 18 Jun 2024 20:18:37 +0200 Message-ID: <20240618183816.77597-7-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240618183816.77597-1-sebastian.reichel@collabora.com> References: <20240618183816.77597-1-sebastian.reichel@collabora.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-LSpam-Score: -2.6 (--) X-LSpam-Report: No, score=-2.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no From: Jianfeng Liu Enable 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 Tested-by: Hugh Cole-Baker Signed-off-by: Sebastian Reichel --- arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi index dd85d4e55922..c0466982646f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi @@ -1159,6 +1159,27 @@ power-domain@RK3588_PD_SDMMC { }; }; + vpu121: video-codec@fdb50000 { + compatible = "rockchip,rk3588-vpu121", "rockchip,rk3568-vpu"; + reg = <0x0 0xfdb50000 0x0 0x800>; + interrupts = ; + interrupt-names = "vdpu"; + clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>; + clock-names = "aclk", "hclk"; + iommus = <&vpu121_mmu>; + power-domains = <&power RK3588_PD_VDPU>; + }; + + vpu121_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>; + }; + vepu121_0: video-codec@fdba0000 { compatible = "rockchip,rk3588-vepu121"; reg = <0x0 0xfdba0000 0x0 0x800>;