brcm2708: update against latest rpi-3.10.y branch
[openwrt/svn-archive/archive.git] / target / linux / brcm2708 / patches-3.10 / 0164-video-relax-the-dimensions-check-for-rotated-display.patch
1 From cadc956e10cf0811927600dfe1f4657d92aad32a Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Wed, 29 Jan 2014 21:37:00 +0000
4 Subject: [PATCH 164/174] video: relax the dimensions check for rotated
5 displays
6
7 ---
8 drivers/video/bcm2708_fb.c | 6 +++---
9 1 file changed, 3 insertions(+), 3 deletions(-)
10
11 --- a/drivers/video/bcm2708_fb.c
12 +++ b/drivers/video/bcm2708_fb.c
13 @@ -255,8 +255,8 @@ static int bcm2708_fb_check_var(struct f
14 else if (var->vmode & FB_VMODE_INTERLACED)
15 yres = (yres + 1) / 2;
16
17 - if (yres > 1200) {
18 - pr_err("bcm2708_fb_check_var: ERROR: VerticalTotal >= 1200; "
19 + if (var->xres * yres > 1920 * 1200) {
20 + pr_err("bcm2708_fb_check_var: ERROR: Pixel size >= 1920x1200; "
21 "special treatment required! (TODO)\n");
22 return -EINVAL;
23 }
24 @@ -415,7 +415,7 @@ static void bcm2708_fb_copyarea(struct f
25
26 /* Fallback to cfb_copyarea() if we don't like something */
27 if (bytes_per_pixel > 4 ||
28 - info->var.xres > 1920 || info->var.yres > 1200 ||
29 + info->var.xres * info->var.yres > 1920 * 1200 ||
30 region->width <= 0 || region->width > info->var.xres ||
31 region->height <= 0 || region->height > info->var.yres ||
32 region->sx < 0 || region->sx >= info->var.xres ||