Commit 92702565 authored by Eric Anholt's avatar Eric Anholt

Change PCI ID information field to be one of r128, r100, r200, r300. This

    is all the information we need so far. Put that information into atic,
    and use it correctly in the code (unlike before).
parent 5d51dfc6
This diff is collapsed.
......@@ -81,10 +81,6 @@ typedef volatile CARD8 VOL8;
typedef volatile CARD16 VOL16;
typedef volatile CARD32 VOL32;
#define CAP_RADEON 0x1 /* Whether it's a Radeon vs R128 */
#define CAP_R200 0x2 /* If CAP_RADEON, whether it's an R200 */
#define CAP_NODRM 0x4 /* Set if no initialization for the DRM yet. */
struct pci_id_entry {
CARD16 vendor;
CARD16 device;
......@@ -121,7 +117,9 @@ typedef struct _ATICardInfo {
struct pci_id_entry *pci_id;
CARD8 *reg_base;
Bool is_radeon;
Bool is_r100;
Bool is_r200;
Bool is_r300;
char *busid;
#ifdef USE_DRI
int drmFd;
......
......@@ -504,7 +504,7 @@ ATIDrawInit(ScreenPtr pScreen)
if (atis->using_dri)
ATIDMAStart(pScreen);
else {
if (ATIDRIScreenInit(pScreen))
if (!atic->is_r300 && ATIDRIScreenInit(pScreen))
atis->using_dri = TRUE;
}
#endif /* USE_DRI */
......
......@@ -84,7 +84,7 @@ void RadeonSwitchTo3D(void);
void
ATIWaitIdle(void);
#if 0
#if 1
#define ATI_FALLBACK(x) \
do { \
ErrorF x; \
......
......@@ -539,7 +539,7 @@ ATIDRIScreenInit(ScreenPtr pScreen)
pDRIInfo->busIdString = atic->busid;
if (atic->is_radeon) {
pDRIInfo->drmDriverName = "radeon";
if (atic->is_r200)
if (atic->is_r100)
pDRIInfo->clientDriverName = "radeon";
else
pDRIInfo->clientDriverName = "r200";
......@@ -562,7 +562,7 @@ ATIDRIScreenInit(ScreenPtr pScreen)
*/
pDRIInfo->SAREASize = SAREA_MAX;
if (atic->is_radeon) {
if (!atic->is_radeon) {
pDRIInfo->devPrivateSize = sizeof(R128DRIRec);
devSareaSize = sizeof(R128SAREAPriv);
} else {
......@@ -862,7 +862,7 @@ ATIDRICloseScreen(ScreenPtr pScreen)
}
/* De-allocate all kernel resources */
if (atic->is_radeon) {
if (!atic->is_radeon) {
memset(&drmR128Info, 0, sizeof(drmR128Init));
drmR128Info.func = DRM_R128_CLEANUP_CCE;
drmCommandWrite(atic->drmFd, DRM_R128_INIT, &drmR128Info,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment