[Intel-gfx] i2c issue

ykzhao yakui.zhao at intel.com
Fri Sep 25 03:50:43 CEST 2009


On Fri, 2009-09-25 at 00:52 +0800, Eric Anholt wrote:
> I was looking at the mac mini patch queued to stable.  There are some
> issues with how we're handling i2c bus setups.  Right now, it looks
> like
> both CRT and SDVO will create an i2c bus for GPIOA.  Most of the
> driver
> stuff is protected by our mutex, so two things won't hit the bus at
> the
> same time, but there's also /sys/class/i2c-dev/*, which I expect we'll
> see people making tools for at some point.  If we've got multiple i2c
> devs using the same bus, then synchronization won't happen properly
> for
> access through that interface, which doesn't take our mutex (but does
> take an i2c mutex afaik)
Yes. Both CRT and SDVO will create an i2c bus for the same DDC. And
there is no sync between the two i2c bus. When it is accessed by using
different interface, maybe the conflict will happen. 


In fact this issue also exists between the SDVO-B/SDVO-C. They share the
same GPIOE DDC bus. At the same time we also create another bogus i2c
bus for every SDVO device, which is used to get the EDID of external
monitors.This bogus i2c bus also uses the GPIOE DDC bus.

If we expect to return a pointer for the previous created i2c bus, maybe
we should use the list to record every created i2c DDC bus. 
But another issue appears. how to judge whether an i2c DDC is already
created? Is it ok to compare the i2c reg base address? 

thanks.
   Yakui




More information about the Intel-gfx mailing list