diff options
author | Dave Airlie <[email protected]> | 2009-03-24 09:28:52 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2009-03-24 09:28:52 +1000 |
commit | 28e082197d158206b58da62940cf57796abe565a (patch) | |
tree | eae74eb0bf26cd0b14ac585eaa8dfb70acaa32ac /src/mesa/drivers/dri/radeon/radeon_screen.c | |
parent | 9f11b3311e9f65bc19a3fde10f1ee4d6fbb7ead2 (diff) |
radeon: setup pipes for r300
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_screen.c')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_screen.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index 78f769e3ed2..3817007e9e5 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -1047,6 +1047,7 @@ radeonCreateScreen2(__DRIscreenPrivate *sPriv) int i; int ret; uint32_t device_id; + uint32_t temp = 0; /* Allocate the private area */ screen = (radeonScreenPtr) CALLOC( sizeof(*screen) ); @@ -1083,6 +1084,36 @@ radeonCreateScreen2(__DRIscreenPrivate *sPriv) if (ret == -1) return NULL; + if (screen->chip_family >= CHIP_FAMILY_R300) { + ret = radeonGetParam( sPriv->fd, RADEON_PARAM_NUM_GB_PIPES, + &temp); + if (ret) { + fprintf(stderr, "Unable to get num_pipes, need newer drm\n"); + switch (screen->chip_family) { + case CHIP_FAMILY_R300: + case CHIP_FAMILY_R350: + screen->num_gb_pipes = 2; + break; + case CHIP_FAMILY_R420: + case CHIP_FAMILY_R520: + case CHIP_FAMILY_R580: + case CHIP_FAMILY_RV560: + case CHIP_FAMILY_RV570: + screen->num_gb_pipes = 4; + break; + case CHIP_FAMILY_RV350: + case CHIP_FAMILY_RV515: + case CHIP_FAMILY_RV530: + case CHIP_FAMILY_RV410: + default: + screen->num_gb_pipes = 1; + break; + } + } else { + screen->num_gb_pipes = temp; + } + } + if (screen->chip_family <= CHIP_FAMILY_RS200) screen->chip_flags |= RADEON_CLASS_R100; else if (screen->chip_family <= CHIP_FAMILY_RV280) |