summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-08-10 11:14:07 +0000
committerDave Airlie <airlied@linux.ie>2004-08-10 11:14:07 +0000
commit9277f9eef388ffef26000ab455d30260bdf41c93 (patch)
tree1c5eadbba695295ac1b77a0b6d001e8ceb1d2ddb
parent42e91874608f28246367207815eb7334574d7aa7 (diff)
Patch from Jon Smirl to add attribute field to the pciids, and use this for
certain radeon combinations - intel drivers can probably use this for dual head capable devices etc..
-rw-r--r--linux-core/drm_drv.c28
-rw-r--r--linux-core/drm_stub.c5
-rw-r--r--linux/drm_drv.h28
-rw-r--r--linux/drm_stub.h5
-rw-r--r--scripts/create_bsd_pci_lists.sh4
-rw-r--r--scripts/create_linux_pci_lists.sh4
-rw-r--r--shared-core/drm_pciids.txt338
-rw-r--r--shared-core/radeon_drv.h11
-rw-r--r--shared/drm_pciids.txt338
-rw-r--r--shared/radeon_drv.h11
10 files changed, 390 insertions, 382 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index a75566e8..6dcb6271 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -581,13 +581,6 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
sema_init( &dev->struct_sem, 1 );
sema_init( &dev->ctxlist_sem, 1 );
- if ((dev->minor = DRM(stub_register)(DRIVER_NAME, &DRM(fops),dev)) < 0)
- {
- retcode = -EPERM;
- goto error_out;
- }
-
- dev->device = MKDEV(DRM_MAJOR, dev->minor );
dev->name = DRIVER_NAME;
dev->pdev = pdev;
@@ -631,6 +624,14 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto error_out_unreg;
}
#endif
+ if ((dev->minor = DRM(stub_register)(DRIVER_NAME, &DRM(fops),dev)) < 0)
+ {
+ retcode = -EPERM;
+ goto error_out;
+ }
+
+ dev->device = MKDEV(DRM_MAJOR, dev->minor );
+
DRM(numdevs)++; /* no errors, mark it reserved */
DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
@@ -646,13 +647,6 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if ((retcode = DRIVER_POSTINIT(dev)))
goto error_out_unreg;
-
- /*
- * don't move this earlier, for upcoming hotplugging support
- */
- class_simple_device_add(DRM(stub_info).drm_class,
- MKDEV(DRM_MAJOR, dev->minor), &pdev->dev, "card%d", dev->minor);
-
return 0;
error_out_unreg:
@@ -752,11 +746,9 @@ static void __exit drm_cleanup( drm_device_t *dev )
} else {
DRM_DEBUG( "minor %d unregistered\n", dev->minor);
}
-
#if __HAVE_CTX_BITMAP
DRM(ctxbitmap_cleanup)( dev );
#endif
-
#if __REALLY_HAVE_AGP && __REALLY_HAVE_MTRR
if ( dev->agp && dev->agp->agp_mtrr >= 0) {
int retval;
@@ -766,8 +758,6 @@ static void __exit drm_cleanup( drm_device_t *dev )
DRM_DEBUG( "mtrr_del=%d\n", retval );
}
#endif
-
-
#if __REALLY_HAVE_AGP
if ( dev->agp ) {
DRM(agp_uninit)();
@@ -775,8 +765,6 @@ static void __exit drm_cleanup( drm_device_t *dev )
dev->agp = NULL;
}
#endif
-
- class_simple_device_remove(MKDEV(DRM_MAJOR, dev->minor));
}
static void __exit drm_exit (void)
diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c
index 9dbf5617..9a4430d3 100644
--- a/linux-core/drm_stub.c
+++ b/linux-core/drm_stub.c
@@ -179,6 +179,7 @@ static int DRM(stub_getminor)(const char *name, struct file_operations *fops,
&DRM(stub_list)[i].dev_root);
(*DRM(stub_info).info_count)++;
DRM_DEBUG("info count increased %d\n", *DRM(stub_info).info_count);
+
return i;
}
}
@@ -303,7 +304,10 @@ int DRM(stub_register)(const char *name, struct file_operations *fops,
DRM_DEBUG("info_register failed, deregistered everything\n");
}
DRM_DEBUG("info_register failed\n");
+ return ret2;
}
+ class_simple_device_add(DRM(stub_info).drm_class,
+ MKDEV(DRM_MAJOR, ret2), &dev->pdev->dev, "card%d", ret2);
return ret2;
}
return -1;
@@ -319,6 +323,7 @@ int DRM(stub_register)(const char *name, struct file_operations *fops,
int DRM(stub_unregister)(int minor)
{
DRM_DEBUG("%d\n", minor);
+ class_simple_device_remove(MKDEV(DRM_MAJOR, minor));
if (DRM(stub_info).info_unregister)
return DRM(stub_info).info_unregister(minor);
return -1;
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index a75566e8..6dcb6271 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -581,13 +581,6 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
sema_init( &dev->struct_sem, 1 );
sema_init( &dev->ctxlist_sem, 1 );
- if ((dev->minor = DRM(stub_register)(DRIVER_NAME, &DRM(fops),dev)) < 0)
- {
- retcode = -EPERM;
- goto error_out;
- }
-
- dev->device = MKDEV(DRM_MAJOR, dev->minor );
dev->name = DRIVER_NAME;
dev->pdev = pdev;
@@ -631,6 +624,14 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto error_out_unreg;
}
#endif
+ if ((dev->minor = DRM(stub_register)(DRIVER_NAME, &DRM(fops),dev)) < 0)
+ {
+ retcode = -EPERM;
+ goto error_out;
+ }
+
+ dev->device = MKDEV(DRM_MAJOR, dev->minor );
+
DRM(numdevs)++; /* no errors, mark it reserved */
DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
@@ -646,13 +647,6 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if ((retcode = DRIVER_POSTINIT(dev)))
goto error_out_unreg;
-
- /*
- * don't move this earlier, for upcoming hotplugging support
- */
- class_simple_device_add(DRM(stub_info).drm_class,
- MKDEV(DRM_MAJOR, dev->minor), &pdev->dev, "card%d", dev->minor);
-
return 0;
error_out_unreg:
@@ -752,11 +746,9 @@ static void __exit drm_cleanup( drm_device_t *dev )
} else {
DRM_DEBUG( "minor %d unregistered\n", dev->minor);
}
-
#if __HAVE_CTX_BITMAP
DRM(ctxbitmap_cleanup)( dev );
#endif
-
#if __REALLY_HAVE_AGP && __REALLY_HAVE_MTRR
if ( dev->agp && dev->agp->agp_mtrr >= 0) {
int retval;
@@ -766,8 +758,6 @@ static void __exit drm_cleanup( drm_device_t *dev )
DRM_DEBUG( "mtrr_del=%d\n", retval );
}
#endif
-
-
#if __REALLY_HAVE_AGP
if ( dev->agp ) {
DRM(agp_uninit)();
@@ -775,8 +765,6 @@ static void __exit drm_cleanup( drm_device_t *dev )
dev->agp = NULL;
}
#endif
-
- class_simple_device_remove(MKDEV(DRM_MAJOR, dev->minor));
}
static void __exit drm_exit (void)
diff --git a/linux/drm_stub.h b/linux/drm_stub.h
index 9dbf5617..9a4430d3 100644
--- a/linux/drm_stub.h
+++ b/linux/drm_stub.h
@@ -179,6 +179,7 @@ static int DRM(stub_getminor)(const char *name, struct file_operations *fops,
&DRM(stub_list)[i].dev_root);
(*DRM(stub_info).info_count)++;
DRM_DEBUG("info count increased %d\n", *DRM(stub_info).info_count);
+
return i;
}
}
@@ -303,7 +304,10 @@ int DRM(stub_register)(const char *name, struct file_operations *fops,
DRM_DEBUG("info_register failed, deregistered everything\n");
}
DRM_DEBUG("info_register failed\n");
+ return ret2;
}
+ class_simple_device_add(DRM(stub_info).drm_class,
+ MKDEV(DRM_MAJOR, ret2), &dev->pdev->dev, "card%d", ret2);
return ret2;
}
return -1;
@@ -319,6 +323,7 @@ int DRM(stub_register)(const char *name, struct file_operations *fops,
int DRM(stub_unregister)(int minor)
{
DRM_DEBUG("%d\n", minor);
+ class_simple_device_remove(MKDEV(DRM_MAJOR, minor));
if (DRM(stub_info).info_unregister)
return DRM(stub_info).info_unregister(minor);
return -1;
diff --git a/scripts/create_bsd_pci_lists.sh b/scripts/create_bsd_pci_lists.sh
index 6666760b..64a1fcb4 100644
--- a/scripts/create_bsd_pci_lists.sh
+++ b/scripts/create_bsd_pci_lists.sh
@@ -14,7 +14,7 @@ cat > $OUTFILE <<EOF
*/
EOF
-while read pcivend pcidev pciname
+while read pcivend pcidev attribs pciname
do
if [ "x$pcivend" = "x" ]; then
if [ "$finished" = "0" ]; then
@@ -27,7 +27,7 @@ do
cardtype=`echo "$pcivend" | cut -s -f2 -d'[' | cut -s -f1 -d']'`
if [ "x$cardtype" = "x" ];
then
- echo " {$pcivend, $pcidev, 0, $pciname}, \\" >> $OUTFILE
+ echo " {$pcivend, $pcidev, $attribs, $pciname}, \\" >> $OUTFILE
else
echo "#define "$cardtype"_PCI_IDS \\" >> $OUTFILE
finished=0
diff --git a/scripts/create_linux_pci_lists.sh b/scripts/create_linux_pci_lists.sh
index bcba2b83..bb0e6878 100644
--- a/scripts/create_linux_pci_lists.sh
+++ b/scripts/create_linux_pci_lists.sh
@@ -14,7 +14,7 @@ cat > $OUTFILE <<EOF
*/
EOF
-while read pcivend pcidev pciname
+while read pcivend pcidev attribs pciname
do
if [ "x$pcivend" = "x" ]; then
if [ "$finished" = "0" ]; then
@@ -27,7 +27,7 @@ do
cardtype=`echo "$pcivend" | cut -s -f2 -d'[' | cut -s -f1 -d']'`
if [ "x$cardtype" = "x" ];
then
- echo " {$pcivend, $pcidev, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \\" >> $OUTFILE
+ echo " {$pcivend, $pcidev, PCI_ANY_ID, PCI_ANY_ID, 0, 0, $attribs}, \\" >> $OUTFILE
else
echo "#define "$cardtype"_PCI_IDS \\" >> $OUTFILE
finished=0
diff --git a/shared-core/drm_pciids.txt b/shared-core/drm_pciids.txt
index 6eb05693..e699a81c 100644
--- a/shared-core/drm_pciids.txt
+++ b/shared-core/drm_pciids.txt
@@ -1,195 +1,195 @@
[radeon]
-0x1002 0x4136 "ATI Radeon RS100 IGP 320M"
-0x1002 0x4137 "ATI Radeon RS200 IGP"
-0x1002 0x4237 "ATI Radeon RS250 IGP"
-0x1002 0x4242 "ATI Radeon BB R200 AIW 8500DV"
-0x1002 0x4242 "ATI Radeon BC R200"
-0x1002 0x4336 "ATI Radeon RS100 Mobility U1"
-0x1002 0x4337 "ATI Radeon RS200 Mobility IGP 340M"
-0x1002 0x4437 "ATI Radeon RS250 Mobility IGP"
-0x1002 0x4964 "ATI Radeon Id R250 9000"
-0x1002 0x4965 "ATI Radeon Ie R250 9000"
-0x1002 0x4966 "ATI Radeon If R250 9000"
-0x1002 0x4967 "ATI Radeon Ig R250 9000"
-0x1002 0x4C57 "ATI Radeon LW Mobility 7500 M7"
-0x1002 0x4C58 "ATI Radeon LX RV200 Mobility FireGL 7800 M7"
-0x1002 0x4C59 "ATI Radeon LY Mobility M6"
-0x1002 0x4C5A "ATI Radeon LZ Mobility M6"
-0x1002 0x4C64 "ATI Radeon Ld R250 Mobility 9000 M9"
-0x1002 0x4C65 "ATI Radeon Le R250 Mobility 9000 M9"
-0x1002 0x4C66 "ATI Radeon Lf R250 Mobility 9000 M9"
-0x1002 0x4C67 "ATI Radeon Lg R250 Mobility 9000 M9"
-0x1002 0x5144 "ATI Radeon QD R100"
-0x1002 0x5145 "ATI Radeon QE R100"
-0x1002 0x5146 "ATI Radeon QF R100"
-0x1002 0x5147 "ATI Radeon QG R100"
-0x1002 0x5148 "ATI Radeon QH R200 8500"
-0x1002 0x5149 "ATI Radeon QI R200"
-0x1002 0x514A "ATI Radeon QJ R200"
-0x1002 0x514B "ATI Radeon QK R200"
-0x1002 0x514C "ATI Radeon QL R200 8500 LE"
-0x1002 0x514D "ATI Radeon QM R200 9100"
-0x1002 0x514E "ATI Radeon QN R200 8500 LE"
-0x1002 0x514F "ATI Radeon QO R200 8500 LE"
-0x1002 0x5157 "ATI Radeon QW RV200 7500"
-0x1002 0x5158 "ATI Radeon QX RV200 7500"
-0x1002 0x5159 "ATI Radeon QY RV100 7000/VE"
-0x1002 0x515A "ATI Radeon QZ RV100 7000/VE"
-0x1002 0x5168 "ATI Radeon Qh R200"
-0x1002 0x5169 "ATI Radeon Qi R200"
-0x1002 0x516A "ATI Radeon Qj R200"
-0x1002 0x516B "ATI Radeon Qk R200"
-0x1002 0x516C "ATI Radeon Ql R200"
-0x1002 0x5834 "ATI Radeon RS300 IGP"
-0x1002 0x5835 "ATI Radeon RS300 Mobility IGP"
-0x1002 0x5836 "ATI Radeon RS300 IGP"
-0x1002 0x5837 "ATI Radeon RS300 IGP"
-0x1002 0x5960 "ATI Radeon RV280 9200"
-0x1002 0x5961 "ATI Radeon RV280 9200 SE"
-0x1002 0x5962 "ATI Radeon RV280 9200"
-0x1002 0x5963 "ATI Radeon RV280 9200"
-0x1002 0x5964 "ATI Radeon RV280 9200 SE"
-0x1002 0x5968 "ATI Radeon RV280 9200"
-0x1002 0x5969 "ATI Radeon RV280 9200"
-0x1002 0x596A "ATI Radeon RV280 9200"
-0x1002 0x596B "ATI Radeon RV280 9200"
-0x1002 0x5c61 "ATI Radeon RV280 Mobility"
-0x1002 0x5c62 "ATI Radeon RV280"
-0x1002 0x5c63 "ATI Radeon RV280 Mobility"
-0x1002 0x5c64 "ATI Radeon RV280"
+0x1002 0x4136 CHIP_IS_IGP "ATI Radeon RS100 IGP 320M"
+0x1002 0x4137 CHIP_IS_IGP "ATI Radeon RS200 IGP"
+0x1002 0x4237 CHIP_IS_IGP "ATI Radeon RS250 IGP"
+0x1002 0x4242 0 "ATI Radeon BB R200 AIW 8500DV"
+0x1002 0x4242 0 "ATI Radeon BC R200"
+0x1002 0x4336 CHIP_IS_IGP|CHIP_IS_MOBILITY "ATI Radeon RS100 Mobility U1"
+0x1002 0x4337 CHIP_IS_IGP|CHIP_IS_MOBILITY "ATI Radeon RS200 Mobility IGP 340M"
+0x1002 0x4437 CHIP_IS_IGP|CHIP_IS_MOBILITY "ATI Radeon RS250 Mobility IGP"
+0x1002 0x4964 0 "ATI Radeon Id R250 9000"
+0x1002 0x4965 0 "ATI Radeon Ie R250 9000"
+0x1002 0x4966 0 "ATI Radeon If R250 9000"
+0x1002 0x4967 0 "ATI Radeon Ig R250 9000"
+0x1002 0x4C57 CHIP_IS_MOBILITY "ATI Radeon LW Mobility 7500 M7"
+0x1002 0x4C58 CHIP_IS_MOBILITY "ATI Radeon LX RV200 Mobility FireGL 7800 M7"
+0x1002 0x4C59 CHIP_IS_MOBILITY "ATI Radeon LY Mobility M6"
+0x1002 0x4C5A CHIP_IS_MOBILITY "ATI Radeon LZ Mobility M6"
+0x1002 0x4C64 CHIP_IS_MOBILITY "ATI Radeon Ld R250 Mobility 9000 M9"
+0x1002 0x4C65 CHIP_IS_MOBILITY "ATI Radeon Le R250 Mobility 9000 M9"
+0x1002 0x4C66 CHIP_IS_MOBILITY "ATI Radeon Lf R250 Mobility 9000 M9"
+0x1002 0x4C67 CHIP_IS_MOBILITY "ATI Radeon Lg R250 Mobility 9000 M9"
+0x1002 0x5144 CHIP_SINGLE_CRTC "ATI Radeon QD R100"
+0x1002 0x5145 CHIP_SINGLE_CRTC "ATI Radeon QE R100"
+0x1002 0x5146 CHIP_SINGLE_CRTC "ATI Radeon QF R100"
+0x1002 0x5147 CHIP_SINGLE_CRTC "ATI Radeon QG R100"
+0x1002 0x5148 0 "ATI Radeon QH R200 8500"
+0x1002 0x5149 0 "ATI Radeon QI R200"
+0x1002 0x514A 0 "ATI Radeon QJ R200"
+0x1002 0x514B 0 "ATI Radeon QK R200"
+0x1002 0x514C 0 "ATI Radeon QL R200 8500 LE"
+0x1002 0x514D 0 "ATI Radeon QM R200 9100"
+0x1002 0x514E 0 "ATI Radeon QN R200 8500 LE"
+0x1002 0x514F 0 "ATI Radeon QO R200 8500 LE"
+0x1002 0x5157 0 "ATI Radeon QW RV200 7500"
+0x1002 0x5158 0 "ATI Radeon QX RV200 7500"
+0x1002 0x5159 0 "ATI Radeon QY RV100 7000/VE"
+0x1002 0x515A 0 "ATI Radeon QZ RV100 7000/VE"
+0x1002 0x5168 0 "ATI Radeon Qh R200"
+0x1002 0x5169 0 "ATI Radeon Qi R200"
+0x1002 0x516A 0 "ATI Radeon Qj R200"
+0x1002 0x516B 0 "ATI Radeon Qk R200"
+0x1002 0x516C 0 "ATI Radeon Ql R200"
+0x1002 0x5834 CHIP_IS_IGP "ATI Radeon RS300 IGP"
+0x1002 0x5835 CHIP_IS_IGP|CHIP_IS_MOBILITY "ATI Radeon RS300 Mobility IGP"
+0x1002 0x5836 0 "ATI Radeon RS300 IGP" CHIP_IS_IGP
+0x1002 0x5837 0 "ATI Radeon RS300 IGP" CHIP_IS_IGP
+0x1002 0x5960 0 "ATI Radeon RV280 9200"
+0x1002 0x5961 0 "ATI Radeon RV280 9200 SE"
+0x1002 0x5962 0 "ATI Radeon RV280 9200"
+0x1002 0x5963 0 "ATI Radeon RV280 9200"
+0x1002 0x5964 0 "ATI Radeon RV280 9200 SE"
+0x1002 0x5968 0 "ATI Radeon RV280 9200"
+0x1002 0x5969 0 "ATI Radeon RV280 9200"
+0x1002 0x596A 0 "ATI Radeon RV280 9200"
+0x1002 0x596B 0 "ATI Radeon RV280 9200"
+0x1002 0x5c61 CHIP_IS_MOBILITY "ATI Radeon RV280 Mobility"
+0x1002 0x5c62 0 "ATI Radeon RV280"
+0x1002 0x5c63 CHIP_IS_MOBILITY "ATI Radeon RV280 Mobility"
+0x1002 0x5c64 0 "ATI Radeon RV280"
[r128]
-0x1002 0x4c45 "ATI Rage 128 Mobility LE (PCI)"
-0x1002 0x4c46 "ATI Rage 128 Mobility LF (AGP)"
-0x1002 0x4d46 "ATI Rage 128 Mobility MF (AGP)"
-0x1002 0x4d4c "ATI Rage 128 Mobility ML (AGP)"
-0x1002 0x5041 "ATI Rage 128 Pro PA (PCI)"
-0x1002 0x5042 "ATI Rage 128 Pro PB (AGP)"
-0x1002 0x5043 "ATI Rage 128 Pro PC (AGP)"
-0x1002 0x5044 "ATI Rage 128 Pro PD (PCI)"
-0x1002 0x5045 "ATI Rage 128 Pro PE (AGP)"
-0x1002 0x5046 "ATI Rage 128 Pro PF (AGP)"
-0x1002 0x5047 "ATI Rage 128 Pro PG (PCI)"
-0x1002 0x5048 "ATI Rage 128 Pro PH (AGP)"
-0x1002 0x5049 "ATI Rage 128 Pro PI (AGP)"
-0x1002 0x504A "ATI Rage 128 Pro PJ (PCI)"
-0x1002 0x504B "ATI Rage 128 Pro PK (AGP)"
-0x1002 0x504C "ATI Rage 128 Pro PL (AGP)"
-0x1002 0x504D "ATI Rage 128 Pro PM (PCI)"
-0x1002 0x504E "ATI Rage 128 Pro PN (AGP)"
-0x1002 0x504F "ATI Rage 128 Pro PO (AGP)"
-0x1002 0x5050 "ATI Rage 128 Pro PP (PCI)"
-0x1002 0x5051 "ATI Rage 128 Pro PQ (AGP)"
-0x1002 0x5052 "ATI Rage 128 Pro PR (PCI)"
-0x1002 0x5053 "ATI Rage 128 Pro PS (PCI)"
-0x1002 0x5054 "ATI Rage 128 Pro PT (AGP)"
-0x1002 0x5055 "ATI Rage 128 Pro PU (AGP)"
-0x1002 0x5056 "ATI Rage 128 Pro PV (PCI)"
-0x1002 0x5057 "ATI Rage 128 Pro PW (AGP)"
-0x1002 0x5058 "ATI Rage 128 Pro PX (AGP)"
-0x1002 0x5245 "ATI Rage 128 RE (PCI)"
-0x1002 0x5246 "ATI Rage 128 RF (AGP)"
-0x1002 0x5247 "ATI Rage 128 RG (AGP)"
-0x1002 0x524b "ATI Rage 128 RK (PCI)"
-0x1002 0x524c "ATI Rage 128 RL (AGP)"
-0x1002 0x534d "ATI Rage 128 SM (AGP)"
-0x1002 0x5446 "ATI Rage 128 Pro Ultra TF (AGP)"
-0x1002 0x544C "ATI Rage 128 Pro Ultra TL (AGP)"
-0x1002 0x5452 "ATI Rage 128 Pro Ultra TR (AGP)"
+0x1002 0x4c45 0 "ATI Rage 128 Mobility LE (PCI)"
+0x1002 0x4c46 0 "ATI Rage 128 Mobility LF (AGP)"
+0x1002 0x4d46 0 "ATI Rage 128 Mobility MF (AGP)"
+0x1002 0x4d4c 0 "ATI Rage 128 Mobility ML (AGP)"
+0x1002 0x5041 0 "ATI Rage 128 Pro PA (PCI)"
+0x1002 0x5042 0 "ATI Rage 128 Pro PB (AGP)"
+0x1002 0x5043 0 "ATI Rage 128 Pro PC (AGP)"
+0x1002 0x5044 0 "ATI Rage 128 Pro PD (PCI)"
+0x1002 0x5045 0 "ATI Rage 128 Pro PE (AGP)"
+0x1002 0x5046 0 "ATI Rage 128 Pro PF (AGP)"
+0x1002 0x5047 0 "ATI Rage 128 Pro PG (PCI)"
+0x1002 0x5048 0 "ATI Rage 128 Pro PH (AGP)"
+0x1002 0x5049 0 "ATI Rage 128 Pro PI (AGP)"
+0x1002 0x504A 0 "ATI Rage 128 Pro PJ (PCI)"
+0x1002 0x504B 0 "ATI Rage 128 Pro PK (AGP)"
+0x1002 0x504C 0 "ATI Rage 128 Pro PL (AGP)"
+0x1002 0x504D 0 "ATI Rage 128 Pro PM (PCI)"
+0x1002 0x504E 0 "ATI Rage 128 Pro PN (AGP)"
+0x1002 0x504F 0 "ATI Rage 128 Pro PO (AGP)"
+0x1002 0x5050 0 "ATI Rage 128 Pro PP (PCI)"
+0x1002 0x5051 0 "ATI Rage 128 Pro PQ (AGP)"
+0x1002 0x5052 0 "ATI Rage 128 Pro PR (PCI)"
+0x1002 0x5053 0 "ATI Rage 128 Pro PS (PCI)"
+0x1002 0x5054 0 "ATI Rage 128 Pro PT (AGP)"
+0x1002 0x5055 0 "ATI Rage 128 Pro PU (AGP)"
+0x1002 0x5056 0 "ATI Rage 128 Pro PV (PCI)"
+0x1002 0x5057 0 "ATI Rage 128 Pro PW (AGP)"
+0x1002 0x5058 0 "ATI Rage 128 Pro PX (AGP)"
+0x1002 0x5245 0 "ATI Rage 128 RE (PCI)"
+0x1002 0x5246 0 "ATI Rage 128 RF (AGP)"
+0x1002 0x5247 0 "ATI Rage 128 RG (AGP)"
+0x1002 0x524b 0 "ATI Rage 128 RK (PCI)"
+0x1002 0x524c 0 "ATI Rage 128 RL (AGP)"
+0x1002 0x534d 0 "ATI Rage 128 SM (AGP)"
+0x1002 0x5446 0 "ATI Rage 128 Pro Ultra TF (AGP)"
+0x1002 0x544C 0 "ATI Rage 128 Pro Ultra TL (AGP)"
+0x1002 0x5452 0 "ATI Rage 128 Pro Ultra TR (AGP)"
[mga]
-0x102b 0x0521 "Matrox G200 (AGP)"
-0x102b 0x0525 "Matrox G400/G450 (AGP)"
-0x102b 0x2527 "Matrox G550 (AGP)"
+0x102b 0x0521 0 "Matrox G200 (AGP)"
+0x102b 0x0525 0 "Matrox G400/G450 (AGP)"
+0x102b 0x2527 0 "Matrox G550 (AGP)"
[mach64]
-0x1002 0x4749 "3D Rage Pro"
-0x1002 0x4750 "3D Rage Pro 215GP"
-0x1002 0x4751 "3D Rage Pro 215GQ"
-0x1002 0x4742 "3D Rage Pro AGP 1X/2X"
-0x1002 0x4744 "3D Rage Pro AGP 1X"
-0x1002 0x4c49 "3D Rage LT Pro"
-0x1002 0x4c50 "3D Rage LT Pro"
-0x1002 0x4c51 "3D Rage LT Pro"
-0x1002 0x4c42 "3D Rage LT Pro AGP-133"
-0x1002 0x4c44 "3D Rage LT Pro AGP-66"
-0x1002 0x474c "Rage XC"
-0x1002 0x474f "Rage XL"
-0x1002 0x4752 "Rage XL"
-0x1002 0x4753 "Rage XC"
-0x1002 0x474d "Rage XL AGP 2X"
-0x1002 0x474e "Rage XC AGP"
-0x1002 0x4c52 "Rage Mobility P/M"
-0x1002 0x4c53 "Rage Mobility L"
-0x1002 0x4c4d "Rage Mobility P/M AGP 2X"
-0x1002 0x4c4e "Rage Mobility L AGP 2X"
+0x1002 0x4749 0 "3D Rage Pro"
+0x1002 0x4750 0 "3D Rage Pro 215GP"
+0x1002 0x4751 0 "3D Rage Pro 215GQ"
+0x1002 0x4742 0 "3D Rage Pro AGP 1X/2X"
+0x1002 0x4744 0 "3D Rage Pro AGP 1X"
+0x1002 0x4c49 0 "3D Rage LT Pro"
+0x1002 0x4c50 0 "3D Rage LT Pro"
+0x1002 0x4c51 0 "3D Rage LT Pro"
+0x1002 0x4c42 0 "3D Rage LT Pro AGP-133"
+0x1002 0x4c44 0 "3D Rage LT Pro AGP-66"
+0x1002 0x474c 0 "Rage XC"
+0x1002 0x474f 0 "Rage XL"
+0x1002 0x4752 0 "Rage XL"
+0x1002 0x4753 0 "Rage XC"
+0x1002 0x474d 0 "Rage XL AGP 2X"
+0x1002 0x474e 0 "Rage XC AGP"
+0x1002 0x4c52 0 "Rage Mobility P/M"
+0x1002 0x4c53 0 "Rage Mobility L"
+0x1002 0x4c4d 0 "Rage Mobility P/M AGP 2X"
+0x1002 0x4c4e 0 "Rage Mobility L AGP 2X"
[sisdrv]
-0x1039 0x0300 "SiS 300/305"
-0x1039 0x5300 "SiS 540"
-0x1039 0x6300 "SiS 630"
-0x1039 0x7300 "SiS 730"
+0x1039 0x0300 0 "SiS 300/305"
+0x1039 0x5300 0 "SiS 540"
+0x1039 0x6300 0 "SiS 630"
+0x1039 0x7300 0 "SiS 730"
[tdfx]
-0x121a 0x0003 "3dfx Voodoo Banshee"
-0x121a 0x0004 "3dfx Voodoo3 2000"
-0x121a 0x0005 "3dfx Voodoo3 3000"
-0x121a 0x0007 "3dfx Voodoo4 4500"
-0x121a 0x0009 "3dfx Voodoo5 5500"
-0x121a 0x000b "3dfx Voodoo4 4200"
+0x121a 0x0003 0 "3dfx Voodoo Banshee"
+0x121a 0x0004 0 "3dfx Voodoo3 2000"
+0x121a 0x0005 0 "3dfx Voodoo3 3000"
+0x121a 0x0007 0 "3dfx Voodoo4 4500"
+0x121a 0x0009 0 "3dfx Voodoo5 5500"
+0x121a 0x000b 0 "3dfx Voodoo4 4200"
[viadrv]
-0x1106 0x3022 "VIA CLE266 3022"
-0x1106 0x3118 "VIA CN400"
-0x1106 0x3122 "VIA CLE266"
-0x1106 0x7205 "VIA KM400"
-0x1106 0x7204 "VIA K8M800"
+0x1106 0x3022 0 "VIA CLE266 3022"
+0x1106 0x3118 0 "VIA CN400"
+0x1106 0x3122 0 "VIA CLE266"
+0x1106 0x7205 0 "VIA KM400"
+0x1106 0x7204 0 "VIA K8M800"
[i810]
-0x8086 0x7121 "Intel i810 GMCH"
-0x8086 0x7123 "Intel i810-DC100 GMCH"
-0x8086 0x7125 "Intel i810E GMCH"
-0x8086 0x1132 "Intel i815 GMCH"
+0x8086 0x7121 0 "Intel i810 GMCH"
+0x8086 0x7123 0 "Intel i810-DC100 GMCH"
+0x8086 0x7125 0 "Intel i810E GMCH"
+0x8086 0x1132 0 "Intel i815 GMCH"
[i830]
-0x8086 0x3577 "Intel i830M GMCH"
-0x8086 0x2562 "Intel i845G GMCH"
-0x8086 0x3582 "Intel i852GM/i855GM GMCH"
-0x8086 0x2572 "Intel i865G GMCH"
+0x8086 0x3577 0 "Intel i830M GMCH"
+0x8086 0x2562 0 "Intel i845G GMCH"
+0x8086 0x3582 0 "Intel i852GM/i855GM GMCH"
+0x8086 0x2572 0 "Intel i865G GMCH"
[gamma]
-0x3d3d 0x0008 "3DLabs GLINT Gamma G1"
+0x3d3d 0x0008 0 "3DLabs GLINT Gamma G1"
[savage]
-0x5333 0x8a22 "Savage4"
-0x5333 0x8a23 "Savage4"
-0x5333 0x8c10 "Savage/MX-MV"
-0x5333 0x8c11 "Savage/MX"
-0x5333 0x8c12 "Savage/IX-MV"
-0x5333 0x8c13 "Savage/IX"
-0x5333 0x8c20 "Savage 3D"
-0x5333 0x8c21 "Savage 3D/MV"
-0x5333 0x8c22 "SuperSavage MX/128"
-0x5333 0x8c24 "SuperSavage MX/64"
-0x5333 0x8c26 "SuperSavage MX/64C"
-0x5333 0x8c2a "SuperSavage IX/128 SDR"
-0x5333 0x8c2b "SuperSavage IX/128 DDR"
-0x5333 0x8c2c "SuperSavage IX/64 SDR"
-0x5333 0x8c2d "SuperSavage IX/64 DDR"
-0x5333 0x8c2e "SuperSavage IX/C SDR"
-0x5333 0x8c2f "SuperSavage IX/C DDR"
-0x5333 0x8a25 "ProSavage PM133"
-0x5333 0x8a26 "ProSavage KM133"
-0x5333 0x8d01 "ProSavage PN133"
-0x5333 0x8d02 "ProSavage KN133"
-0x5333 0x8d04 "ProSavage DDR"
+0x5333 0x8a22 0 "Savage4"
+0x5333 0x8a23 0 "Savage4"
+0x5333 0x8c10 0 "Savage/MX-MV"
+0x5333 0x8c11 0 "Savage/MX"
+0x5333 0x8c12 0 "Savage/IX-MV"
+0x5333 0x8c13 0 "Savage/IX"
+0x5333 0x8c20 0 "Savage 3D"
+0x5333 0x8c21 0 "Savage 3D/MV"
+0x5333 0x8c22 0 "SuperSavage MX/128"
+0x5333 0x8c24 0 "SuperSavage MX/64"
+0x5333 0x8c26 0 "SuperSavage MX/64C"
+0x5333 0x8c2a 0 "SuperSavage IX/128 SDR"
+0x5333 0x8c2b 0 "SuperSavage IX/128 DDR"
+0x5333 0x8c2c 0 "SuperSavage IX/64 SDR"
+0x5333 0x8c2d 0 "SuperSavage IX/64 DDR"
+0x5333 0x8c2e 0 "SuperSavage IX/C SDR"
+0x5333 0x8c2f 0 "SuperSavage IX/C DDR"
+0x5333 0x8a25 0 "ProSavage PM133"
+0x5333 0x8a26 0 "ProSavage KM133"
+0x5333 0x8d01 0 "ProSavage PN133"
+0x5333 0x8d02 0 "ProSavage KN133"
+0x5333 0x8d04 0 "ProSavage DDR"
[ffb]
[i915]
-0x8086 0x3577 "Intel i830M GMCH"
-0x8086 0x2562 "Intel i845G GMCH"
-0x8086 0x3582 "Intel i852GM/i855GM GMCH"
-0x8086 0x2572 "Intel i865G GMCH"
-0x8086 0x2582 "Intel i915G"
+0x8086 0x3577 0 "Intel i830M GMCH"
+0x8086 0x2562 0 "Intel i845G GMCH"
+0x8086 0x3582 0 "Intel i852GM/i855GM GMCH"
+0x8086 0x2572 0 "Intel i865G GMCH"
+0x8086 0x2582 0 "Intel i915G"
diff --git a/shared-core/radeon_drv.h b/shared-core/radeon_drv.h
index e24e0ec0..81b9a98e 100644
--- a/shared-core/radeon_drv.h
+++ b/shared-core/radeon_drv.h
@@ -31,6 +31,17 @@
#ifndef __RADEON_DRV_H__
#define __RADEON_DRV_H__
+/*
+ * Chip flags
+ */
+enum radeon_chip_flags {
+ CHIP_FAMILY_MASK = 0x0000ffffUL,
+ CHIP_FLAGS_MASK = 0xffff0000UL,
+ CHIP_IS_MOBILITY = 0x00010000UL,
+ CHIP_IS_IGP = 0x00020000UL,
+ CHIP_SINGLE_CRTC = 0x00040000UL,
+};
+
#define GET_RING_HEAD(dev_priv) DRM_READ32( (dev_priv)->ring_rptr, 0 )
#define SET_RING_HEAD(dev_priv,val) DRM_WRITE32( (dev_priv)->ring_rptr, 0, (val) )
diff --git a/shared/drm_pciids.txt b/shared/drm_pciids.txt
index 6eb05693..e699a81c 100644
--- a/shared/drm_pciids.txt
+++ b/shared/drm_pciids.txt
@@ -1,195 +1,195 @@
[radeon]
-0x1002 0x4136 "ATI Radeon RS100 IGP 320M"
-0x1002 0x4137 "ATI Radeon RS200 IGP"
-0x1002 0x4237 "ATI Radeon RS250 IGP"
-0x1002 0x4242 "ATI Radeon BB R200 AIW 8500DV"
-0x1002 0x4242 "ATI Radeon BC R200"
-0x1002 0x4336 "ATI Radeon RS100 Mobility U1"
-0x1002 0x4337 "ATI Radeon RS200 Mobility IGP 340M"
-0x1002 0x4437 "ATI Radeon RS250 Mobility IGP"
-0x1002 0x4964 "ATI Radeon Id R250 9000"
-0x1002 0x4965 "ATI Radeon Ie R250 9000"
-0x1002 0x4966 "ATI Radeon If R250 9000"
-0x1002 0x4967 "ATI Radeon Ig R250 9000"
-0x1002 0x4C57 "ATI Radeon LW Mobility 7500 M7"
-0x1002 0x4C58 "ATI Radeon LX RV200 Mobility FireGL 7800 M7"
-0x1002 0x4C59 "ATI Radeon LY Mobility M6"
-0x1002 0x4C5A "ATI Radeon LZ Mobility M6"
-0x1002 0x4C64 "ATI Radeon Ld R250 Mobility 9000 M9"
-0x1002 0x4C65 "ATI Radeon Le R250 Mobility 9000 M9"
-0x1002 0x4C66 "ATI Radeon Lf R250 Mobility 9000 M9"
-0x1002 0x4C67 "ATI Radeon Lg R250 Mobility 9000 M9"
-0x1002 0x5144 "ATI Radeon QD R100"
-0x1002 0x5145 "ATI Radeon QE R100"
-0x1002 0x5146 "ATI Radeon QF R100"
-0x1002 0x5147 "ATI Radeon QG R100"
-0x1002 0x5148 "ATI Radeon QH R200 8500"
-0x1002 0x5149 "ATI Radeon QI R200"
-0x1002 0x514A "ATI Radeon QJ R200"
-0x1002 0x514B "ATI Radeon QK R200"
-0x1002 0x514C "ATI Radeon QL R200 8500 LE"
-0x1002 0x514D "ATI Radeon QM R200 9100"
-0x1002 0x514E "ATI Radeon QN R200 8500 LE"
-0x1002 0x514F "ATI Radeon QO R200 8500 LE"
-0x1002 0x5157 "ATI Radeon QW RV200 7500"
-0x1002 0x5158 "ATI Radeon QX RV200 7500"
-0x1002 0x5159 "ATI Radeon QY RV100 7000/VE"
-0x1002 0x515A "ATI Radeon QZ RV100 7000/VE"
-0x1002 0x5168 "ATI Radeon Qh R200"
-0x1002 0x5169 "ATI Radeon Qi R200"
-0x1002 0x516A "ATI Radeon Qj R200"
-0x1002 0x516B "ATI Radeon Qk R200"
-0x1002 0x516C "ATI Radeon Ql R200"
-0x1002 0x5834 "ATI Radeon RS300 IGP"
-0x1002 0x5835 "ATI Radeon RS300 Mobility IGP"
-0x1002 0x5836 "ATI Radeon RS300 IGP"
-0x1002 0x5837 "ATI Radeon RS300 IGP"
-0x1002 0x5960 "ATI Radeon RV280 9200"
-0x1002 0x5961 "ATI Radeon RV280 9200 SE"
-0x1002 0x5962 "ATI Radeon RV280 9200"
-0x1002 0x5963 "ATI Radeon RV280 9200"
-0x1002 0x5964 "ATI Radeon RV280 9200 SE"
-0x1002 0x5968 "ATI Radeon RV280 9200"
-0x1002 0x5969 "ATI Radeon RV280 9200"
-0x1002 0x596A "ATI Radeon RV280 9200"
-0x1002 0x596B "ATI Radeon RV280 9200"
-0x1002 0x5c61 "ATI Radeon RV280 Mobility"
-0x1002 0x5c62 "ATI Radeon RV280"
-0x1002 0x5c63 "ATI Radeon RV280 Mobility"
-0x1002 0x5c64 "ATI Radeon RV280"
+0x1002 0x4136 CHIP_IS_IGP "ATI Radeon RS100 IGP 320M"
+0x1002 0x4137 CHIP_IS_IGP "ATI Radeon RS200 IGP"
+0x1002 0x4237 CHIP_IS_IGP "ATI Radeon RS250 IGP"
+0x1002 0x4242 0 "ATI Radeon BB R200 AIW 8500DV"
+0x1002 0x4242 0 "ATI Radeon BC R200"
+0x1002 0x4336 CHIP_IS_IGP|CHIP_IS_MOBILITY "ATI Radeon RS100 Mobility U1"
+0x1002 0x4337 CHIP_IS_IGP|CHIP_IS_MOBILITY "ATI Radeon RS200 Mobility IGP 340M"
+0x1002 0x4437 CHIP_IS_IGP|CHIP_IS_MOBILITY "ATI Radeon RS250 Mobility IGP"
+0x1002 0x4964 0 "ATI Radeon Id R250 9000"
+0x1002 0x4965 0 "ATI Radeon Ie R250 9000"
+0x1002 0x4966 0 "ATI Radeon If R250 9000"
+0x1002 0x4967 0 "ATI Radeon Ig R250 9000"
+0x1002 0x4C57 CHIP_IS_MOBILITY "ATI Radeon LW Mobility 7500 M7"
+0x1002 0x4C58 CHIP_IS_MOBILITY "ATI Radeon LX RV200 Mobility FireGL 7800 M7"
+0x1002 0x4C59 CHIP_IS_MOBILITY "ATI Radeon LY Mobility M6"
+0x1002 0x4C5A CHIP_IS_MOBILITY "ATI Radeon LZ Mobility M6"
+0x1002 0x4C64 CHIP_IS_MOBILITY "ATI Radeon Ld R250 Mobility 9000 M9"
+0x1002 0x4C65 CHIP_IS_MOBILITY "ATI Radeon Le R250 Mobility 9000 M9"
+0x1002 0x4C66 CHIP_IS_MOBILITY "ATI Radeon Lf R250 Mobility 9000 M9"
+0x1002 0x4C67 CHIP_IS_MOBILITY "ATI Radeon Lg R250 Mobility 9000 M9"
+0x1002 0x5144 CHIP_SINGLE_CRTC "ATI Radeon QD R100"
+0x1002 0x5145 CHIP_SINGLE_CRTC "ATI Radeon QE R100"
+0x1002 0x5146 CHIP_SINGLE_CRTC "ATI Radeon QF R100"
+0x1002 0x5147 CHIP_SINGLE_CRTC "ATI Radeon QG R100"
+0x1002 0x5148 0 "ATI Radeon QH R200 8500"
+0x1002 0x5149 0 "ATI Radeon QI R200"
+0x1002 0x514A 0 "ATI Radeon QJ R200"
+0x1002 0x514B 0 "ATI Radeon QK R200"
+0x1002 0x514C 0 "ATI Radeon QL R200 8500 LE"
+0x1002 0x514D 0 "ATI Radeon QM R200 9100"
+0x1002 0x514E 0 "ATI Radeon QN R200 8500 LE"
+0x1002 0x514F 0 "ATI Radeon QO R200 8500 LE"
+0x1002 0x5157 0 "ATI Radeon QW RV200 7500"
+0x1002 0x5158 0 "ATI Radeon QX RV200 7500"
+0x1002 0x5159 0 "ATI Radeon QY RV100 7000/VE"
+0x1002 0x515A 0 "ATI Radeon QZ RV100 7000/VE"
+0x1002 0x5168 0 "ATI Radeon Qh R200"
+0x1002 0x5169 0 "ATI Radeon Qi R200"
+0x1002 0x516A 0 "ATI Radeon Qj R200"
+0x1002 0x516B 0 "ATI Radeon Qk R200"
+0x1002 0x516C 0 "ATI Radeon Ql R200"
+0x1002 0x5834 CHIP_IS_IGP "ATI Radeon RS300 IGP"
+0x1002 0x5835 CHIP_IS_IGP|CHIP_IS_MOBILITY "ATI Radeon RS300 Mobility IGP"
+0x1002 0x5836 0 "ATI Radeon RS300 IGP" CHIP_IS_IGP
+0x1002 0x5837 0 "ATI Radeon RS300 IGP" CHIP_IS_IGP
+0x1002 0x5960 0 "ATI Radeon RV280 9200"
+0x1002 0x5961 0 "ATI Radeon RV280 9200 SE"
+0x1002 0x5962 0 "ATI Radeon RV280 9200"
+0x1002 0x5963 0 "ATI Radeon RV280 9200"
+0x1002 0x5964 0 "ATI Radeon RV280 9200 SE"
+0x1002 0x5968 0 "ATI Radeon RV280 9200"
+0x1002 0x5969 0 "ATI Radeon RV280 9200"
+0x1002 0x596A 0 "ATI Radeon RV280 9200"
+0x1002 0x596B 0 "ATI Radeon RV280 9200"
+0x1002 0x5c61 CHIP_IS_MOBILITY "ATI Radeon RV280 Mobility"
+0x1002 0x5c62 0 "ATI Radeon RV280"
+0x1002 0x5c63 CHIP_IS_MOBILITY "ATI Radeon RV280 Mobility"
+0x1002 0x5c64 0 "ATI Radeon RV280"
[r128]
-0x1002 0x4c45 "ATI Rage 128 Mobility LE (PCI)"
-0x1002 0x4c46 "ATI Rage 128 Mobility LF (AGP)"
-0x1002 0x4d46 "ATI Rage 128 Mobility MF (AGP)"
-0x1002 0x4d4c "ATI Rage 128 Mobility ML (AGP)"
-0x1002 0x5041 "ATI Rage 128 Pro PA (PCI)"
-0x1002 0x5042 "ATI Rage 128 Pro PB (AGP)"
-0x1002 0x5043 "ATI Rage 128 Pro PC (AGP)"
-0x1002 0x5044 "ATI Rage 128 Pro PD (PCI)"
-0x1002 0x5045 "ATI Rage 128 Pro PE (AGP)"
-0x1002 0x5046 "ATI Rage 128 Pro PF (AGP)"
-0x1002 0x5047 "ATI Rage 128 Pro PG (PCI)"
-0x1002 0x5048 "ATI Rage 128 Pro PH (AGP)"
-0x1002 0x5049 "ATI Rage 128 Pro PI (AGP)"
-0x1002 0x504A "ATI Rage 128 Pro PJ (PCI)"
-0x1002 0x504B "ATI Rage 128 Pro PK (AGP)"
-0x1002 0x504C "ATI Rage 128 Pro PL (AGP)"
-0x1002 0x504D "ATI Rage 128 Pro PM (PCI)"
-0x1002 0x504E "ATI Rage 128 Pro PN (AGP)"
-0x1002 0x504F "ATI Rage 128 Pro PO (AGP)"
-0x1002 0x5050 "ATI Rage 128 Pro PP (PCI)"
-0x1002 0x5051 "ATI Rage 128 Pro PQ (AGP)"
-0x1002 0x5052 "ATI Rage 128 Pro PR (PCI)"
-0x1002 0x5053 "ATI Rage 128 Pro PS (PCI)"
-0x1002 0x5054 "ATI Rage 128 Pro PT (AGP)"
-0x1002 0x5055 "ATI Rage 128 Pro PU (AGP)"
-0x1002 0x5056 "ATI Rage 128 Pro PV (PCI)"
-0x1002 0x5057 "ATI Rage 128 Pro PW (AGP)"
-0x1002 0x5058 "ATI Rage 128 Pro PX (AGP)"
-0x1002 0x5245 "ATI Rage 128 RE (PCI)"
-0x1002 0x5246 "ATI Rage 128 RF (AGP)"
-0x1002 0x5247 "ATI Rage 128 RG (AGP)"
-0x1002 0x524b "ATI Rage 128 RK (PCI)"
-0x1002 0x524c "ATI Rage 128 RL (AGP)"
-0x1002 0x534d "ATI Rage 128 SM (AGP)"
-0x1002 0x5446 "ATI Rage 128 Pro Ultra TF (AGP)"
-0x1002 0x544C "ATI Rage 128 Pro Ultra TL (AGP)"
-0x1002 0x5452 "ATI Rage 128 Pro Ultra TR (AGP)"
+0x1002 0x4c45 0 "ATI Rage 128 Mobility LE (PCI)"
+0x1002 0x4c46 0 "ATI Rage 128 Mobility LF (AGP)"
+0x1002 0x4d46 0 "ATI Rage 128 Mobility MF (AGP)"
+0x1002 0x4d4c 0 "ATI Rage 128 Mobility ML (AGP)"
+0x1002 0x5041 0 "ATI Rage 128 Pro PA (PCI)"
+0x1002 0x5042 0 "ATI Rage 128 Pro PB (AGP)"
+0x1002 0x5043 0 "ATI Rage 128 Pro PC (AGP)"
+0x1002 0x5044 0 "ATI Rage 128 Pro PD (PCI)"
+0x1002 0x5045 0 "ATI Rage 128 Pro PE (AGP)"
+0x1002 0x5046 0 "ATI Rage 128 Pro PF (AGP)"
+0x1002 0x5047 0 "ATI Rage 128 Pro PG (PCI)"
+0x1002 0x5048 0 "ATI Rage 128 Pro PH (AGP)"
+0x1002 0x5049 0 "ATI Rage 128 Pro PI (AGP)"
+0x1002 0x504A 0 "ATI Rage 128 Pro PJ (PCI)"
+0x1002 0x504B 0 "ATI Rage 128 Pro PK (AGP)"
+0x1002 0x504C 0 "ATI Rage 128 Pro PL (AGP)"
+0x1002 0x504D 0 "ATI Rage 128 Pro PM (PCI)"
+0x1002 0x504E 0 "ATI Rage 128 Pro PN (AGP)"
+0x1002 0x504F 0 "ATI Rage 128 Pro PO (AGP)"
+0x1002 0x5050 0 "ATI Rage 128 Pro PP (PCI)"
+0x1002 0x5051 0 "ATI Rage 128 Pro PQ (AGP)"
+0x1002 0x5052 0 "ATI Rage 128 Pro PR (PCI)"
+0x1002 0x5053 0 "ATI Rage 128 Pro PS (PCI)"
+0x1002 0x5054 0 "ATI Rage 128 Pro PT (AGP)"
+0x1002 0x5055 0 "ATI Rage 128 Pro PU (AGP)"
+0x1002 0x5056 0 "ATI Rage 128 Pro PV (PCI)"
+0x1002 0x5057 0 "ATI Rage 128 Pro PW (AGP)"
+0x1002 0x5058 0 "ATI Rage 128 Pro PX (AGP)"
+0x1002 0x5245 0 "ATI Rage 128 RE (PCI)"
+0x1002 0x5246 0 "ATI Rage 128 RF (AGP)"
+0x1002 0x5247 0 "ATI Rage 128 RG (AGP)"
+0x1002 0x524b 0 "ATI Rage 128 RK (PCI)"
+0x1002 0x524c 0 "ATI Rage 128 RL (AGP)"
+0x1002 0x534d 0 "ATI Rage 128 SM (AGP)"
+0x1002 0x5446 0 "ATI Rage 128 Pro Ultra TF (AGP)"
+0x1002 0x544C 0 "ATI Rage 128 Pro Ultra TL (AGP)"
+0x1002 0x5452 0 "ATI Rage 128 Pro Ultra TR (AGP)"
[mga]
-0x102b 0x0521 "Matrox G200 (AGP)"
-0x102b 0x0525 "Matrox G400/G450 (AGP)"
-0x102b 0x2527 "Matrox G550 (AGP)"
+0x102b 0x0521 0 "Matrox G200 (AGP)"
+0x102b 0x0525 0 "Matrox G400/G450 (AGP)"
+0x102b 0x2527 0 "Matrox G550 (AGP)"
[mach64]
-0x1002 0x4749 "3D Rage Pro"
-0x1002 0x4750 "3D Rage Pro 215GP"
-0x1002 0x4751 "3D Rage Pro 215GQ"
-0x1002 0x4742 "3D Rage Pro AGP 1X/2X"
-0x1002 0x4744 "3D Rage Pro AGP 1X"
-0x1002 0x4c49 "3D Rage LT Pro"
-0x1002 0x4c50 "3D Rage LT Pro"
-0x1002 0x4c51 "3D Rage LT Pro"
-0x1002 0x4c42 "3D Rage LT Pro AGP-133"
-0x1002 0x4c44 "3D Rage LT Pro AGP-66"
-0x1002 0x474c "Rage XC"
-0x1002 0x474f "Rage XL"
-0x1002 0x4752 "Rage XL"
-0x1002 0x4753 "Rage XC"
-0x1002 0x474d "Rage XL AGP 2X"
-0x1002 0x474e "Rage XC AGP"
-0x1002 0x4c52 "Rage Mobility P/M"
-0x1002 0x4c53 "Rage Mobility L"
-0x1002 0x4c4d "Rage Mobility P/M AGP 2X"
-0x1002 0x4c4e "Rage Mobility L AGP 2X"
+0x1002 0x4749 0 "3D Rage Pro"
+0x1002 0x4750 0 "3D Rage Pro 215GP"
+0x1002 0x4751 0 "3D Rage Pro 215GQ"
+0x1002 0x4742 0 "3D Rage Pro AGP 1X/2X"
+0x1002 0x4744 0 "3D Rage Pro AGP 1X"
+0x1002 0x4c49 0 "3D Rage LT Pro"
+0x1002 0x4c50 0 "3D Rage LT Pro"
+0x1002 0x4c51 0 "3D Rage LT Pro"
+0x1002 0x4c42 0 "3D Rage LT Pro AGP-133"
+0x1002 0x4c44 0 "3D Rage LT Pro AGP-66"
+0x1002 0x474c 0 "Rage XC"
+0x1002 0x474f 0 "Rage XL"
+0x1002 0x4752 0 "Rage XL"
+0x1002 0x4753 0 "Rage XC"
+0x1002 0x474d 0 "Rage XL AGP 2X"
+0x1002 0x474e 0 "Rage XC AGP"
+0x1002 0x4c52 0 "Rage Mobility P/M"
+0x1002 0x4c53 0 "Rage Mobility L"
+0x1002 0x4c4d 0 "Rage Mobility P/M AGP 2X"
+0x1002 0x4c4e 0 "Rage Mobility L AGP 2X"
[sisdrv]
-0x1039 0x0300 "SiS 300/305"
-0x1039 0x5300 "SiS 540"
-0x1039 0x6300 "SiS 630"
-0x1039 0x7300 "SiS 730"
+0x1039 0x0300 0 "SiS 300/305"
+0x1039 0x5300 0 "SiS 540"
+0x1039 0x6300 0 "SiS 630"
+0x1039 0x7300 0 "SiS 730"
[tdfx]
-0x121a 0x0003 "3dfx Voodoo Banshee"
-0x121a 0x0004 "3dfx Voodoo3 2000"
-0x121a 0x0005 "3dfx Voodoo3 3000"
-0x121a 0x0007 "3dfx Voodoo4 4500"
-0x121a 0x0009 "3dfx Voodoo5 5500"
-0x121a 0x000b "3dfx Voodoo4 4200"
+0x121a 0x0003 0 "3dfx Voodoo Banshee"
+0x121a 0x0004 0 "3dfx Voodoo3 2000"
+0x121a 0x0005 0 "3dfx Voodoo3 3000"
+0x121a 0x0007 0 "3dfx Voodoo4 4500"
+0x121a 0x0009 0 "3dfx Voodoo5 5500"
+0x121a 0x000b 0 "3dfx Voodoo4 4200"
[viadrv]
-0x1106 0x3022 "VIA CLE266 3022"
-0x1106 0x3118 "VIA CN400"
-0x1106 0x3122 "VIA CLE266"
-0x1106 0x7205 "VIA KM400"
-0x1106 0x7204 "VIA K8M800"
+0x1106 0x3022 0 "VIA CLE266 3022"
+0x1106 0x3118 0 "VIA CN400"
+0x1106 0x3122 0 "VIA CLE266"
+0x1106 0x7205 0 "VIA KM400"
+0x1106 0x7204 0 "VIA K8M800"
[i810]
-0x8086 0x7121 "Intel i810 GMCH"
-0x8086 0x7123 "Intel i810-DC100 GMCH"
-0x8086 0x7125 "Intel i810E GMCH"
-0x8086 0x1132 "Intel i815 GMCH"
+0x8086 0x7121 0 "Intel i810 GMCH"
+0x8086 0x7123 0 "Intel i810-DC100 GMCH"
+0x8086 0x7125 0 "Intel i810E GMCH"
+0x8086 0x1132 0 "Intel i815 GMCH"
[i830]
-0x8086 0x3577 "Intel i830M GMCH"
-0x8086 0x2562 "Intel i845G GMCH"
-0x8086 0x3582 "Intel i852GM/i855GM GMCH"
-0x8086 0x2572 "Intel i865G GMCH"
+0x8086 0x3577 0 "Intel i830M GMCH"
+0x8086 0x2562 0 "Intel i845G GMCH"
+0x8086 0x3582 0 "Intel i852GM/i855GM GMCH"
+0x8086 0x2572 0 "Intel i865G GMCH"
[gamma]
-0x3d3d 0x0008 "3DLabs GLINT Gamma G1"
+0x3d3d 0x0008 0 "3DLabs GLINT Gamma G1"
[savage]
-0x5333 0x8a22 "Savage4"
-0x5333 0x8a23 "Savage4"
-0x5333 0x8c10 "Savage/MX-MV"
-0x5333 0x8c11 "Savage/MX"
-0x5333 0x8c12 "Savage/IX-MV"
-0x5333 0x8c13 "Savage/IX"
-0x5333 0x8c20 "Savage 3D"
-0x5333 0x8c21 "Savage 3D/MV"
-0x5333 0x8c22 "SuperSavage MX/128"
-0x5333 0x8c24 "SuperSavage MX/64"
-0x5333 0x8c26 "SuperSavage MX/64C"
-0x5333 0x8c2a "SuperSavage IX/128 SDR"
-0x5333 0x8c2b "SuperSavage IX/128 DDR"
-0x5333 0x8c2c "SuperSavage IX/64 SDR"
-0x5333 0x8c2d "SuperSavage IX/64 DDR"
-0x5333 0x8c2e "SuperSavage IX/C SDR"
-0x5333 0x8c2f "SuperSavage IX/C DDR"
-0x5333 0x8a25 "ProSavage PM133"
-0x5333 0x8a26 "ProSavage KM133"
-0x5333 0x8d01 "ProSavage PN133"
-0x5333 0x8d02 "ProSavage KN133"
-0x5333 0x8d04 "ProSavage DDR"
+0x5333 0x8a22 0 "Savage4"
+0x5333 0x8a23 0 "Savage4"
+0x5333 0x8c10 0 "Savage/MX-MV"
+0x5333 0x8c11 0 "Savage/MX"
+0x5333 0x8c12 0 "Savage/IX-MV"
+0x5333 0x8c13 0 "Savage/IX"
+0x5333 0x8c20 0 "Savage 3D"
+0x5333 0x8c21 0 "Savage 3D/MV"
+0x5333 0x8c22 0 "SuperSavage MX/128"
+0x5333 0x8c24 0 "SuperSavage MX/64"
+0x5333 0x8c26 0 "SuperSavage MX/64C"
+0x5333 0x8c2a 0 "SuperSavage IX/128 SDR"
+0x5333 0x8c2b 0 "SuperSavage IX/128 DDR"
+0x5333 0x8c2c 0 "SuperSavage IX/64 SDR"
+0x5333 0x8c2d 0 "SuperSavage IX/64 DDR"
+0x5333 0x8c2e 0 "SuperSavage IX/C SDR"
+0x5333 0x8c2f 0 "SuperSavage IX/C DDR"
+0x5333 0x8a25 0 "ProSavage PM133"
+0x5333 0x8a26 0 "ProSavage KM133"
+0x5333 0x8d01 0 "ProSavage PN133"
+0x5333 0x8d02 0 "ProSavage KN133"
+0x5333 0x8d04 0 "ProSavage DDR"
[ffb]
[i915]
-0x8086 0x3577 "Intel i830M GMCH"
-0x8086 0x2562 "Intel i845G GMCH"
-0x8086 0x3582 "Intel i852GM/i855GM GMCH"
-0x8086 0x2572 "Intel i865G GMCH"
-0x8086 0x2582 "Intel i915G"
+0x8086 0x3577 0 "Intel i830M GMCH"
+0x8086 0x2562 0 "Intel i845G GMCH"
+0x8086 0x3582 0 "Intel i852GM/i855GM GMCH"
+0x8086 0x2572 0 "Intel i865G GMCH"
+0x8086 0x2582 0 "Intel i915G"
diff --git a/shared/radeon_drv.h b/shared/radeon_drv.h
index e24e0ec0..81b9a98e 100644
--- a/shared/radeon_drv.h
+++ b/shared/radeon_drv.h
@@ -31,6 +31,17 @@
#ifndef __RADEON_DRV_H__
#define __RADEON_DRV_H__
+/*
+ * Chip flags
+ */
+enum radeon_chip_flags {
+ CHIP_FAMILY_MASK = 0x0000ffffUL,
+ CHIP_FLAGS_MASK = 0xffff0000UL,
+ CHIP_IS_MOBILITY = 0x00010000UL,
+ CHIP_IS_IGP = 0x00020000UL,
+ CHIP_SINGLE_CRTC = 0x00040000UL,
+};
+
#define GET_RING_HEAD(dev_priv) DRM_READ32( (dev_priv)->ring_rptr, 0 )
#define SET_RING_HEAD(dev_priv,val) DRM_WRITE32( (dev_priv)->ring_rptr, 0, (val) )