Hi Bingbu, On 10/24/23 13:29, bingbu.cao@xxxxxxxxx wrote: > From: Bingbu Cao <bingbu.cao@xxxxxxxxx> > > Register v4l2 video device and setup the vb2 queue to > support basic video capture. Video streaming callback > will trigger the input system driver to construct a > input system stream configuration for firmware based on > data type and stream ID and then queue buffers to firmware > to do capture. > > Signed-off-by: Bingbu Cao <bingbu.cao@xxxxxxxxx> While testing this new version I found a small issue in the enum_fmt implementation caused by the mbus_code filtering support I suggested. Attached is a single-line patch which fixes this, can you please fold this into the next version ? Regards, Hans
From 4c3b1445f51e8123ac3fb3fbf76b2c429a1c77fa Mon Sep 17 00:00:00 2001 From: Hans de Goede <hdegoede@xxxxxxxxxx> Date: Sun, 5 Nov 2023 17:46:52 +0100 Subject: [PATCH] media: ipu6-isys-video: Do not set mbus_code from vidioc_enum_fmt_vid_cap When enumerating userspace will call vidioc_enum_fmt_vid_cap repeatedly with higher v4l2_fmtdesc.index values until it returns -EINVAL to indicate all formats have been enumerated. Some userspace code such as e.g. v4l2-ctl only fills the v4l2_fmtdesc struct once and then only increases v4l2_fmtdesc.index for subsequent calls. Setting v4l2_fmtdesc.mbus_code when it was 0 changes subsequent vidioc_enum_fmt_vid_cap from unfiltered mode to mbus-code filtered mode breaking unfiltered enumeration. Do not set v4l2_fmtdesc.mbus_code in unfiltered mode to fix this. Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> --- drivers/media/pci/intel/ipu6/ipu6-isys-video.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-video.c b/drivers/media/pci/intel/ipu6/ipu6-isys-video.c index f81934a301b4..e73a46eb7fd3 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-video.c +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-video.c @@ -129,7 +129,6 @@ int ipu6_isys_vidioc_enum_fmt(struct file *file, void *fh, if (!f->mbus_code) { f->flags = 0; f->pixelformat = ipu6_isys_pfmts[f->index].pixelformat; - f->mbus_code = ipu6_isys_pfmts[f->index].code; return 0; } -- 2.41.0