From patchwork Wed Jun 30 08:52:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Irui Wang X-Patchwork-Id: 12351659 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EF74C11F65 for ; Wed, 30 Jun 2021 08:54:33 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 41FFE61628 for ; Wed, 30 Jun 2021 08:54:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41FFE61628 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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=H03d5BDP+VDyQvbthpL5sUs40+8p/UG3j1KaeElxqY4=; b=fgDSOKeJyoD6L9 efpILVazsBz/KGr6L2dFI589rtnH/CMkbXTN5YwRzJAfZWDADeH8yTWLgqWOSRIo0HImDOhBN+GIO s/M76/fHKDpUZzdACv78VSvJD90eEyObJnNYsRqwL7/UU+jyrtBGgvo6vwMsLslBDB8wNGmMLVS3N 9DyuxwREEniE+0PpZLOKJW/k4prrNB753anCqSgH26Um9SppeCLktIugfvdpeSfOF+xiAorHkwxhP i5Zll1RFlHTkvxMFZdOWwkT3R5d+6lS9SuWbE/tIqE95n1x3Mu0uZn2bFKF//4E/vx/qftvR+eb/e dlBOWpA5PLlEbymWezYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyVzC-00DMqD-KK; Wed, 30 Jun 2021 08:54:22 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyVxz-00DMOm-MM; Wed, 30 Jun 2021 08:53:11 +0000 X-UUID: cf6e34e927d5453899234ef82c45c3ef-20210630 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=ENyI0dForS9SrsajZtYB6EHcIf1wE8g8b3HViojDoZA=; b=L4UVvBFnj++dy69swx54xOtRz8cn4RoaiGcIlj3fQclxuGcjIfH4O84vGdQYFD+XwRridOTfhj7S+QBDw5oX3eFCHeMMVtqVwduGW+plYoDcIVeuhghmZP1tsGtWYl1mZLoNcPd+hkePsdd5h4d/rnQum03s6d6W8yqbP1ad8wg=; X-UUID: cf6e34e927d5453899234ef82c45c3ef-20210630 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 853617996; Wed, 30 Jun 2021 01:52:57 -0700 Received: from MTKMBS02N1.mediatek.inc (172.21.101.77) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Jun 2021 01:52:55 -0700 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Jun 2021 16:52:53 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 30 Jun 2021 16:52:52 +0800 From: Irui Wang To: Hans Verkuil , Tzung-Bi Shih , Alexandre Courbot , "Tiffany Lin" , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa CC: Hsin-Yi Wang , Maoguang Meng , Longfei Wang , Yunfei Dong , Fritz Koenig , Irui Wang , , , , , , , Subject: [PATCH 1/3] media: mtk-vcodec: Clean redundant encoder format definition Date: Wed, 30 Jun 2021 16:52:45 +0800 Message-ID: <20210630085247.27554-2-irui.wang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210630085247.27554-1-irui.wang@mediatek.com> References: <20210630085247.27554-1-irui.wang@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210630_015309_228899_B517D96A X-CRM114-Status: GOOD ( 14.44 ) 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 supported capture/output formats don't depend on models, clean redundant definitions and nameing with type instead. Signed-off-by: Irui Wang --- .../platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 50 ++++++++----------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c index 45d1870c83dd..4489a9744cd7 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c @@ -26,7 +26,7 @@ module_param(mtk_v4l2_dbg_level, int, S_IRUGO | S_IWUSR); module_param(mtk_vcodec_dbg, bool, S_IRUGO | S_IWUSR); -static const struct mtk_video_fmt mtk_video_formats_output_mt8173[] = { +static const struct mtk_video_fmt mtk_video_formats_output[] = { { .fourcc = V4L2_PIX_FMT_NV12M, .type = MTK_FMT_FRAME, @@ -49,7 +49,7 @@ static const struct mtk_video_fmt mtk_video_formats_output_mt8173[] = { }, }; -static const struct mtk_video_fmt mtk_video_formats_capture_mt8173_avc[] = { +static const struct mtk_video_fmt mtk_video_formats_capture_h264[] = { { .fourcc = V4L2_PIX_FMT_H264, .type = MTK_FMT_ENC, @@ -57,7 +57,7 @@ static const struct mtk_video_fmt mtk_video_formats_capture_mt8173_avc[] = { }, }; -static const struct mtk_video_fmt mtk_video_formats_capture_mt8173_vp8[] = { +static const struct mtk_video_fmt mtk_video_formats_capture_vp8[] = { { .fourcc = V4L2_PIX_FMT_VP8, .type = MTK_FMT_ENC, @@ -65,14 +65,6 @@ static const struct mtk_video_fmt mtk_video_formats_capture_mt8173_vp8[] = { }, }; -static const struct mtk_video_fmt mtk_video_formats_capture_mt8183[] = { - { - .fourcc = V4L2_PIX_FMT_H264, - .type = MTK_FMT_ENC, - .num_planes = 1, - }, -}; - /* Wake up context wait_queue */ static void wake_up_ctx(struct mtk_vcodec_ctx *ctx, unsigned int reason) { @@ -392,10 +384,10 @@ static int mtk_vcodec_probe(struct platform_device *pdev) static const struct mtk_vcodec_enc_pdata mt8173_avc_pdata = { .chip = MTK_MT8173, - .capture_formats = mtk_video_formats_capture_mt8173_avc, - .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_mt8173_avc), - .output_formats = mtk_video_formats_output_mt8173, - .num_output_formats = ARRAY_SIZE(mtk_video_formats_output_mt8173), + .capture_formats = mtk_video_formats_capture_h264, + .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_h264), + .output_formats = mtk_video_formats_output, + .num_output_formats = ARRAY_SIZE(mtk_video_formats_output), .min_bitrate = 1, .max_bitrate = 4000000, .core_id = VENC_SYS, @@ -403,10 +395,10 @@ static const struct mtk_vcodec_enc_pdata mt8173_avc_pdata = { static const struct mtk_vcodec_enc_pdata mt8173_vp8_pdata = { .chip = MTK_MT8173, - .capture_formats = mtk_video_formats_capture_mt8173_vp8, - .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_mt8173_vp8), - .output_formats = mtk_video_formats_output_mt8173, - .num_output_formats = ARRAY_SIZE(mtk_video_formats_output_mt8173), + .capture_formats = mtk_video_formats_capture_vp8, + .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_vp8), + .output_formats = mtk_video_formats_output, + .num_output_formats = ARRAY_SIZE(mtk_video_formats_output), .min_bitrate = 64, .max_bitrate = 4000000, .core_id = VENC_LT_SYS, @@ -415,11 +407,10 @@ static const struct mtk_vcodec_enc_pdata mt8173_vp8_pdata = { static const struct mtk_vcodec_enc_pdata mt8183_pdata = { .chip = MTK_MT8183, .uses_ext = true, - .capture_formats = mtk_video_formats_capture_mt8183, - .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_mt8183), - /* MT8183 supports the same output formats as MT8173 */ - .output_formats = mtk_video_formats_output_mt8173, - .num_output_formats = ARRAY_SIZE(mtk_video_formats_output_mt8173), + .capture_formats = mtk_video_formats_capture_h264, + .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_h264), + .output_formats = mtk_video_formats_output, + .num_output_formats = ARRAY_SIZE(mtk_video_formats_output), .min_bitrate = 64, .max_bitrate = 40000000, .core_id = VENC_SYS, @@ -428,16 +419,15 @@ static const struct mtk_vcodec_enc_pdata mt8183_pdata = { static const struct mtk_vcodec_enc_pdata mt8192_pdata = { .chip = MTK_MT8192, .uses_ext = true, - /* MT8192 supports the same capture formats as MT8183 */ - .capture_formats = mtk_video_formats_capture_mt8183, - .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_mt8183), - /* MT8192 supports the same output formats as MT8173 */ - .output_formats = mtk_video_formats_output_mt8173, - .num_output_formats = ARRAY_SIZE(mtk_video_formats_output_mt8173), + .capture_formats = mtk_video_formats_capture_h264, + .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_h264), + .output_formats = mtk_video_formats_output, + .num_output_formats = ARRAY_SIZE(mtk_video_formats_output), .min_bitrate = 64, .max_bitrate = 100000000, .core_id = VENC_SYS, }; + static const struct of_device_id mtk_vcodec_enc_match[] = { {.compatible = "mediatek,mt8173-vcodec-enc", .data = &mt8173_avc_pdata}, From patchwork Wed Jun 30 08:52:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Irui Wang X-Patchwork-Id: 12351657 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6ED98C11F65 for ; Wed, 30 Jun 2021 08:54:19 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3352061CEF for ; Wed, 30 Jun 2021 08:54:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3352061CEF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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=D7BikoXUf0N5cCn0PDOmRdw0STCt6kaWh1z4fQ+OqoE=; b=VVrdFbN5zdk7eI yRrWH2K6REZvGWuz9sY7PVGnwb5NVJ89UdeHzSUCPDEDzA77NpzI1i9a+u+U31Y/mlHUwtUABHTz9 18u0go3nZrUCGNkkyKpV2OAU2SaTJgGxeBF6nC9RY4ExXVn19zzuS+I4JYBZGyRv1dfe30SLGXF6g pK5nRFNfp6EqVIf958InHbeJtQakIDv9gS2440Ijr5Q6KKPSeYsWxIkoGtZufQ32lX1Pf32V3l8u/ CsWqInQEBQ7SuxozYZx9JAFW0Y1EdicLAOgjhUNlLNinvzq/iDYCT4f3gFlZvr5M5fB1siUio+uCs sNyBeH1tSLNpCJmwA4AQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyVyy-00DMkN-3U; Wed, 30 Jun 2021 08:54:08 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyVxz-00DMSH-PI; Wed, 30 Jun 2021 08:53:10 +0000 X-UUID: 628d9771ffe840208401164105c4a7ae-20210630 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=gh6ka9Bnzg6vJUhqqyXM+4elRLtxR1/fg1fjvvFox0A=; b=tiAUPsTj3LzrGjS5N+nRimvWOuuM5bCPZk3XJsUoTqNqc1JhJL7BwkBsdHC6oPKN79yOQMrqNwewwVVuBhVFkwn0AY3CmYuSLf1Y/jpCQ7li3L/3VL6Jr9aUscb1X+1JUFsh2i32AoMD8S9hRj4aPGYG/NeBnbdr493WVAIrA94=; X-UUID: 628d9771ffe840208401164105c4a7ae-20210630 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1202095388; Wed, 30 Jun 2021 01:52:59 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Jun 2021 01:52:57 -0700 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Jun 2021 16:52:56 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 30 Jun 2021 16:52:54 +0800 From: Irui Wang To: Hans Verkuil , Tzung-Bi Shih , Alexandre Courbot , "Tiffany Lin" , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa CC: Hsin-Yi Wang , Maoguang Meng , Longfei Wang , Yunfei Dong , Fritz Koenig , Irui Wang , , , , , , , Subject: [PATCH 2/3] dt-bindings: media: mtk-vcodec: Add binding for MT8195 VENC Date: Wed, 30 Jun 2021 16:52:46 +0800 Message-ID: <20210630085247.27554-3-irui.wang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210630085247.27554-1-irui.wang@mediatek.com> References: <20210630085247.27554-1-irui.wang@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210630_015309_231014_B84B36F3 X-CRM114-Status: GOOD ( 12.08 ) 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 Updates binding document for mt8192 encoder driver. Signed-off-by: Irui Wang Acked-by: Rob Herring --- Documentation/devicetree/bindings/media/mediatek-vcodec.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt index ad1321e5a22d..de961699ba0a 100644 --- a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt +++ b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt @@ -10,6 +10,7 @@ Required properties: "mediatek,mt8183-vcodec-enc" for MT8183 encoder. "mediatek,mt8173-vcodec-dec" for MT8173 decoder. "mediatek,mt8192-vcodec-enc" for MT8192 encoder. + "mediatek,mt8195-vcodec-enc" for MT8195 encoder. - reg : Physical base address of the video codec registers and length of memory mapped region. - interrupts : interrupt number to the cpu. From patchwork Wed Jun 30 08:52:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Irui Wang X-Patchwork-Id: 12351691 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C2D4C11F65 for ; Wed, 30 Jun 2021 09:03:33 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id F3BD461C4D for ; Wed, 30 Jun 2021 09:03:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F3BD461C4D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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=UFrTF5flZWm/VeKqXSioHX9GZm68kQgcdRORPMFWTjc=; b=maoxktzaslDGKj dv0ekixoOjOAY2CrDJOytq/BaGqxmI/23Qut2piiuWn1yJK6zQht5zZC8uJCtaCPcJq7Rl5Mt69ka Hq5RBBc5AD0VUUHB0xMTxf1UWmkqi7pGZcPMkNKQx9dLQzVY+76Ce4J2MnslcLbmnDOWKQDUP5iVC MXe5sQvlQRvvCgDDq+QfwxY6pZh5C0+EskROJqhpK+7Zup8dgsL5lTOD5WX0PCyoVH4A6/snFbhu1 XYZiK2SkyYeRpCcl+QkOneCwrSyoSh02+A6TeeKNJIEWldcTxDCYLDwol+nBmf+BrVCINVPIaLvKv m35+ys4jxsbUTVow7QFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyW7u-00DPLj-1w; Wed, 30 Jun 2021 09:03:22 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyW7c-00DPHp-Ok; Wed, 30 Jun 2021 09:03:06 +0000 X-UUID: 284e04251cbe40419034cd62e8918903-20210630 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=Doi6dmMF7TkzD8dMjqELmVWQnwzwyAS0+/B4iOdz2bk=; b=NhkqY+U60MjhIWo04VZ6rO8X3WjCExJT6RKlDzNFUlUdwy8izsMRTq965+HP6i8Yv/QNs+Dhfq2uRfD7+qZHonDPqyc2ileRrMe2tYEKJ1bnis6tRs+bbC3I7/1sz3P7Xgk4x2hopnKMynGkGkGQuzXh2ps1u4ck5dnLMP630Q8=; X-UUID: 284e04251cbe40419034cd62e8918903-20210630 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1218214270; Wed, 30 Jun 2021 02:03:02 -0700 Received: from MTKMBS02N1.mediatek.inc (172.21.101.77) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Jun 2021 01:53:00 -0700 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Jun 2021 16:52:58 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 30 Jun 2021 16:52:56 +0800 From: Irui Wang To: Hans Verkuil , Tzung-Bi Shih , Alexandre Courbot , "Tiffany Lin" , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa CC: Hsin-Yi Wang , Maoguang Meng , Longfei Wang , Yunfei Dong , Fritz Koenig , Irui Wang , , , , , , , Subject: [PATCH 3/3] media: mtk-vcodec: Add MT8195 H264 venc driver Date: Wed, 30 Jun 2021 16:52:47 +0800 Message-ID: <20210630085247.27554-4-irui.wang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210630085247.27554-1-irui.wang@mediatek.com> References: <20210630085247.27554-1-irui.wang@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210630_020304_857732_EC02997F X-CRM114-Status: GOOD ( 12.56 ) 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 MT8195 venc driver's compatible and device private data. Signed-off-by: Irui Wang --- drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h | 1 + .../media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h index c6c7672fecfb..3f83710b4fa5 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h @@ -304,6 +304,7 @@ enum mtk_chip { MTK_MT8173, MTK_MT8183, MTK_MT8192, + MTK_MT8195, }; /** diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c index 4489a9744cd7..7b3e0ea4c410 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c @@ -428,6 +428,18 @@ static const struct mtk_vcodec_enc_pdata mt8192_pdata = { .core_id = VENC_SYS, }; +static const struct mtk_vcodec_enc_pdata mt8195_pdata = { + .chip = MTK_MT8195, + .uses_ext = true, + .capture_formats = mtk_video_formats_capture_h264, + .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_h264), + .output_formats = mtk_video_formats_output, + .num_output_formats = ARRAY_SIZE(mtk_video_formats_output), + .min_bitrate = 64, + .max_bitrate = 100000000, + .core_id = VENC_SYS, +}; + static const struct of_device_id mtk_vcodec_enc_match[] = { {.compatible = "mediatek,mt8173-vcodec-enc", .data = &mt8173_avc_pdata}, @@ -435,6 +447,7 @@ static const struct of_device_id mtk_vcodec_enc_match[] = { .data = &mt8173_vp8_pdata}, {.compatible = "mediatek,mt8183-vcodec-enc", .data = &mt8183_pdata}, {.compatible = "mediatek,mt8192-vcodec-enc", .data = &mt8192_pdata}, + {.compatible = "mediatek,mt8195-vcodec-enc", .data = &mt8195_pdata}, {}, }; MODULE_DEVICE_TABLE(of, mtk_vcodec_enc_match);