[xrandr] Only use the current information when setting modes

Chris Wilson chris at chris-wilson.co.uk
Sun Sep 13 04:14:57 PDT 2015


On Sun, Sep 13, 2015 at 01:08:11PM +0200, Mark Kettenis wrote:
> > From: Chris Wilson <chris at chris-wilson.co.uk>
> > Date: Sun, 13 Sep 2015 11:40:37 +0100
> > 
> > Before we change the state (e.g. adding a mode or applying one to an
> > output), we query the screen resources for the right identifiers. This
> > should only use the current information rather than force a reprobe on
> > all hardware - not only can that reprobe be very slow (e.g. EDID
> > timeouts on the order of seconds), but it may perturb the setup that the
> > user is trying to configure.
> 
> How do you guarantee that that cached information isn't stale?

There is no issue in that, since the user parameters are against the
output from a previous run. If the configuration is stale then so are
the xrandr parameters.
 
> Seems you already can get the behaviour you want by specifying
> --current.  Whereas there is no convenient way to force a probe, other
> than an explicit query?

And there should not be. On KMS platforms regeneration of the RR
information is driven by hotplug events (either generated by the hw
itself or by a kernel worker emulating the notifications otherwise). An
explicit probe by the user should be the means of last resort not the
default.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the xorg-devel mailing list