diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-28 18:34:44 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-28 18:34:44 -0400 |
commit | f573c66061184ce28196a22229b6214256ceacd8 (patch) | |
tree | 91f47116c4b64145cf4031ec84f4f2418cb23087 | |
parent | a8ed0b16a924a59b56906e83d6c033a04a9818f6 (diff) |
drm/i915/dvo: Fix panel and DDC i2c pins
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | drivers/gpu/drm/i915/intel_dvo.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c index 561fbc34cec8..ea373283c93b 100644 --- a/drivers/gpu/drm/i915/intel_dvo.c +++ b/drivers/gpu/drm/i915/intel_dvo.c | |||
@@ -81,7 +81,6 @@ struct intel_dvo { | |||
81 | struct intel_encoder base; | 81 | struct intel_encoder base; |
82 | 82 | ||
83 | struct intel_dvo_device dev; | 83 | struct intel_dvo_device dev; |
84 | int ddc_bus; | ||
85 | 84 | ||
86 | struct drm_display_mode *panel_fixed_mode; | 85 | struct drm_display_mode *panel_fixed_mode; |
87 | bool panel_wants_dither; | 86 | bool panel_wants_dither; |
@@ -245,7 +244,7 @@ static int intel_dvo_get_modes(struct drm_connector *connector) | |||
245 | * that's not the case. | 244 | * that's not the case. |
246 | */ | 245 | */ |
247 | intel_ddc_get_modes(connector, | 246 | intel_ddc_get_modes(connector, |
248 | &dev_priv->gmbus[intel_dvo->ddc_bus].adapter); | 247 | &dev_priv->gmbus[GMBUS_PORT_DPC].adapter); |
249 | if (!list_empty(&connector->probed_modes)) | 248 | if (!list_empty(&connector->probed_modes)) |
250 | return 1; | 249 | return 1; |
251 | 250 | ||
@@ -349,7 +348,6 @@ void intel_dvo_init(struct drm_device *dev) | |||
349 | struct intel_encoder *intel_encoder; | 348 | struct intel_encoder *intel_encoder; |
350 | struct intel_dvo *intel_dvo; | 349 | struct intel_dvo *intel_dvo; |
351 | struct intel_connector *intel_connector; | 350 | struct intel_connector *intel_connector; |
352 | int ret = 0; | ||
353 | int i; | 351 | int i; |
354 | int encoder_type = DRM_MODE_ENCODER_NONE; | 352 | int encoder_type = DRM_MODE_ENCODER_NONE; |
355 | 353 | ||
@@ -367,9 +365,6 @@ void intel_dvo_init(struct drm_device *dev) | |||
367 | drm_encoder_init(dev, &intel_encoder->base, | 365 | drm_encoder_init(dev, &intel_encoder->base, |
368 | &intel_dvo_enc_funcs, encoder_type); | 366 | &intel_dvo_enc_funcs, encoder_type); |
369 | 367 | ||
370 | /* Set up the DDC bus */ | ||
371 | intel_dvo->ddc_bus = GMBUS_PORT_DPB; | ||
372 | |||
373 | /* Now, try to find a controller */ | 368 | /* Now, try to find a controller */ |
374 | for (i = 0; i < ARRAY_SIZE(intel_dvo_devices); i++) { | 369 | for (i = 0; i < ARRAY_SIZE(intel_dvo_devices); i++) { |
375 | struct drm_connector *connector = &intel_connector->base; | 370 | struct drm_connector *connector = &intel_connector->base; |
@@ -384,7 +379,7 @@ void intel_dvo_init(struct drm_device *dev) | |||
384 | if (dvo->gpio != 0) | 379 | if (dvo->gpio != 0) |
385 | gpio = dvo->gpio; | 380 | gpio = dvo->gpio; |
386 | else if (dvo->type == INTEL_DVO_CHIP_LVDS) | 381 | else if (dvo->type == INTEL_DVO_CHIP_LVDS) |
387 | gpio = GMBUS_PORT_PANEL; | 382 | gpio = GMBUS_PORT_SSC; |
388 | else | 383 | else |
389 | gpio = GMBUS_PORT_DPB; | 384 | gpio = GMBUS_PORT_DPB; |
390 | 385 | ||
@@ -395,8 +390,7 @@ void intel_dvo_init(struct drm_device *dev) | |||
395 | i2c = &dev_priv->gmbus[gpio].adapter; | 390 | i2c = &dev_priv->gmbus[gpio].adapter; |
396 | 391 | ||
397 | intel_dvo->dev = *dvo; | 392 | intel_dvo->dev = *dvo; |
398 | ret = dvo->dev_ops->init(&intel_dvo->dev, i2c); | 393 | if (!dvo->dev_ops->init(&intel_dvo->dev, i2c)) |
399 | if (!ret) | ||
400 | continue; | 394 | continue; |
401 | 395 | ||
402 | intel_encoder->type = INTEL_OUTPUT_DVO; | 396 | intel_encoder->type = INTEL_OUTPUT_DVO; |