forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/video/fbdev/mb862xx/mb862xxfb_accel.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * drivers/mb862xx/mb862xxfb_accel.c
34 *
....@@ -6,11 +7,6 @@
67 * (C) 2007 Alexander Shishkin <virtuoso@slind.org>
78 * (C) 2009 Valentin Sitdikov <v.sitdikov@gmail.com>
89 * (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
- *
1410 */
1511 #include <linux/fb.h>
1612 #include <linux/delay.h>
....@@ -188,7 +184,6 @@
188184 static void mb86290fb_imageblit(struct fb_info *info,
189185 const struct fb_image *image)
190186 {
191
- int mdr;
192187 u32 *cmd = NULL;
193188 void (*cmdfn) (u32 *, u16, u16, u16, u16, u16, u32, u32,
194189 const struct fb_image *, struct fb_info *) = NULL;
....@@ -200,7 +195,6 @@
200195 u16 dx = image->dx, dy = image->dy;
201196 int x2, y2, vxres, vyres;
202197
203
- mdr = (GDC_ROP_COPY << 9);
204198 x2 = image->dx + image->width;
205199 y2 = image->dy + image->height;
206200 vxres = info->var.xres_virtual;
....@@ -307,19 +301,19 @@
307301 mb862xxfb_write_fifo(7, cmd, info);
308302 }
309303
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)
311305 {
312306 struct mb862xxfb_par *par = info->par;
313307
314308 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;
318312 } else {
319313 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;
323317 }
324318 outreg(draw, GDC_REG_DRAW_BASE, 0);
325319 outreg(draw, GDC_REG_MODE_MISC, 0x8000);
....@@ -330,6 +324,5 @@
330324 FBINFO_HWACCEL_IMAGEBLIT;
331325 info->fix.accel = 0xff; /*FIXME: add right define */
332326 }
333
-EXPORT_SYMBOL(mb862xxfb_init_accel);
334327
335328 MODULE_LICENSE("GPL v2");