diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-03-26 03:18:40 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-03-26 04:36:07 -0400 |
commit | 59365671464539dc695bbf4d4bf37aabfd8604f2 (patch) | |
tree | f4db0448c489db9ec50b01b1be5a91108d8de546 /drivers/gpu | |
parent | c8435362f2211086b34ce871fa9c3fcc7ca79ff9 (diff) |
drm/nouveau/i2c: fix thinko/regression on really old chipsets
Fixes i2c on my TNT2.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_i2c.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.c b/drivers/gpu/drm/nouveau/nouveau_i2c.c index 8f4f914d9eab..e2be95af2e52 100644 --- a/drivers/gpu/drm/nouveau/nouveau_i2c.c +++ b/drivers/gpu/drm/nouveau/nouveau_i2c.c | |||
@@ -315,8 +315,8 @@ nouveau_i2c_init(struct drm_device *dev) | |||
315 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 315 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
316 | struct nvbios *bios = &dev_priv->vbios; | 316 | struct nvbios *bios = &dev_priv->vbios; |
317 | struct nouveau_i2c_chan *port; | 317 | struct nouveau_i2c_chan *port; |
318 | u8 version = 0x00, entries, recordlen; | ||
318 | u8 *i2c, *entry, legacy[2][4] = {}; | 319 | u8 *i2c, *entry, legacy[2][4] = {}; |
319 | u8 version, entries, recordlen; | ||
320 | int ret, i; | 320 | int ret, i; |
321 | 321 | ||
322 | INIT_LIST_HEAD(&dev_priv->i2c_ports); | 322 | INIT_LIST_HEAD(&dev_priv->i2c_ports); |
@@ -346,12 +346,12 @@ nouveau_i2c_init(struct drm_device *dev) | |||
346 | if (i2c[7]) legacy[1][1] = i2c[7]; | 346 | if (i2c[7]) legacy[1][1] = i2c[7]; |
347 | } | 347 | } |
348 | 348 | ||
349 | if (i2c && version >= 0x30) { | 349 | if (version >= 0x30) { |
350 | entry = i2c[1] + i2c; | 350 | entry = i2c[1] + i2c; |
351 | entries = i2c[2]; | 351 | entries = i2c[2]; |
352 | recordlen = i2c[3]; | 352 | recordlen = i2c[3]; |
353 | } else | 353 | } else |
354 | if (i2c) { | 354 | if (version) { |
355 | entry = i2c; | 355 | entry = i2c; |
356 | entries = 16; | 356 | entries = 16; |
357 | recordlen = 4; | 357 | recordlen = 4; |