diff options
| author | Steve Longerbeam <slongerbeam@gmail.com> | 2014-06-25 21:05:51 -0400 |
|---|---|---|
| committer | Philipp Zabel <p.zabel@pengutronix.de> | 2014-09-02 08:55:54 -0400 |
| commit | c42d37ca421aa222e8f27744d4129bce726a3724 (patch) | |
| tree | 46d471309390667beb4bead6b7e6adabc488f502 | |
| parent | 555f0e6690a41245518003c02a1ecb84e4a69281 (diff) | |
gpu: ipu-cpmem: Add ipu_cpmem_set_rotation()
Adds ipu_cpmem_set_rotation().
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 | 10 | ||||
| -rw-r--r-- | include/video/imx-ipu-v3.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c index 2d1b3761f14c..f52e4b4e172f 100644 --- a/drivers/gpu/ipu-v3/ipu-cpmem.c +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c | |||
| @@ -64,6 +64,7 @@ struct ipu_cpmem { | |||
| 64 | #define IPU_FIELD_BNDM IPU_CPMEM_WORD(0, 114, 3) | 64 | #define IPU_FIELD_BNDM IPU_CPMEM_WORD(0, 114, 3) |
| 65 | #define IPU_FIELD_BM IPU_CPMEM_WORD(0, 117, 2) | 65 | #define IPU_FIELD_BM IPU_CPMEM_WORD(0, 117, 2) |
| 66 | #define IPU_FIELD_ROT IPU_CPMEM_WORD(0, 119, 1) | 66 | #define IPU_FIELD_ROT IPU_CPMEM_WORD(0, 119, 1) |
| 67 | #define IPU_FIELD_ROT_HF_VF IPU_CPMEM_WORD(0, 119, 3) | ||
| 67 | #define IPU_FIELD_HF IPU_CPMEM_WORD(0, 120, 1) | 68 | #define IPU_FIELD_HF IPU_CPMEM_WORD(0, 120, 1) |
| 68 | #define IPU_FIELD_VF IPU_CPMEM_WORD(0, 121, 1) | 69 | #define IPU_FIELD_VF IPU_CPMEM_WORD(0, 121, 1) |
| 69 | #define IPU_FIELD_THE IPU_CPMEM_WORD(0, 122, 1) | 70 | #define IPU_FIELD_THE IPU_CPMEM_WORD(0, 122, 1) |
| @@ -273,6 +274,15 @@ void ipu_cpmem_set_block_mode(struct ipuv3_channel *ch) | |||
| 273 | } | 274 | } |
| 274 | EXPORT_SYMBOL_GPL(ipu_cpmem_set_block_mode); | 275 | EXPORT_SYMBOL_GPL(ipu_cpmem_set_block_mode); |
| 275 | 276 | ||
| 277 | void ipu_cpmem_set_rotation(struct ipuv3_channel *ch, | ||
| 278 | enum ipu_rotate_mode rot) | ||
| 279 | { | ||
| 280 | u32 temp_rot = bitrev8(rot) >> 5; | ||
| 281 | |||
| 282 | ipu_ch_param_write_field(ch, IPU_FIELD_ROT_HF_VF, temp_rot); | ||
| 283 | } | ||
| 284 | EXPORT_SYMBOL_GPL(ipu_cpmem_set_rotation); | ||
| 285 | |||
| 276 | int ipu_cpmem_set_format_rgb(struct ipuv3_channel *ch, | 286 | int ipu_cpmem_set_format_rgb(struct ipuv3_channel *ch, |
| 277 | const struct ipu_rgb *rgb) | 287 | const struct ipu_rgb *rgb) |
| 278 | { | 288 | { |
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index f30c06871db7..699e0d8d135b 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h | |||
| @@ -197,6 +197,8 @@ void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride); | |||
| 197 | void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id); | 197 | void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id); |
| 198 | void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize); | 198 | void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize); |
| 199 | void ipu_cpmem_set_block_mode(struct ipuv3_channel *ch); | 199 | void ipu_cpmem_set_block_mode(struct ipuv3_channel *ch); |
| 200 | void ipu_cpmem_set_rotation(struct ipuv3_channel *ch, | ||
| 201 | enum ipu_rotate_mode rot); | ||
| 200 | int ipu_cpmem_set_format_rgb(struct ipuv3_channel *ch, | 202 | int ipu_cpmem_set_format_rgb(struct ipuv3_channel *ch, |
| 201 | const struct ipu_rgb *rgb); | 203 | const struct ipu_rgb *rgb); |
| 202 | int ipu_cpmem_set_format_passthrough(struct ipuv3_channel *ch, int width); | 204 | int ipu_cpmem_set_format_passthrough(struct ipuv3_channel *ch, int width); |
