diff options
Diffstat (limited to 'drivers/video/matrox/matroxfb_accel.c')
-rw-r--r-- | drivers/video/matrox/matroxfb_accel.c | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/drivers/video/matrox/matroxfb_accel.c b/drivers/video/matrox/matroxfb_accel.c index ed42bf6a0c15..3577ec144f86 100644 --- a/drivers/video/matrox/matroxfb_accel.c +++ b/drivers/video/matrox/matroxfb_accel.c | |||
@@ -107,7 +107,8 @@ static void matroxfb_imageblit(struct fb_info* info, const struct fb_image* imag | |||
107 | static void matroxfb_cfb4_fillrect(struct fb_info* info, const struct fb_fillrect* rect); | 107 | static void matroxfb_cfb4_fillrect(struct fb_info* info, const struct fb_fillrect* rect); |
108 | static void matroxfb_cfb4_copyarea(struct fb_info* info, const struct fb_copyarea* area); | 108 | static void matroxfb_cfb4_copyarea(struct fb_info* info, const struct fb_copyarea* area); |
109 | 109 | ||
110 | void matrox_cfbX_init(WPMINFO2) { | 110 | void matrox_cfbX_init(struct matrox_fb_info *minfo) |
111 | { | ||
111 | u_int32_t maccess; | 112 | u_int32_t maccess; |
112 | u_int32_t mpitch; | 113 | u_int32_t mpitch; |
113 | u_int32_t mopmode; | 114 | u_int32_t mopmode; |
@@ -195,7 +196,9 @@ void matrox_cfbX_init(WPMINFO2) { | |||
195 | 196 | ||
196 | EXPORT_SYMBOL(matrox_cfbX_init); | 197 | EXPORT_SYMBOL(matrox_cfbX_init); |
197 | 198 | ||
198 | static void matrox_accel_bmove(WPMINFO int vxres, int sy, int sx, int dy, int dx, int height, int width) { | 199 | static void matrox_accel_bmove(struct matrox_fb_info *minfo, int vxres, int sy, |
200 | int sx, int dy, int dx, int height, int width) | ||
201 | { | ||
199 | int start, end; | 202 | int start, end; |
200 | CRITFLAGS | 203 | CRITFLAGS |
201 | 204 | ||
@@ -231,7 +234,10 @@ static void matrox_accel_bmove(WPMINFO int vxres, int sy, int sx, int dy, int dx | |||
231 | CRITEND | 234 | CRITEND |
232 | } | 235 | } |
233 | 236 | ||
234 | static void matrox_accel_bmove_lin(WPMINFO int vxres, int sy, int sx, int dy, int dx, int height, int width) { | 237 | static void matrox_accel_bmove_lin(struct matrox_fb_info *minfo, int vxres, |
238 | int sy, int sx, int dy, int dx, int height, | ||
239 | int width) | ||
240 | { | ||
235 | int start, end; | 241 | int start, end; |
236 | CRITFLAGS | 242 | CRITFLAGS |
237 | 243 | ||
@@ -274,17 +280,18 @@ static void matroxfb_cfb4_copyarea(struct fb_info* info, const struct fb_copyare | |||
274 | if ((area->sx | area->dx | area->width) & 1) | 280 | if ((area->sx | area->dx | area->width) & 1) |
275 | cfb_copyarea(info, area); | 281 | cfb_copyarea(info, area); |
276 | else | 282 | else |
277 | matrox_accel_bmove_lin(PMINFO minfo->fbcon.var.xres_virtual >> 1, area->sy, area->sx >> 1, area->dy, area->dx >> 1, area->height, area->width >> 1); | 283 | matrox_accel_bmove_lin(minfo, minfo->fbcon.var.xres_virtual >> 1, area->sy, area->sx >> 1, area->dy, area->dx >> 1, area->height, area->width >> 1); |
278 | } | 284 | } |
279 | 285 | ||
280 | static void matroxfb_copyarea(struct fb_info* info, const struct fb_copyarea* area) { | 286 | static void matroxfb_copyarea(struct fb_info* info, const struct fb_copyarea* area) { |
281 | MINFO_FROM_INFO(info); | 287 | MINFO_FROM_INFO(info); |
282 | 288 | ||
283 | matrox_accel_bmove(PMINFO minfo->fbcon.var.xres_virtual, area->sy, area->sx, area->dy, area->dx, area->height, area->width); | 289 | matrox_accel_bmove(minfo, minfo->fbcon.var.xres_virtual, area->sy, area->sx, area->dy, area->dx, area->height, area->width); |
284 | } | 290 | } |
285 | 291 | ||
286 | static void matroxfb_accel_clear(WPMINFO u_int32_t color, int sy, int sx, int height, | 292 | static void matroxfb_accel_clear(struct matrox_fb_info *minfo, u_int32_t color, |
287 | int width) { | 293 | int sy, int sx, int height, int width) |
294 | { | ||
288 | CRITFLAGS | 295 | CRITFLAGS |
289 | 296 | ||
290 | DBG(__func__) | 297 | DBG(__func__) |
@@ -306,12 +313,14 @@ static void matroxfb_fillrect(struct fb_info* info, const struct fb_fillrect* re | |||
306 | 313 | ||
307 | switch (rect->rop) { | 314 | switch (rect->rop) { |
308 | case ROP_COPY: | 315 | case ROP_COPY: |
309 | matroxfb_accel_clear(PMINFO ((u_int32_t*)info->pseudo_palette)[rect->color], rect->dy, rect->dx, rect->height, rect->width); | 316 | matroxfb_accel_clear(minfo, ((u_int32_t *)info->pseudo_palette)[rect->color], rect->dy, rect->dx, rect->height, rect->width); |
310 | break; | 317 | break; |
311 | } | 318 | } |
312 | } | 319 | } |
313 | 320 | ||
314 | static void matroxfb_cfb4_clear(WPMINFO u_int32_t bgx, int sy, int sx, int height, int width) { | 321 | static void matroxfb_cfb4_clear(struct matrox_fb_info *minfo, u_int32_t bgx, |
322 | int sy, int sx, int height, int width) | ||
323 | { | ||
315 | int whattodo; | 324 | int whattodo; |
316 | CRITFLAGS | 325 | CRITFLAGS |
317 | 326 | ||
@@ -371,13 +380,15 @@ static void matroxfb_cfb4_fillrect(struct fb_info* info, const struct fb_fillrec | |||
371 | 380 | ||
372 | switch (rect->rop) { | 381 | switch (rect->rop) { |
373 | case ROP_COPY: | 382 | case ROP_COPY: |
374 | matroxfb_cfb4_clear(PMINFO ((u_int32_t*)info->pseudo_palette)[rect->color], rect->dy, rect->dx, rect->height, rect->width); | 383 | matroxfb_cfb4_clear(minfo, ((u_int32_t *)info->pseudo_palette)[rect->color], rect->dy, rect->dx, rect->height, rect->width); |
375 | break; | 384 | break; |
376 | } | 385 | } |
377 | } | 386 | } |
378 | 387 | ||
379 | static void matroxfb_1bpp_imageblit(WPMINFO u_int32_t fgx, u_int32_t bgx, | 388 | static void matroxfb_1bpp_imageblit(struct matrox_fb_info *minfo, u_int32_t fgx, |
380 | const u_int8_t* chardata, int width, int height, int yy, int xx) { | 389 | u_int32_t bgx, const u_int8_t *chardata, |
390 | int width, int height, int yy, int xx) | ||
391 | { | ||
381 | u_int32_t step; | 392 | u_int32_t step; |
382 | u_int32_t ydstlen; | 393 | u_int32_t ydstlen; |
383 | u_int32_t xlen; | 394 | u_int32_t xlen; |
@@ -476,7 +487,7 @@ static void matroxfb_imageblit(struct fb_info* info, const struct fb_image* imag | |||
476 | 487 | ||
477 | fgx = ((u_int32_t*)info->pseudo_palette)[image->fg_color]; | 488 | fgx = ((u_int32_t*)info->pseudo_palette)[image->fg_color]; |
478 | bgx = ((u_int32_t*)info->pseudo_palette)[image->bg_color]; | 489 | bgx = ((u_int32_t*)info->pseudo_palette)[image->bg_color]; |
479 | matroxfb_1bpp_imageblit(PMINFO fgx, bgx, image->data, image->width, image->height, image->dy, image->dx); | 490 | matroxfb_1bpp_imageblit(minfo, fgx, bgx, image->data, image->width, image->height, image->dy, image->dx); |
480 | } else { | 491 | } else { |
481 | /* Danger! image->depth is useless: logo painting code always | 492 | /* Danger! image->depth is useless: logo painting code always |
482 | passes framebuffer color depth here, although logo data are | 493 | passes framebuffer color depth here, although logo data are |