[PATCH] drm/prime: Only call dma_map_sgtable() for devices with DMA support
Thomas Zimmermann
tzimmermann at suse.de
Mon Feb 22 07:52:49 UTC 2021
Hi
Am 19.02.21 um 16:53 schrieb Alan Stern:
> On Fri, Feb 19, 2021 at 02:45:54PM +0100, Christian König wrote:
>> Well as far as I can see this is a relative clear NAK.
>>
>> When a device can't do DMA and has no DMA mask then why it is requesting an
>> sg-table in the first place?
>
> This may not be important for your discussion, but I'd like to give an
> answer to the question -- at least, for the case of USB.
>
> A USB device cannot do DMA and has no DMA mask. Nevertheless, if you
> want to send large amounts of bulk data to/from a USB device then using
> an SG table is often a good way to do it. The reason is simple: All
> communication with a USB device has to go through a USB host controller,
> and many (though not all) host controllers _can_ do DMA and _do_ have a
> DMA mask.
It's semi-related. One idea we had for speeding up transfers is to use
the USB controller's DMA functionality and allocate framebuffers
accordingly. It needs a bit of work in the DRM memory-management code
IIRC. And we do some internal modifications if the frambuffer's data, so
direct forwarding from renderer to USB controller is not always possible.
Best regards
Thomas
>
> The USB mass-storage and uas drivers in particular make heavy use of
> this mechanism.
>
> Alan Stern
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20210222/eacd7364/attachment.sig>
More information about the dri-devel
mailing list