Skip to content

Commit fd5c32d

Browse files
committed
Merge tag 'media/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - the usbvision driver was dropped from staging - the Zoran driver were re-added at staging. It gained lots of improvements, and was converted to use videobuf2 API - a new virtual driver (vidtv) was added in order to allow testing the digital TV framework and APIs - the media uAPI documentation gained a glossary with commonly used terms, helping to simplify some parts of the docs - more cleanups at the atomisp driver - Mediatek VPU gained support for MT8183 - added support for codecs with supports doing colorspace conversion (CSC) - support for CSC API was added at vivid and rksip1 drivers - added a helper core support and uAPI for better supporting H.264 codecs - added support for Renesas R8A774E1 - use the new SPDX GFDL-1.1-no-invariants-or-later license on media uAPI docs, instead of a license text - Venus driver has gained VP9 codec support - lots of other cleanups and driver improvements * tag 'media/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (555 commits) media: dvb-frontends/drxk_hard.c: fix uninitialized variable warning media: tvp7002: fix uninitialized variable warning media: s5k5baf: drop 'data' field in struct s5k5baf_fw media: dt-bindings: media: venus: Add an optional power domain for perf voting media: rcar-vin: rcar-dma: Fix setting VNIS_REG for RAW8 formats media: staging: rkisp1: uapi: Do not use BIT() macro media: v4l2-mem2mem: Fix spurious v4l2_m2m_buf_done media: usbtv: Fix refcounting mixup media: zoran.rst: place it at the right place this time media: add Zoran cardlist media: admin-guide: update cardlists media: siano: rename a duplicated card string media: zoran: move documentation file to the right place media: atomisp: fixes build breakage for ISP2400 due to a cleanup media: zoran: fix mixed case on vars media: zoran: get rid of an unused var media: zoran: use upper case for card types media: zoran: fix sparse warnings media: zoran: fix smatch warning media: zoran: update TODO ...
2 parents 647412d + c386e07 commit fd5c32d

1,002 files changed

Lines changed: 26154 additions & 18129 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/admin-guide/media/dvb-usb-dvbsky-cardlist.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ dvb-usb-dvbsky cards list
2020
- 0572:0320
2121
* - DVBSky T680CI
2222
- 0572:680c
23-
* - MyGica Mini DVB-T2 USB Stick T230
23+
* - MyGica Mini DVB-(T/T2/C) USB Stick T230
2424
- 0572:c688
25-
* - MyGica Mini DVB-T2 USB Stick T230C
25+
* - MyGica Mini DVB-(T/T2/C) USB Stick T230C
2626
- 0572:c689
27-
* - MyGica Mini DVB-T2 USB Stick T230C Lite
27+
* - MyGica Mini DVB-(T/T2/C) USB Stick T230C Lite
2828
- 0572:c699
29-
* - MyGica Mini DVB-T2 USB Stick T230C v2
29+
* - MyGica Mini DVB-(T/T2/C) USB Stick T230C v2
3030
- 0572:c68a
3131
* - TechnoTrend TT-connect CT2-4650 CI
3232
- 0b48:3012

Documentation/admin-guide/media/dvb-usb-dw2102-cardlist.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ dvb-usb-dw2102 cards list
4040
- 0b48:3011
4141
* - TerraTec Cinergy S USB
4242
- 0ccd:0064
43+
* - Terratec Cinergy S2 PCIe Dual Port 1
44+
- 153b:1181
45+
* - Terratec Cinergy S2 PCIe Dual Port 2
46+
- 153b:1182
4347
* - Terratec Cinergy S2 USB BOX
4448
- 0ccd:0x0105
4549
* - Terratec Cinergy S2 USB HD

Documentation/admin-guide/media/em28xx-cardlist.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,3 +434,7 @@ EM28xx cards list
434434
- PCTV DVB-S2 Stick (461e v2)
435435
- em28178
436436
- 2013:0461, 2013:0259
437+
* - 105
438+
- MyGica iGrabber
439+
- em2860
440+
- 1f4d:1abe

Documentation/admin-guide/media/ipu3.rst

Lines changed: 74 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -89,41 +89,41 @@ Let us take the example of ov5670 sensor connected to CSI2 port 0, for a
8989
Using the media contorller APIs, the ov5670 sensor is configured to send
9090
frames in packed raw Bayer format to IPU3 CSI2 receiver.
9191

