]> git.karo-electronics.de Git - linux-beck.git/commitdiff
gpu: ipu-cpmem: Add ipu_cpmem_set_rotation()
authorSteve Longerbeam <slongerbeam@gmail.com>
Thu, 26 Jun 2014 01:05:51 +0000 (18:05 -0700)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 2 Sep 2014 12:55:54 +0000 (14:55 +0200)
Adds ipu_cpmem_set_rotation().

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/ipu-v3/ipu-cpmem.c
include/video/imx-ipu-v3.h

index 2d1b3761f14ced9bc0302d2b1e81c6ae54e10b47..f52e4b4e172f7cde17fc95f504ed12a9571784f4 100644 (file)
@@ -64,6 +64,7 @@ struct ipu_cpmem {
 #define IPU_FIELD_BNDM         IPU_CPMEM_WORD(0, 114, 3)
 #define IPU_FIELD_BM           IPU_CPMEM_WORD(0, 117, 2)
 #define IPU_FIELD_ROT          IPU_CPMEM_WORD(0, 119, 1)
+#define IPU_FIELD_ROT_HF_VF    IPU_CPMEM_WORD(0, 119, 3)
 #define IPU_FIELD_HF           IPU_CPMEM_WORD(0, 120, 1)
 #define IPU_FIELD_VF           IPU_CPMEM_WORD(0, 121, 1)
 #define IPU_FIELD_THE          IPU_CPMEM_WORD(0, 122, 1)
@@ -273,6 +274,15 @@ void ipu_cpmem_set_block_mode(struct ipuv3_channel *ch)
 }
 EXPORT_SYMBOL_GPL(ipu_cpmem_set_block_mode);
 
+void ipu_cpmem_set_rotation(struct ipuv3_channel *ch,
+                           enum ipu_rotate_mode rot)
+{
+       u32 temp_rot = bitrev8(rot) >> 5;
+
+       ipu_ch_param_write_field(ch, IPU_FIELD_ROT_HF_VF, temp_rot);
+}
+EXPORT_SYMBOL_GPL(ipu_cpmem_set_rotation);
+
 int ipu_cpmem_set_format_rgb(struct ipuv3_channel *ch,
                             const struct ipu_rgb *rgb)
 {
index f30c06871db70fddaac777f013f3e5f6326fcb36..699e0d8d135b181d4018a3d0bb8581d307598faf 100644 (file)
@@ -197,6 +197,8 @@ void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride);
 void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id);
 void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize);
 void ipu_cpmem_set_block_mode(struct ipuv3_channel *ch);
+void ipu_cpmem_set_rotation(struct ipuv3_channel *ch,
+                           enum ipu_rotate_mode rot);
 int ipu_cpmem_set_format_rgb(struct ipuv3_channel *ch,
                             const struct ipu_rgb *rgb);
 int ipu_cpmem_set_format_passthrough(struct ipuv3_channel *ch, int width);