aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorjohan henriksson <jhn98032@gmail.com>2007-05-08 03:37:59 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:27 -0400
commitdd1447134454b169d5ae353aceb93f2368db8547 (patch)
tree358071bb29654fdf8ae3b7dd53e050cc482c9f6d /drivers/video
parentabed5d15af4cf864b502b5b0402c7fb39c5c3371 (diff)
radeonfb: Add support for Radeon xpress 200m
Added support for radeon xpress 200m(rs480). Note that the card doesn't like dynclk turned on. Signed-off-by: Johan Henriksson <jhn98032@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/aty/ati_ids.h2
-rw-r--r--drivers/video/aty/radeon_base.c5
-rw-r--r--drivers/video/aty/radeon_pm.c10
-rw-r--r--drivers/video/aty/radeonfb.h4
4 files changed, 15 insertions, 6 deletions
diff --git a/drivers/video/aty/ati_ids.h b/drivers/video/aty/ati_ids.h
index 39ab483fc250..90e7df22f508 100644
--- a/drivers/video/aty/ati_ids.h
+++ b/drivers/video/aty/ati_ids.h
@@ -209,4 +209,4 @@
209#define PCI_CHIP_R423_5D57 0x5D57 209#define PCI_CHIP_R423_5D57 0x5D57
210#define PCI_CHIP_RS350_7834 0x7834 210#define PCI_CHIP_RS350_7834 0x7834
211#define PCI_CHIP_RS350_7835 0x7835 211#define PCI_CHIP_RS350_7835 0x7835
212 212#define PCI_CHIP_RS480_5955 0x5955
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index a4b3fd185de7..0ec36cd5de28 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -100,6 +100,8 @@
100 { PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) } 100 { PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) }
101 101
102static struct pci_device_id radeonfb_pci_table[] = { 102static struct pci_device_id radeonfb_pci_table[] = {
103 /* Radeon Xpress 200m */
104 CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
103 /* Mobility M6 */ 105 /* Mobility M6 */
104 CHIP_DEF(PCI_CHIP_RADEON_LY, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), 106 CHIP_DEF(PCI_CHIP_RADEON_LY, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
105 CHIP_DEF(PCI_CHIP_RADEON_LZ, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), 107 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)
1994 /* framebuffer size */ 1996 /* framebuffer size */
1995 if ((rinfo->family == CHIP_FAMILY_RS100) || 1997 if ((rinfo->family == CHIP_FAMILY_RS100) ||
1996 (rinfo->family == CHIP_FAMILY_RS200) || 1998 (rinfo->family == CHIP_FAMILY_RS200) ||
1997 (rinfo->family == CHIP_FAMILY_RS300)) { 1999 (rinfo->family == CHIP_FAMILY_RS300) ||
2000 (rinfo->family == CHIP_FAMILY_RS480) ) {
1998 u32 tom = INREG(NB_TOM); 2001 u32 tom = INREG(NB_TOM);
1999 tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024); 2002 tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024);
2000 2003
diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c
index c411293cefc8..4425f7e90309 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
2826 rinfo->pm_reg = pci_find_capability(rinfo->pdev, PCI_CAP_ID_PM); 2826 rinfo->pm_reg = pci_find_capability(rinfo->pdev, PCI_CAP_ID_PM);
2827 2827
2828 /* Enable/Disable dynamic clocks: TODO add sysfs access */ 2828 /* Enable/Disable dynamic clocks: TODO add sysfs access */
2829 rinfo->dynclk = dynclk; 2829 if (rinfo->family == CHIP_FAMILY_RS480)
2830 if (dynclk == 1) { 2830 rinfo->dynclk = -1;
2831 else
2832 rinfo->dynclk = dynclk;
2833
2834 if (rinfo->dynclk == 1) {
2831 radeon_pm_enable_dynamic_mode(rinfo); 2835 radeon_pm_enable_dynamic_mode(rinfo);
2832 printk("radeonfb: Dynamic Clock Power Management enabled\n"); 2836 printk("radeonfb: Dynamic Clock Power Management enabled\n");
2833 } else if (dynclk == 0) { 2837 } else if (rinfo->dynclk == 0) {
2834 radeon_pm_disable_dynamic_mode(rinfo); 2838 radeon_pm_disable_dynamic_mode(rinfo);
2835 printk("radeonfb: Dynamic Clock Power Management disabled\n"); 2839 printk("radeonfb: Dynamic Clock Power Management disabled\n");
2836 } 2840 }
diff --git a/drivers/video/aty/radeonfb.h b/drivers/video/aty/radeonfb.h
index 319000360285..7ebffcdfd1e3 100644
--- a/drivers/video/aty/radeonfb.h
+++ b/drivers/video/aty/radeonfb.h
@@ -48,6 +48,7 @@ enum radeon_family {
48 CHIP_FAMILY_RV350, 48 CHIP_FAMILY_RV350,
49 CHIP_FAMILY_RV380, /* RV370/RV380/M22/M24 */ 49 CHIP_FAMILY_RV380, /* RV370/RV380/M22/M24 */
50 CHIP_FAMILY_R420, /* R420/R423/M18 */ 50 CHIP_FAMILY_R420, /* R420/R423/M18 */
51 CHIP_FAMILY_RS480,
51 CHIP_FAMILY_LAST, 52 CHIP_FAMILY_LAST,
52}; 53};
53 54
@@ -64,7 +65,8 @@ enum radeon_family {
64 ((rinfo)->family == CHIP_FAMILY_RV350) || \ 65 ((rinfo)->family == CHIP_FAMILY_RV350) || \
65 ((rinfo)->family == CHIP_FAMILY_R350) || \ 66 ((rinfo)->family == CHIP_FAMILY_R350) || \
66 ((rinfo)->family == CHIP_FAMILY_RV380) || \ 67 ((rinfo)->family == CHIP_FAMILY_RV380) || \
67 ((rinfo)->family == CHIP_FAMILY_R420)) 68 ((rinfo)->family == CHIP_FAMILY_R420) || \
69 ((rinfo)->family == CHIP_FAMILY_RS480) )
68 70
69/* 71/*
70 * Chip flags 72 * Chip flags