aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/aty/aty128fb.c2
-rw-r--r--drivers/video/bfin-t350mcqb-fb.c6
-rw-r--r--drivers/video/carminefb.c2
-rw-r--r--drivers/video/cyber2000fb.c3
-rw-r--r--drivers/video/fbmem.c4
-rw-r--r--drivers/video/gbefb.c7
-rw-r--r--drivers/video/geode/gx1fb_core.c3
-rw-r--r--drivers/video/geode/gxfb_core.c8
-rw-r--r--drivers/video/geode/lxfb_core.c9
-rw-r--r--drivers/video/gxt4500.c4
-rw-r--r--drivers/video/i810/i810_accel.c18
-rw-r--r--drivers/video/intelfb/intelfbdrv.c24
-rw-r--r--drivers/video/modedb.c2
-rw-r--r--drivers/video/neofb.c6
-rw-r--r--drivers/video/nvidia/nv_accel.c12
-rw-r--r--drivers/video/pm3fb.c6
-rw-r--r--drivers/video/sm501fb.c6
-rw-r--r--drivers/video/via/viafbdev.c18
18 files changed, 84 insertions, 56 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index 243ea4ab20c8..db16112cf197 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -2051,7 +2051,7 @@ static int __devinit aty128_probe(struct pci_dev *pdev, const struct pci_device_
2051 2051
2052 /* Virtualize mmio region */ 2052 /* Virtualize mmio region */
2053 info->fix.mmio_start = reg_addr; 2053 info->fix.mmio_start = reg_addr;
2054 par->regbase = ioremap(reg_addr, pci_resource_len(pdev, 2)); 2054 par->regbase = pci_ioremap_bar(pdev, 2);
2055 if (!par->regbase) 2055 if (!par->regbase)
2056 goto err_free_info; 2056 goto err_free_info;
2057 2057
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c
index 7d1b819e501c..a9b3ada05d99 100644
--- a/drivers/video/bfin-t350mcqb-fb.c
+++ b/drivers/video/bfin-t350mcqb-fb.c
@@ -255,7 +255,7 @@ static int bfin_t350mcqb_fb_check_var(struct fb_var_screeninfo *var,
255{ 255{
256 256
257 if (var->bits_per_pixel != LCD_BPP) { 257 if (var->bits_per_pixel != LCD_BPP) {
258 pr_debug("%s: depth not supported: %u BPP\n", __FUNCTION__, 258 pr_debug("%s: depth not supported: %u BPP\n", __func__,
259 var->bits_per_pixel); 259 var->bits_per_pixel);
260 return -EINVAL; 260 return -EINVAL;
261 } 261 }
@@ -264,7 +264,7 @@ static int bfin_t350mcqb_fb_check_var(struct fb_var_screeninfo *var,
264 info->var.xres_virtual != var->xres_virtual || 264 info->var.xres_virtual != var->xres_virtual ||
265 info->var.yres_virtual != var->yres_virtual) { 265 info->var.yres_virtual != var->yres_virtual) {
266 pr_debug("%s: Resolution not supported: X%u x Y%u \n", 266 pr_debug("%s: Resolution not supported: X%u x Y%u \n",
267 __FUNCTION__, var->xres, var->yres); 267 __func__, var->xres, var->yres);
268 return -EINVAL; 268 return -EINVAL;
269 } 269 }
270 270
@@ -274,7 +274,7 @@ static int bfin_t350mcqb_fb_check_var(struct fb_var_screeninfo *var,
274 274
275 if ((info->fix.line_length * var->yres_virtual) > info->fix.smem_len) { 275 if ((info->fix.line_length * var->yres_virtual) > info->fix.smem_len) {
276 pr_debug("%s: Memory Limit requested yres_virtual = %u\n", 276 pr_debug("%s: Memory Limit requested yres_virtual = %u\n",
277 __FUNCTION__, var->yres_virtual); 277 __func__, var->yres_virtual);
278 return -ENOMEM; 278 return -ENOMEM;
279 } 279 }
280 280
diff --git a/drivers/video/carminefb.c b/drivers/video/carminefb.c
index c9b191319a9a..c7ff3c1a266a 100644
--- a/drivers/video/carminefb.c
+++ b/drivers/video/carminefb.c
@@ -168,7 +168,7 @@ static int carmine_setcolreg(unsigned regno, unsigned red, unsigned green,
168 blue >>= 8; 168 blue >>= 8;
169 transp >>= 8; 169 transp >>= 8;
170 170
171 ((u32 *)info->pseudo_palette)[regno] = be32_to_cpu(transp << 24 | 171 ((__be32 *)info->pseudo_palette)[regno] = cpu_to_be32(transp << 24 |
172 red << 0 | green << 8 | blue << 16); 172 red << 0 | green << 8 | blue << 16);
173 return 0; 173 return 0;
174} 174}
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
index 39d5d643a50b..7a9e42e3a9a9 100644
--- a/drivers/video/cyber2000fb.c
+++ b/drivers/video/cyber2000fb.c
@@ -1583,8 +1583,7 @@ cyberpro_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
1583 goto failed_release; 1583 goto failed_release;
1584 1584
1585 cfb->dev = dev; 1585 cfb->dev = dev;
1586 cfb->region = ioremap(pci_resource_start(dev, 0), 1586 cfb->region = pci_ioremap_bar(dev, 0);
1587 pci_resource_len(dev, 0));
1588 if (!cfb->region) 1587 if (!cfb->region)
1589 goto failed_ioremap; 1588 goto failed_ioremap;
1590 1589
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 3c65b0d67617..756efeb91abc 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -510,6 +510,10 @@ static int fb_prepare_extra_logos(struct fb_info *info, unsigned int height,
510 fb_logo_ex_num = 0; 510 fb_logo_ex_num = 0;
511 511
512 for (i = 0; i < fb_logo_ex_num; i++) { 512 for (i = 0; i < fb_logo_ex_num; i++) {
513 if (fb_logo_ex[i].logo->type != fb_logo.logo->type) {
514 fb_logo_ex[i].logo = NULL;
515 continue;
516 }
513 height += fb_logo_ex[i].logo->height; 517 height += fb_logo_ex[i].logo->height;
514 if (height > yres) { 518 if (height > yres) {
515 height -= fb_logo_ex[i].logo->height; 519 height -= fb_logo_ex[i].logo->height;
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c
index f89c3cce1e0c..fe5b519860b1 100644
--- a/drivers/video/gbefb.c
+++ b/drivers/video/gbefb.c
@@ -912,6 +912,7 @@ static int gbefb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
912{ 912{
913 unsigned int line_length; 913 unsigned int line_length;
914 struct gbe_timing_info timing; 914 struct gbe_timing_info timing;
915 int ret;
915 916
916 /* Limit bpp to 8, 16, and 32 */ 917 /* Limit bpp to 8, 16, and 32 */
917 if (var->bits_per_pixel <= 8) 918 if (var->bits_per_pixel <= 8)
@@ -930,8 +931,10 @@ static int gbefb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
930 931
931 var->grayscale = 0; /* No grayscale for now */ 932 var->grayscale = 0; /* No grayscale for now */
932 933
933 if ((var->pixclock = compute_gbe_timing(var, &timing)) < 0) 934 ret = compute_gbe_timing(var, &timing);
934 return(-EINVAL); 935 var->pixclock = ret;
936 if (ret < 0)
937 return -EINVAL;
935 938
936 /* Adjust virtual resolution, if necessary */ 939 /* Adjust virtual resolution, if necessary */
937 if (var->xres > var->xres_virtual || (!ywrap && !ypan)) 940 if (var->xres > var->xres_virtual || (!ywrap && !ypan))
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c
index bb20a2289760..751e491ca8c8 100644
--- a/drivers/video/geode/gx1fb_core.c
+++ b/drivers/video/geode/gx1fb_core.c
@@ -217,8 +217,7 @@ static int __init gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *d
217 ret = pci_request_region(dev, 0, "gx1fb (video)"); 217 ret = pci_request_region(dev, 0, "gx1fb (video)");
218 if (ret < 0) 218 if (ret < 0)
219 return ret; 219 return ret;
220 par->vid_regs = ioremap(pci_resource_start(dev, 0), 220 par->vid_regs = pci_ioremap_bar(dev, 0);
221 pci_resource_len(dev, 0));
222 if (!par->vid_regs) 221 if (!par->vid_regs)
223 return -ENOMEM; 222 return -ENOMEM;
224 223
diff --git a/drivers/video/geode/gxfb_core.c b/drivers/video/geode/gxfb_core.c
index de2b8f9876a5..484118926318 100644
--- a/drivers/video/geode/gxfb_core.c
+++ b/drivers/video/geode/gxfb_core.c
@@ -242,23 +242,21 @@ static int __init gxfb_map_video_memory(struct fb_info *info, struct pci_dev *de
242 ret = pci_request_region(dev, 3, "gxfb (video processor)"); 242 ret = pci_request_region(dev, 3, "gxfb (video processor)");
243 if (ret < 0) 243 if (ret < 0)
244 return ret; 244 return ret;
245 par->vid_regs = ioremap(pci_resource_start(dev, 3), 245 par->vid_regs = pci_ioremap_bar(dev, 3);
246 pci_resource_len(dev, 3));
247 if (!par->vid_regs) 246 if (!par->vid_regs)
248 return -ENOMEM; 247 return -ENOMEM;
249 248
250 ret = pci_request_region(dev, 2, "gxfb (display controller)"); 249 ret = pci_request_region(dev, 2, "gxfb (display controller)");
251 if (ret < 0) 250 if (ret < 0)
252 return ret; 251 return ret;
253 par->dc_regs = ioremap(pci_resource_start(dev, 2), pci_resource_len(dev, 2)); 252 par->dc_regs = pci_ioremap_bar(dev, 2);
254 if (!par->dc_regs) 253 if (!par->dc_regs)
255 return -ENOMEM; 254 return -ENOMEM;
256 255
257 ret = pci_request_region(dev, 1, "gxfb (graphics processor)"); 256 ret = pci_request_region(dev, 1, "gxfb (graphics processor)");
258 if (ret < 0) 257 if (ret < 0)
259 return ret; 258 return ret;
260 par->gp_regs = ioremap(pci_resource_start(dev, 1), 259 par->gp_regs = pci_ioremap_bar(dev, 1);
261 pci_resource_len(dev, 1));
262 260
263 if (!par->gp_regs) 261 if (!par->gp_regs)
264 return -ENOMEM; 262 return -ENOMEM;
diff --git a/drivers/video/geode/lxfb_core.c b/drivers/video/geode/lxfb_core.c
index 2cd9b74d2225..b965ecdbc604 100644
--- a/drivers/video/geode/lxfb_core.c
+++ b/drivers/video/geode/lxfb_core.c
@@ -379,20 +379,17 @@ static int __init lxfb_map_video_memory(struct fb_info *info,
379 if (info->screen_base == NULL) 379 if (info->screen_base == NULL)
380 return ret; 380 return ret;
381 381
382 par->gp_regs = ioremap(pci_resource_start(dev, 1), 382 par->gp_regs = pci_ioremap_bar(dev, 1);
383 pci_resource_len(dev, 1));
384 383
385 if (par->gp_regs == NULL) 384 if (par->gp_regs == NULL)
386 return ret; 385 return ret;
387 386
388 par->dc_regs = ioremap(pci_resource_start(dev, 2), 387 par->dc_regs = pci_ioremap_bar(dev, 2);
389 pci_resource_len(dev, 2));
390 388
391 if (par->dc_regs == NULL) 389 if (par->dc_regs == NULL)
392 return ret; 390 return ret;
393 391
394 par->vp_regs = ioremap(pci_resource_start(dev, 3), 392 par->vp_regs = pci_ioremap_bar(dev, 3);
395 pci_resource_len(dev, 3));
396 393
397 if (par->vp_regs == NULL) 394 if (par->vp_regs == NULL)
398 return ret; 395 return ret;
diff --git a/drivers/video/gxt4500.c b/drivers/video/gxt4500.c
index 564557792bed..896e53dea906 100644
--- a/drivers/video/gxt4500.c
+++ b/drivers/video/gxt4500.c
@@ -648,7 +648,7 @@ static int __devinit gxt4500_probe(struct pci_dev *pdev,
648 info->pseudo_palette = par->pseudo_palette; 648 info->pseudo_palette = par->pseudo_palette;
649 649
650 info->fix.mmio_start = reg_phys; 650 info->fix.mmio_start = reg_phys;
651 par->regs = ioremap(reg_phys, pci_resource_len(pdev, 0)); 651 par->regs = pci_ioremap_bar(pdev, 0);
652 if (!par->regs) { 652 if (!par->regs) {
653 dev_err(&pdev->dev, "gxt4500: cannot map registers\n"); 653 dev_err(&pdev->dev, "gxt4500: cannot map registers\n");
654 goto err_free_all; 654 goto err_free_all;
@@ -656,7 +656,7 @@ static int __devinit gxt4500_probe(struct pci_dev *pdev,
656 656
657 info->fix.smem_start = fb_phys; 657 info->fix.smem_start = fb_phys;
658 info->fix.smem_len = pci_resource_len(pdev, 1); 658 info->fix.smem_len = pci_resource_len(pdev, 1);
659 info->screen_base = ioremap(fb_phys, pci_resource_len(pdev, 1)); 659 info->screen_base = pci_ioremap_bar(pdev, 1);
660 if (!info->screen_base) { 660 if (!info->screen_base) {
661 dev_err(&pdev->dev, "gxt4500: cannot map framebuffer\n"); 661 dev_err(&pdev->dev, "gxt4500: cannot map framebuffer\n");
662 goto err_unmap_regs; 662 goto err_unmap_regs;
diff --git a/drivers/video/i810/i810_accel.c b/drivers/video/i810/i810_accel.c
index 76764ea3486a..f5bedee4310a 100644
--- a/drivers/video/i810/i810_accel.c
+++ b/drivers/video/i810/i810_accel.c
@@ -301,8 +301,10 @@ void i810fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
301 u32 dx, dy, width, height, dest, rop = 0, color = 0; 301 u32 dx, dy, width, height, dest, rop = 0, color = 0;
302 302
303 if (!info->var.accel_flags || par->dev_flags & LOCKUP || 303 if (!info->var.accel_flags || par->dev_flags & LOCKUP ||
304 par->depth == 4) 304 par->depth == 4) {
305 return cfb_fillrect(info, rect); 305 cfb_fillrect(info, rect);
306 return;
307 }
306 308
307 if (par->depth == 1) 309 if (par->depth == 1)
308 color = rect->color; 310 color = rect->color;
@@ -327,8 +329,10 @@ void i810fb_copyarea(struct fb_info *info, const struct fb_copyarea *region)
327 u32 sx, sy, dx, dy, pitch, width, height, src, dest, xdir; 329 u32 sx, sy, dx, dy, pitch, width, height, src, dest, xdir;
328 330
329 if (!info->var.accel_flags || par->dev_flags & LOCKUP || 331 if (!info->var.accel_flags || par->dev_flags & LOCKUP ||
330 par->depth == 4) 332 par->depth == 4) {
331 return cfb_copyarea(info, region); 333 cfb_copyarea(info, region);
334 return;
335 }
332 336
333 dx = region->dx * par->depth; 337 dx = region->dx * par->depth;
334 sx = region->sx * par->depth; 338 sx = region->sx * par->depth;
@@ -366,8 +370,10 @@ void i810fb_imageblit(struct fb_info *info, const struct fb_image *image)
366 u32 fg = 0, bg = 0, size, dst; 370 u32 fg = 0, bg = 0, size, dst;
367 371
368 if (!info->var.accel_flags || par->dev_flags & LOCKUP || 372 if (!info->var.accel_flags || par->dev_flags & LOCKUP ||
369 par->depth == 4 || image->depth != 1) 373 par->depth == 4 || image->depth != 1) {
370 return cfb_imageblit(info, image); 374 cfb_imageblit(info, image);
375 return;
376 }
371 377
372 switch (info->var.bits_per_pixel) { 378 switch (info->var.bits_per_pixel) {
373 case 8: 379 case 8:
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index a09e23649357..6d8e5415c809 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -1493,8 +1493,10 @@ static void intelfb_fillrect (struct fb_info *info,
1493 DBG_MSG("intelfb_fillrect\n"); 1493 DBG_MSG("intelfb_fillrect\n");
1494#endif 1494#endif
1495 1495
1496 if (!ACCEL(dinfo, info) || dinfo->depth == 4) 1496 if (!ACCEL(dinfo, info) || dinfo->depth == 4) {
1497 return cfb_fillrect(info, rect); 1497 cfb_fillrect(info, rect);
1498 return;
1499 }
1498 1500
1499 if (rect->rop == ROP_COPY) 1501 if (rect->rop == ROP_COPY)
1500 rop = PAT_ROP_GXCOPY; 1502 rop = PAT_ROP_GXCOPY;
@@ -1521,8 +1523,10 @@ static void intelfb_copyarea(struct fb_info *info,
1521 DBG_MSG("intelfb_copyarea\n"); 1523 DBG_MSG("intelfb_copyarea\n");
1522#endif 1524#endif
1523 1525
1524 if (!ACCEL(dinfo, info) || dinfo->depth == 4) 1526 if (!ACCEL(dinfo, info) || dinfo->depth == 4) {
1525 return cfb_copyarea(info, region); 1527 cfb_copyarea(info, region);
1528 return;
1529 }
1526 1530
1527 intelfbhw_do_bitblt(dinfo, region->sx, region->sy, region->dx, 1531 intelfbhw_do_bitblt(dinfo, region->sx, region->sy, region->dx,
1528 region->dy, region->width, region->height, 1532 region->dy, region->width, region->height,
@@ -1540,8 +1544,10 @@ static void intelfb_imageblit(struct fb_info *info,
1540#endif 1544#endif
1541 1545
1542 if (!ACCEL(dinfo, info) || dinfo->depth == 4 1546 if (!ACCEL(dinfo, info) || dinfo->depth == 4
1543 || image->depth != 1) 1547 || image->depth != 1) {
1544 return cfb_imageblit(info, image); 1548 cfb_imageblit(info, image);
1549 return;
1550 }
1545 1551
1546 if (dinfo->depth != 8) { 1552 if (dinfo->depth != 8) {
1547 fgcolor = dinfo->pseudo_palette[image->fg_color]; 1553 fgcolor = dinfo->pseudo_palette[image->fg_color];
@@ -1554,8 +1560,10 @@ static void intelfb_imageblit(struct fb_info *info,
1554 if (!intelfbhw_do_drawglyph(dinfo, fgcolor, bgcolor, image->width, 1560 if (!intelfbhw_do_drawglyph(dinfo, fgcolor, bgcolor, image->width,
1555 image->height, image->data, 1561 image->height, image->data,
1556 image->dx, image->dy, 1562 image->dx, image->dy,
1557 dinfo->pitch, info->var.bits_per_pixel)) 1563 dinfo->pitch, info->var.bits_per_pixel)) {
1558 return cfb_imageblit(info, image); 1564 cfb_imageblit(info, image);
1565 return;
1566 }
1559} 1567}
1560 1568
1561static int intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor) 1569static int intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
index d3c3af53a290..16186240c5f2 100644
--- a/drivers/video/modedb.c
+++ b/drivers/video/modedb.c
@@ -329,7 +329,7 @@ const struct fb_videomode vesa_modes[] = {
329 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 329 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
330 FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, 330 FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
331 /* 17 1152x864-75 VESA */ 331 /* 17 1152x864-75 VESA */
332 { NULL, 75, 1153, 864, 9259, 256, 64, 32, 1, 128, 3, 332 { NULL, 75, 1152, 864, 9259, 256, 64, 32, 1, 128, 3,
333 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 333 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
334 FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, 334 FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
335 /* 18 1280x960-60 VESA */ 335 /* 18 1280x960-60 VESA */
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index bfb802d26d5a..588527a254c2 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -1453,7 +1453,8 @@ neo2200_imageblit(struct fb_info *info, const struct fb_image *image)
1453 * is less than 16 bits wide. This is due to insufficient 1453 * is less than 16 bits wide. This is due to insufficient
1454 * padding when writing the image. We need to adjust 1454 * padding when writing the image. We need to adjust
1455 * struct fb_pixmap. Not yet done. */ 1455 * struct fb_pixmap. Not yet done. */
1456 return cfb_imageblit(info, image); 1456 cfb_imageblit(info, image);
1457 return;
1457 } 1458 }
1458 bltCntl_flags = NEO_BC0_SRC_MONO; 1459 bltCntl_flags = NEO_BC0_SRC_MONO;
1459 } else if (image->depth == info->var.bits_per_pixel) { 1460 } else if (image->depth == info->var.bits_per_pixel) {
@@ -1461,7 +1462,8 @@ neo2200_imageblit(struct fb_info *info, const struct fb_image *image)
1461 } else { 1462 } else {
1462 /* We don't currently support hardware acceleration if image 1463 /* We don't currently support hardware acceleration if image
1463 * depth is different from display */ 1464 * depth is different from display */
1464 return cfb_imageblit(info, image); 1465 cfb_imageblit(info, image);
1466 return;
1465 } 1467 }
1466 1468
1467 switch (info->var.bits_per_pixel) { 1469 switch (info->var.bits_per_pixel) {
diff --git a/drivers/video/nvidia/nv_accel.c b/drivers/video/nvidia/nv_accel.c
index fa4821c5572b..ad6472a894ea 100644
--- a/drivers/video/nvidia/nv_accel.c
+++ b/drivers/video/nvidia/nv_accel.c
@@ -300,8 +300,10 @@ void nvidiafb_copyarea(struct fb_info *info, const struct fb_copyarea *region)
300 if (info->state != FBINFO_STATE_RUNNING) 300 if (info->state != FBINFO_STATE_RUNNING)
301 return; 301 return;
302 302
303 if (par->lockup) 303 if (par->lockup) {
304 return cfb_copyarea(info, region); 304 cfb_copyarea(info, region);
305 return;
306 }
305 307
306 NVDmaStart(info, par, BLIT_POINT_SRC, 3); 308 NVDmaStart(info, par, BLIT_POINT_SRC, 3);
307 NVDmaNext(par, (region->sy << 16) | region->sx); 309 NVDmaNext(par, (region->sy << 16) | region->sx);
@@ -319,8 +321,10 @@ void nvidiafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
319 if (info->state != FBINFO_STATE_RUNNING) 321 if (info->state != FBINFO_STATE_RUNNING)
320 return; 322 return;
321 323
322 if (par->lockup) 324 if (par->lockup) {
323 return cfb_fillrect(info, rect); 325 cfb_fillrect(info, rect);
326 return;
327 }
324 328
325 if (info->var.bits_per_pixel == 8) 329 if (info->var.bits_per_pixel == 8)
326 color = rect->color; 330 color = rect->color;
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c
index 68089d1456c2..6666f45a2f8c 100644
--- a/drivers/video/pm3fb.c
+++ b/drivers/video/pm3fb.c
@@ -539,8 +539,10 @@ static void pm3fb_imageblit(struct fb_info *info, const struct fb_image *image)
539 bgx = par->palette[image->bg_color]; 539 bgx = par->palette[image->bg_color];
540 break; 540 break;
541 } 541 }
542 if (image->depth != 1) 542 if (image->depth != 1) {
543 return cfb_imageblit(info, image); 543 cfb_imageblit(info, image);
544 return;
545 }
544 546
545 if (info->var.bits_per_pixel == 8) { 547 if (info->var.bits_per_pixel == 8) {
546 fgx |= fgx << 8; 548 fgx |= fgx << 8;
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index f94ae84a58cd..dcd98793d568 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -159,6 +159,9 @@ static int sm501_alloc_mem(struct sm501fb_info *inf, struct sm501_mem *mem,
159 break; 159 break;
160 160
161 case SM501_MEMF_PANEL: 161 case SM501_MEMF_PANEL:
162 if (size > inf->fbmem_len)
163 return -ENOMEM;
164
162 ptr = inf->fbmem_len - size; 165 ptr = inf->fbmem_len - size;
163 fbi = inf->fb[HEAD_CRT]; 166 fbi = inf->fb[HEAD_CRT];
164 167
@@ -172,9 +175,6 @@ static int sm501_alloc_mem(struct sm501fb_info *inf, struct sm501_mem *mem,
172 if (fbi && ptr < fbi->fix.smem_len) 175 if (fbi && ptr < fbi->fix.smem_len)
173 return -ENOMEM; 176 return -ENOMEM;
174 177
175 if (ptr < 0)
176 return -ENOMEM;
177
178 break; 178 break;
179 179
180 case SM501_MEMF_CRT: 180 case SM501_MEMF_CRT:
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index e21fe5b6f9ff..37b433a08ce8 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -870,8 +870,10 @@ static void viafb_fillrect(struct fb_info *info,
870 u32 col = 0, rop = 0; 870 u32 col = 0, rop = 0;
871 int pitch; 871 int pitch;
872 872
873 if (!viafb_accel) 873 if (!viafb_accel) {
874 return cfb_fillrect(info, rect); 874 cfb_fillrect(info, rect);
875 return;
876 }
875 877
876 if (!rect->width || !rect->height) 878 if (!rect->width || !rect->height)
877 return; 879 return;
@@ -937,8 +939,10 @@ static void viafb_copyarea(struct fb_info *info,
937 939
938 DEBUG_MSG(KERN_INFO "viafb_copyarea!!\n"); 940 DEBUG_MSG(KERN_INFO "viafb_copyarea!!\n");
939 941
940 if (!viafb_accel) 942 if (!viafb_accel) {
941 return cfb_copyarea(info, area); 943 cfb_copyarea(info, area);
944 return;
945 }
942 946
943 if (!area->width || !area->height) 947 if (!area->width || !area->height)
944 return; 948 return;
@@ -994,8 +998,10 @@ static void viafb_imageblit(struct fb_info *info,
994 int i; 998 int i;
995 int pitch; 999 int pitch;
996 1000
997 if (!viafb_accel) 1001 if (!viafb_accel) {
998 return cfb_imageblit(info, image); 1002 cfb_imageblit(info, image);
1003 return;
1004 }
999 1005
1000 udata = (u32 *) image->data; 1006 udata = (u32 *) image->data;
1001 1007