Cleaning up VRR and making it Xinerama aware
Enrico Weigelt, metux IT consult
info at metux.net
Mon Jul 22 15:46:35 UTC 2024
Hello folks,
I just like you all to know, I've done some cleanups in the VRR
signaling and making it (partially) Xinerama aware.
Background:
We don't have any standard protocol for clients signaling whether VRR
should be enabled, yet. Some time ago, driver folks began doing some
ad-hoc hacks via a magic window property. The basic idea: if the
property _VARIABLE_REFRESH is set to 1, the driver will enable VRR on
the screen that the window is on. The implementation is done by
highjacking the X_ChangeProperty and X_DeleteProperty core request
vectors from within the drivers.
This approach has several drawbacks:
a) it's vendor specific, and properties aren't the best fit (should be
in some suitable extension)
b) it's not Xinerama-aware: only works if the window is on screen 0
c) highjacking request vectors fragile: if several drivers doing this,
and hotplug is involved, things could easily get mixed up, if the
plugging/unplugging doens't happen in the right order
Since several drivers, as well as mesa, now implementing this, we should
keep the status quo, at least until there's some official standard.
But the other points can be fixed w/o breaking anything.
Therefore I've gone the following path:
* add the notion of VRR mode (for now just disabled/enabled) and a new
(optional) Screen proc for sending VRR mode changes to the DDX/driver
* catch the property changes directly in DIX, moving this away from the
drivers
* if Xinerama is active, push the signal down to the slave screens
* update in-tree modsetting driver to support the new API
It's not entirely perfect yet, eg. not yet catching whether a window
is moved from one screen to another and automatically switch it around
on the old/new screens. Leaving this for later excersise.
Merge request:
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1616
have fun,
--mtx
--
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info at metux.net -- +49-151-27565287
More information about the xorg-devel
mailing list