diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/svgalib.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/video/svgalib.c b/drivers/video/svgalib.c index 68b30d9eac58..7fddc4a9b99b 100644 --- a/drivers/video/svgalib.c +++ b/drivers/video/svgalib.c | |||
@@ -194,7 +194,7 @@ void svga_dump_var(struct fb_var_screeninfo *var, int node) | |||
194 | void svga_settile(struct fb_info *info, struct fb_tilemap *map) | 194 | void svga_settile(struct fb_info *info, struct fb_tilemap *map) |
195 | { | 195 | { |
196 | const u8 *font = map->data; | 196 | const u8 *font = map->data; |
197 | u8* fb = (u8 *) info->screen_base; | 197 | u8 __iomem *fb = (u8 __iomem *)info->screen_base; |
198 | int i, c; | 198 | int i, c; |
199 | 199 | ||
200 | if ((map->width != 8) || (map->height != 16) || | 200 | if ((map->width != 8) || (map->height != 16) || |
@@ -207,7 +207,8 @@ void svga_settile(struct fb_info *info, struct fb_tilemap *map) | |||
207 | fb += 2; | 207 | fb += 2; |
208 | for (c = 0; c < map->length; c++) { | 208 | for (c = 0; c < map->length; c++) { |
209 | for (i = 0; i < map->height; i++) { | 209 | for (i = 0; i < map->height; i++) { |
210 | fb[i * 4] = font[i]; | 210 | fb_writeb(font[i], fb + i * 4); |
211 | // fb[i * 4] = font[i]; | ||
211 | } | 212 | } |
212 | fb += 128; | 213 | fb += 128; |
213 | font += map->height; | 214 | font += map->height; |
@@ -221,8 +222,8 @@ void svga_tilecopy(struct fb_info *info, struct fb_tilearea *area) | |||
221 | /* colstride is halved in this function because u16 are used */ | 222 | /* colstride is halved in this function because u16 are used */ |
222 | int colstride = 1 << (info->fix.type_aux & FB_AUX_TEXT_SVGA_MASK); | 223 | int colstride = 1 << (info->fix.type_aux & FB_AUX_TEXT_SVGA_MASK); |
223 | int rowstride = colstride * (info->var.xres_virtual / 8); | 224 | int rowstride = colstride * (info->var.xres_virtual / 8); |
224 | u16 *fb = (u16 *) info->screen_base; | 225 | u16 __iomem *fb = (u16 __iomem *) info->screen_base; |
225 | u16 *src, *dst; | 226 | u16 __iomem *src, *dst; |
226 | 227 | ||
227 | if ((area->sy > area->dy) || | 228 | if ((area->sy > area->dy) || |
228 | ((area->sy == area->dy) && (area->sx > area->dx))) { | 229 | ((area->sy == area->dy) && (area->sx > area->dx))) { |
@@ -239,10 +240,11 @@ void svga_tilecopy(struct fb_info *info, struct fb_tilearea *area) | |||
239 | } | 240 | } |
240 | 241 | ||
241 | for (dy = 0; dy < area->height; dy++) { | 242 | for (dy = 0; dy < area->height; dy++) { |
242 | u16* src2 = src; | 243 | u16 __iomem *src2 = src; |
243 | u16* dst2 = dst; | 244 | u16 __iomem *dst2 = dst; |
244 | for (dx = 0; dx < area->width; dx++) { | 245 | for (dx = 0; dx < area->width; dx++) { |
245 | *dst2 = *src2; | 246 | fb_writew(fb_readw(src2), dst2); |
247 | // *dst2 = *src2; | ||
246 | src2 += colstride; | 248 | src2 += colstride; |
247 | dst2 += colstride; | 249 | dst2 += colstride; |
248 | } | 250 | } |
@@ -258,14 +260,14 @@ void svga_tilefill(struct fb_info *info, struct fb_tilerect *rect) | |||
258 | int colstride = 2 << (info->fix.type_aux & FB_AUX_TEXT_SVGA_MASK); | 260 | int colstride = 2 << (info->fix.type_aux & FB_AUX_TEXT_SVGA_MASK); |
259 | int rowstride = colstride * (info->var.xres_virtual / 8); | 261 | int rowstride = colstride * (info->var.xres_virtual / 8); |
260 | int attr = (0x0F & rect->bg) << 4 | (0x0F & rect->fg); | 262 | int attr = (0x0F & rect->bg) << 4 | (0x0F & rect->fg); |
261 | u8 *fb = (u8 *) info->screen_base; | 263 | u8 __iomem *fb = (u8 __iomem *)info->screen_base; |
262 | fb += rect->sx * colstride + rect->sy * rowstride; | 264 | fb += rect->sx * colstride + rect->sy * rowstride; |
263 | 265 | ||
264 | for (dy = 0; dy < rect->height; dy++) { | 266 | for (dy = 0; dy < rect->height; dy++) { |
265 | u8* fb2 = fb; | 267 | u8 __iomem *fb2 = fb; |
266 | for (dx = 0; dx < rect->width; dx++) { | 268 | for (dx = 0; dx < rect->width; dx++) { |
267 | fb2[0] = rect->index; | 269 | fb_writeb(rect->index, fb2); |
268 | fb2[1] = attr; | 270 | fb_writeb(attr, fb2 + 1); |
269 | fb2 += colstride; | 271 | fb2 += colstride; |
270 | } | 272 | } |
271 | fb += rowstride; | 273 | fb += rowstride; |
@@ -279,15 +281,15 @@ void svga_tileblit(struct fb_info *info, struct fb_tileblit *blit) | |||
279 | int colstride = 2 << (info->fix.type_aux & FB_AUX_TEXT_SVGA_MASK); | 281 | int colstride = 2 << (info->fix.type_aux & FB_AUX_TEXT_SVGA_MASK); |
280 | int rowstride = colstride * (info->var.xres_virtual / 8); | 282 | int rowstride = colstride * (info->var.xres_virtual / 8); |
281 | int attr = (0x0F & blit->bg) << 4 | (0x0F & blit->fg); | 283 | int attr = (0x0F & blit->bg) << 4 | (0x0F & blit->fg); |
282 | u8* fb = (u8 *) info->screen_base; | 284 | u8 __iomem *fb = (u8 __iomem *)info->screen_base; |
283 | fb += blit->sx * colstride + blit->sy * rowstride; | 285 | fb += blit->sx * colstride + blit->sy * rowstride; |
284 | 286 | ||
285 | i=0; | 287 | i=0; |
286 | for (dy=0; dy < blit->height; dy ++) { | 288 | for (dy=0; dy < blit->height; dy ++) { |
287 | u8* fb2 = fb; | 289 | u8 __iomem *fb2 = fb; |
288 | for (dx = 0; dx < blit->width; dx ++) { | 290 | for (dx = 0; dx < blit->width; dx ++) { |
289 | fb2[0] = blit->indices[i]; | 291 | fb_writeb(blit->indices[i], fb2); |
290 | fb2[1] = attr; | 292 | fb_writeb(attr, fb2 + 1); |
291 | fb2 += colstride; | 293 | fb2 += colstride; |
292 | i ++; | 294 | i ++; |
293 | if (i == blit->length) return; | 295 | if (i == blit->length) return; |