€•­|Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ7/translations/zh_CN/driver-api/media/drivers/pxa_camera”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/zh_TW/driver-api/media/drivers/pxa_camera”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/it_IT/driver-api/media/drivers/pxa_camera”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/ja_JP/driver-api/media/drivers/pxa_camera”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/ko_KR/driver-api/media/drivers/pxa_camera”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/sp_SP/driver-api/media/drivers/pxa_camera”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒQ/var/lib/git/docbuild/linux/Documentation/driver-api/media/drivers/pxa_camera.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒPXA-Camera Host Driver”h]”hŒPXA-Camera Host Driver”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h KubhŒ paragraph”“”)”}”(hŒ/Author: Robert Jarzmik ”h]”(hŒAuthor: Robert Jarzmik <”…””}”(hhËhžhhŸNh NubhŒ reference”“”)”}”(hŒrobert.jarzmik@free.fr”h]”hŒrobert.jarzmik@free.fr”…””}”(hhÕhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:robert.jarzmik@free.fr”uh1hÓhhËubhŒ>”…””}”(hhËhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khh¶hžhubhµ)”}”(hhh]”(hº)”}”(hŒ Constraints”h]”hŒ Constraints”…””}”(hhòhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hhïhžhhŸh³h K ubhŒenumerated_list”“”)”}”(hhh]”hŒ list_item”“”)”}”(hŒ±Image size for YUV422P format All YUV422P images are enforced to have width x height % 16 = 0. This is due to DMA constraints, which transfers only planes of 8 byte multiples. ”h]”hÊ)”}”(hŒ¯Image size for YUV422P format All YUV422P images are enforced to have width x height % 16 = 0. This is due to DMA constraints, which transfers only planes of 8 byte multiples.”h]”hŒ¯Image size for YUV422P format All YUV422P images are enforced to have width x height % 16 = 0. This is due to DMA constraints, which transfers only planes of 8 byte multiples.”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjhžhhŸh³h Nubah}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œ loweralpha”Œprefix”hŒsuffix”Œ)”uh1jhhïhžhhŸh³h K ubeh}”(h]”Œ constraints”ah ]”h"]”Œ constraints”ah$]”h&]”uh1h´hh¶hžhhŸh³h K ubhµ)”}”(hhh]”(hº)”}”(hŒGlobal video workflow”h]”hŒGlobal video workflow”…””}”(hj5hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj2hžhhŸh³h Kubj)”}”(hhh]”(j)”}”(hŒ|QCI stopped Initially, the QCI interface is stopped. When a buffer is queued, start_streaming is called and the QCI starts. ”h]”hÊ)”}”(hŒ{QCI stopped Initially, the QCI interface is stopped. When a buffer is queued, start_streaming is called and the QCI starts.”h]”hŒ{QCI stopped Initially, the QCI interface is stopped. When a buffer is queued, start_streaming is called and the QCI starts.”…””}”(hjJhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KhjFubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjChžhhŸh³h Nubj)”}”(hXµQCI started More buffers can be queued while the QCI is started without halting the capture. The new buffers are "appended" at the tail of the DMA chain, and smoothly captured one frame after the other. Once a buffer is filled in the QCI interface, it is marked as "DONE" and removed from the active buffers list. It can be then requeud or dequeued by userland application. Once the last buffer is filled in, the QCI interface stops. ”h]”(hÊ)”}”(hŒËQCI started More buffers can be queued while the QCI is started without halting the capture. The new buffers are "appended" at the tail of the DMA chain, and smoothly captured one frame after the other.”h]”hŒÏQCI started More buffers can be queued while the QCI is started without halting the capture. The new buffers are “appended†at the tail of the DMA chain, and smoothly captured one frame after the other.”…””}”(hjbhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj^ubhÊ)”}”(hŒªOnce a buffer is filled in the QCI interface, it is marked as "DONE" and removed from the active buffers list. It can be then requeud or dequeued by userland application.”h]”hŒ®Once a buffer is filled in the QCI interface, it is marked as “DONE†and removed from the active buffers list. It can be then requeud or dequeued by userland application.”…””}”(hjphžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj^ubhÊ)”}”(hŒ;Once the last buffer is filled in, the QCI interface stops.”h]”hŒ;Once the last buffer is filled in, the QCI interface stops.”…””}”(hj~hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K!hj^ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjChžhhŸh³h Nubj)”}”(hŒ+Capture global finite state machine schema ”h]”hÊ)”}”(hŒ*Capture global finite state machine schema”h]”hŒ*Capture global finite state machine schema”…””}”(hj–hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K#hj’ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjChžhhŸh³h Nubeh}”(h]”h ]”h"]”h$]”h&]”j%j&j'hj(j)uh1jhj2hžhhŸh³h KubhŒ literal_block”“”)”}”(hXÇ +----+ +---+ +----+ | DQ | | Q | | DQ | | v | v | v +-----------+ +------------------------+ | STOP | | Wait for capture start | +-----------+ Q +------------------------+ +-> | QCI: stop | ------------------> | QCI: run | <------------+ | | DMA: stop | | DMA: stop | | | +-----------+ +-----> +------------------------+ | | / | | | / +---+ +----+ | | |capture list empty / | Q | | DQ | | QCI Irq EOF | | / | v | v v | | +--------------------+ +----------------------+ | | | DMA hotlink missed | | Capture running | | | +--------------------+ +----------------------+ | | | QCI: run | +-----> | QCI: run | <-+ | | | DMA: stop | / | DMA: run | | | | +--------------------+ / +----------------------+ | Other | | ^ /DMA still | | channels | | | capture list / running | DMA Irq End | not | | | not empty / | | finished | | | / v | yet | | +----------------------+ +----------------------+ | | | | Videobuf released | | Channel completed | | | | +----------------------+ +----------------------+ | | +-- | QCI: run | | QCI: run | --+ | | DMA: run | | DMA: run | | +----------------------+ +----------------------+ | ^ / | | | no overrun / | overrun | | / v | +--------------------+ / +----------------------+ | | Frame completed | / | Frame overran | | +--------------------+ <-----+ +----------------------+ restart frame | | QCI: run | | QCI: stop | --------------+ | DMA: run | | DMA: stop | +--------------------+ +----------------------+ Legend: - each box is a FSM state - each arrow is the condition to transition to another state - an arrow with a comment is a mandatory transition (no condition) - arrow "Q" means : a buffer was enqueued - arrow "DQ" means : a buffer was dequeued - "QCI: stop" means the QCI interface is not enabled - "DMA: stop" means all 3 DMA channels are stopped - "DMA: run" means at least 1 DMA channel is still running”h]”hXÇ +----+ +---+ +----+ | DQ | | Q | | DQ | | v | v | v +-----------+ +------------------------+ | STOP | | Wait for capture start | +-----------+ Q +------------------------+ +-> | QCI: stop | ------------------> | QCI: run | <------------+ | | DMA: stop | | DMA: stop | | | +-----------+ +-----> +------------------------+ | | / | | | / +---+ +----+ | | |capture list empty / | Q | | DQ | | QCI Irq EOF | | / | v | v v | | +--------------------+ +----------------------+ | | | DMA hotlink missed | | Capture running | | | +--------------------+ +----------------------+ | | | QCI: run | +-----> | QCI: run | <-+ | | | DMA: stop | / | DMA: run | | | | +--------------------+ / +----------------------+ | Other | | ^ /DMA still | | channels | | | capture list / running | DMA Irq End | not | | | not empty / | | finished | | | / v | yet | | +----------------------+ +----------------------+ | | | | Videobuf released | | Channel completed | | | | +----------------------+ +----------------------+ | | +-- | QCI: run | | QCI: run | --+ | | DMA: run | | DMA: run | | +----------------------+ +----------------------+ | ^ / | | | no overrun / | overrun | | / v | +--------------------+ / +----------------------+ | | Frame completed | / | Frame overran | | +--------------------+ <-----+ +----------------------+ restart frame | | QCI: run | | QCI: stop | --------------+ | DMA: run | | DMA: stop | +--------------------+ +----------------------+ Legend: - each box is a FSM state - each arrow is the condition to transition to another state - an arrow with a comment is a mandatory transition (no condition) - arrow "Q" means : a buffer was enqueued - arrow "DQ" means : a buffer was dequeued - "QCI: stop" means the QCI interface is not enabled - "DMA: stop" means all 3 DMA channels are stopped - "DMA: run" means at least 1 DMA channel is still running”…””}”hj²sbah}”(h]”h ]”h"]”h$]”h&]”h±h²Œforce”‰Œlanguage”Œnone”Œhighlight_args”}”uh1j°hŸh³h K%hj2hžhubeh}”(h]”Œglobal-video-workflow”ah ]”h"]”Œglobal video workflow”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ DMA usage”h]”hŒ DMA usage”…””}”(hjÐhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjÍhžhhŸh³h KXubj)”}”(hhh]”(j)”}”(hXÉDMA flow - first buffer queued for capture Once a first buffer is queued for capture, the QCI is started, but data transfer is not started. On "End Of Frame" interrupt, the irq handler starts the DMA chain. - capture of one videobuffer The DMA chain starts transferring data into videobuffer RAM pages. When all pages are transferred, the DMA irq is raised on "ENDINTR" status - finishing one videobuffer The DMA irq handler marks the videobuffer as "done", and removes it from the active running queue Meanwhile, the next videobuffer (if there is one), is transferred by DMA - finishing the last videobuffer On the DMA irq of the last videobuffer, the QCI is stopped. ”h]”hŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hX¯DMA flow - first buffer queued for capture Once a first buffer is queued for capture, the QCI is started, but data transfer is not started. On "End Of Frame" interrupt, the irq handler starts the DMA chain. - capture of one videobuffer The DMA chain starts transferring data into videobuffer RAM pages. When all pages are transferred, the DMA irq is raised on "ENDINTR" status - finishing one videobuffer The DMA irq handler marks the videobuffer as "done", and removes it from the active running queue Meanwhile, the next videobuffer (if there is one), is transferred by DMA - finishing the last videobuffer On the DMA irq of the last videobuffer, the QCI is stopped. ”h]”(hŒterm”“”)”}”(hŒDMA flow”h]”hŒDMA flow”…””}”(hjòhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jðhŸh³h KghjìubhŒ definition”“”)”}”(hhh]”hŒ bullet_list”“”)”}”(hhh]”(j)”}”(hŒÃfirst buffer queued for capture Once a first buffer is queued for capture, the QCI is started, but data transfer is not started. On "End Of Frame" interrupt, the irq handler starts the DMA chain.”h]”hÊ)”}”(hŒÃfirst buffer queued for capture Once a first buffer is queued for capture, the QCI is started, but data transfer is not started. On "End Of Frame" interrupt, the irq handler starts the DMA chain.”h]”hŒÇfirst buffer queued for capture Once a first buffer is queued for capture, the QCI is started, but data transfer is not started. On “End Of Frame†interrupt, the irq handler starts the DMA chain.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K[hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)”}”(hŒ§capture of one videobuffer The DMA chain starts transferring data into videobuffer RAM pages. When all pages are transferred, the DMA irq is raised on "ENDINTR" status”h]”hÊ)”}”(hŒ§capture of one videobuffer The DMA chain starts transferring data into videobuffer RAM pages. When all pages are transferred, the DMA irq is raised on "ENDINTR" status”h]”hŒ«capture of one videobuffer The DMA chain starts transferring data into videobuffer RAM pages. When all pages are transferred, the DMA irq is raised on “ENDINTR†status”…””}”(hj&hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K_hj"ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)”}”(hŒÄfinishing one videobuffer The DMA irq handler marks the videobuffer as "done", and removes it from the active running queue Meanwhile, the next videobuffer (if there is one), is transferred by DMA”h]”hÊ)”}”(hŒÄfinishing one videobuffer The DMA irq handler marks the videobuffer as "done", and removes it from the active running queue Meanwhile, the next videobuffer (if there is one), is transferred by DMA”h]”hŒÈfinishing one videobuffer The DMA irq handler marks the videobuffer as “doneâ€, and removes it from the active running queue Meanwhile, the next videobuffer (if there is one), is transferred by DMA”…””}”(hj>hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Kbhj:ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)”}”(hŒ[finishing the last videobuffer On the DMA irq of the last videobuffer, the QCI is stopped. ”h]”hÊ)”}”(hŒZfinishing the last videobuffer On the DMA irq of the last videobuffer, the QCI is stopped.”h]”hŒZfinishing the last videobuffer On the DMA irq of the last videobuffer, the QCI is stopped.”…””}”(hjVhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KfhjRubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jhŸh³h K[hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjìubeh}”(h]”h ]”h"]”h$]”h&]”uh1jêhŸh³h Kghjçubah}”(h]”h ]”h"]”h$]”h&]”uh1jåhjáubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÞhžhhŸNh Nubj)”}”(hŒ-DMA prepared buffer will have this structure ”h]”hÊ)”}”(hŒ,DMA prepared buffer will have this structure”h]”hŒ,DMA prepared buffer will have this structure”…””}”(hjŽhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KihjŠubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÞhžhhŸh³h Nubeh}”(h]”h ]”h"]”h$]”h&]”j%j&j'hj(j)uh1jhjÍhžhhŸh³h KZubj±)”}”(hŒ¤+------------+-----+---------------+-----------------+ | desc-sg[0] | ... | desc-sg[last] | finisher/linker | +------------+-----+---------------+-----------------+”h]”hŒ¤+------------+-----+---------------+-----------------+ | desc-sg[0] | ... | desc-sg[last] | finisher/linker | +------------+-----+---------------+-----------------+”…””}”hj¨sbah}”(h]”h ]”h"]”h$]”h&]”h±h²jÀ‰jÁŒnone”jÃ}”uh1j°hŸh³h KkhjÍhžhubhÊ)”}”(hŒNThis structure is pointed by dma->sg_cpu. The descriptors are used as follows:”h]”hŒNThis structure is pointed by dma->sg_cpu. The descriptors are used as follows:”…””}”(hj¸hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KqhjÍhžhubj)”}”(hhh]”(j)”}”(hŒ`desc-sg[i]: i-th descriptor, transferring the i-th sg element to the video buffer scatter gather”h]”hÊ)”}”(hŒ`desc-sg[i]: i-th descriptor, transferring the i-th sg element to the video buffer scatter gather”h]”hŒ`desc-sg[i]: i-th descriptor, transferring the i-th sg element to the video buffer scatter gather”…””}”(hjÍhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KthjÉubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÆhžhhŸh³h Nubj)”}”(hŒ-finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN”h]”hÊ)”}”(hjãh]”hŒ-finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN”…””}”(hjåhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Kvhjáubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÆhžhhŸh³h Nubj)”}”(hŒ;linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0 ”h]”hÊ)”}”(hŒ:linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0”h]”hŒ:linker: has ddadr= desc-sg[0] of next video buffer, dcmd=0”…””}”(hjühžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Kwhjøubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÆhžhhŸh³h Nubeh}”(h]”h ]”h"]”h$]”h&]”jpjquh1jhŸh³h KthjÍhžhubhÊ)”}”(hŒŠFor the next schema, let's assume d0=desc-sg[0] .. dN=desc-sg[N], "f" stands for finisher and "l" for linker. A typical running chain is :”h]”hŒ”For the next schema, let’s assume d0=desc-sg[0] .. dN=desc-sg[N], “f†stands for finisher and “l†for linker. A typical running chain is :”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KyhjÍhžhubj±)”}”(hŒØ Videobuffer 1 Videobuffer 2 +---------+----+---+ +----+----+----+---+ | d0 | .. | dN | l | | d0 | .. | dN | f | +---------+----+-|-+ ^----+----+----+---+ | | +----+”h]”hŒØ Videobuffer 1 Videobuffer 2 +---------+----+---+ +----+----+----+---+ | d0 | .. | dN | l | | d0 | .. | dN | f | +---------+----+-|-+ ^----+----+----+---+ | | +----+”…””}”hj$sbah}”(h]”h ]”h"]”h$]”h&]”h±h²jÀ‰jÁŒnone”jÃ}”uh1j°hŸh³h K}hjÍhžhubhÊ)”}”(hŒ6After the chaining is finished, the chain looks like :”h]”hŒ6After the chaining is finished, the chain looks like :”…””}”(hj4hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K†hjÍhžhubj±)”}”(hX‹ Videobuffer 1 Videobuffer 2 Videobuffer 3 +---------+----+---+ +----+----+----+---+ +----+----+----+---+ | d0 | .. | dN | l | | d0 | .. | dN | l | | d0 | .. | dN | f | +---------+----+-|-+ ^----+----+----+-|-+ ^----+----+----+---+ | | | | +----+ +----+ new_link”h]”hX‹ Videobuffer 1 Videobuffer 2 Videobuffer 3 +---------+----+---+ +----+----+----+---+ +----+----+----+---+ | d0 | .. | dN | l | | d0 | .. | dN | l | | d0 | .. | dN | f | +---------+----+-|-+ ^----+----+----+-|-+ ^----+----+----+---+ | | | | +----+ +----+ new_link”…””}”hjBsbah}”(h]”h ]”h"]”h$]”h&]”h±h²jÀ‰jÁŒnone”jÃ}”uh1j°hŸh³h KˆhjÍhžhubj)”}”(hhh]”j)”}”(hŒ!DMA hot chaining timeslice issue ”h]”hÊ)”}”(hŒ DMA hot chaining timeslice issue”h]”hŒ DMA hot chaining timeslice issue”…””}”(hjYhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K’hjUubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjRhžhhŸh³h Nubah}”(h]”h ]”h"]”h$]”h&]”j%j&j'hj(j)Œstart”Kuh1jhjÍhžhhŸh³h K’ubhÊ)”}”(hŒÎAs DMA chaining is done while DMA _is_ running, the linking may be done while the DMA jumps from one Videobuffer to another. On the schema, that would be a problem if the following sequence is encountered :”h]”hŒÎAs DMA chaining is done while DMA _is_ running, the linking may be done while the DMA jumps from one Videobuffer to another. On the schema, that would be a problem if the following sequence is encountered :”…””}”(hjthžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K”hjÍhžhubj)”}”(hhh]”(j)”}”(hŒ(DMA chain is Videobuffer1 + Videobuffer2”h]”hÊ)”}”(hj‡h]”hŒ(DMA chain is Videobuffer1 + Videobuffer2”…””}”(hj‰hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K˜hj…ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj‚hžhhŸh³h Nubj)”}”(hŒ4pxa_videobuf_queue() is called to queue Videobuffer3”h]”hÊ)”}”(hjžh]”hŒ4pxa_videobuf_queue() is called to queue Videobuffer3”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K™hjœubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj‚hžhhŸh³h Nubj)”}”(hŒ4DMA controller finishes Videobuffer2, and DMA stops ”h]”hÊ)”}”(hŒ3DMA controller finishes Videobuffer2, and DMA stops”h]”hŒ3DMA controller finishes Videobuffer2, and DMA stops”…””}”(hj·hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Kšhj³ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj‚hžhhŸh³h Nubeh}”(h]”h ]”h"]”h$]”h&]”jpjquh1jhŸh³h K˜hjÍhžhubj±)”}”(hX => Videobuffer 1 Videobuffer 2 +---------+----+---+ +----+----+----+---+ | d0 | .. | dN | l | | d0 | .. | dN | f | +---------+----+-|-+ ^----+----+----+-^-+ | | | +----+ +-- DMA DDADR loads DDADR_STOP”h]”hX => Videobuffer 1 Videobuffer 2 +---------+----+---+ +----+----+----+---+ | d0 | .. | dN | l | | d0 | .. | dN | f | +---------+----+-|-+ ^----+----+----+-^-+ | | | +----+ +-- DMA DDADR loads DDADR_STOP”…””}”hjÑsbah}”(h]”h ]”h"]”h$]”h&]”h±h²jÀ‰jÁŒnone”jÃ}”uh1j°hŸh³h KœhjÍhžhubj)”}”(hhh]”(j)”}”(hŒ~pxa_dma_add_tail_buf() is called, the Videobuffer2 "finisher" is replaced by a "linker" to Videobuffer3 (creation of new_link)”h]”hÊ)”}”(hŒ~pxa_dma_add_tail_buf() is called, the Videobuffer2 "finisher" is replaced by a "linker" to Videobuffer3 (creation of new_link)”h]”hŒ†pxa_dma_add_tail_buf() is called, the Videobuffer2 “finisher†is replaced by a “linker†to Videobuffer3 (creation of new_link)”…””}”(hjèhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K¦hjäubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjáhžhhŸh³h Nubj)”}”(hŒpxa_videobuf_queue() finishes”h]”hÊ)”}”(hjþh]”hŒpxa_videobuf_queue() finishes”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K¨hjüubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjáhžhhŸh³h Nubj)”}”(hŒcapture list. If that's the case, the capture will be restarted, and Videobuffer3 is scheduled on DMA chain.”h]”hÊ)”}”(hŒÚpxa_camera_check_link_miss() is called This checks if the DMA is finished and a buffer is still on the pcdev->capture list. If that's the case, the capture will be restarted, and Videobuffer3 is scheduled on DMA chain.”h]”hŒÜpxa_camera_check_link_miss() is called This checks if the DMA is finished and a buffer is still on the pcdev->capture list. If that’s the case, the capture will be restarted, and Videobuffer3 is scheduled on DMA chain.”…””}”(hj_hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K·hj[ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjXhžhhŸh³h Nubj)”}”(hŒthe DMA irq handler finishes ”h]”hÊ)”}”(hŒthe DMA irq handler finishes”h]”hŒthe DMA irq handler finishes”…””}”(hjwhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K»hjsubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjXhžhhŸh³h Nubeh}”(h]”h ]”h"]”h$]”h&]”jpjquh1jhŸh³h K·hjÍhžhubhŒnote”“”)”}”(hXIf DMA stops just after pxa_camera_check_link_miss() reads DDADR() value, we have the guarantee that the DMA irq handler will be called back when the DMA will finish the buffer, and pxa_camera_check_link_miss() will be called again, to reschedule Videobuffer3.”h]”hÊ)”}”(hXIf DMA stops just after pxa_camera_check_link_miss() reads DDADR() value, we have the guarantee that the DMA irq handler will be called back when the DMA will finish the buffer, and pxa_camera_check_link_miss() will be called again, to reschedule Videobuffer3.”h]”hXIf DMA stops just after pxa_camera_check_link_miss() reads DDADR() value, we have the guarantee that the DMA irq handler will be called back when the DMA will finish the buffer, and pxa_camera_check_link_miss() will be called again, to reschedule Videobuffer3.”…””}”(hj—hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K¿hj“ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‘hjÍhžhhŸh³h Nubeh}”(h]”Œ dma-usage”ah ]”h"]”Œ dma usage”ah$]”h&]”uh1h´hh¶hžhhŸh³h KXubeh}”(h]”Œpxa-camera-host-driver”ah ]”h"]”Œpxa-camera host driver”ah$]”h&]”uh1h´hhhžhhŸh³h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h³uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¹NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jÞŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h³Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j¸jµj/j,jÊjÇj°j­uŒ nametypes”}”(j¸‰j/‰jʉj°‰uh}”(jµh¶j,hïjÇj2j­jÍuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”hŒsystem_message”“”)”}”(hhh]”hÊ)”}”(hŒ:Enumerated list start value not ordinal-1: "c" (ordinal 3)”h]”hŒ>Enumerated list start value not ordinal-1: “c†(ordinal 3)”…””}”(hjEhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhjBubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”h³Œline”Kuh1j@hjÍhžhhŸh³h K’ubaŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.