diff options
author | Jason Chen <b02280@freescale.com> | 2011-11-16 17:29:19 +0800 |
---|---|---|
committer | Jason Chen <b02280@freescale.com> | 2011-11-16 17:29:19 +0800 |
commit | 5f25643c41a320bb8f652eefac249a3d1b4fe2f9 (patch) | |
tree | d5ab77717144e8131a1a1d2ad94047febc4be1fd | |
parent | 2ef3c3ac50ce41ae195167e447b17e33b9dc3a79 (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>
-rw-r--r-- | drivers/video/mxc/mxc_ipuv3_fb.c | 25 |
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, |