Displaying 3 results from an estimated 3 matches for "sgl_alloc".
2020 Aug 20
2
[PATCH 05/28] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT
...gather?
You can implement that trivially implement it yourself for the iommu
case:
{
merge_boundary = dma_get_merge_boundary(dev);
if (!merge_boundary || merge_boundary > chunk_size - 1) {
/* can't coalesce */
return -EINVAL;
}
nents = DIV_ROUND_UP(total_size, chunk_size);
sg = sgl_alloc();
for_each_sgl() {
sg->page = __alloc_pages(get_order(chunk_size))
sg->len = chunk_size;
}
dma_map_sg(sg, DMA_ATTR_SKIP_CPU_SYNC);
// you are guaranteed to get a single dma_addr out
}
Of course this still uses the scatterlist structure with its annoying
mix of input and output param...
2020 Aug 20
0
[PATCH 05/28] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT
..._boundary = dma_get_merge_boundary(dev);
> if (!merge_boundary || merge_boundary > chunk_size - 1) {
> /* can't coalesce */
> return -EINVAL;
> }
>
>
> nents = DIV_ROUND_UP(total_size, chunk_size);
> sg = sgl_alloc();
> for_each_sgl() {
> sg->page = __alloc_pages(get_order(chunk_size))
> sg->len = chunk_size;
> }
> dma_map_sg(sg, DMA_ATTR_SKIP_CPU_SYNC);
> // you are guaranteed to get a single dma_addr out
> }
>
>...
2020 Aug 19
5
[PATCH 05/28] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT
On Wed, Aug 19, 2020 at 1:51 PM Robin Murphy <robin.murphy at arm.com> wrote:
>
> Hi Tomasz,
>
> On 2020-08-19 12:16, Tomasz Figa wrote:
> > Hi Christoph,
> >
> > On Wed, Aug 19, 2020 at 8:56 AM Christoph Hellwig <hch at lst.de> wrote:
> >>
> >> The V4L2-FLAG-MEMORY-NON-CONSISTENT flag is entirely unused,
> >
> > Could you