2015-06-07 19:02:07

by Guennadi Liakhovetski

[permalink] [raw]
Subject: Re: [PATCH 4/4] media: pxa_camera: conversion to dmaengine

Hi Robert,

Please, correct me if I am wrong, but doesn't this patch have to be
updates? Elgl looking at this:

On Sun, 22 Mar 2015, Robert Jarzmik wrote:

> From: Robert Jarzmik <[email protected]>
>
> Convert pxa_camera to dmaengine. This removes all DMA registers
> manipulation in favor of the more generic dmaengine API.
>
> The functional level should be the same as before. The biggest change is
> in the videobuf_sg_splice() function, which splits a videobuf-dma into
> several scatterlists for 3 planes captures (Y, U, V).
>
> Signed-off-by: Robert Jarzmik <[email protected]>
> ---
> drivers/media/platform/soc_camera/pxa_camera.c | 428 ++++++++++++-------------
> 1 file changed, 211 insertions(+), 217 deletions(-)
>
> diff --git a/drivers/media/platform/soc_camera/pxa_camera.c b/drivers/media/platform/soc_camera/pxa_camera.c
> index 8b39f44..8644022 100644
> --- a/drivers/media/platform/soc_camera/pxa_camera.c
> +++ b/drivers/media/platform/soc_camera/pxa_camera.c

[snip]

> @@ -276,41 +271,82 @@ static void free_buffer(struct videobuf_queue *vq, struct pxa_buffer *buf)
> if (buf->vb.state == VIDEOBUF_NEEDS_INIT)
> return;
>
> - for (i = 0; i < ARRAY_SIZE(buf->dmas); i++) {
> - if (buf->dmas[i].sg_cpu)
> - dma_free_coherent(ici->v4l2_dev.dev,
> - buf->dmas[i].sg_size,
> - buf->dmas[i].sg_cpu,
> - buf->dmas[i].sg_dma);
> - buf->dmas[i].sg_cpu = NULL;
> + for (i = 0; i < 3 && buf->descs[i]; i++) {
> + async_tx_ack(buf->descs[i]);
> + dmaengine_tx_release(buf->descs[i]);

hasn't the addition of your proposed dmaengine_tx_release() API been
rejected? I'll wait for an updated version then.

Thanks
Guennadi


2015-06-07 19:19:38

by Robert Jarzmik

[permalink] [raw]
Subject: Re: [PATCH 4/4] media: pxa_camera: conversion to dmaengine

Guennadi Liakhovetski <[email protected]> writes:

> Hi Robert,
>
> Please, correct me if I am wrong, but doesn't this patch have to be
> updates? Elgl looking at this:
>> + for (i = 0; i < 3 && buf->descs[i]; i++) {
>> + async_tx_ack(buf->descs[i]);
>> + dmaengine_tx_release(buf->descs[i]);
>
> hasn't the addition of your proposed dmaengine_tx_release() API been
> rejected? I'll wait for an updated version then.
Yeah, correct.
The updated version will just remove the dmaengine_tx_release() call, the
async_tx_ack() is sufficient.

I hope this won't stop the review, it's the only change I have so far in my tree
on top of the submission.

Cheers.

--
Robert