How to retrieve graphic card driver display mode in dual/multi-monitor setup?

Ping Cheng pinglinux at gmail.com
Sun Feb 14 13:36:41 PST 2010


I am working on an input (Wacom) device driver which offers end users
the ability to map the device (digitizer) to a particular screen under
dual- or multi-monitor setup.

We currently support Xinerama and TwinView (both the old single
desktop and the new Xineram-like way). For Xinerama setup, we can
retrieve the screen info (the number of screens as well as the
individual origins and max X/Y) without problem.  But we have to force
end users to add the specific TwinView mode (leftOf, rightOf, AboveOf,
Belowof, and Xinerama) plus the resolutions/metamodes of each screen
for the Wacom InputDevice section in xorg.conf so the driver knows
which display mode and the size of  each screen it is dealing with.

As the hotplugging feature becoming stablized in XOrg, xorg.conf would
soon rarely be used. We want to retrieve video driver's display info
while Wacom driver is running. We also want to support RandR on the
fly, which we have never supported before.

So, my questions are:

1.  What is the proper way to retrieve TwinView's display mode and
metamodes inside an (input) device driver?

2.  What is the proper way to retrieve RandR display mode (extended,
clone, rotate...) and screen resolutions inside a device driver?  Is
there any difference in retrieving those info between RandR 1.2 and
1.3?

Please reply to me no matter you have a full answer, a partial answer,
or even a request for clarification of the question(s).

Ping


More information about the xorg-devel mailing list