]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/i2c: handle bit-banging ourselves
authorBen Skeggs <bskeggs@redhat.com>
Wed, 21 Dec 2011 08:09:12 +0000 (18:09 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 21 Dec 2011 09:01:41 +0000 (19:01 +1000)
commit860ac8613fc76a905909fc47ab897ec25c06d783
tree113aab2ad223825d67f79d0e19c6cb96522db098
parent9b552b30dd63bb3d3bb13b11546e2345cf6a71cb
drm/nouveau/i2c: handle bit-banging ourselves

i2c-algo-bit doesn't actually work very well on one card I have access to
(NVS 300), random single-bit errors occur most of the time - what we're
doing now is closer to what xf86i2c.c does.

The original plan was to figure out why i2c-algo-bit fails on the NVS 300,
and fix it.  However, while investigating I discovered i2c-algo-bit calls
cond_resched(), which makes it a bad idea for us to be using as we execute
VBIOS scripts from a tasklet, and there may very well be i2c transfers as
a result.

So, since I already wrote this code in userspace to track down the NVS 300
bug, and it's not really much code - lets use it.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_i2c.c
drivers/gpu/drm/nouveau/nouveau_i2c.h