Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9677d7d2 authored by Adrian Salido-Moreno's avatar Adrian Salido-Moreno Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarAdrian Salido-Moreno <adrianm@codeaurora.org>
parent dc6fbf3f
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -3353,13 +3353,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;

@@ -3449,6 +3442,8 @@ static int mdss_fb_set_par(struct fb_info *info)
	else
		mfd->fbi->fix.line_length = var->xres * var->bits_per_pixel / 8;

	/* 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;