msm: mdss: fb: remove check for allocated during resolution switch

While switching resolution the fb memory requirement may increase and
the current memory may not be able to support the new resolution.
However since we can still go through overlay path, this requirement
shouldn't be mandatory. Allow it to go through, there are enough
checks during mmap to fail if trying to use this memory.

Change-Id: I76aafecd568763c456ea75234582b8a7aa9f83f4
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
This commit is contained in:
Adrian Salido-Moreno 2015-07-27 17:22:23 -07:00 committed by David Keitel
parent b6a3665201
commit f3e3ad8414

View file

@ -3354,13 +3354,6 @@ static int mdss_fb_check_var(struct fb_var_screeninfo *var,
if ((var->xres_virtual <= 0) || (var->yres_virtual <= 0))
return -EINVAL;
if (info->fix.smem_start) {
u32 len = var->xres_virtual * var->yres_virtual *
(var->bits_per_pixel / 8);
if (len > info->fix.smem_len)
return -EINVAL;
}
if ((var->xres == 0) || (var->yres == 0))
return -EINVAL;
@ -3450,8 +3443,10 @@ static int mdss_fb_set_par(struct fb_info *info)
else
mfd->fbi->fix.line_length = var->xres * var->bits_per_pixel / 8;
mfd->fbi->fix.smem_len = PAGE_ALIGN(mfd->fbi->fix.line_length *
mfd->fbi->var.yres) * mfd->fb_page;
/* if memory is not allocated yet, change memory size for fb */
if (!info->fix.smem_start)
mfd->fbi->fix.smem_len = PAGE_ALIGN(mfd->fbi->fix.line_length *
mfd->fbi->var.yres) * mfd->fb_page;
if (mfd->panel_reconfig || (mfd->fb_imgType != old_imgType)) {
mdss_fb_blank_sub(FB_BLANK_POWERDOWN, info, mfd->op_enable);