92-
# This example assumes /dev/media0 as the CIO2 media device
93-
94-
export MDEV=/dev/media0
95-
96-
# and that ov5670 sensor is connected to i2c bus 10 with address 0x36
97-
98-
export SDEV=$(media-ctl -d $MDEV -e "ov5670 10-0036")
92+
.. code-block:: none
9993
100-
# Establish the link for the media devices using media-ctl [#f3]_
101-
media-ctl -d $MDEV -l "ov5670:0 -> ipu3-csi2 0:0[1]"
94+
# This example assumes /dev/media0 as the CIO2 media device
95+
export MDEV=/dev/media0
10296
103-
# Set the format for the media devices
104-
media-ctl -d $MDEV -V "ov5670:0 [fmt:SGRBG10/2592x1944]"
97+
# and that ov5670 sensor is connected to i2c bus 10 with address 0x36
98+
export SDEV=$(media-ctl -d $MDEV -e "ov5670 10-0036")
10599
106-
media-ctl -d $MDEV -V "ipu3-csi2 0:0 [fmt:SGRBG10/2592x1944]"
100+
# Establish the link for the media devices using media-ctl [#f3]_
101+
media-ctl -d $MDEV -l "ov5670:0 -> ipu3-csi2 0:0[1]"
107102
108-
media-ctl -d $MDEV -V "ipu3-csi2 0:1 [fmt:SGRBG10/2592x1944]"
103+
# Set the format for the media devices
104+
media-ctl -d $MDEV -V "ov5670:0 [fmt:SGRBG10/2592x1944]"
105+
media-ctl -d $MDEV -V "ipu3-csi2 0:0 [fmt:SGRBG10/2592x1944]"
106+
media-ctl -d $MDEV -V "ipu3-csi2 0:1 [fmt:SGRBG10/2592x1944]"
109107
110108
Once the media pipeline is configured, desired sensor specific settings
111109
(such as exposure and gain settings) can be set, using the yavta tool.
112110

113111
e.g
114112

115-
yavta -w 0x009e0903 444 $SDEV
116-
117-
yavta -w 0x009e0913 1024 $SDEV
113+
.. code-block:: none
118114
119-
yavta -w 0x009e0911 2046 $SDEV
115+
yavta -w 0x009e0903 444 $SDEV
116+
yavta -w 0x009e0913 1024 $SDEV
117+
yavta -w 0x009e0911 2046 $SDEV
120118
121119
Once the desired sensor settings are set, frame captures can be done as below.
122120

123121
e.g
124122

125-
yavta --data-prefix -u -c10 -n5 -I -s2592x1944 --file=/tmp/frame-#.bin \
126-
-f IPU3_SGRBG10 $(media-ctl -d $MDEV -e "ipu3-cio2 0")
123+
.. code-block:: none
124+
125+
yavta --data-prefix -u -c10 -n5 -I -s2592x1944 --file=/tmp/frame-#.bin \
126+
-f IPU3_SGRBG10 $(media-ctl -d $MDEV -e "ipu3-cio2 0")
127127
128128
With the above command, 10 frames are captured at 2592x1944 resolution, with
129129
sGRBG10 format and output as IPU3_SGRBG10 format.
@@ -269,21 +269,21 @@ all the video nodes setup correctly.
269269

270270
Let us take "ipu3-imgu 0" subdev as an example.
271271

272-
media-ctl -d $MDEV -r
273-
274-
media-ctl -d $MDEV -l "ipu3-imgu 0 input":0 -> "ipu3-imgu 0":0[1]
275-
276-
media-ctl -d $MDEV -l "ipu3-imgu 0":2 -> "ipu3-imgu 0 output":0[1]
277-
278-
media-ctl -d $MDEV -l "ipu3-imgu 0":3 -> "ipu3-imgu 0 viewfinder":0[1]
272+
.. code-block:: none
279273
280-
media-ctl -d $MDEV -l "ipu3-imgu 0":4 -> "ipu3-imgu 0 3a stat":0[1]
274+
media-ctl -d $MDEV -r
275+
media-ctl -d $MDEV -l "ipu3-imgu 0 input":0 -> "ipu3-imgu 0":0[1]
276+
media-ctl -d $MDEV -l "ipu3-imgu 0":2 -> "ipu3-imgu 0 output":0[1]
277+
media-ctl -d $MDEV -l "ipu3-imgu 0":3 -> "ipu3-imgu 0 viewfinder":0[1]
278+
media-ctl -d $MDEV -l "ipu3-imgu 0":4 -> "ipu3-imgu 0 3a stat":0[1]
281279
282280
Also the pipe mode of the corresponding V4L2 subdev should be set as desired
283281
(e.g 0 for video mode or 1 for still mode) through the control id 0x009819a1 as
284282
below.
285283

