Getting the i2c interface from randr

Richard Hughes hughsient at gmail.com
Mon Jul 5 00:57:08 PDT 2010


I'm trying to do two things:

* Control the brightness of the external panel using DDC/CI
* Update the pre and post LUTs on a 30bit external panel, using i2c

I fully appreciate that different monitors have different quirks for
the i2c command interface. Some of these can be auto-detected and
worked around, some of these need quirks as they are horribly broken
(and I'm planning to pretty much ignore this hardware for now).

I wanted to avoid putting yet more i2c code in X or in drm, as it's
quite a bit of privileged code doing fairly scary stuff with the
hardware, I just want to write a tiny shim library to be able to send
a few limited commands to the ic2 interface for the given output.

And herein lies my problem. We don't know which i2c ports correspond
to which X RandR output. I assume the kernel knows, but that
information isn't shared with X. From the documentation I've been able
to scrape together, OSX has APIs were the display server just points a
program at an i2c interface name, and the userspace does the i2c
command stream as and when required.

Of course, if you guys think this better belongs in the kernel with
the other i2c bits, that would probably also be sane (but quite a bit
of work to deal with the quirks). Comments?

Thanks,

Richard.


More information about the xorg-devel mailing list