summaryrefslogtreecommitdiff
path: root/src/radeon_output.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-11-20 08:04:32 +1000
committerDave Airlie <airlied@redhat.com>2007-11-20 08:04:32 +1000
commitfe2f7a09050fb7a345a1f52239f8f3c4f1053891 (patch)
treeee75ebf7f5bfda3a6d621ac42121a3014d80e0aa /src/radeon_output.c
parent744c8cb6c293fcaa687566f52901644e699baace (diff)
parent49055d8aff91ff12186feaf5343c8fd2f96bcba0 (diff)
Merge branch 'master' into agd-atom-merge
Conflicts: src/radeon_cursor.c src/radeon_output.c
Diffstat (limited to 'src/radeon_output.c')
-rw-r--r--src/radeon_output.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 59ed8b1..14abb2e 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -702,8 +702,6 @@ void RADEONConnectorFindMonitor(ScrnInfoPtr pScrn, xf86OutputPtr output)
static RADEONMonitorType RADEONPortCheckNonDDC(ScrnInfoPtr pScrn, xf86OutputPtr output)
{
- RADEONInfoPtr info = RADEONPTR(pScrn);
- unsigned char *RADEONMMIO = info->MMIO;
RADEONOutputPrivatePtr radeon_output = output->driver_private;
RADEONMonitorType MonType = MT_NONE;
@@ -711,7 +709,11 @@ static RADEONMonitorType RADEONPortCheckNonDDC(ScrnInfoPtr pScrn, xf86OutputPtr
#if defined(__powerpc__)
/* not sure on ppc, OF? */
#else
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+
if (!info->IsAtomBios) {
+ unsigned char *RADEONMMIO = info->MMIO;
+
/* see if the lid is closed -- only works at boot */
if (INREG(RADEON_BIOS_6_SCRATCH) & 0x10)
MonType = MT_NONE;
@@ -720,7 +722,7 @@ static RADEONMonitorType RADEONPortCheckNonDDC(ScrnInfoPtr pScrn, xf86OutputPtr
} else
#endif
MonType = MT_LCD;
- } else if (OUTPUT_IS_DVI) {
+ } /*else if (radeon_output->type == OUTPUT_DVI) {
if (radeon_output->TMDSType == TMDS_INT) {
if (INREG(RADEON_FP_GEN_CNTL) & RADEON_FP_DETECT_SENSE)
MonType = MT_DFP;
@@ -728,7 +730,7 @@ static RADEONMonitorType RADEONPortCheckNonDDC(ScrnInfoPtr pScrn, xf86OutputPtr
if (INREG(RADEON_FP2_GEN_CNTL) & RADEON_FP2_DETECT_SENSE)
MonType = MT_DFP;
}
- }
+ }*/
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Detected non-DDC Monitor Type: %d\n", MonType);
@@ -1078,11 +1080,12 @@ static void RADEONInitDACRegisters(xf86OutputPtr output, RADEONSavePtr save,
save->dac_macro_cntl = info->SavedReg.dac_macro_cntl;
}
-/* XXX: fix me */
static void
-RADEONInitTvDacCntl(ScrnInfoPtr pScrn, RADEONSavePtr save)
+RADEONInitTvDacCntl(xf86OutputPtr output, RADEONSavePtr save)
{
+ ScrnInfoPtr pScrn = output->scrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
+ RADEONOutputPrivatePtr radeon_output = output->driver_private;
if (info->ChipFamily == CHIP_FAMILY_R420 ||
info->ChipFamily == CHIP_FAMILY_RV410) {
@@ -1103,10 +1106,11 @@ RADEONInitTvDacCntl(ScrnInfoPtr pScrn, RADEONSavePtr save)
RADEON_TV_DAC_GDACPD |
RADEON_TV_DAC_GDACPD);
}
- /* FIXME: doesn't make sense, this just replaces the previous value... */
+
save->tv_dac_cntl |= (RADEON_TV_DAC_NBLANK |
- RADEON_TV_DAC_NHOLD |
- RADEON_TV_DAC_STD_PS2);
+ RADEON_TV_DAC_NHOLD |
+ RADEON_TV_DAC_STD_PS2 |
+ radeon_output->tv_dac_adj);
}
@@ -1117,7 +1121,7 @@ static void RADEONInitDAC2Registers(xf86OutputPtr output, RADEONSavePtr save,
RADEONInfoPtr info = RADEONPTR(pScrn);
/*0x0028023;*/
- RADEONInitTvDacCntl(pScrn, save);
+ RADEONInitTvDacCntl(output, save);
if (IS_R300_VARIANT)
save->gpiopad_a = info->SavedReg.gpiopad_a | 1;
@@ -1727,7 +1731,12 @@ radeon_detect(xf86OutputPtr output)
if (((radeon_output->type == OUTPUT_VGA || radeon_output->type == OUTPUT_DVI_I) &&
radeon_output->DACType == DAC_TVDAC) ||
(info->IsIGP && radeon_output->type == OUTPUT_DVI_D))
+ radeon_output->MonType = MT_CRT;
return XF86OutputStatusUnknown;
+ } else if (info->IsIGP && radeon_output->type == OUTPUT_DVI) {
+ radeon_output->MonType = MT_DFP; /* MT_LCD ??? */
+ return XF86OutputStatusUnknown;
+ }
}
if (connected)
@@ -2739,6 +2748,7 @@ void RADEONInitConnector(xf86OutputPtr output)
if (OUTPUT_IS_TV) {
RADEONGetTVInfo(output);
+ RADEONGetTVDacAdjInfo(output);
}
if (radeon_output->DACType == DAC_TVDAC) {