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

Commit 276a1d43 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Tomi Valkeinen
Browse files

OMAP: DSS2: OMAPFB: Check var even if there isn't memory



If video memory hasn't been allocate have check_fb_var() still check
most of the settings, just skip the ones involving the size of the
memory region. Also skip the memory address calculations in
omapfb_setup_overlay() if there's no memory.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@nokia.com>
parent 46d3524a
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -668,9 +668,6 @@ int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var)

	DBG("check_fb_var %d\n", ofbi->id);

	if (ofbi->region.size == 0)
		return 0;

	r = fb_mode_to_dss_mode(var, &mode);
	if (r) {
		DBG("cannot convert var to omap dss mode\n");
@@ -690,7 +687,8 @@ int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var)
	if (check_fb_res_bounds(var))
		return -EINVAL;

	if (check_fb_size(ofbi, var))
	/* When no memory is allocated ignore the size check */
	if (ofbi->region.size != 0 && check_fb_size(ofbi, var))
		return -EINVAL;

	if (var->xres + var->xoffset > var->xres_virtual)
@@ -894,6 +892,7 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
		yres = var->yres;
	}

	if (ofbi->region.size)
		omapfb_calc_addr(ofbi, var, fix, rotation,
				 &data_start_p, &data_start_v);