Re: [EXT] Re: [PATCH] media: videobuf2-dma-sg: limit the sg segment size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 4, 2023 at 4:10 PM Hui Fang <hui.fang@xxxxxxx> wrote:
>
> On Wed, Aug 30, 2023 at 6:20 PM Tomasz Figa <tfiga@xxxxxxxxxxxx> wrote:
> > On Wed, Aug 30, 2023 at 5:50 PM Hui Fang <hui.fang@xxxxxxx> wrote:
> ......
> > > I wonder if only NXP met the "swiotlb buffer full" issue. In theory,
> > > when format is YUYV, those resolutions no greater than 320x240 (153600
> > > bytes, which less than the max mapping size 256K ) can't meet the issue.
> > > But resolutions no less than 640x480 (307200 bytes), may have chances
> > > to trigger the issue.
> >
> > I think a combination of a device that can support scatter-gather, but requires
> > swiotlb is kind of rare. Most drivers would require a single contiguous DMA
> > address (and thus use videobuf2-dma-contig) and physical discontinuity would
> > be handled by an IOMMU (transparently to vb2).
> >
> > I guess one thing to ask you about your specific setup is whether it's expected
> > that the swiotlb ends up being used at all?
>
> Yes, the swiotlb ends up being used. We met the issue when bring up
> DeviceAsWebCam (android-14 new feature, android device works as a usb camera).

I see. I guess the mapping is done by the USB gadget controller
driver? Could you point us to the exact driver that's used?

Just to clarify, swiotlb should only be needed in the very extreme
fallback case, because of the performance impact of the memory copy
back and forth. The right approach would depend on the DMA
capabilities of your device, though.

Best regards,
Tomasz




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux