diff options
author | Shaohua Li <shaohua.li@intel.com> | 2009-11-18 02:15:02 -0500 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-11-30 19:10:56 -0500 |
commit | 29874f44fbcbc24b231b42c9956f8f9de9407231 (patch) | |
tree | 22532ad33c5f265bc728e5e21a8175ce0f81f126 /drivers/gpu/drm/i915/intel_crt.c | |
parent | d271817baecbccb47da0d9f28c285a0dae8a06b7 (diff) |
drm/i915: fix gpio register detection logic for BIOS without VBT
if no VBT is present, crt_ddc_bus will be left at 0, and cause us
to use that for the GPIO register offset. That's never a valid register
offset, so let the "undefined" value be 0 instead of -1.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
[anholt: clarified the commit message a bit]
Diffstat (limited to 'drivers/gpu/drm/i915/intel_crt.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_crt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index 0864a2c4085..477a61c5402 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c | |||
@@ -526,7 +526,7 @@ void intel_crt_init(struct drm_device *dev) | |||
526 | else { | 526 | else { |
527 | i2c_reg = GPIOA; | 527 | i2c_reg = GPIOA; |
528 | /* Use VBT information for CRT DDC if available */ | 528 | /* Use VBT information for CRT DDC if available */ |
529 | if (dev_priv->crt_ddc_bus != -1) | 529 | if (dev_priv->crt_ddc_bus != 0) |
530 | i2c_reg = dev_priv->crt_ddc_bus; | 530 | i2c_reg = dev_priv->crt_ddc_bus; |
531 | } | 531 | } |
532 | intel_output->ddc_bus = intel_i2c_create(dev, i2c_reg, "CRTDDC_A"); | 532 | intel_output->ddc_bus = intel_i2c_create(dev, i2c_reg, "CRTDDC_A"); |