X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fvideo%2Fvga16fb.c;h=2e132fb615627c8d27ac17c66890d640be28dc13;hb=9e1bf581d67d87a1d7fc0ea500729e3a03643a26;hp=e2707c58e4abd6eedd7ac5d5c3e29cc6b2c43246;hpb=8d40237c730b8be87c1b80a5d96b9c603fefa829;p=linux-2.6.git diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c index e2707c58e..2e132fb61 100644 --- a/drivers/video/vga16fb.c +++ b/drivers/video/vga16fb.c @@ -123,7 +123,7 @@ static struct fb_fix_screeninfo vga16fb_fix __initdata = { suitable instruction is the x86 bitwise OR. The following read-modify-write routine should optimize to one such bitwise OR. */ -static inline void rmw(volatile char __iomem *p) +static inline void rmw(volatile char *p) { readb(p); writeb(1, p); @@ -771,7 +771,7 @@ static void vga_vesa_blank(struct vga16fb_par *par, int mode) * to maximum (incl. overflow) * Result: turn off vertical sync (VSync) pulse. */ - if (mode & FB_BLANK_VSYNC_SUSPEND) { + if (mode & VESA_VSYNC_SUSPEND) { outb_p(0x10,vga_video_port_reg); /* StartVertRetrace */ outb_p(0xff,vga_video_port_val); /* maximum value */ outb_p(0x11,vga_video_port_reg); /* EndVertRetrace */ @@ -780,7 +780,7 @@ static void vga_vesa_blank(struct vga16fb_par *par, int mode) outb_p(par->vga_state.Overflow | 0x84,vga_video_port_val); /* bits 9,10 of vert. retrace */ } - if (mode & FB_BLANK_HSYNC_SUSPEND) { + if (mode & VESA_HSYNC_SUSPEND) { /* * Set to minimum (0) and * to maximum @@ -853,21 +853,22 @@ static int vga16fb_blank(int blank, struct fb_info *info) struct vga16fb_par *par = (struct vga16fb_par *) info->par; switch (blank) { - case FB_BLANK_UNBLANK: /* Unblank */ + case 0: /* Unblank */ if (par->vesa_blanked) { vga_vesa_unblank(par); par->vesa_blanked = 0; } if (par->palette_blanked) { + //do_install_cmap(info->currcon, info); par->palette_blanked = 0; } break; - case FB_BLANK_NORMAL: /* blank */ + case 1: /* blank */ vga_pal_blank(); par->palette_blanked = 1; break; default: /* VESA blanking */ - vga_vesa_blank(par, blank); + vga_vesa_blank(par, blank-1); par->vesa_blanked = 1; break; } @@ -882,7 +883,7 @@ void vga_8planes_fillrect(struct fb_info *info, const struct fb_fillrect *rect) char oldmask = selectmask(); int line_ofs, height; char oldop, oldsr; - char __iomem *where; + char *where; dx /= 4; where = info->screen_base + dx + rect->dy * info->fix.line_length; @@ -931,7 +932,7 @@ void vga_8planes_fillrect(struct fb_info *info, const struct fb_fillrect *rect) void vga16fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) { int x, x2, y2, vxres, vyres, width, height, line_ofs; - char __iomem *dst; + char *dst; vxres = info->var.xres_virtual; vyres = info->var.yres_virtual; @@ -1011,8 +1012,7 @@ void vga_8planes_copyarea(struct fb_info *info, const struct fb_copyarea *area) char oldsr = setsr(0xf); int height, line_ofs, x; u32 sx, dx, width; - char __iomem *dest; - char __iomem *src; + char *dest, *src; height = area->height; @@ -1063,8 +1063,7 @@ void vga16fb_copyarea(struct fb_info *info, const struct fb_copyarea *area) u32 dx = area->dx, dy = area->dy, sx = area->sx, sy = area->sy; int x, x2, y2, old_dx, old_dy, vxres, vyres; int height, width, line_ofs; - char __iomem *dst = NULL; - char __iomem *src = NULL; + char *dst = NULL, *src = NULL; vxres = info->var.xres_virtual; vyres = info->var.yres_virtual; @@ -1175,7 +1174,7 @@ void vga_8planes_imageblit(struct fb_info *info, const struct fb_image *image) char oldmask = selectmask(); const char *cdat = image->data; u32 dx = image->dx; - char __iomem *where; + char *where; int y; dx /= 4; @@ -1199,11 +1198,10 @@ void vga_8planes_imageblit(struct fb_info *info, const struct fb_image *image) void vga_imageblit_expand(struct fb_info *info, const struct fb_image *image) { - char __iomem *where = info->screen_base + (image->dx/8) + + char *where = info->screen_base + (image->dx/8) + image->dy * info->fix.line_length; struct vga16fb_par *par = (struct vga16fb_par *) info->par; - char *cdat = (char *) image->data; - char __iomem *dst; + char *cdat = (char *) image->data, *dst; int x, y; switch (info->fix.type) { @@ -1267,11 +1265,9 @@ void vga_imageblit_color(struct fb_info *info, const struct fb_image *image) * Draw logo */ struct vga16fb_par *par = (struct vga16fb_par *) info->par; - char __iomem *where = - info->screen_base + image->dy * info->fix.line_length + + char *where = info->screen_base + image->dy * info->fix.line_length + image->dx/8; - const char *cdat = image->data; - char __iomem *dst; + const char *cdat = image->data, *dst; int x, y; switch (info->fix.type) { @@ -1310,7 +1306,7 @@ void vga16fb_imageblit(struct fb_info *info, const struct fb_image *image) { if (image->depth == 1) vga_imageblit_expand(info, image); - else + else if (image->depth <= info->var.bits_per_pixel) vga_imageblit_color(info, image); } @@ -1358,7 +1354,7 @@ int __init vga16fb_init(void) /* XXX share VGA_FB_PHYS and I/O region with vgacon and others */ - vga16fb.screen_base = (void __iomem *)VGA_MAP_MEM(VGA_FB_PHYS); + vga16fb.screen_base = (void *)VGA_MAP_MEM(VGA_FB_PHYS); if (!vga16fb.screen_base) { printk(KERN_ERR "vga16fb: unable to map device\n"); ret = -ENOMEM;