Skip to content

Commit

Permalink
video: relax the dimensions check for rotated displays
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Jan 30, 2014
1 parent e79a3f8 commit 76d183f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/video/bcm2708_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ static int bcm2708_fb_check_var(struct fb_var_screeninfo *var,
else if (var->vmode & FB_VMODE_INTERLACED)
yres = (yres + 1) / 2;

if (yres > 1200) {
pr_err("bcm2708_fb_check_var: ERROR: VerticalTotal >= 1200; "
if (var->xres * yres > 1920 * 1200) {
pr_err("bcm2708_fb_check_var: ERROR: Pixel size >= 1920x1200; "
"special treatment required! (TODO)\n");
return -EINVAL;
}
Expand Down Expand Up @@ -415,7 +415,7 @@ static void bcm2708_fb_copyarea(struct fb_info *info,

/* Fallback to cfb_copyarea() if we don't like something */
if (bytes_per_pixel > 4 ||
info->var.xres > 1920 || info->var.yres > 1200 ||
info->var.xres * info->var.yres > 1920 * 1200 ||
region->width <= 0 || region->width > info->var.xres ||
region->height <= 0 || region->height > info->var.yres ||
region->sx < 0 || region->sx >= info->var.xres ||
Expand Down

0 comments on commit 76d183f

Please sign in to comment.