linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Tomasz Figa <tfiga@chromium.org>, Hsia-Jun Li <Randy.Li@synaptics.com>
Cc: mchehab@kernel.org, hans.verkuil@cisco.com,
	laurent.pinchart@ideasonboard.com, sakari.ailus@iki.fi,
	boris.brezillon@collabora.com, hiroh@chromium.org,
	Brian.Starkey@arm.com, kernel@collabora.com,
	narmstrong@baylibre.com, linux-kernel@vger.kernel.org,
	frkoenig@chromium.org, stanimir.varbanov@linaro.org,
	Hans Verkuil <hverkuil@xs4all.nl>,
	linux-media@vger.kernel.org
Subject: Re: [RFC PATCH v6 02/11] media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more)
Date: Tue, 15 Nov 2022 11:03:26 -0500	[thread overview]
Message-ID: <df2a19b7fd0238808f00973b2cb5f4f478c38ef9.camel@ndufresne.ca> (raw)
In-Reply-To: <CAAFQd5DD4QgDs-Dff_SB2tNT3d9Hs8HG0rkQFPV+6vgvKqg+qA@mail.gmail.com>

Le vendredi 11 novembre 2022 à 17:52 +0900, Tomasz Figa a écrit :
> > > Memory allocation doesn't sound to me like it is related to formats or
> > > modifiers in any way. I agree with Nicolas that if we want to allow
> > > the userspace to specify if the memory should be contiguous or not,
> > > that should be a separate flag and actually I'd probably see it in
> > > REQBUF_EXT and CREATE_BUFS_EXT, rather than as a part of the format.
> > > 
> > I agree with that. But here is a problem, if there was a display
> > device(DRM) that only supports contiguous planes in a frame buffer.
> > How do we be aware of that?
> 
> That's why I think the MMAP mode is not scalable and shouldn't be
> expanded anymore. Both V4L2 and DRM devices should describe their
> constraints to the userspace and then the userspace should allocate
> accordingly from the right DMA-buf heap. (Or as Android and ChromeOS
> do, just have a central allocator library that understands the
> constraints, so there is no need to query the drivers.)

Just pointing out, they "hardcode" the constraints, they don't truly understand
them. Also, the Android/ChromeOS implementation is not a great playground, as it
completely ignores the constrait already exposed by V4L2 API (the sizeimage and
bytesperline found in the FMT structure). You would not have to implement Hantro
and Rockchip motion vector size calculation there if you'd simply use the
sizeimage.

Nicolas


  parent reply	other threads:[~2022-11-15 16:03 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 18:07 [RFC PATCH v6 00/11] media: v4l2: Add extended fmt and buffer ioctls Helen Koike
2021-01-14 18:07 ` [RFC PATCH v6 01/11] media: v4l2-common: add normalized pixelformat field to struct v4l2_format_info Helen Koike
2021-02-10 12:37   ` Dafna Hirschfeld
2021-01-14 18:07 ` [RFC PATCH v6 02/11] media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more) Helen Koike
2021-02-10 15:02   ` Dafna Hirschfeld
2021-02-23 12:35   ` Hans Verkuil
2021-02-24 15:12     ` Helen Koike
2022-11-05 15:19       ` Hsia-Jun Li
2022-11-06 19:24         ` Laurent Pinchart
2022-11-07  1:54           ` Hsia-Jun Li
2022-11-07  8:28             ` Laurent Pinchart
2022-11-07  8:49               ` Hsia-Jun Li
2022-11-06 22:11         ` Dmitry Osipenko
2022-11-07  2:04           ` Hsia-Jun Li
2022-11-07  8:30           ` Laurent Pinchart
2022-11-08 14:58             ` Dmitry Osipenko
2022-11-07 16:50           ` Fritz Koenig
2022-11-07  8:42         ` Hans Verkuil
2022-11-10 17:06         ` Nicolas Dufresne
2022-11-11  3:03           ` Hsia-Jun Li
2022-11-11  5:48             ` Tomasz Figa
2022-11-11  6:30               ` Hsia-Jun Li
2022-11-11  8:52                 ` Tomasz Figa
2022-11-11  9:13                   ` Hsia-Jun Li
2022-11-15 16:03                   ` Nicolas Dufresne [this message]
2022-11-16 12:38                     ` ayaka
2022-11-11  8:42               ` Laurent Pinchart
2022-11-11  8:54                 ` Tomasz Figa
2022-11-15 16:19                   ` Nicolas Dufresne
2022-11-15 15:57             ` Nicolas Dufresne
2021-01-14 18:07 ` [RFC PATCH v6 03/11] media: v4l2: Add extended buffer (de)queue operations for video types Helen Koike
2021-02-23 12:58   ` Hans Verkuil
2023-01-26  7:07     ` ayaka
     [not found]   ` <20230125200026.16643-1-ayaka@soulik.info>
2023-01-26  8:57     ` Hans Verkuil
2023-01-26 11:02       ` Laurent Pinchart
2023-01-26 18:36         ` ayaka
2023-01-27  8:11           ` Hans Verkuil
2023-01-30 10:07             ` Hsia-Jun Li
2023-01-30 12:17               ` Hans Verkuil
2021-01-14 18:07 ` [RFC PATCH v6 04/11] media: videobuf2-v4l2: reorganize flags handling Helen Koike
2021-01-14 18:07 ` [RFC PATCH v6 05/11] media: videobuf2: Expose helpers for Ext qbuf/dqbuf Helen Koike
2021-01-14 18:07 ` [RFC PATCH v6 06/11] media: vivid: use vb2_ioctls_ext_{d}qbuf hooks Helen Koike
2021-01-14 18:07 ` [RFC PATCH v6 07/11] media: vimc: " Helen Koike
2021-01-14 18:07 ` [RFC PATCH v6 08/11] media: mediabus: Add helpers to convert a ext_pix format to/from a mbus_fmt Helen Koike
2021-01-14 18:07 ` [RFC PATCH v6 09/11] media: vivid: Convert to v4l2_ext_pix_format Helen Koike
2021-01-14 18:07 ` [RFC PATCH v6 10/11] media: vimc: " Helen Koike
2021-01-14 18:07 ` [RFC PATCH v6 11/11] media: docs: add documentation for the Extended API Helen Koike
2021-02-05 18:39 ` [RFC PATCH v6 00/11] media: v4l2: Add extended fmt and buffer ioctls Helen Koike

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=df2a19b7fd0238808f00973b2cb5f4f478c38ef9.camel@ndufresne.ca \
    --to=nicolas@ndufresne.ca \
    --cc=Brian.Starkey@arm.com \
    --cc=Randy.Li@synaptics.com \
    --cc=boris.brezillon@collabora.com \
    --cc=frkoenig@chromium.org \
    --cc=hans.verkuil@cisco.com \
    --cc=hiroh@chromium.org \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=sakari.ailus@iki.fi \
    --cc=stanimir.varbanov@linaro.org \
    --cc=tfiga@chromium.org \
    /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 NNTP newsgroup(s).