Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1393412pxj; Fri, 21 May 2021 13:08:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzv5xODNvrNCHFm5Qf6aWRbqdCBeQC3+OYed7AKfzmUwp+2L0XkeGCwxhRFILKX1Udicl5J X-Received: by 2002:a05:6638:a2c:: with SMTP id 12mr6786940jao.99.1621627709636; Fri, 21 May 2021 13:08:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621627709; cv=none; d=google.com; s=arc-20160816; b=Pk9C6CpFjHadc+hj7FYhqWBrqI9xglhpD6ucchLqarV4OcAYvXhfB16ydti4qwIkGA M2gw9HFbaTPCIHrEwkSPvso1EliaxGBIdbQYnH0qnDMuQ9UfiGrx8TQPi4Hhz8ZH4b+6 aO90dAfNDLw2jw1v5Myj2hWzCx911bWZNfEdpVPT7ut5kzWOcWwz7Dh9MyJBdEVesk0J lPER4KLY76p/jpuIKRqlWl4MFBbu+Cxn0R7t2s0E6SowVxsQfFC8DlPBZ0YsKiQHOIPq 1HXTFIqqTG4Or7af3hfF3wpZMMFQRMl901trC1JIWjM0Difyu3ecUXH82Hh4b2+dlkdQ TAhA== 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=0BLQuvwTor0webir5llXpbn7lzIybD0PkS45ESEH/UM=; b=yPKxFZwY4Yw+DhjBxXVLa/dyL09He7HjfIbTUGVBsbAxLRn5+CoKq0TRC1hdD2RL7N E0p4DZssM8VAUig5hWpcZWj1ohphSR+YDlhBqjBFuJcEj/CxdhvfIK2NDq5LEIsUFGVD cykRevsXLjFSzMxL0XDPO7WEtsgql1VnNgD6JsS+oZB9dKR4pWfQwknLqZermUdPb7ew sCqj5yF3FS9cR+DZgRYvHFx0wT6bTKMHgo+0u2BEChEpjEzkW8cDwykw1yfbCfWmD5Yh Ni7qGrsunertivgZU0CrNW9CmA8ST/eGuSks4QxCH0OJPAM24p3Mr79LUjccOKZH+J+4 CqKg== 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 a14si6375901iol.90.2021.05.21.13.08.16; Fri, 21 May 2021 13:08:29 -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 S234921AbhEUHDq (ORCPT + 99 others); Fri, 21 May 2021 03:03:46 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:36153 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S234714AbhEUHDd (ORCPT ); Fri, 21 May 2021 03:03:33 -0400 X-UUID: 89612a3de5d6474a89b6d6d606bb4b1c-20210521 X-UUID: 89612a3de5d6474a89b6d6d606bb4b1c-20210521 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1591568624; Fri, 21 May 2021 15:02:07 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 21 May 2021 15:02:05 +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; Fri, 21 May 2021 15:02:04 +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 , Yong Wu CC: Yunfei Dong , Fritz Koenig , Tzung-Bi Shih , Irui Wang , , , , , , , Subject: [PATCH v4,5/6] media: mtk-vcodec: Add MT8192 H264 venc driver Date: Fri, 21 May 2021 15:01:38 +0800 Message-ID: <20210521070139.20644-6-irui.wang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210521070139.20644-1-irui.wang@mediatek.com> References: <20210521070139.20644-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 --- 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); -- 2.18.0