286-
yavta -w "0x009819A1 1" /dev/v4l-subdev7
284+
.. code-block:: none
285+
286+
yavta -w "0x009819A1 1" /dev/v4l-subdev7
287287
288288
Certain hardware blocks in ImgU pipeline can change the frame resolution by
289289
cropping or scaling, these hardware blocks include Input Feeder(IF), Bayer Down
@@ -371,30 +371,32 @@ v4l2n command can be used. This helps process the raw Bayer frames and produces
371371
the desired results for the main output image and the viewfinder output, in NV12
372372
format.
373373

374-
v4l2n --pipe=4 --load=/tmp/frame-#.bin --open=/dev/video4
375-
--fmt=type:VIDEO_OUTPUT_MPLANE,width=2592,height=1944,pixelformat=0X47337069
376-
--reqbufs=type:VIDEO_OUTPUT_MPLANE,count:1 --pipe=1 --output=/tmp/frames.out
377-
--open=/dev/video5
378-
--fmt=type:VIDEO_CAPTURE_MPLANE,width=2560,height=1920,pixelformat=NV12
379-
--reqbufs=type:VIDEO_CAPTURE_MPLANE,count:1 --pipe=2 --output=/tmp/frames.vf
380-
--open=/dev/video6
381-
--fmt=type:VIDEO_CAPTURE_MPLANE,width=2560,height=1920,pixelformat=NV12
382-
--reqbufs=type:VIDEO_CAPTURE_MPLANE,count:1 --pipe=3 --open=/dev/video7
383-
--output=/tmp/frames.3A --fmt=type:META_CAPTURE,?
384-
--reqbufs=count:1,type:META_CAPTURE --pipe=1,2,3,4 --stream=5
374+
.. code-block:: none
375+
376+
v4l2n --pipe=4 --load=/tmp/frame-#.bin --open=/dev/video4
377+
--fmt=type:VIDEO_OUTPUT_MPLANE,width=2592,height=1944,pixelformat=0X47337069 \
378+
--reqbufs=type:VIDEO_OUTPUT_MPLANE,count:1 --pipe=1 \
379+
--output=/tmp/frames.out --open=/dev/video5 \
380+
--fmt=type:VIDEO_CAPTURE_MPLANE,width=2560,height=1920,pixelformat=NV12 \
381+
--reqbufs=type:VIDEO_CAPTURE_MPLANE,count:1 --pipe=2 \
382+
--output=/tmp/frames.vf --open=/dev/video6 \
383+
--fmt=type:VIDEO_CAPTURE_MPLANE,width=2560,height=1920,pixelformat=NV12 \
384+
--reqbufs=type:VIDEO_CAPTURE_MPLANE,count:1 --pipe=3 --open=/dev/video7 \
385+
--output=/tmp/frames.3A --fmt=type:META_CAPTURE,? \
386+
--reqbufs=count:1,type:META_CAPTURE --pipe=1,2,3,4 --stream=5
385387
386388
You can also use yavta [#f2]_ command to do same thing as above:
387389

388390
.. code-block:: none
389391
390-
yavta --data-prefix -Bcapture-mplane -c10 -n5 -I -s2592x1944 \
391-
--file=frame-#.out-f NV12 /dev/video5 & \
392-
yavta --data-prefix -Bcapture-mplane -c10 -n5 -I -s2592x1944 \
393-
--file=frame-#.vf -f NV12 /dev/video6 & \
394-
yavta --data-prefix -Bmeta-capture -c10 -n5 -I \
395-
--file=frame-#.3a /dev/video7 & \
396-
yavta --data-prefix -Boutput-mplane -c10 -n5 -I -s2592x1944 \
397-
--file=/tmp/frame-in.cio2 -f IPU3_SGRBG10 /dev/video4
392+
yavta --data-prefix -Bcapture-mplane -c10 -n5 -I -s2592x1944 \
393+
--file=frame-#.out-f NV12 /dev/video5 & \
394+
yavta --data-prefix -Bcapture-mplane -c10 -n5 -I -s2592x1944 \
395+
--file=frame-#.vf -f NV12 /dev/video6 & \
396+
yavta --data-prefix -Bmeta-capture -c10 -n5 -I \
397+
--file=frame-#.3a /dev/video7 & \
398+
yavta --data-prefix -Boutput-mplane -c10 -n5 -I -s2592x1944 \
399+
--file=/tmp/frame-in.cio2 -f IPU3_SGRBG10 /dev/video4
398400
399401
where /dev/video4, /dev/video5, /dev/video6 and /dev/video7 devices point to
400402
input, output, viewfinder and 3A statistics video nodes respectively.
@@ -408,15 +410,19 @@ as below.
408410
Main output frames
409411
~~~~~~~~~~~~~~~~~~
410412

411-
raw2pnm -x2560 -y1920 -fNV12 /tmp/frames.out /tmp/frames.out.ppm
413+
.. code-block:: none
414+
415+
raw2pnm -x2560 -y1920 -fNV12 /tmp/frames.out /tmp/frames.out.ppm
412416
413417
where 2560x1920 is output resolution, NV12 is the video format, followed
414418
by input frame and output PNM file.
415419

416420
Viewfinder output frames
417421
~~~~~~~~~~~~~~~~~~~~~~~~
418422

419-
raw2pnm -x2560 -y1920 -fNV12 /tmp/frames.vf /tmp/frames.vf.ppm
423+
.. code-block:: none
424+
425+
raw2pnm -x2560 -y1920 -fNV12 /tmp/frames.vf /tmp/frames.vf.ppm
420426
421427
where 2560x1920 is output resolution, NV12 is the video format, followed
422428
by input frame and output PNM file.
@@ -482,63 +488,63 @@ Name Description
482488
Optical Black Correction Optical Black Correction block subtracts a pre-defined
483489
value from the respective pixel values to obtain better
484490
image quality.
485-
Defined in :c:type:`ipu3_uapi_obgrid_param`.
491+
Defined in struct ipu3_uapi_obgrid_param.
486492
Linearization This algo block uses linearization parameters to
487493
address non-linearity sensor effects. The Lookup table
488494
table is defined in
489-
:c:type:`ipu3_uapi_isp_lin_vmem_params`.
495+
struct ipu3_uapi_isp_lin_vmem_params.
490496
SHD Lens shading correction is used to correct spatial
491497
non-uniformity of the pixel response due to optical
492498
lens shading. This is done by applying a different gain
493499
for each pixel. The gain, black level etc are
494-
configured in :c:type:`ipu3_uapi_shd_config_static`.
500+
configured in struct ipu3_uapi_shd_config_static.
495501
BNR Bayer noise reduction block removes image noise by
496502
applying a bilateral filter.
497-
See :c:type:`ipu3_uapi_bnr_static_config` for details.
503+
See struct ipu3_uapi_bnr_static_config for details.
498504
ANR Advanced Noise Reduction is a block based algorithm
499505
that performs noise reduction in the Bayer domain. The
500506
convolution matrix etc can be found in
501-
:c:type:`ipu3_uapi_anr_config`.
507+
struct ipu3_uapi_anr_config.
502508
DM Demosaicing converts raw sensor data in Bayer format
503509
into RGB (Red, Green, Blue) presentation. Then add
504510
outputs of estimation of Y channel for following stream
505511
processing by Firmware. The struct is defined as
506-
:c:type:`ipu3_uapi_dm_config`.
512+
struct ipu3_uapi_dm_config.
507513
Color Correction Color Correction algo transforms sensor specific color
508514
space to the standard "sRGB" color space. This is done
509515
by applying 3x3 matrix defined in
510-
:c:type:`ipu3_uapi_ccm_mat_config`.
511-
Gamma correction Gamma correction :c:type:`ipu3_uapi_gamma_config` is a
516+
struct ipu3_uapi_ccm_mat_config.
517+
Gamma correction Gamma correction struct ipu3_uapi_gamma_config is a
512518
basic non-linear tone mapping correction that is
513519
applied per pixel for each pixel component.
514520
CSC Color space conversion transforms each pixel from the
515521
RGB primary presentation to YUV (Y: brightness,
516522
UV: Luminance) presentation. This is done by applying
517523
a 3x3 matrix defined in
518-
:c:type:`ipu3_uapi_csc_mat_config`
524+
struct ipu3_uapi_csc_mat_config
519525
CDS Chroma down sampling
520526
After the CSC is performed, the Chroma Down Sampling
521527
is applied for a UV plane down sampling by a factor
522528
of 2 in each direction for YUV 4:2:0 using a 4x2
523-
configurable filter :c:type:`ipu3_uapi_cds_params`.
529+
configurable filter struct ipu3_uapi_cds_params.
524530
CHNR Chroma noise reduction
525531
This block processes only the chrominance pixels and
526532
performs noise reduction by cleaning the high
527533
frequency noise.
528-
See struct :c:type:`ipu3_uapi_yuvp1_chnr_config`.
534+
See struct struct ipu3_uapi_yuvp1_chnr_config.
529535
TCC Total color correction as defined in struct
530-
:c:type:`ipu3_uapi_yuvp2_tcc_static_config`.
536+
struct ipu3_uapi_yuvp2_tcc_static_config.
531537
XNR3 eXtreme Noise Reduction V3 is the third revision of
532538
noise reduction algorithm used to improve image
533539
quality. This removes the low frequency noise in the
534540
captured image. Two related structs are being defined,
535-
:c:type:`ipu3_uapi_isp_xnr3_params` for ISP data memory
536-
and :c:type:`ipu3_uapi_isp_xnr3_vmem_params` for vector
541+
struct ipu3_uapi_isp_xnr3_params for ISP data memory
542+
and struct ipu3_uapi_isp_xnr3_vmem_params for vector
537543
memory.
538544
TNR Temporal Noise Reduction block compares successive
539545
frames in time to remove anomalies / noise in pixel
540-
values. :c:type:`ipu3_uapi_isp_tnr3_vmem_params` and
541-
:c:type:`ipu3_uapi_isp_tnr3_params` are defined for ISP
546+
values. struct ipu3_uapi_isp_tnr3_vmem_params and
547+
struct ipu3_uapi_isp_tnr3_params are defined for ISP
542548
vector and data memory respectively.
543549
======================== =======================================================
544550

@@ -570,9 +576,9 @@ processor, while many others will use a set of fixed hardware blocks also
570576
called accelerator cluster (ACC) to crunch pixel data and produce statistics.
571577

572578
ACC parameters of individual algorithms, as defined by
573-
:c:type:`ipu3_uapi_acc_param`, can be chosen to be applied by the user
574-
space through struct :c:type:`ipu3_uapi_flags` embedded in
575-
:c:type:`ipu3_uapi_params` structure. For parameters that are configured as
579+
struct ipu3_uapi_acc_param, can be chosen to be applied by the user
580+
space through struct struct ipu3_uapi_flags embedded in
581+
struct ipu3_uapi_params structure. For parameters that are configured as
576582
not enabled by the user space, the corresponding structs are ignored by the
577583
driver, in which case the existing configuration of the algorithm will be
578584
preserved.

Documentation/admin-guide/media/pci-cardlist.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ sta2x11_vip STA2X11 VIP Video For Linux
9090
tw5864 Techwell TW5864 video/audio grabber and encoder
9191
tw686x Intersil/Techwell TW686x
9292
tw68 Techwell tw68x Video For Linux
93+
zoran Zoran-36057/36067 JPEG codec
9394
================ ========================================================
9495

9596
Some of those drivers support multiple devices, as shown at the card
@@ -105,3 +106,4 @@ lists below:
105106
ivtv-cardlist
106107
saa7134-cardlist
107108
saa7164-cardlist
109+
zoran-cardlist
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
digraph board {
2+
rankdir=TB
3+
n00000001 [label="{{<port0> 0 | <port1> 1} | rkisp1_isp\n/dev/v4l-subdev0 | {<port2> 2 | <port3> 3}}", shape=Mrecord, style=filled, fillcolor=green]
4+
n00000001:port2 -> n00000006:port0
5+
n00000001:port2 -> n00000009:port0
6+
n00000001:port3 -> n00000014 [style=bold]
7+
n00000006 [label="{{<port0> 0} | rkisp1_resizer_mainpath\n/dev/v4l-subdev1 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
8+
n00000006:port1 -> n0000000c [style=bold]
9+
n00000009 [label="{{<port0> 0} | rkisp1_resizer_selfpath\n/dev/v4l-subdev2 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
10+
n00000009:port1 -> n00000010 [style=bold]
11+
n0000000c [label="rkisp1_mainpath\n/dev/video0", shape=box, style=filled, fillcolor=yellow]
12+
n00000010 [label="rkisp1_selfpath\n/dev/video1", shape=box, style=filled, fillcolor=yellow]
13+
n00000014 [label="rkisp1_stats\n/dev/video2", shape=box, style=filled, fillcolor=yellow]
14+
n00000018 [label="rkisp1_params\n/dev/video3", shape=box, style=filled, fillcolor=yellow]
15+
n00000018 -> n00000001:port1 [style=bold]
16+
n0000001c [label="{{} | imx219 4-0010\n/dev/v4l-subdev3 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
17+
n0000001c:port0 -> n00000001:port0
18+
}

0 commit comments

Comments
 (0)