Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp124426pxj; Thu, 27 May 2021 23:22:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyawJTBo08os3z5UcI7EznJEKDXLDATJEJt2uUSRo7XAQraD/ytYRzPu5vRi9to2PpcR6La X-Received: by 2002:a05:6402:128f:: with SMTP id w15mr8217214edv.354.1622182938241; Thu, 27 May 2021 23:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622182938; cv=none; d=google.com; s=arc-20160816; b=fJ3/M0A040D+/aA/mX3P75KhQ6p7wlJVBOsVUFSYVyMbBoW1qA9/vtvjfwkxl1xY4f hEeWuaDqs3xm7Vp0mPnpBljMAFYfmgd6xvPvg6VxV0WoyM72zhCs1ZA1WvdTHdMNQ1HO ojY7JGS5tuG1ksO1NskWcr3Gqlrl8WlHpEOK2pABR25BQXd98WDVq8MjMOvqHgzJ1ClN OUBOPkZB/3/xbpP8bTdhIfXuaQ6Zlu2D/1bPfHIhsh4uQMaRe5RPYH/7kSzeQp+SV6jh Y6tpGnI+q4Gmb8aNkBW0poaljh/ONMP9BaHM/5PaCxVNbq50caAF65kZ6cTsRQN/A6QJ N0eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=EdzLC7l4XdVl2ilxTTLQHfQYb5Bw2iR1mHYkfq0runA=; b=j9yrBLDm+KeLzRPEyISHmnzaxuiyb4r6YKV5zYA6fcCYXVVieiNDFXuroK5z1lkpHS 3I7SG94dVxaFGuzgC4ZnktJjadj0yPH4lq6qrVqDuFnljp6CIa6RcjEbdLmoskvVWrEu JFY3oTFyG9iESAIcUJ7tO/ojx0XasIrzzRBFb4h+RRhS0HFPI/PC8XJNM9PNYDLO+XWm 5ptzCeLu1ktCBVR9auMUGudjWwoIY7B9Z2feNU/8gf+agMhh5h5RyC6sNqdMD7dLNbmK KmVQ0cVP6Sf+TMUNoNNBXX+zAtZYo2OswvimRGAtS28j857xPHyAm9jNpneWd2VpnJp6 5xvg== 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=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y3si3975133edp.547.2021.05.27.23.21.54; Thu, 27 May 2021 23:22:18 -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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234926AbhE1F3d (ORCPT + 99 others); Fri, 28 May 2021 01:29:33 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:59766 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233253AbhE1F3d (ORCPT ); Fri, 28 May 2021 01:29:33 -0400 Received: from [IPv6:2a00:a040:193:3500:ed56:60fb:a74f:177d] (unknown [IPv6:2a00:a040:193:3500:ed56:60fb:a74f:177d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dafna) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 53FA91F43EF3; Fri, 28 May 2021 06:27:55 +0100 (BST) Subject: Re: [PATCH v4,5/6] media: mtk-vcodec: Add MT8192 H264 venc driver To: Irui Wang , 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 , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20210521070139.20644-1-irui.wang@mediatek.com> <20210521070139.20644-6-irui.wang@mediatek.com> From: Dafna Hirschfeld Message-ID: Date: Fri, 28 May 2021 08:27:51 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210521070139.20644-6-irui.wang@mediatek.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi On 21.05.21 10:01, Irui Wang wrote: > 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*/ missing space before '*/' > + .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), If all three models mt8173, mt8183 and mt8192 support the same formats then we should probably not name the structs according to one of the models, so maybe: s/mtk_video_formats_capture_mt8183/mtk_video_formats_capture/ s/mtk_video_formats_output_mt8173/mtk_video_formats_output/ or some other naming Thanks, Dafna > + .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); >