Julia Lawall [Sun, 6 Aug 2017 08:25:16 +0000 (04:25 -0400)]
media: bdisp: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:15 +0000 (04:25 -0400)]
media: exynos-gsc: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:14 +0000 (04:25 -0400)]
media: vcodec: mediatek: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Rick Chang <rick.chang@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:13 +0000 (04:25 -0400)]
media: V4L2: platform: rcar_jpu: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Ulyanov Mikhail <mikhail.ulyanov@cogentembedded.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:12 +0000 (04:25 -0400)]
media: s5p-g2d: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:11 +0000 (04:25 -0400)]
media: ti-vpe: vpe: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:10 +0000 (04:25 -0400)]
media: st-delta: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sat, 5 Aug 2017 10:47:13 +0000 (06:47 -0400)]
media: imx: capture: constify vb2_ops structures
These vb2_ops structures are only stored in the ops field of a
vb2_queue structure, which is declared as const. Thus the vb2_ops
structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };
@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct vb2_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sat, 5 Aug 2017 10:47:11 +0000 (06:47 -0400)]
media: blackfin: bfin_capture: constify vb2_ops structures
These vb2_ops structures are only stored in the ops field of a
vb2_queue structure, which is declared as const. Thus the vb2_ops
structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };
@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct vb2_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sat, 5 Aug 2017 10:47:10 +0000 (06:47 -0400)]
media: staging: media: davinci_vpfe: constify vb2_ops structures
These vb2_ops structures are only stored in the ops field of a
vb2_queue structure, which is declared as const. Thus the vb2_ops
structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };
@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct vb2_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sat, 5 Aug 2017 10:47:09 +0000 (06:47 -0400)]
media: davinci: vpbe: constify vb2_ops structures
These vb2_ops structures are only stored in the ops field of a
vb2_queue structure, which is declared as const. Thus the vb2_ops
structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };
@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct vb2_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sat, 5 Aug 2017 10:47:08 +0000 (06:47 -0400)]
media: v4l2-pci-skeleton: constify vb2_ops structures
These vb2_ops structures are only stored in the ops field of a
vb2_queue structure, which is declared as const. Thus the vb2_ops
structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };
@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct vb2_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Andrzej Pietrasiewicz [Tue, 8 Aug 2017 11:27:08 +0000 (07:27 -0400)]
media: s5p-jpeg: directly use parsed subsampling on exynos5433
On exynos5433 variant JPEG data is parsed by hardware only from SOS
marker, so subsampling is parsed by software. As such, its value need
not to be translated from hardware-specific encoding to V4L2 encoding.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Andrzej Pietrasiewicz [Tue, 8 Aug 2017 11:27:07 +0000 (07:27 -0400)]
media: s5p-jpeg: fix number of components macro
The value to be processed must be first masked and then shifted,
not the other way round.
Fixes:
6c96dbbc2aa9f5b4a ("[media] s5p-jpeg: add support for 5433")
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Tony K Nadackal [Tue, 8 Aug 2017 11:27:06 +0000 (07:27 -0400)]
media: s5p-jpeg: Clear JPEG_CODEC_ON bits in sw reset function
Bits EXYNOS4_DEC_MODE and EXYNOS4_ENC_MODE do not get cleared
on software reset. These bits need to be cleared explicitly.
Even though the bits in question are already cleared in interrupt
service routine, the reset should also clear them in case when
e.g. bootloader uses the codec and leaves it in a bad state.
[Updated commit message]
Signed-off-by: Tony K Nadackal <tony.kn@samsung.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Andrzej Pietrasiewicz [Tue, 8 Aug 2017 11:27:05 +0000 (07:27 -0400)]
media: s5p-jpeg: disable encoder/decoder in exynos4-like hardware after use
Clearing the bits turns off the encoder/decoder. If the hardware
is not turned off after use, at subsequent uses it does not work
in a stable manner, resulting in incorrect interrupt status value
being read and e.g. erroneous read of compressed bitstream size.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Tony K Nadackal [Tue, 8 Aug 2017 11:27:04 +0000 (07:27 -0400)]
Andrzej Pietrasiewicz [Fri, 11 Aug 2017 11:50:01 +0000 (07:50 -0400)]
media: s5p-jpeg: set w/h when encoding
q_data w/h must be set when encoding.
Fixes:
1c84e7f9d5dc596be (media: s5p-jpeg: Add support for resolution change event)
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Andrzej Pietrasiewicz [Fri, 11 Aug 2017 11:50:00 +0000 (07:50 -0400)]
media: s5p-jpeg: don't overwrite result's "size" member
Originally the "size" member was modified in a local variable passed to
s5p_jpeg_parse_hdr() but the member was not used by the caller, so it did
not matter. After applying patch
"media: s5p-jpeg: Don't use temporary structure in s5p_jpeg_buf_queue"
the unnecessary assignment started overwriting already assigned "size"
member of the passed structure with an incorrect value.
Fixes:
14a2de14dc0619bf9 ("media: s5p-jpeg: Don't use temporary structure in s5p_jpeg_buf_queue")
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Mauro Carvalho Chehab [Sun, 20 Aug 2017 11:45:41 +0000 (07:45 -0400)]
media: ddbridge: get rid of fall though gcc 7.1 warnings
drivers/media/pci/ddbridge/ddbridge-core.c: In function 'ddb_port_attach':
drivers/media/pci/ddbridge/ddbridge-core.c:2261:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (ret < 0)
^
drivers/media/pci/ddbridge/ddbridge-core.c:2263:2: note: here
case DDB_PORT_LOOP:
^~~~
drivers/media/pci/ddbridge/ddbridge-core.c: In function 'dvb_input_attach':
drivers/media/pci/ddbridge/ddbridge-core.c:1492:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (input->port->dev->link[input->port->lnr].info->ts_quirks &
^
drivers/media/pci/ddbridge/ddbridge-core.c:1497:2: note: here
case DDB_TUNER_DVBCT2_SONY_P:
^~~~
drivers/media/pci/ddbridge/ddbridge-core.c:1516:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
osc24 = 1;
~~~~~~^~~
drivers/media/pci/ddbridge/ddbridge-core.c:1517:2: note: here
case DDB_TUNER_DVBCT2_SONY:
^~~~
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 14:45:09 +0000 (10:45 -0400)]
media: dvb-frontends/cxd2841er: update moddesc wrt new chip support
Since the driver now recognizes and supports more chip variants, reflect
this fact in the module description accordingly.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Acked-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Mon, 14 Aug 2017 17:15:12 +0000 (13:15 -0400)]
media: ddbridge: constify stv0910_p and lnbh25_cfg
These structures are only copied into other structures, so
they can be const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:41:13 +0000 (06:41 -0400)]
media: ddbridge: const'ify all ddb_info, ddb_regmap et al
All data is accessed RO, so mark everything const. Some vars in several
functions aswell as function signatures also require the const keyword
now, they're also added by this commit.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:41:14 +0000 (06:41 -0400)]
media: ddbridge: bump version string to 0.9.31intermediate-integrated
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:41:12 +0000 (06:41 -0400)]
media: ddbridge: remove ddb_info's from the global scope
Since the DD hardware info and maps aren't needed anymore outside of
ddbridge-hw.c (they're returned via get_ddb_info() now), mark them
static and remove all refs from ddbridge-hw.h.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:41:10 +0000 (06:41 -0400)]
media: ddbridge: move ddb_unmap(), cleanup modparams
adapter_alloc is only used from within ddbridge-core, so move it there,
this removes the need for prototyping/referencing the variable. While at
it, msi isn't needed outside of ddbridge-main, so don't extref that one
aswell.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:41:11 +0000 (06:41 -0400)]
media: ddbridge: move device ID table to ddbridge-hw
This further cleans up ddbridge-main from hardware-related data and moves
the exact card type determination into ddbridge-hw.c:get_ddb_info(), right
to the hardware maps/structs. Also, const'ify more structs and pointers.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:41:09 +0000 (06:41 -0400)]
media: ddbridge: fix gap handling
Force gap setting if given by attribute and enable gap for older regmaps.
Also, setting a gap value of 128 via sysfs will now disable gap.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:29:15 +0000 (06:29 -0400)]
media: dvb-frontends/stv0910: fix mask for scramblingcode setup
The scrambling code has 4 bits. Fix the mask accordingly.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:29:14 +0000 (06:29 -0400)]
media: dvb-frontends/stv0910: fix FE_HAS_LOCK check order in tune()
It should first read the status and then check if FE has lock.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 9 Jul 2017 19:42:46 +0000 (15:42 -0400)]
media: MAINTAINERS: add entry for mxl5xx
Add MAINTAINER's entry for this new driver.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 9 Jul 2017 19:42:45 +0000 (15:42 -0400)]
media: ddbridge: fix buffer overflow in max_set_input_unlocked()
Picked up code parts introduced one smatch error:
drivers/media/pci/ddbridge/ddbridge-maxs8.c:163 max_set_input_unlocked() error: buffer overflow 'dev->link[port->lnr].lnb.voltage' 4 <= 255
Fix this by clamping the .lnb.voltage array access to 0-3 by "& 3"'ing
dvb->input.
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 9 Jul 2017 19:42:44 +0000 (15:42 -0400)]
media: ddbridge: support MaxLinear MXL5xx based cards (MaxS4/8)
This enables MaxS4/S8 and Octopus Max card support in ddbridge by adding
glue code into ddbridge-core, having another PCI ID, and have the LNB IC
control code (and all other MaxS4/8 related code) in ddbridge-maxs8.c
(rather than another ~400 LoC in ddbridge-core.c like it's done in the
original vendor driver package).
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 9 Jul 2017 19:42:43 +0000 (15:42 -0400)]
media: dvb-frontends: MaxLinear MxL5xx DVB-S/S2 tuner-demodulator driver
This adds the frontend driver for the MaxLinear MxL5xx family of tuner-
demodulators, as used on Digital Devices MaxS4/8 four/eight-tuner cards.
The driver was picked from the dddvb vendor driver package and - judging
solely from the diff - has undergone a 100% rework:
- Silly #define's used to pass multiple values to functions were
expanded. This resulted in macro/register names not being usable
anymore for such occurences, but makes the code WAY more read-,
understand- and maintainable.
- CamelCase was changed to kernel_case
- All typedef were removed
- Overall code style was fixed, besides >80char lines in _defs.h and
_regs.h, checkpatch is happy.
- Also, signal stat acquisition was made to comply with the DVB API
ways to do these things.
Permission to reuse and mainline the driver code was formally granted by
Ralph Metzler <rjkm@metzlerbros.de>.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:15 +0000 (06:13 -0400)]
media: dvb-frontends/stv{0910,6111}: constify tables
Mark lookup tables and fe_ops things const so the compiler can put them
into .rodata.
While at it, improve name and identifier strings (moddesc, fe_ops).
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:14 +0000 (06:13 -0400)]
media: dvb-frontends/stv6111: cosmetics: comments fixup, misc
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:13 +0000 (06:13 -0400)]
media: dvb-frontends/stv6111: coding style cleanup
Fix up all remainders reported by checkpatch-strict.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:12 +0000 (06:13 -0400)]
media: dvb-frontends/stv0910: cosmetics: fixup comments, misc
Fix up block comment style, whitespaces, c++ style comments et al.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:11 +0000 (06:13 -0400)]
media: dvb-frontends/stv0910: further coding style cleanup
Fixes up all remainders reported by "checkpatch.pl --strict"
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:10 +0000 (06:13 -0400)]
media: dvb-frontends/stv0910: implement diseqc_send_burst
This implements the diseqc_send_burst frontend op to support sending
mini-DISEQC bursts. Picked up from dddvb's driver package where this
specific block was disabled via #if 0/#endif, but is still working
according to feedback from upstream, so add it.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:09 +0000 (06:13 -0400)]
media: dvb-frontends/stv0910: fix STR assignment, remove unneeded var
According to the documentation, FE_SCALE_DECIBEL values should be assigned
to .svalue and not .uvalue, so let's do this. While at it, remove the
unneeded strength var from read_signal_strength().
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:56:02 +0000 (07:56 -0400)]
media: MAINTAINERS: add entry for ddbridge
An entry for ddbridge driver was missing. Add it, now that it
moved to Maintained state.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:56:01 +0000 (07:56 -0400)]
media: ddbridge: Kconfig option to control the MSI modparam default
It is known that MSI interrupts - while working quite well so far - can
still cause issues on some hardware platforms (causing I2C timeouts due
to unhandled interrupts). The msi variable/option is set to 1 by default.
So, add a Kconfig option prefixed with "EXPERIMENTAL" that will control
the default value of that modparam, defaulting to off for a better
user experience and (guaranteed) stable operation "per default".
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:56:00 +0000 (07:56 -0400)]
media: ddbridge: fix dereference before check
Both ts_release() and ts_open() can use "output" before check (smatch):
drivers/media/pci/ddbridge/ddbridge-core.c:816 ts_release() warn: variable dereferenced before check 'output' (see line 809)
drivers/media/pci/ddbridge/ddbridge-core.c:836 ts_open() warn: variable dereferenced before check 'output' (see line 828)
Fix by performing checks on those pointers.
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:59 +0000 (07:55 -0400)]
media: ddbridge: fix impossible condition warning
Smatch and gcc complained:
drivers/media/pci/ddbridge/ddbridge-core.c:3491 bpsnr_show() warn: impossible condition '(snr[0] == 255) => ((-128)-127 == 255)'
drivers/media/pci/ddbridge/ddbridge-core.c: In function ‘bpsnr_show’:
drivers/media/pci/ddbridge/ddbridge-core.c:3491:13: warning: comparison is always false due to limited range of data type [-Wtype-limits]
Fix this by changing the type of snr to unsigned char.
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:58 +0000 (07:55 -0400)]
media: ddbridge: remove unreachable code
>From smatch:
drivers/media/pci/ddbridge/ddbridge-core.c:3490 snr_store() info: ignoring unreachable code.
In fact, the function immediately returns zero, so remove it and update
ddb_attrs_snr[] to not reference it anymore.
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:57 +0000 (07:55 -0400)]
media: ddbridge: fix possible buffer overflow in ddb_ports_init()
Report from smatch:
drivers/media/pci/ddbridge/ddbridge-core.c:2659 ddb_ports_init() error: buffer overflow 'dev->port' 32 <= u32max
Fix by making sure "p" is greater than zero before checking for
"dev->port[].type == DDB_CI_EXTERNAL_XO2".
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:56 +0000 (07:55 -0400)]
media: ddbridge: only register frontends in fe2 if fe is not NULL
Smatch reported:
drivers/media/pci/ddbridge/ddbridge-core.c:1602 dvb_input_attach() error: we previously assumed 'dvb->fe' could be null (see line 1595)
dvb->fe2 will ever only be populated when dvb->fe is set. So only handle
registration of dvb->fe2 when dvb->fe got set beforehand by moving the
registration into the "if (dvb->fe)" conditional.
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:55 +0000 (07:55 -0400)]
media: ddbridge: check pointers before dereferencing
Fixes two warnings reported by smatch:
drivers/media/pci/ddbridge/ddbridge-core.c:240 ddb_redirect() warn: variable dereferenced before check 'idev' (see line 238)
drivers/media/pci/ddbridge/ddbridge-core.c:240 ddb_redirect() warn: variable dereferenced before check 'pdev' (see line 238)
Fixed by moving the existing checks up before accessing members.
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:54 +0000 (07:55 -0400)]
media: ddbridge: split off hardware definitions and mappings
Further cleanup of ddbridge-core and ddbridge-main, and moves all such
hw definitions into one single place, making things easier to maintain.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:53 +0000 (07:55 -0400)]
media: ddbridge: split I/O related functions off from ddbridge.h
While it seems valid that headers can carry simple oneline static inline
annotated functions, move them into their own header file to have the
overall code more readable. Also, keep them as header (and don't put in
a separate object) and static inline to help the compiler avoid
generating function calls.
(Thanks to Jasmin J. <jasmin@anw.at> for valuable input on this!)
Cc: Jasmin J. <jasmin@anw.at>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:52 +0000 (07:55 -0400)]
media: ddbridge: bump ddbridge code to version 0.9.29
This huge patch bumps the ddbridge driver to version 0.9.29. Compared to
the vendor driver package, DD OctoNET including GTL link support, and all
DVB-C Modulator card support has been removed since this requires large
changes to the underlying DVB core API, which should eventually be done
separately, and, after that, the functionality/device support can be added
back rather easy.
While the diff is rather large, the bump is mostly a big refactor of all
data structures. Yet, the MSI support (message signaled interrupts) is
greatly improved, also all currently available CI single/duo bridge cards
are fully supported.
More changes compared to the upstream driver:
- the DDB_USE_WORKER flag/define was removed, kernel worker functionality
will be used.
- coding style is properly fixed (zero complaints from checkpatch)
- all (not much though) CamelCase has been fixed to kernel_case
- (private) IOCTLs temporarily removed (which are mainly used to provide
rarely-used FPGA update functionality)
Great care has been taken to keep all previous changes and fixes (e.g.
kernel logging via dev_*(), pointer annotations and such) intact.
Permission to reuse and mainline the driver code was formally granted by
Ralph Metzler <rjkm@metzlerbros.de>.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 29 Jul 2017 11:28:36 +0000 (07:28 -0400)]
media: ddbridge: split code into multiple files
As of 0.9.9b, the ddbridge code has been split from one single file
(ddbridge-core.c) into multiple files, with the purpose of taking care of
different topics, and to be able to reuse code in different kernel modules
(ddbridge.ko and octonet.ko). This applies the same code split, with a
notable difference:
In the vendor package, the split was done by moving all code parts into
separate files, and in the "main" code files (ddbridge.c and octonet.c),
a simple "#include ddbridge-core.c" was done.
In this patch, the same split (codewise) is done, but all resulting .c/.o
files will be handled by the makefile, with proper prototyping of all
shared functions done in ddbridge.h. To avoid conflicts wrt the global
space, the I2C functions and necessary prototypes for ddbridge-i2c.c are
moved into ddbridge-i2c.h, which is to be included wherever required.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 29 Jul 2017 11:28:35 +0000 (07:28 -0400)]
media: ddbridge: move/reorder functions
The functions in ddbridge-core.c have been moved to different positions in
newer versions of the dddvb vendor driver package (most notably in version
0.9.9b). Perform the same code move to keep the diff of the upcoming
code bump simpler.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Mon, 7 Aug 2017 19:02:32 +0000 (15:02 -0400)]
media: vs6624: constify vs6624_default_fmt
The structure vs6624_default_fmt is only copied into another
structure field, so it can be const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Chiranjeevi Rapolu [Fri, 28 Jul 2017 23:21:03 +0000 (19:21 -0400)]
media: ov13858: Increase digital gain granularity, range
Previously, possible digital gains were just 1x, 2x and 4x. These
coarse gains were not sufficient in fine-tuning the image capture.
Now, digital gain range is [0, 16x] with each step 1/1024, default 1x.
This is achieved through OV13858 MWB R/G/B gain controls.
Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Chiranjeevi Rapolu [Sat, 29 Jul 2017 07:00:39 +0000 (03:00 -0400)]
media: ov13858: Correct link-frequency and pixel-rate
Previously both link-frequency and pixel-rate reported by
the sensor was incorrect, resulting in incorrect FPS.
Report link-frequency in Hz rather than link data rate in bps.
Calculate pixel-rate from link-frequency.
Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Chiranjeevi Rapolu [Thu, 27 Jul 2017 07:44:19 +0000 (03:44 -0400)]
media: ov13858: Fix initial expsoure max
Previously, initial exposure max was set incorrectly to (0x7fff - 8).
Now, limit exposure max to current resolution (VTS - 8).
Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Chiranjeevi Rapolu [Thu, 27 Jul 2017 07:28:05 +0000 (03:28 -0400)]
media: ov13858: Set default fps as current fps
On format change, sometimes, sensor was streaming at a much higher
FPS than the default. This was resulting in various problems like
frame drops/corruption.
Upon format change, set default vblank as current vblank. This will
ensure that sensor will start streaming at default fps.
Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Peter Rosin [Mon, 31 Jul 2017 13:38:52 +0000 (09:38 -0400)]
media: cx231xx: only unregister successfully registered i2c adapters
This prevents potentially scary debug messages from the i2c core.
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Tue, 8 Aug 2017 10:58:29 +0000 (06:58 -0400)]
media: staging: media: atomisp: constify video_subdev structures
These structures are both stored in fields of v4l2_subdev_ops
structures, all of which are const, so these structures can be
const as well.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Stephen Brennan [Tue, 25 Jul 2017 06:04:10 +0000 (02:04 -0400)]
media: staging: media: atomisp: remove trailing whitespace
Signed-off-by: Stephen Brennan <stephen@brennan.io>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Rene Hickersberger [Mon, 31 Jul 2017 11:43:15 +0000 (07:43 -0400)]
media: staging: media: atomisp: i2c: gc0310: fixed brace coding style issue
Fixed a brace coding style issue.
Signed-off-by: Rene Hickersberger <renehickersberger@gmx.net>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Fri, 4 Aug 2017 12:09:45 +0000 (08:09 -0400)]
media: staging: media: atomisp: constify videobuf_queue_ops structures
These videobuf_queue_ops structures are only passed as the second
argument to videobuf_queue_vmalloc_init, which is declared as const.
Thus the videobuf_queue_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct videobuf_queue_ops i@p = { ... };
@ok1@
identifier r.i;
expression e1;
position p;
@@
videobuf_queue_vmalloc_init(e1,&i@p,...)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct videobuf_queue_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct videobuf_queue_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Geliang Tang [Mon, 7 Aug 2017 13:44:27 +0000 (09:44 -0400)]
media: staging: media: atomisp: use kvmalloc/kvzalloc
Use kvmalloc()/kvzalloc() instead of atomisp_kernel_malloc()
/atomisp_kernel_zalloc().
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Tue, 8 Aug 2017 14:18:30 +0000 (10:18 -0400)]
media: MAINTAINERS: add entry for meson ao cec driver
Add entry to the MAINTAINERS file for the meson ao cec driver.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Neil Armstrong [Thu, 27 Jul 2017 15:20:29 +0000 (11:20 -0400)]
media: platform: Add Amlogic Meson AO CEC Controller driver
The Amlogic SoC embeds a standalone CEC controller, this patch adds a driver
for such controller.
The controller does not need HPD to be active, and could support up to max
5 logical addresses, but only 1 is handled since the Suspend firmware can
make use of this unique logical address to wake up the device.
The Suspend firmware configuration will be added in an other patchset.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[hans.verkuil@cisco.com:s/if (ret)/if (res)/ to fix obvious typo]
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Neil Armstrong [Thu, 27 Jul 2017 15:20:30 +0000 (11:20 -0400)]
media: dt-bindings: media: Add Amlogic Meson AO-CEC bindings
The Amlogic SoCs embeds a standalone CEC Controller, this patch adds this
device bindings.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Mentz [Thu, 3 Aug 2017 03:42:17 +0000 (23:42 -0400)]
media: v4l2-compat-ioctl32: Fix timespec conversion
Certain syscalls like recvmmsg support 64 bit timespec values for the
X32 ABI. The helper function compat_put_timespec converts a timespec
value to a 32 bit or 64 bit value depending on what ABI is used. The
v4l2 compat layer, however, is not designed to support 64 bit timespec
values and always uses 32 bit values. Hence, compat_put_timespec must
not be used.
Without this patch, user space will be provided with bad timestamp
values from the VIDIOC_DQEVENT ioctl. Also, fields of the struct
v4l2_event32 that come immediately after timestamp get overwritten,
namely the field named id.
Fixes:
81993e81a994 ("compat: Get rid of (get|put)_compat_time(val|spec)")
Cc: stable@vger.kernel.org
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: Tiffany Lin <tiffany.lin@mediatek.com>
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Mentz [Thu, 3 Aug 2017 22:03:10 +0000 (18:03 -0400)]
media: v4l2-compat-ioctl32: Copy v4l2_window->global_alpha
Commit
b2787845fb91 ("V4L/DVB (5289): Add support for video output
overlays.") added the field global_alpha to struct v4l2_window but did
not update the compat layer accordingly. This change adds global_alpha
to struct v4l2_window32 and copies the value for global_alpha back and
forth.
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Dan Carpenter [Fri, 4 Aug 2017 08:07:51 +0000 (04:07 -0400)]
media: adv7604: Prevent out of bounds access
These can only be accessed with CAP_SYS_ADMIN so it's not a critical
security issue. The problem is that "page" is controlled by the user in
the ioctl(). The test to see if the bit is set in state->info->page_mask
is not sufficient because "page" can be very high and shift wrap around
to a bit which is set.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Wed, 2 Aug 2017 14:54:13 +0000 (10:54 -0400)]
media: DaVinci-VPBE: constify vpbe_dev_ops
vpbe_dev_ops is only copied into the ops field at the end of a vpbe_device
structure, so it can be const.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Anton Sviridenko [Wed, 2 Aug 2017 14:17:02 +0000 (10:17 -0400)]
media: solo6x10: export hardware GPIO pins 8:31 to gpiolib interface
24 GPIO pins from 32 available on solo6x10 chips are exported
to gpiolib. First 8 GPIOs are reserved for internal use on capture card
boards, GPIOs in range 8:15 are configured as outputs to control relays,
remaining 16:31 are configured as inputs to read sensor states.
Now with this patch userspace DVR software can switch relays and read
sensor states when GPIO extension cards are attached to Softlogic solo6x10
based video capture cards.
Signed-off-by: Anton Sviridenko <anton@corp.bluecherry.net>
Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Peter Rosin [Mon, 31 Jul 2017 13:38:51 +0000 (09:38 -0400)]
media: cx231xx: drop return value of cx231xx_i2c_unregister
No one cares anyway.
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Peter Rosin [Mon, 31 Jul 2017 13:38:50 +0000 (09:38 -0400)]
media: cx231xx: fail probe if i2c_add_adapter fails
While at it, change the type of the previously always-zero i2c_rc
member to int, matching the returned type from i2c_add_adapter.
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Wed, 2 Aug 2017 17:14:57 +0000 (13:14 -0400)]
media: saa7146: hexium_gemini: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <media/drv-intf/saa7146.h>
and <linux/pci.h> work with const pci_device_id. So mark the non-const
structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Wed, 2 Aug 2017 17:14:56 +0000 (13:14 -0400)]
media: saa7146: hexium_orion: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <media/drv-intf/saa7146.h>
and <linux/pci.h> work with const pci_device_id. So mark the non-const
structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Wed, 2 Aug 2017 17:14:55 +0000 (13:14 -0400)]
media: saa7146: mxb: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <media/drv-intf/saa7146.h>
and <linux/pci.h> work with const pci_device_id. So mark the non-const
structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Wed, 2 Aug 2017 17:14:54 +0000 (13:14 -0400)]
media: ttpci: av7110: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <media/drv-intf/saa7146.h>
and <linux/pci.h> work with const pci_device_id. So mark the non-const
structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Wed, 2 Aug 2017 17:14:53 +0000 (13:14 -0400)]
media: ttpci: budget-av: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <media/drv-intf/saa7146.h>
and <linux/pci.h> work with const pci_device_id. So mark the non-const
structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Wed, 2 Aug 2017 17:14:52 +0000 (13:14 -0400)]
media: ttpci: budget-ci: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <media/drv-intf/saa7146.h>
and <linux/pci.h> work with const pci_device_id. So mark the non-const
structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Wed, 2 Aug 2017 17:14:51 +0000 (13:14 -0400)]
media: ttpci: budget-patch: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <media/drv-intf/saa7146.h>
and <linux/pci.h> work with const pci_device_id. So mark the non-const
structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Wed, 2 Aug 2017 17:14:50 +0000 (13:14 -0400)]
media: ttpci: budget: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <media/drv-intf/saa7146.h>
and <linux/pci.h> work with const pci_device_id. So mark the non-const
structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Wed, 2 Aug 2017 17:14:49 +0000 (13:14 -0400)]
media: drv-intf: saa7146: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
So making 'pci_tbl' as const member of 'struct saa7146_extension'.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:34 +0000 (13:56 -0400)]
media: radio: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:33 +0000 (13:56 -0400)]
media: cx18: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:32 +0000 (13:56 -0400)]
media: mantis: hopper_cards: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:31 +0000 (13:56 -0400)]
media: mantis: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:30 +0000 (13:56 -0400)]
media: pt1: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:29 +0000 (13:56 -0400)]
media: saa7164: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:28 +0000 (13:56 -0400)]
media: b2c2: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:27 +0000 (13:56 -0400)]
media: cobalt: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:26 +0000 (13:56 -0400)]
media: ivtv: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:25 +0000 (13:56 -0400)]
media: bt8xx: bttv: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:24 +0000 (13:56 -0400)]
media: bt8xx: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:23 +0000 (13:56 -0400)]
media: zoran: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:22 +0000 (13:56 -0400)]
media: dm1105: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:21 +0000 (13:56 -0400)]
media: pluto2: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:20 +0000 (13:56 -0400)]
media: meye: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 1 Aug 2017 17:56:19 +0000 (13:56 -0400)]
media: cx23885: constify pci_device_id
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>