681021] sg_alloc_table_from_pages+0x11/0x30
[7.681511] vb2_dma_sg_alloc+0x162/0x280 [videobuf2_dma_sg]
Cc: sta...@vger.kernel.org
Fixes: efc42bc98058 ("scatterlist: add sg_alloc_table_from_pages function")
Signed-off-by: Ricardo Ribalda
---
lib/scatterlist.c | 3 +++
1 file chang
Hi Christoph
On Fri, Mar 19, 2021 at 2:10 PM Christoph Hellwig wrote:
>
> On Fri, Mar 19, 2021 at 02:05:21PM +0100, Ricardo Ribalda wrote:
> > > + uvc_urb->sgt,
> > > + uvc_stream_dir(uvc_urb->
Hi Christoph
While backporting the patch I realised of a bug.
On Sat, Mar 13, 2021 at 12:55 AM Ricardo Ribalda wrote:
>
> On architectures where there is no coherent caching such as ARM use the
> dma_alloc_noncontiguous API and handle manually the cache flushing using
> dma_
On Mon, Mar 15, 2021 at 8:34 AM Christoph Hellwig wrote:
>
> On Mon, Mar 15, 2021 at 08:30:57AM +0100, Ricardo Ribalda wrote:
> > Hi Christoph
> >
> > I guess you can merge this patch from your tree. I hope it is not too
> > late in this release cycle.
>
> The
Hi Christoph
I guess you can merge this patch from your tree. I hope it is not too
late in this release cycle.
Have a great week!
On Sat, Mar 13, 2021 at 12:55 AM Ricardo Ribalda wrote:
>
> On architectures where there is no coherent caching such as ARM use the
> dma_alloc_nonconti
avg 21.827 std 6.095 min 255.153 max (uS)
decode: 5/5000 uS/qty: 10.444 avg 7.137 std 1.874 min 71.103 max (uS)
raw decode speed: 11.048 Gbits/s
raw URB handling speed: 1.789 Gbits/s
throughput: 17.253 Mbits/s
URB decode CPU usage 0.156800 %
Signed-off-by: Ricardo Ribalda
Reviewed-by: Laurent Pinch
Hi Laurent
Thanks a lot for the review
On Fri, Mar 12, 2021 at 10:19 PM Laurent Pinchart
wrote:
>
> Hi Ricardo,
>
> Thank you for the patch.
>
> On Fri, Mar 12, 2021 at 01:57:09PM +0100, Ricardo Ribalda wrote:
> > On architectures where there is no coherent
ing speed: 1.789 Gbits/s
throughput: 17.253 Mbits/s
URB decode CPU usage 0.156800 %
Signed-off-by: Ricardo Ribalda
Reviewed-by: Laurent Pinchart
Reviewed-by: Tomasz Figa
Signed-off-by: Christoph Hellwig
---
Changelog from v2 (Thanks Laurent!):
- Replace uvc_urb_dma_sync with uvc_submit_urb
- Add x86
80 std 1.615 min 2806.667 max (uS)
raw decode speed: 365.470 Mbits/s
raw URB handling speed: 295.986 Mbits/s
throughput: 13.136 Mbits/s
URB decode CPU usage 3.594500 %
Signed-off-by: Ricardo Ribalda
Reviewed-by: Tomasz Figa
Signed-off-by: Christoph Hellwig
---
Changelog from v2: (Thanks Laurent)
m uvcvideo
> > ___
> > iommu mailing list
> > iommu@lists.linux-foundation.org
> > https://lists.linuxfoundation.org/mailman/listinfo/iommu
> ---end quoted text---
--
Ricardo Ribalda
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
HI Christoph
On Thu, Feb 11, 2021 at 2:06 PM Christoph Hellwig wrote:
>
> On Thu, Feb 11, 2021 at 10:08:18AM +0100, Ricardo Ribalda wrote:
> > Hi Christoph
> >
> > What are your merge plans for the uvc change?
> > http://git.infradead.org/us
him?
Thanks
On Tue, Feb 9, 2021 at 6:02 PM Christoph Hellwig wrote:
>
> On Tue, Feb 09, 2021 at 03:46:13PM +0100, Ricardo Ribalda wrote:
> > Hi Christoph
> >
> > I have tested it in both arm and x86, since there are not significant
> > changes with the previous vers
Hi Christoph
I have tested it in both arm and x86, since there are not significant
changes with the previous version I did not do a performance test.
Thanks!
On Tue, Feb 9, 2021 at 9:29 AM Ricardo Ribalda wrote:
>
> Hi Christoph
>
> On Tue, Feb 9, 2021 at 9:22 AM Christoph He
gt; Ricardo, do the uvcvideo changes look good to you? I'd like to queue
> the series up for this merge window.
Let me test them in real hardware today.
Thanks!
--
Ricardo Ribalda
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lis
td 1.615 min 2806.667 max (uS)
raw decode speed: 365.470 Mbits/s
raw URB handling speed: 295.986 Mbits/s
throughput: 13.136 Mbits/s
URB decode CPU usage 3.594500 %
Signed-off-by: Ricardo Ribalda
Signed-off-by: Christoph Hellwig
---
v2:
- Replace DMA_BIDIRECTIONAL with DMA_FROM_
idate_kernel_vmap_range calls for
> VIVT architectures.
We only read from the device to the cpu. Then can we run only
invalidate_kernel_vmap_range() ?
something like ?
else {
dma_sync_sgtable_for_cpu(dma_dev, uvc_urb->sgt, DMA_FROM_DEVICE);
invalida
On Thu, Jan 28, 2021 at 4:03 PM Christoph Hellwig wrote:
>
> From: Ricardo Ribalda
>
> On architectures where the is no coherent caching such as ARM use the
> dma_alloc_noncontiguos API and handle manually the cache flushing using
> dma_sync_sgtable().
>
> With th
Hi Christoph
On Wed, Jan 27, 2021 at 4:56 PM . Christoph Hellwig wrote:
>
> On Wed, Jan 27, 2021 at 12:29:08AM +0100, Ricardo Ribalda wrote:
> > - Is there any platform where dma_alloc_noncontiguos can fail?
> > This is, !ops->alloc_noncontiguous and !dev->coherent_dma
lloc_noncontiguous
>
> Warning: hot off the press, and only with the v4l conversion as that
> seemed at little easier than uvcvideo.
--
Ricardo Ribalda
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
On Mon, Jan 11, 2021 at 9:36 AM . Christoph Hellwig wrote:
>
> On Thu, Jan 07, 2021 at 03:14:08PM +0100, Ricardo Ribalda wrote:
> > > So I think we do want these branches for coherent vs non-coherent as they
> > > have very different semantics and I do not thin
think between your comments and those from Ricardo I have a good idea
> for a somewhat updated API. I'll try to post something in the next days.
Did you have time to look into this?
No hurry, I just want to make sure that I didn't miss anything ;)
Best regards!
--
Ricardo Ribalda
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
it is all over
> the media and drm code anyway, and duplicating this doesn't help anyone.
>
> Possibly including the fallback to the coherent allocating.
Probably Sergey has best opinion of this than mine. I only had to look
into one driver, he has been working with the vb2, which uses the API
much more.
--
Ricardo Ribalda
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
From: Shik Chen
Majorly based on [1], with the following tweaks:
* Use div_u64 for u64 divisions
* Calculate standard deviation
* Fix an uninitialized |min| field for header
* Apply clang-format
[1]
From: Christoph Hellwig
Add a new API that returns a virtually non-contigous array of pages
and dma address. This API is only implemented for dma-iommu and will
not be implemented for non-iommu DMA API instances that have to allocate
contiguous memory. It is up to the caller to check if the
-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_video.c | 92 +++
drivers/media/usb/uvc/uvcvideo.h | 2 +
2 files changed, 72 insertions(+), 22 deletions(-)
v4: Thanks to Crhistoph and Sergei
- Remove the CONFIG_DMA_NONCOHERENT path
- Do not pass __GFP_NOWARN
From: Christoph Hellwig
It turns out allowing non-contigous allocations here was a rather bad
idea, as we'll now need to define ways to get the pages for mmaping
or dma_buf sharing. Revert this change and stick to the original
concept. A different API for the use case of non-contigous
-off-by: Ricardo Ribalda
---
v3: Thanks to Marek Szyprowski
Use dma_sync_sgtable and _for_cpu()
drivers/media/usb/uvc/uvc_video.c | 93 +++
drivers/media/usb/uvc/uvcvideo.h | 2 +
2 files changed, 83 insertions(+), 12 deletions(-)
diff --git a/drivers/media/usb/uvc
-by: Ricardo Ribalda
---
v2: Thanks to Robin!
Use dma_sync_sg instead of dma_sync_single
drivers/media/usb/uvc/uvc_video.c | 83 ++-
drivers/media/usb/uvc/uvcvideo.h | 2 +
2 files changed, 73 insertions(+), 12 deletions(-)
diff --git a/drivers/media/usb/uvc
Hi Robin
On Tue, Nov 24, 2020 at 5:29 PM Robin Murphy wrote:
>
> On 2020-11-24 15:38, Ricardo Ribalda wrote:
> > On architectures where the is no coherent caching such as ARM use the
> > dma_alloc_noncontiguos API and handle manually the cache flushing using
&
From: Shik Chen
Majorly based on [1], with the following tweaks:
* Use div_u64 for u64 divisions
* Calculate standard deviation
* Fix an uninitialized |min| field for header
* Apply clang-format
[1]
-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_video.c | 74 ++-
drivers/media/usb/uvc/uvcvideo.h | 1 +
2 files changed, 63 insertions(+), 12 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_video.c
b/drivers/media/usb/uvc/uvc_video.c
index a6a441d92b94
From: Christoph Hellwig
The function has a single caller, so open code it there and take
advantage of the precalculated page count variable.
Signed-off-by: Christoph Hellwig
---
drivers/iommu/dma-iommu.c | 17 +
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git
From: Christoph Hellwig
Add a new API that returns a virtually non-contigous array of pages
and dma address. This API is only implemented for dma-iommu and will
not be implemented for non-iommu DMA API instances that have to allocate
contiguous memory. It is up to the caller to check if the
From: Christoph Hellwig
Prepare for supporting the DMA_ATTR_NO_KERNEL_MAPPING flag in
dma_alloc_pages.
Signed-off-by: Christoph Hellwig
---
kernel/dma/direct.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
index
From: Christoph Hellwig
It turns out allowing non-contigous allocations here was a rather bad
idea, as we'll now need to define ways to get the pages for mmaping
or dma_buf sharing. Revert this change and stick to the original
concept. A different API for the use case of non-contigous
HI Christoph
On Tue, Nov 24, 2020 at 12:35 PM Christoph Hellwig wrote:
>
> On Wed, Nov 18, 2020 at 03:25:46PM +0100, Ricardo Ribalda wrote:
> > On architectures where the is no coherent caching such as ARM use the
> > dma_alloc_noncontiguos API and handle manually the ca
-off-by: Ricardo Ribalda
---
This patch depends on dma_alloc_contiguous API1315351diffmboxseries
https://lore.kernel.org/patchwork/patch/1315351/#1535182
drivers/media/usb/uvc/uvc_video.c | 69 +--
drivers/media/usb/uvc/uvcvideo.h | 1 +
2 files changed, 58
e data
> seems at best odd, and if we are unlucky papering over a bug somewhere.
--
Ricardo Ribalda
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Hi Christoph
On Tue, Nov 10, 2020 at 10:25 AM Christoph Hellwig wrote:
>
> On Mon, Nov 09, 2020 at 03:53:55PM +0100, Ricardo Ribalda wrote:
> > Hi Christoph
> >
> > I have started now to give a try to your patchset. Sorry for the delay.
> >
> > For uvc I
t; > + return ops && ops->free_noncontiguous;
> > +}
> > +EXPORT_SYMBOL_GPL(dma_can_alloc_noncontiguous);
> > +
> > +struct page **dma_alloc_noncontiguous(struct device *dev, size_t size,
> > + dma_addr_t *dma_handle, gfp_t gfp, unsigned lo
40 matches
Mail list logo