[Mesa-dev] [RFC PATCH] Add ability to use libXrandr for OML_sync_control

Eric Anholt eric at anholt.net
Tue Sep 20 15:02:19 PDT 2011

On Tue, 20 Sep 2011 15:37:20 -0400, Matt Turner <mattst88 at gmail.com> wrote:
> One more nail in the coffin of XF86VidMode.
> Signed-off-by: Matt Turner <mattst88 at gmail.com>
> ---
> I'm not sure how to test this, but the translation from XF86VidMode
> Xrandr seems to be pretty straightforward. Almost certainly there's
> something wrong with it, as this is the first client-side X programming
> I've done, and I'm specifically unsure about
> 	- checking for the appropriate Xrandr version.
> 	  XRRGetScreenResourcesCurrent is a 1.3 function. It's not totally
> 	  clear to me what the difference between it and XRRGetScreenResources
> 	  is. (These aren't documented in the man page)
> 	- How do I know the current mode? resource->modes[0] can't be right.

From randrproto.txt on RRGetScreenResources:
	This request explicitly asks the server to ensure that the
	configuration data is up-to-date wrt the hardware. If that requires
	polling, this is when such polling would take place.  If the
	current configuration is all that's required, use
	RRGetScreenResourcesCurrent instead.

where by "polling" it means "asking for ddc, or turning the screen
purple to do load-based connection detection, or other awful things".
You really want to call RRGetScreenResourcesCurrent when available and
you're not the application that's configuring the outputs itself.

Not sure about the validity of the patch in general -- haven't put any
thought into the multihead issues involved.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110920/aeaec877/attachment.pgp>

More information about the mesa-dev mailing list