]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/log
mirror_ubuntu-eoan-kernel.git
6 years agomedia: media-types.rst: codec entities can have more than one source pad
Hans Verkuil [Wed, 25 Jul 2018 13:26:04 +0000 (09:26 -0400)]
media: media-types.rst: codec entities can have more than one source pad

Some decoders and encoders can potentially have more than one source pad,
so update the description to say 'at least one source pad'.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: add HEVC codec support
Stanimir Varbanov [Thu, 5 Jul 2018 13:04:01 +0000 (09:04 -0400)]
media: venus: add HEVC codec support

This add HEVC codec support for venus versions 3xx and 4xx.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: core: add sdm845 DT compatible and resource data
Stanimir Varbanov [Thu, 5 Jul 2018 13:04:00 +0000 (09:04 -0400)]
media: venus: core: add sdm845 DT compatible and resource data

This adds sdm845 DT compatible string with it's resource
data table.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: implementing multi-stream support
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:59 +0000 (09:03 -0400)]
media: venus: implementing multi-stream support

This is implementing multi-stream decoder support. The multi-stream
will be used to enable/disable the primary/secondary decoder
outputs. Depending on formats on both decoder outputs we could
implement downscale, dithering and supporting UBWC (universal
bandwidth compression) formats. The UBWC compressed raw format is
used to optimize interconnect bandwidth for bigger resolutions
like 4K and hence we will get some power-saving benefits as well.

Both decoder outputs are distinguished by buffer_type field in
the HFI packets. For example HFI_BUFFER_OUTPUT is the buffer type
for primary decoder output and HFI_BUFFER_OUTPUT2 is for secondary
decoder output.

Starting from Venus 4xx the DPB buffers format must be UBWC, so
the multi-stream becomes mandatory for this Venus version. That
means that we need to allocate internally in the driver a set of
DPB buffers (with UBWC NV12 format) and give them to the firmware.
The other decoder output (we called it OPB) format will be NV12
linear format and with the same resolution (or smaller in case
the user wants to downscale).

The DPB buffers are used for decoder reference frames and those
have to be in a specific format (UBWC). So one decoder output is
used to fill those reference buffers while the other output is
used to fill the userspace buffers with the user requested format.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: helpers: move frame size calculations on common place
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:58 +0000 (09:03 -0400)]
media: venus: helpers: move frame size calculations on common place

This move the calculations of raw and compressed buffer sizes
on common helper and make it identical for encoder and decoder.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: vdec: a new function for output configuration
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:57 +0000 (09:03 -0400)]
media: venus: vdec: a new function for output configuration

Make a new function vdec_output_conf() for decoder output
configuration. vdec_output_conf() will set properties via
HFI interface related to the output configuration, and
keep vdec_set_properties() which will set properties
related to decoding parameters.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: vdec: get required input buffers as well
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:56 +0000 (09:03 -0400)]
media: venus: vdec: get required input buffers as well

Rework and rename vdec_cap_num_buffers() to get the number of
input buffers too.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: helpers: add a helper to return opb buffer sizes
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:55 +0000 (09:03 -0400)]
media: venus: helpers: add a helper to return opb buffer sizes

Add a helper function to return current output picture buffer size.
OPB sizes can vary depending on the selected decoder output(s).

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: helpers: extend set_num_bufs helper with one more argument
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:54 +0000 (09:03 -0400)]
media: venus: helpers: extend set_num_bufs helper with one more argument

Extend venus_helper_set_num_bufs() helper function with one more
argument to set number of output buffers for the secondary decoder
output.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: helpers, vdec, venc: add helpers to set work mode and core usage
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:53 +0000 (09:03 -0400)]
media: venus: helpers, vdec, venc: add helpers to set work mode and core usage

These are new properties applicable to Venus version 4xx. Add the
helpers and call them from decoder and encoder drivers.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: helpers: add a new helper to set raw format
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:52 +0000 (09:03 -0400)]
media: venus: helpers: add a new helper to set raw format

The new helper will has one more argument for buffer type, that
way the decoder can configure the format on it's secondary
output.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: helpers: add buffer type argument to a helper
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:51 +0000 (09:03 -0400)]
media: venus: helpers: add buffer type argument to a helper

This adds one more function argument to pass buffer type to
set_output_resolution() helper function. That is a preparation
to support secondary decoder output.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: core: delete not used buffer mode flags
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:50 +0000 (09:03 -0400)]
media: venus: core: delete not used buffer mode flags

Delete not used flag for capture buffer allocation mode and
no longer used cap_bufs_mode_dynamic from instance structure.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: helpers: add helper function to set actual buffer size
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:49 +0000 (09:03 -0400)]
media: venus: helpers: add helper function to set actual buffer size

Add and use a helper function to set actual buffer size for
particular buffer type. This is also preparation to use
the second decoder output.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: helpers: add a helper function to set dynamic buffer mode
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:48 +0000 (09:03 -0400)]
media: venus: helpers: add a helper function to set dynamic buffer mode

