iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Tomasz Figa <tfiga@chromium.org>, ". Christoph Hellwig" <hch@lst.de>
Cc: Sergey Senozhatsky <senozhatsky@google.com>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	IOMMU DRIVERS <iommu@lists.linux-foundation.org>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Ricardo Ribalda <ribalda@chromium.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH v3 5/6] media: uvcvideo: Use dma_alloc_noncontiguos API
Date: Tue, 8 Dec 2020 16:13:20 +0900	[thread overview]
Message-ID: <20201208071320.GA1667627@google.com> (raw)
In-Reply-To: <CAAFQd5BBEbmENrrZ-vMK9cKOap19XWmfcxwrxKfjWx-wEew8rg@mail.gmail.com>

On (20/12/08 13:54), Tomasz Figa wrote:
> 
> In any case, Sergey is going to share a preliminary patch on how the
> current API would be used in the V4L2 videobuf2 framework. That should
> give us more input on how such a helper could look.

HUGE apologies for the previous screw up! I replied in the
gmail web-interface and that did not work out as expected
(at all, big times).

I'm sorry about that!

Take two, no html this time around.

---

My current WIP (deep WIP) series can be found at [0]. The patch that adds new
DMA API support is at the head of the series [1]. New DMA API requires us to
have several internal videobuf2 API changes before we can proceed [2]: v4l2 and
videobuf2 core do not pass enough information to the vb2 allocators now. Previously,
if user space requests non-coherent allocation v4l2 would set queue dma_attr bit,
videobuf2 core would pass queue->dma_attrs to vb2 allocator, which would 
those dma_attrs for dma_alloc(). So everything was transparent (sort of). Since we
don't have that dma_attr flag anymore, there is no way for v4l2 to pass the request
information (coherent or non-coherent) to the vb2 allocator. Hence we need to rework
the vb2 allocator API. I currently pass vb2 pointer, but we decided to rework it again
and to pass dedicated VB2_ALLOC_FLAGS from the videobuf2 core to the 
allocator. This is still in my private tree and not completely ready, will push those
patches to github later.

Another thing to notice is that the new API requires us to have two execution branches
in allocators - one for the current API; and one for the new API (if it's supported and
if user-space requested non-coherent allocation).

[0] https://github.com/sergey-senozhatsky/linux-next-ss/commits/master
[1] https://github.com/sergey-senozhatsky/linux-next-ss/commit/a45f48b483daee59594c62e4aaf01790aab960c8
[2] https://github.com/sergey-senozhatsky/linux-next-ss/commit/b784145101c398da7fe9e2608b6001e58e05a9b5

	-ss
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  parent reply	other threads:[~2020-12-08  7:13 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 22:19 [PATCH v3 5/6] media: uvcvideo: Use dma_alloc_noncontiguos API Ricardo Ribalda
2020-11-26 11:44 ` Sergey Senozhatsky
2020-11-30  8:31   ` Christoph Hellwig
2020-11-30  8:34 ` Christoph Hellwig
2020-11-30 10:49   ` Ricardo Ribalda
2020-12-01  3:36   ` Sergey Senozhatsky
2020-12-01 14:49     ` Christoph Hellwig
2020-12-08  4:54       ` Tomasz Figa
2020-12-08  6:45         ` Sergey Senozhatsky via iommu
2020-12-08  7:13         ` Sergey Senozhatsky [this message]
2020-12-09 11:16           ` . Christoph Hellwig
2021-01-07 14:14             ` Ricardo Ribalda
2021-01-11  8:36               ` . Christoph Hellwig
2021-01-15 13:08                 ` Ricardo Ribalda
2021-01-20 17:17                   ` . Christoph Hellwig
2021-01-26 17:06                   ` . Christoph Hellwig
2021-01-26 23:29                     ` Ricardo Ribalda
2021-01-27 15:56                       ` . Christoph Hellwig
2021-01-27 21:35                         ` Ricardo Ribalda
2021-01-28  7:57                           ` . Christoph Hellwig
2020-12-09 11:12         ` Christoph Hellwig
2020-12-09 13:05           ` Robin Murphy
2020-12-10  5:08             ` Tomasz Figa

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=20201208071320.GA1667627@google.com \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.org \
    --cc=robin.murphy@arm.com \
    --cc=senozhatsky@google.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 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).