diff options
author | Ville Syrjälä <ville.syrjala@nokia.com> | 2010-03-17 14:05:38 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-08-03 08:18:46 -0400 |
commit | 276a1d4337c9c261f42d5a7f813d96ca18f67c2b (patch) | |
tree | 9866eb8a7d617cdcefcff2be82bec01c5cc8fb03 /drivers/video/omap2/omapfb/omapfb-main.c | |
parent | 46d3524a1b9155dd9cd57ea28e00db08c7a95c1a (diff) |
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: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2/omapfb/omapfb-main.c')
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-main.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 2ac20d230ead..ccccf3d71a39 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c | |||
@@ -668,9 +668,6 @@ int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var) | |||
668 | 668 | ||
669 | DBG("check_fb_var %d\n", ofbi->id); | 669 | DBG("check_fb_var %d\n", ofbi->id); |
670 | 670 | ||
671 | if (ofbi->region.size == 0) | ||
672 | return 0; | ||
673 | |||
674 | r = fb_mode_to_dss_mode(var, &mode); | 671 | r = fb_mode_to_dss_mode(var, &mode); |
675 | if (r) { | 672 | if (r) { |
676 | DBG("cannot convert var to omap dss mode\n"); | 673 | 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) | |||
690 | if (check_fb_res_bounds(var)) | 687 | if (check_fb_res_bounds(var)) |
691 | return -EINVAL; | 688 | return -EINVAL; |
692 | 689 | ||
693 | if (check_fb_size(ofbi, var)) | 690 | /* When no memory is allocated ignore the size check */ |
691 | if (ofbi->region.size != 0 && check_fb_size(ofbi, var)) | ||
694 | return -EINVAL; | 692 | return -EINVAL; |
695 | 693 | ||
696 | if (var->xres + var->xoffset > var->xres_virtual) | 694 | if (var->xres + var->xoffset > var->xres_virtual) |
@@ -894,8 +892,9 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl, | |||
894 | yres = var->yres; | 892 | yres = var->yres; |
895 | } | 893 | } |
896 | 894 | ||
897 | omapfb_calc_addr(ofbi, var, fix, rotation, | 895 | if (ofbi->region.size) |
898 | &data_start_p, &data_start_v); | 896 | omapfb_calc_addr(ofbi, var, fix, rotation, |
897 | &data_start_p, &data_start_v); | ||
899 | 898 | ||
900 | r = fb_mode_to_dss_mode(var, &mode); | 899 | r = fb_mode_to_dss_mode(var, &mode); |
901 | if (r) { | 900 | if (r) { |