![](https://seccdn.libravatar.org/avatar/30fae5bce90608fb3df5c018c586aea6.jpg?s=120&d=mm&r=g)
Hi! My X1300 pro had problems with my DVI attached monitor since LVTMA currently only uses LVDS signal. This patch will now enable TMDS if a DVI connector is beeing detected. The main difference is the
RHDRegWrite(Output, LVTMA_MODE, lvtmaMode); where 0=LVDS, 1=TMDS.
I hope this also works for others which previously got the message "RHDLVTMAInit: unhandled connector type: 2". If not, please be patient with me since I'm completely new to X driver programming :) So I guess there are still many things to do for making TMDS support complete (like 24bit handling), but hope it's at least a starting point. LieGrü, strub --------------------------------------------- diff --git a/src/rhd_lvtma.c b/src/rhd_lvtma.c index 57fc2e4..abe3fb3 100644 --- a/src/rhd_lvtma.c +++ b/src/rhd_lvtma.c @@ -48,6 +48,7 @@ #endif struct rhdLVTMAPrivate { + int lvtmaMode; /* 0=LVDS, 1=TMDS */ Bool DualLink; Bool LVDS24Bit; Bool FPDI; /* LDI otherwise */ @@ -91,11 +92,12 @@ LVDSModeValid(struct rhdOutput *Output, DisplayModePtr Mode) return MODE_OK; } + /* - * + * lvtmaMode: 0=set to LVDS, 1=set to TMDS */ static void -LVDSSet(struct rhdOutput *Output) +LVTMASet(struct rhdOutput *Output, int lvtmaMode) { struct rhdLVTMAPrivate *Private = (struct rhdLVTMAPrivate *) Output->Private; @@ -104,8 +106,9 @@ LVDSSet(struct rhdOutput *Output) RHDRegMask(Output, LVTMA_CNTL, 0x00000001, 0x00000001); /* enable */ usleep(20); - RHDRegWrite(Output, LVTMA_MODE, 0); /* set to LVDS */ - + RHDRegWrite(Output, LVTMA_MODE, lvtmaMode); + Private->lvtmaMode = lvtmaMode; + /* Select CRTC, select syncA, no stereosync */ RHDRegMask(Output, LVTMA_SOURCE_SELECT, Output->Crtc->Id, 0x00010101); @@ -170,6 +173,19 @@ LVDSSet(struct rhdOutput *Output) RHDRegMask(Output, LVTMA_DATA_SYNCHRONIZATION, 0, 0x00000100); } +static void +LVTMA_LVDSSet(struct rhdOutput *Output) +{ + LVTMASet(Output, 0); +} + +static void +LVTMA_TMDSSet(struct rhdOutput *Output) +{ + LVTMASet(Output, 1); +} + + /* * */ @@ -202,7 +218,7 @@ LVDSPWRSEQInit(struct rhdOutput *Output) * */ static void -LVDSEnable(struct rhdOutput *Output) +LVTMAEnable(struct rhdOutput *Output) { struct rhdLVTMAPrivate *Private = (struct rhdLVTMAPrivate *) Output->Private; CARD32 tmp = 0; @@ -245,7 +261,7 @@ LVDSEnable(struct rhdOutput *Output) * */ static void -LVDSDisable(struct rhdOutput *Output) +LVTMADisable(struct rhdOutput *Output) { struct rhdLVTMAPrivate *Private = (struct rhdLVTMAPrivate *) Output->Private; CARD32 tmp = 0; @@ -299,20 +315,20 @@ LVDSShutdown(struct rhdOutput *Output) * */ static void -LVDSPower(struct rhdOutput *Output, int Power) +LVTMAPower(struct rhdOutput *Output, int Power) { RHDFUNC(Output); switch (Power) { case RHD_POWER_ON: - LVDSEnable(Output); + LVTMAEnable(Output); break; case RHD_POWER_RESET: /* LVDSDisable(Output); break;*/ case RHD_POWER_SHUTDOWN: default: - LVDSDisable(Output); + LVTMADisable(Output); /* LVDSShutdown(Output); */ break; } @@ -500,8 +516,8 @@ RHDLVTMAInit(RHDPtr rhdPtr, CARD8 Type) RHDFUNC(rhdPtr); - /* Stop everything except LVDS at this time */ - if (Type != RHD_CONNECTOR_PANEL) { + /* Stop everything except LVDS and TMDS */ + if (Type != RHD_CONNECTOR_PANEL && Type != RHD_CONNECTOR_DVI) { xf86DrvMsg(rhdPtr->scrnIndex, X_ERROR, "%s: unhandled connector type:" " %d\n", __func__, Type); return NULL; @@ -520,15 +536,19 @@ RHDLVTMAInit(RHDPtr rhdPtr, CARD8 Type) Output->Id = RHD_OUTPUT_LVTMA; Output->Sense = NULL; + if (Type == RHD_CONNECTOR_DVI) { + Output->Mode = LVTMA_TMDSSet; + } else { + Output->Mode = LVTMA_LVDSSet; + } Output->ModeValid = LVDSModeValid; - Output->Mode = LVDSSet; - Output->Power = LVDSPower; + Output->Private = rhdLVDSInfoRetrieve(rhdPtr); + Output->Power = LVTMAPower; Output->Save = LVTMASave; Output->Restore = LVTMARestore; Output->Destroy = LVTMADestroy; - Output->Private = rhdLVDSInfoRetrieve(rhdPtr); return Output; } Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: http://de.yahoo.com/set -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org