Commit 4ffc21e2 authored by James Simmons's avatar James Simmons

fbgen is gone and now we have cfbcursor.c

parent 83f7182b
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# All of the (potential) objects that export symbols. # All of the (potential) objects that export symbols.
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
export-objs := fbmem.o fbcmap.o fbgen.o fbmon.o modedb.o cfbfillrect.o \ export-objs := fbmem.o fbcmap.o fbmon.o modedb.o cfbcursor.o cfbfillrect.o \
cfbcopyarea.o cfbimgblt.o cyber2000fb.o cfbcopyarea.o cfbimgblt.o cyber2000fb.o
# Each configuration option enables a list of files. # Each configuration option enables a list of files.
...@@ -13,7 +13,7 @@ export-objs := fbmem.o fbcmap.o fbgen.o fbmon.o modedb.o cfbfillrect.o \ ...@@ -13,7 +13,7 @@ export-objs := fbmem.o fbcmap.o fbgen.o fbmon.o modedb.o cfbfillrect.o \
obj-$(CONFIG_VT) += console/ obj-$(CONFIG_VT) += console/
# Add fbmon.o back into obj-$(CONFIG_FB) in 2.5.x # Add fbmon.o back into obj-$(CONFIG_FB) in 2.5.x
obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o fbgen.o obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o cfbcursor.o
# Only include macmodes.o if we have FB support and are PPC # Only include macmodes.o if we have FB support and are PPC
ifeq ($(CONFIG_FB),y) ifeq ($(CONFIG_FB),y)
obj-$(CONFIG_PPC) += macmodes.o obj-$(CONFIG_PPC) += macmodes.o
......
/* /*
* linux/drivers/video/fbgen.c -- Generic routines for frame buffer devices * linux/drivers/video/cfbcursor.c -- Generic software cursor for frame buffer devices
* *
* Created 3 Jan 1998 by Geert Uytterhoeven * Created 14 Nov 2002 by James Simmons
*
* 2001 - Documented with DocBook
* - Brad Douglas <brad@neruo.com>
* *
* This file is subject to the terms and conditions of the GNU General Public * This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive * License. See the file COPYING in the main directory of this archive
...@@ -61,36 +58,8 @@ int cfb_cursor(struct fb_info *info, struct fbcursor *cursor) ...@@ -61,36 +58,8 @@ int cfb_cursor(struct fb_info *info, struct fbcursor *cursor)
return 0; return 0;
} }
int fb_blank(int blank, struct fb_info *info)
{
struct fb_cmap cmap;
u16 black[16];
if (info->fbops->fb_blank && !info->fbops->fb_blank(blank, info))
return 0;
if (blank) {
memset(black, 0, 16 * sizeof(u16));
cmap.red = black;
cmap.green = black;
cmap.blue = black;
cmap.transp = NULL;
cmap.start = 0;
cmap.len = 16;
fb_set_cmap(&cmap, 1, info);
} else {
if (info->cmap.len)
fb_set_cmap(&info->cmap, 1, info);
else {
int size =
info->var.bits_per_pixel == 16 ? 64 : 256;
fb_set_cmap(fb_default_cmap(size), 1, info);
}
}
return 0;
}
/* generic frame buffer operations */
EXPORT_SYMBOL(cfb_cursor); EXPORT_SYMBOL(cfb_cursor);
EXPORT_SYMBOL(fb_blank);
MODULE_AUTHOR("James Simmons <jsimmons@users.sf.net>");
MODULE_DESCRIPTION("Generic software cursor");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -249,42 +249,6 @@ void fbcon_accel_cursor(struct display *p, int flags, int xx, int yy) ...@@ -249,42 +249,6 @@ void fbcon_accel_cursor(struct display *p, int flags, int xx, int yy)
if (info->fbops->fb_cursor) if (info->fbops->fb_cursor)
info->fbops->fb_cursor(info, &cursor); info->fbops->fb_cursor(info, &cursor);
else {
int i, size = ((cursor.size.x + 7) / 8) * cursor.size.y;
struct fb_image image;
static char data[64];
image.bg_color = cursor.index->entry[0];
image.fg_color = cursor.index->entry[1];
if (cursor.enable) {
switch (cursor.rop) {
case ROP_XOR:
for (i = 0; i < size; i++)
data[i] = (cursor.image[i] &
cursor.mask[i]) ^
cursor.dest[i];
break;
case ROP_COPY:
default:
for (i = 0; i < size; i++)
data[i] = cursor.image[i] &
cursor.mask[i];
break;
}
} else
memcpy(data, &cursor.dest, size);
image.dx = cursor.pos.x;
image.dy = cursor.pos.y;
image.width = cursor.size.x;
image.height = cursor.size.y;
image.depth = cursor.depth;
image.data = data;
if (info->fbops->fb_imageblit)
info->fbops->fb_imageblit(info, &image);
}
} }
/* /*
......
...@@ -522,6 +522,26 @@ int fb_set_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -522,6 +522,26 @@ int fb_set_var(struct fb_var_screeninfo *var, struct fb_info *info)
return 0; return 0;
} }
int
fb_blank(int blank, struct fb_info *info)
{
u16 black[info->cmap.len];
struct fb_cmap cmap;
if (info->fbops->fb_blank && !info->fbops->fb_blank(blank, info))
return 0;
if (blank) {
memset(black, 0, info->cmap.len * sizeof(u16));
cmap.red = cmap.green = cmap.blue = black;
if (info->cmap.transp)
cmap.transp = black;
cmap.start = info->cmap.start;
cmap.len = info->cmap.len;
} else
cmap = info->cmap;
return fb_set_cmap(&cmap, 1, info);
}
static int static int
fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg) unsigned long arg)
...@@ -600,9 +620,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -600,9 +620,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
return 0; return 0;
#endif /* CONFIG_FRAMEBUFFER_CONSOLE */ #endif /* CONFIG_FRAMEBUFFER_CONSOLE */
case FBIOBLANK: case FBIOBLANK:
if (fb->fb_blank == NULL) return fb_blank(arg, info);
return -EINVAL;
return fb->fb_blank(arg, info);
default: default:
if (fb->fb_ioctl == NULL) if (fb->fb_ioctl == NULL)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment