diff options
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_screen.c')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_screen.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_screen.c b/src/mesa/drivers/dri/r200/r200_screen.c index 4216046d198..fe246686a01 100644 --- a/src/mesa/drivers/dri/r200/r200_screen.c +++ b/src/mesa/drivers/dri/r200/r200_screen.c @@ -76,6 +76,7 @@ r200CreateScreen( __DRIscreenPrivate *sPriv ) { r200ScreenPtr screen; RADEONDRIPtr dri_priv = (RADEONDRIPtr)sPriv->pDevPriv; + unsigned char *RADEONMMIO; if ( ! driCheckDriDdxDrmVersions( sPriv, "R200", 4, 0, 4, 0, 1, 5 ) ) return NULL; @@ -193,8 +194,9 @@ r200CreateScreen( __DRIscreenPrivate *sPriv ) return NULL; } + RADEONMMIO = screen->mmio.map; + if ( dri_priv->gartTexHandle && dri_priv->gartTexMapSize ) { - unsigned char *RADEONMMIO = screen->mmio.map; screen->gartTextures.handle = dri_priv->gartTexHandle; screen->gartTextures.size = dri_priv->gartTexMapSize; @@ -218,6 +220,18 @@ r200CreateScreen( __DRIscreenPrivate *sPriv ) screen->cpp = dri_priv->bpp / 8; screen->AGPMode = dri_priv->AGPMode; + screen->fbLocation = ( INREG( RADEON_MC_FB_LOCATION ) & 0xffff ) << 16; + + if ( sPriv->drmMinor >= 10 ) { + drmRadeonSetParam sp; + + sp.param = RADEON_SETPARAM_FB_LOCATION; + sp.value = screen->fbLocation; + + drmCommandWrite( sPriv->fd, DRM_RADEON_SETPARAM, + &sp, sizeof( sp ) ); + } + screen->frontOffset = dri_priv->frontOffset; screen->frontPitch = dri_priv->frontPitch; screen->backOffset = dri_priv->backOffset; @@ -225,7 +239,8 @@ r200CreateScreen( __DRIscreenPrivate *sPriv ) screen->depthOffset = dri_priv->depthOffset; screen->depthPitch = dri_priv->depthPitch; - screen->texOffset[RADEON_CARD_HEAP] = dri_priv->textureOffset; + screen->texOffset[RADEON_CARD_HEAP] = dri_priv->textureOffset + + screen->fbLocation; screen->texSize[RADEON_CARD_HEAP] = dri_priv->textureSize; screen->logTexGranularity[RADEON_CARD_HEAP] = dri_priv->log2TexGran; |