Viktor Novotný
2012-Jan-18 13:28 UTC
[Nouveau] [PATCH] drm/nouveau/i2c: Fix i2c initialization on cards with DCB older than 1.5
Signed-off-by: Viktor Novotny <noviktor at seznam.cz> --- Hi, I think I found a bug - my NV11 fails to init i2c ports and is then unable to read EDID. It's because while i2c_table in nouveau_i2c.c:324 returns null for this card, i2c is initialized anyway at line 341 and wrong i2c table format is then selected at line 350. This patch fixes the problem on NV11 and was tested also on NV25. I hope no cards but those with legacy i2c table have i2c table version set to 0. Regards Viktor drivers/gpu/drm/nouveau/nouveau_i2c.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.c b/drivers/gpu/drm/nouveau/nouveau_i2c.c index 820ae7f..57bcbc3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_i2c.c +++ b/drivers/gpu/drm/nouveau/nouveau_i2c.c @@ -344,14 +344,15 @@ nouveau_i2c_init(struct drm_device *dev) if (i2c[5]) legacy[0][1] = i2c[5]; if (i2c[6]) legacy[1][0] = i2c[6]; if (i2c[7]) legacy[1][1] = i2c[7]; + version = 0; } - if (i2c && version >= 0x30) { + if (version >= 0x30) { entry = i2c[1] + i2c; entries = i2c[2]; recordlen = i2c[3]; } else - if (i2c) { + if (version > 0) { entry = i2c; entries = 16; recordlen = 4; -- 1.7.8.3
Viktor Novotný
2012-Feb-03 22:58 UTC
[Nouveau] [PATCH] drm/nouveau/i2c: Fix i2c initialization on cards with DCB older than 1.5
Hi, did anybody find time to look into this issue? By the way, I think it was introduced by commit 486a45c2. Regards Viktor On 18.1.2012 14:28, Viktor Novotn? wrote:> Signed-off-by: Viktor Novotny<noviktor at seznam.cz> > --- > Hi, > I think I found a bug - my NV11 fails to init i2c ports and is then unable to read EDID. > It's because while i2c_table in nouveau_i2c.c:324 returns null for this card, > i2c is initialized anyway at line 341 and wrong i2c table format is then selected at line 350. > This patch fixes the problem on NV11 and was tested also on NV25. I hope no cards but those > with legacy i2c table have i2c table version set to 0. >
Reasonably Related Threads
- [RFC] nouveau: Add basic i2c sensor chip support
- [PATCH 2/7] drm/nouveau: do a better job at hiding the NIH i2c bit-banging algo
- [PATCH 4/5] drm/nouveau: Grab RPM ref when i2c bus is in use
- [PATCH 4/5] drm/nouveau: Grab RPM ref when i2c bus is in use
- [PATCH] drm/nouveau: fix nouveau_i2c_find bounds checking