lkml.org 
[lkml]   [2015]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 4/4] media: pxa_camera: conversion to dmaengine
Date
Guennadi Liakhovetski <g.liakhovetski@gmx.de> writes:

>> /* init DMA for Y channel */
>
> How about taking the loop over the sg list out of pxa_init_dma_channel()
> to avoid having to iterate it from the beginning each time? Then you would
> be able to split it into channels inside that global loop? Would that
> work? Of course you might need to rearrange functions to avoid too deep
> code nesting.

Ok, will try that.
The more I think of it, the more it looks to me like a generic thing : take an
sglist, and an array of sizes, and split the sglist into several sglists, each
of the defined size in the array.

Or more code-like speaking :
- sglist_split(struct scatterlist *sg_int, size_t *sizes, int nb_sizes,
struct scatterlist **sg_out)
- and sg_out is an array of nb_sizes (struct scatterlist *sg)

So I will try that out. Maybe if that works out for pxa_camera, Jens or Russell
would accept that into lib/scatterlist.c.

Cheers.

--
Robert


\
 
 \ /
  Last update: 2015-07-12 20:01    [W:0.077 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site