aboutsummaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorJason Chen <b02280@freescale.com>2011-11-21 10:11:42 +0800
committerEric Miao <eric.miao@linaro.org>2011-12-04 23:14:24 +0800
commit9bb95384af2884e288194c0860644ffeb7758c96 (patch)
treedb7ce60a37a144c72f0db43664a288f8bd16938a /drivers/video
parent84276af5a2a35f0c81d02b529d3424e84f014675 (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>
Diffstat (limited to 'drivers/video')
-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 26725818bc1..f2861bcd563 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;