Commit f2cca4da authored by James Simmons's avatar James Simmons

The software cursor works for any pixel arrangement

parent 6e8f214d
......@@ -5,7 +5,7 @@
# All of the (potential) objects that export symbols.
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
export-objs := fbmem.o fbcmap.o fbmon.o modedb.o cfbcursor.o cfbfillrect.o \
export-objs := fbmem.o fbcmap.o fbmon.o modedb.o softcursor.o cfbfillrect.o \
cfbcopyarea.o cfbimgblt.o cyber2000fb.o
# Each configuration option enables a list of files.
......@@ -13,7 +13,7 @@ export-objs := fbmem.o fbcmap.o fbmon.o modedb.o cfbcursor.o cfbfillrect.o \
obj-$(CONFIG_VT) += console/
# Add fbmon.o back into obj-$(CONFIG_FB) in 2.5.x
obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o cfbcursor.o
obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o softcursor.o
# Only include macmodes.o if we have FB support and are PPC
ifeq ($(CONFIG_FB),y)
obj-$(CONFIG_PPC) += macmodes.o
......
......@@ -65,7 +65,7 @@ static struct fb_ops anakinfb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
int __init
......
......@@ -405,7 +405,7 @@ static struct fb_ops aty128fb_ops = {
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
#endif
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
#ifdef CONFIG_PMAC_BACKLIGHT
......
......@@ -219,7 +219,7 @@ static struct fb_ops clps7111fb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
static int
......
......@@ -491,7 +491,7 @@ static void fbcon_init(struct vc_data *vc, int init)
gen_set_disp(unit, info);
fb_display[unit].conp = vc;
fb_display[unit].fb_info = info;
/* clear out the cmap so we don't have dangling pointers */
fbcon_set_display(unit, init, !init);
}
......@@ -566,8 +566,6 @@ static int fbcon_changevar(int con)
vc->vc_font.width);
p->dispsw = &fbcon_dummy;
}
if (p->dispsw->set_font)
p->dispsw->set_font(p, vc->vc_font.width, vc->vc_font.height);
updatescrollmode(p, vc);
old_cols = vc->vc_cols;
......@@ -664,7 +662,6 @@ static void fbcon_set_display(int con, int init, int logo)
{
struct display *p = &fb_display[con];
struct fb_info *info = p->fb_info;
struct vc_data *default_mode = info->display_fg;
struct vc_data *vc = p->conp;
int nr_rows, nr_cols;
int old_rows, old_cols;
......@@ -721,8 +718,6 @@ static void fbcon_set_display(int con, int init, int logo)
vc->vc_font.width);
p->dispsw = &fbcon_dummy;
}
if (p->dispsw->set_font)
p->dispsw->set_font(p, vc->vc_font.width, vc->vc_font.height);
updatescrollmode(p, vc);
old_cols = vc->vc_cols;
......@@ -988,8 +983,7 @@ static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
static void fbcon_cursor(struct vc_data *vc, int mode)
{
int unit = vc->vc_num;
struct display *p = &fb_display[unit];
struct display *p = &fb_display[vc->vc_num];
int y = vc->vc_y;
if (mode & CM_SOFTBACK) {
......
......@@ -33,7 +33,6 @@ struct display_switch {
void (*putcs)(struct vc_data *conp, struct display *p, const unsigned short *s,
int count, int yy, int xx);
void (*cursor)(struct display *p, int flags, int xx, int yy);
int (*set_font)(struct display *p, int width, int height);
void (*clear_margins)(struct vc_data *conp, struct display *p,
int bottom_only);
unsigned int fontwidthmask; /* 1 at (1 << (width - 1)) if width is supported */
......
......@@ -121,7 +121,7 @@ static struct fb_ops dn_fb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = dnfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
struct fb_var_screeninfo dnfb_var __initdata = {
......
......@@ -178,7 +178,7 @@ static struct fb_ops fm2fb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
/*
......
......@@ -128,7 +128,7 @@ static struct fb_ops hitfb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
int __init hitfb_init(void)
......
......@@ -105,7 +105,7 @@ static struct fb_ops hpfb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = hpfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
#define TOPCAT_FBOMSB 0x5d
......
......@@ -589,7 +589,7 @@ static struct fb_ops macfb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
void __init macfb_setup(char *options, int *ints)
......
......@@ -114,7 +114,7 @@ static struct fb_ops maxinefb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
int __init maxinefb_init(void)
......
......@@ -1465,7 +1465,7 @@ static struct fb_ops neofb_ops = {
.fb_fillrect = neofb_fillrect,
.fb_copyarea = neofb_copyarea,
.fb_imageblit = neofb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
/* --------------------------------------------------------------------- */
......
......@@ -86,7 +86,7 @@ static struct fb_ops offb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
/*
......
......@@ -112,7 +112,7 @@ static struct fb_ops pmagbafb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
}
int __init pmagbafb_init_one(int slot)
......
......@@ -115,7 +115,7 @@ static struct fb_ops pmagbbfb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
int __init pmagbbfb_init_one(int slot)
......
......@@ -70,7 +70,7 @@ static struct fb_ops q40fb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
static int q40fb_setcolreg(unsigned regno, unsigned red, unsigned green,
......
......@@ -105,7 +105,7 @@ static struct fb_ops sgivwfb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
.fb_mmap = sgivwfb_mmap,
};
......
/*
* linux/drivers/video/cfbcursor.c -- Generic software cursor for frame buffer devices
* linux/drivers/video/softcursor.c -- Generic software cursor for frame buffer devices
*
* Created 14 Nov 2002 by James Simmons
*
......@@ -17,7 +17,7 @@
#include <asm/uaccess.h>
#include <asm/io.h>
int cfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
int soft_cursor(struct fb_info *info, struct fb_cursor *cursor)
{
int i, size = ((cursor->image.width + 7) / 8) * cursor->image.height;
struct fb_image image;
......@@ -55,7 +55,7 @@ int cfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
return 0;
}
EXPORT_SYMBOL(cfb_cursor);
EXPORT_SYMBOL(soft_cursor);
MODULE_AUTHOR("James Simmons <jsimmons@users.sf.net>");
MODULE_DESCRIPTION("Generic software cursor");
......
......@@ -176,7 +176,7 @@ static struct fb_ops tdfxfb_ops = {
.fb_fillrect = tdfxfb_fillrect,
.fb_copyarea = tdfxfb_copyarea,
.fb_imageblit = tdfxfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
/*
......
......@@ -98,7 +98,7 @@ static struct fb_ops tx3912fb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
static int tx3912fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
......
......@@ -175,7 +175,7 @@ static struct fb_ops vesafb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
};
int __init vesafb_setup(char *options)
......
......@@ -100,7 +100,7 @@ static struct fb_ops vfb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_cursor = cfb_cursor,
.fb_cursor = soft_cursor,
.fb_mmap = vfb_mmap,
};
......
......@@ -448,7 +448,7 @@ struct fb_info {
extern int fb_set_var(struct fb_var_screeninfo *var, struct fb_info *info);
extern int fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info);
extern int fb_blank(int blank, struct fb_info *info);
extern int cfb_cursor(struct fb_info *info, struct fb_cursor *cursor);
extern int soft_cursor(struct fb_info *info, struct fb_cursor *cursor);
extern void cfb_fillrect(struct fb_info *info, struct fb_fillrect *rect);
extern void cfb_copyarea(struct fb_info *info, struct fb_copyarea *area);
extern void cfb_imageblit(struct fb_info *info, struct fb_image *image);
......
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