aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-07-09Merge tag 'media/v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-mediaLinus Torvalds127-1927/+3191
Pull media updates from Mauro Carvalho Chehab: - new Atmel microship ISC driver - coda has gained support for mpeg2 and mpeg4 - cxusb gained support for analog TV - rockchip staging driver was split into two separate staging drivers - added a new staging driver for Allegro DVT video IP core - added a new staging driver for Amlogic Meson video decoder - lots of improvements and cleanups * tag 'media/v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (398 commits) media: allegro: use new v4l2_m2m_ioctl_try_encoder_cmd funcs media: doc-rst: Fix typos media: radio-raremono: change devm_k*alloc to k*alloc media: stv0297: fix frequency range limit media: rc: Prefer KEY_NUMERIC_* for number buttons on remotes media: dvb_frontend: split dvb_frontend_handle_ioctl function media: mceusb: disable "nonsensical irdata" messages media: rc: remove redundant dev_err message media: cec-notifier: add new notifier functions media: cec: add struct cec_connector_info support media: cec-notifier: rename variables, check kstrdup and n->conn_name media: MAINTAINERS: Add maintainers for Media Controller media: staging: media: tegra-vde: Defer dmabuf's unmapping media: staging: media: tegra-vde: Add IOMMU support media: hdpvr: fix locking and a missing msleep media: v4l2: Test type instead of cfg->type in v4l2_ctrl_new_custom() media: atmel: atmel-isc: fix i386 build error media: v4l2-ctrl: Move compound control initialization media: hantro: Use vb2_get_buffer media: pci: cx88: Change the type of 'missed' to u64 ...
2019-06-27media: cec: add struct cec_connector_info supportDariusz Marcinkiewicz1-1/+1
Define struct cec_connector_info in media/cec.h and define CEC_CAP_CONNECTOR_INFO. In a later patch this will be moved to uapi/linux/cec.h. The CEC_CAP_CONNECTOR_INFO capability can be set by drivers, but cec_allocate_adapter() will remove it again until the public API for this can be enabled once all drm drivers wire this up correctly. Also add the cec_fill_conn_info_from_drm and cec_s_conn_info functions, which are needed by drm drivers to fill in the cec_connector info based on a drm_connector. The cec_notifier_(un)register and cec_register_cec_notifier prototypes were moved from cec-notifier.h to cec.h since cec.h no longer includes cec-notifier.h. These headers included each other before, which caused various problems. Due to these changes the seco-cec driver was changed as well: it should include cec-notifier.h, not cec.h. Signed-off-by: Dariusz Marcinkiewicz <darekm@google.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24media: atmel: atmel-isc: fix i386 build errorEugen Hristev2-6/+2
Changed module parameters to static. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24media: vimc: cap: check v4l2_fill_pixfmt return valueAndré Almeida1-1/+4
v4l2_fill_pixfmt() returns -EINVAL if the pixelformat used as parameter is invalid or if the user is trying to use a multiplanar format with the singleplanar API. Currently, the vimc_cap_try_fmt_vid_cap() returns such value, but vimc_cap_s_fmt_vid_cap() is ignoring it. Fix that and returns an error value if vimc_cap_try_fmt_vid_cap() has failed. Signed-off-by: André Almeida <andrealmeid@collabora.com> Suggested-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24media: coda: encoder parameter change supportPhilipp Zabel4-0/+115
Add support for dynamically changing the GOP size, bitrate, frame rate, constant intra quantization parameter, number of intra refresh macro blocks and slice mode parameters. 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+samsung@kernel.org>
2019-06-24media: coda: add coda_slice_mode() functionPhilipp Zabel1-21/+24
Changing slice mode dynamically while encoding will require to calculate the register value again, so split it out into a separate function. 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+samsung@kernel.org>
2019-06-24media: coda: store device pointer in driver structure instead of pdevPhilipp Zabel3-23/+19
Currently the platform device pointer is stored in struct coda_dev, only to convert it into a device pointer wherever it is used. Just store the device pointer directly. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24media: coda: mark last returned framePhilipp Zabel1-0/+17
If reordering is not enabled, the last decoded frame has to be the last returned buffer. Otherwise wait for the firmware to report no more frame to display. In that case the return buffer is the last one as well, and can be reported as such. 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+samsung@kernel.org>
2019-06-24media: coda: mark last pending buffer or last meta on decoder stop commandPhilipp Zabel3-7/+42
If there is still a buffer pending, mark it as the last buffer. It will create a meta that is flagged as last when the buffer is copied into the bitstream ring buffer. If there are no more buffers pending, find the last bitstream meta and mark it as last. If there is no bitstream meta either, wake up the capture queue as there will be no more decoded frames. 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+samsung@kernel.org>
2019-06-24media: coda: lock capture queue wakeup against encoder stop commandPhilipp Zabel3-5/+27
Make sure that an encoder stop command running concurrently with an encoder finish_run always either flags the last returned buffer or wakes up the capture queue to signal the end of stream condition afterwards. 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+samsung@kernel.org>
2019-06-24media: coda: flag the last encoded bufferPhilipp Zabel1-7/+9
Use the flagged last output buffer to also flag the corresponding capture buffer after encoding. This causes the end of stream event to be issued and the buffer to be dequeued with the last flag set. 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+samsung@kernel.org>
2019-06-24media: coda: only wake up capture queue if no pending buffers to encodePhilipp Zabel1-8/+9
If there are no pending queued output buffers to be encoded, waking up the capture queue with -EPIPE signals end of stream. If there are pending buffers on the other hand, setting the V4L2_BUF_FLAG_LAST on the resulting encoded capture buffers is all that is needed. 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+samsung@kernel.org>
2019-06-24media: coda: retire coda_buf_is_end_of_streamPhilipp Zabel1-11/+1
Using the output queue sequence counter to determine the last buffer to be encoded or decoded always was fragile at best. Now that we have the last buffer flag propagating from the output queue to the capture queue correctly, this is not needed anymore. 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+samsung@kernel.org>
2019-06-24media: coda: mark the last output buffer on encoder stop commandPhilipp Zabel1-0/+5
Mark the last output buffer to be encoded. 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+samsung@kernel.org>
2019-06-24media: coda: only set the stream end flags if there are no more pending output buffersPhilipp Zabel1-8/+12
If there are still queued output buffers pending to be copied into the bitstream ring buffer, setting the stream end flag should be deferred until the marked last output buffer is written into the bitstream ring buffer. 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+samsung@kernel.org>
2019-06-24media: coda: mark the last output buffer on decoder stop commandPhilipp Zabel2-0/+9
Mark the last output buffer to be decoded and only copy pending queued output buffers into the bitstream ring buffer in the BIT processor decoder case. 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+samsung@kernel.org>
2019-06-24media: coda: allow flagging last output buffer internallyPhilipp Zabel1-1/+19
Since V4L2_BUF_FLAG_LAST is a CAPTURE only flag, clear it from OUTPUT buffers in QBUF and DQBUF. This allows to use the flag internally to signal the last buffer to decode after a decoder stop command was issued. 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+samsung@kernel.org>
2019-06-24media: coda: increment sequence offset for the last returned framePhilipp Zabel1-0/+3
If no more frames are decoded in bitstream end mode, and a previously decoded frame has been returned, the firmware still increments the frame number. To avoid a sequence number mismatch after decoder restart, increment the sequence_offset correction parameter. 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+samsung@kernel.org>
2019-06-24media: coda: flush bitstream ring buffer on decoder restartPhilipp Zabel3-0/+28
The bitstream ringbuffer might be in an underrun state after draining, or it might still contain unread data if the previous decoder stop command was flagged as immediate. Flush the bitstream ring buffer during V4L2_DEC_CMD_START to get into a well defined state. Also fill the bitstream with buffers that have been queued during draining, to resume decoding immediately. 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+samsung@kernel.org>
2019-06-24media: coda: do not enforce 512-byte initial bitstream payload on CODA960Philipp Zabel1-1/+3
On CODA960, sequence initialization can succeed if less than 512 bytes are ready in the bitstream ring buffer. On other variants, warn about too small payload in start_streaming. 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+samsung@kernel.org>
2019-06-24media: coda: pad first buffer with repeated MPEG headers to fix sequence initPhilipp Zabel4-3/+139
If the first buffer contains only headers, the sequence initialization command fails. On CodaHx4 the buffer must be padded to at least 512 bytes, on CODA960 it seems to be enough to just repeat the sequence and extension headers (MPEG-2) or the VOS and VO headers (MPEG-4) once for for sequence initialization to succeed without further bitstream data. On CodaHx4 the headers can be repeated multiple times until the 512 byte mark is reached. A similar issue was solved for h.264 by padding with a filler NAL in commit 0eef89403ece ("[media] coda: pad first h.264 buffer to 512 bytes"). 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+samsung@kernel.org>
2019-06-24media: coda: make coda_bitstream_queue more versatilePhilipp Zabel1-14/+9
Pass vaddr and size to coda_bitstream_queue instead of a struct vb2_v4l2_buffer to make it reusable for queueing data that is not exactly a whole v4l2 buffer into the bitstream ringbuffer. 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+samsung@kernel.org>
2019-06-24media: coda: integrate internal frame metadata into a structurePhilipp Zabel2-34/+40
Combine the separate auxiliary buffer, buffer meta, frame type, and decode error arrays into an array of struct coda_internal_frame. 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+samsung@kernel.org>
2019-06-24media: coda: implement decoder source change eventPhilipp Zabel1-0/+20
The stateful decoder API requires decoders to signal detection of stream dimensions via the V4L2_EVENT_SOURCE_CHANGE event. 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+samsung@kernel.org>
2019-06-24media: coda: add sequence initialization workPhilipp Zabel3-0/+51
Add a sequence initialization work item to be run when OUTPUT buffers are queued in the initialization state. 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+samsung@kernel.org>
2019-06-24media: coda: split decoder sequence initialization out of start decodingPhilipp Zabel1-4/+26
The sequence initialization already has to happen during the initialization phase, after headers have been queued on the OUTPUT queue. This means that sequence initialization has to be queued as a work item from QBUF on the OUTPUT queue. The internal framebuffer setup should be done later during VIDIOC_REQBUFS() on the CAPTURE queue. 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+samsung@kernel.org>
2019-06-24media: coda: fix V4L2_DEC_CMD_STOP when all buffers are already consumedMarco Felsch1-0/+6
When the DEC_CMD_STOP command is issued after the context has already consumed all the queued buffers, we need to make sure to wake the destination queue with last_buffer_dequeued set, to allow userspace to make progress in its EOS handling. As there might still be picture run workers pending at that point, we need to synchronize with them, so the sequence number comparison reads stable values. reword commit message] Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> 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+samsung@kernel.org>
2019-06-24media: coda: add coda_wake_up_capture_queuePhilipp Zabel1-7/+13
Combine setting the last_buffer_dequeued flag on the capture video queue and waking up its done workqueue into a helper function. 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+samsung@kernel.org>
2019-06-24media: coda: fix last buffer handling in V4L2_ENC_CMD_STOPMarco Felsch1-0/+2
coda_encoder_cmd() is racy, as the last scheduled picture run worker can still be in-flight while the ENC_CMD_STOP command is issued. Depending on the exact timing the sequence numbers might already be changed, but the last buffer might not have been put on the destination queue yet. In this case the current implementation would prematurely wake the destination queue with last_buffer_dequeued=true, causing userspace to call streamoff before the last buffer is handled. Close this race window by synchronizing with the pic_run_worker before doing the sequence check. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> [l.stach@pengutronix.de: switch to flush_work, reword commit message] Signed-off-by: Lucas Stach <l.stach@pengutronix.de> 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+samsung@kernel.org>
2019-06-24media: coda: fix mpeg2 sequence number handlingPhilipp Zabel1-1/+4
Sequence number handling assumed that the BIT processor frame number starts counting at 1, but this is not true for the MPEG-2 decoder, which starts at 0. Fix the sequence counter offset detection to handle this. 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+samsung@kernel.org>
2019-06-24media: coda: use mem2mem try_en/decoder_cmd helpersPhilipp Zabel1-17/+2
Use mem2mem try_en/decoder_cmd helpers to ensure consistent behaviour with other video codec drivers. 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+samsung@kernel.org>
2019-06-24media: coda: implement CMD_START to restart decodingMichael Tretter1-4/+17
The CMD_START shall be used to start the processing after a drain that was initiated with CMD_STOP. Up until now, a drain on coda could only be finished with a STREAMOFF-STREAMON, which resulted in a reset of the device. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> 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+samsung@kernel.org>
2019-06-24media: cafe-driver: mark an static var as suchMauro Carvalho Chehab1-1/+1
As warned by sparse: drivers/media/platform/marvell-ccic/cafe-driver.c:475:23: warning: symbol 'ov7670_info' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24media: marvell-ccic: mmp: don't chicken out w/o pdataLubomir Rintel1-3/+0
It's impossible for mmpcam_calc_dphy() to be called without it. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24media: marvell-ccic: only calculate the DPHY registers when neededLubomir Rintel1-7/+2
Avoid pointlessly calling calc_dphy() when the bus is not V4L2_MBUS_CSI2_DPHY. This will make it easier to replace the platform data with devicetree. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24media: marvell-ccic: provide a clock for the sensorLubomir Rintel5-181/+157
The sensor needs the MCLK clock running when it's being probed. On platforms where the sensor is instantiated from a DT (MMP2) it is going to happen asynchronously. Therefore, the current modus operandi, where the bridge driver fiddles with the sensor power and clock itself is not going to fly. As the comments wisely note, this doesn't even belong there. Luckily, the ov7670 driver is already able to control its power and reset lines, we can just drop the MMP platform glue altogether. It also requests the clock via the standard clock subsystem. Good -- let's set up a clock instance so that the sensor can ask us to enable the clock. Note that this is pretty dumb at the moment: the clock is hardwired to a particular frequency and parent. It was always the case. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24media: marvell-ccic: use async notifier to get the sensorLubomir Rintel4-76/+162
An instance of a sensor on DT-based MMP2 platform is always going to be created asynchronously. Let's move the manual device creation away from the core to the Cafe driver (used on OLPC XO-1, not present in DT) and set up appropriate async matches: I2C on Cafe, FWNODE on MMP (OLPC XO-1.75). Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24media: marvell-ccic/mmp: add devicetree supportLubomir Rintel1-9/+27
The platform data is actually not used anywhere (along with the CSI support) and should be safe to remove. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24media: marvell-ccic: rename the clocksLubomir Rintel1-1/+1
Use the names more suitable for devicetree bindings. There are no board files utilizing this, thus we seem to be at liberty at renaming this without consequences. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24media: marvell-ccic/mmp: enable clock before accessing registersLubomir Rintel1-2/+1
The access to REG_CLKCTRL or REG_CTRL1 without the clock enabled hangs the machine. Enable the clock first. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24media: marvell-ccic: drop unused stuffLubomir Rintel3-5/+0
Remove structure members and headers that are not actually used. Saves us from some noise in subsequent cleanup commits. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-24media: Revert "[media] marvell-ccic: reset ccic phy when stop streaming for stability"Lubomir Rintel3-33/+0
This accesses the clock registers directly and thus is going to stay in the way of making the driver devicetree friendly. No boards seems to actually use this. If it's somehow actually needed it needs to be done differently. This reverts commit 7c269f454e7a51b151d94f99344120efa1cd0acb. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-21media: vivid: add CEC support to display present ctrlJohan Korsnes3-6/+38
Set/invalidate physical addresses based on the configuration of the display present control. This is relevant not only when the display present control is modified, but also when the Vivid instance EDID is set/cleared. Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-21media: vivid: reorder CEC allocation and control set-upJohan Korsnes1-42/+58
CEC adapters and controllers (handlers) are now set up as follows: 1. Allocate CEC adapters: setup of control handlers in next step requires these adapters to be allocated. 2. Setup of control handlers: This must be done prior to registering and exposing the adapters to user space to avoid a race condition. 3. Register CEC adapters: make them available to user space. Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: PTR_ERR -> PTR_ERR_OR_ZERO] Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-21media: vivid: add HDMI (dis)connect RX emulationJohan Korsnes2-2/+23
Adds the following bitmask control: -V4L2_CID_DV_RX_POWER_PRESENT The RX_POWER_PRESENT bitmask is set based on the digital video timings signal mode. This also removes 1/1 warnings for v4l2-compliance test on vivid instance with HDMI input. Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-21media: vivid: add HDMI (dis)connect TX emulationJohan Korsnes2-1/+27
Adds the following bitmask controls: -V4L2_CID_DV_TX_EDID_PRESENT -V4L2_CID_DV_TX_HOTPLUG -V4L2_CID_DV_TX_RXSENSE The bitmasks are all set based on the custom vivid DISPLAY_PRESENT control. This also removes 2/2 v4l2-compliance warnings for vivid output device. Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-21media: vivid: add number of HDMI ports to device stateJohan Korsnes2-0/+4
This will be used for HDMI-specific controls such as hotplug detection and power present. Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-21media: vivid: add display present controlJohan Korsnes4-0/+29
Add a custom control for selecting the presence of a display connected to the active output. This control is part of an effort to implement proper HDMI (dis)connect behavior for vivid. Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-21media: vivid: make input std_signal per-inputJohan Korsnes7-46/+64
Make the following properties per-input: -Standard Signal Mode -Standard These properties need to be per-input in order to implement proper HDMI (dis)connect-behavior, where the signal mode will be used to signify whether or not there is an inpute device connected. Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-21media: vivid: make input dv_timings per-inputJohan Korsnes6-34/+69
Make the following properties per-input -DV Timings Signal Mode -DV Timings These properties need to be per-input in order to implement proper HDMI (dis)connect-behavior, where the signal mode will be used to signify whether or not there is an input device connected. Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>