Adds a new helper function to set dynamic buffer mode if it is
supported by current HFI version. The dynamic buffer mode is
set unconditionally for both decoder outputs.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: helpers: rename a helper function and use buffer mode from caps
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:47 +0000 (09:03 -0400)]
media: venus: helpers: rename a helper function and use buffer mode from caps

Rename is_reg_unreg_needed() to better name is_dynamic_bufmode() and
use buffer mode from enumerated per codec capabilities.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: hfi_parser: add common capability parser
Stanimir Varbanov [Fri, 6 Jul 2018 12:47:58 +0000 (08:47 -0400)]
media: venus: hfi_parser: add common capability parser

This adds common capability parser for all supported Venus
versions. Having it will help to enumerate better the supported
raw formats and codecs and also the capabilities for every
codec like max/min width/height, framerate, bitrate and so on.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: core, helpers: add two more clocks found in Venus 4xx
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:45 +0000 (09:03 -0400)]
media: venus: core, helpers: add two more clocks found in Venus 4xx

Add two more clocks for Venus 4xx in core structure and create
a new power enable function to handle it for 3xx/4xx versions.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: hfi_venus: add suspend functionality for Venus 4xx
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:44 +0000 (09:03 -0400)]
media: venus: hfi_venus: add suspend functionality for Venus 4xx

This adds suspend (power collapse) functionality by reusing
the suspend function for Venus 3xx and also enables idle indicator
property for Venus 4xx (where it is disabled by default).

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: hfi_venus: move set of default properties to core init
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:43 +0000 (09:03 -0400)]
media: venus: hfi_venus: move set of default properties to core init

This moves setting of default properties (firmware debug, idle
indicator and low power mode) from session init to core init.
All of those properties are need to be enabled/disabled early
so that they could be used before the clients are even initialized.

The other reason is to set idle indicator property early before
we enter into venus_suspend function where we need to check for
ARM9 WFI.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: hfi_venus: fix suspend function for venus 3xx versions
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:42 +0000 (09:03 -0400)]
media: venus: hfi_venus: fix suspend function for venus 3xx versions

This fixes the suspend function for Venus 3xx versions by
add a check for WFI (wait for interrupt) bit. This bit
is on when the ARM9 is idle and entered in low power mode.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: hfi_venus: add halt AXI support for Venus 4xx
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:41 +0000 (09:03 -0400)]
media: venus: hfi_venus: add halt AXI support for Venus 4xx

Add AXI halt support for version 4xx by using venus wrapper
registers.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: hfi: handle buffer output2 type as well
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:40 +0000 (09:03 -0400)]
media: venus: hfi: handle buffer output2 type as well

This adds handling of buffers of type OUTPUT2 which is needed to
support Venus 4xx version.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: hfi: support session continue for 4xx version
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:39 +0000 (09:03 -0400)]
media: venus: hfi: support session continue for 4xx version

This makes possible to handle session_continue for 4xx as well.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: hfi_cmds: add set_properties for 4xx version
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:38 +0000 (09:03 -0400)]
media: venus: hfi_cmds: add set_properties for 4xx version

Adds set_properties method to handle newer 4xx properties and
fall-back to 3xx for the rest.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: hfi: update sequence event to handle more properties
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:37 +0000 (09:03 -0400)]
media: venus: hfi: update sequence event to handle more properties

HFI version 4xx can pass more properties in the sequence change
event, extend the event structure with them.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: hfi: preparation to support venus 4xx
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:36 +0000 (09:03 -0400)]
media: venus: hfi: preparation to support venus 4xx

This covers the differences between 1xx,3xx and 4xx.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: venus: hfi_msgs: correct pointer increment
Stanimir Varbanov [Thu, 5 Jul 2018 13:03:35 +0000 (09:03 -0400)]
media: venus: hfi_msgs: correct pointer increment

Data pointer should be incremented by size of the structure not
the size of a pointer, correct the mistake.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: v4l2-ctrls.h: fix v4l2_ctrl field description typos
Baruch Siach [Thu, 5 Jul 2018 09:38:00 +0000 (05:38 -0400)]
media: v4l2-ctrls.h: fix v4l2_ctrl field description typos

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: MAINTAINERS: Add entry for STM32 DCMI media driver
Hugues Fruchet [Thu, 5 Jul 2018 09:01:42 +0000 (05:01 -0400)]
media: MAINTAINERS: Add entry for STM32 DCMI media driver

Add an entry to make myself a maintainer of STM32 DCMI media driver.

Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: gspca_kinect: cast sizeof to int for comparison
Julia Lawall [Sun, 1 Jul 2018 17:32:05 +0000 (13:32 -0400)]
media: gspca_kinect: cast sizeof to int for comparison

Comparing an int to a size, which is unsigned, causes the int to become
unsigned, giving the wrong result.  kinect_read returns the result of
usb_control_msg, which can return a negtive error code.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
int x;
expression e,e1;
identifier f;
@@

