summaryrefslogtreecommitdiff
path: root/src/i830_sdvo.c
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2009-02-13 10:09:42 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2009-02-13 10:09:42 +0800
commitddedf19f889da2ce6d69a3afce4665e2245682fa (patch)
tree4ad0c6ef5b23e022ae50ffa61074b3d90b016f6a /src/i830_sdvo.c
parentf1ca56e17d0ecd4f1299061a6b3272bfd289e123 (diff)
SDVO: Switch control bus only before DDC access
Instead of set control bus switch before every i2c start, just set once before doing DDC. This should eliminate some encoders returning error during that.
Diffstat (limited to 'src/i830_sdvo.c')
-rw-r--r--src/i830_sdvo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 80662519..4b98a9ba 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1377,9 +1377,7 @@ i830_sdvo_ddc_i2c_start(I2CBusPtr b, int timeout)
xf86OutputPtr output = b->DriverPrivate.ptr;
I830OutputPrivatePtr intel_output = output->driver_private;
I2CBusPtr i2cbus = intel_output->pI2CBus;
- struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
- i830_sdvo_set_control_bus_switch(output, dev_priv->ddc_bus);
return i2cbus->I2CStart(i2cbus, timeout);
}
@@ -1566,9 +1564,11 @@ i830_sdvo_get_ddc_modes(xf86OutputPtr output)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
DisplayModePtr modes = NULL;
xf86OutputPtr crt;
- I830OutputPrivatePtr intel_output;
+ I830OutputPrivatePtr intel_output = output->driver_private;
xf86MonPtr edid_mon = NULL;
- struct i830_sdvo_priv *dev_priv;
+ struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
+
+ i830_sdvo_set_control_bus_switch(output, dev_priv->ddc_bus);
modes = i830_ddc_get_modes(output);
if (modes != NULL)