~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/admin-guide/media/imx.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/admin-guide/media/imx.rst (Version linux-6.12-rc7) and /Documentation/admin-guide/media/imx.rst (Version linux-3.10.108)


  1 .. SPDX-License-Identifier: GPL-2.0               
  2                                                   
  3 i.MX Video Capture Driver                         
  4 =========================                         
  5                                                   
  6 Introduction                                      
  7 ------------                                      
  8                                                   
  9 The Freescale i.MX5/6 contains an Image Proces    
 10 handles the flow of image frames to and from c    
 11 display devices.                                  
 12                                                   
 13 For image capture, the IPU contains the follow    
 14                                                   
 15 - Image DMA Controller (IDMAC)                    
 16 - Camera Serial Interface (CSI)                   
 17 - Image Converter (IC)                            
 18 - Sensor Multi-FIFO Controller (SMFC)             
 19 - Image Rotator (IRT)                             
 20 - Video De-Interlacing or Combining Block (VDI    
 21                                                   
 22 The IDMAC is the DMA controller for transfer o    
 23 memory. Various dedicated DMA channels exist f    
 24 display paths. During transfer, the IDMAC is a    
 25 image flip, 8x8 block transfer (see IRT descri    
 26 re-ordering (for example UYVY to YUYV) within     
 27 packed <--> planar conversion. The IDMAC can a    
 28 de-interlacing by interweaving even and odd li    
 29 (without motion compensation which requires th    
 30                                                   
 31 The CSI is the backend capture unit that inter    
 32 camera sensors over Parallel, BT.656/1120, and    
 33                                                   
 34 The IC handles color-space conversion, resizin    
 35 upscaling), horizontal flip, and 90/270 degree    
 36                                                   
 37 There are three independent "tasks" within the    
 38 conversions concurrently: pre-process encoding    
 39 and post-processing. Within each task, convers    
 40 sections: downsizing section, main section (up    
 41 conversion, and graphics plane combining), and    
 42                                                   
 43 The IPU time-shares the IC task operations. Th    
 44 is one burst of eight pixels in the downsizing    
 45 in the main processing section, one image fram    
 46                                                   
 47 The SMFC is composed of four independent FIFOs    
 48 captured frames from sensors directly to memor    
 49 IDMAC channels.                                   
 50                                                   
 51 The IRT carries out 90 and 270 degree image ro    
 52 rotation operation is carried out on 8x8 pixel    
 53 operation is supported by the IDMAC which hand    
 54 along with block reordering, in coordination w    
 55                                                   
 56 The VDIC handles the conversion of interlaced     
 57 support for different motion compensation mode    
 58 motion). The deinterlaced output frames from t    
 59 IC pre-process viewfinder task for further con    
 60 contains a Combiner that combines two image pl    
 61 and color keying.                                 
 62                                                   
 63 In addition to the IPU internal subunits, ther    
 64 outside the IPU that are also involved in vide    
 65                                                   
 66 - MIPI CSI-2 Receiver for camera sensors with     
 67   interface. This is a Synopsys DesignWare cor    
 68 - Two video multiplexers for selecting among m    
 69   to send to a CSI.                               
 70                                                   
 71 For more info, refer to the latest versions of    
 72 manuals [#f1]_ and [#f2]_.                        
 73                                                   
 74                                                   
 75 Features                                          
 76 --------                                          
 77                                                   
 78 Some of the features of this driver include:      
 79                                                   
 80 - Many different pipelines can be configured v    
 81   that correspond to the hardware video captur    
 82   the i.MX.                                       
 83                                                   
 84 - Supports parallel, BT.565, and MIPI CSI-2 in    
 85                                                   
 86 - Concurrent independent streams, by configuri    
 87   video capture interfaces using independent e    
 88                                                   
 89 - Scaling, color-space conversion, horizontal     
 90   image rotation via IC task subdevs.             
 91                                                   
 92 - Many pixel formats supported (RGB, packed an    
 93   planar YUV).                                    
 94                                                   
 95 - The VDIC subdev supports motion compensated     
 96   motion compensation modes: low, medium, and     
 97   defined that allow sending frames to the VDI    
 98   CSI. There is also support in the future for    
 99   VDIC from memory buffers via a output/mem2me    
100                                                   
101 - Includes a Frame Interval Monitor (FIM) that    
102   problems with the ADV718x video decoders.       
103                                                   
104                                                   
105 Topology                                          
106 --------                                          
107                                                   
108 The following shows the media topologies for t    
109 i.MX6Q SabreAuto. Refer to these diagrams in t    
110 in the next section.                              
111                                                   
112 The i.MX5/6 topologies can differ upstream fro    
113 multiplexers, but the internal IPUv3 topology     
114 is common to all i.MX5/6 platforms. For exampl    
115 MIPI CSI-2 OV5640 sensor, requires the i.MX6 M    
116 the SabreAuto has only the ADV7180 decoder on     
117 therefore does not require the MIPI CSI-2 rece    
118 its graph.                                        
119                                                   
120 .. _imx6q_topology_graph:                         
121                                                   
122 .. kernel-figure:: imx6q-sabresd.dot              
123     :alt:   Diagram of the i.MX6Q SabreSD medi    
124     :align: center                                
125                                                   
126     Media pipeline graph on i.MX6Q SabreSD        
127                                                   
128 .. kernel-figure:: imx6q-sabreauto.dot            
129     :alt:   Diagram of the i.MX6Q SabreAuto me    
130     :align: center                                
131                                                   
132     Media pipeline graph on i.MX6Q SabreAuto      
133                                                   
134 Entities                                          
135 --------                                          
136                                                   
137 imx6-mipi-csi2                                    
138 --------------                                    
139                                                   
140 This is the MIPI CSI-2 receiver entity. It has    
141 the MIPI CSI-2 stream (usually from a MIPI CSI    
142 four source pads, corresponding to the four MI    
143 channel outputs. Multiple source pads can be e    
144 stream from multiple virtual channels.            
145                                                   
146 This entity actually consists of two sub-block    
147 core. This is a Synopsys Designware MIPI CSI-2    
148 is a "CSI-2 to IPU gasket". The gasket acts as    
149 four virtual channels streams, providing four     
150 containing each virtual channel that are route    
151 multiplexers as described below.                  
152                                                   
153 On i.MX6 solo/dual-lite, all four virtual chan    
154 two video multiplexers. Both CSI0 and CSI1 can    
155 channel, as selected by the video multiplexers    
156                                                   
157 On i.MX6 Quad, virtual channel 0 is routed to     
158 by a video mux), virtual channels 1 and 2 are     
159 and IPU2-CSI0, respectively, and virtual chann    
160 IPU2-CSI1 (again selected by a video mux).        
161                                                   
162 ipuX_csiY_mux                                     
163 -------------                                     
164                                                   
165 These are the video multiplexers. They have tw    
166 select from either camera sensors with a paral    
167 MIPI CSI-2 virtual channels from imx6-mipi-csi    
168 single source pad that routes to a CSI (ipuX_c    
169                                                   
170 On i.MX6 solo/dual-lite, there are two video m    
171 in front of IPU1-CSI0 to select between a para    
172 the four MIPI CSI-2 virtual channels (a total     
173 other mux sits in front of IPU1-CSI1, and agai    
174 select between a parallel sensor and any of th    
175 channels.                                         
176                                                   
177 On i.MX6 Quad, there are two video mux entitie    
178 IPU1-CSI0 to select between a parallel sensor     
179 channel 0 (two sink pads). The other mux sits     
180 select between a parallel sensor and MIPI CSI-    
181 sink pads).                                       
182                                                   
183 ipuX_csiY                                         
184 ---------                                         
185                                                   
186 These are the CSI entities. They have a single    
187 either a video mux or from a MIPI CSI-2 virtua    
188 above.                                            
189                                                   
190 This entity has two source pads. The first sou    
191 to the ipuX_vdic entity or the ipuX_ic_prp ent    
192 that require no IDMAC memory buffer transfer.     
193                                                   
194 When the direct source pad is routed to the ip    
195 from the CSI can be processed by one or both o    
196 tasks.                                            
197                                                   
198 When the direct source pad is routed to the ip    
199 will carry out motion-compensated de-interlace    
200 (see description of ipuX_vdic entity).            
201                                                   
202 The second source pad sends video frames direc    
203 via the SMFC and an IDMAC channel, bypassing I    
204 source pad is routed to a capture device node,    
205 format "ipuX_csiY capture".                       
206                                                   
207 Note that since the IDMAC source pad makes use    
208 pixel reordering within the same colorspace ca    
209 IDMAC channel. For example, if the CSI sink pa    
210 order, the capture device linked to the IDMAC     
211 in YUYV order. Also, if the CSI sink pad is re    
212 format, the capture device can capture a plana    
213 YUV420.                                           
214                                                   
215 The IDMAC channel at the IDMAC source pad also    
216 interweave without motion compensation, which     
217 pad's field type is sequential top-bottom or b    
218 requested capture interface field type is set     
219 or unqualified interlaced). The capture interf    
220 field order as the source pad field order (int    
221 is seq-bt, interlaced-tb if source pad is seq-    
222                                                   
223 For events produced by ipuX_csiY, see ref:`imx    
224                                                   
225 Cropping in ipuX_csiY                             
226 ---------------------                             
227                                                   
228 The CSI supports cropping the incoming raw sen    
229 implemented in the ipuX_csiY entities at the s    
230 crop selection subdev API.                        
231                                                   
232 The CSI also supports fixed divide-by-two down    
233 width and height. This is implemented in the i    
234 the sink pad, using the compose selection subd    
235                                                   
236 The output rectangle at the ipuX_csiY source p    
237 the compose rectangle at the sink pad. So the     
238 cannot be negotiated, it must be set using the    
239 API at sink pad (if /2 downscale is desired, o    
240 rectangle is equal to incoming rectangle).        
241                                                   
242 To give an example of crop and /2 downscale, t    
243 1280x960 input frame to 640x480, and then /2 d    
244 dimensions to 320x240 (assumes ipu1_csi0 is li    
245                                                   
246 .. code-block:: none                              
247                                                   
248    media-ctl -V "'ipu1_csi0_mux':2[fmt:UYVY2X8    
249    media-ctl -V "'ipu1_csi0':0[crop:(0,0)/640x    
250    media-ctl -V "'ipu1_csi0':0[compose:(0,0)/3    
251                                                   
252 Frame Skipping in ipuX_csiY                       
253 ---------------------------                       
254                                                   
255 The CSI supports frame rate decimation, via fr    
256 rate decimation is specified by setting the fr    
257 sink and source pads. The ipuX_csiY entity the    
258 frame skip setting to the CSI to achieve the d    
259 at the source pad.                                
260                                                   
261 The following example reduces an assumed incom    
262 rate by half at the IDMAC output source pad:      
263                                                   
264 .. code-block:: none                              
265                                                   
266    media-ctl -V "'ipu1_csi0':0[fmt:UYVY2X8/640    
267    media-ctl -V "'ipu1_csi0':2[fmt:UYVY2X8/640    
268                                                   
269 Frame Interval Monitor in ipuX_csiY               
270 -----------------------------------               
271                                                   
272 See ref:`imx_api_FIM`.                            
273                                                   
274 ipuX_vdic                                         
275 ---------                                         
276                                                   
277 The VDIC carries out motion compensated de-int    
278 motion compensation modes: low, medium, and hi    
279 specified with the menu control V4L2_CID_DEINT    
280 has two sink pads and a single source pad.        
281                                                   
282 The direct sink pad receives from an ipuX_csiY    
283 link the VDIC can only operate in high motion     
284                                                   
285 When the IDMAC sink pad is activated, it recei    
286 or mem2mem device node. With this pipeline, th    
287 in low and medium modes, because these modes r    
288 frames from memory buffers. Note that an outpu    
289 is not implemented yet, so this sink pad curre    
290                                                   
291 The source pad routes to the IC pre-processing    
292                                                   
293 ipuX_ic_prp                                       
294 -----------                                       
295                                                   
296 This is the IC pre-processing entity. It acts     
297 data from its sink pad to one or both of its s    
298                                                   
299 This entity has a single sink pad. The sink pa    
300 ipuX_csiY direct pad, or from ipuX_vdic.          
301                                                   
302 This entity has two source pads. One source pa    
303 pre-process encode task entity (ipuX_ic_prpenc    
304 pre-process viewfinder task entity (ipuX_ic_pr    
305 can be activated at the same time if the sink     
306 ipuX_csiY. Only the source pad to the pre-proc    
307 can be activated if the sink pad is receiving     
308 from the VDIC can only be processed by the pre    
309                                                   
310 ipuX_ic_prpenc                                    
311 --------------                                    
312                                                   
313 This is the IC pre-processing encode entity. I    
314 pad from ipuX_ic_prp, and a single source pad.    
315 routed to a capture device node, with a node n    
316 "ipuX_ic_prpenc capture".                         
317                                                   
318 This entity performs the IC pre-process encode    
319 color-space conversion, resizing (downscaling     
320 horizontal and vertical flip, and 90/270 degre    
321 and rotation are provided via standard V4L2 co    
322                                                   
323 Like the ipuX_csiY IDMAC source, this entity a    
324 de-interlace without motion compensation, and     
325                                                   
326 ipuX_ic_prpvf                                     
327 -------------                                     
328                                                   
329 This is the IC pre-processing viewfinder entit    
330 pad from ipuX_ic_prp, and a single source pad.    
331 to a capture device node, with a node name of     
332 "ipuX_ic_prpvf capture".                          
333                                                   
334 This entity is identical in operation to ipuX_    
335 resizing and CSC operations and flip/rotation     
336 and process de-interlaced frames from the ipuX    
337 receiving from ipuX_vdic.                         
338                                                   
339 Like the ipuX_csiY IDMAC source, this entity s    
340 interweaving without motion compensation. Howe    
341 ipuX_vdic is included in the pipeline (ipuX_ic    
342 ipuX_vdic), it's not possible to use interweav    
343 since the ipuX_vdic has already carried out de    
344 motion compensation) and therefore the field t    
345 ipuX_vdic can only be none (progressive).         
346                                                   
347 Capture Pipelines                                 
348 -----------------                                 
349                                                   
350 The following describe the various use-cases s    
351                                                   
352 The links shown do not include the backend sen    
353 csi-2 receiver links. This depends on the type    
354 (parallel or mipi csi-2). So these pipelines b    
355                                                   
356 sensor -> ipuX_csiY_mux -> ...                    
357                                                   
358 for parallel sensors, or:                         
359                                                   
360 sensor -> imx6-mipi-csi2 -> (ipuX_csiY_mux) ->    
361                                                   
362 for mipi csi-2 sensors. The imx6-mipi-csi2 rec    
363 to the video mux (ipuX_csiY_mux) before sendin    
364 on the mipi csi-2 virtual channel, hence ipuX_    
365 parenthesis.                                      
366                                                   
367 Unprocessed Video Capture:                        
368 --------------------------                        
369                                                   
370 Send frames directly from sensor to camera dev    
371 no conversions, via ipuX_csiY IDMAC source pad    
372                                                   
373 -> ipuX_csiY:2 -> ipuX_csiY capture               
374                                                   
375 IC Direct Conversions:                            
376 ----------------------                            
377                                                   
378 This pipeline uses the preprocess encode entit    
379 from the CSI to the IC, to carry out scaling u    
380 CSC, flipping, and image rotation:                
381                                                   
382 -> ipuX_csiY:1 -> 0:ipuX_ic_prp:1 -> 0:ipuX_ic    
383                                                   
384 Motion Compensated De-interlace:                  
385 --------------------------------                  
386                                                   
387 This pipeline routes frames from the CSI direc    
388 support motion-compensated de-interlacing (hig    
389 scaling up to 1024x1024, CSC, flip, and rotati    
390                                                   
391 -> ipuX_csiY:1 -> 0:ipuX_vdic:2 -> 0:ipuX_ic_p    
392                                                   
393                                                   
394 Usage Notes                                       
395 -----------                                       
396                                                   
397 To aid in configuration and for backward compa    
398 applications that access controls only from vi    
399 capture device interfaces inherit controls fro    
400 in the current pipeline, so controls can be ac    
401 from the subdev or from the active capture dev    
402 example, the FIM controls are available either    
403 subdevs or from the active capture device.        
404                                                   
405 The following are specific usage notes for the    
406 boards:                                           
407                                                   
408                                                   
409 i.MX6Q SabreLite with OV5642 and OV5640           
410 ---------------------------------------           
411                                                   
412 This platform requires the OmniVision OV5642 m    
413 camera interface, and the OV5640 module with a    
414 interface. Both modules are available from Bou    
415                                                   
416 - https://boundarydevices.com/product/nit6x_5m    
417 - https://boundarydevices.com/product/nit6x_5m    
418                                                   
419 Note that if only one camera module is availab    
420 node can be disabled in the device tree.          
421                                                   
422 The OV5642 module is connected to the parallel    
423 internal video mux to IPU1 CSI0. It's i2c bus     
424                                                   
425 The MIPI CSI-2 OV5640 module is connected to t    
426 receiver, and the four virtual channel outputs    
427 routed as follows: vc0 to the IPU1 CSI0 mux, v    
428 vc2 directly to IPU2 CSI0, and vc3 to the IPU2    
429 also connected to i2c bus 2 on the SabreLite,     
430 OV5640 must not share the same i2c slave addre    
431                                                   
432 The following basic example configures unproce    
433 pipelines for both sensors. The OV5642 is rout    
434 the OV5640, transmitting on MIPI CSI-2 virtual    
435 imx6-mipi-csi2 pad 2), is routed to ipu1_csi1.    
436 configured to output 640x480, and the OV5642 o    
437 OV5640 UYVY2X8:                                   
438                                                   
439 .. code-block:: none                              
440                                                   
441    # Setup links for OV5642                       
442    media-ctl -l "'ov5642 1-0042':0 -> 'ipu1_cs    
443    media-ctl -l "'ipu1_csi0_mux':2 -> 'ipu1_cs    
444    media-ctl -l "'ipu1_csi0':2 -> 'ipu1_csi0 c    
445    # Setup links for OV5640                       
446    media-ctl -l "'ov5640 1-0040':0 -> 'imx6-mi    
447    media-ctl -l "'imx6-mipi-csi2':2 -> 'ipu1_c    
448    media-ctl -l "'ipu1_csi1':2 -> 'ipu1_csi1 c    
449    # Configure pads for OV5642 pipeline           
450    media-ctl -V "'ov5642 1-0042':0 [fmt:YUYV2X    
451    media-ctl -V "'ipu1_csi0_mux':2 [fmt:YUYV2X    
452    media-ctl -V "'ipu1_csi0':2 [fmt:AYUV32/640    
453    # Configure pads for OV5640 pipeline           
454    media-ctl -V "'ov5640 1-0040':0 [fmt:UYVY2X    
455    media-ctl -V "'imx6-mipi-csi2':2 [fmt:UYVY2    
456    media-ctl -V "'ipu1_csi1':2 [fmt:AYUV32/640    
457                                                   
458 Streaming can then begin independently on the     
459 "ipu1_csi0 capture" and "ipu1_csi1 capture". T    
460 be used to select any supported YUV pixelforma    
461 nodes, including planar.                          
462                                                   
463 i.MX6Q SabreAuto with ADV7180 decoder             
464 -------------------------------------             
465                                                   
466 On the i.MX6Q SabreAuto, an on-board ADV7180 S    
467 parallel bus input on the internal video mux t    
468                                                   
469 The following example configures a pipeline to    
470 video decoder, assuming NTSC 720x480 input sig    
471 interweave (unconverted and without motion com    
472 must output sequential or alternating fields (    
473 NTSC, or 'alternate'):                            
474                                                   
475 .. code-block:: none                              
476                                                   
477    # Setup links                                  
478    media-ctl -l "'adv7180 3-0021':0 -> 'ipu1_c    
479    media-ctl -l "'ipu1_csi0_mux':2 -> 'ipu1_cs    
480    media-ctl -l "'ipu1_csi0':2 -> 'ipu1_csi0 c    
481    # Configure pads                               
482    media-ctl -V "'adv7180 3-0021':0 [fmt:UYVY2    
483    media-ctl -V "'ipu1_csi0_mux':2 [fmt:UYVY2X    
484    media-ctl -V "'ipu1_csi0':2 [fmt:AYUV32/720    
485    # Configure "ipu1_csi0 capture" interface (    
486    v4l2-ctl -d4 --set-fmt-video=field=interlac    
487                                                   
488 Streaming can then begin on /dev/video4. The v    
489 used to select any supported YUV pixelformat o    
490                                                   
491 This example configures a pipeline to capture     
492 video decoder, assuming PAL 720x576 input sign    
493 Compensated de-interlacing. The adv7180 must o    
494 alternating fields (field type 'seq-tb' for PA    
495                                                   
496 .. code-block:: none                              
497                                                   
498    # Setup links                                  
499    media-ctl -l "'adv7180 3-0021':0 -> 'ipu1_c    
500    media-ctl -l "'ipu1_csi0_mux':2 -> 'ipu1_cs    
501    media-ctl -l "'ipu1_csi0':1 -> 'ipu1_vdic':    
502    media-ctl -l "'ipu1_vdic':2 -> 'ipu1_ic_prp    
503    media-ctl -l "'ipu1_ic_prp':2 -> 'ipu1_ic_p    
504    media-ctl -l "'ipu1_ic_prpvf':1 -> 'ipu1_ic    
505    # Configure pads                               
506    media-ctl -V "'adv7180 3-0021':0 [fmt:UYVY2    
507    media-ctl -V "'ipu1_csi0_mux':2 [fmt:UYVY2X    
508    media-ctl -V "'ipu1_csi0':1 [fmt:AYUV32/720    
509    media-ctl -V "'ipu1_vdic':2 [fmt:AYUV32/720    
510    media-ctl -V "'ipu1_ic_prp':2 [fmt:AYUV32/7    
511    media-ctl -V "'ipu1_ic_prpvf':1 [fmt:AYUV32    
512    # Configure "ipu1_ic_prpvf capture" interfa    
513    v4l2-ctl -d2 --set-fmt-video=field=none        
514                                                   
515 Streaming can then begin on /dev/video2. The v    
516 used to select any supported YUV pixelformat o    
517                                                   
518 This platform accepts Composite Video analog i    
519 Ain1 (connector J42).                             
520                                                   
521 i.MX6DL SabreAuto with ADV7180 decoder            
522 --------------------------------------            
523                                                   
524 On the i.MX6DL SabreAuto, an on-board ADV7180     
525 parallel bus input on the internal video mux t    
526                                                   
527 The following example configures a pipeline to    
528 video decoder, assuming NTSC 720x480 input sig    
529 interweave (unconverted and without motion com    
530 must output sequential or alternating fields (    
531 NTSC, or 'alternate'):                            
532                                                   
533 .. code-block:: none                              
534                                                   
535    # Setup links                                  
536    media-ctl -l "'adv7180 4-0021':0 -> 'ipu1_c    
537    media-ctl -l "'ipu1_csi0_mux':5 -> 'ipu1_cs    
538    media-ctl -l "'ipu1_csi0':2 -> 'ipu1_csi0 c    
539    # Configure pads                               
540    media-ctl -V "'adv7180 4-0021':0 [fmt:UYVY2    
541    media-ctl -V "'ipu1_csi0_mux':5 [fmt:UYVY2X    
542    media-ctl -V "'ipu1_csi0':2 [fmt:AYUV32/720    
543    # Configure "ipu1_csi0 capture" interface (    
544    v4l2-ctl -d0 --set-fmt-video=field=interlac    
545                                                   
546 Streaming can then begin on /dev/video0. The v    
547 used to select any supported YUV pixelformat o    
548                                                   
549 This example configures a pipeline to capture     
550 video decoder, assuming PAL 720x576 input sign    
551 Compensated de-interlacing. The adv7180 must o    
552 alternating fields (field type 'seq-tb' for PA    
553                                                   
554 .. code-block:: none                              
555                                                   
556    # Setup links                                  
557    media-ctl -l "'adv7180 4-0021':0 -> 'ipu1_c    
558    media-ctl -l "'ipu1_csi0_mux':5 -> 'ipu1_cs    
559    media-ctl -l "'ipu1_csi0':1 -> 'ipu1_vdic':    
560    media-ctl -l "'ipu1_vdic':2 -> 'ipu1_ic_prp    
561    media-ctl -l "'ipu1_ic_prp':2 -> 'ipu1_ic_p    
562    media-ctl -l "'ipu1_ic_prpvf':1 -> 'ipu1_ic    
563    # Configure pads                               
564    media-ctl -V "'adv7180 4-0021':0 [fmt:UYVY2    
565    media-ctl -V "'ipu1_csi0_mux':5 [fmt:UYVY2X    
566    media-ctl -V "'ipu1_csi0':1 [fmt:AYUV32/720    
567    media-ctl -V "'ipu1_vdic':2 [fmt:AYUV32/720    
568    media-ctl -V "'ipu1_ic_prp':2 [fmt:AYUV32/7    
569    media-ctl -V "'ipu1_ic_prpvf':1 [fmt:AYUV32    
570    # Configure "ipu1_ic_prpvf capture" interfa    
571    v4l2-ctl -d2 --set-fmt-video=field=none        
572                                                   
573 Streaming can then begin on /dev/video2. The v    
574 used to select any supported YUV pixelformat o    
575                                                   
576 This platform accepts Composite Video analog i    
577 Ain1 (connector J42).                             
578                                                   
579 i.MX6Q SabreSD with MIPI CSI-2 OV5640             
580 -------------------------------------             
581                                                   
582 Similarly to i.MX6Q SabreLite, the i.MX6Q Sabr    
583 interface OV5642 module on IPU1 CSI0, and a MI    
584 module. The OV5642 connects to i2c bus 1 and t    
585                                                   
586 The device tree for SabreSD includes OF graphs    
587 OV5642 and the MIPI CSI-2 OV5640, but as of th    
588 CSI-2 OV5640 has been tested, so the OV5642 no    
589 The OV5640 module connects to MIPI connector J    
590 for the OV5640 module that connects to the Sab    
591                                                   
592 The following example configures unprocessed v    
593 capture from the OV5640, transmitting on MIPI     
594                                                   
595 .. code-block:: none                              
596                                                   
597    # Setup links                                  
598    media-ctl -l "'ov5640 1-003c':0 -> 'imx6-mi    
599    media-ctl -l "'imx6-mipi-csi2':1 -> 'ipu1_c    
600    media-ctl -l "'ipu1_csi0_mux':2 -> 'ipu1_cs    
601    media-ctl -l "'ipu1_csi0':2 -> 'ipu1_csi0 c    
602    # Configure pads                               
603    media-ctl -V "'ov5640 1-003c':0 [fmt:UYVY2X    
604    media-ctl -V "'imx6-mipi-csi2':1 [fmt:UYVY2    
605    media-ctl -V "'ipu1_csi0_mux':0 [fmt:UYVY2X    
606    media-ctl -V "'ipu1_csi0':0 [fmt:AYUV32/640    
607                                                   
608 Streaming can then begin on "ipu1_csi0 capture    
609 tool can be used to select any supported pixel    
610 device node.                                      
611                                                   
612 To determine what is the /dev/video node corre    
613 "ipu1_csi0 capture":                              
614                                                   
615 .. code-block:: none                              
616                                                   
617    media-ctl -e "ipu1_csi0 capture"               
618    /dev/video0                                    
619                                                   
620 /dev/video0 is the streaming element in this c    
621                                                   
622 Starting the streaming via v4l2-ctl:              
623                                                   
624 .. code-block:: none                              
625                                                   
626    v4l2-ctl --stream-mmap -d /dev/video0          
627                                                   
628 Starting the streaming via Gstreamer and sendi    
629                                                   
630 .. code-block:: none                              
631                                                   
632    gst-launch-1.0 v4l2src device=/dev/video0 !    
633                                                   
634 The following example configures a direct conv    
635 from the OV5640, transmitting on MIPI CSI-2 vi    
636 shows colorspace conversion and scaling at IC     
637                                                   
638 .. code-block:: none                              
639                                                   
640    # Setup links                                  
641    media-ctl -l "'ov5640 1-003c':0 -> 'imx6-mi    
642    media-ctl -l "'imx6-mipi-csi2':1 -> 'ipu1_c    
643    media-ctl -l "'ipu1_csi0_mux':2 -> 'ipu1_cs    
644    media-ctl -l "'ipu1_csi0':1 -> 'ipu1_ic_prp    
645    media-ctl -l "'ipu1_ic_prp':1 -> 'ipu1_ic_p    
646    media-ctl -l "'ipu1_ic_prpenc':1 -> 'ipu1_i    
647    # Configure pads                               
648    media-ctl -V "'ov5640 1-003c':0 [fmt:UYVY2X    
649    media-ctl -V "'imx6-mipi-csi2':1 [fmt:UYVY2    
650    media-ctl -V "'ipu1_csi0_mux':2 [fmt:UYVY2X    
651    media-ctl -V "'ipu1_csi0':1 [fmt:AYUV32/640    
652    media-ctl -V "'ipu1_ic_prp':1 [fmt:AYUV32/6    
653    media-ctl -V "'ipu1_ic_prpenc':1 [fmt:ARGB8    
654    # Set a format at the capture interface        
655    v4l2-ctl -d /dev/video1 --set-fmt-video=pix    
656                                                   
657 Streaming can then begin on "ipu1_ic_prpenc ca    
658                                                   
659 To determine what is the /dev/video node corre    
660 "ipu1_ic_prpenc capture":                         
661                                                   
662 .. code-block:: none                              
663                                                   
664    media-ctl -e "ipu1_ic_prpenc capture"          
665    /dev/video1                                    
666                                                   
667                                                   
668 /dev/video1 is the streaming element in this c    
669                                                   
670 Starting the streaming via v4l2-ctl:              
671                                                   
672 .. code-block:: none                              
673                                                   
674    v4l2-ctl --stream-mmap -d /dev/video1          
675                                                   
676 Starting the streaming via Gstreamer and sendi    
677                                                   
678 .. code-block:: none                              
679                                                   
680    gst-launch-1.0 v4l2src device=/dev/video1 !    
681                                                   
682 Known Issues                                      
683 ------------                                      
684                                                   
685 1. When using 90 or 270 degree rotation contro    
686    near the IC resizer limit of 1024x1024, and    
687    pixel formats (YUV420, YUV422p), frame capt    
688    no end-of-frame interrupts from the IDMAC c    
689    this, use lower resolution and/or packed fo    
690    when 90 or 270 rotations are needed.           
691                                                   
692                                                   
693 File list                                         
694 ---------                                         
695                                                   
696 drivers/staging/media/imx/                        
697 include/media/imx.h                               
698 include/linux/imx-media.h                         
699                                                   
700 References                                        
701 ----------                                        
702                                                   
703 .. [#f1] http://www.nxp.com/assets/documents/d    
704 .. [#f2] http://www.nxp.com/assets/documents/d    
705                                                   
706                                                   
707 Authors                                           
708 -------                                           
709                                                   
710 - Steve Longerbeam <steve_longerbeam@mentor.com    
711 - Philipp Zabel <kernel@pengutronix.de>            
712 - Russell King <linux@armlinux.org.uk>             
713                                                   
714 Copyright (C) 2012-2017 Mentor Graphics Inc.      
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php