summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Chen <b02280@freescale.com>2011-11-21 10:11:42 +0800
committerJason Chen <b02280@freescale.com>2011-11-21 13:50:20 +0800
commit76d49671d00b91b02f49558138fb741a99dc3e70 (patch)
tree5f167e69c18428acf2648d7f812566a8ad377ec7
parent20f8b104f56225f4264a253b082b4093b058872b (diff)
ENGR00162663 ipuv3 fb: add vertical flip support
support vertical flip for fb. just set it by: echo 1 > /sys/class/graphics/fb0/rotate Signed-off-by: Jason Chen <b02280@freescale.com> (cherry picked from commit f4d808735d28ef2e5ef55505e83d1466dd52f4ef)
-rw-r--r--drivers/video/mxc/mxc_ipuv3_fb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c
index 4004ddf10fc9..e669590f979c 100644
--- a/drivers/video/mxc/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc/mxc_ipuv3_fb.c
@@ -241,7 +241,7 @@ static int _setup_disp_channel2(struct fb_info *fbi)
bpp_to_pixfmt(fbi),
fbi->var.xres, fbi->var.yres,
fb_stride,
- IPU_ROTATE_NONE,
+ fbi->var.rotate,
base,
base,
fbi->var.accel_flags &
@@ -259,7 +259,7 @@ static int _setup_disp_channel2(struct fb_info *fbi)
IPU_PIX_FMT_GENERIC,
fbi->var.xres, fbi->var.yres,
fbi->var.xres,
- IPU_ROTATE_NONE,
+ fbi->var.rotate,
mxc_fbi->alpha_phy_addr1,
mxc_fbi->alpha_phy_addr0,
0,
@@ -574,6 +574,9 @@ static int mxcfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
var->yres = bg_yres - pos_y;
}
+ if (var->rotate > IPU_ROTATE_VERT_FLIP)
+ var->rotate = IPU_ROTATE_NONE;
+
if (var->xres_virtual < var->xres)
var->xres_virtual = var->xres;