Re: [PATCH v1 04/10] media: platform: mediatek: add isp_7x cam-raw unit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Shu-hsiang:

On Wed, 2024-10-09 at 19:15 +0800, Shu-hsiang Yang wrote:
> Introduces the ISP pipeline driver for the MediaTek ISP raw and yuv
> modules. Key functionalities include data processing, V4L2 integration,
> resource management, debug support, and various control operations.
> Additionally, IRQ handling, platform device management, and MediaTek
> ISP DMA format support are also included.
> 
> Signed-off-by: Shu-hsiang Yang <Shu-hsiang.Yang@xxxxxxxxxxxx>
> ---

[snip]

> +
> +static const struct mtk_cam_format_desc yuv_out_group2_fmts[] = {
> +	{
> +		.vfmt.fmt.pix_mp = {
> +			.width = YUV_GROUP2_MAX_WIDTH,
> +			.height = YUV_GROUP2_MAX_HEIGHT,

I don't know why you define width and height here.
All width/height of yuv_out_group2_fmts are the same.
And the max width/height is define in capture_queues[].frmsizes.
So the width/height could be dropped here.

Regards,
CK

> +			.pixelformat = V4L2_PIX_FMT_NV12,
> +		},
> +	},
> +	{
> +		.vfmt.fmt.pix_mp = {
> +			.width = YUV_GROUP2_MAX_WIDTH,
> +			.height = YUV_GROUP2_MAX_HEIGHT,
> +			.pixelformat = V4L2_PIX_FMT_NV21,
> +		},
> +	},
> +	{
> +		.vfmt.fmt.pix_mp = {
> +			.width = YUV_GROUP2_MAX_WIDTH,
> +			.height = YUV_GROUP2_MAX_HEIGHT,
> +			.pixelformat = V4L2_PIX_FMT_NV12_10,
> +		},
> +	},
> +	{
> +		.vfmt.fmt.pix_mp = {
> +			.width = YUV_GROUP2_MAX_WIDTH,
> +			.height = YUV_GROUP2_MAX_HEIGHT,
> +			.pixelformat = V4L2_PIX_FMT_NV21_10,
> +		},
> +	},
> +	{
> +		.vfmt.fmt.pix_mp = {
> +			.width = YUV_GROUP2_MAX_WIDTH,
> +			.height = YUV_GROUP2_MAX_HEIGHT,
> +			.pixelformat = V4L2_PIX_FMT_MTISP_NV12_10P,
> +		},
> +	},
> +	{
> +		.vfmt.fmt.pix_mp = {
> +			.width = YUV_GROUP2_MAX_WIDTH,
> +			.height = YUV_GROUP2_MAX_HEIGHT,
> +			.pixelformat = V4L2_PIX_FMT_MTISP_NV21_10P,
> +		},
> +	},
> +	{
> +		.vfmt.fmt.pix_mp = {
> +			.width = YUV_GROUP2_MAX_WIDTH,
> +			.height = YUV_GROUP2_MAX_HEIGHT,
> +			.pixelformat = V4L2_PIX_FMT_NV12_12,
> +		},
> +	},
> +	{
> +		.vfmt.fmt.pix_mp = {
> +			.width = YUV_GROUP2_MAX_WIDTH,
> +			.height = YUV_GROUP2_MAX_HEIGHT,
> +			.pixelformat = V4L2_PIX_FMT_NV21_12,
> +		},
> +	},
> +	{
> +		.vfmt.fmt.pix_mp = {
> +			.width = YUV_GROUP2_MAX_WIDTH,
> +			.height = YUV_GROUP2_MAX_HEIGHT,
> +			.pixelformat = V4L2_PIX_FMT_MTISP_NV12_12P,
> +		},
> +	},
> +	{
> +		.vfmt.fmt.pix_mp = {
> +			.width = YUV_GROUP2_MAX_WIDTH,
> +			.height = YUV_GROUP2_MAX_HEIGHT,
> +			.pixelformat = V4L2_PIX_FMT_MTISP_NV21_12P,
> +		},
> +	}
> +};
> +

[snip]

> +#define MTK_RAW_TOTAL_CAPTURE_QUEUES 15
> +static const struct
> +mtk_cam_dev_node_desc capture_queues[] = {
> 

[snip]

> +	{
> +		.id = MTK_RAW_YUVO_2_OUT,
> +		.name = "yuvo 2",
> +		.cap = V4L2_CAP_VIDEO_CAPTURE_MPLANE,
> +		.buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
> +		.link_flags = MEDIA_LNK_FL_ENABLED |  MEDIA_LNK_FL_IMMUTABLE,
> +		.image = true,
> +		.smem_alloc = false,
> +		.dma_port = MTKCAM_IPI_RAW_YUVO_2,
> +		.fmts = yuv_out_group2_fmts,
> +		.num_fmts = ARRAY_SIZE(yuv_out_group2_fmts),
> +		.default_fmt_idx = 0,
> +		.pad_ops = &source_pad_ops_yuv,
> +		.ioctl_ops = &mtk_cam_v4l2_vcap_ioctl_ops,
> +		.frmsizes = &(struct v4l2_frmsizeenum) {
> +			.index = 0,
> +			.type = V4L2_FRMSIZE_TYPE_CONTINUOUS,
> +			.stepwise = {
> +				.max_width = YUV_GROUP2_MAX_WIDTH,
> +				.min_width = IMG_MIN_WIDTH,
> +				.max_height = YUV_GROUP2_MAX_HEIGHT,
> +				.min_height = IMG_MIN_HEIGHT,
> +				.step_height = 1,
> +				.step_width = 1,
> +			},
> +		},
> +	},
> +};
> +




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux