Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fbdev: wmt_ge_rops: Remove fb_draw.h includes

Remove dependency on fb_draw.h to allow fbcon packed pixel drawing refactoring.

Signed-off-by: Zsolt Kajtar <soci@c64.rulez.org>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Zsolt Kajtar and committed by
Helge Deller
1a78d9a3 b8389cbe

+28 -2
+28 -2
drivers/video/fbdev/wmt_ge_rops.c
··· 12 12 #include <linux/io.h> 13 13 #include <linux/platform_device.h> 14 14 15 - #include "core/fb_draw.h" 16 15 #include "wmt_ge_rops.h" 17 16 18 17 #define GE_COMMAND_OFF 0x00 ··· 40 41 41 42 static void __iomem *regbase; 42 43 44 + /* from the spec it seems more like depth than bits per pixel */ 45 + static inline unsigned long pixel_to_pat(u32 depth, u32 pixel, struct fb_info *p) 46 + { 47 + switch (depth) { 48 + case 1: 49 + return ~0ul*pixel; 50 + case 2: 51 + return ~0ul/3*pixel; 52 + case 4: 53 + return ~0ul/15*pixel; 54 + case 8: 55 + return ~0ul/255*pixel; 56 + case 12: 57 + case 15: 58 + case 16: 59 + return ~0ul/0xffff*pixel; 60 + case 18: 61 + case 24: 62 + return 0x1000001ul*pixel; 63 + case 32: 64 + return pixel; 65 + default: 66 + fb_warn_once(p, "%s: unsupported pixelformat %d\n", __func__, depth); 67 + return 0; 68 + } 69 + } 70 + 43 71 void wmt_ge_fillrect(struct fb_info *p, const struct fb_fillrect *rect) 44 72 { 45 73 unsigned long fg, pat; ··· 80 54 else 81 55 fg = rect->color; 82 56 83 - pat = pixel_to_pat(p->var.bits_per_pixel, fg); 57 + pat = pixel_to_pat(p->var.bits_per_pixel, fg, p); 84 58 85 59 if (p->fbops->fb_sync) 86 60 p->fbops->fb_sync(p);