Linux-Media Archive mirror
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, bingbu.cao@intel.com,
	laurent.pinchart@ideasonboard.com,
	andriy.shevchenko@linux.intel.com, hdegoede@redhat.com,
	ilpo.jarvinen@linux.intel.com, claus.stovgaard@gmail.com,
	tomi.valkeinen@ideasonboard.com, tfiga@chromium.org,
	senozhatsky@chromium.org, andreaskleist@gmail.com,
	bingbu.cao@linux.intel.com, tian.shu.qiu@intel.com,
	hongju.wang@intel.com
Subject: Re: [PATCH v6 16/18] media: intel/ipu6: support line-based metadata capture support
Date: Sun, 28 Apr 2024 21:06:36 +0000	[thread overview]
Message-ID: <Zi66XKzGqcxOedlr@kekkonen.localdomain> (raw)
In-Reply-To: <0da0d721-1e8f-4979-bc5a-43695c8ebf30@xs4all.nl>

Hi Hans,

Thank you for the review.

On Sat, Apr 27, 2024 at 06:00:13PM +0200, Hans Verkuil wrote:
> > -static int vidioc_try_fmt_vid_cap(struct file *file, void *fh,
> > -				  struct v4l2_format *f)
> > +static int ipu6_isys_vidioc_s_fmt_meta_cap(struct file *file, void *fh,
> > +					   struct v4l2_format *f)
> >  {
> >  	struct ipu6_isys_video *av = video_drvdata(file);
> >  
> > -	ipu6_isys_video_try_fmt_vid(av, &f->fmt.pix);
> 
> This is missing a vb2_is_busy() check.

To be added in v7.

...

> > @@ -1214,8 +1309,10 @@ int ipu6_isys_video_init(struct ipu6_isys_video *av)
> >  	av->vdev.queue = &av->aq.vbq;
> >  	av->vdev.lock = &av->mutex;
> >  
> > -	ipu6_isys_video_try_fmt_vid(av, &format.fmt.pix);
> > +	__ipu6_isys_vidioc_try_fmt_vid_cap(av, &format);
> >  	av->pix_fmt = format.fmt.pix;
> > +	__ipu6_isys_vidioc_try_fmt_meta_cap(av, &format_meta);
> 
> Here is the cause of the v4l2-compliance failure (I think): this will
> set the format_meta pixelformat to ipu6_isys_pfmts[0], which is BG12.
> 
> It doesn't check the is_meta flag there.
> 
> So it is not a v4l2-compliance bug, but a driver bug AFAICT.

Looks like you were right. I was quite confused of what actually was the
problem for v4l2-compliance. Additionally the driver didn't also correctly
enumerate the formats for both of the buffer types.

I've fixed both and v4l2-compliance passes now.

-- 
Kind regards,

Sakari Ailus

  reply	other threads:[~2024-04-28 21:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26  9:58 [PATCH v6 00/18] Intel IPU6 and IPU6 input system drivers Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 01/18] media: ipu6: Add PCI device table header Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 02/18] media: ivsc: csi: Use IPU bridge Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 03/18] media: intel/ipu6: add Intel IPU6 PCI device driver Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 04/18] media: intel/ipu6: add IPU auxiliary devices Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 05/18] media: intel/ipu6: add IPU6 buttress interface driver Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 06/18] media: intel/ipu6: CPD parsing for get firmware components Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 07/18] media: intel/ipu6: add IPU6 DMA mapping API and MMU table Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 08/18] media: intel/ipu6: add syscom interfaces between firmware and driver Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 09/18] media: intel/ipu6: input system ABI " Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 10/18] media: intel/ipu6: add IPU6 CSI2 receiver v4l2 sub-device Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 11/18] media: intel/ipu6: add the CSI2 DPHY implementation Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 12/18] media: intel/ipu6: input system video nodes and buffer queues Sakari Ailus
2024-04-27 15:44   ` Hans Verkuil
2024-04-28 21:09     ` Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 13/18] media: intel/ipu6: add the main input system driver Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 14/18] media: intel/ipu6: add Kconfig and Makefile Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 15/18] media: MAINTAINERS: add maintainers for Intel IPU6 input system driver Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 16/18] media: intel/ipu6: support line-based metadata capture support Sakari Ailus
2024-04-27 16:00   ` Hans Verkuil
2024-04-28 21:06     ` Sakari Ailus [this message]
2024-04-26  9:58 ` [PATCH v6 17/18] media: Documentation: add Intel IPU6 ISYS driver admin-guide doc Sakari Ailus
2024-04-26  9:58 ` [PATCH v6 18/18] media: Documentation: add documentation of Intel IPU6 driver and hardware overview Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zi66XKzGqcxOedlr@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=andreaskleist@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bingbu.cao@intel.com \
    --cc=bingbu.cao@linux.intel.com \
    --cc=claus.stovgaard@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=hongju.wang@intel.com \
    --cc=hverkuil@xs4all.nl \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=tfiga@chromium.org \
    --cc=tian.shu.qiu@intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).