diff options
| author | Steve Longerbeam <slongerbeam@gmail.com> | 2016-07-19 21:11:00 -0400 |
|---|---|---|
| committer | Philipp Zabel <p.zabel@pengutronix.de> | 2016-08-08 05:44:20 -0400 |
| commit | e5e8690ff0cd88e42153fbefcbfcbdb726a1a283 (patch) | |
| tree | c9c2f45bfee3d8d42b682760d09b5b7ba8758146 | |
| parent | 8892cc899e15fb896231539c902b813c3f7ab915 (diff) | |
gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset()
Adds ipu_cpmem_set_uv_offset(), to set planar U/V offsets.
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| -rw-r--r-- | drivers/gpu/ipu-v3/ipu-cpmem.c | 7 | ||||
| -rw-r--r-- | include/video/imx-ipu-v3.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c index 6494a4d28171..a36c35e04a6d 100644 --- a/drivers/gpu/ipu-v3/ipu-cpmem.c +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c | |||
| @@ -253,6 +253,13 @@ void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf) | |||
| 253 | } | 253 | } |
| 254 | EXPORT_SYMBOL_GPL(ipu_cpmem_set_buffer); | 254 | EXPORT_SYMBOL_GPL(ipu_cpmem_set_buffer); |
| 255 | 255 | ||
| 256 | void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off) | ||
| 257 | { | ||
| 258 | ipu_ch_param_write_field(ch, IPU_FIELD_UBO, u_off / 8); | ||
| 259 | ipu_ch_param_write_field(ch, IPU_FIELD_VBO, v_off / 8); | ||
| 260 | } | ||
| 261 | EXPORT_SYMBOL_GPL(ipu_cpmem_set_uv_offset); | ||
| 262 | |||
| 256 | void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride) | 263 | void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride) |
| 257 | { | 264 | { |
| 258 | ipu_ch_param_write_field(ch, IPU_FIELD_SO, 1); | 265 | ipu_ch_param_write_field(ch, IPU_FIELD_SO, 1); |
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 7adeaae06961..69c86585452a 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h | |||
| @@ -184,6 +184,7 @@ void ipu_cpmem_set_resolution(struct ipuv3_channel *ch, int xres, int yres); | |||
| 184 | void ipu_cpmem_set_stride(struct ipuv3_channel *ch, int stride); | 184 | void ipu_cpmem_set_stride(struct ipuv3_channel *ch, int stride); |
| 185 | void ipu_cpmem_set_high_priority(struct ipuv3_channel *ch); | 185 | void ipu_cpmem_set_high_priority(struct ipuv3_channel *ch); |
| 186 | void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf); | 186 | void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf); |
| 187 | void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off); | ||
| 187 | void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride); | 188 | void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride); |
| 188 | void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id); | 189 | void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id); |
| 189 | void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize); | 190 | void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize); |
