diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2008-12-17 05:36:09 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2008-12-17 05:36:09 -0500 |
commit | 6bfbb930c549e67f68969f7f0483380417f755b5 (patch) | |
tree | 2123966e3f59689ea0ad4430db381ec1cee559e6 /src/atombios_output.c | |
parent | 6ed0e68060fd2775e2d4027ff1533729e87848ba (diff) |
Make sure we hit the right bios reg
Diffstat (limited to 'src/atombios_output.c')
-rw-r--r-- | src/atombios_output.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c index a687beab..0de008ad 100644 --- a/src/atombios_output.c +++ b/src/atombios_output.c @@ -843,19 +843,24 @@ atombios_output_yuv_setup(xf86OutputPtr output, Bool enable) AtomBiosArgRec data; unsigned char *space; unsigned char *RADEONMMIO = info->MMIO; - uint32_t temp; + uint32_t temp, reg; + + if (info->ChipFamily >= CHIP_FAMILY_R600) + reg = R600_BIOS_3_SCRATCH; + else + reg = RADEON_BIOS_3_SCRATCH; //fix up scratch reg handling temp = INREG(R600_BIOS_3_SCRATCH); if ((radeon_output->MonType == MT_CTV) || (radeon_output->MonType == MT_STV)) - OUTREG(R600_BIOS_3_SCRATCH, (ATOM_S3_TV1_ACTIVE | - (radeon_crtc->crtc_id << 18))); + OUTREG(reg, (ATOM_S3_TV1_ACTIVE | + (radeon_crtc->crtc_id << 18))); else if (radeon_output->MonType == MT_CV) - OUTREG(R600_BIOS_3_SCRATCH, (ATOM_S3_CV_ACTIVE | - (radeon_crtc->crtc_id << 24))); + OUTREG(reg, (ATOM_S3_CV_ACTIVE | + (radeon_crtc->crtc_id << 24))); else - OUTREG(R600_BIOS_3_SCRATCH, 0); + OUTREG(reg, 0); memset(&disp_data, 0, sizeof(disp_data)); @@ -869,13 +874,13 @@ atombios_output_yuv_setup(xf86OutputPtr output, Bool enable) if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) { - OUTREG(R600_BIOS_3_SCRATCH, temp); + OUTREG(reg, temp); ErrorF("crtc %d YUV %s setup success\n", radeon_crtc->crtc_id, enable ? "enable" : "disable"); return ATOM_SUCCESS; } - OUTREG(R600_BIOS_3_SCRATCH, temp); + OUTREG(reg, temp); ErrorF("crtc %d YUV %s setup failed\n", radeon_crtc->crtc_id, enable ? "enable" : "disable"); return ATOM_NOT_IMPLEMENTED; |