From patchwork Fri Dec 15 10:45:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 13494243 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 B59A0C46CA2 for ; Fri, 15 Dec 2023 10:46:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=LdJTPTDnLTf9kEJ7PkTvN4wTkh0mh5SbB73dk5lwsxI=; b=CpQm/YY7USURZNZyXgSAdc/E45 iDpA6/BiHnOuc+BxJRIZphHTRGK+uXXMh2X2BxmTICmuKsdjYQkaSskiOMiofv8vuVx9VDRD+g1W3 Vesp71YsrlXregGhATInWRcZLBVVCCe/PocNPbYCB3ApVDOrf+dplnWFMuVSkpb1LA8Ax/ZnTUBNp l5ttwIEtgg1i6fKNKsTMIq1pS2zdNWQqaGZN9TajjqgNu7u4lFjyKfcYdBO6hH4zvjLnsSuczyAzE woVbHST6/eMBkVgvbO79CYEftgsCsqXDDFYl72GLTq/Y2kS6A6GcKT73gAsROJe2pX0fs1wLT/3IX orA+NZ0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rE5i1-002ojY-1c; Fri, 15 Dec 2023 10:46:21 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rE5hp-002obw-03; Fri, 15 Dec 2023 10:46:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702637164; bh=vBgnugLtJ2ksG5oto5YXrGX8SezSV/Kyn/381DDZeYc=; h=From:To:Cc:Subject:Date:From; b=pb8PJbqphVWYId84ZtJMvFx1CSLEHxwibQFvmpAV6BPTT5zPu4AEd59vDh7i6d1By y53CNsHbMrgc2CEi94oADY0uGtBCNQpWRRCyDBK/Zc0BcZ891quCtKhe6q+6gcLx+j L2UJkfxoaFXO69OGz+62j0dy0CsX1J8KsDhd6ZBEAokxqtSSZU+rJvmefOEwkb9D7W FS6I+6ZMMAuNnWIMGFxtMOw+IKwTr/On/GaIMWe2x+10JqnFqyfnqnqtitpUjs3b8L xbvoEaKKSxY7c9Q9sonGldx3Bg0Gs+GfsA6nhU9zxm2IwMAbsSe9imTTo99Ty3Q72y K0Hq1FGidKiCA== 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 B3207378107D; Fri, 15 Dec 2023 10:46:03 +0000 (UTC) From: Eugen Hristev To: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, angelogioacchino.delregno@collabora.com, matthias.bgg@gmail.com, linux-media@vger.kernel.org, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, Eugen Hristev Subject: [PATCH v2 1/7] media: mediatek: vcodec: fix possible unbalanced PM counter Date: Fri, 15 Dec 2023 12:45:45 +0200 Message-Id: <20231215104551.233679-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-20231215_024609_223293_6EF664E2 X-CRM114-Status: GOOD ( 12.06 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=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 --- 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; } -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 Fri Dec 15 10:45:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 13494241 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 CD523C4167B for ; Fri, 15 Dec 2023 10:46:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rdj61HWUi/unJWhfYCXF7F+ls5p7CncvRKLnBR99P/w=; b=PwAqw/ckfxYMTfEDjVp5mXpHK1 xTcHm6icKlhFIq4SDQK0oYRCl2r6iZwGSuHaf+9/g71z7iRhMg8PtHpgtRxljqZASTOj60gY9qRxe kTDMDt5+3TBDVUNEdaHRDdgpefoLFmQPO/Bk1XJ3Ele5Pp3mGT4Kcuj/Lsl40KcYVtdPFUsBC8dYS MbiOr4u6o8Rhuj1/KBtf7hY1utEJuW5mkAszZGMRdOyldz6B0Mw/WN2hVRKrk99rllzihAWjfdEkd kwVa+w47wRmEU37vYJxDyfYxTA2gBNml803k2WvmzYjjt9HY8PJZSyf1wPbhxOTUdUDt7PXDGWeEL bHfkcbqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rE5i0-002oiy-2k; Fri, 15 Dec 2023 10:46:20 +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 1rE5hp-002oc3-1G; Fri, 15 Dec 2023 10:46:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702637165; bh=Sv5bStRniU7BlQ2lH9mBsZ8VDZEclT6+b2lYCvkM7yU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tI07Sy1tbkkyJC92kNuBzpUFvGbbH845ZXpo/Qo15BSqjgRDo0ZDSqIJuLWLl4pcw lWp75z2xZjLU+JWhEC7Xcvs8V6oAR3Gr3lb9zjGySN1VA1yYJN1pfC81eBRpZ8QXQK Mm4bQWvHEP/epNMd/kAp3cY+kDM5BU0WiFKiinomSJqysURg5M+jSPWvx8cEu5wYE8 Av2Lkfl5K/KCa87lrF396h73z1xtmlzNwubZ2G3Vq7DxKhLdk+toFfLaQbkCj2TEg9 82QrCctaJBsmmTMZKsCSJnCTyMPTcZfhUr2xqsC+Por97/hK3msX6JnxsnTOWz0bWW qFXmmp3dB6lHw== 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 B198F3781FD5; Fri, 15 Dec 2023 10:46:04 +0000 (UTC) From: Eugen Hristev To: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, angelogioacchino.delregno@collabora.com, matthias.bgg@gmail.com, linux-media@vger.kernel.org, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, Eugen Hristev Subject: [PATCH v2 2/7] dt-bindings: media: mtk-vcodec-encoder: add dma-ranges Date: Fri, 15 Dec 2023 12:45:46 +0200 Message-Id: <20231215104551.233679-2-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231215104551.233679-1-eugen.hristev@collabora.com> References: <20231215104551.233679-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-20231215_024609_558544_8FE518D2 X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=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 Acked-by: Rob Herring --- Changes in v2: - none. .../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 Fri Dec 15 10:45:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 13494239 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 759F0C4167B for ; Fri, 15 Dec 2023 10:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ryh1iGTa7kF9idOemql3ilVj21B/Zv9mQQDRw2KtiZk=; b=NczMsycefOaocAeUFAqotM0CES v/iotjtVRk8OWTq5ABngtqqNDxOItZW5wM81EMhgqUDuR+nrS0fvGoVQvLFR6afVda+xXt6VqeSA5 izmdsPCNp8j4EiAa/xHPyGPKxNwm5fNqrqGOrBZt9ToTgmWDoYNX8ki0+f0EQ5KCcLa6urq3536Ws jXVDMe/Xn2OiFVr2RdK2QovCX16WQGqqgTJdKl7al4H/OqGYesvPLTTRANTBonPnzV/ZNIO4FlqPk KZeFgu7xh1f8S3Ji1dQfqNB7ZKrLU6gs6FInkaF99ztPQ7rcwtkuQcL2LMVjfMEvo3sPQoid+WUd6 N3OaloBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rE5hy-002oh3-1H; Fri, 15 Dec 2023 10:46:18 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rE5hp-002oc9-03; Fri, 15 Dec 2023 10:46:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702637166; bh=/CmNXLjXKNYtE3QqvhH1lwezEnrtQSIJkJcxeOmHOgs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kVTRpd/QXiE/fuAxIqthRZXkouBjFQYgItywSZsLJrn7P2ek1WFaczYYy6AezJwvu z1n1jckY6JH9ZDRGuMPKp2I4IiRmEqGd+sDufnJa1aB49oanAmcIERk5gWE6ajzSC+ JRG7lL7NYb2XVWbX2jyon60DbIkHTnyIaCaWQqqTnpvlPoXufRHv9zczg85fDebCRI +s/hW2SvwIhpf1qyaQ7xwlvqVSCLrOjVIXxaNgaTcq3Yyi05skff9e9l9RQbFqX8DN SGsmV24D01n7jHIYh4GlSGG77R37fan293irVkgoYmLdHWrtMJVIU6zCWdDD/fbNVM 3HVsXNzZWiR9g== 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 BDE013781FD6; Fri, 15 Dec 2023 10:46:05 +0000 (UTC) From: Eugen Hristev To: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, angelogioacchino.delregno@collabora.com, matthias.bgg@gmail.com, linux-media@vger.kernel.org, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, Eugen Hristev Subject: [PATCH v2 3/7] dt-bindings: media: mtk-vcodec-encoder: fix non-vp8 clock name Date: Fri, 15 Dec 2023 12:45:47 +0200 Message-Id: <20231215104551.233679-3-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231215104551.233679-1-eugen.hristev@collabora.com> References: <20231215104551.233679-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-20231215_024609_223257_BD613EB8 X-CRM114-Status: GOOD ( 11.40 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 --- 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-encoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml index 403530de5624..5166c1c6934e 100644 --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml @@ -111,10 +111,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 then: properties: @@ -124,8 +121,8 @@ allOf: maxItems: 1 clock-names: items: - - const: venc_sel - else: # for vp8 hw encoder + - const: venc_lt_sel + else: properties: clock: items: @@ -133,7 +130,7 @@ allOf: maxItems: 1 clock-names: items: - - const: venc_lt_sel + - const: venc_sel additionalProperties: false From patchwork Fri Dec 15 10:45:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 13494240 X-Patchwork-Delegate: matthias.bgg@gmail.com 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 A4361C46CA2 for ; Fri, 15 Dec 2023 10:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dV6tSYTNC+uhm1CMTDZ9AT7yKRQ0JyoGRL/4zUU3x+M=; b=p92UB6CxBeC8hsRINfoNZrkKad 78NhYNVuoD3E86ouKsFU87BWwR0qPvtR4okse6A19jHdWiRuo4RdqaLYeewzcmmuMly7732uwUEd4 omzfeqbgJzLzVyXXNHTGn3YFBNBx3d1fZHuwM+Y/9H/53kl7LRO3FbM4kFaVUc89cC0eQ1w+xojHt DrcHf4hqnK+Gd/3i7cDV7RkMoaeb9RYlxWPVG4z5MT52UaTfN4TFxKjdN7OCVLH7KXaPYIBrQvUqv NMDRPrxVdbXd48g0Vk67yU9wFSZg6Y+YcUUpIwztOdybDig8zd5FuFAohvlZ5T3llcQO/AoOSkH3i Fl/QXkFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rE5hy-002ohG-2F; Fri, 15 Dec 2023 10:46:18 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rE5hp-002ocE-03; Fri, 15 Dec 2023 10:46:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702637167; bh=rGGTCz6fC8SqIRMnJnpTvc4YBHRGm94VHUh76jbuvmg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=owmenZs/XRyWFRAzR+B8F5jaIondhoqwxKoJn4Iu33rTXYsNJ/cWJ/BVvFCGh2HUQ Bf5hRoK9Ko5WM4Eh/DixCiVAy50kiXpeXiRzYzRj6X0lNe+yIsFMDSly48U+B6ejqQ 0Ay+gDRHlJ0tQlMM9SvCPbESKCzHSnYAbX4LSHQlQJz82hFFm32U70eNgzsHmYKNFs sY3AChb6IERBsrGuCCOKuEo7I5eWP2b7EC/1tYjqPp/5NNU62KmaNhH1RVAHcHPo9P cRcc3KIWWM/z0WbPlwyXVekPIzTEagxYzo+wrvxBd7cyF313v9UA3Wwc0QPJ+nh3GG rCjLluIsAoQRQ== 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 BF2043781FD7; Fri, 15 Dec 2023 10:46:06 +0000 (UTC) From: Eugen Hristev To: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, angelogioacchino.delregno@collabora.com, matthias.bgg@gmail.com, linux-media@vger.kernel.org, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, Eugen Hristev Subject: [PATCH v2 4/7] arm64: dts: mediatek: mt8192: fix vencoder clock name Date: Fri, 15 Dec 2023 12:45:48 +0200 Message-Id: <20231215104551.233679-4-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231215104551.233679-1-eugen.hristev@collabora.com> References: <20231215104551.233679-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-20231215_024609_223041_2BA5E813 X-CRM114-Status: GOOD ( 10.35 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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,vcodec-encoder.yaml# Fixes: aa8f3711fc87 ("arm64: dts: mt8192: Add H264 venc device node") Signed-off-by: Eugen Hristev --- 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 = <&scp>; power-domains = <&spm MT8192_POWER_DOMAIN_VENC>; clocks = <&vencsys CLK_VENC_SET1_VENC>; - clock-names = "venc-set1"; + clock-names = "venc_sel"; assigned-clocks = <&topckgen CLK_TOP_VENC_SEL>; assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D4>; }; From patchwork Fri Dec 15 10:45:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 13494242 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 472A3C41535 for ; Fri, 15 Dec 2023 10:46:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YgF02T78B0wnNhgy6a8gbjkvk3s3L9Nk9V3Xd0plTjU=; b=37E+vumZfOWUdvW2/cIJ5pFS7L MwfK8U8OGSHPb8RAmV7BGTocvszWuQoqwAhJ9hCpqRWtd1bECu3CSETe39f74lhujbh/bLSAVZxiN d2VQ3Q5Od9MfKCPSZZ6RgqC7QNxbh7haKxpRbm+aeUnmdmOCB9JHTgLZbCtsroeqUaAsygWysq6wf dCzUjaNoXjbawZyBC484Id+KUD4sTb5MXyyImteNDrFOWGcOvYc/NOOzni6ALc5s3RXp5k8OW84Ar MUhGzgJsiuP2NfiGz1XcWMl5NaJzEdn8iEiIIYgXX+hSADwotF3Gtok2G67fuDeyXfgIPd+COLyF2 GRsqtPNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rE5i1-002ojI-0c; Fri, 15 Dec 2023 10:46:21 +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 1rE5hp-002ocI-2L; Fri, 15 Dec 2023 10:46:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702637168; bh=oXswsuW1anVDQblcp1XlaqlIZub/1g335nE50zD4/kU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VGwLRoadvlKFpw29V4QaM/mr5XBEqcnnxpzWyA7o+qpLCSFEiY9+qxBn1LO6uWmpJ keLPBznLC99dLayG8ywwlErBJL07Vz3mIwXGbK+j+EtigulikTMppMCuBpdMr90zQz qyeHO5HmT3ujs8QqmStlDrxczx3Z0jre+6cMI5nFzqBg1WyJo75LMVsP4tJOQ7Miw3 lFcVicD+CW0Cl2h8VgZdUyUWUy0M4s1bL2wiEoVW/WtI5ULZ5kjyAqsdHe9ky6EQH1 YjQ0zLUQzGKZO0rxx0QHNFv3ZGXEan050MO6n8TeSXXz6TrDSjf6fi3ZOFgs0+lEvu gFOxjUHq1ve2A== 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 C16F73781FD9; Fri, 15 Dec 2023 10:46:07 +0000 (UTC) From: Eugen Hristev To: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, angelogioacchino.delregno@collabora.com, matthias.bgg@gmail.com, linux-media@vger.kernel.org, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, Eugen Hristev Subject: [PATCH v2 5/7] dt-bindings: media: mtk-vcodec-encoder: add compatible for mt8186 Date: Fri, 15 Dec 2023 12:45:49 +0200 Message-Id: <20231215104551.233679-5-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231215104551.233679-1-eugen.hristev@collabora.com> References: <20231215104551.233679-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-20231215_024609_895483_B5903C4E X-CRM114-Status: UNSURE ( 9.21 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add compatible for the mt8186 encoder which currently works in the same way as mt8183. Signed-off-by: Eugen Hristev Reviewed-by: Rob Herring --- 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-encoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml index 5166c1c6934e..dfabc2faea6c 100644 --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml @@ -16,14 +16,18 @@ description: |+ 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 From patchwork Fri Dec 15 10:45:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 13494244 X-Patchwork-Delegate: matthias.bgg@gmail.com 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 9EC10C4167B for ; Fri, 15 Dec 2023 10:46:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IXjBWxOEF7mlppCMxEYI67u55dHKI+aDAAXS3eAqO4I=; b=Jc9deTXxts3gzAIUIrYAFoTsmB iYWdag+q14gwtXTe0LCjXYF2k7Ql6CUCBwV7YLbycSfLSljMk2bWDOj3EkBuBe4hhCDp0fuzs4UXN s+FE2+B8zOQbfrI2LwPuMN5cdN8d7jbwdEGnn+PBW8NXj20nwgXjVDsSWjoTP/YSsoVraebe57Yfa CLLCPTn0QhKR3B320KWY620hDdc+MjJHD7xGQt/CEHoc7/Xr4ad03Mvkwfbj+ftZD03P702AJujJP M9Qu3h9wv2wcWOgbLqgclhXW4KOPRl/YLHXIXzs89ySQZ+HfvBURzR5vLe7Ar6VnXGb1PP2XkhQjs +b6soD3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rE5i2-002okc-1l; Fri, 15 Dec 2023 10:46:22 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rE5hr-002odl-1x; Fri, 15 Dec 2023 10:46:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702637169; bh=7++2TugOuHBscBWsZZMksH52fjmuIFEskx09aH3Ys30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LzfpBTQBc6jdcVCXkrYHf/DB73UDXAgYxMpB4zdubXqQk6gqm7xufDuIzDI9Eb4Gh X9dQNsWyvFfzw/M606wMrQS974OEISUk9cWmbVzXZe2sMcp+OW3NH+SlJdCmZf1744 jr1yafbqlvIpCZxFp/S10MthewqPfztEU2kc93XKMgmJlUkxxkEhrQa9vRcniteDLw vTA7yM6D09SwmYUI7UFoKr09tVbH5yMy+kziVSBn2pWrVGsA7y47i8xEqtPcNwYmH8 9tutou3gHpRbCBjO4iKR+7FQPNWit3PfjtZaXnBHOM6UrMRjvTgHgzbCpZbyQj9OnP RMW7KRghQGegA== 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 C1B0F3781FDA; Fri, 15 Dec 2023 10:46:08 +0000 (UTC) From: Eugen Hristev To: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, angelogioacchino.delregno@collabora.com, matthias.bgg@gmail.com, linux-media@vger.kernel.org, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, Eugen Hristev Subject: [PATCH v2 6/7] arm64: dts: mediatek: mt8186: fix VENC power domain clocks Date: Fri, 15 Dec 2023 12:45:50 +0200 Message-Id: <20231215104551.233679-6-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231215104551.233679-1-eugen.hristev@collabora.com> References: <20231215104551.233679-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-20231215_024611_771118_1FCCC3A5 X-CRM114-Status: GOOD ( 11.15 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=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 --- Changes in v2: - 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 = ; 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 Fri Dec 15 10:45:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 13494245 X-Patchwork-Delegate: matthias.bgg@gmail.com 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 DC587C46CC5 for ; Fri, 15 Dec 2023 10:46:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kIdDAaKUkxqdu19pWDFh3PJFKl/yfMhwsN3WS1z18wY=; b=SQmo79UUJiig2Z3fAKrNwCZd2/ uKOY62FoeuRkROe7DF/zU8fl6injijuR42FxaaUMO3ngjkMiHj01NE7znqdVX8lEq2v9kKKL2GOiw s6zaBvTBkmU0HajAEjNMVJsyPwsOrU0DQtsQZmgZCGK4EuQEzN2SCrRSCszaQHOXHYl4Gr/tiSqVM 0bXgn14wtmjZoFuoJ8fZ04twcx8t/1LN/aqPzQkZSlaJTAKkW4DpEkwISQM8v5Dh6RtriwIQC3xlg eY3hpb4oSC+QxKhcKLvXTMj+VbZHDgtxmqmVmTXx3nrutiXSvJBX+EU4TVm2zYojCUdr7KiG2L1VC pQ5bMo5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rE5i3-002om3-2k; Fri, 15 Dec 2023 10:46:23 +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 1rE5hr-002odw-38; Fri, 15 Dec 2023 10:46:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702637170; bh=UNr7RTkECrw2TxwP67coHpk8jV76hI6PEfp00kugbrA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GtEIaGzILk5FFGMwWx9fvBPAp9iHXtyDK3mpOnzpcpO2uO5vXIaA2CnnSR2WZzpEw SCqkcJl54LvKv4+duzvjeGYo5YkC63Tmao2CuC77YoOIUb6qEtLBr7v31ZYK+d+JDT 0Rp0aem4p3JExjssdjU9TE9ySkkITrkpL2Anti4Hm7dt/5G4RmXbeGMCyEycG4mhVT H5Umqz2GAdodHVnArWDJWU5YbM17PlWNfhku56sQwfR0Kzz6ScQ1Xl/IGIOZRh8jaM pJGin0TH9qyVJei87hjzUl0bnJZpdTzgaqH6Wnwqpa0kTeRfxHXL2Z1jK/7Yrd4/6T 46aNNJU4jwLdQ== 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 C10383781FDB; Fri, 15 Dec 2023 10:46:09 +0000 (UTC) From: Eugen Hristev To: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, angelogioacchino.delregno@collabora.com, matthias.bgg@gmail.com, linux-media@vger.kernel.org, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, Kyrie Wu , Allen-KH Cheng , Hsin-Yi Wang , Eugen Hristev Subject: [PATCH v2 7/7] arm64: dts: mediatek: mt8186: Add venc node Date: Fri, 15 Dec 2023 12:45:51 +0200 Message-Id: <20231215104551.233679-7-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231215104551.233679-1-eugen.hristev@collabora.com> References: <20231215104551.233679-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-20231215_024612_160399_E9C4F5EE X-CRM114-Status: UNSURE ( 9.16 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=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 --- 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 | 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..ebd07bf3d9d2 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: video-encoder@17020000 { + compatible = "mediatek,mt8186-vcodec-enc", "mediatek,mt8183-vcodec-enc"; + reg = <0 0x17020000 0 0x2000>; + #address-cells = <2>; + #size-cells = <2>; + 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>; + clocks = <&vencsys CLK_VENC_CKE1_VENC>; + clock-names = "venc_sel"; + assigned-clocks = <&topckgen CLK_TOP_VENC>; + assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D3>; + power-domains = <&spm MT8186_POWER_DOMAIN_VENC>; + mediatek,scp = <&scp>; + }; + camsys: clock-controller@1a000000 { compatible = "mediatek,mt8186-camsys"; reg = <0 0x1a000000 0 0x1000>;