*x = f(...);
... when != x = e1
    when != if (x < 0 || ...) { ... return ...; }
*x < sizeof(e)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: tw686x: Fix oops on buffer alloc failure
Krzysztof Ha?asa [Thu, 28 Jun 2018 21:45:07 +0000 (17:45 -0400)]
media: tw686x: Fix oops on buffer alloc failure

The error path currently calls tw686x_video_free() which requires
vc->dev to be initialized, causing a NULL dereference on uninitizalized
channels.

Fix this by setting the vc->dev fields for all the channels first.

Fixes: f8afaa8dbc0d ("[media] tw686x: Introduce an interface to support multiple DMA modes")
Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: video-i2c: add hwmon support for amg88xx
Matt Ranostay [Thu, 28 Jun 2018 18:11:04 +0000 (14:11 -0400)]
media: video-i2c: add hwmon support for amg88xx

AMG88xx has an on-board thermistor which is used for more accurate
processing of its temperature readings from the 8x8 thermopile array

Cc: linux-hwmon@vger.kernel.org
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: coda: add missing h.264 levels
Philipp Zabel [Thu, 28 Jun 2018 11:01:47 +0000 (07:01 -0400)]
media: coda: add missing h.264 levels

This enables reordering support for h.264 main profile level 4.2,
5.0, and 5.1 streams. Even though we likely can't play back such
streams at full speed, we should still recognize them correctly.

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+samsung@kernel.org>
6 years agomedia: coda: use encoder crop rectangle to set visible width and height
Philipp Zabel [Thu, 28 Jun 2018 10:57:54 +0000 (06:57 -0400)]
media: coda: use encoder crop rectangle to set visible width and height

Allow to set a crop rectangle on the encoder output queue to set the
visible resolution as required by the V4L2 codec API.

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+samsung@kernel.org>
6 years agomedia: coda: streamline framebuffer size calculation a bit
Philipp Zabel [Thu, 28 Jun 2018 10:57:53 +0000 (06:57 -0400)]
media: coda: streamline framebuffer size calculation a bit

Remove the intermediate width and height variables, the calculation is
simple enough.

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+samsung@kernel.org>
6 years agomedia: coda: move framebuffer size calculation out of loop
Philipp Zabel [Thu, 28 Jun 2018 10:57:52 +0000 (06:57 -0400)]
media: coda: move framebuffer size calculation out of loop

All internal YCbCr frame buffers are the same size, calculate ycbcr_size
once before the allocation loop.

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+samsung@kernel.org>
6 years agomedia: vicodec: add the virtual codec driver
Hans Verkuil [Fri, 20 Jul 2018 07:52:50 +0000 (03:52 -0400)]
media: vicodec: add the virtual codec driver

Add the virtual codec driver that uses the Fast Walsh Hadamard Transform.

Keiichi Watanabe contributed the multiplanar support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Co-Developed-by: Keiichi Watanabe <keiichiw@chromium.org>
Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: vicodec: add the FWHT software codec
Hans Verkuil [Fri, 20 Jul 2018 07:49:21 +0000 (03:49 -0400)]
media: vicodec: add the FWHT software codec

Add a software codec based on the Fast Walsh Hadamard Transform.

The original FWHT codec was developed by Tom aan de Wiel, and it was
turned into 'proper' kernel code by Hans Verkuil, with a lot of
performance and memory improvements.

Signed-off-by: Tom aan de Wiel <tom.aandewiel@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: v4l2-mem2mem: add v4l2_m2m_last_buf()
Hans Verkuil [Tue, 26 Jun 2018 13:26:52 +0000 (09:26 -0400)]
media: v4l2-mem2mem: add v4l2_m2m_last_buf()

This can be used to mark the last queued source buffer as the last
buffer.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: videodev.h: add PIX_FMT_FWHT for use with vicodec
Hans Verkuil [Wed, 4 Jul 2018 14:13:47 +0000 (10:13 -0400)]
media: videodev.h: add PIX_FMT_FWHT for use with vicodec

Add a new pixelformat for the vicodec software codec using the
Fast Walsh Hadamard Transform.

Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: media.h: add encoder/decoder functions for codecs
Hans Verkuil [Wed, 4 Jul 2018 14:13:47 +0000 (10:13 -0400)]
media: media.h: add encoder/decoder functions for codecs

Add MEDIA_ENT_F_PROC_VIDEO_EN/DECODER to be used for the encoder
and decoder entities of codec hardware.

[mchehab+samsung@kernel.org: split description on two senteces by adding dots]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: media-ioc-enum-entities.rst/-g-topology.rst: clarify ID/name usage
Hans Verkuil [Fri, 29 Jun 2018 11:31:20 +0000 (07:31 -0400)]
media: media-ioc-enum-entities.rst/-g-topology.rst: clarify ID/name usage

Mention that IDs should not be hardcoded in applications and that the
entity name must be unique within the media topology.

Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: media-ioc-enum-links.rst: improve pad index description
Hans Verkuil [Fri, 29 Jun 2018 11:29:52 +0000 (07:29 -0400)]
media: media-ioc-enum-links.rst: improve pad index description

