diff options
author | Alex Deucher <alex@botch2.com> | 2007-07-29 15:23:14 -0400 |
---|---|---|
committer | Alex Deucher <alex@botch2.com> | 2007-07-29 15:23:14 -0400 |
commit | 6b9b7a7bdc290d07de9b226691ec8025af8db896 (patch) | |
tree | ad5ec5300554d97a871b4552425b4bd7edac8ca1 /src/radeon_output.c | |
parent | 8d043db1817d94edeb72ab208dfea60026715d48 (diff) |
RADEON: Initial pass at integrated tv out support
Based on the GATOS tv-out support by Federico Ulivi <fulivi@lycos.com>
and information from ati with substantial rework by myself.
Code is not actually hooked up yet.
Diffstat (limited to 'src/radeon_output.c')
-rw-r--r-- | src/radeon_output.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c index e431bf5..d0a12dd 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -46,6 +46,7 @@ #include "radeon_macros.h" #include "radeon_probe.h" #include "radeon_version.h" +#include "radeon_tv.h" const char *MonTypeName[7] = { @@ -890,7 +891,7 @@ RADEONInitTvDacCntl(ScrnInfoPtr pScrn, RADEONSavePtr save) save->tv_dac_cntl |= (RADEON_TV_DAC_NBLANK | RADEON_TV_DAC_NHOLD | RADEON_TV_DAC_STD_PS2); - // info->tv_dac_adj); + } static void RADEONInitDAC2Registers(xf86OutputPtr output, RADEONSavePtr save, @@ -902,6 +903,9 @@ static void RADEONInitDAC2Registers(xf86OutputPtr output, RADEONSavePtr save, /*0x0028023;*/ RADEONInitTvDacCntl(pScrn, save); + if (IS_R300_VARIANT) + save->gpiopad_a = info->SavedReg.gpiopad_a | 1; + if (IsPrimary) { save->dac2_cntl = info->SavedReg.dac2_cntl | RADEON_DAC2_DAC2_CLK_SEL; if (IS_R300_VARIANT) { @@ -961,6 +965,9 @@ RADEONInitOutputRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save, } else { RADEONInitFP2Registers(output, save, mode, IsPrimary); } + } else if (radeon_output->MonType == MT_STV || + radeon_output->MonType == MT_CTV) { + RADEONInitTVRegisters(output, save, mode, IsPrimary); } } @@ -993,6 +1000,12 @@ radeon_mode_set(xf86OutputPtr output, DisplayModePtr mode, RADEONRestoreFP2Registers(pScrn, &info->ModeReg); } break; + case MT_STV: + case MT_CTV: + ErrorF("restore tv\n"); + RADEONRestoreDACRegisters(pScrn, &info->ModeReg); + RADEONRestoreTVRegisters(pScrn, &info->ModeReg); + break; default: ErrorF("restore dac\n"); RADEONRestoreDACRegisters(pScrn, &info->ModeReg); @@ -1041,8 +1054,12 @@ radeon_detect(xf86OutputPtr output) switch(radeon_output->MonType) { case MT_LCD: - case MT_DFP: output->subpixel_order = SubPixelHorizontalRGB; break; - default: output->subpixel_order = SubPixelNone; break; + case MT_DFP: + output->subpixel_order = SubPixelHorizontalRGB; + break; + default: + output->subpixel_order = SubPixelNone; + break; } return XF86OutputStatusConnected; |