media: xilinx: vipp: Add devicetree bindings documentation

Add devicetree bindings documentation for the Xilinx Video IP pipeline driver.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Revert "media: xilinx: dma: Workaround for bytesperline"

This reverts commit b4859c939e1febb638e23accc1c3a66b72e10ccc.
Zynq Base TRD LogiCVC DRM integration requires programming
bytesperline field i.e stride is not same as width.
So we need to get rid of this workaround and send mplayer
fix to its mailing list.

Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: Added DMA error handling

Validate dma tx descriptor returned from
dmaengine_prep_slave_single() and reports
error if any.
Next dequeue operation fails with -ENODEV

Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: Fix error handling

Fix error handling in xvip_graph_dma_init()
Avoid multiple free of vb2 dma context

Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
media: xilinx: Reordered mutexes initialization

Reordered mutexes initialization so that there is no
need of destroying mutex incase media_entity_init()
fails.

Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
media: xilinx: Fix "Reordered mutexes init" commit

Follow Up Flag: Follow up
Flag Status: Flagged

Restored earlier mutexes initialization
sequence and instead fix error handling for
media_entity_init.

Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
media: xilinx: Set format description in enum_fmt

Add a description field to the xvip_video_format structure and use it to
fill the format description during format enumeration.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
v4l2-ctrls: Add unlocked version of v4l2_ctrl_modify_range

The new control range might depend on the value of the same or another
control. Drivers thus need to read control values and modify the range
atomically, which requires locking the control handler manually outside
of v4l2_ctrl_modify_range().

Remove control handler locking from v4l2_ctrl_modify_range(), rename it
to __v4l2_ctrl_modify_range() and add a static inline wrapper called
v4l2_ctrl_modify_range() that locks the control handler.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
media: xilinx: tpg: Default to the color bars test pattern

Accessing the TPG registers requires an external input clock, otherwise
an external abort exception will be triggered.

Defaulting to passthrough mode switches the timing mux to the external
clock at initialization time. If the external clock isn't provided (for
instance because the input hardware is disconnected), this results in a
kernel crash when the TPG is initialized.

Fix this by defaulting to a test pattern.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
media: xilinx: tpg: Disallow switching passthrough mode during streaming

Due to the externally supplied video timings, passthrough mode can't be
switched during video streaming, as the switch wouldn't be synchronized
to vertical sync. Allow modifying the test pattern while the stream is
active, but keep passthrough mode configuration fixed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
media: xilinx: tpg: Make horizontal and vertical blanking configurable

In order to match the capture frame rate with the display frame rate,
video timings need to be configurable by userspace. Expose the
horizontal and vertical blanking through controls. The synchronization
pulses widths and locations don't matter for all practical purposes,
hardcode them to working values.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
media: xilinx: tpg: Ignore unconnected input ports

When the TPG is synthesized with an input port without any input
connected, passthrough mode must not be enabled otherwise an external
abort exception will be generated. To ensure correct operation don't
allow passthrough mode when the input port doesn't have an endpoint.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[HACK] media: xilinx: Apply TPG reset on stop.

Added hack to apply TPG reset on
pipeline stop.
In current setup both vdma and TPG
are resetted. Since vdma is synced
with SOF of TPG ideally we shouldnt
need a reset.
It needs to be fixed!

Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
media: xilinx: Add HLS core driver

Follow Up Flag: Follow up
Flag Status: Flagged

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[HACK] media: xilinx: Hard code HLS Sobel filter coefficients

Program filter coefficients for now till
we get v4l2 user plugin implemented.

Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
adv7604: Update recommended writes for the adv7611

Update the recommended writes to those mentioned in the Rev 1.5 version of the
ADV7611 Register Settings Recommendations document released by Analog Devices.
The document does not mention why the recommended settings have been updated,
but presumably those are more fine tuned settings that can enhance performance
in some cases.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
zynq: config: add vdf defconfig

enable sobel driver
zynq: dt: add devicetrees for base trd and vdf designs