summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* XQuartz: Build the bundle trampoline when using mesonJeremy Huddleston Sequoia2022-06-262-1/+11
| | | | | | | This brings the change for e1fdc856aedfcb4788011415930a0c6861df5123 into meson based builds Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit b00cf4aef881e00533f995c141c3586749cd7ca1)
* meson: Support building Xnest and Xorg on darwinJeremy Huddleston Sequoia2022-06-262-5/+3
| | | | | Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit ef8101560eefd6160df6d4b57ddb65ea2328c441)
* tests: Fix build failure from missing micmap.cJeremy Huddleston Sequoia2022-06-261-0/+2
| | | | | | | | | | | | | | | | | | | FAILED: test/tests clang -o test/tests test/tests.p/.._mi_miinitext.c.o test/tests.p/fixes.c.o test/tests.p/input.c.o test/tests.p/list.c.o test/tests.p/misc.c.o test/tests.p/signal-logging.c.o test/tests.p/string.c.o test/tests.p/test_xkb.c.o test/tests.p/tests-common.c.o test/tests.p/tests.c.o test/tests.p/touch.c.o test/tests.p/xfree86.c.o test/tests.p/xtest.c.o test/tests.p/hashtabletest.c.o -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -fvisibility=hidden -O0 -g3 -gdwarf-2 -mmacosx-version-min=10.9 -Werror=unguarded-availability-new -Werror=format -Werror=objc-method-access -Werror=incompatible-pointer-types -F/Applications/Utilities/XQuartz.app/Contents/Frameworks -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk -arch x86_64 -O0 -g3 -gdwarf-2 -mmacosx-version-min=10.9 -Werror=unguarded-availability-new -Werror=format -Werror=objc-method-access -Werror=incompatible-pointer-types -F/Applications/Utilities/XQuartz.app/Contents/Frameworks -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk -arch x86_64 -Wl,-rpath,/opt/X11/lib mi/liblibxserver_mi.a dix/liblibxserver_dix.a composite/liblibxserver_composite.a damageext/liblibxserver_damageext.a dbe/liblibxserver_dbe.a randr/liblibxserver_randr.a miext/damage/liblibxserver_miext_damage.a render/liblibxserver_render.a present/liblibxserver_present.a Xext/liblibxserver_xext.a miext/sync/liblibxserver_miext_sync.a xfixes/liblibxserver_xfixes.a Xi/liblibxserver_xi.a xkb/liblibxserver_xkb.a record/liblibxserver_record.a os/liblibxserver_os.a os/liblibxlibc.a glx/liblibglxvnd.a hw/xfree86/common/libxorg_common.a hw/xfree86/loader/libxorg_loader.a hw/xfree86/ddc/libxorg_ddc.a hw/xfree86/xkb/libxorg_xkb.a hw/xfree86/i2c/libxorg_i2c.a hw/xfree86/modes/libxorg_modes.a hw/xfree86/os-support/libxorg_os_support.a hw/xfree86/parser/libxorg_parser.a hw/xfree86/ramdac/libxorg_ramdac.a fb/liblibxserver_fb.a Xext/liblibxserver_xext_vidmode.a dix/liblibxserver_main.a config/liblibxserver_config.a /opt/X11/lib/libpixman-1.dylib /opt/X11/lib/libxcvt.dylib /opt/X11/lib/libxkbfile.dylib /opt/X11/lib/libXfont2.dylib /opt/X11/lib/libXdmcp.dylib -lm /opt/X11/lib/libxshmfence.dylib -ldl -lpthread /opt/X11/lib/libXau.dylib /opt/X11/lib/libGL.dylib Undefined symbols for architecture x86_64: "_micmapScrPrivateKeyRec", referenced from: _DGAInstallCmap in libxorg_common.a(xf86DGA.c.o) _xf86HandleColormaps in libxorg_common.a(xf86cmap.c.o) _CMapInstallColormap in libxorg_common.a(xf86cmap.c.o) _CMapEnterVT in libxorg_common.a(xf86cmap.c.o) _CMapSwitchMode in libxorg_common.a(xf86cmap.c.o) _CMapSetDGAMode in libxorg_common.a(xf86cmap.c.o) _CMapChangeGamma in libxorg_common.a(xf86cmap.c.o) ... ld: symbol(s) not found for architecture x86_64 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit 6645ff59069d603806d749e8af73893cf88d2c06)
* xf86-input-inputtest: Fix build on systems without SOCK_NONBLOCKJeremy Huddleston Sequoia2022-06-261-0/+12
| | | | | Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit 707f23dab8787b4154011186206dc9964e2ebc11)
* print_edid: Fix a format string errorJeremy Huddleston Sequoia2022-06-261-1/+1
| | | | | | | | | ../hw/xfree86/ddc/print_edid.c:511:20: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] det_mon->type - DS_VENDOR); ^~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit 199b8c0853c92ce19a589186f326621477401b74)
* xquartz: Update autotools-based builds of XQuartz to account for recent changesJeremy Huddleston Sequoia2022-06-213-5/+5
| | | | Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* Revert "meson: Bump requirement to meson-0.50.0"Jeremy Huddleston Sequoia2022-06-201-1/+1
| | | | | | | | This bump is causing issues with our CI. Sorry about that. This reverts commit a6a20a7c40f86b5586286aaa614e6b64a5987d82 (cherry picked from commit 8cd0397e5b4c1f0e0add1fea67f82b811214bf3e)
* meson: Provide options to set CFBundleVersion and CFBundleVersionString in ↵Jeremy Huddleston Sequoia2022-06-192-2/+17
| | | | | | | XQuartz Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit 4f5999826aa478ba5f138e74cfccdf3b854c8e54)
* xquartz: Update copyright for 2022Jeremy Huddleston Sequoia2022-06-191-2/+2
| | | | | Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit b12f5dc62d964d0279e1fa9403259cfd8e491285)
* xquartz: Update Sparkle configuration to use SUPublicEDKeyJeremy Huddleston Sequoia2022-06-194-3/+7
| | | | | Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit 1d90bef30c4dfe13dd5e70fea606a02380cbcee6)
* meson: Bump requirement to meson-0.50.0Jeremy Huddleston Sequoia2022-06-191-1/+1
| | | | | | | | WARNING: Project specifies a minimum meson_version '>= 0.47.0' but uses features which were added in newer versions: * 0.50.0: {'install arg in configure_file'} Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit 0a27f96d1d0e474b308be982fa7069d3ae0d9892)
* XQuartz: Ensure scroll events are delivered to a single window (not both X11 ↵Jeremy Huddleston Sequoia2022-06-161-3/+7
| | | | | | | | and AppKit) Fixes: https://github.com/XQuartz/XQuartz/issues/130 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit 4532b696c644cb7f21e96cf76d3e6b21ccc0e309)
* xquartz: Fold spaces related preferences into NSUserDefaults+XQuartzDefaultsJeremy Huddleston Sequoia2022-06-143-22/+44
| | | | | Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit f40610e0b4f2b4ae54ef6bbff756cb4a60e17e3b)
* xquartz pbproxy: Adopt NSUserDefaults+XQuartzDefaults for preferencesJeremy Huddleston Sequoia2022-06-143-77/+12
| | | | | Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit 6134c73aebc3f928639e8f802be49ec8ecc17e66)
* xquartz: Create a separate category for organizing user preferencesJeremy Huddleston Sequoia2022-06-148-578/+284
| | | | | Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit 963ba6d9adf578ec8d7ed12ae22dece76b895172)
* os/connection: Improve abstraction for launchd secure socketsJeremy Huddleston Sequoia2022-06-141-5/+26
| | | | | | | | | | | | This changes away from hard-coding the /tmp/launch-* path to now supporting a generic <absolute path to unix socket>[.<screen>] format for $DISPLAY. cf-libxcb: d978a4f69b30b630f28d07f1003cf290284d24d8 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> CC: Adam Jackson <ajax@kemper.freedesktop.org> (cherry picked from commit 83d0d911069d502232d719882cd1c5cd090defa1)
* X11Application: Ensure TIS operations are done on the main threadJeremy Huddleston Sequoia2022-06-141-2/+11
| | | | | | Fixes: https://github.com/XQuartz/XQuartz/issues/205 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit b1afcecc61d841f95e786e4f4f84184f91d149f1)
* rootless: Dead code removal (ROOTLESS_REDISPLAY_DELAY is already defined)Jeremy Huddleston Sequoia2022-06-141-5/+0
| | | | | Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit c11b55f3c0c64645bca964aece825de0bdd92b1f)
* render: Fix build with gcc 12Olivier Fourdan2022-01-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The xserver fails to compile with the latest gcc 12: render/picture.c: In function ‘CreateSolidPicture’: render/picture.c:874:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[16]’ [-Werror=array-bounds] 874 | pPicture->pSourcePict->type = SourcePictTypeSolidFill; | ^~ render/picture.c:868:45: note: object of size 16 allocated by ‘malloc’ 868 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ render/picture.c: In function ‘CreateLinearGradientPicture’: render/picture.c:906:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds] 906 | pPicture->pSourcePict->linear.type = SourcePictTypeLinear; | ^~ render/picture.c:899:45: note: object of size 32 allocated by ‘malloc’ 899 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ render/picture.c: In function ‘CreateConicalGradientPicture’: render/picture.c:989:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds] 989 | pPicture->pSourcePict->conical.type = SourcePictTypeConical; | ^~ render/picture.c:982:45: note: object of size 32 allocated by ‘malloc’ 982 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors ninja: build stopped: subcommand failed. This is because gcc 12 has become stricter and raises a warning now. Fix the warning/error by allocating enough memory to store the union struct. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Acked-by: Michel Dänzer <mdaenzer@redhat.com> Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1256 (cherry picked from commit c6b0dcb82d4db07a2f32c09a8c09c85a5f57248e)
* present: Check for NULL to prevent crashBłażej Szczygieł2022-01-191-0/+6
| | | | | | | Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1275 Signed-off-by: Błażej Szczygieł <spaz16@wp.pl> Tested-by: Aaron Plattner <aplattner@nvidia.com> (cherry picked from commit 22d5818851967408bb7c903cb345b7ca8766094c)
* xserver 21.1.3xorg-server-21.1.3Povilas Kanapickas2022-01-032-4/+4
| | | | Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
* glx/dri: Filter out fbconfigs that don't have a supported pixmap formatAdam Jackson2022-01-011-0/+20
| | | | | | | | | | | For depth 30 in particular it's not uncommon for the DDX to not have a configured pixmap format. Since the client expects to back both GLXPixmaps and GLXPbuffers with X Pixmaps, trying to use an x2rgb10 fbconfig would fail along various paths to CreatePixmap. Filter these fbconfigs out so the client can't ask for something that we know won't work. (cherry picked from commit f6c070a1ac05801c52ae60efb7dc4b3142653b7d)
* xf86/logind: fix missing call to vtenter if the platform device is not pausedJocelyn Falempe2021-12-201-4/+13
| | | | | | | | | | | | | | | | | | If there is one platform device, which is not paused nor resumed, systemd_logind_vtenter() will never get called. This break suspend/resume, and switching to VT on system with Nvidia proprietary driver. This is a regression introduced by f5bd039633fa83 So now call systemd_logind_vtenter() if there are no paused platform devices. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1271 Fixes: f5bd0396 - xf86/logind: fix call systemd_logind_vtenter after receiving drm device resume Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Tested-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* xf86/logind: Fix compilation error when built without logind/platform busJocelyn Falempe2021-12-203-15/+14
| | | | | | | | | | This was introduced by commit 8eb1396d Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1269 Fixes: da9d012a9 - xf86/logind: Fix drm_drop_master before vt_reldisp Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* Convert more funcs to use InternalEvent.Matthieu Herrb2021-12-193-29/+30
| | | | | | | | | | | | This fixes a crash when a DeviceEvent struct converted to InteralEvent was beeing copied as InternalEvent (and thus causing out of bounds reads) in ActivateGrabNoDelivery() in events.c: 3876 *grabinfo->sync.event = *real_event; Possible fix for https://gitlab.freedesktop.org/xorg/xserver/-/issues/1253 Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> (cherry picked from commit 5b8817a019845e1066c373022133985a0e2d718f)
* os: Try to discover the current seat with the XDG_SEAT var firstnerdopolis2021-12-191-0/+1
| | | | (cherry picked from commit ca1dfdc9aa4b548de624d3a9af5147a998ba3d79)
* xserver 21.1.2xorg-server-21.1.2Povilas Kanapickas2021-12-152-4/+4
| | | | Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
* hw/xfree86: fix sbus build for SPARCSam James2021-12-152-1/+5
| | | | | | | | | | | | | | | | Initially reported downstream in Gentoo. Manifests with errors like: ``` gnu/bin/ld: hw/xfree86/common/libxorg_common.a(xf86fbBus.c.o): in function `xf86ClaimFbSlot': xf86fbBus.c:(.text+0x20): undefined reference to `sbusSlotClaimed' /usr/lib/gcc/sparc-unknown-linux-gnu/11.2.0/../../../../sparc-unknown-linux-gnu/bin/ld: xf86fbBus.c:(.text+0x2c): undefined reference to `sbusSlotClaimed' ``` While we use the headers in meson.build, we don't reference xf86sbusBus.c which defines the missing symbols like sbusSlotClaimed. Bug: https://bugs.gentoo.org/828513 Signed-off-by: Sam James <sam@gentoo.org> (cherry picked from commit 6c1a1fcc4bff90546ebc954f428c6df97005ea50)
* render: Fix out of bounds access in SProcRenderCompositeGlyphs()Povilas Kanapickas2021-12-151-0/+9
| | | | | | | | | | ZDI-CAN-14192, CVE-2021-4008 This vulnerability was discovered and the fix was suggested by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Povilas Kanapickas <povilas@radix.lt> (cherry picked from commit ebce7e2d80e7c80e1dda60f2f0bc886f1106ba60)
* Xext: Fix out of bounds access in SProcScreenSaverSuspend()Povilas Kanapickas2021-12-151-1/+1
| | | | | | | | | | ZDI-CAN-14951, CVE-2021-4010 This vulnerability was discovered and the fix was suggested by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Povilas Kanapickas <povilas@radix.lt> (cherry picked from commit 6c4c53010772e3cb4cb8acd54950c8eec9c00d21)
* xfixes: Fix out of bounds access in *ProcXFixesCreatePointerBarrier()Povilas Kanapickas2021-12-151-2/+4
| | | | | | | | | | ZDI-CAN-14950, CVE-2021-4009 This vulnerability was discovered and the fix was suggested by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Povilas Kanapickas <povilas@radix.lt> (cherry picked from commit b5196750099ae6ae582e1f46bd0a6dad29550e02)
* record: Fix out of bounds access in SwapCreateRegister()Povilas Kanapickas2021-12-151-2/+2
| | | | | | | | | | ZDI-CAN-14952, CVE-2021-4011 This vulnerability was discovered and the fix was suggested by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Povilas Kanapickas <povilas@radix.lt> (cherry picked from commit e56f61c79fc3cee26d83cda0f84ae56d5979f768)
* remove the PRE_RELEASE message.Matthieu Herrb2021-12-151-13/+0
| | | | | | | | With the new numbering scheme, XORG_VERISON_SNAP doesn't mean a pre-release version anymore. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> (cherry picked from commit 4de9666b6d3c86660d728ddfc13d88700e5ff20d)
* test: #undef NDEBUG so assert is not compiled awayMatt Turner2021-12-1024-0/+72
| | | | (cherry picked from commit d189102c783653a10931051175de24277a157331)
* meson: Correctly set DDXOSVERRORF and DDXBEFORERESET on xwinPovilas Kanapickas2021-12-041-0/+2
| | | | | | | This worked with autotools, but not meson build system. Signed-off-by: Povilas Kanapickas <povilas@radix.lt> (cherry picked from commit 04c93b98e9e4593aa2e6701bb08f5e27c3544d8a)
* glamor: fix free of uninitialised pointersJonathan Gray2021-12-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Attempting to run fvwm on a x61/965gm with xserver 1.21.1 with the modesetting driver on OpenBSD/amd64 would cause the xserver to reliably crash. I tracked this down to the free() calls introduced in 2906ee5e4a722138cccb3265a615da7705a52589 (d1ca47e1242b51c79cec7287f52c36c8e494706b in branch). clang also warns about this: glamor_program.c:296:13: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:290:9: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:288:9: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:277:13: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:296:13: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:290:9: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:288:9: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:277:13: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> Fixes: 2906ee5e4 ("glamor: Fix leak in glamor_build_program()") (cherry picked from commit 5ac6319776b13f96a2b336da4b35237618a5b001)
* xkb: fix XkbSetMap check for the keytypes countPeter Hutterer2021-12-041-7/+6
| | | | | | | | | | | | The previous if/else condition resulted in us always setting the key type count to the current number of key types. Split this up correctly. Regression introduced in de940e06f8733d87bbb857aef85d830053442cfe Fixes #1249 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit be16bd8543f80ad2933ec9c37f082617c7084165)
* Revert "hw/xfree86: Propagate physical dimensions from DRM connector"Povilas Kanapickas2021-12-033-28/+14
| | | | | | | | | | | | | | | | | Quite a lot of applications currently expect the screen DPI exposed by the X server to be 96 even when the real display DPI is different. Additionally, currently Xwayland completely ignores any hardware information and sets the DPI to 96. Accordingly the new behavior, even if it fixes a bug, should not be enabled automatically to all users. A better solution would be to make the default DPI stay as is and enable the correct behavior with a command line option (maybe -dpi auto, or similar). For now let's just revert the bug fix. This reverts commit 05b3c681ea2f478c0cb941c2f8279919cf78de6d. Signed-off-by: Povilas Kanapickas <povilas@radix.lt> (cherry picked from commit 35af1299e73483eaf93d913a960e1d1738bc7de6)
* dri2: add crocus to the list of va_gl usersDave Airlie2021-12-031-1/+2
| | | | (cherry picked from commit a7b0a7fabd137183cc42a5edb15697e354c4450c)
* xf86/logind: Fix drm_drop_master before vt_reldispJocelyn Falempe2021-12-033-0/+27
| | | | | | | | | | | | | | | | | | When switching to VT, the ioctl DRM_DROP_MASTER must be done before the ioctl VT_RELDISP. Otherwise the kernel can't change the modesetting reliably, and this leads to the console not showing up in some cases, like after unplugging a docking station with a DP or HDMI monitor. Before doing the VT_RELDISP, send a dbus message to logind, to pause the drm device, so logind will do the ioctl DRM_DROP_MASTER. With this patch, it changes the order logind will send the resume event, and drm will be sent last instead of first. so there is a also fix to call systemd_logind_vtenter() at the right time. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> (cherry picked from commit da9d012a9c760896941769d4127e3cfb1a7a9f03)
* xf86/logind: fix call systemd_logind_vtenter after receiving drm device resumeJocelyn Falempe2021-12-031-4/+6
| | | | | | | | | | | | | | logind send the resume event for input devices and drm device, in any order. if we call vt_enter before logind resume the drm device, it leads to a driver error, because logind has not done the DRM_IOCTL_SET_MASTER on it. Keep the old workaround to make sure we call systemd_logind_vtenter at least once if there are no platform device Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> (cherry picked from commit f5bd039633fa8360a10bd2aabb0111571f6275b0)
* xfree86: On Linux, while only seat0 can have TTYs, don't assmume all seat0s ↵nerdopolis2021-11-233-2/+21
| | | | | | have TTYs (cherry picked from commit b8c12aac651d626c5120e6e8e18b42e7528caf43)
* xserver 21.1.1xorg-server-21.1.1Povilas Kanapickas2021-11-072-4/+4
| | | | Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
* Makefile.am: Add missing meson build files to release tarballPovilas Kanapickas2021-11-062-1/+14
|
* Make xf86CompatOutput() return NULL when there are no privatesMatthieu Herrb2021-11-061-0/+3
| | | | | | | Some drivers (mach64 w/o DRI for instance) don't initialize privates. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> (cherry picked from commit 80eeff3ebac772e25c9107199989e677457dbe06)
* s/__/@/ in inputtestdrv manpageJon Turney2021-11-061-3/+3
| | | | | | Update manpage subsitution style for 2e497bf8 (cherry picked from commit 0099412ea4347b02e61ea21946f309f2535cc07b)
* xserver 21.1xorg-server-21.1.0Povilas Kanapickas2021-10-272-5/+5
| | | | Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
* Fix RandR leasing for more than 1 simultaneously active lease.Mario Kleiner2021-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to a switched order of parameters in the xorg_list_add() call inside ProcRRCreateLease(), adding a new lease for RandR output leasing does not actually add the new RRLeasePtr lease record to the list of existing leases for a X-Screen, but instead replaces the existing list with a new list that has the new lease as the only element, and probably leaks a bit of memory. Therefore the server "forgets" all active leases for a screen, except for the last added lease. If multiple leases are created in a session, then destruction of all leases but the last one will fail in many cases, e.g., during server shutdown in RRCloseScreen(), or resource destruction, e.g., in RRCrtcDestroyResource(). Most importantly, it fails if a client simply close(fd)'es the DRM master descriptor to release a lease, quits, gets killed or crashes. In this case the kernel will destroy the lease and shut down the display output, then send a lease event via udev to the ddx, which e.g., in the modesetting-ddx will trigger a call to drmmode_validate_leases(). That function is supposed to detect the released lease and tell the server to terminate the lease on the server side as well, via xf86CrtcLeaseTerminated(), but this doesn't happen for all the leases the server has forgotten. The end result is a dead video output, as the server won't reinitialize the crtc's corresponding to the terminated but forgotten lease. This bug was observed when using the amdvlk AMD OSS Vulkan driver and trying to lease multiple VKDisplay's, and also under Mesa radv, as both Mesa Vulkan/WSI/Display and amdvlk terminate leases by simply close()ing the lease fd, not by sending explicit RandR protocol requests to free leases. Leasing worked, but ending a session with multiple active leases ended in a lot of unpleasant darkness. Fixing the wrong argument order to xorg_list_add() fixes the problem. Tested on single-X-Screen and dual-X-Screen setups, with one, two or three active leases. Please merge this for the upcoming server 21.1 branch. Merging into server 1.20 would also make a lot of sense. Fixes: e4e3447603b5fd3a38a92c3f972396d1f81168ad Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Cc: Keith Packard <keithp@keithp.com> (cherry picked from commit f467f85ca1f780d5c7cf3c20888e399708d761ac)
* xserver 21.1 RC 2xorg-server-21.0.99.902Povilas Kanapickas2021-10-142-4/+4
|
* dix/privates.c: Avoid undefined behaviour after realloc()Alex Richardson2021-10-081-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Adding the offset between the realloc result and the old allocation to update pointers into the new allocation is undefined behaviour: the old pointers are no longer valid after realloc() according to the C standard. While this works on almost all architectures and compilers, it causes problems on architectures that track pointer bounds (e.g. CHERI or Arm's Morello): the DevPrivateKey pointers will still have the bounds of the previous allocation and therefore any dereference will result in a run-time trap. I found this due to a crash (dereferencing an invalid capability) while trying to run `XVnc` on a CHERI-RISC-V system. With this commit I can successfully connect to the XVnc instance running inside a QEMU with a VNC viewer on my host. This also changes the check whether the allocation was moved to use uintptr_t instead of a pointer since according to the C standard: "The value of a pointer becomes indeterminate when the object it points to (or just past) reaches the end of its lifetime." Casting to an integer type avoids this undefined behaviour. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> (cherry picked from commit f9f705bf3cf0d169d54a70f235cc99e106dbda43)