From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Cc: Tomasz Figa <tfiga@chromium.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
Daniel Almeida <daniel.almeida@collabora.com>,
Hidenori Kobayashi <hidenorik@chromium.org>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Sean Young <sean@mess.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Sebastian Fricke <sebastian.fricke@collabora.com>,
Ricardo Ribalda <ribalda@chromium.org>
Subject: Re: [ANN] Request for Topics and registration for a Media Summit September 16th
Date: Wed, 12 Jun 2024 23:19:39 +0300 [thread overview]
Message-ID: <20240612201939.GS28989@pendragon.ideasonboard.com> (raw)
In-Reply-To: <478a8ea7c62b5a17ca645fdd3d06e677bb5d8572.camel@collabora.com>
On Wed, Jun 12, 2024 at 04:09:53PM -0400, Nicolas Dufresne wrote:
> Le mercredi 12 juin 2024 à 18:01 +0900, Tomasz Figa a écrit :
> > > I would like to
> > > deprecate MMAP too and only focus on DMABUF. I believe Linux needs a
> > > centralized buffer allocator, instead of having multiple allocation APIs
> > > scattered in different places. There are design ideas in gralloc that we
> > > could benefit from.
> > >
> >
> > Given that we now have DMA-buf heaps in mainline, it sounds much more
> > realistic. It would certainly help eliminate some issues in the vb2
> > layer, such as vb2-dma-sg having its own open coded page allocation
> > that can't handle DMA addressing limitations (which can be fixed with
> > some additions to the DMA API, but eliminating the problem altogether
> > is way better than any other solution.)
> >
> > That said, as we already use a centralized DMA-buf allocator in
> > ChromeOS and don't really care about the MMAP mode, I'm definitely
> > biased here. We would need to hear from people working on userspace
> > which still uses it (if there is any).
>
> This aspect is what makes the V4L2 support in chromium really sad to non
> ChromeOS users. ChromeOS makes arbitrary decisions like that codec video node
> must be named video-dec0/enc0 (there is solutions to that using udev and
> topologies btw), and decided that minigbm is the only way allocate memory for
> these codecs on Linux. In practice, in every project where we need Chromium V4L2
> codecs, we endup having to patch it to do MMAP/dmabuf export support and EGL
> import support (the other way around).
>
> I'm not bashing against ChromeOS, I just want to underline that this is far from
> a solve problem,
I think we all agree on this. There's an extensive amount of work
required in this area.
> and no one is actively working on it.
That may change though, I've heard that some of the people involved in a
previous attempt are considering resuming the work. It of course doesn't
provide a guarantee of success.
> I don't see minigbm
> becoming an acceptable goto library, since EOL (in Chromebook term) hardware get
> removed and you need a CLA to contribute. I also strongly disagree that the
> calculation of auxiliary buffer needed for codecs reference frame should be done
> in a third party library. The driver must validate these sizes, and is the
> logical place to have this logic, not a third party system allocator. On that
> front though, its a bit like the video-decX dev node naming, there is a generic
> solution, since the size is exposed through TRY/S_FMT calls already.
I think the selection of an allocator (in a nutshell, what DMA heap to
use) and the selection of buffer parameters (size, format, stride,
modifiers, ...) are two related but distinct problems. We need to design
a solution that will address both, but keep them distinct so that one
can still use the future generic allocator API without having to
delegate all the allocation parameters decisions to a third-party
component.
> I'll repeat that as often as needed, there is a lot of gaps toward removing mmap
> (dmabuf exportation) in CODEC drivers which ChromeOS only have hacks around and
> no generic solution suitable for generic linux community. In FFMPEG and
> GStreamer, we use mmap + dmabuf export because that is actually usable in a
> generic manner today.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2024-06-12 20:20 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-06 11:33 [ANN] Request for Topics and registration for a Media Summit September 16th Hans Verkuil
2024-05-06 11:40 ` Ricardo Ribalda
2024-05-06 12:31 ` Laurent Pinchart
2024-05-06 13:32 ` Sean Young
2024-05-07 6:40 ` Tommaso Merciai
2024-05-08 7:16 ` Hans Verkuil
2024-05-08 12:19 ` Tommaso Merciai
2024-05-14 16:16 ` Daniel Almeida
2024-06-12 4:12 ` Tomasz Figa
2024-06-12 6:46 ` Hans Verkuil
2024-06-12 7:10 ` Steve Cho
2024-06-12 7:54 ` Mauro Carvalho Chehab
2024-06-12 8:22 ` Tomasz Figa
2024-06-12 8:34 ` Laurent Pinchart
2024-06-12 9:01 ` Tomasz Figa
2024-06-12 9:20 ` Laurent Pinchart
2024-06-12 9:33 ` Tomasz Figa
2024-06-12 9:40 ` Laurent Pinchart
2024-06-12 20:09 ` Nicolas Dufresne
2024-06-12 20:19 ` Laurent Pinchart [this message]
2024-06-13 7:17 ` Chen-Yu Tsai
2024-06-12 20:44 ` Mauro Carvalho Chehab
2024-06-12 20:52 ` Laurent Pinchart
2024-06-13 7:08 ` Hans Verkuil
2024-06-13 9:12 ` Laurent Pinchart
2024-06-13 9:38 ` Hans Verkuil
2024-06-13 9:59 ` Laurent Pinchart
2024-06-12 20:35 ` Mauro Carvalho Chehab
2024-06-13 7:38 ` Hans Verkuil
2024-06-13 8:14 ` Tomasz Figa
2024-06-13 8:35 ` Hans Verkuil
2024-06-13 10:08 ` Laurent Pinchart
2024-06-12 8:06 ` Tomasz Figa
2024-06-12 7:46 ` Laurent Pinchart
2024-05-15 9:32 ` Hans Verkuil
2024-06-04 21:48 ` Steve Cho
2024-06-17 12:43 ` Hans Verkuil
2024-06-19 9:28 ` Tomasz Figa
2024-06-28 11:59 ` Sakari Ailus
2024-07-16 13:11 ` 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=20240612201939.GS28989@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=daniel.almeida@collabora.com \
--cc=hidenorik@chromium.org \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nicolas.dufresne@collabora.com \
--cc=ribalda@chromium.org \
--cc=sakari.ailus@linux.intel.com \
--cc=sean@mess.org \
--cc=sebastian.fricke@collabora.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.