client side ddc/ci

Alex Deucher alexdeucher at gmail.com
Wed Dec 2 07:52:02 PST 2009


On Wed, Dec 2, 2009 at 4:39 AM, Kai-Uwe Behrmann <ku.b at gmx.de> wrote:
> Am 02.12.09, 10:17 +0100 schrieb Xavier Bestel:
>> On Wed, 2009-12-02 at 19:07 +1000, Dave Airlie wrote:
>>>> how would one talk with a monitor over DDC/CI on a user side, non root
>>>> application. I would like to do monitor gamma curves I/O, EDID polling and
>>>> other non standard communication.
>>>>
>>>> The /dev/i2c-xxx device nodes are root access only on my system. I can
>>>> chmod them with o+rw, but thats shurely not the general solution.
>>>>
>>>> What is a good place to start with in Xorg?
>>>>
>>>> I have seen the ddc/XF64DDC.[h,c] and i2c/xf86i2c.[h,c] modules in the
>>>> server. Is already one of those APIs exposed?
>>>>
>>>> As I understand, the root windows or xrandr output EDID atom is a one time
>>>> thing and too static for my needs.
>>>>
>>>
>>> You'd need to add protocol for the client side apps to talk to the X server,.
>>>
>>> you could possibly do this with xrandr properties or extending xrandr,
>>> then drivers would have to talk to the i2c via X i2c or kernel i2c in kms case.
>>
>> Have a look at http://ddccontrol.sourceforge.net/ for a working
>> implementation that bypasses the X server (although as says Dave, going
>> through Xrandr looks like the right thing to do).
>
> ddccontrol uses /dev/i2c-xxx, so the problem of non root access remains
> with that library. Otherwise it seems very fine.

One problem with /dev/i2c-xxx, at least on radeon, is that the gpio
lines need to be masked and unmasked for sw use before and after an
i2c transaction.  The driver takes care of this internally when doing
i2c, but it's not done if you use the /dev interface.  I plan to add a
radeon i2c algo that takes care of this but I haven't gotten around to
it yet.

Alex



More information about the xorg mailing list