From patchwork Wed Dec 13 12:20:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 13490836 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 BD0F8C4332F for ; Wed, 13 Dec 2023 12:21:04 +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-Transfer-Encoding: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-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=w+bCYpgorm2d1U7Q1ymw4EAztnY9RBGkAMNbuV1X+gs=; b=jMWueogJQBxuSJ gZM8mGPJOirs70NuziSdp+5ltoU49BEDR7XyICHxpt7NW3TVh2nLOrXBOlatqFWcnmANHm71mOXN7 YmXWipzBMACj8eWe4QjiJIvlc2qHng9fs4UE+fBzgxrXfhsexyKT46L9EWQ6s0DfxBqiPQQQ1TC/7 0yGs7zH95yeWJQLlU63UIVTlORoi13OpEt4OtRq7N4HV1Jpn/ML+sJU1BYpPtsI3FCfIa46HGqE0v ptO32GTqQAUXxnCjYgOSj1DiupGNv4CL1+dwT3Dm5ZOMc68i/QjPZtHSOWNQUi5Ppmrqa3Ffyzprw 1kjq93mcX8s1JcVCMdaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDOE9-00EZSb-0r; Wed, 13 Dec 2023 12:20:37 +0000 Received: from madrid.collaboradmins.com ([2a00:1098:ed:100::25]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDOE6-00EZQV-3C; Wed, 13 Dec 2023 12:20:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702470029; bh=tE9lejZ6+1W68lWo5ayV1iSQspAij2+WbiKQT0W05Fw=; h=From:To:Cc:Subject:Date:From; b=NZZ2v/cscYsHaD0R/dEw+WSkCXywzErHcJdJc98BKZsC9AyjQUiIXCXH+kT9EtKf2 JLqQdztraaZ4UBcyFSrNdTYlPEG+WdWqSKN7p0QFBLaxW+IuQqHJgAv6Xhj/TdvghA S8Ypvalbaty6H0dWCJX/HKGcFFVb/ScVyA/qb0Dn4UQ2QswXXFIkbJ4KD6eHINqlpG WiCeTtEv4aJWClR6YOrd45YvULufuWuWld3ZGvRxtRUfFrc+jXo6+rmV3x6XreTe3o Dt17CwN3/e551wu7IZppG5pjNIfFNrQXmh8WCSp6gV1rIw0VWTV2FZjzJF1Oyk86jU IX6BV4a2UAl9w== Received: from eugen-station.. (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: ehristev) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 315F73781478; Wed, 13 Dec 2023 12:20:28 +0000 (UTC) From: Eugen Hristev To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, angelogioacchino.delregno@collabora.com, kernel@collabora.com, eugen.hristev@collabora.com, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, matthias.bgg@gmail.com Subject: [PATCH 1/4] dt-bindings: media: mtk-vcodec-encoder: add dma-ranges Date: Wed, 13 Dec 2023 14:20:14 +0200 Message-Id: <20231213122017.102100-1-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_042035_216079_1F863076 X-CRM114-Status: UNSURE ( 8.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org As IOMMUs are supported, dma-ranges is not mentioned but additionalProperties=false, thus we have an error when adding dma-ranges. Add dma-ranges as a possible property because this may be present. Signed-off-by: Eugen Hristev --- .../devicetree/bindings/media/mediatek,vcodec-encoder.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml index a2051b31fa29..403530de5624 100644 --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml @@ -38,6 +38,8 @@ properties: minItems: 1 maxItems: 5 + dma-ranges: true + assigned-clocks: true assigned-clock-parents: true From patchwork Wed Dec 13 12:20:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 13490838 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 E74CBC4167B for ; Wed, 13 Dec 2023 12:21:10 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8MQqvjd7wq6jiDn7leKYfBAePlaHx8t7NojOk65/I00=; b=zzlXV1qhh6SnUy keSnimqygAy7awAe3eMAp7+IRw4DvdTZIABRMYn+geBFw9Ei8TkU4ndt6mW2MkqhJ0jDiDl6oq9bP dPId4IvNMsX4Aki9USQzinWzwYN5+vFH32pCEShqv2gLi3QQ6RZWWd0Dfz37wguPcdOHk49N5BllP l79v+NGcmy/QAHfnBE38jxwNMWXeF/udX+/MzmQ7BjFV+jvcW4BRg5pask48QPMJSqImsLa4llcbh tVUvJ58TSG5J85ZhQfYPseQeQlFMbqBdwybUsr959f7QE91aCUQpOKUjOhDvya9Mv8ObdKsOz7p3o JhYL4WQ13FyUMVQOcYpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDOEG-00EZVg-1A; Wed, 13 Dec 2023 12:20:44 +0000 Received: from madrid.collaboradmins.com ([2a00:1098:ed:100::25]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDOE7-00EZQm-09; Wed, 13 Dec 2023 12:20:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702470030; bh=9nciZ1s7i4iPVYsAX6ZTDm0XS3kNJiPzFH0jLeN0v0g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JWgYlV/K+sX/Xg4s92JYgwTzZOX/1IDaVvv9M5HDRPpldhCk8rQ/LGh6kVLjX7BO0 kgJabGOn+G+9yas1/kvmCS2n3V7Oeu/NtbWXpd7L7ymDFV5bVJJLv5FDZQl6sjLl1o EsLf0OAJ6DZw7HZ1ctmbWuVPiokcXNRjz3JSvbA0F4foify2H0xucCqf0lBuQWjMpl Uajg4uM/w3iXsRSBYbPyODUOQ7nBtDgv8fn1DR54msAWXIvL5CkdOezAv6JE4yLWF6 L3QIMLYW3oglsNNpPpABh1+L7hcPU8aRsLJUbyCf8O3ZA0RL4ivIZTk2VXFuLX51PB A1Fpn9jbwWSNw== Received: from eugen-station.. (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: ehristev) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 2D2153781485; Wed, 13 Dec 2023 12:20:29 +0000 (UTC) From: Eugen Hristev To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, angelogioacchino.delregno@collabora.com, kernel@collabora.com, eugen.hristev@collabora.com, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, matthias.bgg@gmail.com Subject: [PATCH 2/4] media: mediatek: vcodec: fix possible unbalanced PM counter Date: Wed, 13 Dec 2023 14:20:15 +0200 Message-Id: <20231213122017.102100-2-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213122017.102100-1-eugen.hristev@collabora.com> References: <20231213122017.102100-1-eugen.hristev@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_042035_217200_633706C5 X-CRM114-Status: GOOD ( 12.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It is possible that mtk_vcodec_enc_pw_on fails, and in that scenario the PM counter is not incremented, and subsequent call to mtk_vcodec_enc_pw_off decrements the counter, leading to a PM imbalance. Fix by bailing out of venc_if_encode in the case when mtk_vcodec_enc_pw_on fails. Fixes: 4e855a6efa54 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver") Signed-off-by: Eugen Hristev Reviewed-by: AngeloGioacchino Del Regno --- .../platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c | 4 +++- .../platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.h | 2 +- drivers/media/platform/mediatek/vcodec/encoder/venc_drv_if.c | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c index a22b7dfc656e..1a2b14a3e219 100644 --- a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c +++ b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c @@ -58,13 +58,15 @@ int mtk_vcodec_init_enc_clk(struct mtk_vcodec_enc_dev *mtkdev) return 0; } -void mtk_vcodec_enc_pw_on(struct mtk_vcodec_pm *pm) +int mtk_vcodec_enc_pw_on(struct mtk_vcodec_pm *pm) { int ret; ret = pm_runtime_resume_and_get(pm->dev); if (ret) dev_err(pm->dev, "pm_runtime_resume_and_get fail: %d", ret); + + return ret; } void mtk_vcodec_enc_pw_off(struct mtk_vcodec_pm *pm) diff --git a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.h b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.h index 157ea08ba9e3..2e28f25e36cc 100644 --- a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.h +++ b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.h @@ -10,7 +10,7 @@ #include "mtk_vcodec_enc_drv.h" int mtk_vcodec_init_enc_clk(struct mtk_vcodec_enc_dev *dev); -void mtk_vcodec_enc_pw_on(struct mtk_vcodec_pm *pm); +int mtk_vcodec_enc_pw_on(struct mtk_vcodec_pm *pm); void mtk_vcodec_enc_pw_off(struct mtk_vcodec_pm *pm); void mtk_vcodec_enc_clock_on(struct mtk_vcodec_pm *pm); void mtk_vcodec_enc_clock_off(struct mtk_vcodec_pm *pm); diff --git a/drivers/media/platform/mediatek/vcodec/encoder/venc_drv_if.c b/drivers/media/platform/mediatek/vcodec/encoder/venc_drv_if.c index c402a686f3cb..e83747b8d69a 100644 --- a/drivers/media/platform/mediatek/vcodec/encoder/venc_drv_if.c +++ b/drivers/media/platform/mediatek/vcodec/encoder/venc_drv_if.c @@ -64,7 +64,9 @@ int venc_if_encode(struct mtk_vcodec_enc_ctx *ctx, ctx->dev->curr_ctx = ctx; spin_unlock_irqrestore(&ctx->dev->irqlock, flags); - mtk_vcodec_enc_pw_on(&ctx->dev->pm); + ret = mtk_vcodec_enc_pw_on(&ctx->dev->pm); + if (ret) + goto venc_if_encode_pw_on_err; mtk_vcodec_enc_clock_on(&ctx->dev->pm); ret = ctx->enc_if->encode(ctx->drv_handle, opt, frm_buf, bs_buf, result); @@ -75,6 +77,7 @@ int venc_if_encode(struct mtk_vcodec_enc_ctx *ctx, ctx->dev->curr_ctx = NULL; spin_unlock_irqrestore(&ctx->dev->irqlock, flags); +venc_if_encode_pw_on_err: mtk_venc_unlock(ctx); return ret; } From patchwork Wed Dec 13 12:20:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 13490837 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 37A37C4332F for ; Wed, 13 Dec 2023 12:21:08 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SSC3q0VJPL4Xz99/URXMTN9o1YULGiD1km0yHXhHOUU=; b=DfnkU2vIG85nCm yy8awsAIJTNYWUaFcZ2XgHiJ+H/KGxwvbvWm9zdTA8ZH0DuzYLFBnD0QdicHXDijltExBgEt5OMTb DNaiMZ5PcQIXUGsGbHKllNSOyXLK5NEiqxw0dE+SpvDUXyR1+G+Z5h0oO38DVPnCgs/AGvTP0fWW7 dx/EFeL7xSVbYvZ6g7RYyIbcxTxa+CI5ngavgzo+7HD34yg5qLLkuvivCKOkx5uJZOswjEMx6OhGT TKVqJpNEPMP59QiiK0yAF4Ypd0j5ENCgAlck+eScYaH7BCP07gOHu1qrdHHV/Y1D+5O7icVAd6AM3 v/ODTNg917brWGg5fZvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDOEF-00EZUz-2Q; Wed, 13 Dec 2023 12:20:43 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDOE8-00EZQs-02; Wed, 13 Dec 2023 12:20:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702470031; bh=sq6cDRiywOxX1Qe7Bu9qDWkMwmr+XoroGDsSXtkS8x4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B6E0U3xhmac1cySPgjPJpgD7OF7qxWWrKXkZ1vUr//tIhlx8v3Djz//RDPdwxozHi 8lIu7XybvfbJsuZvLhNbR9ASK+wWJyCQMPhr1L/F17gXSCioEBOh1VDOJn6DyLW3iM 9w/5gimvYx3Wa3oSnZMd0lccJuCoOugSBWUu9hJRCJrMrniaaaznsL397C/j4TDk+8 muzyOFPbUAjGDsV2njWhTcnzp980zt3HX2farmT7dTzKD++SALZZFV2OOX3eEAe87m 8jVE5U72HpD+bhinr63DHNsT04AezYbd2tG2QfUO+idS/tRgV+xyvD6q1L6BxB8WGM rCLN0OTT8whgw== Received: from eugen-station.. (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: ehristev) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 32A253781486; Wed, 13 Dec 2023 12:20:30 +0000 (UTC) From: Eugen Hristev To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, angelogioacchino.delregno@collabora.com, kernel@collabora.com, eugen.hristev@collabora.com, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, matthias.bgg@gmail.com Subject: [PATCH 3/4] arm64: dts: mediatek: mt8186: fix VENC power domain clocks Date: Wed, 13 Dec 2023 14:20:16 +0200 Message-Id: <20231213122017.102100-3-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213122017.102100-1-eugen.hristev@collabora.com> References: <20231213122017.102100-1-eugen.hristev@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_042036_194319_DC8DB85A X-CRM114-Status: GOOD ( 11.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The larb clock is in fact a subsys clock, so it must be prefixed by 'subsys-' to be correctly identified in the driver. Fixes: d9e43c1e7a38 ("arm64: dts: mt8186: Add power domains controller") Signed-off-by: Eugen Hristev --- arch/arm64/boot/dts/mediatek/mt8186.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi index df0c04f2ba1d..66ead3f23336 100644 --- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi @@ -1061,7 +1061,7 @@ power-domain@MT8186_POWER_DOMAIN_VENC { reg = ; clocks = <&topckgen CLK_TOP_VENC>, <&vencsys CLK_VENC_CKE1_VENC>; - clock-names = "venc0", "larb"; + clock-names = "venc0", "subsys-larb"; mediatek,infracfg = <&infracfg_ao>; #power-domain-cells = <0>; }; From patchwork Wed Dec 13 12:20:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 13490839 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 D711CC4332F for ; Wed, 13 Dec 2023 12:21:11 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=h74cRg4p9B8LmjwidfRgHhG0upxUnBtUwJQKk6dnUXw=; b=S/gyXDO6+T5Ph+ 21HbwmYAeipYMybHWEnIMaEaKKn/bIZTxBGgfiu9PcHDXKSUwfW2laOsR+qWE/QwMS2AOsQrXq+mY LefkLeedz3LSiVzOcvg1mlyqabksjx5ND7MxSaoWTjvzvx7Z7SS8DF3aCgVk9QLxd40B4fMxIn9UT oMcezUdtr+GUvtDDaXgzFql/8k+WCIiUT9uAVulVige4OVJDYh2vVW2F6pP7EtofLDLAYDyKSxwnS ilfjCGMBXa0G6y3SgPRKqbxDFp8D5kfBCC3obpBumI51EyzSk9+Z9DapcaFJ92Lziat1F0xSRT1eA G3FWLlL61jjbCSHuS+RQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDOEE-00EZUM-1r; Wed, 13 Dec 2023 12:20:42 +0000 Received: from madrid.collaboradmins.com ([2a00:1098:ed:100::25]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDOE7-00EZR9-03; Wed, 13 Dec 2023 12:20:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702470032; bh=BYmcEgaBo5I1IXZr2Bp32/w8YdhWfM9/oRB+PHkjY7g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JS2mVMjISMIkLCwLDBK+frDTRB6utKwa+Cz7KGcUHrevMT1OIAO1bimOhP3kAa/Z0 J4kYwPCiOy6V/xClOuS3wtnjLSEW/Y+liR3MecZhpsoXm5nXRvYOv6buyq+f0tNYDE bSvZeoqf//eX9EQWfhwGXv0FA+gHddeqgBQ0wYSWrVsIGVcphglJkFsr8xkN7/UA9i +sAsblsELT4GxZhUNniDZQ8VKN74hWP46gtpXTy3KVEniKIoav2vHt0n+kAKfnmLKX SR+XPbXDCqpM+k1FEtD+MGvD31J+ZTha+jvSKVfUHO/YsqN3a1R4S5gYjWnOZatFgQ ElRalFyb5YGMw== Received: from eugen-station.. (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: ehristev) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 396543781488; Wed, 13 Dec 2023 12:20:31 +0000 (UTC) From: Eugen Hristev To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, angelogioacchino.delregno@collabora.com, kernel@collabora.com, eugen.hristev@collabora.com, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, matthias.bgg@gmail.com, Kyrie Wu , Allen-KH Cheng , Hsin-Yi Wang Subject: [PATCH 4/4] arm64: dts: mediatek: mt8186: Add venc node Date: Wed, 13 Dec 2023 14:20:17 +0200 Message-Id: <20231213122017.102100-4-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213122017.102100-1-eugen.hristev@collabora.com> References: <20231213122017.102100-1-eugen.hristev@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_042035_216079_3C53FB48 X-CRM114-Status: UNSURE ( 8.45 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Kyrie Wu Add video encoder node. Signed-off-by: Kyrie Wu Signed-off-by: Allen-KH Cheng Reviewed-by: Hsin-Yi Wang [eugen.hristev@collabora.com: minor cleanup] Signed-off-by: Eugen Hristev --- arch/arm64/boot/dts/mediatek/mt8186.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi index 66ead3f23336..8535ff2b44e9 100644 --- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi @@ -1993,6 +1993,30 @@ larb7: smi@17010000 { power-domains = <&spm MT8186_POWER_DOMAIN_VENC>; }; + venc: venc@17020000 { + compatible = "mediatek,mt8183-vcodec-enc"; + #address-cells = <2>; + #size-cells = <2>; + reg = <0 0x17020000 0 0x2000>; + interrupts = ; + iommus = <&iommu_mm IOMMU_PORT_L7_VENC_RCPU>, + <&iommu_mm IOMMU_PORT_L7_VENC_REC>, + <&iommu_mm IOMMU_PORT_L7_VENC_BSDMA>, + <&iommu_mm IOMMU_PORT_L7_VENC_SV_COMV>, + <&iommu_mm IOMMU_PORT_L7_VENC_RD_COMV>, + <&iommu_mm IOMMU_PORT_L7_VENC_CUR_LUMA>, + <&iommu_mm IOMMU_PORT_L7_VENC_CUR_CHROMA>, + <&iommu_mm IOMMU_PORT_L7_VENC_REF_LUMA>, + <&iommu_mm IOMMU_PORT_L7_VENC_REF_CHROMA>; + dma-ranges = <0x1 0x0 0x1 0x0 0x1 0x0>; + mediatek,scp = <&scp>; + clocks = <&vencsys CLK_VENC_CKE1_VENC>; + clock-names = "MT_CG_VENC"; + assigned-clocks = <&topckgen CLK_TOP_VENC>; + assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D3>; + power-domains = <&spm MT8186_POWER_DOMAIN_VENC>; + }; + camsys: clock-controller@1a000000 { compatible = "mediatek,mt8186-camsys"; reg = <0 0x1a000000 0 0x1000>;