summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2015-11-20 13:50:20 +0800
committerLiu Ying <Ying.Liu@freescale.com>2015-11-20 18:20:07 +0800
commit5f6f0a50e6039370078369ddf380179d59024789 (patch)
tree458cb1c63350b57caa112343fd4602a2bb440ff6
parent0df10a86fa7e2ea6c8269d77239f558aad0e550c (diff)
MLK-11881 video: fbdev: mxc ipuv3 fb: Correct ->prefetch in ioctrl SET_PREFETCHrel_imx_3.14.52_1.1.0_ga
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> (cherry picked from commit 10c7a9454a0e0e9c284f937fe7a8592680aacc11) (cherry picked from commit 0e13ab81aeea682a7dd7b329f4dcf6d7c8116889)
-rw-r--r--drivers/video/mxc/mxc_ipuv3_fb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c
index 3af13e6f0e46..eb9b2f24842d 100644
--- a/drivers/video/mxc/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc/mxc_ipuv3_fb.c
@@ -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);