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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ee264b1a6c8425b752852691945b021f507be7c9.camel@mediatek.com>
Date: Mon, 4 Nov 2024 03:24:54 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: "sumit.semwal@...aro.org" <sumit.semwal@...aro.org>,
	"christian.koenig@....com" <christian.koenig@....com>, "mchehab@...nel.org"
	<mchehab@...nel.org>, "conor+dt@...nel.org" <conor+dt@...nel.org>,
	"robh@...nel.org" <robh@...nel.org>, "matthias.bgg@...il.com"
	<matthias.bgg@...il.com>, "krzk+dt@...nel.org" <krzk+dt@...nel.org>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	Shu-hsiang Yang (楊舒翔)
	<Shu-hsiang.Yang@...iatek.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
	"yunkec@...omium.org" <yunkec@...omium.org>, "linaro-mm-sig@...ts.linaro.org"
	<linaro-mm-sig@...ts.linaro.org>, "linux-media@...r.kernel.org"
	<linux-media@...r.kernel.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, Yaya Chang (張雅清)
	<Yaya.Chang@...iatek.com>, Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@...iatek.com>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	Teddy Chen (陳乾元) <Teddy.Chen@...iatek.com>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "hidenorik@...omium.org"
	<hidenorik@...omium.org>, Shun-Yi Wang (王順億)
	<Shun-Yi.Wang@...iatek.com>
Subject: Re: [PATCH v1 07/10] media: platform: mediatek: add isp_7x video ops

Hi, Shu-hsiang:

On Wed, 2024-10-09 at 19:15 +0800, Shu-hsiang Yang wrote:
> Introduces the V4L2 video interface and feature management for the
> MediaTek ISP7x CAMSYS. These interfaces include various functionalities,
> such as video operation initialization and registration. They also
> manage MediaTek-specific formats and handle buffers for MediaTek camera
> video devices. This integrates CAMSYS functionalities to be compatible
> with the V4L2 framework.
> 
> Signed-off-by: Shu-hsiang Yang <Shu-hsiang.Yang@...iatek.com>
> ---

[snip]

