diff options
author | Francisco Jerez <currojerez@riseup.net> | 2010-06-19 07:54:48 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-07-12 20:13:06 -0400 |
commit | 3af76454a70cd09d8e3ede94ee50a35c772ba439 (patch) | |
tree | 7303371d780613819b5617a569edcb8cef8b9073 | |
parent | 190a43783f2c43186180c827444d4eac901b4bcf (diff) |
drm/nouveau: Ignore broken legacy I2C entries.
The nv05 card in the bug report [1] doesn't have usable I2C port
register offsets (they're all filled with zeros). Ignore them and use
the defaults.
[1] http://bugs.launchpad.net/bugs/569505
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bios.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 9ab0c83fe9be..ed0f5303850d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c | |||
@@ -5167,10 +5167,14 @@ static int parse_bmp_structure(struct drm_device *dev, struct nvbios *bios, unsi | |||
5167 | bios->legacy.i2c_indices.crt = bios->data[legacy_i2c_offset]; | 5167 | bios->legacy.i2c_indices.crt = bios->data[legacy_i2c_offset]; |
5168 | bios->legacy.i2c_indices.tv = bios->data[legacy_i2c_offset + 1]; | 5168 | bios->legacy.i2c_indices.tv = bios->data[legacy_i2c_offset + 1]; |
5169 | bios->legacy.i2c_indices.panel = bios->data[legacy_i2c_offset + 2]; | 5169 | bios->legacy.i2c_indices.panel = bios->data[legacy_i2c_offset + 2]; |
5170 | bios->dcb.i2c[0].write = bios->data[legacy_i2c_offset + 4]; | 5170 | if (bios->data[legacy_i2c_offset + 4]) |
5171 | bios->dcb.i2c[0].read = bios->data[legacy_i2c_offset + 5]; | 5171 | bios->dcb.i2c[0].write = bios->data[legacy_i2c_offset + 4]; |
5172 | bios->dcb.i2c[1].write = bios->data[legacy_i2c_offset + 6]; | 5172 | if (bios->data[legacy_i2c_offset + 5]) |
5173 | bios->dcb.i2c[1].read = bios->data[legacy_i2c_offset + 7]; | 5173 | bios->dcb.i2c[0].read = bios->data[legacy_i2c_offset + 5]; |
5174 | if (bios->data[legacy_i2c_offset + 6]) | ||
5175 | bios->dcb.i2c[1].write = bios->data[legacy_i2c_offset + 6]; | ||
5176 | if (bios->data[legacy_i2c_offset + 7]) | ||
5177 | bios->dcb.i2c[1].read = bios->data[legacy_i2c_offset + 7]; | ||
5174 | 5178 | ||
5175 | if (bmplength > 74) { | 5179 | if (bmplength > 74) { |
5176 | bios->fmaxvco = ROM32(bmp[67]); | 5180 | bios->fmaxvco = ROM32(bmp[67]); |