aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/hgafb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/hgafb.c')
-rw-r--r--drivers/video/hgafb.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c
index af8f0f2cc782..4052718eefaa 100644
--- a/drivers/video/hgafb.c
+++ b/drivers/video/hgafb.c
@@ -454,7 +454,6 @@ static int hgafb_blank(int blank_mode, struct fb_info *info)
454/* 454/*
455 * Accel functions 455 * Accel functions
456 */ 456 */
457#ifdef CONFIG_FB_HGA_ACCEL
458static void hgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) 457static void hgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
459{ 458{
460 u_int rows, y; 459 u_int rows, y;
@@ -466,7 +465,7 @@ static void hgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
466 dest = rowaddr(info, y) + (rect->dx >> 3); 465 dest = rowaddr(info, y) + (rect->dx >> 3);
467 switch (rect->rop) { 466 switch (rect->rop) {
468 case ROP_COPY: 467 case ROP_COPY:
469 //fb_memset(dest, rect->color, (rect->width >> 3)); 468 memset_io(dest, rect->color, (rect->width >> 3));
470 break; 469 break;
471 case ROP_XOR: 470 case ROP_XOR:
472 fb_writeb(~(fb_readb(dest)), dest); 471 fb_writeb(~(fb_readb(dest)), dest);
@@ -488,7 +487,7 @@ static void hgafb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
488 for (rows = area->height; rows--; ) { 487 for (rows = area->height; rows--; ) {
489 src = rowaddr(info, y1) + (area->sx >> 3); 488 src = rowaddr(info, y1) + (area->sx >> 3);
490 dest = rowaddr(info, y2) + (area->dx >> 3); 489 dest = rowaddr(info, y2) + (area->dx >> 3);
491 //fb_memmove(dest, src, (area->width >> 3)); 490 memmove(dest, src, (area->width >> 3));
492 y1++; 491 y1++;
493 y2++; 492 y2++;
494 } 493 }
@@ -499,7 +498,7 @@ static void hgafb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
499 for (rows = area->height; rows--;) { 498 for (rows = area->height; rows--;) {
500 src = rowaddr(info, y1) + (area->sx >> 3); 499 src = rowaddr(info, y1) + (area->sx >> 3);
501 dest = rowaddr(info, y2) + (area->dx >> 3); 500 dest = rowaddr(info, y2) + (area->dx >> 3);
502 //fb_memmove(dest, src, (area->width >> 3)); 501 memmove(dest, src, (area->width >> 3));
503 y1--; 502 y1--;
504 y2--; 503 y2--;
505 } 504 }
@@ -511,20 +510,17 @@ static void hgafb_imageblit(struct fb_info *info, const struct fb_image *image)
511 u8 __iomem *dest; 510 u8 __iomem *dest;
512 u8 *cdat = (u8 *) image->data; 511 u8 *cdat = (u8 *) image->data;
513 u_int rows, y = image->dy; 512 u_int rows, y = image->dy;
513 u_int x;
514 u8 d; 514 u8 d;
515 515
516 for (rows = image->height; rows--; y++) { 516 for (rows = image->height; rows--; y++) {
517 d = *cdat++; 517 for (x = 0; x < image->width; x+= 8) {
518 dest = rowaddr(info, y) + (image->dx >> 3); 518 d = *cdat++;
519 fb_writeb(d, dest); 519 dest = rowaddr(info, y) + ((image->dx + x)>> 3);
520 fb_writeb(d, dest);
521 }
520 } 522 }
521} 523}
522#else /* !CONFIG_FB_HGA_ACCEL */
523#define hgafb_fillrect cfb_fillrect
524#define hgafb_copyarea cfb_copyarea
525#define hgafb_imageblit cfb_imageblit
526#endif /* CONFIG_FB_HGA_ACCEL */
527
528 524
529static struct fb_ops hgafb_ops = { 525static struct fb_ops hgafb_ops = {
530 .owner = THIS_MODULE, 526 .owner = THIS_MODULE,