From nobody Thu Nov 14 05:14:15 2024 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 4C3896FB2; Thu, 28 Dec 2023 11:32:58 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="4PEKwBpK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703763176; bh=Aln5hXciMXJ2NlGpPPcv081En/LvaNsxb4BTGEvnc/Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=4PEKwBpK+0p4JGroiKs928ZWShectmz65hA+k7SBkzcp7z6DjDI25HAEcXkN4ctI0 sJ8v4+TWY2LoXUHVUHO7CS1xKw2AC/bQ9yDMyYCGlkt1WtaJHrz+pnFPti1VO6AvkZ Zb1FleiSgi4gIQ/pOjCXTww26vXsFCz6KQwNcCqAG/4u594+crODUUy2hHMoEmuap2 KyiL5NjfbWyVFREJkekQBrcZFj4BC/0yT04N5VNRty6LjTIvM3UZ3YhiFmmLbLVvN8 XkUU15ZGSlyTMGBo943R6NtAOPlftWH/ZRj489Q+rjA7Cc302d+U5Aha3wNhasY1G5 LmsLJ0ripiKnw== 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 BF97D37813BC; Thu, 28 Dec 2023 11:32:55 +0000 (UTC) From: Eugen Hristev To: tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-mediatek@lists.infradead.org Cc: eugen.hristev@collabora.com, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, kernel@collabora.com Subject: [PATCH v3 1/6] media: mediatek: vcodec: fix possible unbalanced PM counter Date: Thu, 28 Dec 2023 13:32:40 +0200 Message-Id: <20231228113245.174706-2-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231228113245.174706-1-eugen.hristev@collabora.com> References: <20231228113245.174706-1-eugen.hristev@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Enc= oder Driver") Signed-off-by: Eugen Hristev Reviewed-by: AngeloGioacchino Del Regno --- Changes in v3: -none Changes in v2: - collect R-b .../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; } =20 -void mtk_vcodec_enc_pw_on(struct mtk_vcodec_pm *pm) +int mtk_vcodec_enc_pw_on(struct mtk_vcodec_pm *pm) { int ret; =20 ret =3D pm_runtime_resume_and_get(pm->dev); if (ret) dev_err(pm->dev, "pm_runtime_resume_and_get fail: %d", ret); + + return ret; } =20 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" =20 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 =3D ctx; spin_unlock_irqrestore(&ctx->dev->irqlock, flags); =20 - mtk_vcodec_enc_pw_on(&ctx->dev->pm); + ret =3D 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 =3D 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 =3D NULL; spin_unlock_irqrestore(&ctx->dev->irqlock, flags); =20 +venc_if_encode_pw_on_err: mtk_venc_unlock(ctx); return ret; } --=20 2.34.1 From nobody Thu Nov 14 05:14:15 2024 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 660D96FCA; Thu, 28 Dec 2023 11:32:59 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="raq68Je8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703763177; bh=8UVn3bqlJ8hPorONnus5laiB1PvUXo1CSznLEpz4ZA4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=raq68Je83mcITqxOybvgxYCVSoMJ7WIAJhff4NUTXg3gLq+PK4x3U04LS7YWb8l7M GE6AGzmPGodTx0+56r0TXCRU+nuG8wltyQBNPD+wFICW5D9W70vgvbyKdQDbtLTmO7 V4BQpop7tAN2vu0PQYRUCyEDJ4+kui4HCUY8NTBVUhRFt82Y9NSVUKrRKdwWUkFg0B j5kylonE6ATE9Mf8WFz54m53MvP052WSh71vQIpBBliUuNn9kZiPsT6Q/A9YQRLr62 Tnh53chX3c+tX+WEEszAlmx9tGbiLsdx3tSsLQpkYD99BWrdc3gYnj6PtK26xqPEvW pxgF+QbUFlHVw== 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 CE75237813C4; Thu, 28 Dec 2023 11:32:56 +0000 (UTC) From: Eugen Hristev To: tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-mediatek@lists.infradead.org Cc: eugen.hristev@collabora.com, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, kernel@collabora.com, Rob Herring Subject: [PATCH v3 2/6] dt-bindings: media: mtk-vcodec-encoder: fix non-vp8 clock name Date: Thu, 28 Dec 2023 13:32:41 +0200 Message-Id: <20231228113245.174706-3-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231228113245.174706-1-eugen.hristev@collabora.com> References: <20231228113245.174706-1-eugen.hristev@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Looking at the binding it makes sense that the `-vp8` compatible has the `venc_lt_sel` while the other bindings have the `venc_sel` as name for the clock. This was also mentioned in the txt version of the binding before the conversion: ` clock-names: avc encoder must contain "venc_sel", vp8 encoder must contain "venc_lt_sel", decoder must contain "vcodecpll", "univpll_d2", ` So it is easier to check for compatible that includes vp8, since that's just one, to have the requirement for the clock name property as `venc_lt_sel`, rather than for all the others, some of which are missing, thus for them, the requirement is wrongly `venc_lt_sel`. Reordered the if/then/else to match `-vp8` and have all the rest of the compatibles using the other clock name (`venc_sel`). Signed-off-by: Eugen Hristev Reviewed-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno --- Changes in v3: - collect R-B Changes in v2: - new patch. .../bindings/media/mediatek,vcodec-encoder.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-encode= r.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.ya= ml index a2051b31fa29..849721c0571a 100644 --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml @@ -109,10 +109,7 @@ allOf: properties: compatible: enum: - - mediatek,mt8173-vcodec-enc - - mediatek,mt8188-vcodec-enc - - mediatek,mt8192-vcodec-enc - - mediatek,mt8195-vcodec-enc + - mediatek,mt8173-vcodec-enc-vp8 =20 then: properties: @@ -122,8 +119,8 @@ allOf: maxItems: 1 clock-names: items: - - const: venc_sel - else: # for vp8 hw encoder + - const: venc_lt_sel + else: properties: clock: items: @@ -131,7 +128,7 @@ allOf: maxItems: 1 clock-names: items: - - const: venc_lt_sel + - const: venc_sel =20 additionalProperties: false =20 --=20 2.34.1 From nobody Thu Nov 14 05:14:15 2024 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 62C9A7487; Thu, 28 Dec 2023 11:33:00 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="fQAx2Lam" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703763178; bh=UKLiDUqrGf0WLlbwWi1S7+Qnzm0QHjQnG9ZdogBAtm4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fQAx2LamhPw+Uj31n8b3jsi8mSzHVykF73+dbzIGT41sOhvzcoUIfKABJkiYj25GA 5KMHfMYMCDnlNLuVXTfm67uKTEAWuHxkjbxKxkqM/b6G+rUIkvZrFFiZfLSRESxe59 E17EImF0OiqlKUm9sy+LiXozFRV4qGabOFTbIuUzSLbmpHVB9W6KnsXdWv93sbfAVN /iHvLOXL2S0PpQOW8/v2BmvUqfUcaiY8GSWV087X6OU+SjzMw+g4SpLkCmmnHgwyot qfJi2jWHOb1LZN4dfQqlzwVdummMaV4+5cIMuUceGARfJUMkvIUoLI0e6EzxXqcP6x 6n/jVWLsSU47w== 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 E532437813CB; Thu, 28 Dec 2023 11:32:57 +0000 (UTC) From: Eugen Hristev To: tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-mediatek@lists.infradead.org Cc: eugen.hristev@collabora.com, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, kernel@collabora.com Subject: [PATCH v3 3/6] arm64: dts: mediatek: mt8192: fix vencoder clock name Date: Thu, 28 Dec 2023 13:32:42 +0200 Message-Id: <20231228113245.174706-4-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231228113245.174706-1-eugen.hristev@collabora.com> References: <20231228113245.174706-1-eugen.hristev@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Clock name should be `venc_sel` as per binding. Fix the warning message : arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dtb: vcodec@17020000:= clock-names:0: 'venc_sel' was expected from schema $id: http://devicetree.org/schemas/media/mediatek,vcode= c-encoder.yaml# Fixes: aa8f3711fc87 ("arm64: dts: mt8192: Add H264 venc device node") Signed-off-by: Eugen Hristev Reviewed-by: AngeloGioacchino Del Regno --- Changes in v3: none Changes in v2: - new patch. arch/arm64/boot/dts/mediatek/mt8192.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts= /mediatek/mt8192.dtsi index 69f4cded5dbb..f1fc14e53f8c 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi @@ -1770,7 +1770,7 @@ vcodec_enc: vcodec@17020000 { mediatek,scp =3D <&scp>; power-domains =3D <&spm MT8192_POWER_DOMAIN_VENC>; clocks =3D <&vencsys CLK_VENC_SET1_VENC>; - clock-names =3D "venc-set1"; + clock-names =3D "venc_sel"; assigned-clocks =3D <&topckgen CLK_TOP_VENC_SEL>; assigned-clock-parents =3D <&topckgen CLK_TOP_UNIVPLL_D4>; }; --=20 2.34.1 From nobody Thu Nov 14 05:14:15 2024 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 2FED58829; Thu, 28 Dec 2023 11:33:01 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="P/Txb1Jl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703763179; bh=1fDv/5V6e9fx+iroantkLNTc4mnm6R4J0fjeEoEc4gY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P/Txb1JlYklMHWMqG5aL1Rd6kvgcuOFKWHiJPZb2JM9vbOVhLzip4crXixn6QzW9f 0GD80b2W55XA+b1YY/FSIrSYlMBqWai6uxlxWh6zquqIaVFSb9UcTB/1he33Ecjs8G CCd+ApnsTMfWVQP+sMYDRwOpngI7oPH7ZNVOUnflTxoGJVDQ5/SetHH8vQPJLA4yBy R4I4SrQ33x5cSHDxi28A6FuRLJzL0NwZWR4l1zZBCcGkwjUeJDJrdvJIr5nC1RHtEY PGeKgHQxzc8zk9cIUvT08vnxbmhlT8nKOq14ZZnffXrvkUfmXD0nkQ10eCEqGtLapA Iy0zYYJjIL9Kg== 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 05F3D37813D0; Thu, 28 Dec 2023 11:32:58 +0000 (UTC) From: Eugen Hristev To: tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-mediatek@lists.infradead.org Cc: eugen.hristev@collabora.com, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, kernel@collabora.com, Rob Herring Subject: [PATCH v3 4/6] dt-bindings: media: mtk-vcodec-encoder: add compatible for mt8186 Date: Thu, 28 Dec 2023 13:32:43 +0200 Message-Id: <20231228113245.174706-5-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231228113245.174706-1-eugen.hristev@collabora.com> References: <20231228113245.174706-1-eugen.hristev@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add compatible for the mt8186 encoder which currently works in the same way as mt8183. Signed-off-by: Eugen Hristev Reviewed-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno --- Changes in v3: - collect R-b Changes in v2: - new patch. .../media/mediatek,vcodec-encoder.yaml | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-encode= r.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.ya= ml index 849721c0571a..b45743d0a9ec 100644 --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml @@ -16,14 +16,18 @@ description: |+ =20 properties: compatible: - enum: - - mediatek,mt8173-vcodec-enc-vp8 - - mediatek,mt8173-vcodec-enc - - mediatek,mt8183-vcodec-enc - - mediatek,mt8188-vcodec-enc - - mediatek,mt8192-vcodec-enc - - mediatek,mt8195-vcodec-enc - + oneOf: + - items: + - enum: + - mediatek,mt8173-vcodec-enc-vp8 + - mediatek,mt8173-vcodec-enc + - mediatek,mt8183-vcodec-enc + - mediatek,mt8188-vcodec-enc + - mediatek,mt8192-vcodec-enc + - mediatek,mt8195-vcodec-enc + - items: + - const: mediatek,mt8186-vcodec-enc + - const: mediatek,mt8183-vcodec-enc reg: maxItems: 1 =20 --=20 2.34.1 From nobody Thu Nov 14 05:14:15 2024 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 6CE76C8C2; Thu, 28 Dec 2023 11:33:02 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Fj/sUvMk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703763181; bh=3ZZY3CyyeCXrWyryOHnL40AqUpSsKrEdHmyGgsIpTAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fj/sUvMkC1z/STvO4qzjcvc2RKLueJW0WOOTFHMhm+jytveYzDNu10T4gaa6/C0iD NH/Qw6jQTdzOkmz2Mzue9DW6YH+phw97Lf59zRe3g1EOZ7FUh4MzfhhlNkpcT8GdaD DuwOuVmjI3ZVqeskO30JwejVtaQlsaRL8qw0xakZ6B2v2G1wiYHu0zMjwLp8XIES1C 9+i74YU7UNyWpp3pUlwvtG4wxk5ZXoGLGgq8LO2Bz+ccMACZPMvziszZgIa7RPT3Aj mM3tz9VPBAHw/oE9njgkLqBgPwbNj8c7T3K/qS7VyLTPI9kislKo7D4fcNyy8EJR1Q NdR/94LXXKRYQ== 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 264C237813CF; Thu, 28 Dec 2023 11:33:00 +0000 (UTC) From: Eugen Hristev To: tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-mediatek@lists.infradead.org Cc: eugen.hristev@collabora.com, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, kernel@collabora.com Subject: [PATCH v3 5/6] arm64: dts: mediatek: mt8186: fix VENC power domain clocks Date: Thu, 28 Dec 2023 13:32:44 +0200 Message-Id: <20231228113245.174706-6-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231228113245.174706-1-eugen.hristev@collabora.com> References: <20231228113245.174706-1-eugen.hristev@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: AngeloGioacchino Del Regno --- Changes in v2,v3: - none. 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 =3D ; clocks =3D <&topckgen CLK_TOP_VENC>, <&vencsys CLK_VENC_CKE1_VENC>; - clock-names =3D "venc0", "larb"; + clock-names =3D "venc0", "subsys-larb"; mediatek,infracfg =3D <&infracfg_ao>; #power-domain-cells =3D <0>; }; --=20 2.34.1 From nobody Thu Nov 14 05:14:15 2024 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 C0065DDAF; Thu, 28 Dec 2023 11:33:03 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="1z0cOoyT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703763182; bh=37Z5+7S5t846U9B0A0dcCmQr8H0ZxSimQ6IOeUd6EuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1z0cOoyTvc9pTmCrf9DWg7bgLlojEZ8Oh50GKVtLwZuJPKIPvGJnhCnFjkoBTPWJ/ sAaRJD+I20+ohk1nhbTuxSymui4d5QhB8R/Xv5BDlYdpAonk8aIjMvuPRPTksXC3Jr yG57VuVD/NzJ5VfImR7Qd3lACDL6vcOWiUXO54E0j2wxbjRm17qgGeymzzo1mfmDdR N86OtiqbS1YkOa8ZVvvbb1YFpQK/l5VT0/DnTnjCwXcl5XQkuV5kP5qYSXp+9FEb5z 3xqCTQQZm/61IZDE+kRmbnf5fNsRNwkdKaHK1Gbj51XyTRfDdry/MRAZUMS1bFBS9g yp5c0wW841dmg== 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 3556C3781419; Thu, 28 Dec 2023 11:33:01 +0000 (UTC) From: Eugen Hristev To: tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-mediatek@lists.infradead.org Cc: eugen.hristev@collabora.com, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, kernel@collabora.com, Kyrie Wu , Allen-KH Cheng , Hsin-Yi Wang Subject: [PATCH v3 6/6] arm64: dts: mediatek: mt8186: Add venc node Date: Thu, 28 Dec 2023 13:32:45 +0200 Message-Id: <20231228113245.174706-7-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231228113245.174706-1-eugen.hristev@collabora.com> References: <20231228113245.174706-1-eugen.hristev@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: AngeloGioacchino Del Regno --- Changes in v3: - remove dma ranges and cells. Changes in v2: - change node name - change compatible to include 8186 - change props order - change clock name to cope with binding arch/arm64/boot/dts/mediatek/mt8186.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts= /mediatek/mt8186.dtsi index 66ead3f23336..bafb0845e986 100644 --- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi @@ -1993,6 +1993,27 @@ larb7: smi@17010000 { power-domains =3D <&spm MT8186_POWER_DOMAIN_VENC>; }; =20 + venc: video-encoder@17020000 { + compatible =3D "mediatek,mt8186-vcodec-enc", "mediatek,mt8183-vcodec-en= c"; + reg =3D <0 0x17020000 0 0x2000>; + interrupts =3D ; + iommus =3D <&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>; + clocks =3D <&vencsys CLK_VENC_CKE1_VENC>; + clock-names =3D "venc_sel"; + assigned-clocks =3D <&topckgen CLK_TOP_VENC>; + assigned-clock-parents =3D <&topckgen CLK_TOP_UNIVPLL_D3>; + power-domains =3D <&spm MT8186_POWER_DOMAIN_VENC>; + mediatek,scp =3D <&scp>; + }; + camsys: clock-controller@1a000000 { compatible =3D "mediatek,mt8186-camsys"; reg =3D <0 0x1a000000 0 0x1000>; --=20 2.34.1