RE: [PATCH V3 10/15] [media] marvell-ccic: split mcam-core into 2 parts for soc_camera support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Jonathan

Thanks a lot for explaining it. :)


>-----Original Message-----
>From: Jonathan Corbet [mailto:corbet@xxxxxxx]
>Sent: Tuesday, 05 February, 2013 11:14
>To: Albert Wang
>Cc: g.liakhovetski@xxxxxx; linux-media@xxxxxxxxxxxxxxx; Libin Yang
>Subject: Re: [PATCH V3 10/15] [media] marvell-ccic: split mcam-core into 2 parts for
>soc_camera support
>
>My apologies for the slow response...I'm running far behind.
>
>On Thu, 31 Jan 2013 00:29:13 -0800
>Albert Wang <twang13@xxxxxxxxxxx> wrote:
>
>> As you know, we are working on adding B_DMA_SG support on soc_camera mode.
>>
>> We found there is some code we can't understand in irq handler:
>> >>>>>>
>> if (handled == IRQ_HANDLED) {
>> 	set_bit(CF_DMA_ACTIVE, &cam->flags);
>> 	if (cam->buffer_mode == B_DMA_sg)
>> 		mcam_ctlr_stop(cam);
>> }
>> <<<<<<
>>
>> The question is why we need stop ccic in irq handler when buffer mode is B_DMA_sg?
>
>That's actually intended to be addressed by this comment in the DMA setup
>code:
>
>/*
> * Frame completion with S/G is trickier.  We can't muck with
> * a descriptor chain on the fly, since the controller buffers it
> * internally.  So we have to actually stop and restart; Marvell
> * says this is the way to do it.
> *
>
>...and, indeed, at the time, I was told by somebody at Marvell that I
>needed to stop the controller before I could store a new descriptor into
>the chain.  I don't see how it could work otherwise, really?
>
[Albert Wang] Em.., maybe I guess there was some flaw in old version.
We indeed can work on current platform without the code.

>I'd be happy to see this code go, it always felt a bit hacky.  But the
>controller buffers the descriptor chain deep inside its unreachable guts,
>so one has to mess with it carefully.
>
[Albert Wang] I suppose your platform should work with the original code.
So how do you think this time we will keep the original code in the patches?
If there is something wrong with it when you test the patches on your platform, maybe we can try to change it. :


>Thanks,
>
>jon

Thanks
Albert Wang
86-21-61092656
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux