LVDS and DP through i2c

Alex Deucher alexdeucher at gmail.com
Thu Dec 23 08:09:07 PST 2010


On Thu, Dec 23, 2010 at 2:25 AM, Kai-Uwe Behrmann <ku.b at gmx.de> wrote:
> Hello,
>
> I try to talk to LVDS and DP connected displays over the i2c bus. What works
> nicely for external DVI displays appears silent for the internal one and DP.
> Any pointer what could be used or what shall be done to get a communication?
>
> example code for EDID fetching:
> /* 1. select i2c-dev node */
> const char * device_name = "/dev/i2c-0";
> /* 2. open device node */
> int fd = open( device_name, O_RDWR );
> /* 3. set adress */
> ioctl(fd, I2C_SLAVE, 0x50)
>
> /* 4. request desired block */
> usleep(50000);
> char bits[128] = {0};
> int ret = write( fd, &bits, 1 );
> if(ret == 1)
> {
>  /* 5. read data from node */
>  char data[128];
>  usleep(50000);
>  ret = read( fd, &data, 128 );
> }
>
> Already point 4 fails )-1) with a LVDS i2c node.
> The DP port returns arbitrary data in point 5.
>
> The DP is on a nvidia card, LVDS seems good on nvidia but not working on a
> evergreen.
>

For radeon, make sure you are using at least 2.6.34, as previous
kernels did not expose i2c buses properly due to missing pre/post_xfer
i2c bit algo hooks.  Next, make sure you are opening the correct i2c
bus.   On radeons, we expose all of the on board i2c buses.  In most
cases, each connector uses a different i2c bus and there are
additional buses for thermal chips and fan controllers, etc.  Finally,
not all oems implement an EDID for the laptop panels, or in some cases
the EDID image is stored in the vbios.  If you just want the EDID, you
can query that using randr or via sysfs.

Alex

>
> Why?
> libXcm[1] shall become capable of handling direct display communication for
> calibration (MCCS), identification (EEDID) and so on.
>
>
> kind regards
> Kai-Uwe Behrmann
> --
> developing for colour management www.behrmann.name + www.oyranos.org
>
>
> [1] http://www.oyranos.org/scm
> _______________________________________________
> xorg at lists.freedesktop.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: http://lists.freedesktop.org/mailman/listinfo/xorg
> Your subscription address: alexdeucher at gmail.com
>



More information about the xorg mailing list