--- ./drivers/video/neofb.c.imageblit 2004-04-20 15:22:04.012544952 -0700 +++ ./drivers/video/neofb.c 2004-04-20 15:22:04.089533248 -0700 @@ -1394,9 +1394,23 @@ neo2200_imageblit(struct fb_info *info, const struct fb_image *image) { struct neofb_par *par = (struct neofb_par *) info->par; + int bltCntl_flags, data_len; neo2200_sync(info); + if (image->depth == 1) { + bltCntl_flags = NEO_BC0_SRC_MONO; + data_len = (image->width * image->height) >> 3; + } else if (image->depth == info->var.bits_per_pixel) { + bltCntl_flags = 0; + data_len = (image->width * image->height) * + (info->var.bits_per_pixel >> 3); + } else { + /* We don't currently support hardware acceleration if image + * depth is different from display */ + return cfb_imageblit(info, image); + } + switch (info->var.bits_per_pixel) { case 8: par->neo2200->fgColor = image->fg_color; @@ -1411,7 +1425,7 @@ } par->neo2200->bltCntl = NEO_BC0_SYS_TO_VID | - NEO_BC0_SRC_MONO | NEO_BC3_SKIP_MAPPING | + NEO_BC3_SKIP_MAPPING | bltCntl_flags | // NEO_BC3_DST_XY_ADDR | 0x0c0000; @@ -1424,7 +1438,7 @@ (image->height << 16) | (image->width & 0xffff); memcpy(par->mmio_vbase + 0x100000, image->data, - (image->width * image->height) >> 3); + data_len); } static void