linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@iki.fi>,
	linux-media@vger.kernel.org, Tomasz Figa <tfiga@chromium.org>,
	Hirokazu Honda <hiroh@chromium.org>,
	Nicolas Dufresne <nicolas@ndufresne.ca>,
	Brian Starkey <Brian.Starkey@arm.com>,
	kernel@collabora.com
Subject: Re: [RFC PATCH v2 0/7] media: v4l2: Add extended fmt and buffer ioctls
Date: Mon, 23 Sep 2019 16:40:54 +0200	[thread overview]
Message-ID: <20190923164054.59792271@collabora.com> (raw)
In-Reply-To: <9d53f065-da2c-9ab9-5e97-dbd48237d41e@xs4all.nl>

On Mon, 23 Sep 2019 13:41:07 +0200
Hans Verkuil <hverkuil@xs4all.nl> wrote:

> Hi Boris,
> 
> On 4/4/19 10:16 AM, Boris Brezillon wrote:
> > Hello,
> > 
> > This RFC follows the discussion started by Hans [1] a few months back.
> > It does not try to address all the problem reported in this thread but
> > instead focuses on the FMT and BUF(S) ioctls.
> > 
> > Note that my primary goal is to unify handling for multiplanar and
> > singleplanar formats and extend things to support the "single dmabuf
> > storing all pixel planes" issue.
> > 
> > This version received a bit more testing than the previous one (added
> > new tests to v4l2-compliance [2] to make sure EXT ioctls work as
> > expected and also checked that !ext -> ext wrappers work correctly by
> > running the old tests). Note that I'm not planning to post those
> > v4l-utils patches on the ML until we've settled down on the userspace
> > API, unless I'm explicitly asked to do so.
> > 
> > Right now I'm focusing on the case I was primarily interested in:
> > single dmabuf storing all pixel planes (each being at a different
> > offset), and it seems that patching the VB2 core to support that is
> > not a trivial task.
> > 
> > So here are a few questions for V4L/DMABUF experts:
> > - Can the same dmabuf be mapped several times. I think it's okay apart
> >   from the extra/needless time spent doing cache maintenance
> >   operations, but there might be issues if an IOMMU is involved
> >   (duplicate mappings?). If it's not okay, then we need to find a
> >   solution to only attach/map the DMABUF once when it's used for
> >   several planes (this is what I tried to do here [3], but I'm not
> >   entirely happy with the implementation and started to investigate
> >   another approach here [4]).
> > - How should we pass the offset to drivers that were previously using
> >   the get_cookie() (or the dma_sg wrapper) to retrieve an sg table.
> >   Adding the offset to the dma_addr or vaddr for vmalloc or dma-contig
> >   case can be done in the core, but for an sg-table it's a bit more
> >   complicated. Should drivers access this piece of information
> >   directly from vb2_plane->dbuf_offset? And in that case, how do we
> >   make sure drivers don't simply ignore the offset and assume it's
> >   always zero? 
> > 
> > Few words about the feedback I got from Brian and Nicolas on my v1:
> > 
> > - modifier field has been moved to v4l2_ext_format as suggested
> > - v4l2_timecode is still not present in v4l2_ext_buffer, but can be
> >   added back thanks to the extra reserved space
> > - the ENUMFMT is left as is for now, because I think we want Maxime's
> >   work on DRM/V4L format unification to land before reworking the
> >   ioctl (exposing extra info about the format and not only the 4CC
> >   code?). That also means that there's currently no way to know which
> >   modifiers are supported
> > - EXT_FMT/EXT_BUF capability flags to detect whether new ioctls are
> >   supported or not have not been added yet  
> 
> Can you post a v3, rebased on top of our current master branch? No other
> changes needed, just a rebase.

Ok, I'll try to do that next week.

  reply	other threads:[~2019-09-23 14:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04  8:16 [RFC PATCH v2 0/7] media: v4l2: Add extended fmt and buffer ioctls Boris Brezillon
2019-04-04  8:16 ` [RFC PATCH v2 1/7] media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane Boris Brezillon
2019-04-11  7:59   ` Hans Verkuil
2019-04-11 10:36     ` Boris Brezillon
2019-04-11 10:38       ` Hans Verkuil
2019-04-12  8:25         ` Boris Brezillon
2019-04-12  8:33           ` Boris Brezillon
2019-04-12  9:36           ` Hans Verkuil
2019-04-04  8:16 ` [RFC PATCH v2 2/7] media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more) Boris Brezillon
2019-04-11  8:24   ` Hans Verkuil
2019-04-11  8:37     ` Boris Brezillon
2019-04-04  8:16 ` [RFC PATCH v2 3/7] media: v4l2: Add extended buffer operations Boris Brezillon
2019-04-12  8:57   ` Boris Brezillon
2019-05-08 13:58     ` Hans Verkuil
2019-05-16  8:23       ` Tomasz Figa
2019-04-04  8:16 ` [RFC PATCH v2 4/7] media: videobuf2: Expose helpers to implement the _ext_fmt and _ext_buf hooks Boris Brezillon
2019-04-04  8:16 ` [RFC PATCH v2 5/7] media: mediabus: Add an helper to convert a ext_pix format to an mbus_fmt Boris Brezillon
2019-04-04  8:16 ` [RFC PATCH v2 6/7] media: vivid: Convert the capture and output drivers to EXT_FMT/EXT_BUF Boris Brezillon
2019-04-04  8:17 ` [RFC PATCH v2 7/7] media: vimc: Implement the ext_fmt and ext_buf hooks Boris Brezillon
2019-09-23 11:41 ` [RFC PATCH v2 0/7] media: v4l2: Add extended fmt and buffer ioctls Hans Verkuil
2019-09-23 14:40   ` Boris Brezillon [this message]
2019-09-23 15:07     ` Hans Verkuil
  -- strict thread matches above, loose matches on Subject: below --
2019-10-08  9:11 Boris Brezillon
2019-10-08  9:13 ` Boris Brezillon
2020-03-10 22:18 ` Fritz Koenig

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=20190923164054.59792271@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=Brian.Starkey@arm.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hiroh@chromium.org \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=nicolas@ndufresne.ca \
    --cc=sakari.ailus@iki.fi \
    --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).