> +
> +static void mtk_cam_fill_ext_fmtdesc(struct v4l2_fmtdesc *fmt)
> +{
> +	const char *descr = NULL;
> +	const unsigned int sz = sizeof(fmt->description);
> +
> +	switch (fmt->pixelformat) {
> +	case V4L2_PIX_FMT_MTISP_SBGGR8:
> +		descr = "8-bit Bayer BGGR MTISP Packed";

V4L2_PIX_FMT_PISP_COMP1_RGGB is a Raspberry Pi format, and its fmtdesc is filled in v4l_fill_fmtdesc().
So move these fill code into v4l_fill_fmtdesc().

Regards,
CK

> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGBRG8:
> +		descr = "8-bit Bayer GBRG MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGRBG8:
> +		descr = "8-bit Bayer GRBG MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SRGGB8:
> +		descr = "8-bit Bayer RGGB MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SBGGR10:
> +		descr = "10-bit Bayer BGGR MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGBRG10:
> +		descr = "10-bit Bayer GBRG MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGRBG10:
> +		descr = "10-bit Bayer GRBG MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SRGGB10:
> +		descr = "10-bit Bayer RGGB MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SBGGR12:
> +		descr = "12-bit Bayer BGGR MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGBRG12:
> +		descr = "12-bit Bayer GBRG MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGRBG12:
> +		descr = "12-bit Bayer GRBG MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SRGGB12:
> +		descr = "12-bit Bayer RGGB MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SBGGR14:
> +		descr = "14-bit Bayer BGGR MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGBRG14:
> +		descr = "14-bit Bayer GBRG MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGRBG14:
> +		descr = "14-bit Bayer GRBG MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SRGGB14:
> +		descr = "14-bit Bayer RGGB MTISP Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SBGGR8F:
> +		descr = "8-bit Full-G Bayer BGGR Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGBRG8F:
> +		descr = "8-bit Full-G Bayer GBRG Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGRBG8F:
> +		descr = "8-bit Full-G Bayer GRBG Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SRGGB8F:
> +		descr = "8-bit Full-G Bayer RGGB Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SBGGR10F:
> +		descr = "10-bit Full-G Bayer BGGR Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGBRG10F:
> +		descr = "10-bit Full-G Bayer GBRG Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGRBG10F:
> +		descr = "10-bit Full-G Bayer GRBG Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SRGGB10F:
> +		descr = "10-bit Full-G Bayer RGGB Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SBGGR12F:
> +		descr = "12-bit Full-G Bayer BGGR Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGBRG12F:
> +		descr = "12-bit Full-G Bayer GBRG Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGRBG12F:
> +		descr = "12-bit Full-G Bayer GRBG Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SRGGB12F:
> +		descr = "12-bit Full-G Bayer RGGB Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SBGGR14F:
> +		descr = "14-bit Full-G Bayer BGGR Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGBRG14F:
> +		descr = "14-bit Full-G Bayer GBRG Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGRBG14F:
> +		descr = "14-bit Full-G Bayer GRBG Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SRGGB14F:
> +		descr = "14-bit Full-G Bayer RGGB Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV12_10P:
> +		descr = "Y/CbCr 4:2:0 10 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV21_10P:
> +		descr = "Y/CrCb 4:2:0 10 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV16_10P:
> +		descr = "Y/CbCr 4:2:2 10 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV61_10P:
> +		descr = "Y/CrCb 4:2:2 10 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_YUYV10P:
> +		descr = "YUYV 4:2:2 10 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_YVYU10P:
> +		descr = "YVYU 4:2:2 10 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_UYVY10P:
> +		descr = "UYVY 4:2:2 10 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_VYUY10P:
> +		descr = "VYUY 4:2:2 10 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV12_12P:
> +		descr = "Y/CbCr 4:2:0 12 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV21_12P:
> +		descr = "Y/CrCb 4:2:0 12 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV16_12P:
> +		descr = "Y/CbCr 4:2:2 12 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV61_12P:
> +		descr = "Y/CrCb 4:2:2 12 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_YUYV12P:
> +		descr = "YUYV 4:2:2 12 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_YVYU12P:
> +		descr = "YVYU 4:2:2 12 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_UYVY12P:
> +		descr = "UYVY 4:2:2 12 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_VYUY12P:
> +		descr = "VYUY 4:2:2 12 bits packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV12_UFBC:
> +		descr = "YCbCr 420 8 bits compress";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV21_UFBC:
> +		descr = "YCrCb 420 8 bits compress";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV12_10_UFBC:
> +		descr = "YCbCr 420 10 bits compress";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV21_10_UFBC:
> +		descr = "YCrCb 420 10 bits compress";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV12_12_UFBC:
> +		descr = "YCbCr 420 12 bits compress";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_NV21_12_UFBC:
> +		descr = "YCrCb 420 12 bits compress";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_BAYER8_UFBC:
> +		descr = "RAW 8 bits compress";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_BAYER10_UFBC:
> +		descr = "RAW 10 bits compress";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_BAYER12_UFBC:
> +		descr = "RAW 12 bits compress";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_BAYER14_UFBC:
> +		descr = "RAW 14 bits compress";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGRB8F:
> +		descr = "8-bit 3 plane GRB Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGRB10F:
> +		descr = "10-bit 3 plane GRB Packed";
> +		break;
> +	case V4L2_PIX_FMT_MTISP_SGRB12F:
> +		descr = "12-bit 3 plane GRB Packed";
> +		break;
> +	case V4L2_META_FMT_MTISP_PARAMS:
> +		descr = "MTK ISP Tuning Metadata";
> +		break;
> +	case V4L2_META_FMT_MTISP_3A:
> +		descr = "MTK 3A Statistics";
> +		break;
> +	case V4L2_META_FMT_MTISP_AF:
> +		descr = "MTK AF Statistics";
> +		break;
> +	case V4L2_META_FMT_MTISP_LCS:
> +		descr = "MTK LCS Statistics";
> +		break;
> +	case V4L2_META_FMT_MTISP_LMV:
> +		descr = "MTK LMV Statistics";
> +		break;
> +	default:
> +		descr = NULL;
> +		break;
> +	}
> +
> +	if (descr)
> +		WARN_ON(strscpy(fmt->description, descr, sz) < 0);
> +}
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