Kuninori Morimoto [Thu, 26 Jul 2018 02:37:11 +0000 (22:37 -0400)]
media: sh_mobile_ceu: convert to SPDX identifiers
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kuninori Morimoto [Thu, 26 Jul 2018 02:36:55 +0000 (22:36 -0400)]
media: sh_vou: convert to SPDX identifiers
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kuninori Morimoto [Thu, 26 Jul 2018 02:36:36 +0000 (22:36 -0400)]
media: sh_veu: convert to SPDX identifiers
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kuninori Morimoto [Thu, 26 Jul 2018 02:36:21 +0000 (22:36 -0400)]
media: rcar_jpu: convert to SPDX identifiers
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kuninori Morimoto [Thu, 26 Jul 2018 02:36:04 +0000 (22:36 -0400)]
media: rcar_fdp1: convert to SPDX identifiers
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kuninori Morimoto [Thu, 26 Jul 2018 02:35:49 +0000 (22:35 -0400)]
media: rcar_drif: convert to SPDX identifiers
As original license mentioned, it is GPL-2.0+ in SPDX.
Then, MODULE_LICENSE() should be "GPL" instead of "GPL v2".
See ${LINUX}/include/linux/module.h
"GPL" [GNU Public License v2 or later]
"GPL v2" [GNU Public License v2]
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kuninori Morimoto [Thu, 26 Jul 2018 02:35:23 +0000 (22:35 -0400)]
media: rcar-fcp: convert to SPDX identifiers
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kuninori Morimoto [Thu, 26 Jul 2018 02:35:06 +0000 (22:35 -0400)]
media: rcar-vin: convert to SPDX identifiers
Kconfig and Makefile doesn't have license line, thus,
these are GPL-2.0 as default.
All ohter files are GPL-2.0+ as original license.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kuninori Morimoto [Thu, 26 Jul 2018 02:34:42 +0000 (22:34 -0400)]
media: soc_camera_platform: convert to SPDX identifiers
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kieran Bingham [Fri, 3 Aug 2018 11:37:29 +0000 (07:37 -0400)]
media: vsp1: Support Interlaced display pipelines
Calculate the top and bottom fields for the interlaced frames and
utilise the extended display list command feature to implement the
auto-field operations. This allows the DU to update the VSP2 registers
dynamically based upon the currently processing field.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kieran Bingham [Fri, 3 Aug 2018 11:37:28 +0000 (07:37 -0400)]
media: vsp1: Provide support for extended command pools
VSPD and VSP-DL devices can provide extended display lists supporting
extended command display list objects.
These extended commands require their own dma memory areas for a header
and body specific to the command type.
Implement a command pool to allocate all necessary memory in a single
DMA allocation to reduce pressure on the TLB, and provide convenient
re-usable command objects for the entities to utilise.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kieran Bingham [Fri, 3 Aug 2018 11:37:27 +0000 (07:37 -0400)]
media: vsp1: Add support for extended display list headers
Extended display list headers allow pre and post command lists to be
executed by the VSP pipeline. This provides the base support for
features such as AUTO_FLD (for interlaced support) and AUTO_DISP (for
supporting continuous camera preview pipelines.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kieran Bingham [Fri, 3 Aug 2018 11:37:26 +0000 (07:37 -0400)]
media: vsp1: Use header display lists for all WPF outputs linked to the DU
Header mode display lists are now supported on all WPF outputs. To
support extended headers and auto-fld capabilities for interlaced mode
handling only header mode display lists can be used.
Disable the headerless display list configuration, and remove the dead
code.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kieran Bingham [Fri, 3 Aug 2018 11:37:25 +0000 (07:37 -0400)]
media: vsp1: Provide VSP1 feature helper macro
The VSP1 devices define their specific capabilities through features
marked in their device info structure. Various parts of the code read
this info structure to infer if the features are available.
Wrap this into a more readable vsp1_feature(vsp1, f) macro to ensure
that usage is consistent throughout the driver.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kieran Bingham [Fri, 3 Aug 2018 11:37:24 +0000 (07:37 -0400)]
media: vsp1: Clean up DLM objects on error
If there is an error allocating a display list within a DLM object
the existing display lists are not free'd, and neither is the DL body
pool.
Use the existing vsp1_dlm_destroy() function to clean up on error.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kieran Bingham [Fri, 3 Aug 2018 11:37:23 +0000 (07:37 -0400)]
media: vsp1: Remove unused display list structure field
The vsp1 reference in the vsp1_dl_body structure is not used.
Remove it.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kieran Bingham [Fri, 3 Aug 2018 11:37:22 +0000 (07:37 -0400)]
media: vsp1: Rename dl_child to dl_next
Both vsp1_dl_list_commit() and __vsp1_dl_list_put() walk the display
list chain referencing the nodes as children, when in reality they are
siblings.
Update the terminology to 'dl_next' to be consistent with the
vsp1_video_pipeline_run() usage.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kieran Bingham [Fri, 3 Aug 2018 11:37:21 +0000 (07:37 -0400)]
media: vsp1: use kernel __packed for structures
The kernel provides a __packed definition to abstract away from the
compiler specific attributes tag.
Convert all packed structures in VSP1 to use it.
The GCC documentation [0] describes this attribute as "the structure or
union is placed to minimize the memory required".
The Keil compiler documentation at [1] warns that the use of this
attribute can cause a performance penalty in the event that the compiler
can not deduce the allignment of each field.
Careful examination of the object code generated both with and without
this attribute shows that these structures are accessed identically and
are not affected by any performance penalty. The structures are
correctly aligned and padded to match the needs of the hardware already.
This patch does not serve to make a decision as to the use of the
attribute, but purely to clean up the code to use the kernel defined
abstraction as per [2].
[0] https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-packed-type-attribute
[1] http://www.keil.com/support/man/docs/armcc/armcc_chr1359124230195.htm
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/compiler-gcc.h?h=v4.16-rc5#n92
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Kieran Bingham [Fri, 3 Aug 2018 11:37:20 +0000 (07:37 -0400)]
media: vsp1: drm: Fix minor grammar error
The pixel format is 'unsupported'. Fix the small debug message which
incorrectly declares this.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Jia-Ju Bai [Mon, 30 Jul 2018 09:33:20 +0000 (05:33 -0400)]
media: usb: hackrf: Replace GFP_ATOMIC with GFP_KERNEL
hackrf_submit_urbs(), hackrf_alloc_stream_bufs() and hackrf_alloc_urbs()
are never called in atomic context.
They call usb_submit_urb(), usb_alloc_coherent() and usb_alloc_urb()
with GFP_ATOMIC, which is not necessary.
GFP_ATOMIC can be replaced with GFP_KERNEL.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Jia-Ju Bai [Mon, 30 Jul 2018 09:24:59 +0000 (05:24 -0400)]
media: usb: em28xx: Replace mdelay() with msleep() in em28xx_pre_card_setup()
em28xx_pre_card_setup() is never called in atomic context.
It calls mdelay() to busily wait, which is not necessary.
mdelay() can be replaced with msleep().
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Jia-Ju Bai [Mon, 30 Jul 2018 09:25:07 +0000 (05:25 -0400)]
media: usb: em28xx: Replace GFP_ATOMIC with GFP_KERNEL in em28xx_init_usb_xfer()
em28xx_init_usb_xfer() is never called in atomic context.
It calls usb_submit_urb() with GFP_ATOMIC, which is not necessary.
GFP_ATOMIC can be replaced with GFP_KERNEL.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Anton Vasilyev [Fri, 27 Jul 2018 11:52:20 +0000 (07:52 -0400)]
media: davinci: vpif_display: Mix memory leak on probe error path
If vpif_probe() fails on v4l2_device_register() then memory allocated
at initialize_vpif() for global vpif_obj.dev[i] become unreleased.
The patch adds deallocation of vpif_obj.dev[i] on the error path and
removes duplicated check on platform_data presence.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Anton Vasilyev [Fri, 27 Jul 2018 11:47:59 +0000 (07:47 -0400)]
media: vimc: Remove redundant free
Commit
4a29b7090749 ("[media] vimc: Subdevices as modules") removes
vimc allocation from vimc_probe(), so corresponding deallocation
on the error path tries to free static memory.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Jia-Ju Bai [Fri, 27 Jul 2018 02:52:49 +0000 (22:52 -0400)]
media: dvb-frontends: rtl2832_sdr: Replace GFP_ATOMIC with GFP_KERNEL
rtl2832_sdr_submit_urbs(), rtl2832_sdr_alloc_stream_bufs(), and
rtl2832_sdr_alloc_urbs() are never called in atomic context.
They call usb_submit_urb(), usb_alloc_coherent() and usb_alloc_urb()
with GFP_ATOMIC, which is not necessary.
GFP_ATOMIC can be replaced with GFP_KERNEL.
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
kbuild test robot [Wed, 25 Jul 2018 17:57:00 +0000 (13:57 -0400)]
media: omap2: omapfb: fix bugon.cocci warnings
drivers/video/fbdev/omap2/omapfb/dss/dss_features.c:895:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h)
Use BUG_ON instead of a if condition followed by BUG.
Semantic patch information:
This makes an effort to find cases where BUG() follows an if
condition on an expression and replaces the if condition and BUG()
with a BUG_ON having the conditional expression of the if statement
as argument.
Generated by: scripts/coccinelle/misc/bugon.cocci
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
kbuild test robot [Wed, 25 Jul 2018 17:57:00 +0000 (13:57 -0400)]
media: omap2: omapfb: fix boolreturn.cocci warnings
drivers/video/fbdev/omap2/omapfb/omapfb-main.c:290:9-10: WARNING: return of 0/1 in function 'cmp_var_to_colormode' with return type bool
Return statements in functions returning bool should use
true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
kbuild test robot [Wed, 25 Jul 2018 17:57:00 +0000 (13:57 -0400)]
media: omap2: omapfb: fix ifnullfree.cocci warnings
drivers/video/fbdev/omap2/omapfb/dss/core.c:141:2-26: WARNING: NULL check before some freeing functions is not needed.
NULL check before some freeing functions is not needed.
Based on checkpatch warning
"kfree(NULL) is safe this check is probably not required"
and kfreeaddr.cocci by Julia Lawall.
Generated by: scripts/coccinelle/free/ifnullfree.cocci
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Katsuhiro Suzuki [Mon, 23 Jul 2018 08:51:50 +0000 (04:51 -0400)]
media: dvb-frontends: add Socionext MN88443x ISDB-S/T demodulator driver
This patch adds a frontend driver for the Socionext/Panasonic
MN884434 and MN884433 ISDB-S/T demodulators.
The maximum and minimum frequency of MN88443x comes from
ISDB-S and ISDB-T so frequency range is the following:
- ISDB-S (BS/CS110 IF frequency, Local freq 10.678GHz)
- Min: BS-1: 1032MHz
- Max: ND24: 2070MHz
- ISDB-T
- Min: ch13: 470MHz
- Max: ch62: 770MHz
Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Anton Vasilyev [Wed, 18 Jul 2018 14:13:56 +0000 (10:13 -0400)]
media: dm1105: Limit number of cards to avoid buffer over read
dm1105_probe() counts number of cards at dm1105_devcount,
but missed bounds check before dereference a card array.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Katsuhiro Suzuki [Wed, 18 Jul 2018 01:06:42 +0000 (21:06 -0400)]
media: helene: add I2C device probe function
This patch adds I2C probe function to use dvb_module_probe() with
this driver. And also support multiple delivery systems at the
same device.
Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Anton Vasilyev [Mon, 23 Jul 2018 17:04:54 +0000 (13:04 -0400)]
media: dw2102: Fix memleak on sequence of probes
Each call to dw2102_probe() allocates memory by kmemdup for structures
p1100, s660, p7500 and s421, but there is no their deallocation.
dvb_usb_device_init() copies the corresponding structure into
dvb_usb_device->props, so there is no use of original structure after
dvb_usb_device_init().
The patch moves structures from global scope to local and adds their
deallocation.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Arnd Bergmann [Mon, 9 Jul 2018 15:19:02 +0000 (11:19 -0400)]
media: headers: fix linux/mod_devicetable.h inclusions
A couple of drivers produced build errors after the mod_devicetable.h
header was split out from the platform_device one, e.g.
drivers/media/platform/davinci/vpbe_osd.c:42:40: error: array type has incomplete element type 'struct platform_device_id'
drivers/media/platform/davinci/vpbe_venc.c:42:40: error: array type has incomplete element type 'struct platform_device_id'
This adds the inclusion where needed.
Fixes:
ac3167257b9f ("headers: separate linux/mod_devicetable.h from linux/platform_device.h")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mauro Carvalho Chehab [Thu, 5 Jul 2018 22:59:37 +0000 (18:59 -0400)]
media: dvb_frontend: ensure that the step is ok for both FE and tuner
The frequency step should take into account the tuner step,
as, if tuner step is bigger than frontend step, the zigzag
algorithm won't be doing the right thing, as it will be
tuning multiple times at the same frequency.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mauro Carvalho Chehab [Thu, 5 Jul 2018 22:59:36 +0000 (18:59 -0400)]
media: dvb: represent min/max/step/tolerance freqs in Hz
Right now, satellite frontend drivers specify frequencies in kHz,
while terrestrial/cable ones specify in Hz. That's confusing
for developers.
However, the main problem is that universal frontends capable
of handling both satellite and non-satelite delivery systems
are appearing. We end by needing to hack the drivers in
order to support such hybrid frontends.
So, convert everything to specify frontend frequencies in Hz.
Tested-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mauro Carvalho Chehab [Thu, 5 Jul 2018 22:59:35 +0000 (18:59 -0400)]
media: dvb: convert tuner_info frequencies to Hz
Right now, satellite tuner drivers specify frequencies in kHz,
while terrestrial/cable ones specify in Hz. That's confusing
for developers.
However, the main problem is that universal tuners capable
of handling both satellite and non-satelite delivery systems
are appearing. We end by needing to hack the drivers in
order to support such hybrid tuners.
So, convert everything to specify tuner frequencies in Hz.
Plese notice that a similar patch is also needed for frontends.
Tested-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Acked-by: Michael Büsch <m@bues.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Dan Carpenter [Wed, 4 Jul 2018 09:48:35 +0000 (05:48 -0400)]
media: dvb_ca_en50221: off by one in dvb_ca_en50221_io_do_ioctl()
The > should be >= so we don't read one element beyond the end of the
ca->slot_info[] array. The array is allocated in dvb_ca_en50221_init().
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jasmin Jessich <jasmin@anw.at>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Sebastian Andrzej Siewior [Tue, 10 Jul 2018 16:18:33 +0000 (12:18 -0400)]
media: usbtv: use irqsave() in USB's complete callback
The USB completion callback does not disable interrupts while acquiring
the lock. We want to remove the local_irq_disable() invocation from
__usb_hcd_giveback_urb() and therefore it is required for the callback
handler to disable the interrupts while acquiring the lock.
The callback may be invoked either in IRQ or BH context depending on the
USB host controller.
Use the _irqsave() variant of the locking primitives.
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Sebastian Andrzej Siewior [Tue, 10 Jul 2018 16:18:31 +0000 (12:18 -0400)]
media: go7007: use irqsave() in USB's complete callback
The USB completion callback does not disable interrupts while acquiring
the lock. We want to remove the local_irq_disable() invocation from
__usb_hcd_giveback_urb() and therefore it is required for the callback
handler to disable the interrupts while acquiring the lock.
The callback may be invoked either in IRQ or BH context depending on the
USB host controller.
Use the _irqsave() variant of the locking primitives.
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Sebastian Andrzej Siewior [Tue, 10 Jul 2018 16:18:29 +0000 (12:18 -0400)]
media: cx231xx: use irqsave() in USB's complete callback
The USB completion callback does not disable interrupts while acquiring
the lock. We want to remove the local_irq_disable() invocation from
__usb_hcd_giveback_urb() and therefore it is required for the callback
handler to disable the interrupts while acquiring the lock.
The callback may be invoked either in IRQ or BH context depending on the
USB host controller.
Use the _irqsave() variant of the locking primitives.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:43 +0000 (12:38 -0400)]
media: camss: csid: Add support for events triggered by user controls
Changing a user control value can trigger an event to other
users. Add support for that.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:42 +0000 (12:38 -0400)]
media: doc: media/v4l-drivers: Update Qualcomm CAMSS driver document for 8x96
Update the document to describe the support of Camera Subsystem
on MSM8996/APQ8096.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:41 +0000 (12:38 -0400)]
media: camss: Add support for 10-bit grayscale formats
Add support for 10-bit packed V4L2_PIX_FMT_Y10P (on 8x16 and 8x96)
and unpacked V4L2_PIX_FMT_Y10 (on 8x96 only) pixel formats.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:40 +0000 (12:38 -0400)]
media: camss: Add support for RAW MIPI14 on 8x96
Add support for RAW MIPI14 format for RDI mode on 8x96.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:39 +0000 (12:38 -0400)]
media: camss: csid: MIPI10 to Plain16 format conversion
Use the PRDI mode on 8x96 to allow to configure RAW MIPI10
to Plain16 format conversion.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:38 +0000 (12:38 -0400)]
media: camss: csid: Different format support on source pad
Usually the format on the source pad is the same as on the sink pad.
However the CSID is able to do some format conversions. To support
this make the format on the source pad selectable amongst a list
of formats. This list can be different for each sink pad format.
This is still not used but will be when the format conversions
are implemented.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:37 +0000 (12:38 -0400)]
media: camss: vfe: Add support for UYVY output from VFE on 8x96
Add support to output UYVY formats from the VFE (via the PIX interface).
A configuration for the realign module in the VFE is added. As the
realign module is present on 8x96 but not on 8x16, this is supported
on 8x96 only.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:36 +0000 (12:38 -0400)]
media: camss: vfe: Different format support on source pad
Rework the format selection on the source pad. Make the format
on the source pad selectable amongst a list of formats. This
list can be different for each sink pad format.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:35 +0000 (12:38 -0400)]
media: camss: Format configuration per hardware version
As the 8x16 and 8x96 support different formats, separate the
arrays which contain the supported formats. For the VFE also
add separate arrays for RDI and PIX subdevices.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:34 +0000 (12:38 -0400)]
media: camss: vfe: Add support for 8x96
Add VFE hardware dependent part for 8x96.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:33 +0000 (12:38 -0400)]
media: camss: vfe: Split to hardware dependent and independent parts
This will allow to add support for different hardware.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:32 +0000 (12:38 -0400)]
media: camss: ispif: Add support for 8x96
ISPIF hardware modules on 8x16 and 8x96 are similar. However on
8x96 the ISPIF routes data to two VFE hardware modules. Add
separate interrupt handler for 8x96 to handle the additional
interrupts.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:31 +0000 (12:38 -0400)]
media: camss: csid: Add support for 8x96
CSID hardware modules on 8x16 and 8x96 are similar. There is no
need to duplicate the code by adding separate versions. Just
update the register macros to return the correct register
addresses.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:30 +0000 (12:38 -0400)]
media: camss: csiphy: Add support for 8x96
Add CSIPHY hardware dependent part for 8x96.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:29 +0000 (12:38 -0400)]
media: camss: csiphy: Unify lane handling
Restructure lane configuration so it is simpler and will allow
similar (although not the same) handling for different hardware
versions.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:28 +0000 (12:38 -0400)]
media: camss: csiphy: Split to hardware dependent and independent parts
This will allow to add support for different hardware.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
[hans.verkuil@cisco.com: remove trailing empty line]
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:27 +0000 (12:38 -0400)]
media: camss: Add basic runtime PM support
There is a PM domain for each of the VFE hardware modules. Add
support for basic runtime PM support to be able to control the
PM domains. When a PM domain needs to be powered on - a device
link is created. When a PM domain needs to be powered off -
its device link is removed. This allows separate and
independent control of the PM domains.
Suspend/Resume is still not supported.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:26 +0000 (12:38 -0400)]
media: camss: Add 8x96 resources
Add structs with 8x96 resources. As the number of CSIPHY, CSID
and VFE hardware modules is different on 8x16 and 8x96 select
the number at runtime and allocate needed structures
dynamically.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:25 +0000 (12:38 -0400)]
media: dt-bindings: media: qcom,camss: Add 8996 bindings
Update binding document for MSM8996.
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: devicetree@vger.kernel.org
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:24 +0000 (12:38 -0400)]
media: dt-bindings: media: qcom,camss: Fix whitespaces
Use tabs.
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: devicetree@vger.kernel.org
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:23 +0000 (12:38 -0400)]
media: camss: vfe: Do not disable CAMIF when clearing its status
Use "no change" value when clearing CAMIF status and make sure
this is done before configuring the new command.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:22 +0000 (12:38 -0400)]
media: camss: vfe: Get line pointer as container of video_out
Simplify getting of the line pointer by using the container_of
macro instead of traversing media controller links.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:21 +0000 (12:38 -0400)]
media: camss: vfe: Fix to_vfe() macro member name
Use the member name which is "line" instead of the pointer argument.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:20 +0000 (12:38 -0400)]
media: camss: csid: Configure data type and decode format properly
The CSID decodes the input data stream. When the input comes from
the Test Generator the format of the stream is set on the source
media pad. When the input comes from the CSIPHY the format is the
one on the sink media pad. Use the proper format for each case.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:19 +0000 (12:38 -0400)]
media: camss: csiphy: Update settle count calculation
Update settle count calculation as per specification.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:18 +0000 (12:38 -0400)]
media: camss: Unify the clock names
Use more logical clock names - similar to the names in documentation.
This will allow better handling of the clocks in the driver when support
for more hardware versions is added - equivalent clocks on different
hardware versions will have the same name.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Tue, 31 Jul 2018 06:19:43 +0000 (02:19 -0400)]
media: dt-bindings: media: qcom, camss: Unify the clock names
Use more logical clock names - similar to the names in documentation.
This will allow better handling of the clocks in the driver when support
for more hardware versions is added - equivalent clocks on different
hardware versions will have the same name.
Note: No dts is using this device (and clock names) yet.
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: devicetree@vger.kernel.org
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:16 +0000 (12:38 -0400)]
media: camss: csiphy: Ensure clock mux config is done before the rest
Add a write memory barier after clock mux config and before the rest
of the csiphy config.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:15 +0000 (12:38 -0400)]
media: camss: Fix OF node usage
of_graph_get_next_endpoint increases the refcount of the returned
node and decreases the refcount of the passed node. Take this into
account and use of_node_put properly.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:14 +0000 (12:38 -0400)]
media: camss: Use SPDX license headers
Use SPDX license headers for all files of the Qualcomm CAMSS driver.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:13 +0000 (12:38 -0400)]
media: Rename CAMSS driver path
Support for camera subsystem on QComm MSM8996/APQ8096 is to be added
so remove hardware version from CAMSS driver's path.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:12 +0000 (12:38 -0400)]
media: v4l: Add new 10-bit packed grayscale format
The new format will be called V4L2_PIX_FMT_Y10P.
It is similar to the V4L2_PIX_FMT_SBGGR10P family formats
but V4L2_PIX_FMT_Y10P is a grayscale format.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Todor Tomov [Wed, 25 Jul 2018 16:38:11 +0000 (12:38 -0400)]
media: v4l: Add new 2X8 10-bit grayscale media bus code
The code will be called MEDIA_BUS_FMT_Y10_2X8_PADHI_LE.
It is similar to MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE
but MEDIA_BUS_FMT_Y10_2X8_PADHI_LE describes grayscale
data.
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Sakari Ailus [Wed, 25 Jul 2018 16:38:10 +0000 (12:38 -0400)]
media: doc-rst: Add packed Bayer raw14 pixel formats
These formats are compressed 14-bit raw bayer formats with four different
pixel orders. They are similar to 10-bit variants. The formats added by
this patch are
V4L2_PIX_FMT_SBGGR14P
V4L2_PIX_FMT_SGBRG14P
V4L2_PIX_FMT_SGRBG14P
V4L2_PIX_FMT_SRGGB14P
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Robert Schlabbach [Mon, 25 Jun 2018 10:33:58 +0000 (06:33 -0400)]
media: em28xx: disable null packet filter for WinTVdualHD
This patch disables the null packet filter for the Hauppauge
WinTV-dualHD. There are applications which require the unfiltered
transport stream (e.g. DOCSIS segment load analyzers).
Tests showed that the device is capable of delivering two unfiltered
EuroDOCSIS 3.0 transport streams simultaneously, i.e. over 100 Mbit/s
worth of data, without any losses.
Signed-off-by: Robert Schlabbach <Robert.Schlabbach@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sun, 24 Jun 2018 13:42:50 +0000 (09:42 -0400)]
media: dvb-frontends/tda18271c2dd: fix handling of DVB-T parameters
Add a break statement in set_params() for the SYS_DVBT(2).
As reported by gcc:
drivers/media/dvb-frontends/tda18271c2dd.c:1144:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
There is a nested switch() inside the code with sets the tuner to
the right standard. Without the break, the code will always set to
DVB-C mode, with can be sub-optimal for DVB-T.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:15 +0000 (11:36 -0400)]
media: ddbridge/mci: add SX8 I/Q mode remark and remove DIAG CMD defines
Take note that the SX8 IQ mode is only available on a single tuner, and
remove the MCI/SX8 DIAG CMD defines.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:14 +0000 (11:36 -0400)]
media: ddbridge/sx8: enable modulation selection in set_parameters()
Allow for tuning to transponders with specific modulations in
set_parameters(). Setting a specific modulation will also enable lower
modulations.
Picked up from the upstream dddvb GIT. Upstream also has support for
APSK64/128/256 modulations which aren't supported yet by the DVB
API, so comment them out until support for them is added.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:13 +0000 (11:36 -0400)]
media: ddbridge/sx8: disable automatic PLS code search
The SX8 cards by default do an automatic search for the PLS code. This
is not necessarily wanted as this can eventually be detected wrong, so
disable this.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:12 +0000 (11:36 -0400)]
media: ddbridge/mci: add more MCI status codes, improve MCI_SUCCESS macro
The MCI can report the command status more finegrained, so, add more
status code defines and update the MCI_SUCCESS macro.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:11 +0000 (11:36 -0400)]
media: ddbridge/mci: split MaxSX8 specific code off to ddbridge-sx8.c
Split off all code specific to the MaxSX8 cards to a separate ddbridge-sx8
module and hook it up in the Makefile. This also adds evaluation of the
mci_type to allow for using different attach handling for different cards.
As different cards can implement things differently (ie. support differing
frontend_ops, and have different base structs being put ontop of the
common mci_base struct), this introduces the mci_cfg struct which is
initially used to hold a few specifics to the -sx8 submodule. While at it,
the handling of the i/q mode is adjusted slightly. Besides this and
handling mci_base and sx8_base struct pointers where needed, all code
is copied unmodified from ddbridge-mci.c.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:10 +0000 (11:36 -0400)]
media: ddbridge/mci: make ddb_mci_cmd() and ddb_mci_config() public
In preparation for splitting all MaxSX8 related code parts from the common
MCI code, prefix both mci_cmd() and mci_config() functions with ddb_,
remove the static marking and add matching function prototypes to
ddbridge-mci.h so these functions can be reused from other files within
the ddbridge driver. As this requires the mci-related structs to be
defined in ddbridge-mci.h, move struct mci and struct mci_base there and
clean them up.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:09 +0000 (11:36 -0400)]
media: ddbridge/mci: store mci type and number of ports in the hwinfo
For better support for future MCI based cards, rename the mci struct
member to mci_ports to carry the number of ports on the cards, and add a
mci_type member to identify the card type to handle differing hardware.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:08 +0000 (11:36 -0400)]
media: ddbridge/mci: extend mci_command and mci_result structs
Recent FPGA firmware reports more data and values in sent command
responses. Adjust the mci_command and mci_result structs including it's
unions to match these changes and add a few comments explaining things.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:07 +0000 (11:36 -0400)]
media: ddbridge/mci: rename defines and fix i/q var types
Adjustments to match the FPGA firmware, and the signal I/Q values are
reported as s16 types from the card firmware.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:06 +0000 (11:36 -0400)]
media: ddbridge/mci: read and report signal strength and SNR
Implement querying signal statistics from the MCI and report this data
in read_status() as DVBv5 statistics.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:05 +0000 (11:36 -0400)]
media: ddbridge/mci: update copyright year in headers
Update the copyright year information in the MCI headers to 2017-2018.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:04 +0000 (11:36 -0400)]
media: ddbridge: change MCI base ID and define a SX8 ID
Change the start of the MCI ID range (internally used only) to 48 and
define an ID for the SX8 card type. Use this new ID to handle device
attachment.
This change is done in preparation for support of more MCI based cards.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:03 +0000 (11:36 -0400)]
media: ddbridge: link structure access cosmetics in ddb_port_probe()
Throughout the function, dev->link[l] is used several times. Unclutter
this a bit by declaring a ddb_link var at the top of the function, assign
the address of dev->link[l] to it and use that var to access the link[]
struct member.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:02 +0000 (11:36 -0400)]
media: ddbridge: remove unused MDIO defines and hwinfo member
ddbridge has a few MDIO related remainders (defines, hwinfo struct) which
aren't of any use for the in-kernel driver at all (they're only used in
conjunction with the OctoNet SAT>IP boxes which the kernel driver doesn't
have any support for), so clean this up.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:01 +0000 (11:36 -0400)]
media: ddbridge: report I2C bus errors
The I2C_COMMAND response reports an error in the I2C bus communication
using bit 17. Evaluate the response more thoroughly and log an error
if an I2C problem was detected.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:36:00 +0000 (11:36 -0400)]
media: ddbridge: evaluate the actual link when setting up the dummy tuner
Devices supporting dummy tuner operation can exist on any link, not only
on link 0, so fix this accordingly.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:35:59 +0000 (11:35 -0400)]
media: ddbridge: probe for LNBH25 chips before attaching
In demod_attach_stv0910(), the LNBH25 IC is being blindly attached and,
if the result is bad, blindly attached on another possible I2C address.
The LNBH25 uses it's set_voltage function to test for the IC and will
print an error to the kernel log on failure. Prevent this by probing
the possible I2C address and use this (and only this) to attach the
LNBH25 I2C driver. This also allows the stv0910 attach function to be
a bit cleaner.
Picked up from the upstream dddvb GIT and adapted for the LNBH25 driver
variant from the kernel tree.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Daniel Scheller [Sat, 23 Jun 2018 15:35:58 +0000 (11:35 -0400)]
media: dvb-frontends/stv0910: cast the BER denominator shift exp to ULL
To avoid miscalculations related to the BER denominator, the shift
expression needs to be casted as ULL.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mauro Carvalho Chehab [Wed, 30 May 2018 15:07:04 +0000 (11:07 -0400)]
media: dvb/audio.h: get rid of unused APIs
There are a number of other ioctls that aren't used anywhere
inside the Kernel tree.
Get rid of them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mauro Carvalho Chehab [Wed, 30 May 2018 15:07:03 +0000 (11:07 -0400)]
media: dvb/video.h: get rid of unused APIs
There are a number of other ioctls that aren't used anywhere
inside the Kernel tree.
Get rid of them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mauro Carvalho Chehab [Wed, 30 May 2018 15:07:05 +0000 (11:07 -0400)]
media: videodev2: get rid of VIDIOC_RESERVED
While this ioctl is there at least since Kernel 2.6.12-rc2, it
was never used by any upstream driver.
Get rid of it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Robert Schlabbach [Sat, 16 Jun 2018 19:04:22 +0000 (15:04 -0400)]
media: em28xx: explicitly disable TS packet filter
The em28xx driver never touched the EM2874 register bits that control
the transport stream packet filters, leaving them at whatever default
the firmware has set. E.g. the Pinnacle 290e disables them by default,
while the Hauppauge WinTV dualHD enables discarding NULL packets by
default.
However, some applications require NULL packets, e.g. to determine the
load in DOCSIS segments, so discarding NULL packets is undesired for
such applications.
This patch simply extends the bit mask when starting or stopping the
transport stream packet capture, so that the filter bits are cleared.
It has been verified that this makes the Hauppauge WinTV dualHD pass
an unfiltered DVB-C stream including NULL packets, which it didn't
before.
Signed-off-by: Robert Schlabbach <Robert.Schlabbach@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Akihiro Tsukada [Sun, 10 Jun 2018 14:59:31 +0000 (10:59 -0400)]
MAINTAINERS: add entries for several media drivers
add entries for the following drivers:
- earth_pt{1,3} DVB adapter drivers
- mxl301rf DVB tuner drivers
- qm1d1{b0004, c0042} DVB tuner drivers
- tc90522 DVB demod driver
Signed-off-by: Akihiro Tsukada <tskd08@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Akihiro Tsukada [Sun, 10 Jun 2018 14:58:02 +0000 (10:58 -0400)]
media: pci/pt1: suppress compiler warning in xtensa arch
Found and reported by kbuild test robot:
Message ID: <
201805052003.MC007f9h%fengguang.wu@intel.com>
and holding an address of an empty struct in .driver.pm does no harm
when CONFIG_PM_SLEEP is not defined.
Signed-off-by: Akihiro Tsukada <tskd08@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>