xserver/hw/xfree86/drivers/modesetting
Mario Kleiner ab86be0ed9 modesetting: Fix VRR window property handling.
A misplaced error check can cause this failure scenario, and does
so reliably as tested on Ubuntu 21.04 with KDE Plasma 5 desktop
within the first few seconds of login session startup, rendering
VRR under modesetting-ddx unusable:

1. Some X11 client application changes some window property.

2. ms_change_property() is called as part of the property change
   handling call chain (client->requestVector[X_ChangeProperty]).
   It removes itself temporarily from the call chain - or so it
   thinks, hooking up saved_change_property instead.

3. ret = saved_change_property(client) is called and fails
   temporarily for some non-critical reason.

4. The misplaced error check returns early (error abort), without
   first restoring ms_change_property() as initial X_ChangeProperty
   handler in the call chain again.

-> Now ms_change_property() has removed itself permanently from the
   property handler call chain for the remainder of the X session
   and VRR property changes on windows are no longer handled, ie.
   VRR no longer gets enabled/disabled in response to window VRR
   property changes.

Place the error check at the proper place, just as it is correctly
done by amdgpu-ddx, and in modesetting-ddx ms_delete_property()
function.

Verified to fix VRR handling with an AMD gpu under KDE desktop
session.

Please consider merging before branching the server 1.21 branch.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2021-08-27 18:26:59 +00:00
..
Makefile.am modesetting: Fix broken manpage in autoconf build 2019-10-04 10:29:23 +02:00
dri2.c modesetting: Remove few common functions from ms namespace 2021-04-16 10:53:43 +00:00
driver.c modesetting: Fix VRR window property handling. 2021-08-27 18:26:59 +00:00
driver.h modesetting: Remove few common functions from ms namespace 2021-04-16 10:53:43 +00:00
drmmode_display.c modesetting: Defer crtc gamma size upgrade to drmmode_setup_colormap 2021-04-05 14:25:33 -07:00
drmmode_display.h modesetting: Add missing copyright notices 2020-11-25 04:28:42 +00:00
dumb_bo.c modesetting: Include dix-config.h from dumb_bo.c 2015-05-12 08:02:11 -07:00
dumb_bo.h modesetting: Drop dumb_bo::map_count field and dead unmap code. 2014-12-11 11:26:19 -08:00
meson.build xfree86: Link fb statically 2019-07-23 14:24:00 -04:00
modesetting.man modesetting: Use GAMMA_LUT when available 2020-10-29 15:13:17 -07:00
pageflip.c modesetting: Add a limit on async page flip error log frequency 2021-06-15 12:53:33 +03:00
present.c modesetting: unflip not possible when glamor is not set 2021-07-22 13:24:21 +02:00
vblank.c modesetting: Remove few common functions from ms namespace 2021-04-16 10:53:43 +00:00