v4l: xilinx: Add Xilinx Video IP core

Xilinx Zynq platforms have no hardwired camera interface. Users create
camera pipelines in the FPGA fabric to suit their particular needs, by
instantiating video IP cores from a large library.

The Xilinx Video IP core is a framework that models a video pipeline
described in the device tree and expose the pipeline to userspace
through the media controller and V4L2 APIs.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
v4l: xilinx: Add Test Pattern Generator driver

The TPG generates multiple static or dynamic test patterns. The driver
currently hardcodes the pattern to the moving box pattern.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
v4l: xilinx: Add Video Remapper driver

The remapper is a non-configurable IP core that remaps the video bus
data lines. The driver includes a list of mappings and exposes them
through the get and set media bus format operations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
drm: xilinx: crtc: Remove unneccessary labels

Remove unnecessary labels.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
drm: xilinx: plane: Remove unused formats variable

Remove unused the xilinx_drm_plane_formats variable.
The plane format is detected based on the pipeline configuration,
instead of using static variables.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
drm: xilinx: plane: Check framebuffer format with plane format

In xilinx_drm_plane_mode_set(), check the framebuffer format
with the plane format before setting the plane with the framebuffer.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
drm: xilinx: cresample: Remove xilinx_cresample_remove()

xilinx_cresample_remove() is not needed as devm_* managed functions are used.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
drm: xilinx: osd: Remove xilinx_osd_remove()

Remove xilinx_osd_remove() as devm_* managed functions are used
in xilinx_osd.c.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
drm: xilinx: rgb2yuv: Remove xilinx_rgb2yuv_remove()

Remove xilinx_rgb2yuv_remove() as devm_* managed functions are used
in xilinx_rgb2yuv.c.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
drm: xilinx: vtc: Remove xilinx_vtc_remove()

Remove xilinx_vtc_remove() as devm_* managed functions are used
in xilinx_vtc.c.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
drm: xilinx: drv: Add xilinx_drm_format()

Add xilinx_drm_format() which converts the xilinx video format to
the drm format. Replace the previously defined osd video format
with this function / formats. This function can be used by other
sub-drivers.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
drm: xilinx: plane: Add the return code to xilinx_drm_plane_init_manager()

Add the return code to the proto type of xilinx_drm_plane_init_manager()
to detect the error from xilinx_drm_format().

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
drm: xilinx: osd: Add xlnx,video-format dts property

Add xlnx,video-format property. If not specified in dts, the driver reads
the value from register.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
drm: xilinx: cresample: Add input/output video format dts prop

Add input/output video format dts prop. It requires to detect
formats of IP and provide proper information to users.
xilinx_cresample_get_input/output_format() functions are added.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
drm: xilinx: plane: Add xilinx_drm_plane_check_format()

Add xilinx_drm_plane_check_format(), and replace
xilinx_drm_plane_get_format() with it. When fb is allocated, the requested
format is checked by calling this function. This function checks
if the given format is supported by available planes.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
drm: xilinx: plane: Add the 'planes' dts node

Add the 'planes' dts node under xilinx_drm. The IP instances for each plane
can be specified using this node, and this enables to have the same IPs
in 2 locations: 1 before OSD(for plane), and 1 after OSD(for crtc).

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
drm: xilinx: plane: Add rgb2yuv/cresample support

Add to support the pipeline configuration with rgb2yuv and cresample
for each plane. Proper format checking between IP connections is done.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
drm: xilinx: cresample: Add a compatible string

Add a compatible string to the devicetree binding documentation
(Documentation/devicetree/bindings/drm/xilinx/cresample.txt)
as the driver has been tested againt the new version of IP core.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
drm: xilinx: osd: Add a compatible string

Add a compatible string to the devicetree binding documentation
(Documentation/devicetree/bindings/drm/xilinx/osd.txt)
as the driver has been tested againt the new version of IP core.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
drm: xilinx: rgb2yuv: Add a compatible string

Add a compatible string to the devicetree binding documentation
(Documentation/devicetree/bindings/drm/xilinx/rgb2ycrcb.txt)
as the driver has been tested againt the new version of IP core.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>