summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-05-09 16:35:40 +1000
committerDave Airlie <airlied@linux.ie>2006-06-02 10:02:50 +1000
commit10420e96beb6e07736f699297e6b17975223890b (patch)
tree891e2e51c1f39e00d1d28f1597f90a5b3cb7855f
parent5926c88044c8c0e4e5f4055460ffada6fc0701f8 (diff)
add some set target input
-rw-r--r--src/i830_sdvo.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 2725e2bf..00ee6295 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -132,12 +132,14 @@ I830SDVOSetControlBusSwitch(I830SDVOPtr s, CARD8 target)
Bool
-I830SDVOWriteCommand10(I830SDVOPtr s)
+I830SDVOSetTargetInput(I830SDVOPtr s, Bool target_1, Bool target_2)
{
/* write out 0x10 */
memset(s->sdvo_regs, 0, 9);
- s->sdvo_regs[SDVO_I2C_OPCODE] = 0x10;
+ s->sdvo_regs[SDVO_I2C_OPCODE] = SDVO_CMD_SET_TARGET_INPUT;
+ // s->sdvo_regs[SDVO_I2C_ARG_0] = target_1;
+ // s->sdvo_regs[SDVO_I2C_ARG_1] = target_2;
I830SDVOWriteOutputs(s, 0);
@@ -474,7 +476,7 @@ I830SDVOPreSetMode(I830SDVOPtr s, DisplayModePtr mode)
out_timings[4] = c17a[5] | ((short)c17a[4] << 8);
out_timings[5] = c17a[3] | ((short)c17a[2] << 8);
- I830SDVOWriteCommand10(s);
+ I830SDVOSetTargetInput(s, TRUE, TRUE);
I830SDVOWriteCommand1D(s, clock, height);
I830SDVOWriteCommand04(s, 0);
@@ -486,27 +488,27 @@ I830SDVOPreSetMode(I830SDVOPtr s, DisplayModePtr mode)
I830SDVOWriteCommand11(s);
I830SDVOWriteCommand17(s, out_timings[3], out_timings[4],out_timings[5]);
- I830SDVOWriteCommand10(s);
+ I830SDVOSetTargetInput(s, TRUE, TRUE);
I830SDVOWriteCommand1A(s, clock, width, height);
- I830SDVOWriteCommand10(s);
+ I830SDVOSetTargetInput(s, TRUE, TRUE);
I830SDVOWriteCommand1B(s);
I830SDVOParseResponse1B(s);
- I830SDVOWriteCommand10(s);
+ I830SDVOSetTargetInput(s, TRUE, TRUE);
I830SDVOWriteCommand1C(s, clock, out_timings[0], out_timings[1], out_timings[2]);
I830SDVOParseResponse1C(s);
- I830SDVOWriteCommand10(s);
+ I830SDVOSetTargetInput(s, TRUE, TRUE);
I830SDVOWriteCommand14(s, clock, curr_table[0], curr_table[1], curr_table[2]);
- I830SDVOWriteCommand10(s);
+ I830SDVOSetTargetInput(s, TRUE, TRUE);
I830SDVOWriteCommand15(s, curr_table[3], curr_table[4], out_timings[5]);
- I830SDVOWriteCommand10(s);
+ I830SDVOSetTargetInput(s, TRUE, TRUE);
if (mode->PrivFlags & I830_MFLAG_DOUBLE)
I830SDVOSetClockRateMult(s, 0x02);
else
@@ -538,7 +540,7 @@ I830SDVOPostSetMode(I830SDVOPtr s, DisplayModePtr mode)
I830SDVOWriteCommand04(s, 1);
I830SDVOWriteCommand05(s, 1);
- I830SDVOWriteCommand10(s);
+ I830SDVOSetTargetInput(s, TRUE, TRUE);
I830SDVOWriteCommand1D(s, clock, height);
return ret;