aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/aty/atyfb_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/aty/atyfb_base.c')
-rw-r--r--drivers/video/aty/atyfb_base.c43
1 files changed, 29 insertions, 14 deletions
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index c5185f7cf4ba..22e720611bf6 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -316,12 +316,12 @@ static int vram;
316static int pll; 316static int pll;
317static int mclk; 317static int mclk;
318static int xclk; 318static int xclk;
319static int comp_sync __initdata = -1; 319static int comp_sync __devinitdata = -1;
320static char *mode; 320static char *mode;
321 321
322#ifdef CONFIG_PPC 322#ifdef CONFIG_PPC
323static int default_vmode __initdata = VMODE_CHOOSE; 323static int default_vmode __devinitdata = VMODE_CHOOSE;
324static int default_cmode __initdata = CMODE_CHOOSE; 324static int default_cmode __devinitdata = CMODE_CHOOSE;
325 325
326module_param_named(vmode, default_vmode, int, 0); 326module_param_named(vmode, default_vmode, int, 0);
327MODULE_PARM_DESC(vmode, "int: video mode for mac"); 327MODULE_PARM_DESC(vmode, "int: video mode for mac");
@@ -330,10 +330,10 @@ MODULE_PARM_DESC(cmode, "int: color mode for mac");
330#endif 330#endif
331 331
332#ifdef CONFIG_ATARI 332#ifdef CONFIG_ATARI
333static unsigned int mach64_count __initdata = 0; 333static unsigned int mach64_count __devinitdata = 0;
334static unsigned long phys_vmembase[FB_MAX] __initdata = { 0, }; 334static unsigned long phys_vmembase[FB_MAX] __devinitdata = { 0, };
335static unsigned long phys_size[FB_MAX] __initdata = { 0, }; 335static unsigned long phys_size[FB_MAX] __devinitdata = { 0, };
336static unsigned long phys_guiregbase[FB_MAX] __initdata = { 0, }; 336static unsigned long phys_guiregbase[FB_MAX] __devinitdata = { 0, };
337#endif 337#endif
338 338
339/* top -> down is an evolution of mach64 chipset, any corrections? */ 339/* top -> down is an evolution of mach64 chipset, any corrections? */
@@ -583,7 +583,7 @@ static u32 atyfb_get_pixclock(struct fb_var_screeninfo *var, struct atyfb_par *p
583 * Apple monitor sense 583 * Apple monitor sense
584 */ 584 */
585 585
586static int __init read_aty_sense(const struct atyfb_par *par) 586static int __devinit read_aty_sense(const struct atyfb_par *par)
587{ 587{
588 int sense, i; 588 int sense, i;
589 589
@@ -1281,6 +1281,14 @@ static int atyfb_set_par(struct fb_info *info)
1281 1281
1282 par->accel_flags = var->accel_flags; /* hack */ 1282 par->accel_flags = var->accel_flags; /* hack */
1283 1283
1284 if (var->accel_flags) {
1285 info->fbops->fb_sync = atyfb_sync;
1286 info->flags &= ~FBINFO_HWACCEL_DISABLED;
1287 } else {
1288 info->fbops->fb_sync = NULL;
1289 info->flags |= FBINFO_HWACCEL_DISABLED;
1290 }
1291
1284 if (par->blitter_may_be_busy) 1292 if (par->blitter_may_be_busy)
1285 wait_for_idle(par); 1293 wait_for_idle(par);
1286 1294
@@ -2253,7 +2261,7 @@ static void aty_bl_exit(struct atyfb_par *par)
2253 2261
2254#endif /* CONFIG_FB_ATY_BACKLIGHT */ 2262#endif /* CONFIG_FB_ATY_BACKLIGHT */
2255 2263
2256static void __init aty_calc_mem_refresh(struct atyfb_par *par, int xclk) 2264static void __devinit aty_calc_mem_refresh(struct atyfb_par *par, int xclk)
2257{ 2265{
2258 const int ragepro_tbl[] = { 2266 const int ragepro_tbl[] = {
2259 44, 50, 55, 66, 75, 80, 100 2267 44, 50, 55, 66, 75, 80, 100
@@ -2313,7 +2321,7 @@ static int __devinit atyfb_get_timings_from_lcd(struct atyfb_par *par,
2313} 2321}
2314#endif /* defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) */ 2322#endif /* defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) */
2315 2323
2316static int __init aty_init(struct fb_info *info, const char *name) 2324static int __devinit aty_init(struct fb_info *info, const char *name)
2317{ 2325{
2318 struct atyfb_par *par = (struct atyfb_par *) info->par; 2326 struct atyfb_par *par = (struct atyfb_par *) info->par;
2319 const char *ramname = NULL, *xtal; 2327 const char *ramname = NULL, *xtal;
@@ -2394,12 +2402,15 @@ static int __init aty_init(struct fb_info *info, const char *name)
2394 break; 2402 break;
2395 } 2403 }
2396 switch (clk_type) { 2404 switch (clk_type) {
2405#ifdef CONFIG_ATARI
2397 case CLK_ATI18818_1: 2406 case CLK_ATI18818_1:
2398 par->pll_ops = &aty_pll_ati18818_1; 2407 par->pll_ops = &aty_pll_ati18818_1;
2399 break; 2408 break;
2409#else
2400 case CLK_IBMRGB514: 2410 case CLK_IBMRGB514:
2401 par->pll_ops = &aty_pll_ibm514; 2411 par->pll_ops = &aty_pll_ibm514;
2402 break; 2412 break;
2413#endif
2403#if 0 /* dead code */ 2414#if 0 /* dead code */
2404 case CLK_STG1703: 2415 case CLK_STG1703:
2405 par->pll_ops = &aty_pll_stg1703; 2416 par->pll_ops = &aty_pll_stg1703;
@@ -2604,7 +2615,11 @@ static int __init aty_init(struct fb_info *info, const char *name)
2604 2615
2605 info->fbops = &atyfb_ops; 2616 info->fbops = &atyfb_ops;
2606 info->pseudo_palette = pseudo_palette; 2617 info->pseudo_palette = pseudo_palette;
2607 info->flags = FBINFO_FLAG_DEFAULT; 2618 info->flags = FBINFO_DEFAULT |
2619 FBINFO_HWACCEL_IMAGEBLIT |
2620 FBINFO_HWACCEL_FILLRECT |
2621 FBINFO_HWACCEL_COPYAREA |
2622 FBINFO_HWACCEL_YPAN;
2608 2623
2609#ifdef CONFIG_PMAC_BACKLIGHT 2624#ifdef CONFIG_PMAC_BACKLIGHT
2610 if (M64_HAS(G3_PB_1_1) && machine_is_compatible("PowerBook1,1")) { 2625 if (M64_HAS(G3_PB_1_1) && machine_is_compatible("PowerBook1,1")) {
@@ -2733,7 +2748,7 @@ aty_init_exit:
2733} 2748}
2734 2749
2735#ifdef CONFIG_ATARI 2750#ifdef CONFIG_ATARI
2736static int __init store_video_par(char *video_str, unsigned char m64_num) 2751static int __devinit store_video_par(char *video_str, unsigned char m64_num)
2737{ 2752{
2738 char *p; 2753 char *p;
2739 unsigned long vmembase, size, guiregbase; 2754 unsigned long vmembase, size, guiregbase;
@@ -3764,7 +3779,7 @@ static struct pci_driver atyfb_driver = {
3764#endif /* CONFIG_PCI */ 3779#endif /* CONFIG_PCI */
3765 3780
3766#ifndef MODULE 3781#ifndef MODULE
3767static int __init atyfb_setup(char *options) 3782static int __devinit atyfb_setup(char *options)
3768{ 3783{
3769 char *this_opt; 3784 char *this_opt;
3770 3785
@@ -3836,7 +3851,7 @@ static int __init atyfb_setup(char *options)
3836} 3851}
3837#endif /* MODULE */ 3852#endif /* MODULE */
3838 3853
3839static int __init atyfb_init(void) 3854static int __devinit atyfb_init(void)
3840{ 3855{
3841#ifndef MODULE 3856#ifndef MODULE
3842 char *option = NULL; 3857 char *option = NULL;