Summary: | RANDR timestamps are not updated correctly | ||||||
---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Federico Mena-Quintero <federico> | ||||
Component: | Server/General | Assignee: | Xorg Project Team <xorg-team> | ||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||
Severity: | normal | ||||||
Priority: | medium | CC: | johannes.rudolph, keithp, Lukasz.Kurylo | ||||
Version: | git | ||||||
Hardware: | Other | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
i915 platform: | i915 features: | ||||||
Attachments: |
|
Description
Federico Mena-Quintero
2009-05-28 13:38:56 UTC
commit b810ce5a7608cb243d0bc452fb7e0d18683e699a Author: Keith Packard <keithp@keithp.com> Date: Thu May 28 14:43:27 2009 -0700 Make RANDR 'set' timestamps follow client specified time. Bug 21987. The lastSetTime value which indicates when the configuration within the server was last changed was not getting set in the appropriate RandR requests. Signed-off-by: Keith Packard <keithp@keithp.com> diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index 7b724ae..716cb30 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -990,6 +990,7 @@ ProcRRSetCrtcConfig (ClientPtr client) goto sendReply; } rep.status = RRSetConfigSuccess; + pScrPriv->lastSetTime = time; sendReply: if (outputs) @@ -999,7 +1000,7 @@ sendReply: /* rep.status has already been filled in */ rep.length = 0; rep.sequenceNumber = client->sequence; - rep.newTimestamp = pScrPriv->lastConfigTime.milliseconds; + rep.newTimestamp = pScrPriv->lastSetTime.milliseconds; if (client->swapped) { @@ -1149,6 +1150,8 @@ ProcRRSetPanning (ClientPtr client) if (! pScrPriv->rrSetPanning (pScreen, crtc, &total, &tracking, border)) return BadMatch; + pScrPriv->lastSetTime = time; + rep.status = RRSetConfigSuccess; sendReply: diff --git a/randr/rrscreen.c b/randr/rrscreen.c index 94bf3ce..a7533c9 100644 --- a/randr/rrscreen.c +++ b/randr/rrscreen.c @@ -945,8 +945,10 @@ ProcRRSetScreenConfig (ClientPtr client) if (!RRCrtcSet (crtc, mode, 0, 0, stuff->rotation, 1, &output)) rep.status = RRSetConfigFailed; - else + else { + pScrPriv->lastSetTime = time; rep.status = RRSetConfigSuccess; + } /* * XXX Configure other crtcs to mirror as much as possible Created attachment 26298 [details] [review] 0001-Add-missing-fields-to-SRR-NotifyEvent.patch I found a couple of places where the "swap this event" functions were missing some fields. This patch fixes that. I turns out that my "first bug" and "third bug" were false alarms, sorry! I had an uninitialized variable in my code to print the timestamps. Keith's patch fixes the timestamps for me, and my patch is to fix the byte swapping functions. See https://bugzilla.redhat.com/show_bug.cgi?id=345551 for other weirdness with event fields. > --- Comment #4 from Federico Mena-Quintero <federico@ximian.com> 2009-05-29 21:25:02 PST ---
> See https://bugzilla.redhat.com/show_bug.cgi?id=345551 for other weirdness with
> event fields.
>
Fixed in libXrandr, commits f176b2bda103f6f38aabab8207f47a02cc797659 and
0fa7452220701ee44d8bafc57001e362afcedb0c.
patches applied to master and proposed for a 1.6 point release missed the commit button Thanks for commiting, Keith :) (In reply to comment #6) > patches applied to master and proposed for a 1.6 point release > Can this patch be related to my latest problems with xrandr commandline tool: xrandr --output VGA --auto xrandr: Configure crtc 0 invalid time Before this patch it was ok. Does xrandr tool needs fixing? It uses "CurrentTime" whatever it is. Regarding the comment of Lukasz: See the Ubuntu bug report https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/394490 about the issue for additional information. The strange thing is that grandr still works although it uses CurrentTime exactly as xrandr. (In reply to comment #10) > Regarding the comment of Lukasz: See the Ubuntu bug report > https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/394490 about the > issue for additional information. The strange thing is that grandr still works > although it uses CurrentTime exactly as xrandr. > xrandr 1.3.0 built from source works as expected. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.