summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorJason Chen <b02280@freescale.com>2011-11-16 17:29:19 +0800
committerJason Liu <r64343@freescale.com>2012-01-09 21:06:55 +0800
commit6058de24e2a6dbbdd5603d34076ab8511d3b42f9 (patch)
tree1dbb8bf26793fee768f2af62307231dee4f582c8 /drivers/video
parentda07aab962f6866b0cd85f35053a864651693649 (diff)
ENGR00162358 ipuv3 fb: only check pos when fb is unblank
only check pos when fb is unblank Signed-off-by: Jason Chen <b02280@freescale.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/mxc/mxc_ipuv3_fb.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c
index e7ad13727de5..d1036c805946 100644
--- a/drivers/video/mxc/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc/mxc_ipuv3_fb.c
@@ -1028,17 +1028,20 @@ static int mxcfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
break;
}
- if (fbi->var.xres + pos.x > bg_fbi->var.xres) {
- if (bg_fbi->var.xres < fbi->var.xres)
- pos.x = 0;
- else
- pos.x = bg_fbi->var.xres - fbi->var.xres;
- }
- if (fbi->var.yres + pos.y > bg_fbi->var.yres) {
- if (bg_fbi->var.yres < fbi->var.yres)
- pos.y = 0;
- else
- pos.y = bg_fbi->var.yres - fbi->var.yres;
+ /* if fb is unblank, check if the pos fit the display */
+ if (mxc_fbi->cur_blank == FB_BLANK_UNBLANK) {
+ if (fbi->var.xres + pos.x > bg_fbi->var.xres) {
+ if (bg_fbi->var.xres < fbi->var.xres)
+ pos.x = 0;
+ else
+ pos.x = bg_fbi->var.xres - fbi->var.xres;
+ }
+ if (fbi->var.yres + pos.y > bg_fbi->var.yres) {
+ if (bg_fbi->var.yres < fbi->var.yres)
+ pos.y = 0;
+ else
+ pos.y = bg_fbi->var.yres - fbi->var.yres;
+ }
}
retval = ipu_disp_set_window_pos(mxc_fbi->ipu, mxc_fbi->ipu_ch,