[xrandr] Only use the current information when setting modes
Mark Kettenis
mark.kettenis at xs4all.nl
Sun Sep 13 04:08:11 PDT 2015
> 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?
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?
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> xrandr.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/xrandr.c b/xrandr.c
> index 181c76e..dcfdde0 100644
> --- a/xrandr.c
> +++ b/xrandr.c
> @@ -3325,7 +3325,7 @@ main (int argc, char **argv)
> {
> umode_t *m;
>
> - get_screen (current);
> + get_screen (True);
> get_crtcs();
> get_outputs();
>
> @@ -3374,7 +3374,7 @@ main (int argc, char **argv)
> {
> output_t *output;
>
> - get_screen (current);
> + get_screen (True);
> get_crtcs();
> get_outputs();
>
> @@ -3465,7 +3465,7 @@ main (int argc, char **argv)
> if (!has_1_4)
> fatal ("--setprovideroutputsource requires RandR 1.4\n");
>
> - get_screen (current);
> + get_screen (True);
> get_providers ();
>
> provider = find_provider (&provider_name);
> @@ -3480,7 +3480,7 @@ main (int argc, char **argv)
> if (!has_1_4)
> fatal ("--setprovideroffloadsink requires RandR 1.4\n");
>
> - get_screen (current);
> + get_screen (True);
> get_providers ();
>
> provider = find_provider (&provider_name);
> @@ -3490,7 +3490,7 @@ main (int argc, char **argv)
> }
> if (setit_1_2)
> {
> - get_screen (current);
> + get_screen (True);
> get_crtcs ();
> get_outputs ();
> set_positions ();
> @@ -3589,7 +3589,7 @@ main (int argc, char **argv)
> exit(0);
> }
>
> - get_screen(current);
> + get_screen(True);
> get_monitors(True);
> get_crtcs();
> get_outputs();
> --
> 2.5.1
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>
>
More information about the xorg-devel
mailing list