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>
---
v2
- Do read-update-write
---
media: xilinx: vip: Add xvip_stop()

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

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- Do read-update-write
---
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>
---
v2
- Use xvip_get_frame_size()
---
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 the default format

The default format is initilized when driver is loaded, and used to initialize
formats when the subdevice node is opened.

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
---
media: xilinx: tpg: Fix alignments

Fix minor alignments.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
media: xilinx: tpg: Fix the structure comment

Fix the structure comment to match the structure definition.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- Don't remove empty lines
- Change the commit message
---
media: xilinx: tpg: Use xvip_enum_mbus_code()

Use xvip_enum_mbus_code() instead of own function, xtpg_enum_mbus_code().

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
media: xilinx: tpg: Use xvip_enum_frame_size()

Replace xtpg_enum_frame_size() with xvip_enum_frame_size().

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
media: xilinx: tpg: Use xvip_set_format_size()

Use xvip_set_format_size().

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
---
v2
- Use xvip_set_format_size() instead of deprecated xvip_set_format()
---
media: xilinx: tpg: Use xvip_start()

Use xvip_start().

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

Use xvip_stop().

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