Make it clearer that the index starts at 0.

Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: media/i2c: add missing entity functions
Hans Verkuil [Mon, 18 Jun 2018 09:10:28 +0000 (05:10 -0400)]
media: media/i2c: add missing entity functions

Several drivers in media/i2c do not set the entity function.
Correct this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: adv7180/tvp514x/tvp7002: fix entity function
Hans Verkuil [Mon, 18 Jun 2018 09:09:45 +0000 (05:09 -0400)]
media: adv7180/tvp514x/tvp7002: fix entity function

The entity function was ORed with the flags field instead of
assigned to the function field. Correct this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: ad9389b/adv7511: set proper media entity function
Hans Verkuil [Mon, 18 Jun 2018 09:08:20 +0000 (05:08 -0400)]
media: ad9389b/adv7511: set proper media entity function

These two drivers both have function MEDIA_ENT_F_DV_ENCODER.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: media.h: reorder video en/decoder functions
Hans Verkuil [Thu, 28 Jun 2018 13:03:42 +0000 (09:03 -0400)]
media: media.h: reorder video en/decoder functions

Keep the function defines in numerical order: 0x6000 comes after
0x2000, so move it back.

Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: media.h: add MEDIA_ENT_F_DV_ENCODER
Hans Verkuil [Mon, 18 Jun 2018 09:07:43 +0000 (05:07 -0400)]
media: media.h: add MEDIA_ENT_F_DV_ENCODER

Add a new function for digital video encoders such as HDMI transmitters.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: rename MEDIA_ENT_F_DTV_DECODER to MEDIA_ENT_F_DV_DECODER
Hans Verkuil [Thu, 28 Jun 2018 12:56:02 +0000 (08:56 -0400)]
media: rename MEDIA_ENT_F_DTV_DECODER to MEDIA_ENT_F_DV_DECODER

The use of 'DTV' is very confusing since it normally refers to Digital
TV e.g. DVB etc.

Instead use 'DV' (Digital Video), which nicely corresponds to the
DV Timings API used to configure such receivers and transmitters.

We keep an alias to avoid breaking userspace applications.

Since this alias is only available if __KERNEL__ is *not* defined
(i.e. it is only available for userspace, not kernelspace), any
drivers that use it also have to be converted to the new define.
These drivers are adv7604, adv7842 and tda1997x.

Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: media-ioc-g-topology.rst: document new 'flags' field
Hans Verkuil [Mon, 19 Mar 2018 15:17:17 +0000 (11:17 -0400)]
media: media-ioc-g-topology.rst: document new 'flags' field

Document the new struct media_v2_entity 'flags' field.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: add flags field to struct media_v2_entity
Hans Verkuil [Wed, 28 Feb 2018 10:41:11 +0000 (05:41 -0500)]
media: add flags field to struct media_v2_entity

The v2 entity structure never exposed the entity flags, which made it
impossible to detect connector or default entities.

It is really trivial to just expose this information, so implement this.

Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: media-ioc-g-topology.rst: document new 'index' field
Hans Verkuil [Mon, 19 Mar 2018 15:11:10 +0000 (11:11 -0400)]
media: media-ioc-g-topology.rst: document new 'index' field

Document the new struct media_v2_pad 'index' field.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: add 'index' to struct media_v2_pad
Hans Verkuil [Tue, 27 Feb 2018 12:24:09 +0000 (07:24 -0500)]
media: add 'index' to struct media_v2_pad

The v2 pad structure never exposed the pad index, which made it impossible
to call the MEDIA_IOC_SETUP_LINK ioctl, which needs that information.

It is really trivial to just expose this information, so implement this.

Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: cec-gpio: support 5v testing
Hans Verkuil [Thu, 28 Jun 2018 11:44:03 +0000 (07:44 -0400)]
media: cec-gpio: support 5v testing

Add support for the new (optional) 5V gpio in order to debug 5V
changes. Some displays turn off CEC if the 5V is not detected,
so it is useful to be able to monitor this line.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: cec: add support for 5V signal testing
Hans Verkuil [Thu, 28 Jun 2018 11:43:46 +0000 (07:43 -0400)]
media: cec: add support for 5V signal testing

Add support for the new 5V CEC events

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: uapi/linux/cec.h: add 5V events
Hans Verkuil [Thu, 28 Jun 2018 11:43:26 +0000 (07:43 -0400)]
media: uapi/linux/cec.h: add 5V events

Add two new events to signal when the 5V line goes high or low.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: cec-ioc-dqevent.rst: document the new 5V events
Hans Verkuil [Thu, 28 Jun 2018 14:07:41 +0000 (10:07 -0400)]
media: cec-ioc-dqevent.rst: document the new 5V events

Document the two new 5V events.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: cec-gpio.txt: add v5-gpios for testing the 5V line
Hans Verkuil [Thu, 28 Jun 2018 11:42:57 +0000 (07:42 -0400)]
media: cec-gpio.txt: add v5-gpios for testing the 5V line

