git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
drivers
/
video
/
hgafb.c
diff --git
a/drivers/video/hgafb.c
b/drivers/video/hgafb.c
index
617734e
..
87d008a
100644
(file)
--- a/
drivers/video/hgafb.c
+++ b/
drivers/video/hgafb.c
@@
-448,6
+448,10
@@
static int hgafb_blank(int blank_mode, struct fb_info *info)
return 0;
}
return 0;
}
+/*
+ * Accel functions
+ */
+#ifdef CONFIG_FB_HGA_ACCEL
static void hgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{
u_int rows, y;
static void hgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{
u_int rows, y;
@@
-510,6
+514,11
@@
static void hgafb_imageblit(struct fb_info *info, const struct fb_image *image)
*dest = d;
}
}
*dest = d;
}
}
+#else /* !CONFIG_FB_HGA_ACCEL */
+#define hgafb_fillrect cfb_fillrect
+#define hgafb_copyarea cfb_copyarea
+#define hgafb_imageblit cfb_imageblit
+#endif /* CONFIG_FB_HGA_ACCEL */
static struct fb_ops hgafb_ops = {
static struct fb_ops hgafb_ops = {
@@
-519,9
+528,9
@@
static struct fb_ops hgafb_ops = {
.fb_setcolreg = hgafb_setcolreg,
.fb_pan_display = hgafb_pan_display,
.fb_blank = hgafb_blank,
.fb_setcolreg = hgafb_setcolreg,
.fb_pan_display = hgafb_pan_display,
.fb_blank = hgafb_blank,
- .fb_fillrect =
cfb_fillrect, //
hgafb_fillrect,
- .fb_copyarea =
cfb_copyarea, //
hgafb_copyarea,
- .fb_imageblit =
cfb_imageblit,//
hgafb_imageblit,
+ .fb_fillrect = hgafb_fillrect,
+ .fb_copyarea = hgafb_copyarea,
+ .fb_imageblit = hgafb_imageblit,
};
/* ------------------------------------------------------------------------- *
};
/* ------------------------------------------------------------------------- *
@@
-538,6
+547,9
@@
static struct fb_ops hgafb_ops = {
int __init hgafb_init(void)
{
int __init hgafb_init(void)
{
+ if (fb_get_options("hgafb", NULL))
+ return -ENODEV;
+
if (! hga_card_detect()) {
printk(KERN_INFO "hgafb: HGA card not detected.\n");
return -EINVAL;
if (! hga_card_detect()) {
printk(KERN_INFO "hgafb: HGA card not detected.\n");
return -EINVAL;
@@
-549,7
+561,7
@@
int __init hgafb_init(void)
hga_fix.smem_start = VGA_MAP_MEM(hga_vram_base);
hga_fix.smem_len = hga_vram_len;
hga_fix.smem_start = VGA_MAP_MEM(hga_vram_base);
hga_fix.smem_len = hga_vram_len;
- fb_info.flags = FBINFO_
FLAG_DEFAULT
;
+ fb_info.flags = FBINFO_
DEFAULT | FBINFO_HWACCEL_YPAN
;
fb_info.var = hga_default_var;
fb_info.fix = hga_fix;
fb_info.monspecs.hfmin = 0;
fb_info.var = hga_default_var;
fb_info.fix = hga_fix;
fb_info.monspecs.hfmin = 0;
@@
-600,8
+612,8
@@
MODULE_LICENSE("GPL");
MODULE_PARM(nologo, "i");
MODULE_PARM_DESC(nologo, "Disables startup logo if != 0 (default=0)");
MODULE_PARM(nologo, "i");
MODULE_PARM_DESC(nologo, "Disables startup logo if != 0 (default=0)");
+module_init(hgafb_init);
#ifdef MODULE
#ifdef MODULE
-module_init(hgafb_init);
module_exit(hgafb_exit);
#endif
module_exit(hgafb_exit);
#endif