Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1048572pxf; Fri, 12 Mar 2021 00:06:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUb3FPXVh7L62R+EJd29kRE1Vc9gjfJnL2IYUUmDH28bev3jTicHikZ4gc6J0f/rgVOTY9 X-Received: by 2002:a17:907:788e:: with SMTP id ku14mr7381593ejc.17.1615536386600; Fri, 12 Mar 2021 00:06:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615536386; cv=none; d=google.com; s=arc-20160816; b=jTA/NVVdzglQNUKL51VuCeY1bductUisx2oRqVOnEOeYKlu2a7Nmlx/4nA/zHq6Fgq 0a5nJpFXyhuYnL1AyDBeH+ZjY3FjeyWzfn25PUJzDdWnPjtmU+H4WNoQlpk3aH3curoW IcIN2XOBRLyy+HWugvckuZYU//yySHzFib6o8ocTkNpyw+SEcIlQOQ1tme4JMgijjRCS LdXrVx5HRdEG861Ml0kGmvMzOXikOr2J4eNbVBE1ohyyNQ7vwlT3EVyH7RT0NhHYTjQJ lgoj/UMI6T9KDW7RP/QJXJy0IeE8BHcqr0YazUr9fUVO/CQfAlGjGwH/burhZvIWi45C uijQ== 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=tyh1jfhkKxHEYpwggmS05uhel8LGKNlAylvmejrELUE=; b=X1P6+H08shzAZycC1ZOQzCZIpIobqtrDEu3o79OBXaB2qhNUq4HfoMQrGWowfF11K+ u7X5ih8IbvEUo9AfWh7cTTz30DSQsNZhF6++K08NgbokHNX6GpvOpRz2VMzPT7LumHwx uwUVcnntyO6+8YayAAXh0wLl1sr6rCo27rt+O4XW+3LZvplUYP+G3NxgmSWjRURrop+J EMnY5nqujhmRnKP1m3Cx6lsPII8N6TEtoxKO8Ww71slstgMjMYerOZLdaha+Ujs+YgK6 kNFBlPF+4OCLSkV1LOk/hlLIxmQmSQsWhAwN5bc+ZRnZJw5Zv/j7g141GKzs6TM50PZN SXAg== 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 f4si3448859ejk.478.2021.03.12.00.06.03; Fri, 12 Mar 2021 00:06:26 -0800 (PST) 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 S232119AbhCLH4i (ORCPT + 99 others); Fri, 12 Mar 2021 02:56:38 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:56555 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231690AbhCLH4F (ORCPT ); Fri, 12 Mar 2021 02:56:05 -0500 X-UUID: 4acb5c40dd684ba0a0c4c2b0d4fe31b8-20210312 X-UUID: 4acb5c40dd684ba0a0c4c2b0d4fe31b8-20210312 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1666184384; Fri, 12 Mar 2021 15:55:57 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 12 Mar 2021 15:55:55 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 12 Mar 2021 15:55:54 +0800 From: Irui Wang To: Alexandre Courbot , Hans Verkuil , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa , Hsin-Yi Wang , Maoguang Meng , Longfei Wang , Yunfei Dong , CC: Irui Wang , , , , , , Subject: [PATCH v2,4/5] media: mtk-vcodec: Add MT8192 H264 venc driver Date: Fri, 12 Mar 2021 15:55:41 +0800 Message-ID: <20210312075542.5503-5-irui.wang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210312075542.5503-1-irui.wang@mediatek.com> References: <20210312075542.5503-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. Signed-off-by: Irui Wang --- .../media/platform/mtk-vcodec/mtk_vcodec_drv.h | 1 + .../platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h index 869d958d2b99..39e78aa670a3 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..981299a44c4a 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,27 @@ 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