diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-09-25 19:05:38 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-09-25 19:05:38 -0400 |
commit | 7968e1fb89f6b59d1654df48249bf4b81990c008 (patch) | |
tree | 6fd449608e8ffb2658cc944d9fca5c4237642d20 /src/radeon_commonfuncs.c | |
parent | 0380a9cf98d34e88dd81370ade5525680ec89c02 (diff) |
radeon: fix segfault in MMIO path in RADEONInit3DEngine
fixes fdo bug 24158.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Diffstat (limited to 'src/radeon_commonfuncs.c')
-rw-r--r-- | src/radeon_commonfuncs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c index c0625c4b..8c46235d 100644 --- a/src/radeon_commonfuncs.c +++ b/src/radeon_commonfuncs.c @@ -82,7 +82,7 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn) case 1: gb_tile_config |= R300_PIPE_COUNT_RV350; break; } - if (info->dri->pKernelDRMVersion->version_major < 2) { + if (!info->cs) { size = (info->ChipFamily >= CHIP_FAMILY_R420) ? 5 : 4; BEGIN_ACCEL(size); OUT_ACCEL_REG(R300_GB_TILE_CONFIG, gb_tile_config); @@ -95,8 +95,8 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn) } if (IS_R500_3D) { - su_reg_dest = ((1 << info->accel_state->num_gb_pipes) - 1); - if (info->dri->pKernelDRMVersion->version_major < 2) { + if (!info->cs) { + su_reg_dest = ((1 << info->accel_state->num_gb_pipes) - 1); BEGIN_ACCEL(2); OUT_ACCEL_REG(R500_SU_REG_DEST, su_reg_dest); OUT_ACCEL_REG(R500_VAP_INDEX_OFFSET, 0); @@ -116,7 +116,7 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn) OUT_ACCEL_REG(R300_RB3D_ZCACHE_CTLSTAT, R300_ZC_FLUSH | R300_ZC_FREE); FINISH_ACCEL(); - if (info->dri->pKernelDRMVersion->version_major < 2) { + if (!info->cs) { BEGIN_ACCEL(3); OUT_ACCEL_REG(R300_GB_MSPOS0, ((6 << R300_MS_X0_SHIFT) | (6 << R300_MS_Y0_SHIFT) | |