* Interrupt handler responsibility
@ 2015-11-21 22:20 Ran Shalit
2015-11-23 8:48 ` Hans Verkuil
0 siblings, 1 reply; 2+ messages in thread
From: Ran Shalit @ 2015-11-21 22:20 UTC (permalink / raw)
To: linux-media
Hello,
I am trying to understand the interrupt handler responsibility in
v4l2, also with respect to dma usage. I see that it is not defined as
part of the videobuf2 API.
This is what I understand this far:
1. start_streaming is responsible for getting into "streaming" state.
dma start should be trigggered at this point.
2. interrupt handler: is responsible for passing back the buffer to
user using vb2_buffer_done() call.
But what is the exact reponsibility of interrupt handler with respect
to dma usage ?
In some of the drivers I see that the interrupt start/stop dma, but in
v4l2-pci-skeleton.c I don't see any usage of dma in the interrupt
handler, so I'm not sure.
Best Regards,
Ran
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Interrupt handler responsibility
2015-11-21 22:20 Interrupt handler responsibility Ran Shalit
@ 2015-11-23 8:48 ` Hans Verkuil
0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2015-11-23 8:48 UTC (permalink / raw)
To: Ran Shalit, linux-media
On 11/21/2015 11:20 PM, Ran Shalit wrote:
> Hello,
>
> I am trying to understand the interrupt handler responsibility in
> v4l2, also with respect to dma usage. I see that it is not defined as
> part of the videobuf2 API.
>
> This is what I understand this far:
> 1. start_streaming is responsible for getting into "streaming" state.
> dma start should be trigggered at this point.
Right.
> 2. interrupt handler: is responsible for passing back the buffer to
> user using vb2_buffer_done() call.
Right.
>
> But what is the exact reponsibility of interrupt handler with respect
> to dma usage ?
Typically when the DMA has finished DMAing a frame it will generate an interrupt.
The interrupt handler will then call vb2_buffer_done() handing the buffer back
to the vb2 framework. Think of it as who owns the buffer: when buf_queue is called
the buffer is handed from vb2 to the driver, and the driver calls vb2_buffer_done()
when it is finished with the buffer (i.e. the data is DMAed into the buffer) and
it hands it back to vb2.
> In some of the drivers I see that the interrupt start/stop dma, but in
> v4l2-pci-skeleton.c I don't see any usage of dma in the interrupt
> handler, so I'm not sure.
The interrupt handler is called in response of a DMA interrupt. How that interrupt
is generated is hardware specific, so that's why you don't see it in the skeleton
driver.
Regards,
Hans
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-23 8:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-21 22:20 Interrupt handler responsibility Ran Shalit
2015-11-23 8:48 ` Hans Verkuil
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.