From patchwork Mon Apr 12 12:45:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Irui Wang X-Patchwork-Id: 12197981 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=-16.8 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, USER_AGENT_GIT autolearn=unavailable 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 72D72C43460 for ; Mon, 12 Apr 2021 12:48:36 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 E07EF61287 for ; Mon, 12 Apr 2021 12:48:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E07EF61287 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-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=WPQu20G4DQsbKE0i5VmGYNVOootSxdAOUo6HcXAECMw=; b=HaZw7VPyCISvxUi7NcsvpsbKp DR0N0U0hyHge90JQ+O2wuv7OxjuNWoNLiiXit6PUI2QV02mQPOJTebc7LYYc9Pek2/6Q8W77fIv5f vBEwT8PWbO1G1jkwuDUCx7tPz57pRX/6/M+bg8bOpazLyqwQQMyRO32bXD6/ccIh6u8yWXXie/rjw tYxnYDfDw2/DI9Tr/jqRs94a9DcXcHvHeIhS1CDvO4kYSKksl5QW1GMRrFUzRnuEBh98yyPMH7SqN Jngfbd8gkaR/7vHL5rsjsvRpKOz0z3vE51tuQSLzXhqkOsh9qUttTBtzezh/C7X8bjc/fKowgPfAb By+O5R/kg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVvy4-006jiN-V1; Mon, 12 Apr 2021 12:47:05 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVvxQ-006jY9-Do; Mon, 12 Apr 2021 12:46:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=qQl7aNwhh8W5u6difRmmqhbsYrTgp/wm2M/74UxB/go=; b=f1ly6dCZyHqOp4+GtnbXIY6hV6 A6Ij3uOuTbVlASurfsfe+Fk52t1gUgO+LchKCl1h4RBbSeFk3S+xrHWHqLUkDP90nslpDkYsKXWi1 HUAj4lWRlgefwp0H78uYilS4Htf6C/bbooTSqpkHT9g9wmB9aBcRykNyleJYhKgGKqNoOWDAIoIpX vT7QClCgqMcEUx6PSqYotUb8P4TeMeBlpgA4ZCQaVBdBFtyXGLryiJrW9K9c3IOxWTc3OxMyS+W01 TLqsq+yL6MW5v81D5r8F4t3Yhd+EgUX67+5gfwxz+5po7Rvhm4d/ngyLyIxkJCGNyAaufLRTDu18A EVFnnuLw==; Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVvxN-006ERP-Sm; Mon, 12 Apr 2021 12:46:23 +0000 X-UUID: 58ac2d5cfad446d1acece20865b26753-20210412 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=qQl7aNwhh8W5u6difRmmqhbsYrTgp/wm2M/74UxB/go=; b=CZog9xwWMdLCcbVgfoH9jAUN9dijEpxmnr7uulB/RdYoploA5llKdUwXsVXDpzA1DWCRHZ+KEIV0o4U1ci6FLTZmuy47OSV1y/0fcqJNH4CQcLcYONlR/z/UyprEuC6CW/ISEAVzs36UtriDd2PGNhGyU57CTIKJLRSuFnXuZOI=; X-UUID: 58ac2d5cfad446d1acece20865b26753-20210412 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 2007333088; Mon, 12 Apr 2021 05:46:19 -0700 Received: from mtkmbs08n1.mediatek.inc (172.21.101.55) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 12 Apr 2021 05:46:18 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 12 Apr 2021 20:46:16 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 12 Apr 2021 20:46:15 +0800 From: Irui Wang To: Alexandre Courbot , Hans Verkuil , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger CC: Tiffany Lin , Fritz Koenig , Tzung-Bi Shih , Maoguang Meng , Longfei Wang , Yunfei Dong , Irui Wang , , , , , , , Subject: [PATCH v3,5/6] media: mtk-vcodec: Add MT8192 H264 venc driver Date: Mon, 12 Apr 2021 20:45:54 +0800 Message-ID: <20210412124555.26897-6-irui.wang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210412124555.26897-1-irui.wang@mediatek.com> References: <20210412124555.26897-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-20210412_054621_953414_2FE355D6 X-CRM114-Status: GOOD ( 12.42 ) 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 Add MT8192 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 | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h index d03cca95e99b..14893d277bb8 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h @@ -302,6 +302,7 @@ struct mtk_vcodec_ctx { enum mtk_chip { MTK_MT8173, MTK_MT8183, + MTK_MT8192, }; /** 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 26b089e81213..78f3dd166917 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c @@ -425,12 +425,26 @@ static const struct mtk_vcodec_enc_pdata mt8183_pdata = { .core_id = VENC_SYS, }; +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), + .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}, {.compatible = "mediatek,mt8173-vcodec-enc-vp8", .data = &mt8173_vp8_pdata}, {.compatible = "mediatek,mt8183-vcodec-enc", .data = &mt8183_pdata}, + {.compatible = "mediatek,mt8192-vcodec-enc", .data = &mt8192_pdata}, {}, }; MODULE_DEVICE_TABLE(of, mtk_vcodec_enc_match);