Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1578643pxj; Fri, 4 Jun 2021 19:33:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZ2fNRlZeWIFUW6pddBv87z5LbuqHblFOnNSCOxTCIOQbw+w7kF+7pSpsAmTvQU+yd5oMC X-Received: by 2002:a17:906:c1d0:: with SMTP id bw16mr7234536ejb.146.1622860383429; Fri, 04 Jun 2021 19:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622860383; cv=none; d=google.com; s=arc-20160816; b=gHGE7Mgv6qIW0W1jvLKHlgLNdl2cCEZPEQIAkN/sK8Yltac33o71NMJTN2dGUzYJWi YAvo3UQxBnKdRgUCbCl+SmgCJiAFngF3iphidD43hjAQ2ZLzv1cCs/UrJWYJVCF2G/x2 Kmg1mpvVmM4l25k1eyXAhzPhdqr4EzlLvyUkoVZcjQum93TIKh+RD+Y2EvFJ1qP9zPUb kowaEQWet4HOgAtw+CSr4TSgF/OrWbmS0/eZ9y2NcYfVaGm1Q0+U2kaRV+1B7h1t5waC dVWrrWyQYouBHOervp3mbS7stK1+VKnI8sXI7Vnv+1+SBQQQ6xWslErxYyBqkkxEzl/x fpFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=SmeccorHqdn7eTkuaolYl3qBEWaqevg1iPziLCPgikA=; b=ofoQw/O4MhWuiu3oIb2fP9y1q+4dSPme8tcGZN6AHQMqmiPhWksNOHzeyyNTV8mZf2 6rxD9nrbLt110qhaa1R2vR3fVMLEBOBi5Dajj8cQfdmQ6PBFs2OALq3CV8fPLhJOZxxo hv2gV+YdZWxd+lP/3PXXTiWS65fsfcQH21DBD4970Y+SSdS/5cG0R9J7GPapC0n80rMy qJUNkxKe0O9WwD5VGE6gxM3Sm5mMIkk4zG6GK2bcCQXaee7s0IMTYqO6lFyMpTerYMmZ /nJ25Iq+pzJphV89A8DhUvbB4/AzOj/GYeIxf4FI4k33E0lj9MdmY4gQX4a3FbGIuH6f XVXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a16si5925389eds.411.2021.06.04.19.32.40; Fri, 04 Jun 2021 19:33:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231810AbhFECbd (ORCPT + 99 others); Fri, 4 Jun 2021 22:31:33 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:37669 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231609AbhFECbc (ORCPT ); Fri, 4 Jun 2021 22:31:32 -0400 X-UUID: 86c21490bd1043a684cfca3a3ae8916c-20210605 X-UUID: 86c21490bd1043a684cfca3a3ae8916c-20210605 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1372507308; Sat, 05 Jun 2021 10:29:42 +0800 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; Sat, 5 Jun 2021 10:29:34 +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; Sat, 5 Jun 2021 10:29:33 +0800 From: Irui Wang To: Alexandre Courbot , Hans Verkuil , Tzung-Bi Shih , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa , Yong Wu CC: Hsin-Yi Wang , Maoguang Meng , Longfei Wang , Yunfei Dong , Fritz Koenig , Irui Wang , , , , , , , Subject: [PATCH v5,5/6] media: mtk-vcodec: Add MT8192 H264 venc driver Date: Sat, 5 Jun 2021 10:29:17 +0800 Message-ID: <20210605022918.4213-6-irui.wang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210605022918.4213-1-irui.wang@mediatek.com> References: <20210605022918.4213-1-irui.wang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add MT8192 venc driver's compatible and device private data. Reviewed-by: Tzung-Bi Shih 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..45d1870c83dd 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); -- 2.18.0