xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 20 07:04:50 UTC 2022
randr/rrcrtc.c | 8 --------
1 file changed, 8 deletions(-)
New commits:
commit 972603845eda7e382451fcd31cd5083592f83ffd
Author: Olivier Fourdan <ofourdan at redhat.com>
Date: Fri Apr 15 13:51:11 2022 +0200
randr: No need to check RRGetOutputProperty() twice
The function rrGetPixmapSharingSyncProp() will check for the PRIME sync
property "PRIME Synchronization" on each output and return false if
any of the output has this property set to false.
To do so, it will call RRGetOutputProperty() twice for each output, once
with pending true and once with pending false to cover both
possibilities.
However, reading the implementation of RRGetOutputProperty(), it appears
that if the property is not pending, the code will return the current
value even if invoked with pending true.
So the second call to RRGetOutputProperty() with pending false seems
superfluous.
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
Fixes: df8e86931e - randr: Add ability to turn PRIME sync off
Reviewed-by: Alex Goins <agoins at nvidia.com>
Tested-by: Alex Goins <agoins at nvidia.com>
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 3a9b620ab..cf66f8ef9 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -461,20 +461,12 @@ rrGetPixmapSharingSyncProp(int numOutputs, RROutputPtr * outputs)
for (o = 0; o < numOutputs; o++) {
RRPropertyValuePtr val;
- /* Try pending value first, then current value */
if ((val = RRGetOutputProperty(outputs[o], syncProp, TRUE)) &&
val->data) {
if (!(*(char *) val->data))
return FALSE;
continue;
}
-
- if ((val = RRGetOutputProperty(outputs[o], syncProp, FALSE)) &&
- val->data) {
- if (!(*(char *) val->data))
- return FALSE;
- continue;
- }
}
return TRUE;
More information about the xorg-commit
mailing list