lkml.org 
[lkml]   [2021]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCHv3 8/8] videobuf2: handle non-contiguous DMA allocations
On Mon, Jul 26, 2021 at 12:59 PM Sergey Senozhatsky
<senozhatsky@chromium.org> wrote:
>
> On (21/07/22 19:26), Dafna Hirschfeld wrote:
> > Also, the 'cookie' cb returns buf->dma_addr which is not initialized for
> > the noncontiguous api. So it is not clear how drivers should use the new api.
> > Many drivers call vb2_dma_contig_plane_dma_addr which returns the cookie.
>
> Hmm, that's a good find. Is ->dma_addr the same as what we have in
> sgt.sgl->dma_address for non-contig?

Yes. As per [1]:

"The return sg_table is guaranteed to have 1 single DMA mapped segment
as indicated by sgt->nents, but it might have multiple CPU side
segments as indicated by sgt->orig_nents."

[1] https://www.kernel.org/doc/html/latest/core-api/dma-api.html#part-ii-non-coherent-dma-allocations

\
 
 \ /
  Last update: 2021-07-26 06:06    [W:0.258 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site