diff options
Diffstat (limited to 'src/rhd_output.c')
-rw-r--r-- | src/rhd_output.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/rhd_output.c b/src/rhd_output.c index 0e33d4e..4a767aa 100644 --- a/src/rhd_output.c +++ b/src/rhd_output.c @@ -284,18 +284,18 @@ RHDOutputAttachConnector(struct rhdOutput *Output, struct rhdConnector *Connecto /* * Returns the TMDS index of the given output, important for HDMI/Audio setup */ int RHDOutputTmdsIndex(struct rhdOutput *Output) { - struct rhdOutput *i = RHDPTRI(Output)->Outputs; + RHDPtr rhdPtr = RHDPTRI(Output); + struct rhdOutput *i = rhdPtr->Outputs; int index; switch(Output->Id) { case RHD_OUTPUT_TMDSA: - case RHD_OUTPUT_UNIPHYA: index=0; break; case RHD_OUTPUT_LVTMA: /* special case check if an TMDSA is present */ index=0; @@ -303,15 +303,25 @@ RHDOutputTmdsIndex(struct rhdOutput *Output) if(i->Id==RHD_OUTPUT_TMDSA) index++; i = i->Next; } break; + case RHD_OUTPUT_UNIPHYA: case RHD_OUTPUT_UNIPHYB: + case RHD_OUTPUT_UNIPHYC: + case RHD_OUTPUT_UNIPHYD: + case RHD_OUTPUT_UNIPHYE: + case RHD_OUTPUT_UNIPHYF: case RHD_OUTPUT_KLDSKP_LVTMA: - index=1; + for(index=0; index<2; index++) + if(rhdPtr->DigEncoderOutput[index] == Output) + return index; + + xf86DrvMsg(Output->scrnIndex, X_ERROR, "%s: output not assigned to encoder\n", __func__); + index=-1; break; default: xf86DrvMsg(Output->scrnIndex, X_ERROR, "%s: unsupported output type\n", __func__); index=-1; break; |