summaryrefslogtreecommitdiffstats
path: root/drivers/media
Commit message (Collapse)AuthorAgeFilesLines
* media: rc/keymaps: add support for RC of hisilicon TV demo boardsYounian Wang2017-10-272-0/+82
| | | | | | | | | | This is a NEC protocol type remote controller distributed with hisilicon TV demo boards. Signed-off-by: Younian Wang <wangyounian@hisilicon.com> Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: serial_ir: Convert timers to use timer_setup()Kees Cook2017-10-271-3/+2
| | | | | | | | | | | In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: imon: Fix null-ptr-deref in imon_probeArvind Yadav2017-10-271-0/+5
| | | | | | | | | | It seems that the return value of usb_ifnum_to_if() can be NULL and needs to be checked. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Tested-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: tc358743: validate lane countPhilipp Zabel2017-10-271-0/+5
| | | | | | | | | The TC358743 does not support more than 4 data lanes. Check that the lane count is valid. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: i2c: OV5647: change to use macro for the registersJacob Chen2017-10-271-16/+26
| | | | | | | | | | ref docuemnt: ov5647-datasheet-v1.00-2009 Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com> Reviewed-by: Luis Oliveira <lolivei@synopsys.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: i2c: OV5647: ensure clock lane in LP-11 state before streaming onJacob Chen2017-10-271-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | When I was supporting Rpi Camera Module on the ASUS Tinker board, I found this driver have some issues with rockchip's mipi-csi driver. It didn't place clock lane in LP-11 state before performing D-PHY initialisation. >From our experience, on some OV sensors, LP-11 state is not achieved while BIT(5)-0x4800 is cleared. So let's set BIT(5) and BIT(0) both while not streaming, in order to coax the clock lane into LP-11 state. 0x4800 : MIPI CTRL 00 BIT(5) : clock lane gate enable 0: continuous 1: none-continuous BIT(0) : manually set clock lane 0: Not used 1: used Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com> Reviewed-by: Luis Oliveira <lolivei@synopsys.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: ov7670: Add the ov7670_s_power functionWenyou Yang2017-10-271-5/+26
| | | | | | | | | | | Add the ov7670_s_power function which is responsible for manipulating the power dowm mode through the PWDN pin and the reset operation through the RESET pin, and keep it powered at all times. [sakari.ailus@linux.intel.com: set pwdn_gpio direction only once] Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: ov7670: Add the get_fmt callbackWenyou Yang2017-10-271-1/+76
| | | | | | | | | Add the get_fmt callback, also enable V4L2_SUBDEV_FL_HAS_DEVNODE flag to make this subdev has device node. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: ov7670: Add entity pads initializationWenyou Yang2017-10-271-1/+20
| | | | | | | | Add the media entity pads initialization. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: tegra-cec: add Tegra HDMI CEC driverHans Verkuil2017-10-275-0/+642
| | | | | | | | | | | | | | | | | | | | | | | | This driver adds support for the Tegra CEC IP. It is based on the NVIDIA drivers/misc/tegra-cec driver in their 3.10 kernel. This has been converted to the CEC framework and cleaned up. Tested with my Jetson TK1 board. It has also been tested with the Tegra X1 in an embedded product. Note of warning for the Tegra X2: this SoC supports two HDMI outputs, but only one CEC adapter and the CEC bus is shared between the two outputs. This is a design mistake and the CEC adapter can control only one HDMI output. Never hook up both HDMI outputs to the CEC bus in a hardware design: this is illegal as per the CEC specification. The CEC bus can be shared between multiple inputs and zero or one outputs, but not between multiple outputs. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: imx274: V4l2 driver for Sony imx274 CMOS sensorLeon Luo2017-10-273-0/+1820
| | | | | | | | | | | | | | | | | | | | | | | | The imx274 is a Sony CMOS image sensor that has 1/2.5 image size. It supports up to 3840x2160 (4K) 60fps, 1080p 120fps. The interface is 4-lane MIPI CSI-2 running at 1.44Gbps each. This driver has been tested on Xilinx ZCU102 platform with a Leopard LI-IMX274MIPI-FMC camera board. Support for the following features: -Resolutions: 3840x2160, 1920x1080, 1280x720 -Frame rate: 3840x2160 : 5 – 60fps 1920x1080 : 5 – 120fps 1280x720 : 5 – 120fps -Exposure time: 16 – (frame interval) micro-seconds -Gain: 1x - 180x -VFLIP: enable/disabledrivers/media/i2c/imx274.c -Test pattern: 12 test patterns Signed-off-by: Leon Luo <leonl@leopardimaging.com> Tested-by: Sören Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: tc358743: set entity function to video interface bridgePhilipp Zabel2017-10-271-0/+1
| | | | | | | | The TC358743 is an HDMI to MIPI CSI2-2 bridge. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: tc358743: remove an unneeded conditionDan Carpenter2017-10-271-1/+1
| | | | | | | | | | We can remove the check for if "state->cec_adap" is NULL. The cec_allocate_adapter() function never returns NULL and also we verified that "state->cec_adap" is an error pointer. 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@osg.samsung.com>
* media: au0828/em28xx: make vb2_ops constBhumika Goyal2017-10-274-4/+4
| | | | | | | | | | | Make vb2_ops const as they are only stored in the const field of a vb2_queue structure. Make the declarations const too. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: cx23885/saa7134: make vb2_ops constBhumika Goyal2017-10-274-4/+4
| | | | | | | | | | | Make vb2_ops const as they are only stored in the const field of a vb2_queue structure. Make the declarations const too. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: zoran: make zoran_template constBhumika Goyal2017-10-272-2/+2
| | | | | | | | | | | Make this const as it is only used in a copy operation in the file referencing it. Make the declaration const too. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: bt8xx: make bttv_vbi_qops constBhumika Goyal2017-10-272-2/+2
| | | | | | | | | | | | Make this const as it is only passed to the const argument of the function videobuf_queue_sg_init in the file referencing it. Also, make the declaration in the header const. Structure found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: coda: Handle return value of kasprintfArvind Yadav2017-10-271-0/+4
| | | | | | | | | kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: i2c: tc358743: fix spelling mistakeJacob Chen2017-10-271-1/+1
| | | | | | | | It should be "LP-11". Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: tm6000: cleanup trival coding style issuesMarkus Elfring2017-10-274-34/+23
| | | | | | | | | | | | | | - Delete seven error messages for a failed memory allocation - Adjust seven checks for null pointers - Use common error handling code in tm6000_usb_probe() - Adjust jump targets so that the function "kfree" will be always called with a non-null pointer. - Delete an initialisation for the local variable "dev" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: cec-pin.h: move non-kAPI parts into cec-pin-priv.hHans Verkuil2017-10-273-0/+135
| | | | | | | | | | | The kAPI cec-pin.h header also defined data structures that did not belong here but were private to the CEC core code. Split that part off into a cec-pin-priv.h header. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: venus: reimplement decoder stop commandStanimir Varbanov2017-10-274-20/+24
| | | | | | | | | | | | | | | | | This addresses the wrong behavior of decoder stop command by rewriting it. These new implementation enqueue an empty buffer on the decoder input buffer queue to signal end-of-stream. The client should stop queuing buffers on the V4L2 Output queue and continue queuing/dequeuing buffers on Capture queue. This process will continue until the client receives a buffer with V4L2_BUF_FLAG_LAST flag raised, which means that this is last decoded buffer with data. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v4.13 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: vimc: Fix return value check in vimc_add_subdevs()Wei Yongjun2017-10-271-2/+3
| | | | | | | | | | | In case of error, the function platform_device_register_data() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: venus: venc: fix bytesused v4l2_plane fieldStanimir Varbanov2017-10-271-4/+3
| | | | | | | | | | | This fixes wrongly filled bytesused field of v4l2_plane structure by include data_offset in the plane, Also fill data_offset and bytesused for capture type of buffers only. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v4.13 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: atmel-isc: Rework the format listWenyou Yang2017-10-271-119/+411
| | | | | | | | | | | | | | To improve the readability of code, split the format array into two, one for the format description, other for the register configuration. Meanwhile, add the flag member to indicate the format can be achieved from the sensor or be produced by the controller, and rename members related to the register configuration. Also add more formats support: GREY, ARGB444, ARGB555 and ARGB32. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: atmel-isc: Remove unnecessary memberWenyou Yang2017-10-271-8/+2
| | | | | | | | | Remove the memeber *config from the isc_subdev_entity struct, the member is useless afterward. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: atmel-isc: Enable the clocks during probeWenyou Yang2017-10-271-4/+30
| | | | | | | | | | | To meet the relationship, enable the HCLOCK and ispck during the device probe, "isc_pck frequency is less than or equal to isc_ispck, and isc_ispck is greater than or equal to HCLOCK." Meanwhile, call the pm_runtime_enable() in the right place. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: atmel-isc: Add prepare and unprepare opsWenyou Yang2017-10-272-0/+41
| | | | | | | | | | | | A software write operation to the ISC_CLKEN or ISC_CLKDIS register requires double clock domain synchronization and is not permitted when the ISC_SR.SIP is asserted. So add the .prepare and .unprepare ops to make sure the ISC_CLKSR.SIP is unasserted before the write operation to the ISC_CLKEN or ISC_CLKDIS register. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: atmel-isc: Add spin lock for clock enable opsWenyou Yang2017-10-271-1/+14
| | | | | | | | Add the spin lock for the clock enable and disable operations. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: venus: fix wrong size on dma_freeStanimir Varbanov2017-10-241-8/+4
| | | | | | | | | | This change will fix an issue with dma_free size found with DMA API debug enabled. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v4.13 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: smiapp: Rely on runtime PMSakari Ailus2017-10-243-65/+40
| | | | | | | | | | | | | | | | | | Instead of relying on a mix of runtime PM and the s_power() callback, drop the s_power() callback altogether and use runtime PM solely. As device access is required during device power-on and power-off sequences, runtime PM alone cannot tell whether the device is available. Thus the "active" field is introduced in struct smiapp_sensor to tell whether it is safe to write to the device. Consequently there is no need to power on the device whenever a file handle is open. This functionality is removed as well. The user may still control the device power management through sysfs. Autosuspend remains enabled, with 1 s delay. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: smiapp: Use __v4l2_ctrl_handler_setup()Sakari Ailus2017-10-241-8/+12
| | | | | | | | Use unlocked __v4l2_ctrl_handler_setup() in order to make the control setup atomic. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* Merge commit '3728e6a255b5' into patchworkMauro Carvalho Chehab2017-10-173-6/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3728e6a255b5': (904 commits) Linux 4.14-rc5 x86/microcode: Do the family check first locking/lockdep: Disable cross-release features for now x86/mm: Flush more aggressively in lazy TLB mode mm, swap: use page-cluster as max window of VMA based swap readahead mm: page_vma_mapped: ensure pmd is loaded with READ_ONCE outside of lock kmemleak: clear stale pointers from task stacks fs/binfmt_misc.c: node could be NULL when evicting inode fs/mpage.c: fix mpage_writepage() for pages with buffers linux/kernel.h: add/correct kernel-doc notation tty: fall back to N_NULL if switching to N_TTY fails during hangup Revert "vmalloc: back off when the current task is killed" mm/cma.c: take __GFP_NOWARN into account in cma_alloc() scripts/kallsyms.c: ignore symbol type 'n' userfaultfd: selftest: exercise -EEXIST only in background transfer mm: only display online cpus of the numa node mm: remove unnecessary WARN_ONCE in page_vma_mapped_walk(). mm/mempolicy: fix NUMA_INTERLEAVE_HIT counter include/linux/of.h: provide of_n_{addr,size}_cells wrappers for !CONFIG_OF mm/madvise.c: add description for MADV_WIPEONFORK and MADV_KEEPONFORK ...
| * Merge tag 'media/v4.14-2' of ↵Linus Torvalds2017-10-1711-39/+151
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Core fixes: - cec: Respond to unregistered initiators, when applicable - dvb_frontend: only use kref after initialized Driver-specific fixes: - qcom, camss: Make function vfe_set_selection static - qcom: VIDEO_QCOM_CAMSS should depend on HAS_DMA - s5p-cec: add NACK detection support - media: staging/imx: Fix uninitialized variable warning - dib3000mc: i2c transfers over usb cannot be done from stack - venus: init registered list on streamoff" * tag 'media/v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: dvb_frontend: only use kref after initialized media: platform: VIDEO_QCOM_CAMSS should depend on HAS_DMA media: cec: Respond to unregistered initiators, when applicable media: s5p-cec: add NACK detection support media: staging/imx: Fix uninitialized variable warning media: qcom: camss: Make function vfe_set_selection static media: venus: init registered list on streamoff media: dvb: i2c transfers over usb cannot be done from stack
| | * media: dvb_frontend: only use kref after initializedMauro Carvalho Chehab2017-10-111-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by Laurent, when a DVB frontend need to register two drivers (e. g. a tuner and a demod), if the second driver fails to register (for example because it was not compiled), the error handling logic frees the frontend by calling dvb_frontend_detach(). That used to work fine, but changeset 1f862a68df24 ("[media] dvb_frontend: move kref to struct dvb_frontend") added a kref at struct dvb_frontend. So, now, instead of just freeing the data, the error handling do a kref_put(). That works fine only after dvb_register_frontend() succeeds. While it would be possible to add a helper function that would be initializing earlier the kref, that would require changing every single DVB frontend on non-trivial ways, and would make frontends different than other drivers. So, instead of doing that, let's focus on the real issue: only call kref_put() after kref_init(). That's easy to check, as, when the dvb frontend is successfuly registered, it will allocate its own private struct. So, if such struct is allocated, it means that it is safe to use kref_put(). If not, then nobody is using yet the frontend, and it is safe to just deallocate it. Fixes: 1f862a68df24 ("[media] dvb_frontend: move kref to struct dvb_frontend") Reported-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
| | * media: platform: VIDEO_QCOM_CAMSS should depend on HAS_DMAGeert Uytterhoeven2017-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If NO_DMA=y: warning: (TOUCHSCREEN_SUR40 && VIDEO_TW68 && VIDEO_CX23885 && VIDEO_CX25821 && VIDEO_CX88 && VIDEO_SAA7134 && VIDEO_COBALT && VIDEO_QCOM_CAMSS) selects VIDEOBUF2_DMA_SG which has unmet direct dependencies (MEDIA_SUPPORT && HAS_DMA) and ERROR: "bad_dma_ops" [drivers/media/v4l2-core/videobuf2-dma-sg.ko] undefined! ERROR: "bad_dma_ops" [drivers/media/platform/qcom/camss-8x16/qcom-camss.ko] undefined! VIDEO_QCOM_CAMSS selects VIDEOBUF2_DMA_SG, which bypasses its dependency on HAS_DMA. Make VIDEO_QCOM_CAMSS depend on HAS_DMA to fix this. Fixes: f5c074947f56533c ("media: camss: Enable building") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
| * | Update James Hogan's email addressJames Hogan2017-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update my imgtec.com and personal email address to my kernel.org one in a few places as MIPS will soon no longer be part of Imagination Technologies, and add mappings in .mailcap so get_maintainer.pl reports the right address. Signed-off-by: James Hogan <jhogan@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | media: s5p-mfc: Adjust a null pointer check in four functionsMarkus Elfring2017-10-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written... Thus fix the affected source code places. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | | media: s5p-mfc: Improve a size determination in s5p_mfc_alloc_memdev()Markus Elfring2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | | media: s5p-mfc: Delete an error message for a failed memory allocationMarkus Elfring2017-10-161-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Omit an extra message for a memory allocation failure in s5p_mfc_probe() function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | | media: exynos-gsc: Add hardware rotation limitsHoegeun Kwon2017-10-161-5/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hardware rotation limits of gsc depends on SOC (Exynos 5250/5420/5433). Distinguish them and add them to the driver data. [s.nawrocki@samsung.com: corrected num_entities in 5420 variant data] Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | | media: rga: make some functions staticMauro Carvalho Chehab2017-10-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/media/platform/rockchip/rga/rga-hw.c:383:6: warning: no previous prototype for 'rga_cmd_set' [-Wmissing-prototypes] void rga_cmd_set(struct rga_ctx *ctx) ^~~~~~~~~~~ drivers/media/platform/rockchip/rga/rga.c:359:17: warning: no previous prototype for 'rga_fmt_find' [-Wmissing-prototypes] struct rga_fmt *rga_fmt_find(struct v4l2_format *f) ^~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | | [media] rockchip/rga: v4l2 m2m supportJacob Chen2017-10-168-0/+2169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rockchip RGA is a separate 2D raster graphic acceleration unit. It accelerates 2D graphics operations, such as point/line drawing, image scaling, rotation, BitBLT, alpha blending and image blur/sharpness The driver supports various operations from the rendering pipeline. - copy - fast solid color fill - rotation - flip - alpha blending The code in rga-hw.c is used to configure regs according to operations The code in rga-buf.c is used to create private mmu table for RGA. Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | | Simplify major/minor non-dynamic logicMauro Carvalho Chehab2017-10-111-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changeset 6bbf7a855d20 ("media: dvbdev: convert DVB device types into an enum") added a new warning on gcc 6: >> drivers/media/dvb-core/dvbdev.c:86:1: warning: control reaches end of non-void function [-Wreturn-type] That's because gcc is not smart enough to see that all types are present at the switch. Also, the current code is not too optimized. So, replace it to a more optimized one, based on a static table. Reported-by: kbuild test robot <fengguang.wu@intel.com> Fixes: 6bbf7a855d20 ("media: dvbdev: convert DVB device types into an enum") Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | | media: dvb: do some coding style cleanupMauro Carvalho Chehab2017-10-112-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bunch of coding style issues found by checkpatch on the part of the code that the previous patches touched. WARNING: please, no space before tabs + * ^I^Icallback.$ ERROR: space required before the open parenthesis '(' + switch(cmd) { WARNING: line over 80 characters + err = dtv_property_process_get(fe, &getp, tvp + i, file); WARNING: line over 80 characters + err = fe->ops.diseqc_recv_slave_reply(fe, (struct dvb_diseqc_slave_reply*) parg); ERROR: "(foo*)" should be "(foo *)" + err = fe->ops.diseqc_recv_slave_reply(fe, (struct dvb_diseqc_slave_reply*) parg); WARNING: line over 80 characters + err = fe->ops.read_signal_strength(fe, (__u16 *) parg); Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | | media: dvb-net.rst: document DVB network kAPI interfaceMauro Carvalho Chehab2017-10-111-2/+32
| | | | | | | | | | | | | | | | | | That's the last DVB kAPI that misses documentation. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | | media: dmxdev.h: add kernel-doc markups for data types and functionsMauro Carvalho Chehab2017-10-111-2/+88
| | | | | | | | | | | | | | | | | | | | | | | | Despite being used by DVB drivers, this header was not documented. Document it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | | media: dvb_demux.h: document functionsMauro Carvalho Chehab2017-10-111-3/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | The functions used on dvb_demux.h are largely used on DVB drivers. Yet, none of them are documented. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | | media: dvb_demux.h: document structs defined on itMauro Carvalho Chehab2017-10-112-10/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are three structs defined inside dvb_demux.h. None of them are currently documented. Add documentation for them. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | | media: dvb_frontend: get rid of dtv_get_property_dump()Mauro Carvalho Chehab2017-10-111-31/+12
| | | | | | | | | | | | | | | | | | | | | Simplify the get property handling and move it to the existing code at dtv_property_process_get() directly. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
OpenPOWER on IntegriCloud