In order to debug the HDMI 5V line we need to add a new v5-gpios
property.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: v4l: rcar_fdp1: Enable compilation on Gen2 platforms
Laurent Pinchart [Wed, 11 Jul 2018 14:23:32 +0000 (10:23 -0400)]
media: v4l: rcar_fdp1: Enable compilation on Gen2 platforms

Commit 1d3897143815 ("[media] v4l: rcar_fdp1: add FCP dependency") fixed
a compilation breakage when the optional VIDEO_RENESAS_FCP dependency is
compiled as a module while the rcar_fdp1 driver is built in. As a side
effect it disabled compilation on Gen2 by disallowing the valid
combination ARCH_RENESAS && !VIDEO_RENESAS_FCP. Fix it by handling the
dependency the same way the vsp1 driver did in commit 199946731fa4
("[media] vsp1: clarify FCP dependency").

Fixes: 1d3897143815 ("[media] v4l: rcar_fdp1: add FCP dependency")
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: platform: meson-ao-cec: make busy TX warning silent
Neil Armstrong [Tue, 10 Jul 2018 13:44:57 +0000 (09:44 -0400)]
media: platform: meson-ao-cec: make busy TX warning silent

Switch to dev_dbg for the busy TX message to avoid having a flood of:
[  228.064570] meson-ao-cec c8100100.cec: meson_ao_cec_transmit: busy TX: aborting
[  230.368489] meson-ao-cec c8100100.cec: meson_ao_cec_transmit: busy TX: aborting
[  234.208655] meson-ao-cec c8100100.cec: meson_ao_cec_transmit: busy TX: aborting
[  236.512558] meson-ao-cec c8100100.cec: meson_ao_cec_transmit: busy TX: aborting

This message is only a debug hint and not an error.

Fixes: 7ec2c0f72cb1 ("media: platform: Add Amlogic Meson AO CEC Controller driver")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: videobuf2-core: check for q->error in vb2_core_qbuf()
Hans Verkuil [Thu, 5 Jul 2018 08:25:19 +0000 (04:25 -0400)]
media: videobuf2-core: check for q->error in vb2_core_qbuf()

The vb2_core_qbuf() function didn't check if q->error was set. It is
checked in __buf_prepare(), but that function isn't called if the buffer
was already prepared before with VIDIOC_PREPARE_BUF.

So check it at the start of vb2_core_qbuf() as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: sh: migor: Remove stale soc_camera include
Jacopo Mondi [Wed, 4 Jul 2018 10:15:46 +0000 (06:15 -0400)]
media: sh: migor: Remove stale soc_camera include

Remove a stale inclusion for the soc_camera header.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: mem2mem: Make .job_abort optional
Ezequiel Garcia [Mon, 18 Jun 2018 04:38:52 +0000 (00:38 -0400)]
media: mem2mem: Make .job_abort optional

Implementing job_abort() does not make sense on some drivers.
This is not a problem, as the abort is not required to
wait for the job to finish. Quite the opposite, drivers
are encouraged not to wait.

Demote v4l2_m2m_ops.job_abort from required to optional, and
clean all drivers with dummy implementations.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: s5p-g2d: Remove unrequired wait in .job_abort
Ezequiel Garcia [Mon, 18 Jun 2018 04:38:51 +0000 (00:38 -0400)]
media: s5p-g2d: Remove unrequired wait in .job_abort

As per the documentation, job_abort is not required
to wait until the current job finishes. It is redundant
to do so, as the core will perform the wait operation.

Remove the wait infrastructure completely.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: rcar_jpu: Remove unrequired wait in .job_abort
Ezequiel Garcia [Mon, 18 Jun 2018 04:38:50 +0000 (00:38 -0400)]
media: rcar_jpu: Remove unrequired wait in .job_abort

As per the documentation, job_abort is not required
to wait until the current job finishes. It is redundant
to do so, as the core will perform the wait operation.

Remove the wait infrastructure completely.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Acked-by: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: video-mux: fix compliance failures
Philipp Zabel [Thu, 24 May 2018 14:50:44 +0000 (10:50 -0400)]
media: video-mux: fix compliance failures

Limit frame sizes to the [1, 65536] interval, media bus formats to
the available list of formats, and initialize pad and try formats.

Reported-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Rui Miguel Silva <rui.silva@linaro.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: v4l: Add support for STD ioctls on subdev nodes
Niklas Söderlund [Thu, 17 May 2018 14:30:16 +0000 (10:30 -0400)]
media: v4l: Add support for STD ioctls on subdev nodes

There is no way to control the standard of subdevices which are part of
a media device. The ioctls which exists all target video devices
explicitly and the idea is that the video device should talk to the
subdevice. For subdevices part of a media graph this is not possible and
the standard must be controlled on the subdev device directly.

