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.5.x5
[linux-2.6.git]
/
drivers
/
video
/
amifb.c
diff --git
a/drivers/video/amifb.c
b/drivers/video/amifb.c
index
f61cd6e
..
99c538f
100644
(file)
--- a/
drivers/video/amifb.c
+++ b/
drivers/video/amifb.c
@@
-1239,8
+1239,6
@@
int __init amifb_setup(char *options)
if (!strcmp(this_opt, "inverse")) {
amifb_inverse = 1;
fb_invert_cmaps();
if (!strcmp(this_opt, "inverse")) {
amifb_inverse = 1;
fb_invert_cmaps();
- } else if (!strcmp(this_opt, "off")) {
- amifb_video_off();
} else if (!strcmp(this_opt, "ilbm"))
amifb_ilbm = 1;
else if (!strncmp(this_opt, "monitorcap:", 11))
} else if (!strcmp(this_opt, "ilbm"))
amifb_ilbm = 1;
else if (!strncmp(this_opt, "monitorcap:", 11))
@@
-1307,13
+1305,16
@@
static int amifb_set_par(struct fb_info *info)
info->fix.ywrapstep = 1;
info->fix.xpanstep = 0;
info->fix.ypanstep = 0;
info->fix.ywrapstep = 1;
info->fix.xpanstep = 0;
info->fix.ypanstep = 0;
+ info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YWRAP |
+ FBINFO_READS_FAST; /* override SCROLL_REDRAW */
} else {
info->fix.ywrapstep = 0;
} else {
info->fix.ywrapstep = 0;
- if (par->vmode &
=
FB_VMODE_SMOOTH_XPAN)
+ if (par->vmode & FB_VMODE_SMOOTH_XPAN)
info->fix.xpanstep = 1;
else
info->fix.xpanstep = 16<<maxfmode;
info->fix.ypanstep = 1;
info->fix.xpanstep = 1;
else
info->fix.xpanstep = 16<<maxfmode;
info->fix.ypanstep = 1;
+ info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
}
return 0;
}
}
return 0;
}
@@
-2254,21
+2255,17
@@
int __init amifb_init(void)
u_long chipptr;
u_int defmode;
u_long chipptr;
u_int defmode;
- if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_VIDEO))
- return -ENXIO;
-
- /*
- * TODO: where should we put this? The DMI Resolver doesn't have a
- * frame buffer accessible by the CPU
- */
+#ifndef MODULE
+ char *option = NULL;
-#ifdef CONFIG_GSP_RESOLVER
- if (amifb_resolver){
- custom.dmacon = DMAF_MASTER | DMAF_RASTER | DMAF_COPPER |
- DMAF_BLITTER | DMAF_SPRITE;
- return 0;
+ if (fb_get_options("amifb", &option)) {
+ amifb_video_off();
+ return -ENODEV;
}
}
+ amifb_setup(option);
#endif
#endif
+ if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_VIDEO))
+ return -ENXIO;
/*
* We request all registers starting from bplpt[0]
/*
* We request all registers starting from bplpt[0]
@@
-2351,7
+2348,7
@@
default_chipset:
*/
{
*/
{
- u_long tmp = DIVUL(200
E9
, amiga_eclock);
+ u_long tmp = DIVUL(200
000000000ULL
, amiga_eclock);
pixclock[TAG_SHRES] = (tmp + 4) / 8; /* SHRES: 35 ns / 28 MHz */
pixclock[TAG_HIRES] = (tmp + 2) / 4; /* HIRES: 70 ns / 14 MHz */
pixclock[TAG_SHRES] = (tmp + 4) / 8; /* SHRES: 35 ns / 28 MHz */
pixclock[TAG_HIRES] = (tmp + 2) / 4; /* HIRES: 70 ns / 14 MHz */
@@
-2382,7
+2379,7
@@
default_chipset:
fb_info.fbops = &amifb_ops;
fb_info.par = ¤tpar;
fb_info.fbops = &amifb_ops;
fb_info.par = ¤tpar;
- fb_info.flags = FBINFO_
FLAG_
DEFAULT;
+ fb_info.flags = FBINFO_DEFAULT;
if (!fb_find_mode(&fb_info.var, &fb_info, mode_option, ami_modedb,
NUM_TOTAL_MODES, &ami_modedb[defmode], 4)) {
if (!fb_find_mode(&fb_info.var, &fb_info, mode_option, ami_modedb,
NUM_TOTAL_MODES, &ami_modedb[defmode], 4)) {
@@
-2472,6
+2469,7
@@
static void amifb_deinit(void)
static int amifb_blank(int blank, struct fb_info *info)
{
do_blank = blank ? blank : -1;
static int amifb_blank(int blank, struct fb_info *info)
{
do_blank = blank ? blank : -1;
+
return 0;
}
return 0;
}
@@
-2946,21
+2944,11
@@
static int ami_encode_var(struct fb_var_screeninfo *var,
var->bits_per_pixel = par->bpp;
var->grayscale = 0;
var->bits_per_pixel = par->bpp;
var->grayscale = 0;
- if (IS_AGA) {
- var->red.offset = 0;
- var->red.length = 8;
- var->red.msb_right = 0;
- } else {
- if (clk_shift == TAG_SHRES) {
- var->red.offset = 0;
- var->red.length = 2;
- var->red.msb_right = 0;
- } else {
- var->red.offset = 0;
- var->red.length = 4;
- var->red.msb_right = 0;
- }
- }
+ var->red.offset = 0;
+ var->red.msb_right = 0;
+ var->red.length = par->bpp;
+ if (par->bplcon0 & BPC0_HAM)
+ var->red.length -= 2;
var->blue = var->green = var->red;
var->transp.offset = 0;
var->transp.length = 0;
var->blue = var->green = var->red;
var->transp.offset = 0;
var->transp.length = 0;
@@
-3260,20
+3248,20
@@
static void ami_do_blank(void)
custom.dmacon = DMAF_RASTER | DMAF_SPRITE;
red = green = blue = 0;
if (!IS_OCS && do_blank > 1) {
custom.dmacon = DMAF_RASTER | DMAF_SPRITE;
red = green = blue = 0;
if (!IS_OCS && do_blank > 1) {
- switch (do_blank
-1
) {
- case
VESA
_VSYNC_SUSPEND:
+ switch (do_blank) {
+ case
FB_BLANK
_VSYNC_SUSPEND:
custom.hsstrt = hsstrt2hw(par->hsstrt);
custom.hsstop = hsstop2hw(par->hsstop);
custom.vsstrt = vsstrt2hw(par->vtotal+4);
custom.vsstop = vsstop2hw(par->vtotal+4);
break;
custom.hsstrt = hsstrt2hw(par->hsstrt);
custom.hsstop = hsstop2hw(par->hsstop);
custom.vsstrt = vsstrt2hw(par->vtotal+4);
custom.vsstop = vsstop2hw(par->vtotal+4);
break;
- case
VESA
_HSYNC_SUSPEND:
+ case
FB_BLANK
_HSYNC_SUSPEND:
custom.hsstrt = hsstrt2hw(par->htotal+16);
custom.hsstop = hsstop2hw(par->htotal+16);
custom.vsstrt = vsstrt2hw(par->vsstrt);
custom.vsstop = vsstrt2hw(par->vsstop);
break;
custom.hsstrt = hsstrt2hw(par->htotal+16);
custom.hsstop = hsstop2hw(par->htotal+16);
custom.vsstrt = vsstrt2hw(par->vsstrt);
custom.vsstop = vsstrt2hw(par->vsstop);
break;
- case
VESA
_POWERDOWN:
+ case
FB_BLANK
_POWERDOWN:
custom.hsstrt = hsstrt2hw(par->htotal+16);
custom.hsstop = hsstop2hw(par->htotal+16);
custom.vsstrt = vsstrt2hw(par->vtotal+4);
custom.hsstrt = hsstrt2hw(par->htotal+16);
custom.hsstop = hsstop2hw(par->htotal+16);
custom.vsstrt = vsstrt2hw(par->vtotal+4);
@@
-3811,14
+3799,11
@@
static void ami_rebuild_copper(void)
}
}
+module_init(amifb_init);
+
#ifdef MODULE
MODULE_LICENSE("GPL");
#ifdef MODULE
MODULE_LICENSE("GPL");
-int init_module(void)
-{
- return amifb_init();
-}
-
void cleanup_module(void)
{
unregister_framebuffer(&fb_info);
void cleanup_module(void)
{
unregister_framebuffer(&fb_info);