From: Dave Airlie Date: Sun, 27 Jan 2008 02:16:06 +0000 (+1000) Subject: r300: add initial rs690 support to Mesa X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3bfef648000e544a3505feea5bda7aa9f184f304;p=mesa.git 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. --- diff --git a/src/mesa/drivers/dri/radeon/radeon_chipset.h b/src/mesa/drivers/dri/radeon/radeon_chipset.h index 7318099093a..618f50ce07a 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 f2af532834f..b4c26be57e4 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;