Add four new ioctls to be able to directly interact with subdevices and
control the video standard; VIDIOC_SUBDEV_ENUMSTD, VIDIOC_SUBDEV_G_STD,
VIDIOC_SUBDEV_S_STD and VIDIOC_SUBDEV_QUERYSTD.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: v4l: i2c: Replace "sensor-level" by "sensor"
Sakari Ailus [Mon, 16 Jul 2018 15:20:33 +0000 (11:20 -0400)]
media: v4l: i2c: Replace "sensor-level" by "sensor"

A lot of sensor drivers are labelled as "sensor-level" drivers. That's
odd and somewhat confusing as the term isn't used elsewhere: these are
just sensor drivers. Call them such.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: i2c: ov7670: Put ep fwnode after use
Jacopo Mondi [Thu, 31 May 2018 17:35:03 +0000 (13:35 -0400)]
media: i2c: ov7670: Put ep fwnode after use

The just parsed endpoint fwnode has to be put after use.
Currently this is done only in error handling path. Fix that by
putting node unconditionally after use.

Fixes: 01b8444828fc ("media: v4l2: i2c: ov7670: Implement OF mbus configuration")
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: ov5645: Supported external clock is 24MHz
Todor Tomov [Mon, 18 Jun 2018 08:06:58 +0000 (04:06 -0400)]
media: ov5645: Supported external clock is 24MHz

The external clock frequency was set to 23.88MHz by mistake
because of a platform which cannot get closer to 24MHz.
The supported by the driver external clock is 24MHz so
set it correctly and also fix the values of the pixel
clock and link clock.
However allow 1% tolerance to the external clock as this
difference is small enough to be insignificant.

Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: rcar-vin: Handle data-enable polarity
Jacopo Mondi [Mon, 9 Jul 2018 14:19:21 +0000 (10:19 -0400)]
media: rcar-vin: Handle data-enable polarity

Handle data-enable signal polarity. If the polarity is not specifically
requested to be active low, use the active high default.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: dt-bindings: media: rcar-vin: Add 'data-enable-active'
Jacopo Mondi [Mon, 9 Jul 2018 14:19:20 +0000 (10:19 -0400)]
media: dt-bindings: media: rcar-vin: Add 'data-enable-active'

Describe optional endpoint property 'data-enable-active' for R-Car VIN.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: v4l2-fwnode: parse 'data-enable-active' prop
Jacopo Mondi [Mon, 9 Jul 2018 14:19:19 +0000 (10:19 -0400)]
media: v4l2-fwnode: parse 'data-enable-active' prop

Parse the newly defined 'data-enable-active' property in parallel
endpoint parsing function.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: dt-bindings: media: Document data-enable-active property
Jacopo Mondi [Mon, 9 Jul 2018 14:19:18 +0000 (10:19 -0400)]
media: dt-bindings: media: Document data-enable-active property

Add 'data-enable-active' property to endpoint node properties list.

The property allows to specify the polarity of the data-enable signal,
which when in active state determinates when data lines have to sampled
for valid pixel data.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: dt-bindings: media: rcar-vin: Describe optional ep properties
Jacopo Mondi [Mon, 9 Jul 2018 14:19:17 +0000 (10:19 -0400)]
media: dt-bindings: media: rcar-vin: Describe optional ep properties

Describe the optional endpoint properties for endpoint nodes of the R-Car
VIN interface device tree bindings documentation.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: dt-bindings: media: rcar-vin: Align Gen2 and Gen3
Jacopo Mondi [Mon, 9 Jul 2018 14:19:16 +0000 (10:19 -0400)]
media: dt-bindings: media: rcar-vin: Align Gen2 and Gen3

Align description of the Gen2 and Gen3 bindings for parallel input.
This commit prepares for description of optional endpoint properties in ports
subnodes accepting parallel video connections.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: smiapp: fix debug message
Luca Ceresoli [Thu, 5 Jul 2018 14:41:11 +0000 (10:41 -0400)]
media: smiapp: fix debug message

ask_h gets printed here instead of ask_w.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: ov5640: do not change mode if format or frame interval is unchanged
Hugues Fruchet [Wed, 4 Jul 2018 13:04:38 +0000 (09:04 -0400)]
media: ov5640: do not change mode if format or frame interval is unchanged

Save load of mode registers array when V4L2 client sets a format or a
frame interval which selects the same mode than the current one.

Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: smiapp: Set correct MODULE_LICENSE
Sakari Ailus [Tue, 3 Jul 2018 13:54:39 +0000 (09:54 -0400)]
media: smiapp: Set correct MODULE_LICENSE

The smiapp driver is licensed under GNU GPL v2 only, as stated by the
header. Reflect this in the MODULE_LICENSE macro.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: bpf: ensure bpf program is freed on detach
Sean Young [Wed, 4 Jul 2018 14:57:58 +0000 (10:57 -0400)]
media: bpf: ensure bpf program is freed on detach

Currently we are leaking bpf programs when they are detached from the
lirc device; the refcount never reaches zero.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: exynos4-is: Prevent NULL pointer dereference in __isp_video_try_fmt()
Sylwester Nawrocki [Tue, 15 May 2018 09:21:45 +0000 (05:21 -0400)]
media: exynos4-is: Prevent NULL pointer dereference in __isp_video_try_fmt()

