]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00162358 ipuv3 fb: only check pos when fb is unblank
authorJason Chen <b02280@freescale.com>
Wed, 16 Nov 2011 09:29:19 +0000 (17:29 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:10:03 +0000 (14:10 +0200)
only check pos when fb is unblank

Signed-off-by: Jason Chen <b02280@freescale.com>
drivers/video/mxc/mxc_ipuv3_fb.c

index e7ad13727de5f04137408f9e702470b5d7ea956f..d1036c80594649894caef35d2ce44335d132ca51 100644 (file)
@@ -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,