.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * drivers/mb862xx/mb862xxfb_accel.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * (C) 2007 Alexander Shishkin <virtuoso@slind.org> |
---|
7 | 8 | * (C) 2009 Valentin Sitdikov <v.sitdikov@gmail.com> |
---|
8 | 9 | * (C) 2009 Siemens AG |
---|
9 | | - * |
---|
10 | | - * This program is free software; you can redistribute it and/or modify |
---|
11 | | - * it under the terms of the GNU General Public License version 2 as |
---|
12 | | - * published by the Free Software Foundation. |
---|
13 | | - * |
---|
14 | 10 | */ |
---|
15 | 11 | #include <linux/fb.h> |
---|
16 | 12 | #include <linux/delay.h> |
---|
.. | .. |
---|
188 | 184 | static void mb86290fb_imageblit(struct fb_info *info, |
---|
189 | 185 | const struct fb_image *image) |
---|
190 | 186 | { |
---|
191 | | - int mdr; |
---|
192 | 187 | u32 *cmd = NULL; |
---|
193 | 188 | void (*cmdfn) (u32 *, u16, u16, u16, u16, u16, u32, u32, |
---|
194 | 189 | const struct fb_image *, struct fb_info *) = NULL; |
---|
.. | .. |
---|
200 | 195 | u16 dx = image->dx, dy = image->dy; |
---|
201 | 196 | int x2, y2, vxres, vyres; |
---|
202 | 197 | |
---|
203 | | - mdr = (GDC_ROP_COPY << 9); |
---|
204 | 198 | x2 = image->dx + image->width; |
---|
205 | 199 | y2 = image->dy + image->height; |
---|
206 | 200 | vxres = info->var.xres_virtual; |
---|
.. | .. |
---|
307 | 301 | mb862xxfb_write_fifo(7, cmd, info); |
---|
308 | 302 | } |
---|
309 | 303 | |
---|
310 | | -void mb862xxfb_init_accel(struct fb_info *info, int xres) |
---|
| 304 | +void mb862xxfb_init_accel(struct fb_info *info, struct fb_ops *fbops, int xres) |
---|
311 | 305 | { |
---|
312 | 306 | struct mb862xxfb_par *par = info->par; |
---|
313 | 307 | |
---|
314 | 308 | if (info->var.bits_per_pixel == 32) { |
---|
315 | | - info->fbops->fb_fillrect = cfb_fillrect; |
---|
316 | | - info->fbops->fb_copyarea = cfb_copyarea; |
---|
317 | | - info->fbops->fb_imageblit = cfb_imageblit; |
---|
| 309 | + fbops->fb_fillrect = cfb_fillrect; |
---|
| 310 | + fbops->fb_copyarea = cfb_copyarea; |
---|
| 311 | + fbops->fb_imageblit = cfb_imageblit; |
---|
318 | 312 | } else { |
---|
319 | 313 | outreg(disp, GC_L0EM, 3); |
---|
320 | | - info->fbops->fb_fillrect = mb86290fb_fillrect; |
---|
321 | | - info->fbops->fb_copyarea = mb86290fb_copyarea; |
---|
322 | | - info->fbops->fb_imageblit = mb86290fb_imageblit; |
---|
| 314 | + fbops->fb_fillrect = mb86290fb_fillrect; |
---|
| 315 | + fbops->fb_copyarea = mb86290fb_copyarea; |
---|
| 316 | + fbops->fb_imageblit = mb86290fb_imageblit; |
---|
323 | 317 | } |
---|
324 | 318 | outreg(draw, GDC_REG_DRAW_BASE, 0); |
---|
325 | 319 | outreg(draw, GDC_REG_MODE_MISC, 0x8000); |
---|
.. | .. |
---|
330 | 324 | FBINFO_HWACCEL_IMAGEBLIT; |
---|
331 | 325 | info->fix.accel = 0xff; /*FIXME: add right define */ |
---|
332 | 326 | } |
---|
333 | | -EXPORT_SYMBOL(mb862xxfb_init_accel); |
---|
334 | 327 | |
---|
335 | 328 | MODULE_LICENSE("GPL v2"); |
---|