This patch fixes potential NULL pointer dereference as indicated
by the following static checker warning:

drivers/media/platform/exynos4-is/fimc-isp-video.c:408 isp_video_try_fmt_mplane()
error: NULL dereference inside function '__isp_video_try_fmt(isp, &f->fmt.pix_mp, (0))()'.

Fixes: 34947b8aebe3: ("[media] exynos4-is: Add the FIMC-IS ISP capture DMA driver")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: platform: s5p-mfc: simplify getting .drvdata
Wolfram Sang [Thu, 19 Apr 2018 14:05:57 +0000 (10:05 -0400)]
media: platform: s5p-mfc: simplify getting .drvdata

We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: platform: exynos4-is: simplify getting .drvdata
Wolfram Sang [Thu, 19 Apr 2018 14:05:56 +0000 (10:05 -0400)]
media: platform: exynos4-is: simplify getting .drvdata

We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: tuner-simple: allow setting mono radio mode
Maciej S. Szmigiero [Mon, 2 Jul 2018 21:23:24 +0000 (17:23 -0400)]
media: tuner-simple: allow setting mono radio mode

For some types of tuners (Philips FMD1216ME(X) MK3 currently) we know that
letting TDA9887 output port 1 remain high (inactive) will switch FM radio
to mono mode.
Let's make use of this functionality - nothing changes for the default
stereo radio mode.

Tested on a Medion 95700 board which has a FMD1216ME tuner.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: cx25840: add kernel-doc description of struct cx25840_state
Maciej S. Szmigiero [Mon, 2 Jul 2018 21:23:22 +0000 (17:23 -0400)]
media: cx25840: add kernel-doc description of struct cx25840_state

This commit describes a device instance private data of the driver
(struct cx25840_state) in a kernel-doc style comment.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: ivtv: zero-initialize cx25840 platform data
Maciej S. Szmigiero [Mon, 2 Jul 2018 21:23:21 +0000 (17:23 -0400)]
media: ivtv: zero-initialize cx25840 platform data

We need to zero-initialize cx25840 platform data structure to make sure
that its future members do not contain random stack garbage.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: mtk-vcodec: Support VP9 profile in decoder
Keiichi Watanabe [Mon, 18 Jun 2018 07:58:54 +0000 (03:58 -0400)]
media: mtk-vcodec: Support VP9 profile in decoder

Add V4L2_CID_MPEG_VIDEO_VP9_PROFILE control in MediaTek decoder's
driver. MediaTek decoder only supports profile 0 for now.

Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: v4l2-ctrl: Add control for VP9 profile
Keiichi Watanabe [Mon, 18 Jun 2018 07:58:53 +0000 (03:58 -0400)]
media: v4l2-ctrl: Add control for VP9 profile

Add a new control V4L2_CID_MPEG_VIDEO_VP9_PROFILE for VP9 profiles. This control
allows selecting the desired profile for VP9 encoder and querying for supported
profiles by VP9 encoder/decoder.

Though this control is similar to V4L2_CID_MPEG_VIDEO_VP8_PROFILE, we need to
separate this control from it because supported profiles usually differ between
VP8 and VP9.

Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: v4l2-ctrl: Change control for VP8 profile to menu control
Keiichi Watanabe [Mon, 18 Jun 2018 07:58:52 +0000 (03:58 -0400)]
media: v4l2-ctrl: Change control for VP8 profile to menu control

Add a menu control V4L2_CID_MPEG_VIDEO_VP8_PROFILE for VP8 profile and make
V4L2_CID_MPEG_VIDEO_VPX_PROFILE an alias of it. This new control is used to
select the desired profile for VP8 encoder and query for supported profiles by
VP8 encoder/decoder.

Though we have originally a control V4L2_CID_MPEG_VIDEO_VPX_PROFILE and its name
contains 'VPX', it works only for VP8 because supported profiles usually differ
between VP8 and VP9. In addition, this control cannot be used for querying since
it is not a menu control but an integer control, which cannot return an
arbitrary set of supported profiles.

The new control V4L2_CID_MPEG_VIDEO_VP8_PROFILE is a menu control as with
controls for other codec profiles. (e.g. H264)

In addition, this patch also fixes the use of V4L2_CID_MPEG_VIDEO_VPX_PROFILE in
drivers of Qualcomm's venus and Samsung's s5p-mfc.

Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: imx: add support for RGB565_2X8 on parallel bus
Jan Luebbe [Fri, 18 May 2018 13:56:39 +0000 (09:56 -0400)]
media: imx: add support for RGB565_2X8 on parallel bus

The IPU can only capture RGB565 with two 8-bit cycles in bayer/generic
mode on the parallel bus, compared to a specific mode on MIPI CSI-2.
To handle this, we extend imx_media_pixfmt with a cycles per pixel
field, which is used for generic formats on the parallel bus.

