aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-12-16media: pulse8-cec: locking improvementsHans Verkuil1-21/+26
Drop the write_lock, rename config_lock to plain lock since this now locks access to the adapter. Use 'lock' when transmitting a message, ensuring that nothing interferes with the transmit. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: pulse8-cec: reorganize function orderHans Verkuil1-256/+248
Reorganize the order of the functions in the source, going from low-level to high-level. No functional changes were made. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: pulse8-cec: improve debuggingHans Verkuil1-5/+60
Add and use pulse8_msgname() to show the message codes as a human readable text instead of a number. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: adv7604: extend deep color mode to ADV7611Dragos Bogdan1-11/+21
The AD7611 chip supports the same Deep Color Mode settings as the AD7604. This change extends support for this feature to the AD7611 by adding a wrapper function for the `read_hdmi_pixelclock` hook and adding the same frequency adjustment logic. Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: vimc: Implement get/set selection in sinkGuilherme Alcarde Gallo1-15/+151
Add support for the sink pad of scaler subdevice to respond VIDIOC_G_SELECTION and VIDIOC_S_SELECTION ioctls with the following targets: V4L2_SEL_TGT_COMPOSE_BOUNDS and V4L2_SEL_TGT_CROP. * Add new const struct crop_rect_default to initialize subdev scaler properly. * Make changes in sink pad format reflect to the crop rectangle. E.g. changing the frame format to a smaller size one can make the former crop rectangle selects a non existing frame area. To solve this situation the crop rectangle is clamped to the frame boundaries. * Clamp crop rectangle respecting the sink bounds during set_selection ioctl. Co-developed-by: Danilo Figueiredo Rocha <drocha.figueiredo@gmail.com> Signed-off-by: Guilherme Alcarde Gallo <gagallo7@gmail.com> Signed-off-by: Danilo Figueiredo Rocha <drocha.figueiredo@gmail.com> Acked-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: sun8i: Remove redundant dev_err call in deinterlace_probe()Wei Yongjun1-4/+1
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: mtk-vcodec: Remove extra area allocation in an input buffer on encodingHirokazu Honda1-6/+3
MediaTek encoder allocates non pixel data area for an input buffer every plane. As the input buffer should be read-only, the driver should not write anything in the buffer. Therefore, the extra data should be unnecessary. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: atmel: atmel-isi: initialize the try_crop for the pads in try_fmtEugen Hristev1-0/+27
When requesting format from sensor, some sensors call the subdev_get_try_crop which for ISI was not properly initialized, and this causes errors in determining proper image resolutions. To accommodate for this, when trying a format (in try_fmt), first attempt to obtain the framesize for this format from sensor. In case this fails, use the maximum ISI width/height as try_crop, otherwise provide the first size height/width from the sensor. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: atmel: atmel-isi: properly initialize pad_cfgEugen Hristev1-1/+1
In try_fmt, properly initialize the pad_cfg variable to zeros. This can be used by various calls from the subdev, so it's better to have it initialized. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> [hverkuil-cisco@xs4all.nl: changed {0} to {}] Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: atmel: atmel-isi: add support for mono sensors, GRAY and Y16Eugen Hristev2-1/+14
This adds support for GREY and Y16 formats, based on Y10 mbus codes. Y16 needs to go through preview path in the ISI, with 2 pixels per word, and it fits the Y16 format. The ISI data lines need to be MSB aligned with the sensor data lines. GREY format in 8 bits per pixel is done by dropping the 2 LSB bits from the Y10 format, and packed as 4 pixels per word. Suggested-by: Wenyou Yang <wenyou.yang@microchip.com> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: atmel: atmel-isc-base: initialize the try_crop for the pads in try_fmtEugen Hristev1-0/+34
When requesting format from sensor, some sensors call the subdev_get_try_crop which for ISC was not properly initialized, and this causes errors in determining proper image resolutions. To accommodate for this, when trying a format (in try_fmt), first attempt to obtain the framesize for this format from sensor. In case this fails, use the maximum ISC width/height as try_crop, otherwise provide the first size height/width from the sensor. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> [hverkuil-cisco@xs4all.nl: changed {0} to {}] Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: atmel: atmel-isc-base: fix enum calls default formatEugen Hristev1-3/+2
With some sensors, the mbus code must match the one that sensor supports. In this case we should initialize the mbus_code of the fse/fie before calling the subdev, and not after. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: atmel: atmel-isc-base: properly initialize pad_cfgEugen Hristev1-1/+1
In try_fmt, properly initialize the pad_cfg variable to zeros. This can be used by various calls from the subdev, so it's better to have it initialized. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> [hverkuil-cisco@xs4all.nl: changed {0} to {}] Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: atmel: atmel-isc-base: add support for Y10 formatEugen Hristev1-6/+29
The ISC can receive input from sensors using Y10 format directly (10 bits greyscale). In this case, the ISC must dump the data directly, either as GREY (8bit) or Y10 (10bit). Y16 is not supported because we cannot align the MSB 10 bits to the MSB inside the 16bit container. For this format, the ISC internal pipeline cannot work (only works with BAYER), so we must dump the data directly as 8bit/10bit. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: atmel: atmel-isc-base: allow 8 bit direct dumpEugen Hristev1-9/+9
In case the format that the sensor sends is 8 bit only (like GREY for example) we need to be able to bypass ISC pipeline and directly dump 8 bits. That's why the hardcoded value of 16 bpp is not correct in all cases. This change allows the output format to decide what is the correct bpp (bits per pixel) such that the result is in the proper format. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: coda: avoid hardware lockups with more than 13 capture buffersPhilipp Zabel1-9/+14
When decoding using the CODA internal rotator (for example NV12 capture), currently the value vb2_buf.index + CODA_MAX_FRAMEBUFFERS (19) is written into the DEC_PIC_ROT_INDEX register. At least with firmware version 3.1.1 this causes CODA hangups as soon as the register value reaches 32. Instead, always write CODA_MAX_FRAMEBUFFERS. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: coda: remove redundant platform_get_irq error messagePhilipp Zabel1-3/+1
Both platform_get_irq_byname() and platform_get_irq() already print an error. Remove the redundant error message. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: coda: jpeg: add CODA960 JPEG encoder supportPhilipp Zabel4-2/+756
This patch adds JPEG encoding support for CODA960, handling the JPEG hardware directly. A separate JPEG encoder video device is created due to the separate hardware unit and different supported pixel formats. While the hardware can not change subsampling on the fly, it can encode 4:2:2 subsampled images into JPEGs of the same subsampling. There are two additional tracepoints added to the coda driver that can be used together with the v4l2:v4l2_qbuf and v4l2:v4l2_dqbuf tracepoints to to follow video frames through the mem2mem device when encoding or decoding with the CODA960 JPEG codec: coda:coda_jpeg_run coda:coda_jpeg_done Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Richard Leitner <richard.leitner@skidata.com> [hverkuil-cisco@xs4all.nl: removed unused k and q_data_dst variables] Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: coda: jpeg: add JPEG register definitions for CODA960Philipp Zabel1-0/+83
The CODA960 JPEG codec is controlled directly from the host, there is no support in the BIT processor firmware. This patch adds the necessary register definitions. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: coda: jpeg: merge Huffman table bits and valuesPhilipp Zabel1-24/+16
The Huffman bits tables are always 16 bytes long, and they are always followed directly by the values tables, both in hardware and in JPEG files. Just merge the two tables. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-16media: coda: do not skip finish_run if abortingPhilipp Zabel2-1/+7
Always call finish_run when the hardware signals completion. This will allow JPEG contexts to clean up even if job_abort was called during the device_run. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: constify fb ops across all driversJani Nikula2-4/+2
Now that the fbops member of struct fb_info is const, we can start making the ops const as well. Remove the redundant fbops assignments while at it. v2: - actually add const in vivid - fix typo (Christophe de Dinechin) Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: Andy Walls <awalls@md.metrocast.net> Cc: linux-media@vger.kernel.org Cc: ivtv-devel@ivtvdriver.org Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/71794337f8611271f2c1fdb3882119a58e743a87.1575390741.git.jani.nikula@intel.com
2019-12-13media: pulse8-cec: fix lost cec_transmit_attempt_done() callHans Verkuil1-4/+13
The periodic PING command could interfere with the result of a CEC transmit, causing a lost cec_transmit_attempt_done() call. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: <stable@vger.kernel.org> # for v4.10 and up Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: cec: check 'transmit_in_progress', not 'transmitting'Hans Verkuil1-8/+12
Currently wait_event_interruptible_timeout is called in cec_thread_func() when adap->transmitting is set. But if the adapter is unconfigured while transmitting, then adap->transmitting is set to NULL. But the hardware is still actually transmitting the message, and that's indicated by adap->transmit_in_progress and we should wait until that is finished or times out before transmitting new messages. As the original commit says: adap->transmitting is the userspace view, adap->transmit_in_progress reflects the hardware state. However, if adap->transmitting is NULL and adap->transmit_in_progress is true, then wait_event_interruptible is called (no timeout), which can get stuck indefinitely if the CEC driver is flaky and never marks the transmit-in-progress as 'done'. So test against transmit_in_progress when deciding whether to use the timeout variant or not, instead of testing against adap->transmitting. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Fixes: 32804fcb612b ("media: cec: keep track of outstanding transmits") Cc: <stable@vger.kernel.org> # for v4.19 and up Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: cec: avoid decrementing transmit_queue_sz if it is 0Hans Verkuil1-2/+12
WARN if transmit_queue_sz is 0 but do not decrement it. The CEC adapter will become unresponsive if it goes below 0 since then it thinks there are 4 billion messages in the queue. Obviously this should not happen, but a driver bug could cause this. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: <stable@vger.kernel.org> # for v4.12 and up Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: cec: CEC 2.0-only bcast messages were ignoredHans Verkuil1-3/+3
Some messages are allowed to be a broadcast message in CEC 2.0 only, and should be ignored by CEC 1.4 devices. Unfortunately, the check was wrong, causing such messages to be marked as invalid under CEC 2.0. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: <stable@vger.kernel.org> # for v4.10 and up Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: Drop superfluous ioctl PCM opsTakashi Iwai11-11/+0
PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Bluecherry Maintainers <maintainers@bluecherrydvr.com> Cc: Anton Sviridenko <anton@corp.bluecherry.net> Cc: Andrey Utkin <andrey.utkin@corp.bluecherry.net> Cc: Ismael Luceno <ismael@iodev.co.uk> Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: ivtv: Drop superfluous ioctl PCM opsTakashi Iwai1-13/+0
snd_ivtv_pcm_ioctl() does nothing but calling the default handler. Now PCM core accepts NULL as the default ioctl ops, so let's drop altogether. Cc: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: cx18: Drop superfluous ioctl PCM opsTakashi Iwai1-13/+0
snd_cx18_pcm_ioctl() does nothing but calling the default handler. Now PCM core accepts NULL as the default ioctl ops, so let's drop altogether. Cc: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: cobalt: Drop superfluous ioctl PCM opsTakashi Iwai1-8/+0
snd_cobalt_pcm_ioctl() does nothing but calling the default handler. Now PCM core accepts NULL as the default ioctl ops, so let's drop altogether. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: tm6000: Clean up ALSA PCM API usagesTakashi Iwai1-80/+1
With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Also, snd_tm6000_capture_free() is dropped since the check of stream_started flag makes no sense; hw_free callback is guaranteed to be called after the stream gets stopped. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: go7007: Clean up ALSA PCM API usagesTakashi Iwai1-21/+3
With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: em28xx: Clean up ALSA PCM API usagesTakashi Iwai1-85/+1
With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Also, snd_em28xx_hw_capture_free() is dropped since the check of stream_started flag makes no sense; hw_free callback is guaranteed to be called after the stream gets stopped. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: cs231xx: Clean up ALSA PCM API usagesTakashi Iwai1-77/+1
With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Also, snd_cx231xx_hw_capture_free() is dropped since the check of stream_started flag makes no sense; hw_free callback is guaranteed to be called after the stream gets stopped. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: ivtv: Clean up ALSA PCM API usagesTakashi Iwai1-62/+1
With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Cc: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: cx18: Clean up ALSA PCM API usagesTakashi Iwai1-61/+1
With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Cc: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: cobalt: Clean up ALSA PCM API usagesTakashi Iwai1-57/+4
With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: usbtv: Use managed buffer allocationTakashi Iwai1-27/+1
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and dropped. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: tw686x: Use managed buffer allocationTakashi Iwai1-14/+1
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and dropped. Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: solo6x10: Use managed buffer allocationTakashi Iwai1-18/+5
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and dropped. Cc: Bluecherry Maintainers <maintainers@bluecherrydvr.com> Cc: Anton Sviridenko <anton@corp.bluecherry.net> Cc: Andrey Utkin <andrey.utkin@corp.bluecherry.net> Cc: Ismael Luceno <ismael@iodev.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: go7007: fix a miss of snd_card_freeChuhong Yuan1-18/+17
go7007_snd_init() misses a snd_card_free() in an error path. Add the missed call to fix it. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: ti-vpe: csc: fix single vs multiplanar format handlingBenoit Parrot1-20/+12
In csc_set_coeff() we were previously checking if the format type was V4L2_BUF_TYPE_VIDEO_OUTPUT or V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE as a mean to figure out if the format was multiplanar or not. This was not entirely accurate as the format type could also be a CAPTURE type instead. Fix this by removing the 'switch' construct and replacing them with "if (V4L2_TYPE_IS_MULTIPLANAR(type))" instead. Signed-off-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: ivtv/cx18: remove ivtvdriver.org referencesHans Verkuil5-11/+8
That URL is no longer valid, so either remove references to it or replace it with linuxtv.org. Rather than updating the URL I've just dropped the cx18.rst driver documentation since it was really out of date. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Acked-by: awalls@md.metrocast.net Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: pxa_camera: add missed tasklet_killChuhong Yuan1-0/+2
This driver forgets to kill tasklet when probe fails and remove. Add the calls to fix it. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: vivid: Add touch supportVandana BN8-13/+739
Support to emulate touch devices in vivid driver. It generates touch patterns simulating single tap, double tap, triple tap, move from left to right, zoom in, zoom out, palm press simulating large area being pressed on screen, and simulating 16 different simultaneous touch points.The values generated are based on behavior of the rmi_f54 driver. Signed-off-by: Vandana BN <bnvandana@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: usb: go7007: s2250-board: add missed i2c_unregister_deviceChuhong Yuan1-0/+1
The driver forgets to call i2c_unregister_device in remove like what is done in probe failure. Add the missed call to fix it. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: cx23885: Add support for AVerMedia CE310BForest Crossman3-1/+27
The AVerMedia CE310B is a simple composite + S-Video + stereo audio capture card, and uses only the CX23888 to perform all of these functions. I've tested both video inputs and the audio interface and confirmed that they're all working. However, there are some issues: * Sometimes when I switch inputs the video signal turns black and can't be recovered until the system is rebooted. I haven't been able to determine the cause of this behavior, nor have I found a solution to fix it or any workarounds other than rebooting. * The card sometimes seems to have trouble syncing to the video signal, and some of the VBI data appears as noise at the top of the frame, but I assume that to be a result of my very noisy RF environment and the card's unshielded input traces rather than a configuration issue. Signed-off-by: Forest Crossman <cyrozap@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: platform: mtk-mdp: add missed destroy_workqueue in removeChuhong Yuan1-0/+3
The driver misses destroying wdt_wq when remove like what is done when probe fails. Add the missed calls like what is done to job_wq to fix it. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: bdisp: add missed destroy_workqueue in remove and probe failureChuhong Yuan1-4/+9
The driver forgets to call destroy_workqueue when remove and probe fails. Add the missed calls to fix it. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: dvb-usb/dvb-usb-urb.c: initialize actlen to 0Hans Verkuil1-1/+1
This fixes a syzbot failure since actlen could be uninitialized, but it was still used. Syzbot link: https://syzkaller.appspot.com/bug?extid=6bf9606ee955b646c0e1 Reported-and-tested-by: syzbot+6bf9606ee955b646c0e1@syzkaller.appspotmail.com Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Acked-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>