[hack] media: xilinx: dma: Workaround for bytesperline

Workaround for bytesperline bug from mplayer. The version of mplayer that
was used for demo uses the bytes per line value from the driver.
Since mplayer doesn't change this value, mplayer uses the wrong bytes
per line value, for example, the default value (1920 * 4) for differnt
resolution (640x480).

The best way is to send a patch to mplayer the mailing list, and this doesn't
intend to be included in the kernel tree.
media: xilinx: vip: Add xvip_of_get_formats()

xvip_of_get_formats() takes a dts node, and pares the input and output formats.
This function can be used for IP drivers which can have different input and
output formats. The codes are shared with xvip_of_get_format(), so
xvip_get_format() is added.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- Add xvip_of_get_format() function in this patch
---
media: xilinx: vip: Add default min/max height/width definitions

Add default min/max height/width definitions, min = 32, max = 7680.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- Add comments on default values
---
media: xilinx: vip: Add common sink/source pad IDs

Add common sink/source pad IDs. As commented, IP cores with multiple inputs or
outputs should define their own IDs instead of using these values.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- This patch is split from previous default min/max width/height patch
---
media: xilinx: vip: Add xvip_enum_mbus_code()

media: xilinx: vip: Add xvip_enum_mbus_code(), which enumerate
the mbus code of a subdevice.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- Add documentation in the function description
---
media: xilinx: vip: Add xvip_enum_frame_size()

Add xvip_enum_frame_size(), which enumerates the min/max frame size
of a subdevice.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- Add documentation to function description
---
media: xilinx: vip: Add xvip_set_format_size()

Add xvip_set_format_size() which set the format size.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- Change the prototype of xvip_set_format() as xvip_video_format is not needed
- Change the name from xvip_set_format() to xvip_set_format_size()
- Add to the function description
---
media: xilinx: vip: Add xvip_start()

Add xvip_start(), which starts the IP and enables the reg update.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
media: xilinx: vip: Add xvip_stop()

Add xvip_stop(), which resets and stops the IP.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
media: xilinx: vip: Remove reset in xvip_stop()

Remove reset in xvip_stop(). xvip_stop() just disables the IP core.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- This patch is added
---
media: xilinx: vip: Add xvip_set_frame_size()

Add xvip_set_frame_size(), which sets the frame size of IP.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- Change the function name to xvip_set_frame_size() from xvip_set_size()
---
media: xilinx: vip: Add enable/disable reg update functions

Add xvip_enable_reg_update() and xvip_disable_reg_update().
Sometimes drivers need to enable and disable register update for atomicity.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
media: xilinx: vip: Add xvip_print_version()

xvip_print_version() reads the version info from the standard register,
and print the version information (major, minor, revision) of IP.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
media: xilinx: vip: Add xvip_get_frame_size()

xvip_get_frame_size() reads the active size and returns the width and height.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
media: xilinx: tpg: Add controls for TPG

Add controls for TPG. Controls include motion, speed, noise, stuck pixel,
and etc. These controls are exposed to users to configure.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- Define control IDs in .c instead of in the header
- Correct the masking of HOR/VER_SPEED register
- Fix register fields namings
- Remove _MASK/_OFFSET for 1 bit register fields
- Squash 'Remove NULL entry at the end of control menu strings' patch
- Remove 'NULL' entry from the control menu string
- Add comments for controls
- Fix 80 char per line warnings
---
media: xilinx: tpg: Change definition names from *_OFFSET to *_SHIFT

Change some definition names from *_OFFSET to *_SHIFT.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
media: xilinx: tpg: Remove hard-coded default width/height

Remove hard-coded default width/height. Width and height are configured
at synthesis time, and correct values can be read from registers.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
media: xilinx: tpg: Fix alignments around __xtpg_get_pad_format()

Fix minor alignments around __xtpg_get_pad_format().

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
media: xilinx: tpg: Change 'format' to 'fmt'

Use the name, 'fmt' for structt v4l2_subdev_format. It's more consistent,
and improves the readability.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- This patch is added
---
media: xilinx: tpg: Add xtpg_init_format()

As the TPG can have different input and output formats, xtpg_init_format()
is added, and called in xtpg_open() and xtpg_probe().

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- Fix a typo 'tpgper' -> 'tpg'
- Change 'format' to 'fmt' for the name of struct v4l2_subdev_format
- Use the fixed format code when initializing formats
- Squash the following fix patch
---