Based on the selected format and bus, we then update the width to
account for the multiple cycles per pixel.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.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+samsung@kernel.org>
6 years agomedia: imx: capture: refactor enum_/try_fmt
Jan Luebbe [Fri, 18 May 2018 13:56:38 +0000 (09:56 -0400)]
media: imx: capture: refactor enum_/try_fmt

By checking and handling the internal IPU formats (ARGB or AYUV) first,
we don't need to check whether it's a bayer format, as we can default to
passing the input format on in all other cases.

This simplifies handling the different configurations for RGB565 between
parallel and MIPI CSI-2, as we don't need to check the details of the
format anymore.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: staging/imx: fill vb2_v4l2_buffer sequence entry
Peter Seiderer [Thu, 15 Mar 2018 19:13:23 +0000 (15:13 -0400)]
media: staging/imx: fill vb2_v4l2_buffer sequence entry

- enables gstreamer v4l2src lost frame detection, e.g:

  0:00:08.685185668  348  0x54f520 WARN  v4l2src gstv4l2src.c:970:gst_v4l2src_create:<v4l2src0> lost frames detected: count = 141 - ts: 0:00:08.330177332

- fixes v4l2-compliance test failure:

  Streaming ioctls:
          test read/write: OK (Not Supported)
              Video Capture:
                  Buffer: 0 Sequence: 0 Field: None Timestamp: 92.991450s
                  Buffer: 1 Sequence: 0 Field: None Timestamp: 93.008135s
                  fail: v4l2-test-buffers.cpp(294): (int)g_sequence() < seq.last_seq + 1
                  fail: v4l2-test-buffers.cpp(707): buf.check(q, last_seq)

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: staging/imx: fill vb2_v4l2_buffer field entry
Peter Seiderer [Thu, 15 Mar 2018 19:13:22 +0000 (15:13 -0400)]
media: staging/imx: fill vb2_v4l2_buffer field entry

- fixes gstreamer v4l2src warning:

  0:00:00.716640334  349  0x164f720 WARN  v4l2bufferpool gstv4l2bufferpool.c:1195:gst_v4l2_buffer_pool_dqbuf:<v4l2src0:pool:src> Driver should never set v4l2_buffer.field to ANY

- fixes v4l2-compliance test failure:

  Streaming ioctls:
          test read/write: OK (Not Supported)
              Video Capture:
                  Buffer: 0 Sequence: 0 Field: Any Timestamp: 58.383658s
                  fail: v4l2-test-buffers.cpp(297): g_field() == V4L2_FIELD_ANY

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: dt-bindings: media: rcar-vin: Add R8A77995 support
Jacopo Mondi [Wed, 4 Jul 2018 08:51:36 +0000 (04:51 -0400)]
media: dt-bindings: media: rcar-vin: Add R8A77995 support

Add compatible string for R-Car D3 R8A7795 to list of SoCs supported by
rcar-vin driver.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: rcar-vin: Add support for R-Car R8A77995 SoC
Jacopo Mondi [Tue, 12 Jun 2018 09:43:32 +0000 (05:43 -0400)]
media: rcar-vin: Add support for R-Car R8A77995 SoC

Add R-Car R8A77995 SoC to the rcar-vin supported ones.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: rcar-vin: Rename _rcar_info to rcar_info
Jacopo Mondi [Tue, 12 Jun 2018 09:43:31 +0000 (05:43 -0400)]
media: rcar-vin: Rename _rcar_info to rcar_info

Remove leading underscore to align all rcar_group_route structure
declarations.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: rcar-vin: Handle parallel subdev in link_notify
Jacopo Mondi [Tue, 12 Jun 2018 09:43:30 +0000 (05:43 -0400)]
media: rcar-vin: Handle parallel subdev in link_notify

Handle parallel subdevices in link_notify callback. If the notified link
involves a parallel subdevice, do not change routing of the VIN-CSI-2
devices and mark the VIN instance as using a parallel input. If the
CSI-2 link setup succeeds instead, mark the VIN instance as using CSI-2.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: rcar-vin: Link parallel input media entities
Jacopo Mondi [Tue, 12 Jun 2018 09:43:29 +0000 (05:43 -0400)]
media: rcar-vin: Link parallel input media entities

When running with media-controller link the parallel input
media entities with the VIN entities at 'complete' callback time.

To create media links the v4l2_device should be registered first.
Check if the device is already registered, to avoid double registrations.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
6 years agomedia: rcar-vin: Parse parallel input on Gen3
Jacopo Mondi [Tue, 12 Jun 2018 09:43:28 +0000 (05:43 -0400)]
media: rcar-vin: Parse parallel input on Gen3

The rcar-vin driver so far had a mutually exclusive code path for
handling parallel and CSI-2 video input subdevices, with only the CSI-2
use case supporting media-controller. As we add support for parallel
inputs to Gen3 media-controller compliant code path now parse both port@0
and port@1, handling the media-controller use case in the parallel
bound/unbind notifier operations.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>