diff options
-rw-r--r-- | drivers/video/mxc/mxc_ipuv3_fb.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c index e904c52d83f4..5b089ebf0d5d 100644 --- a/drivers/video/mxc/mxc_ipuv3_fb.c +++ b/drivers/video/mxc/mxc_ipuv3_fb.c @@ -381,6 +381,9 @@ static int mxcfb_set_par(struct fb_info *fbi) dev_dbg(fbi->device, "Reconfiguring framebuffer\n"); + if (fbi->var.xres == 0 || fbi->var.yres == 0) + return 0; + if (ovfbi_enable) { ov_pos_ret = ipu_disp_get_window_pos( mxc_fbi_fg->ipu, mxc_fbi_fg->ipu_ch, @@ -729,6 +732,10 @@ static int mxcfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) u32 htotal; struct mxcfb_info *mxc_fbi = (struct mxcfb_info *)info->par; + + if (var->xres == 0 || var->yres == 0) + return 0; + /* fg should not bigger than bg */ if (mxc_fbi->ipu_ch == MEM_FG_SYNC) { struct fb_info *fbi_tmp; |