diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-28 19:09:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-28 19:09:57 -0400 |
commit | 2604f6da1afb56fae5930b58349e43a2b0345933 (patch) | |
tree | 1744196a8cf6bf3edfd7ad63c6a10f1609bd206a /drivers | |
parent | 18c8baff8fe151ea02e00047afc369ee31939e9b (diff) | |
parent | 0f7ad450394560a6b6c72115e04bf7afd6230e70 (diff) |
Automatic merge of master.kernel.org:/home/rmk/linux-2.6-rmk.git
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/amba-clcd.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index acdba0c67fb..3e386fd4c5c 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c | |||
@@ -125,11 +125,11 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var) | |||
125 | case 2: | 125 | case 2: |
126 | case 4: | 126 | case 4: |
127 | case 8: | 127 | case 8: |
128 | var->red.length = 8; | 128 | var->red.length = var->bits_per_pixel; |
129 | var->red.offset = 0; | 129 | var->red.offset = 0; |
130 | var->green.length = 8; | 130 | var->green.length = var->bits_per_pixel; |
131 | var->green.offset = 0; | 131 | var->green.offset = 0; |
132 | var->blue.length = 8; | 132 | var->blue.length = var->bits_per_pixel; |
133 | var->blue.offset = 0; | 133 | var->blue.offset = 0; |
134 | break; | 134 | break; |
135 | case 16: | 135 | case 16: |
@@ -146,7 +146,7 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var) | |||
146 | var->blue.offset = 10; | 146 | var->blue.offset = 10; |
147 | } | 147 | } |
148 | break; | 148 | break; |
149 | case 24: | 149 | case 32: |
150 | if (fb->panel->cntl & CNTL_LCDTFT) { | 150 | if (fb->panel->cntl & CNTL_LCDTFT) { |
151 | var->red.length = 8; | 151 | var->red.length = 8; |
152 | var->green.length = 8; | 152 | var->green.length = 8; |
@@ -178,6 +178,12 @@ static int clcdfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
178 | 178 | ||
179 | if (fb->board->check) | 179 | if (fb->board->check) |
180 | ret = fb->board->check(fb, var); | 180 | ret = fb->board->check(fb, var); |
181 | |||
182 | if (ret == 0 && | ||
183 | var->xres_virtual * var->bits_per_pixel / 8 * | ||
184 | var->yres_virtual > fb->fb.fix.smem_len) | ||
185 | ret = -EINVAL; | ||
186 | |||
181 | if (ret == 0) | 187 | if (ret == 0) |
182 | ret = clcdfb_set_bitfields(fb, var); | 188 | ret = clcdfb_set_bitfields(fb, var); |
183 | 189 | ||