diff options
author | Dave Airlie <airlied@linux.ie> | 2008-01-27 12:16:06 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2008-01-27 12:16:06 +1000 |
commit | 3bfef648000e544a3505feea5bda7aa9f184f304 (patch) | |
tree | ee0cade80417f40a7f2bc8dbd7f68eb4fecfacfa /src/mesa/drivers/dri/radeon | |
parent | da60fd1291c9ab3bd898c80d9583d2041df6d0b7 (diff) |
r300: add initial rs690 support to Mesa
The rs690 has an rs4xx style vertex-shader less 3D engine. It uses the new
r500 output engine though. It also needs a new drm with rs690 support,
which is just getting cleaned up.
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_chipset.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_screen.c | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_chipset.h b/src/mesa/drivers/dri/radeon/radeon_chipset.h index 7318099093..618f50ce07 100644 --- a/src/mesa/drivers/dri/radeon/radeon_chipset.h +++ b/src/mesa/drivers/dri/radeon/radeon_chipset.h @@ -147,6 +147,7 @@ #define PCI_CHIP_RV410_5E4F 0x5E4F #define PCI_CHIP_RS350_7834 0x7834 #define PCI_CHIP_RS350_7835 0x7835 +#define PCI_CHIP_RS690_791E 0x791E enum { CHIP_FAMILY_R100, @@ -165,6 +166,7 @@ enum { CHIP_FAMILY_R420, CHIP_FAMILY_RV410, CHIP_FAMILY_RS400, + CHIP_FAMILY_RS690, CHIP_FAMILY_LAST }; diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index f2af532834..b4c26be57e 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -362,6 +362,8 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv ) RADEONDRIPtr dri_priv = (RADEONDRIPtr)sPriv->pDevPriv; unsigned char *RADEONMMIO; int i; + int ret; + uint32_t temp; if (sPriv->devPrivSize != sizeof(RADEONDRIRec)) { fprintf(stderr,"\nERROR! sizeof(RADEONDRIRec) does not match passed size from device driver\n"); @@ -684,6 +686,11 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv ) fprintf(stderr, "Warning, xpress200 detected.\n"); break; + case PCI_CHIP_RS690_791E: + screen->chip_family = CHIP_FAMILY_RS690; + fprintf(stderr, "Warning, RS690 detected, 3D support is incomplete.\n"); + break; + default: fprintf(stderr, "unknown chip id 0x%x, can't guess.\n", dri_priv->deviceID); @@ -705,7 +712,19 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv ) screen->cpp = dri_priv->bpp / 8; screen->AGPMode = dri_priv->AGPMode; - screen->fbLocation = ( INREG( RADEON_MC_FB_LOCATION ) & 0xffff ) << 16; + ret = radeonGetParam( sPriv->fd, RADEON_PARAM_FB_LOCATION, + &temp); + if (ret) { + if (screen->chip_family < CHIP_FAMILY_RS690) + screen->fbLocation = ( INREG( RADEON_MC_FB_LOCATION ) & 0xffff) << 16; + else { + FREE( screen ); + fprintf(stderr, "Unable to get fb location need newer drm\n"); + return NULL; + } + } else { + screen->fbLocation = (temp & 0xffff) << 16; + } if ( sPriv->drm_version.minor >= 10 ) { drm_radeon_setparam_t sp; |