public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Jiri Kosina <trivial@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/4] media: pxa_camera: conversion to dmaengine
Date: Sun, 12 Jul 2015 19:33:09 +0200	[thread overview]
Message-ID: <87y4iljn6y.fsf@belgarion.home> (raw)
In-Reply-To: <Pine.LNX.4.64.1507121859030.32193@axis700.grange> (Guennadi Liakhovetski's message of "Sun, 12 Jul 2015 19:05:49 +0200 (CEST)")

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

  reply	other threads:[~2015-07-12 17:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-05 18:27 [PATCH v2 0/4] media: pxa_camera conversion to dmaengine Robert Jarzmik
2015-07-05 18:27 ` [PATCH v2 1/4] media: pxa_camera: fix the buffer free path Robert Jarzmik
2015-07-12 13:58   ` Guennadi Liakhovetski
2015-07-12 14:35     ` Robert Jarzmik
2015-07-05 18:27 ` [PATCH v2 2/4] media: pxa_camera: move interrupt to tasklet Robert Jarzmik
2015-07-05 18:27 ` [PATCH v2 3/4] media: pxa_camera: trivial move of dma irq functions Robert Jarzmik
2015-07-12 14:06   ` Guennadi Liakhovetski
2015-07-12 14:32     ` Robert Jarzmik
2015-07-05 18:27 ` [PATCH v2 4/4] media: pxa_camera: conversion to dmaengine Robert Jarzmik
2015-07-12 17:05   ` Guennadi Liakhovetski
2015-07-12 17:33     ` Robert Jarzmik [this message]
2015-07-18 23:00       ` Robert Jarzmik
2015-07-26 11:36         ` Guennadi Liakhovetski
2015-07-26 12:33           ` Robert Jarzmik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4iljn6y.fsf@belgarion.home \
    --to=robert.jarzmik@free.fr \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox