diff options
Diffstat (limited to 'drivers/video/aty')
-rw-r--r-- | drivers/video/aty/ati_ids.h | 2 | ||||
-rw-r--r-- | drivers/video/aty/aty128fb.c | 29 | ||||
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 37 | ||||
-rw-r--r-- | drivers/video/aty/mach64_ct.c | 8 | ||||
-rw-r--r-- | drivers/video/aty/radeon_base.c | 5 | ||||
-rw-r--r-- | drivers/video/aty/radeon_pm.c | 10 | ||||
-rw-r--r-- | drivers/video/aty/radeonfb.h | 4 |
7 files changed, 61 insertions, 34 deletions
diff --git a/drivers/video/aty/ati_ids.h b/drivers/video/aty/ati_ids.h index 39ab483..90e7df2 100644 --- a/drivers/video/aty/ati_ids.h +++ b/drivers/video/aty/ati_ids.h @@ -209,4 +209,4 @@ #define PCI_CHIP_R423_5D57 0x5D57 #define PCI_CHIP_RS350_7834 0x7834 #define PCI_CHIP_RS350_7835 0x7835 - +#define PCI_CHIP_RS480_5955 0x5955 diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index e86d7e0..7fea4d8 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c @@ -2165,18 +2165,29 @@ static void __devexit aty128_remove(struct pci_dev *pdev) static int aty128fb_blank(int blank, struct fb_info *fb) { struct aty128fb_par *par = fb->par; - u8 state = 0; + u8 state; if (par->lock_blank || par->asleep) return 0; - if (blank & FB_BLANK_VSYNC_SUSPEND) - state |= 2; - if (blank & FB_BLANK_HSYNC_SUSPEND) - state |= 1; - if (blank & FB_BLANK_POWERDOWN) - state |= 4; - + switch (blank) { + case FB_BLANK_NORMAL: + state = 4; + break; + case FB_BLANK_VSYNC_SUSPEND: + state = 6; + break; + case FB_BLANK_HSYNC_SUSPEND: + state = 5; + break; + case FB_BLANK_POWERDOWN: + state = 7; + break; + case FB_BLANK_UNBLANK: + default: + state = 0; + break; + } aty_st_8(CRTC_EXT_CNTL+1, state); if (par->chip_gen == rage_M3) { @@ -2430,7 +2441,7 @@ static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state) wait_for_idle(par); /* Blank display and LCD */ - aty128fb_blank(VESA_POWERDOWN, info); + aty128fb_blank(FB_BLANK_POWERDOWN, info); /* Sleep */ par->asleep = 1; diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 8514f2a..ea67dd9 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c @@ -2297,20 +2297,6 @@ static int __devinit aty_init(struct fb_info *info) par->pll_limits.xclk = 53; } #endif - if (pll) - par->pll_limits.pll_max = pll; - if (mclk) - par->pll_limits.mclk = mclk; - if (xclk) - par->pll_limits.xclk = xclk; - - aty_calc_mem_refresh(par, par->pll_limits.xclk); - par->pll_per = 1000000/par->pll_limits.pll_max; - par->mclk_per = 1000000/par->pll_limits.mclk; - par->xclk_per = 1000000/par->pll_limits.xclk; - - par->ref_clk_per = 1000000000000ULL / 14318180; - xtal = "14.31818"; #ifdef CONFIG_FB_ATY_GX if (!M64_HAS(INTEGRATED)) { @@ -2338,6 +2324,7 @@ static int __devinit aty_init(struct fb_info *info) case DAC_IBMRGB514: par->dac_ops = &aty_dac_ibm514; break; +#ifdef CONFIG_ATARI case DAC_ATI68860_B: case DAC_ATI68860_C: par->dac_ops = &aty_dac_ati68860b; @@ -2346,6 +2333,7 @@ static int __devinit aty_init(struct fb_info *info) case DAC_ATT21C498: par->dac_ops = &aty_dac_att21c498; break; +#endif default: PRINTKI("aty_init: DAC type not implemented yet!\n"); par->dac_ops = &aty_dac_unsupported; @@ -2389,8 +2377,29 @@ static int __devinit aty_init(struct fb_info *info) /* for many chips, the mclk is 67 MHz for SDRAM, 63 MHz otherwise */ if (par->pll_limits.mclk == 67 && par->ram_type < SDRAM) par->pll_limits.mclk = 63; + /* Mobility + 32bit memory interface need halved XCLK. */ + if (M64_HAS(MOBIL_BUS) && par->ram_type == SDRAM32) + par->pll_limits.xclk = (par->pll_limits.xclk + 1) >> 1; } +#endif + /* Allow command line to override clocks. */ + if (pll) + par->pll_limits.pll_max = pll; + if (mclk) + par->pll_limits.mclk = mclk; + if (xclk) + par->pll_limits.xclk = xclk; + + aty_calc_mem_refresh(par, par->pll_limits.xclk); + par->pll_per = 1000000/par->pll_limits.pll_max; + par->mclk_per = 1000000/par->pll_limits.mclk; + par->xclk_per = 1000000/par->pll_limits.xclk; + + par->ref_clk_per = 1000000000000ULL / 14318180; + xtal = "14.31818"; + +#ifdef CONFIG_FB_ATY_CT if (M64_HAS(GTB_DSP)) { u8 pll_ref_div = aty_ld_pll_ct(PLL_REF_DIV, par); diff --git a/drivers/video/aty/mach64_ct.c b/drivers/video/aty/mach64_ct.c index 1fdcfdb..cc9e977 100644 --- a/drivers/video/aty/mach64_ct.c +++ b/drivers/video/aty/mach64_ct.c @@ -608,12 +608,10 @@ static void aty_resume_pll_ct(const struct fb_info *info, aty_st_pll_ct(SCLK_FB_DIV, pll->ct.sclk_fb_div, par); aty_st_pll_ct(SPLL_CNTL2, pll->ct.spll_cntl2, par); /* - * The sclk has been started. However, I believe the first clock - * ticks it generates are not very stable. Hope this primitive loop - * helps for Rage Mobilities that sometimes crash when - * we switch to sclk. (Daniel Mantione, 13-05-2003) + * SCLK has been started. Wait for the PLL to lock. 5 ms + * should be enough according to mach64 programmer's guide. */ - udelay(500); + mdelay(5); } aty_st_pll_ct(PLL_REF_DIV, pll->ct.pll_ref_div, par); diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 9d629fe..2ce0501 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c @@ -100,6 +100,8 @@ { PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) } static struct pci_device_id radeonfb_pci_table[] = { + /* Radeon Xpress 200m */ + CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY), /* Mobility M6 */ CHIP_DEF(PCI_CHIP_RADEON_LY, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), CHIP_DEF(PCI_CHIP_RADEON_LZ, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), @@ -1994,7 +1996,8 @@ static void radeon_identify_vram(struct radeonfb_info *rinfo) /* framebuffer size */ if ((rinfo->family == CHIP_FAMILY_RS100) || (rinfo->family == CHIP_FAMILY_RS200) || - (rinfo->family == CHIP_FAMILY_RS300)) { + (rinfo->family == CHIP_FAMILY_RS300) || + (rinfo->family == CHIP_FAMILY_RS480) ) { u32 tom = INREG(NB_TOM); tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024); diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c index 1786ae1..be1d57b 100644 --- a/drivers/video/aty/radeon_pm.c +++ b/drivers/video/aty/radeon_pm.c @@ -2826,11 +2826,15 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis rinfo->pm_reg = pci_find_capability(rinfo->pdev, PCI_CAP_ID_PM); /* Enable/Disable dynamic clocks: TODO add sysfs access */ - rinfo->dynclk = dynclk; - if (dynclk == 1) { + if (rinfo->family == CHIP_FAMILY_RS480) + rinfo->dynclk = -1; + else + rinfo->dynclk = dynclk; + + if (rinfo->dynclk == 1) { radeon_pm_enable_dynamic_mode(rinfo); printk("radeonfb: Dynamic Clock Power Management enabled\n"); - } else if (dynclk == 0) { + } else if (rinfo->dynclk == 0) { radeon_pm_disable_dynamic_mode(rinfo); printk("radeonfb: Dynamic Clock Power Management disabled\n"); } diff --git a/drivers/video/aty/radeonfb.h b/drivers/video/aty/radeonfb.h index 3190003..7ebffcd 100644 --- a/drivers/video/aty/radeonfb.h +++ b/drivers/video/aty/radeonfb.h @@ -48,6 +48,7 @@ enum radeon_family { CHIP_FAMILY_RV350, CHIP_FAMILY_RV380, /* RV370/RV380/M22/M24 */ CHIP_FAMILY_R420, /* R420/R423/M18 */ + CHIP_FAMILY_RS480, CHIP_FAMILY_LAST, }; @@ -64,7 +65,8 @@ enum radeon_family { ((rinfo)->family == CHIP_FAMILY_RV350) || \ ((rinfo)->family == CHIP_FAMILY_R350) || \ ((rinfo)->family == CHIP_FAMILY_RV380) || \ - ((rinfo)->family == CHIP_FAMILY_R420)) + ((rinfo)->family == CHIP_FAMILY_R420) || \ + ((rinfo)->family == CHIP_FAMILY_RS480) ) /* * Chip flags |