MLK-11881 video: fbdev: mxc ipuv3 fb: Correct ->prefetch in ioctrl SET_PREFETCH
authorLiu Ying <Ying.Liu@freescale.com>
Fri, 20 Nov 2015 05:50:20 +0000 (13:50 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:15 +0000 (14:49 -0500)
When a framebuffer is blanked, the user may call the MXCFB_SET_PREFETCH ioctrl
to enable or disable the prefetch engine.  After sanity check, the cached
->prefetch should reflect the user's intention for next unblank operation
any way instead of checking ->cur_prefetch first.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
drivers/video/fbdev/mxc/mxc_ipuv3_fb.c

index 3af13e6..eb9b2f2 100644 (file)
@@ -2047,15 +2047,15 @@ static int mxcfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
                                }
                        }
 
-                       if (mxc_fbi->cur_prefetch == !!enable)
-                               break;
-
                        retval = mxcfb_check_var(&fbi->var, fbi);
                        if (retval)
                                break;
 
                        mxc_fbi->prefetch = !!enable;
 
+                       if (mxc_fbi->cur_prefetch == mxc_fbi->prefetch)
+                               break;
+
                        fbi->var.activate = (fbi->var.activate & ~FB_ACTIVATE_MASK) |
                                                FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE;
                        retval = mxcfb_set_par(fbi);