lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f8618c29-167b-a627-e4b1-d117ec860b7e@collabora.com>
Date:   Mon, 18 Jul 2022 12:40:19 +0200
From:   AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
To:     Irui Wang <irui.wang@...iatek.com>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Tzung-Bi Shih <tzungbi@...omium.org>,
        nicolas.dufresne@...labora.com, wenst@...omium.org,
        kyrie wu <kyrie.wu@...iatek.com>
Cc:     Project_Global_Chrome_Upstream_Group@...iatek.com,
        linux-media@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org,
        Tomasz Figa <tfiga@...omium.org>, xia.jiang@...iatek.com,
        maoguang.meng@...iatek.com, srv_heupstream@...iatek.com
Subject: Re: [V11,3/7] mtk-jpegenc: manage jpegenc multi-hardware

Il 16/07/22 11:34, Irui Wang ha scritto:
> From: kyrie wu <kyrie.wu@...iatek.com>
> 
> manage each hardware information, including irq/clk/power.
> the hardware includes HW0 and HW1.
> 
> Signed-off-by: kyrie wu <kyrie.wu@...iatek.com>
> Signed-off-by: irui wang <irui.wang@...iatek.com>
> 
> ---
>   drivers/media/platform/mediatek/jpeg/Makefile |  11 +-
>   .../platform/mediatek/jpeg/mtk_jpeg_core.c    |  94 ++++++----
>   .../platform/mediatek/jpeg/mtk_jpeg_core.h    |  37 ++++
>   .../platform/mediatek/jpeg/mtk_jpeg_enc_hw.c  | 163 ++++++++++++++++++
>   4 files changed, 272 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/media/platform/mediatek/jpeg/Makefile b/drivers/media/platform/mediatek/jpeg/Makefile
> index 76c33aad0f3f..69703db4b0a5 100644
> --- a/drivers/media/platform/mediatek/jpeg/Makefile
> +++ b/drivers/media/platform/mediatek/jpeg/Makefile
> @@ -1,6 +1,9 @@
>   # SPDX-License-Identifier: GPL-2.0-only
> -mtk_jpeg-objs := mtk_jpeg_core.o \
> +obj-$(CONFIG_VIDEO_MEDIATEK_JPEG) += mtk_jpeg.o \
> +	mtk-jpeg-enc-hw.o
> +
> +mtk_jpeg-y := mtk_jpeg_core.o \
>   		 mtk_jpeg_dec_hw.o \
> -		 mtk_jpeg_dec_parse.o \
> -		 mtk_jpeg_enc_hw.o
> -obj-$(CONFIG_VIDEO_MEDIATEK_JPEG) += mtk_jpeg.o
> +		 mtk_jpeg_dec_parse.o
> +
> +mtk-jpeg-enc-hw-y := mtk_jpeg_enc_hw.o
> diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
> index 724fb7aeb0ee..3286e9606505 100644
> --- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
> +++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c

..snip..

> @@ -1497,6 +1516,18 @@ static const struct mtk_jpeg_variant mtk_jpeg_drvdata = {
>   	.cap_q_default_fourcc = V4L2_PIX_FMT_JPEG,
>   };
>   
> +static struct mtk_jpeg_variant mtk8195_jpegenc_drvdata = {

mt8195_jpegenc_drvdata, or mtk_jpegenc_multicore_drvdata

(same applies for jpegdec)

> +	.formats = mtk_jpeg_enc_formats,
> +	.num_formats = MTK_JPEG_ENC_NUM_FORMATS,
> +	.qops = &mtk_jpeg_enc_qops,
> +	.m2m_ops = &mtk_jpeg_multicore_enc_m2m_ops,

Same comment for jpgenc as well: add support for this device after adding support
for multicore encoder.

> +	.dev_name = "mtk-jpeg-enc",
> +	.ioctl_ops = &mtk_jpeg_enc_ioctl_ops,
> +	.out_q_default_fourcc = V4L2_PIX_FMT_YUYV,
> +	.cap_q_default_fourcc = V4L2_PIX_FMT_JPEG,
> +};
> +
> +#if defined(CONFIG_OF)
>   static const struct of_device_id mtk_jpeg_match[] = {
>   	{
>   		.compatible = "mediatek,mt8173-jpgdec",
> @@ -1510,10 +1541,15 @@ static const struct of_device_id mtk_jpeg_match[] = {
>   		.compatible = "mediatek,mtk-jpgenc",
>   		.data = &mtk_jpeg_drvdata,
>   	},
> +	{
> +		.compatible = "mediatek,mt8195-jpgenc",
> +		.data = &mtk8195_jpegenc_drvdata,
> +	},
>   	{},
>   };
>   
>   MODULE_DEVICE_TABLE(of, mtk_jpeg_match);
> +#endif
>   
>   static struct platform_driver mtk_jpeg_driver = {
>   	.probe = mtk_jpeg_probe,




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