From: Matthew Majewski <mattwmajewski@gmail.com>
To: Hans Verkuil <hans@jjverkuil.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
Uwe Kleine-Konig <u.kleine-koenig@baylibre.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Naushir Patuck <naush@raspberrypi.com>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] media: vim2m: add multiplanar API support
Date: Mon, 28 Apr 2025 14:40:42 -0400 [thread overview]
Message-ID: <8b0234aeabc8d33a2d8025b42642362481a6c06a.camel@gmail.com> (raw)
In-Reply-To: <09726b7e-4ac4-4ebe-b1eb-4d142c2ee0fb@jjverkuil.nl>
Hello Hans,
On Sun, 2025-04-27 at 11:45 +0200, Hans Verkuil wrote:
> Hi Matthew,
>
> On 04/03/2025 20:16, Matthew Majewski wrote:
> > Hi everyone,
> >
> > This patch series adds multiplane API support for the virtual M2M
> > driver, along with some minor driver refactoring/improvements.
> >
> > I followed the lead of the vivid driver and made multiplanar
> > support
> > selectable with a module parameter, and the default is to use the
> > single planar api.
> >
> > Although there are not yet any pixelformats in the driver that make
> > use of multiple memory planes, adding support for these should be
> > easier now with the API level changes taken care of.
>
> Are you planning follow-up patches adding support for at least one
> multiplanar format? That would be really nice.
>
> Regards,
>
> Hans
>
Yes, I currently have a WIP patch series to add support for all of the
formats that vivid currently supports to vim2m. It involves a huge
refactor though, so I split the groundwork for supporting the multi-
planar formats into a separate patch series first.
Best,
Matthew
> >
> > v4l2-compliance reports the following with multiplane support
> > disabled:
> >
> > Total for vim2m device /dev/video0: 48, Succeeded: 48, Failed: 0,
> > Warnings: 0
> >
> > and the same with multiplane support enabled:
> >
> > Total for vim2m device /dev/video0: 48, Succeeded: 48, Failed: 0,
> > Warnings: 0
> >
> > Patches need to be applied in increasing numerical order (Patch
> > [3/3]
> > depends on [1/3] and [2/3]).
> >
> > Since the multi-plane changes had to touch a lot of the driver, I
> > did
> > a basic regression test with the following script which generates a
> > test input image with vivid and an output image from vim2m for each
> > supported format. I confirmed all outputs visually and verified
> > they
> > were identical to the outputs before the change. Testing was done
> > on
> > an x86_64 qemu image.
> >
> > #!/bin/sh
> >
> > # tested with HDMI vivid emulation
> > # modprobe vivid num_inputs=1 input_types=3
> >
> > vim2m=/dev/video0
> > vivid=/dev/video1
> >
> > width=640
> > height=480
> > out_width=320
> > out_height=240
> >
> > capture_formats=$(v4l2-ctl -d $vim2m --list-formats | awk '/\]:/
> > {print $2}' | sed "s/'//g")
> > output_formats=$(v4l2-ctl -d $vim2m --list-formats-out | awk '/\]:/
> > {print $2}' | sed "s/'//g")
> >
> > # Turn off text mode so that images will be identical
> > v4l2-ctl -d $vivid -c osd_text_mode=2
> >
> > for ofmt in ${output_formats}; do
> > # generate input image
> > inname="${width}x${height}.${ofmt}"
> > v4l2-ctl -d $vivid -v
> > pixelformat=$ofmt,width=$width,height=$height,field=none \
> > --stream-mmap --stream-count=1 --stream-to=$inname
> > for cfmt in ${capture_formats}; do
> > outname="${out_width}x${out_height}-out.${cfmt}"
> > v4l2-ctl -d $vim2m -x
> > pixelformat=$ofmt,width=$width,height=$height \
> > -v
> > pixelformat=$cfmt,width=$out_width,height=$out_height \
> > --stream-from=$inname --stream-to=$outname --
> > stream-mmap --stream-out-mmap \
> > --stream-count=1
> > done
> > done
> >
> > Matthew Majewski (3):
> > media: v4l2-common: Add RGBR format info
> > media: vim2m: Simplify try_fmt
> > media: vim2m: Add parametized support for multiplanar API
> >
> > drivers/media/test-drivers/vim2m.c | 327 +++++++++++++++++++++-
> > ----
> > drivers/media/v4l2-core/v4l2-common.c | 1 +
> > 2 files changed, 274 insertions(+), 54 deletions(-)
> >
>
next prev parent reply other threads:[~2025-04-28 18:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 19:16 Matthew Majewski
2025-03-04 19:16 ` [PATCH 1/3] media: v4l2-common: Add RGBR format info Matthew Majewski
2025-03-04 19:17 ` [PATCH 2/3] media: vim2m: Simplify try_fmt Matthew Majewski
2025-03-04 19:17 ` [PATCH 3/3] media: vim2m: Add parametized support for multiplanar API Matthew Majewski
2025-04-27 9:45 ` [PATCH 0/3] media: vim2m: add multiplanar API support Hans Verkuil
2025-04-28 18:40 ` Matthew Majewski [this message]
2025-04-29 6:04 ` Hans Verkuil
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=8b0234aeabc8d33a2d8025b42642362481a6c06a.camel@gmail.com \
--to=mattwmajewski@gmail.com \
--cc=hans@jjverkuil.nl \
--cc=hverkuil@xs4all.nl \
--cc=jacopo.mondi@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=naush@raspberrypi.com \
--cc=sakari.ailus@linux.intel.com \
--cc=skhan@linuxfoundation.org \
--cc=u.kleine-koenig@baylibre.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
all inboxes | Powered by JetHome®