commit 312a25c65c8a918fea2cc77abd0db07ec0fc421c Author: Olivier Fourdan Date: Mon Nov 24 16:42:01 2025 +0100 xserver 21.1.21 Signed-off-by: Olivier Fourdan Part-of: commit 75d6e5d20b2f732db336ca7f8904db05f10aeed9 Author: Olivier Fourdan Date: Wed Nov 19 16:24:19 2025 +0100 Revert "glamor: add glvnd_vendor private" This reverts commit a6145198bc1d4f535c3105f8352e420c7c59382f. We no longer need to store the glvnd vendor, so we can also drop that change. See-also: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1848 Part-of: commit 399177dc8cfab3409bf3bbeddbc2affddc2c370e Author: Olivier Fourdan Date: Wed Nov 19 16:24:11 2025 +0100 Revert "glamor: Lift the GLX EGL backend from Xwayland" This reverts commit ed1ec1350269fb91c2c276680d614653a021ee98. This reverts commit 3837159a3f6f3f8915c55e282ea545eed3f1dfdc. We no longer use GLX provider for glamor, so we can remove that code. See-also: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1848 Part-of: commit d9ea493a6020f26ae52b35393fbbbb33e5a1351d Author: Olivier Fourdan Date: Wed Nov 19 16:24:02 2025 +0100 Revert "xorg: initialize glamor provider" This reverts commit 0a1ee643b26fd53074ec90c95a14c12c8f5166b3. This is causing a number of regressions on existing setups: * Reverse PRIME with the NVIDIA proprietary driver, where software rendering is used instead of the NVIDIA GLX library with hardware acceleration * Performance issues with AMDGPU * Rendering with 10-bit output with AMDGPU Revert the change that is causing these regressions in the stable branch. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1848 Part-of: commit ff37280fd93fc74bada33c7a5683897d47565a75 Author: Olivier Fourdan Date: Wed Nov 19 16:23:53 2025 +0100 Revert "glamor_egl: add support of GlxVendorLibrary option" This reverts commit 062d39977094c89ef34168b78b9c9e9fc85483ff. There is an issue with this code in GLAMOR EGL and using this option in the "xorg.conf" would lead to a segmentation fault in the Xserver. Instead of fixing the code for that option in GLAMOR EGL, let's revert the commit in the stable branch, since we are to revert support for glamor GLX, this options will no longer be needed. See-also: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1848 See-also: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2096 Part-of: commit 0b079e12b2cec8025656a75b0422ba2ddc7653d4 Author: Olivier Fourdan Date: Wed Nov 19 16:23:46 2025 +0100 Revert "glamor: reject configs using unsupported rgbBits size" This reverts commit b89a563882f234f6949a874770d3ca075d2d2fdc. This is a fix for a code path that we are about to remove with the next few reverts, so start by reverting this change. See-also: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1848 Part-of: commit 065f02d946a798924a1d331769961b940cbf3224 Author: Olivier Fourdan Date: Tue Oct 28 17:38:55 2025 +0100 xserver 21.1.20 Quick release to fix the missing files in 21.1.19. Signed-off-by: Olivier Fourdan Part-of: commit 3362fec06a3720e6d255316961b023992d9a7a38 Author: Olivier Fourdan Date: Tue Oct 28 16:25:33 2025 +0100 tests: Add missing files to Makefile build The script comes from a backport where only meson is used and therefore the new files were omitted from the Makefile. As a result, these files are not included in the released tar file and the build fails. Fixes: 95b899118 - meson: add glamor gles2 tests Signed-off-by: Olivier Fourdan Part-of: commit a10c9018ff1e4136a5b727cded439cda4a834706 Author: Olivier Fourdan Date: Tue Oct 28 13:39:12 2025 +0100 xserver 21.1.19 Signed-off-by: Olivier Fourdan Part-of: commit 3baad99f9c15028ed8c3e3d8408e5ec35db155aa Author: Olivier Fourdan Date: Wed Sep 10 16:30:29 2025 +0200 xkb: Prevent overflow in XkbSetCompatMap() The XkbCompatMap structure stores its "num_si" and "size_si" fields using an unsigned short. However, the function _XkbSetCompatMap() will store the sum of the input data "firstSI" and "nSI" in both XkbCompatMap's "num_si" and "size_si" without first checking if the sum overflows the maximum unsigned short value, leading to a possible overflow. To avoid the issue, check whether the sum does not exceed the maximum unsigned short value, or return a "BadValue" error otherwise. CVE-2025-62231, ZDI-CAN-27560 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer (cherry picked from commit 475d9f49acd0e55bc0b089ed77f732ad18585470) Part-of: commit 87fe2553937a99fd914ad0cde999376a3adc3839 Author: Olivier Fourdan Date: Wed Sep 10 15:58:57 2025 +0200 xkb: Free the XKB resource when freeing XkbInterest XkbRemoveResourceClient() would free the XkbInterest data associated with the device, but not the resource associated with it. As a result, when the client terminates, the resource delete function gets called and accesses already freed memory: | Invalid read of size 8 | at 0x5BC0C0: XkbRemoveResourceClient (xkbEvents.c:1047) | by 0x5B3391: XkbClientGone (xkb.c:7094) | by 0x4DF138: doFreeResource (resource.c:890) | by 0x4DFB50: FreeClientResources (resource.c:1156) | by 0x4A9A59: CloseDownClient (dispatch.c:3550) | by 0x5E0A53: ClientReady (connection.c:601) | by 0x5E4FEF: ospoll_wait (ospoll.c:657) | by 0x5DC834: WaitForSomething (WaitFor.c:206) | by 0x4A1BA5: Dispatch (dispatch.c:491) | by 0x4B0070: dix_main (main.c:277) | by 0x4285E7: main (stubmain.c:34) | Address 0x1893e278 is 184 bytes inside a block of size 928 free'd | at 0x4842E43: free (vg_replace_malloc.c:989) | by 0x49C1A6: CloseDevice (devices.c:1067) | by 0x49C522: CloseOneDevice (devices.c:1193) | by 0x49C6E4: RemoveDevice (devices.c:1244) | by 0x5873D4: remove_master (xichangehierarchy.c:348) | by 0x587921: ProcXIChangeHierarchy (xichangehierarchy.c:504) | by 0x579BF1: ProcIDispatch (extinit.c:390) | by 0x4A1D85: Dispatch (dispatch.c:551) | by 0x4B0070: dix_main (main.c:277) | by 0x4285E7: main (stubmain.c:34) | Block was alloc'd at | at 0x48473F3: calloc (vg_replace_malloc.c:1675) | by 0x49A118: AddInputDevice (devices.c:262) | by 0x4A0E58: AllocDevicePair (devices.c:2846) | by 0x5866EE: add_master (xichangehierarchy.c:153) | by 0x5878C2: ProcXIChangeHierarchy (xichangehierarchy.c:493) | by 0x579BF1: ProcIDispatch (extinit.c:390) | by 0x4A1D85: Dispatch (dispatch.c:551) | by 0x4B0070: dix_main (main.c:277) | by 0x4285E7: main (stubmain.c:34) To avoid that issue, make sure to free the resources when freeing the device XkbInterest data. CVE-2025-62230, ZDI-CAN-27545 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer (cherry picked from commit 10c94238bdad17c11707e0bdaaa3a9cd54c504be) Part-of: commit 865089ca70840c0f13a61df135f7b44a9782a175 Author: Olivier Fourdan Date: Wed Sep 10 15:55:06 2025 +0200 xkb: Make the RT_XKBCLIENT resource private Currently, the resource in only available to the xkb.c source file. In preparation for the next commit, to be able to free the resources from XkbRemoveResourceClient(), make that variable private instead. This is related to: CVE-2025-62230, ZDI-CAN-27545 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer (cherry picked from commit 99790a2c9205a52fbbec01f21a92c9b7f4ed1d8f) Part-of: commit 554dfabfbc23c3e74997e09c13f5424a60daf9ee Author: Olivier Fourdan Date: Wed Jul 2 09:46:22 2025 +0200 present: Fix use-after-free in present_create_notifies() Using the Present extension, if an error occurs while processing and adding the notifications after presenting a pixmap, the function present_create_notifies() will clean up and remove the notifications it added. However, there are two different code paths that can lead to an error creating the notify, one being before the notify is being added to the list, and another one after the notify is added. When the error occurs before it's been added, it removes the elements up to the last added element, instead of the actual number of elements which were added. As a result, in case of error, as with an invalid window for example, it leaves a dangling pointer to the last element, leading to a use after free case later: | Invalid write of size 8 | at 0x5361D5: present_clear_window_notifies (present_notify.c:42) | by 0x534A56: present_destroy_window (present_screen.c:107) | by 0x41E441: xwl_destroy_window (xwayland-window.c:1959) | by 0x4F9EC9: compDestroyWindow (compwindow.c:622) | by 0x51EAC4: damageDestroyWindow (damage.c:1592) | by 0x4FDC29: DbeDestroyWindow (dbe.c:1291) | by 0x4EAC55: FreeWindowResources (window.c:1023) | by 0x4EAF59: DeleteWindow (window.c:1091) | by 0x4DE59A: doFreeResource (resource.c:890) | by 0x4DEFB2: FreeClientResources (resource.c:1156) | by 0x4A9AFB: CloseDownClient (dispatch.c:3567) | by 0x5DCC78: ClientReady (connection.c:603) | Address 0x16126200 is 16 bytes inside a block of size 2,048 free'd | at 0x4841E43: free (vg_replace_malloc.c:989) | by 0x5363DD: present_destroy_notifies (present_notify.c:111) | by 0x53638D: present_create_notifies (present_notify.c:100) | by 0x5368E9: proc_present_pixmap_common (present_request.c:164) | by 0x536A7D: proc_present_pixmap (present_request.c:189) | by 0x536FA9: proc_present_dispatch (present_request.c:337) | by 0x4A1E4E: Dispatch (dispatch.c:561) | by 0x4B00F1: dix_main (main.c:284) | by 0x42879D: main (stubmain.c:34) | Block was alloc'd at | at 0x48463F3: calloc (vg_replace_malloc.c:1675) | by 0x5362A1: present_create_notifies (present_notify.c:81) | by 0x5368E9: proc_present_pixmap_common (present_request.c:164) | by 0x536A7D: proc_present_pixmap (present_request.c:189) | by 0x536FA9: proc_present_dispatch (present_request.c:337) | by 0x4A1E4E: Dispatch (dispatch.c:561) | by 0x4B00F1: dix_main (main.c:284) | by 0x42879D: main (stubmain.c:34) To fix the issue, count and remove the actual number of notify elements added in case of error. CVE-2025-62229, ZDI-CAN-27238 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan (cherry picked from commit 5a4286b13f631b66c20f5bc8db7b68211dcbd1d0) Part-of: commit 68c186bf735ce45438dc6236352dcd121e4e81e1 Author: Alan Coopersmith Date: Sun Oct 12 14:04:53 2025 -0700 dix: avoid memory leak in ProcListProperties() Reported in #1817: xwayland-24.1.6/redhat-linux-build/../dix/property.c:584:5: warning[-Wanalyzer-malloc-leak]: leak of ‘pAtoms’ Can happen if, and only if, XaceHookPropertyAccess() blocks access to all properties, so that numProps ends up zero on the second loop. Fixes: 39f337fd4 ("dix: ProcListProperties: skip unneeded work if numProps is 0") Signed-off-by: Alan Coopersmith (cherry picked from commit ed92eae84d4a9e0985e1ac883089d4d68a679bb0) Part-of: commit 78368d1b23d439470f2291102f3122b133802581 Author: Alan Coopersmith Date: Sun Oct 12 09:48:15 2025 -0700 dix: handle allocation failure in ChangeWindowDeviceCursor() Reported in #1817: xwayland-24.1.6/redhat-linux-build/../dix/window.c:3495:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pNewNode’ xwayland-24.1.6/redhat-linux-build/../dix/window.c:3494:20: acquire_memory: this call could return NULL Fixes: 95e1a8805 ("Xi: Adding ChangeDeviceCursor request" in xorg 1.10.0) Signed-off-by: Alan Coopersmith (cherry picked from commit c9fa8a8da161e1c37058a342ba5495ce627d0985) Part-of: commit 236e712ffbfdf36fd873e248949cf979478459cb Author: Alan Coopersmith Date: Sat Oct 11 18:26:55 2025 -0700 dix: assert that size of buffers to swap is a multiple of the swap size If we're swapping 4-byte integers or 2-byte integers, make sure the size of the buffer doesn't have any bytes left over, since we won't correctly handle those bytes. Reported in #1817: xwayland-24.1.6/redhat-linux-build/../dix/swaprep.c:99:22: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size xwayland-24.1.6/redhat-linux-build/../dix/swaprep.c:146:22: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size Signed-off-by: Alan Coopersmith (cherry picked from commit cf49354b6060b71ae41febe67327278fbcb7c74a) Part-of: commit 4a562d37764bf96e02626fef8f63d19c9c380582 Author: Alan Coopersmith Date: Sat Oct 11 16:16:12 2025 -0700 dix: avoid null dereference if wOtherInputMasks() returns NULL The wOtherInputMasks(win) macro will return NULL if win->optional is NULL. Reported in #1817: xwayland-24.1.6/redhat-linux-build/../dix/gestures.c:242:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘inputMasks’ xwayland-24.1.6/redhat-linux-build/../dix/touch.c:765:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘inputMasks’ xwayland-24.1.6/redhat-linux-build/../dix/touch.c:782:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘inputMasks’ Signed-off-by: Alan Coopersmith (cherry picked from commit 15496a5e3d5407a2b480d8c726b012455f7898bb) Part-of: commit 04321adc59165b5b0a92e061a58c4c64d2b17839 Author: Alan Coopersmith Date: Sat Oct 11 12:59:04 2025 -0700 dix: handle allocation failure in DeviceFocusEvent() Reported in #1817: xwayland-24.1.6/redhat-linux-build/../dix/enterleave.c:786:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xi2event’ Fixes: 3f37923a7 ("Xi: send XI2 focus events." in Xorg 1.10.0) Signed-off-by: Alan Coopersmith (cherry picked from commit dedceb52bcbba2431368b53acbbba490ac8ee485) Part-of: commit 757a0d03b4a5b56d61f23d8ffbf14b104c1d7e11 Author: Alan Coopersmith Date: Sun Oct 5 17:52:39 2025 -0700 Xi: handle allocation failure in add_master_func() Reported in #1817: xwayland-24.1.6/redhat-linux-build/../Xi/xibarriers.c:729:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘AllocBarrierDevice()’ Signed-off-by: Alan Coopersmith (cherry picked from commit 0ee603905387e00a2e3d83ead1de99ca61d641fb) Part-of: commit d31e4534a600e77e3408d57032239fda4420fa2c Author: Alan Coopersmith Date: Sun Oct 5 17:37:48 2025 -0700 Xi: handle allocation failure in ProcXListInputDevices() Reported in #1817: xwayland-24.1.6/redhat-linux-build/../Xi/listdev.c:171:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘dev’ xwayland-24.1.6/redhat-linux-build/../Xi/listdev.c:379:23: acquire_memory: this call could return NULL Signed-off-by: Alan Coopersmith (cherry picked from commit 19c6195e711d9f9fabbde1bea7a6393c4a4c3cd3) Part-of: commit fd6d04089c62dfbf00969053fb307718fbea386f Author: Alan Coopersmith Date: Sun Oct 5 17:32:45 2025 -0700 Xi: handle allocation failure in ProcXGetDeviceDontPropagateList() Reported in #1817: xwayland-24.1.6/redhat-linux-build/../Xi/getprop.c:163:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’ xwayland-24.1.6/redhat-linux-build/../Xi/getprop.c:121:19: acquire_memory: this call could return NULL Signed-off-by: Alan Coopersmith (cherry picked from commit 7b18313e2a9d0409ac7465d2f313153013fdf5a3) Part-of: commit 995fe28ebffb349e453a2586e48b441ac6d5c71c Author: Alan Coopersmith Date: Sun Oct 5 17:12:29 2025 -0700 Xi: set value for led_values in CopySwapKbdFeedback() (The existing setting of led_mask is probably wrong, but has been set like this since X11R5 and going back as far as the first version in the X Consortium source control archives.) Reported in #1817: xwayland-24.1.6/redhat-linux-build/../Xi/getfctl.c:108:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*k2.led_values’ 108|-> swapl(&k2->led_values); Signed-off-by: Alan Coopersmith (cherry picked from commit 90c8429d3509894f8834ead3b15f2e76657e57a6) Part-of: commit b171669dc0c94c07c87eae9e761ff2c520c3bab0 Author: Alan Coopersmith Date: Sun Oct 5 15:38:35 2025 -0700 Xi: avoid null dereference if wOtherInputMasks() returns NULL The wOtherInputMasks(win) macro will return NULL if win->optional is NULL. Reported in #1817: xwayland-24.1.6/redhat-linux-build/../Xi/exevents.c:1390:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xwayland-24.1.6/redhat-linux-build/../Xi/exevents.c:1404:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xwayland-24.1.6/redhat-linux-build/../Xi/exevents.c:2293:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xwayland-24.1.6/redhat-linux-build/../Xi/exevents.c:3244:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘inputMasks’ xwayland-24.1.6/redhat-linux-build/../Xi/exevents.c:3338:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ Signed-off-by: Alan Coopersmith (cherry picked from commit 7b7bcf92311db87a0292474dcf2ed9767f4a9abd) Part-of: commit d29339ed3f1b3688ed012f3ae4666e35d1a986d0 Author: Alan Coopersmith Date: Sat Oct 4 17:38:32 2025 -0700 Xext/xtest: avoid null dereference in ProcXTestFakeInput() Reported in #1817: xwayland-24.1.6/redhat-linux-build/../Xext/xtest.c:383:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dev’ xwayland-24.1.6/redhat-linux-build/../Xext/xtest.c:348:9: release_memory: ‘dev’ is NULL xwayland-24.1.6/redhat-linux-build/../Xext/xtest.c:383:14: danger: dereference of NULL ‘dev’ xwayland-24.1.6/redhat-linux-build/../Xext/xtest.c:395:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dev’ xwayland-24.1.6/redhat-linux-build/../Xext/xtest.c:348:9: release_memory: ‘dev’ is NULL xwayland-24.1.6/redhat-linux-build/../Xext/xtest.c:395:14: danger: dereference of NULL ‘dev’ xwayland-24.1.6/redhat-linux-build/../Xext/xtest.c:426:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dev’ xwayland-24.1.6/redhat-linux-build/../Xext /xtest.c:348:9: release_memory: ‘dev’ is NULL xwayland-24.1.6/redhat-linux-build/../Xext/xtest.c:426:14: danger: dereference of NULL ‘dev’ xwayland-24.1.6/redhat-linux-build/../Xext/xtest.c:440:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dev’ xwayland-24.1.6/redhat-linux-build/../Xext/xtest.c:348:9: release_memory: ‘dev’ is NULL xwayland-24.1.6/redhat-linux-build/../Xext/xtest.c:440:9: danger: dereference of NULL ‘dev’ Signed-off-by: Alan Coopersmith (cherry picked from commit 04ef51dae63dc9ef3d28f7d0b78b4504dbb01f66) Part-of: commit 0424d9e564d48961865ee1e7a29a2b1943c24fcb Author: Alan Coopersmith Date: Sat Oct 4 17:26:47 2025 -0700 Xext/xselinux: avoid memory leak in SELinuxAtomToSID() Reported in #1817: xwayland-24.1.6/redhat-linux-build/../Xext/xselinux_label.c:142:13: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xwayland-24.1.6/redhat-linux-build/../Xext/xselinux_label.c:133:1: enter_function: entry to ‘SELinuxAtomToSID’ xwayland-24.1.6/redhat-linux-build/../Xext/xselinux_label.c:141:15: acquire_memory: allocated here xwayland-24.1.6/redhat-linux-build/../Xext/xselinux_label.c:69:12: branch_true: following ‘true’ branch... xwayland-24.1.6/redhat-linux-build/../Xext/xselinux_label.c:142:13: danger: ‘rec’ leaks here; was allocated at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1) # 140| if (!rec) { # 141| rec = calloc(1, sizeof(SELinuxAtomRec)); # 142|-> if (!rec || !SELinuxArraySet(&arr_atoms, atom, rec)) # 143| return BadAlloc; # 144| } Signed-off-by: Alan Coopersmith (cherry picked from commit 21cbc56c43af04a72ee2d77023194f436027eb4d) Part-of: commit b51c6a8e3da9a33186f7d0f25d503dffa80886b2 Author: Alan Coopersmith Date: Sat Oct 4 17:19:05 2025 -0700 Xext/xselinux: add fast path to ProcSELinuxListSelections() If there's nothing to send, skip over a bunch of code to make a list that won't be used, and hopefully make the code path clearer to both humans and static analyzers, who raise errors as seen in #1817 of dereferencing NULL pointers when count == 0. Signed-off-by: Alan Coopersmith (cherry picked from commit d34243606c8d7a01108827ad1ca3216bf81a119d) Part-of: commit a39d4c3a303cb6170123a77aa8696d98706c28be Author: Alan Coopersmith Date: Sat Oct 4 17:10:20 2025 -0700 Xext/xres: avoid null dereference in ProcXResQueryClients() Reported in #1817: xwayland-24.1.6/redhat-linux-build/../Xext/xres.c:233:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘current_clients’ xwayland-24.1.6/redhat-linux-build/../Xext/xres.c:228:23: acquire_memory: this call could return NULL Signed-off-by: Alan Coopersmith (cherry picked from commit 3da60c96a9c3ea26404313eb490e46847b04949c) Part-of: commit 4f692b17f9b7d67c78321611d001400ac26c1b9a Author: Alan Coopersmith Date: Sat Oct 4 16:20:37 2025 -0700 Xext/vidmode: avoid null dereference if VidModeCreateMode() allocation fails Reported in #1817: xwayland-24.1.6/redhat-linux-build/../Xext/vidmode.c:96:5: warning[-Wanalyzer-null-argument]: use of NULL ‘VidModeCreateMode()’ where non-null expected Signed-off-by: Alan Coopersmith (cherry picked from commit 5e62aaaf57b18136969699fd073e123edfb1aa70) Part-of: commit 976ef43f95a372c7485ee51a7b1e07e13fbf972a Author: Alan Coopersmith Date: Sat Oct 4 16:04:50 2025 -0700 Xext/sync: Avoid dereference of invalid pointer if malloc() failed Reported incorrectly in #1817 as: xwayland-24.1.6/redhat-linux-build/../Xext/sync.c:2835:33: acquire_memory: allocated here xwayland-24.1.6/redhat-linux-build/../Xext/sync.c:2843:12: danger: ‘priv’ leaks here; was allocated at [(30)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/29) but the "leak" is really saving the pointer in an uninitalized pointer in a structure that was already freed when the malloc of the SysCounterInfo struct failed in SyncCreateSystemCounter(), because it returned the address of the freed struct instead of NULL to indicate failure. Signed-off-by: Alan Coopersmith (cherry picked from commit 6034ce11b6cd31d42df0f5781f70d3073d91f95b) Part-of: commit 9bad510a45ca4997b371e9c3bfa9be10e3a0ff51 Author: Alan Coopersmith Date: Sat Oct 4 15:40:22 2025 -0700 Xext/sync: avoid null dereference in init_system_idle_counter() Reported in #1817: xwayland-24.1.6/redhat-linux-build/../Xext/sync.c:2835:33: acquire_memory: this call could return NULL xwayland-24.1.6/redhat-linux-build/../Xext/sync.c:2837:28: danger: ‘priv’ could be NULL: unchecked value from [(30)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/29) # 2835| IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv)); # 2836| # 2837|-> priv->value_less = priv->value_greater = NULL; # 2838| priv->deviceid = deviceid; # 2839| Signed-off-by: Alan Coopersmith (cherry picked from commit 304d21854d349b21dd8deb8a8f319637f17bd4a8) Part-of: commit 7097560cfb2386e16782c37c1cbae77aa9650c58 Author: Alan Coopersmith Date: Sat Oct 4 15:26:19 2025 -0700 Xext/sync: avoid null dereference if SysCounterGetPrivate() returns NULL Reported in #1817: xwayland-24.1.6/redhat-linux-build/../Xext/sync.c:2664:9: danger: dereference of NULL ‘SysCounterGetPrivate(pCounter)’ # 2662| SyncCounter *counter = pCounter; # 2663| IdleCounterPriv *priv = SysCounterGetPrivate(counter); # 2664|-> deviceid = priv->deviceid; # 2665| } # 2666| else xwayland-24.1.6/redhat-linux-build/../Xext/sync.c:2677:14: danger: dereference of NULL ‘SysCounterGetPrivate(pCounter)’ # 2675| SyncCounter *counter = pCounter; # 2676| IdleCounterPriv *priv = SysCounterGetPrivate(counter); # 2677|-> int64_t *less = priv->value_less; # 2678| int64_t *greater = priv->value_greater; # 2679| int64_t idle, old_idle; xwayland-24.1.6/redhat-linux-build/../Xext/sync.c:2767:14: danger: dereference of NULL ‘SysCounterGetPrivate(pCounter)’ # 2765| SyncCounter *counter = pCounter; # 2766| IdleCounterPriv *priv = SysCounterGetPrivate(counter); # 2767|-> int64_t *less = priv->value_less; # 2768| int64_t *greater = priv->value_greater; # 2769| int64_t idle; xwayland-24.1.6/redhat-linux-build/../Xext/sync.c:2800:14: danger: dereference of NULL ‘SysCounterGetPrivate(pCounter)’ # 2798| SyncCounter *counter = pCounter; # 2799| IdleCounterPriv *priv = SysCounterGetPrivate(counter); # 2800|-> int64_t *less = priv->value_less; # 2801| int64_t *greater = priv->value_greater; # 2802| Bool registered = (less || greater); Signed-off-by: Alan Coopersmith (cherry picked from commit 0211de37b340eccfc0bad6a3ea13b27810b11a30) Part-of: commit 29efdcd67e34ff0b3d3233c1824d000bd4f0c96c Author: Alan Coopersmith Date: Sat Oct 4 12:18:49 2025 -0700 Xext/shm: avoid null dereference in ShmInitScreenPriv() Reported in #1817: xwayland-24.1.6/redhat-linux-build/../Xext/shm.c:213:23: acquire_memory: this call could return NULL xwayland-24.1.6/redhat-linux-build/../Xext/shm.c:214:9: danger: ‘screen_priv’ could be NULL: unchecked value from [(19)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/18) # 212| if (!screen_priv) { # 213| screen_priv = calloc(1, sizeof(ShmScrPrivateRec)); # 214|-> screen_priv->CloseScreen = pScreen->CloseScreen; # 215| dixSetPrivate(&pScreen->devPrivates, shmScrPrivateKey, screen_priv); # 216| pScreen->CloseScreen = ShmCloseScreen; Signed-off-by: Alan Coopersmith (cherry picked from commit 87e53afd9c7f52a8fa3d1fed22db5380742cc7b7) Part-of: commit f8fa439118ce5ae8c750912749f6eee64a1d27fb Author: Alan Coopersmith Date: Thu Sep 25 17:47:50 2025 -0700 xfree86: Fix -Wdiscarded-qualifiers warnings in SPARC Sbus probe code Signed-off-by: Alan Coopersmith (cherry picked from commit 5210495f7dc8ac98a71b48e11530edca5a2fa483) Part-of: commit 84193d2e1161bad9b079ebf7bd7986474c12e725 Author: Alan Coopersmith Date: Thu Sep 25 16:58:00 2025 -0700 xfree86: add missing headers to build sun_init.c on Solaris/SPARC Fixes: 0f715b4ca ("xfree86: os-support: move hidden Solaris-specific symbols out of public header") Fixes: e2fa0d2ae ("fix including ") Signed-off-by: Alan Coopersmith (cherry picked from commit c62cd2feaadaa49c385e277bb97fa7e3b48e3c4f) Part-of: commit f866b46b5640933902e7dba41362debee561f476 Author: Alan Coopersmith Date: Thu Sep 25 16:37:36 2025 -0700 xfree86: fix meson build on 64-bit Solaris/SPARC systems For cpu_family(), meson returns "sparc" for 32-bit sparc, and "sparc64" for 64-bit sparc, regardless of the OS in use. For cpu(), meson returns values like "sun4v" on Solaris/SPARC, and doesn't promise stability of the values, or portability across OS'es, unlike cpu_family(). Signed-off-by: Alan Coopersmith (cherry picked from commit 908f0a488d2fc35f0c4fa69e64492de3fb3cf89c) Part-of: commit 7cd443c610e5186ff09f0038d0d615600bd9a1e5 Author: Alan Coopersmith Date: Sun Sep 21 10:48:00 2025 -0700 os: Use EVP APIs when building with OpenSSL 3 Avoids deprecation warnings for old SHA1 APIs in OpenSSL 3.0 and later Closes: #1845 Signed-off-by: Alan Coopersmith (cherry picked from commit 3ec5f6bcc3fec8c6f5cd3227b364d1f5ff26e85b) Part-of: commit 9848e11d7cb990f9c07f331f23f74d5afc9cf518 Author: Alan Coopersmith Date: Sat Sep 20 16:45:59 2025 -0700 panoramix: avoid null dereference in PanoramiXConsolidate() Reported in #1817: Error: GCC_ANALYZER_WARNING (CWE-476): [#def5] xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:820:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘root’ xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:819:12: acquire_memory: this call could return NULL xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:820:5: danger: ‘root’ could be NULL: unchecked value from (1) 818| 819| root = malloc(sizeof(PanoramiXRes)); 820|-> root->type = XRT_WINDOW; 821| defmap = malloc(sizeof(PanoramiXRes)); 822| defmap->type = XRT_COLORMAP; Error: GCC_ANALYZER_WARNING (CWE-476): [#def6] xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:822:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘defmap’ xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:821:14: acquire_memory: this call could return NULL xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:822:5: danger: ‘defmap’ could be NULL: unchecked value from (1) 820| root->type = XRT_WINDOW; 821| defmap = malloc(sizeof(PanoramiXRes)); 822|-> defmap->type = XRT_COLORMAP; 823| saver = malloc(sizeof(PanoramiXRes)); 824| saver->type = XRT_WINDOW; Error: GCC_ANALYZER_WARNING (CWE-476): [#def7] xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:824:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘saver’ xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:823:13: acquire_memory: this call could return NULL xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:824:5: danger: ‘saver’ could be NULL: unchecked value from (1) 822| defmap->type = XRT_COLORMAP; 823| saver = malloc(sizeof(PanoramiXRes)); 824|-> saver->type = XRT_WINDOW; 825| 826| FOR_NSCREENS(i) { Signed-off-by: Alan Coopersmith (cherry picked from commit 23c103d41f35cc030b0c0e973f7f3bcb8d9902a0) Part-of: commit 63d6cbf24cb7cd34c399e003ac11746edc6f765e Author: Alan Coopersmith Date: Sat Sep 20 16:35:46 2025 -0700 panoramix: avoid null dereference in PanoramiXMaybeAddDepth() Reported in #1817: Error: GCC_ANALYZER_WARNING (CWE-476): [#def4] xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:748:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘PanoramiXDepths’ xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:802:1: enter_function: entry to ‘PanoramiXConsolidate’ xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:813:17: branch_true: following ‘true’ branch... xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:814:9: branch_true: ...to here xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:814:9: call_function: calling ‘PanoramiXMaybeAddDepth’ from ‘PanoramiXConsolidate’ 746| PanoramiXDepths = reallocarray(PanoramiXDepths, 747| PanoramiXNumDepths, sizeof(DepthRec)); 748|-> PanoramiXDepths[j].depth = pDepth->depth; 749| PanoramiXDepths[j].numVids = 0; 750| PanoramiXDepths[j].vids = NULL; Signed-off-by: Alan Coopersmith (cherry picked from commit 537b56cccaf1759f9beef9396463b1f412614003) Part-of: commit e052acfa3391a4563c084556aca22ecb7459b012 Author: Mikhail Dmitrichenko Date: Wed Sep 17 17:25:40 2025 +0300 dix: avoid null ptr deref at doListFontsWithInfo In the doListFontsWithInfo function in dixfonts.c, when a font alias is encountered (err == FontNameAlias), the code saves the current state and allocates memory for c->savedName. If the malloc(namelen + 1) call fails, c->savedName remains NULL, but c->haveSaved is still set to TRUE. Later, when a font is successfully resolved (err == Successful), the code uses c->savedName without checking if it is NULL, so there is potential null ptr dereference. XNFalloc will check result of malloc and stop program execution if allocation was failed. Found by Linux Verification Center (linuxtesting.org) with SVACE. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1842 Signed-off-by: Mikhail Dmitrichenko (cherry picked from commit dd5c2595a42d3ff0c4f18d9b53d1f6c3fd934fd4) Part-of: commit c49bf5f7fd44b1e5285c11f7522ff60367f67c48 Author: Mikhail Dmitrichenko Date: Wed Sep 17 17:29:49 2025 +0300 os: avoid potential out-of-bounds access at logVHdrMessageVerb The LogVHdrMessageVerb function may access an array out of bounds in a specific edge case. Specifically, the line: newline = (buf[len - 1] == '\n'); can result in accessing buf[-1] if len == 0, which is undefined behavior. Commit adds check to avoid access out of bounds at pointed line. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1841 Signed-off-by: Mikhail Dmitrichenko (cherry picked from commit 8d25a8914346824f820490ba7090175dea9428cd) Part-of: commit b53d9fa4176679cd7b2a031c5e2d25cac5b9aa77 Author: Icenowy Zheng Date: Sat Dec 14 01:07:31 2024 +0800 glamor: Fix dual blend on GLES3 The EXT_blend_func_extended extension on ESSL always requires explicit request to allow two FS out variables because of limitations of the ESSL language, which is mentioned as the No.6 issue of the extension's specification. Fix this by adding the extension request. The original behavior on GLES3 is slightly against the specification of GL_EXT_blend_func_extended extension, however Mesa and older version of PowerVR closed drivers will just ignore this issue. Newest PowerVR closed driver will bail out on this problem, so it deems a fix now. Fixes: ee107cd4911e ("glamor: support GLES3 shaders") Signed-off-by: Icenowy Zheng (cherry picked from commit eba15f1ba75bc041d54693ebc62a8b9957b8b033) Part-of: commit b89a563882f234f6949a874770d3ca075d2d2fdc Author: Pierre-Eric Pelloux-Prayer Date: Thu Jan 16 10:08:15 2025 +0100 glamor: reject configs using unsupported rgbBits size The supported color depths is a hardcoded list for now, so we need to honor the value exposed there otherwise we'll get inconsistencies between what glXGetFBConfigs and XListDepths report to applications. Signed-off-by: Pierre-Eric Pelloux-Prayer (cherry picked from commit 5397854877c1b17f21c16e43365e1c2e353dc8ba) Part-of: commit 339edca178f45c85924090550350a530a23e17c3 Author: Pierre-Eric Pelloux-Prayer Date: Wed Jan 15 18:34:27 2025 +0100 glamor: use gbm_format_for_depth instead of open-coding it This way glamor_back_pixmap_from_fd deals with the same depth values as glamor_pixmap_from_fds. Signed-off-by: Pierre-Eric Pelloux-Prayer (cherry picked from commit 83b13387ab8b28cbdfeb44f05e019a656214d722) Part-of: commit 4f6f1813b6a3f047cd2b8e610747300255aa5687 Author: Pierre-Eric Pelloux-Prayer Date: Wed Jan 15 18:32:46 2025 +0100 glamor: return the result of gbm_format_for_depth This way the caller knows if the conversion failed. While at it, check for width/height at the same time. Signed-off-by: Pierre-Eric Pelloux-Prayer (cherry picked from commit 87afcc7699f1d143ca91b6ed9bdbfafbbe0d77f7) Part-of: commit 33a9f47205f6e30538d785ea7f8c82377fe087d5 Author: Michel Dänzer Date: Thu Apr 25 17:16:26 2024 +0200 xwayland/glamor: Handle depth 15 in gbm_format_for_depth Prevents Xwayland with glamor from logging unexpected depth: 15 to stderr many times when running rendercheck -t blend -o clear (cherry picked from commit 08113b8923a83aa7018463e71b6e2db3661b8604) Part-of: commit d4cf52524ddb72d31f646be62067e77288a91844 Author: Balló György Date: Thu Oct 5 14:30:33 2023 +0200 glamor: Fallback to software rendering on GLSL link failure Instead of thowing fatal error on GLSL link failure, fall back to software rendering. This allows using Glamor on systems with limited hardware resources (such as i915). (cherry picked from commit 007e98b18665ec76c48e0923f10431175755386f) Part-of: commit 3837159a3f6f3f8915c55e282ea545eed3f1dfdc Author: Konstantin Date: Wed Nov 2 19:13:33 2022 +0300 Fix autotools build for Glamor GLX provider Part-of: commit 0dfcd136682dba0c8777dd4cf865f1f44b9cdf17 Author: Nicolas Dufresne Date: Tue Jul 30 15:53:25 2024 -0400 glamor: xv: Rewrite UYVY shader to match NV12/I420 CSC This rewrites the shader so that we use the same (more flexible) CSC as we have for I420 and NV12. This also fixes the reverse of odd/even which caused chroma shift. Signed-off-by: Nicolas Dufresne (cherry picked from commit 39c8a6f367154b1110a1e6845566a3388be4f90e) Part-of: commit b21b504c4ea25e7a316e2547981f8dbc03097dff Author: Konstantin Date: Wed Jul 31 11:12:38 2024 +0300 glamor: xv: fix UYVY alignment UYVY videos should be aligned by 2 to avoid breakups in the shader Fixes: 832b392f7 - glamor: xv: enable UYVY acceleration Suggested-by: Nicolas Dufresne Signed-off-by: Konstantin (cherry picked from commit eb26f3236804389f2006388936322dc8115d00e0) Part-of: commit 378f14f9ce1982114b38eb7471626f1540cf8e10 Author: Konstantin Date: Thu Sep 21 16:45:08 2023 +0300 glamor: check BPP by render_format. Check actual BPP by render_format in upload_boxes, not by drawable BPP. It is required when we used different BPP formats for storing and rendering (for example, in the case of UYVY). The problem of UYVY size lies inside method of glamor downloading boxes. When we set GLAMOR_CREATE_FORMAT_CBCR, it actually uses 16-bit GL and Pixman formats, but before this change in glamor_download_boxes, that function deduces GL and Pixman formats from BPP, which is wrong in this case (will be deduced to 32). When GL and Pixman format BPP is identical to drawable BPP, this change does nothing, but when it is different - it will prioritize Pixman format, not the format deduced from BPP. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1730 Signed-off-by: Konstantin Pugin (cherry picked from commit 75f56b79234bf428455fa0bef741a86fc5919889) Part-of: commit 48cb710f9f1358f3891680401d1a7f3782cb555b Author: Yuriy Vasilev Date: Fri Sep 10 16:20:06 2021 +0300 glamor: xv: add rgb565 This commit adds RGB565 format to XVideo with reuse of RGBA32 shader Reviewed-by: Adam Jackson Signed-off-by: Yuriy Vasilev (cherry picked from commit c170056111fe0b3c4956a34276b5683e24b8c63c) Part-of: commit b6d21a444e6d2b6681d28ea7d62089b645f4ec14 Author: Yuriy Vasilev Date: Thu Sep 9 18:14:02 2021 +0300 glamor: xv: add rgba32 format This commit adds RGBA32 format to XVideo along with shader for handling it. Reviewed-by: Adam Jackson Signed-off-by: Yuriy Vasilev (cherry picked from commit 15412e78c83bf3d15bcd343ccc40afda072d3f9e) Part-of: commit e084b6e806217519ccb3d67edc5c5aa1f0591290 Author: Konstantin Date: Tue Oct 19 15:03:35 2021 +0300 glamor: xv: enable UYVY acceleration This commit adds UYVY format in XVideo for Glamor along with shader support. Reviewed-by: Adam Jackson Signed-off-by: Konstantin (cherry picked from commit 832b392f70450f164800d65546ec9adf15d642a2) Part-of: commit 966f8aa40ec8b70f56d0d8fc24e1ed0c4a4ab30c Author: Konstantin Date: Fri Oct 20 22:51:55 2023 +0300 glamor: xv: prepare to one-plane formats As a preparation to one-plane formats (for example, UYVY), second texture definition is moved inside a format switch, and all allocations now also done inside a texture switch. No functional change. Reviewed-by: Adam Jackson Signed-off-by: Konstantin (cherry picked from commit ffd7151b109b8c598cd346d34b5233558409a03a) Part-of: commit 20f8f90d53ddac0591a8544aab457f65171f0266 Author: Konstantin Date: Fri Oct 20 22:45:11 2023 +0300 glamor: xv: reuse ports and shaders when possible Xv currently calls glamor_xv_free_port_data at the end of every putImage. This leads to shader recompilation for every frame, which is a huge performance loss. This commit changes behaviour of glamor_xv_free_port_data, and its now is called only if width, height or format is changed for xv port. Shader management also done in a port now, because if shaders will be stored in core glamor and try to be reused, this can lead to a bug if we try to play 2 videos with different formats simultaneously. Reviewed-by: Adam Jackson Signed-off-by: Konstantin (cherry picked from commit 81ef43dd4ab22185ba63aaa271fdbb36dd39f0c9) Part-of: commit 111c1d033232c0effb7c5280e54f8e1baf80484e Author: Konstantin Date: Tue Oct 10 13:07:41 2023 +0300 glamor: xv: do not force a version on XV shaders There is a no need to force a low version for XV shaders, it will work on higher version too. Reviewed-by: Adam Jackson Signed-off-by: Konstantin (cherry picked from commit a8270fc5f0d5e934c266a8b243a35ebd83e2f08f) Part-of: commit 062d39977094c89ef34168b78b9c9e9fc85483ff Author: Konstantin Date: Tue Oct 10 17:36:50 2023 +0300 glamor_egl: add support of GlxVendorLibrary option Same semantics as in glxdri2.c, and same purpose. Signed-off-by: Konstantin (cherry picked from commit a449bb4c5dbb569d151e0d714b0ef3eab4074b67) Part-of: commit 0a1ee643b26fd53074ec90c95a14c12c8f5166b3 Author: Konstantin Pugin Date: Thu Jul 21 00:49:13 2022 +0300 xorg: initialize glamor provider This allows Xorg to use Glamor GLX when Glamor is requested, and eliminates usage of DRI2 in case of Glamor. Signed-off-by: Konstantin Pugin Reviewed-by: Adam Jackson Acked-by: Emma Anholt (cherry picked from commit a987fc7c360fa1c59efa0dde61316d84c171801b) Part-of: commit ed1ec1350269fb91c2c276680d614653a021ee98 Author: Adam Jackson Date: Wed Aug 26 18:22:22 2020 -0400 glamor: Lift the GLX EGL backend from Xwayland This code is almost entirely ddx-agnostic already, and I'd like to use it from the other EGL glamor consumers. Which, right now that's just Xorg, but soon it'll be Xephyr too. (cherry picked from commit 58b88ba0b180ec8d05c85c80eef2d224fb0a6daf) Part-of: commit a6145198bc1d4f535c3105f8352e420c7c59382f Author: Konstantin Pugin Date: Thu Jul 21 00:46:07 2022 +0300 glamor: add glvnd_vendor private This commit adds an ability to store a glvnd vendor in Glamor structures, which can be used for initialize some vendor-based values without hooking into DDX internals. Also this adds setting this value into Xorg and Xwayland Signed-off-by: Konstantin Pugin Reviewed-by: Adam Jackson Acked-by: Emma Anholt (cherry picked from commit 3caf7aa88d31450f116589d68ff66f78285f0e33) Part-of: commit 93abc39fcdcd620dcfc425f4bee55dcbdfd8c5c4 Author: Konstantin Date: Thu Sep 21 17:07:43 2023 +0300 glamor_egl: add info message about context API It is useful to know on what context we are running, and we need to show it into xorg.log Reviewed-by: Adam Jackson Signed-off-by: Konstantin (cherry picked from commit c014f33b43047975cfa4cb0254c36e39669575ad) Part-of: commit 98ac366741ec2c88fe517642f5549eb5eecd638e Author: Konstantin Date: Fri Sep 22 12:29:52 2023 +0300 xorg.conf.man: document new RenderingAPI option Reviewed-by: Adam Jackson Signed-off-by: Konstantin (cherry picked from commit 4fc1500f747eb53292311098772c32efad7f2fd6) Part-of: commit 2f659415899296c784874489d85cffd3b3bb2e4b Author: Konstantin Date: Thu Sep 21 18:06:14 2023 +0300 glamor_egl: add RenderingAPI option This allows to choose between Glamor on OpenGL and Glamor on OpenGL ES via an option. Reviewed-by: Adam Jackson Signed-off-by: Konstantin (cherry picked from commit a44a4b0d4de267eb66f4aa33c84a4e9288fb7c01) Part-of: commit e4f79ed0addbeb2c8bc4afead319a8c21306323b Author: Konstantin Date: Tue Oct 31 19:52:07 2023 +0300 glamor_egl: add helper functions for contexts This is just a split big glamor_egl_init to 3 smaller functions. No functional change. Signed-off-by: Konstantin (cherry picked from commit d5c2a4d3f55a873fe6ba0fc77a42f8d1510bcb3d) Part-of: commit 40af9f2d1af27287bdd5f07892aa6fe34f61d9d4 Author: Balló György Date: Wed Oct 11 16:01:13 2023 +0200 glamor: Don't require EXT_gpu_shader4 unconditionally It causes a shader compilation error on systems without EXT_gpu_shader4. Fixes: ee107cd4 (cherry picked from commit 910847f45265aa1b0177dc4be4d165dc71c01b69) Part-of: commit 7fda68174bc5be3332a9dd1922ec51a97350225b Author: Konstantin Pugin Date: Sun Jul 24 16:03:51 2022 +0300 glamor: support GLES3 shaders Some hardware (preferably mobile) working on GLES3 way faster than on desktop GL and supports more features. This commit will allow using GLES3 if glamor is running over GL ES, and version 3 is supported. Changes are the following: 1. Add compatibility layer for 120/GLES2 shaders with defines in and out 2. Switch attribute and varying to in and out in almost all shaders (aside gradient) 3. Add newGL-only frag_color variable, which defines as gl_FragColor on old pipelines 4. Switch all shaders to use frag_color. 5. Previous commit is reverted, because now we have more than one GL ES version, previous commit used to set version 100 for all ES shaders, which is not true for ES 3 Signed-off-by: Konstantin Pugin (cherry picked from commit ee107cd4911e692480ab2ff9c12e3c6958bdec4e) Part-of: commit 97d5271487972cd88f2907687ec6e7854ad08109 Author: Konstantin Pugin Date: Sun Jul 10 17:08:44 2022 +0300 glamor: accelerate incomplete textures for GL ES If texture can be uploaded to GL using glTexImage2D normally, but cannot be read back using glReadPixels, we still can accelerate it, but we cannot create pixmap with FBO using this texture type. So, add a flag to avoid such creations. This allow us to accelerate 8-bit glyph masks on GL ES 2.0, because those masks are used only as textures, and in next stages are rendered on RGBA surfaces normally, so, we do not need to call glReadPixels on them. This is needed for correctly working fonts on GL ES 2.0, due to inability to use GL_RED and texture swizzle. We should use GL_ALPHA there, and with this format we cannot have a complete framebuffer. But completed framebuffer, according to testing, is not required for fonts anyway. Also it fixes all 8-bit formats for GLES2. Fixes #1362 Fixes #1411 Signed-off-by: Konstantin Pugin Reviewed-by: Adam Jackson Acked-by: Michel Dänzer Acked-by: Martin Roukala (cherry picked from commit e573d4ca03756cd7ea37288a7ca7df003ad5c1f8) Part-of: commit 6086a0210da3530a60e583c121e63563b97e3eb7 Author: Konstantin Date: Tue Jul 19 11:22:30 2022 +0300 glamor: add gl_PointSize for ES shaders GLES3.2 spec, page 126: > The variable gl_PointSize is intended for a shader to write > the size of the point to be rasterized. It is measured in pixels. > If gl_PointSize is not written to, its value > is undefined in subsequent pipe stages. If glamor shader is use points, we should define gl_PointSize for GLES. On Desktop GL, it "just work" due to default gl_PointSize is 1. As @anholt requested, define this only for minimal amount of shaders (point and glyphbit ones), to make sure than performance will not affected Reviewed-by: Emma Anholt Reviewed-by: Adam Jackson Signed-off-by: Konstantin (cherry picked from commit f273c960c15cf1eaaaccf9c00ed93f5ac75c9397) Part-of: commit 3078e4925754a3c9aba697008deba2f10aacbdb7 Author: Konstantin Date: Fri Dec 2 16:22:15 2022 +0300 glamor: fixes GL_INVALID_ENUM errors on ES if there is no quads If there is no quads to draw, then we have a possibility to call glDrawElements with type as zero, which will generate GL_INVALID_ENUM error. While this error is harmless, it is annoying. Signed-off-by: Konstantin Reviewed-by: Adam Jackson (cherry picked from commit baaddf47d593b51d215d836a796b95a3cb14a220) Part-of: commit feb860014df0b8b1a4b1f8921843fb1cd77eeafc Author: Dave Airlie Date: Thu Feb 9 13:48:30 2023 +1000 glamor: handle EXT_gpu_shader4 in dual source blend paths Fixes: a9552868697c ("glamor: add EXT_gpu_shader4 support") Acked-by: Emma Anholt (cherry picked from commit 86598739ba285045bc03778d43e25bb0886627f3) Part-of: commit e52e256f1c1d5334827f60ee8538791bce92f943 Author: Konstantin Date: Tue Jun 28 12:28:39 2022 +0300 glamor: fix XVideo run with GLES For now, it sets .version=120, which prevents shader from compiling on ES. We just force version of shaders to be always 100 on ES, because we use only 120 shaders on ES anyway, and all shaders works. Signed-off-by: Konstantin Pugin Reviewed-by: Adam Jackson Reviewed-by: Emma Anholt (cherry picked from commit dcba460af3eedb9d41986bd65f4502998b7a5a6c) Part-of: commit fc7012515308e860130e29bb55d070adaae3e87c Author: Vasily Khoruzhick Date: Fri May 27 18:00:56 2022 -0700 glamor: use dual source blend on GL 2.1 with ARB_ES2_compatibility ARB_blend_func_extended may be exposed even without GLSL 1.30. In order to use it we need GLES2 shaders that are available if ARB_ES2_compatibility is exposed. Signed-off-by: Vasily Khoruzhick Reviewed-by: Adam Jackson Reviewed-by: Emma Anholt (cherry picked from commit 05b8401eeb263e1395aa5ceeb8b5cdbeb0585db6) Part-of: commit 4b1d4cc963e7af73abd7c116c12a91cbad9c51f2 Author: Yuriy Vasilev Date: Thu Sep 16 14:47:44 2021 +0300 glamor: fix CbCr format handling In GLES2, we cannot do GL_RED or GL_RG without GL_EXT_texture_rg. So, add check for GL_EXT_texture_rg to make it working. Also add a yuv2 pixman format into render.h to make Xv yuv rendering works. Signed-off-by: Yuriy Vasilev Reviewed-by: Adam Jackson Reviewed-by: Emma Anholt (cherry picked from commit 65392d27d77fbdb66e874ba3e2d85dbcf46e4583) Part-of: commit f94d80b3878897be22d28329a42f65ae13d30caf Author: Konstantin Date: Sat Jun 25 17:51:15 2022 +0300 glamor: transpose gradients transparently glUniformMatrix3fv is used with argument transpose set to GL_TRUE. According to the Khronos OpenGL ES 2.0 pages transpose must be GL_FALSE. Actually we can just return transformed matrix from _glamor_gradient_convert_trans_matrix (@anholt suggest), so @uvas workaround is not required Signed-off-by: Konstantin Pugin Reviewed-by: Adam Jackson Reviewed-by: Emma Anholt (cherry picked from commit a59531533fb8fd137d21e0578909d8e91c28dff6) Part-of: commit 95b8991181b22031f67384403bc166c8749e7a16 Author: Konstantin Date: Sat Jun 25 21:58:08 2022 +0300 meson: add glamor gles2 tests Signed-off-by: Konstantin Pugin Reviewed-by: Adam Jackson Reviewed-by: Emma Anholt (cherry picked from commit ddcd4846d1fa8c408733f4435a52344d3eab850e) Part-of: commit 8d3b4fa2456efcb4c677e750b9688fc4e005d6aa Author: Jeffy Chen Date: Fri Nov 8 15:44:41 2019 +0800 glamor: xv: Fix invalid accessing of plane attributes for NV12 NV12 only has 2 planes. Signed-off-by: Jeffy Chen (cherry picked from commit 0076671e24670f1ddb151946e490497f171589f0) Part-of: commit bec42f6e0b7c4cb2844721f1b566921665bbdc78 Author: Lucas Stach Date: Sun Jul 10 19:35:43 2022 +0200 glamor_egl: properly get FDs from multiplanar GBM BOs Multiplanar GBM buffers can point to different objects from each plane. Use the _for_plane API when possible to retrieve the correct prime FD for each plane. Signed-off-by: Lucas Stach Reviewed-by: Simon Ser Tested-by: Guido Günther (cherry picked from commit e5b09f7a2cc3bd64a6ea207c7c75d4f05b79cf44) Part-of: commit b621926610129b94d3bfbc3a7e256c6f7799d73f Author: Lucas Stach Date: Thu Jul 28 22:52:15 2022 +0200 glamor_egl: handle fd export failure in glamor_egl_fds_from_pixmap Check the fd for validity before giving a success return code. Signed-off-by: Lucas Stach Reviewed-by: Simon Ser Tested-by: Guido Günther (cherry picked from commit 95944e2b990dacde81892406c8a0e2cc2afa7b3e) Part-of: commit 8b5ed211d5d3cea845b41fdff4b8dfcb183ee921 Author: Olivier Fourdan Date: Thu Jun 26 10:38:01 2025 +0200 .gitlab-ci: Use meson instead of ninja for running the tests Using ninja spawns a very high number of concurrent tests (even with the option '-j'). The CI runs two Xservers, one Xephyr instance running inside an Xvfb instance. As a result, running the tests may exhaust the CI server resources and eventually the CI fails. meson, however, doesn't seem to suffer the same issue, and the number of Xserver spawned for the CI tests remains limited. The master branch already uses meson (after commit ce2f24c51 which uses a meson-build script instead). Switch to meson instead of ninja for running the tests. Signed-off-by: Olivier Fourdan Part-of: commit 2403cd5352b2a60d045b7f53c3c30002eb877f57 Author: Olivier Fourdan Date: Wed Jun 18 17:55:42 2025 +0200 xserver 21.1.18 Signed-off-by: Olivier Fourdan Part-of: commit a659519ffa3eae4c94218b03e704a2b6d26adf6f Author: Olivier Fourdan Date: Wed Jun 18 08:39:02 2025 +0200 os: Check for integer overflow on BigRequest length Check for another possible integer overflow once we get a complete xReq with BigRequest. Related to CVE-2025-49176 Signed-off-by: Olivier Fourdan Suggested-by: Peter Harris (cherry picked from commit 4fc4d76b2c7aaed61ed2653f997783a3714c4fe1) Part-of: commit 97f79ca01b6182e0ee987748fcdcbe276c84e0c9 Author: Olivier Fourdan Date: Tue Jun 17 14:50:22 2025 +0200 xserver 21.1.17 Signed-off-by: Olivier Fourdan Part-of: commit bb89548515a75d30399c3c9d7cae9f3706241808 Author: Olivier Fourdan Date: Mon Apr 28 14:59:46 2025 +0200 xfree86: Check for RandR provider functions Changing XRandR provider properties if the driver has set no provider function such as the modesetting driver will cause a NULL pointer dereference and a crash of the Xorg server. Related to CVE-2025-49180 This issue was discovered by Nils Emmerich and reported by Julian Suleder via ERNW Vulnerability Disclosure. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 0235121c6a7a6eb247e2addb3b41ed6ef566853d) Part-of: commit 7c626aa63af274a347b91dd923027e715ed89023 Author: Olivier Fourdan Date: Tue May 20 15:18:19 2025 +0200 randr: Check for overflow in RRChangeProviderProperty() A client might send a request causing an integer overflow when computing the total size to allocate in RRChangeProviderProperty(). To avoid the issue, check that total length in bytes won't exceed the maximum integer value. CVE-2025-49180 This issue was discovered by Nils Emmerich and reported by Julian Suleder via ERNW Vulnerability Disclosure. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 3c3a4b767b16174d3213055947ea7f4f88e10ec6) Part-of: commit 8592cab6820f77c209c2ea9a7b94e0d4d1ac848c Author: Olivier Fourdan Date: Mon Apr 28 11:47:15 2025 +0200 record: Check for overflow in RecordSanityCheckRegisterClients() The RecordSanityCheckRegisterClients() checks for the request length, but does not check for integer overflow. A client might send a very large value for either the number of clients or the number of protocol ranges that will cause an integer overflow in the request length computation, defeating the check for request length. To avoid the issue, explicitly check the number of clients against the limit of clients (which is much lower than an maximum integer value) and the number of protocol ranges (multiplied by the record length) do not exceed the maximum integer value. This way, we ensure that the final computation for the request length will not overflow the maximum integer limit. CVE-2025-49179 This issue was discovered by Nils Emmerich and reported by Julian Suleder via ERNW Vulnerability Disclosure. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 2bde9ca49a8fd9a1e6697d5e7ef837870d66f5d4) Part-of: commit 7996ac60d81d665a87f4f736bcfe17e22a375b5c Author: Olivier Fourdan Date: Mon Apr 28 10:46:03 2025 +0200 os: Account for bytes to ignore when sharing input buffer When reading requests from the clients, the input buffer might be shared and used between different clients. If a given client sends a full request with non-zero bytes to ignore, the bytes to ignore may still be non-zero even though the request is full, in which case the buffer could be shared with another client who's request will not be processed because of those bytes to ignore, leading to a possible hang of the other client request. To avoid the issue, make sure we have zero bytes to ignore left in the input request when sharing the input buffer with another client. CVE-2025-49178 This issue was discovered by Nils Emmerich and reported by Julian Suleder via ERNW Vulnerability Disclosure. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit d55c54cecb5e83eaa2d56bed5cc4461f9ba318c2) Part-of: commit 909ae2776815c6dc9dcba8b3c89b7ac507a9fc54 Author: Olivier Fourdan Date: Mon Apr 28 10:05:36 2025 +0200 xfixes: Check request length for SetClientDisconnectMode The handler of XFixesSetClientDisconnectMode does not check the client request length. A client could send a shorter request and read data from a former request. Fix the issue by checking the request size matches. CVE-2025-49177 This issue was discovered by Nils Emmerich and reported by Julian Suleder via ERNW Vulnerability Disclosure. Fixes: e167299f6 - xfixes: Add ClientDisconnectMode Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit ab02fb96b1c701c3bb47617d965522c34befa6af) Part-of: commit f7dcf2d0d46d31735208c3270dc3457ea3093635 Author: Olivier Fourdan Date: Mon Apr 7 16:13:34 2025 +0200 os: Do not overflow the integer size with BigRequest The BigRequest extension allows requests larger than the 16-bit length limit. It uses integers for the request length and checks for the size not to exceed the maxBigRequestSize limit, but does so after translating the length to integer by multiplying the given size in bytes by 4. In doing so, it might overflow the integer size limit before actually checking for the overflow, defeating the purpose of the test. To avoid the issue, make sure to check that the request size does not overflow the maxBigRequestSize limit prior to any conversion. The caller Dispatch() function however expects the return value to be in bytes, so we cannot just return the converted value in case of error, as that would also overflow the integer size. To preserve the existing API, we use a negative value for the X11 error code BadLength as the function only return positive values, 0 or -1 and update the caller Dispatch() function to take that case into account to return the error code to the offending client. CVE-2025-49176 This issue was discovered by Nils Emmerich and reported by Julian Suleder via ERNW Vulnerability Disclosure. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer (cherry picked from commit 03731b326a80b582e48d939fe62cb1e2b10400d9) Part-of: commit ea7b770952dbcf6c769db7538b55b4f92e1f95c5 Author: Olivier Fourdan Date: Fri Mar 28 09:43:52 2025 +0100 render: Avoid 0 or less animated cursors Animated cursors use a series of cursors that the client can set. By default, the Xserver assumes at least one cursor is specified while a client may actually pass no cursor at all. That causes an out-of-bound read creating the animated cursor and a crash of the Xserver: | Invalid read of size 8 | at 0x5323F4: AnimCursorCreate (animcur.c:325) | by 0x52D4C5: ProcRenderCreateAnimCursor (render.c:1817) | by 0x52DC80: ProcRenderDispatch (render.c:1999) | by 0x4A1E9D: Dispatch (dispatch.c:560) | by 0x4B0169: dix_main (main.c:284) | by 0x4287F5: main (stubmain.c:34) | Address 0x59aa010 is 0 bytes after a block of size 0 alloc'd | at 0x48468D3: reallocarray (vg_replace_malloc.c:1803) | by 0x52D3DA: ProcRenderCreateAnimCursor (render.c:1802) | by 0x52DC80: ProcRenderDispatch (render.c:1999) | by 0x4A1E9D: Dispatch (dispatch.c:560) | by 0x4B0169: dix_main (main.c:284) | by 0x4287F5: main (stubmain.c:34) | | Invalid read of size 2 | at 0x5323F7: AnimCursorCreate (animcur.c:325) | by 0x52D4C5: ProcRenderCreateAnimCursor (render.c:1817) | by 0x52DC80: ProcRenderDispatch (render.c:1999) | by 0x4A1E9D: Dispatch (dispatch.c:560) | by 0x4B0169: dix_main (main.c:284) | by 0x4287F5: main (stubmain.c:34) | Address 0x8 is not stack'd, malloc'd or (recently) free'd To avoid the issue, check the number of cursors specified and return a BadValue error in both the proc handler (early) and the animated cursor creation (as this is a public function) if there is 0 or less cursor. CVE-2025-49175 This issue was discovered by Nils Emmerich and reported by Julian Suleder via ERNW Vulnerability Disclosure. Signed-off-by: Olivier Fourdan Reviewed-by: José Expósito (cherry picked from commit 0885e0b26225c90534642fe911632ec0779eebee) Part-of: commit 2b287847622b0391c707d009e04205f889426516 Author: Alan Coopersmith Date: Sat May 31 15:06:23 2025 -0700 XWin.man: fix typos in font change escapes Fixes warnings from `mandoc -T lint`: mandoc: XWin.man:332:28: WARNING: invalid escape sequence: \fp mandoc: XWin.man:397:1: WARNING: invalid escape sequence: \fX Signed-off-by: Alan Coopersmith (cherry picked from commit 286578e83ed6519fb654547b70b6d9d58708f095) Part-of: commit 4430e87d09c07cab3be4074653c520871fcb63d6 Author: Alan Coopersmith Date: Mon Apr 14 18:41:33 2025 -0700 Xserver.man: correct list of available authorization protocols XDM-AUTHORIZATION-2 (IPv6 capable version of -1) was never merged. MIT-KERBEROS-5 was removed by commit dfbe32b5b in 2007 Fixes: dfbe32b5b ("Remove the old Kerberos 5 authentication code.") Signed-off-by: Alan Coopersmith (cherry picked from commit 845c4ae5187f959fe042129e7c62210535f94290 minus the removal of SUN-DES-1, which is still present in the 21.1-branch) Part-of: commit 30c3dac8a0ddf2f7cfbd4d0d887910f73763643b Author: Alan Coopersmith Date: Mon Apr 14 15:56:34 2025 -0700 Xserver.man: add Xwayland(1) to list of server-specific man pages Signed-off-by: Alan Coopersmith (cherry picked from commit 80ad8a2c6d6e5d2d1861ce71d3b5dc5df15ea96a) Part-of: commit 7d8608ff0596d26d441f0ca8f7b71587c1ee77cd Author: Alan Coopersmith Date: Sat Mar 29 13:27:33 2025 -0700 Xserver.man: remove X FireWall Proxy (xfwp) info xfwp has not been maintained in many years, with ssh X11-Forwarding preferred instead. Signed-off-by: Alan Coopersmith (cherry picked from commit b4b6b19c9a834df980e9209f1c44318fd67f3e8a) Part-of: commit c0f6ef9f078de90a904c12c877511a0263d7930e Author: Tanguy Ortolo Date: Tue Jul 29 13:32:07 2014 +0200 xorg.conf.man: Complete the xorg.conf.5 manpage with Option "Disable" The xorg.conf.5 manpage mentions an "Enable" option to enable a monitor regardless of whether or not it is connected, but gives no indication of how to disable it. This patch corrects that by documenting the "Disable" option. Orignally from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755809 Signed-off-by: Alan Coopersmith (cherry picked from commit e4d2de81980666757580366e597455f5d2d43889) Part-of: commit a3a37c56998e85ac2ab98d3a3778c312fc0e8fad Author: Peter Hutterer Date: Thu Mar 20 10:37:53 2025 +1000 dix: pick the right keyboard for focus FollowKeyboard This fixes a crash when we try to send focus events and dereference FollowKeyboardWin (0x3) as WindowPtr. A device set to XSetDeviceFocus(FollowKeyboard) is supposed to follow the focus of the corresponding master device. During ActivateKeyboard a slave device is detached from the master for the duration for the grab so we don't actually have a master to follow - leaving our oldWin set to the FollowKeyboardWin constant. This later crashes when we try to dereference it. Fix this by getting the current master (if any), or the saved master (if temporarily detached due to a grab). And if failing that, use the VCK as fallback device - that is technically wrong but it's such a niche use case that it shouldn't matter. Reproducer: window = XCreateSimpleWindow(...) deviceid = any device that is IsXExtensionKeyboard device XSetDeviceFocus(deviceid, FollowKeyboard, ...) XGrabDevice(deviceid, window, ...) Fixes: f01ee198ff0c ("dix: don't use inputInfo.keyboard to get the focus window in ActivateKbdGrab") Found-by: Olivier Fourdan Acked-by: Olivier Fourdan Tested-by: Olivier Fourdan (cherry picked from commit cab9017485566da656b12b686e571d42b0f28afb) Part-of: commit 0249e717d4cbc40559d6072655d5a873320cb085 Author: Peter Hutterer Date: Thu Mar 20 11:24:32 2025 +1000 dix: fix erroneous BUG_RETURN check Check was inverted, we want to complain if evcount exceeds our target array. Fixes: 219c54b8a333 ("dix: fix DeviceStateNotify event calculation") (cherry picked from commit 2bca68f41b222ca7bf881f0e2d7011e9fea43c60) Part-of: commit 7be648c5055adcefb55164c626d4d1e931189557 Author: Alan Coopersmith Date: Sat Mar 8 16:29:53 2025 -0800 dix-config.h: define HAVE_STRUCT_SOCKADDR_STORAGE for xtrans 1.6 xtrans 1.6 will use struct sockaddr_storage if HAVE_STRUCT_SOCKADDR_STORAGE is defined, even if IPv6 is disabled, unlike previous versions which tied it to the IPv6 #define. Signed-off-by: Alan Coopersmith (cherry picked from commit 4b5d410591ed29afba010cd30594d8ed7c195c2e) Part-of: commit 3a60fe79d3cf192eb878cfafefdf27938cc61e71 Author: Alan Coopersmith Date: Sat Mar 8 14:49:16 2025 -0800 pkgconfig files: Add URL https://github.com/pkgconf/pkgconf/blob/master/man/pc.5 says it's a mandatory field in *.pc files. Signed-off-by: Alan Coopersmith (cherry picked from commit b73cd6066af1dde94e66c5593290b78a96d10dc0) Part-of: commit bf37ce8edc252beb4aa2c6b942c86672f5bb2815 Author: Peter Hutterer Date: Thu Mar 6 09:40:22 2025 +1000 Xi: disallow grabbing disabled devices Grabbing a disabled (pointer) device will lead to a segfault later in the myriad of places where we look at the device's spriteInfo - which will be NULL. As a workaround, disallow grabbing a disabled device by pretending it's already grabbed. Since the point of a grab is to receive all events by that device and disabled devices cannot send events, this should be Good Enough. Tested-by: Olivier Fourdan (cherry picked from commit 797f63b8be1693a7c0ae5df8b76911d804959ce5) Part-of: commit fca017cd1a96794b6b5fe4f8a0635b7b3730e771 Author: Enrico Weigelt, metux IT consult Date: Fri Feb 28 14:41:12 2025 +0100 xfree86: xf86helper: fix NULL dereference xf86MatchDevice() can segfault if screensecptr->device is NULL. Issue: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1767 Signed-off-by: Enrico Weigelt, metux IT consult (cherry picked from commit fe9c911e22cb0b24e01a8183af1634149675261d) Part-of: commit 8b699feb9de9c88bef8a8b31cdd3683e1abdd664 Author: Alan Coopersmith Date: Sun Oct 8 13:22:13 2023 -0700 xkb: Add tbGetBufferString helper function Handles common case of allocating & copying string to temporary buffer (cherry picked from xorg/lib/libxkbfile@8a91517ca6ea77633476595b0eb5b213357c60e5) Signed-off-by: Alan Coopersmith (cherry picked from commit 42a1f25faff612641dffb95a77f9ec3661111875) Part-of: commit 8cf8d80f7c209f34522e11eeb8e5556f54ebc544 Author: Martin Burggraf Date: Thu Aug 13 21:16:40 2015 +0200 xkb: correcting mathematical nonsense in XkbGeomFPText Fixes formatting of negative numbers, so they don't show minus sign after the decimal point. (cherry picked from xorg/lib/libxkbfile@d2ec504fec2550f4fd046e801b34317ef4a4bab9) Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith (cherry picked from commit 7a23010232312c24cde6070a50dbb5433ce52a59) Part-of: commit 971d57c77d57ddfa03ef24d51e919220de3f918a Author: Alan Coopersmith Date: Sat Feb 22 16:15:01 2025 -0800 xkb: Convert more sprintf calls to snprintf in xkbtext.c Based on xorg/lib/libxkbfile@390acfe5bb88cdab509b5eaae4041f265e969d2b Signed-off-by: Alan Coopersmith (cherry picked from commit 60419d8e4a02dc2599351b65b3503f0bb0932eaa) Part-of: commit a2dc81508908424e92b3db0e720e7bb1eb54a13e Author: José Expósito Date: Tue Apr 30 17:37:39 2024 +0200 xkb: Check that needed is > 0 in XkbResizeKeyActions Passing a negative value in `needed` to the `XkbResizeKeyActions()` function can create a `newActs` array of an unespected size. Check the value and return if it is invalid. This error has been found by a static analysis tool. This is the report: Error: OVERRUN (CWE-119): libX11-1.8.7/src/xkb/XKBMAlloc.c:811: cond_const: Checking "xkb->server->size_acts == 0" implies that "xkb->server->size_acts" is 0 on the true branch. libX11-1.8.7/src/xkb/XKBMAlloc.c:811: buffer_alloc: "calloc" allocates 8 bytes dictated by parameters "(size_t)((xkb->server->size_acts == 0) ? 1 : xkb->server->size_acts)" and "8UL". libX11-1.8.7/src/xkb/XKBMAlloc.c:811: var_assign: Assigning: "newActs" = "calloc((size_t)((xkb->server->size_acts == 0) ? 1 : xkb->server->size_acts), 8UL)". libX11-1.8.7/src/xkb/XKBMAlloc.c:815: assignment: Assigning: "nActs" = "1". libX11-1.8.7/src/xkb/XKBMAlloc.c:829: cond_at_least: Checking "nCopy > 0" implies that "nCopy" is at least 1 on the true branch. libX11-1.8.7/src/xkb/XKBMAlloc.c:830: overrun-buffer-arg: Overrunning buffer pointed to by "&newActs[nActs]" of 8 bytes by passing it to a function which accesses it at byte offset 15 using argument "nCopy * 8UL" (which evaluates to 8). # 828| # 829| if (nCopy > 0) # 830|-> memcpy(&newActs[nActs], XkbKeyActionsPtr(xkb, i), # 831| nCopy * sizeof(XkbAction)); # 832| if (nCopy < nKeyActs) (cherry picked from xorg/lib/libx11@af1312d2873d2ce49b18708a5029895aed477392) Signed-off-by: José Expósito Signed-off-by: Alan Coopersmith (cherry picked from commit 6d3383418672dd87e6cd73931268fcbacdaae9c8) Part-of: commit 1e52c5c09418671cbd5c0beb4856e449a755cecc Author: Alan Coopersmith Date: Sat Feb 22 10:02:20 2025 -0800 xkb: ensure XkbAllocNames sets num_rg to 0 on allocation failure If there was a previous radio_groups array which we failed to realloc and freed instead, clear the array size in the XkbNamesRec. Taken from xorg/lib/libx11@258a8ced681dc1bc50396be7439fce23f9807e2a Signed-off-by: Alan Coopersmith (cherry picked from commit 09c6f09eb77a306f44490a9af0751e77cc9d1530) Part-of: commit f71114570fc1b1dda97423198575ea2a0cbed19f Author: Peter Hutterer Date: Mon Feb 10 10:49:24 2025 +1000 mi: guard miPointer functions against NULL dereferences Already in place for some functions, let's add it to most others. The only function missing is miPointerSetPosition() which needs to return the ScreenPtr and that one is unclear if we don't have a screen - returning NULL will crash the caller(s) so let's wait for something to trigger this bug before we try to fix it wrongly. Related to #1782 (cherry picked from commit 68c17477d29937e081c482a343a942d5bd41c4ee) Part-of: commit 4530321f5abf2f1f46c521079d095c42e0b1978d Author: Peter Hutterer Date: Fri Feb 7 18:14:55 2025 +1000 mi: don't crash on miPointerGetPosition for disabled devices If a device is disabled, its master device is forcibly reset to NULL but unlike a floating device it doesn't have a sprite allocated. Calling miPointerGetPosition for a disabled device thus crashes. Avoid this by returning 0/0 for any device without a miPointer. This is a quick fix only, a proper fix for this issue is rather more involved. Closes #1782 (cherry picked from commit acbdd0ecddc18d9fa7fc1634d4daf868ee0cd755) Part-of: commit ba830583e6a8e9a78f09e2d723813c03142b11f6 Author: tholin Date: Tue Jan 4 12:08:11 2022 +0000 dix: Hold input lock for AttachDevice() Fix the following race: Possible data race during read of size 8 at 0xA112510 by thread #6 Locks held: 1, at address 0x366B40 at 0x14C8B9: GetMaster (devices.c:2691) by 0x15CFC5: IsFloating (events.c:346) by 0x2B9554: miPointerGetScreen (mipointer.c:527) by 0x1A5136: xf86PostButtonEventM (xf86Xinput.c:1379) by 0x1A52BD: xf86PostButtonEvent (xf86Xinput.c:1345) by 0x485F45B: EvdevProcessEvent (in /usr/lib64/xorg/modules/input/evdev_drv.so) by 0x485FDAC: EvdevReadInput (in /usr/lib64/xorg/modules/input/evdev_drv.so) by 0x195427: xf86ReadInput (xf86Events.c:247) by 0x2CC113: InputReady (inputthread.c:180) by 0x2CE4EA: ospoll_wait (ospoll.c:657) by 0x2CC077: InputThreadDoWork (inputthread.c:369) by 0x484A336: mythread_wrapper (hg_intercepts.c:406) This conflicts with a previous write of size 8 by thread #1 Locks held: none at 0x14D2C6: AttachDevice (devices.c:2609) by 0x15CF85: ReattachToOldMaster (events.c:1457) by 0x1647DD: DeactivateKeyboardGrab (events.c:1700) by 0x25D7F1: ProcXIUngrabDevice (xigrabdev.c:169) by 0x2552AD: ProcIDispatch (extinit.c:398) by 0x155291: Dispatch (dispatch.c:479) by 0x158CBA: dix_main (main.c:276) by 0x143A3D: main (stubmain.c:34) Address 0xa112510 is 336 bytes inside a block of size 904 alloc'd at 0x4846571: calloc (vg_replace_malloc.c:1328) by 0x14A0B3: AddInputDevice (devices.c:260) by 0x1A31A0: xf86ActivateDevice (xf86Xinput.c:365) by 0x1A4549: xf86NewInputDevice (xf86Xinput.c:948) by 0x1A4B44: NewInputDeviceRequest (xf86Xinput.c:1090) by 0x1B81FE: device_added (udev.c:282) by 0x1B8516: config_udev_init (udev.c:439) by 0x1B7091: config_init (config.c:50) by 0x197970: InitInput (xf86Init.c:814) by 0x158C6B: dix_main (main.c:250) by 0x143A3D: main (stubmain.c:34) Block was alloc'd by thread #1 The steps to trigger the race are: 1. Main thread does cleanup at mipointer.c:360 setting the slave device's miPointerPtr to null. 2. Input thread use MIPOINTER in mipointer.c and get the slave's miPointerPtr = null. 3. Main thread updates dev->master at devices.c:2609. 4. MIPOINTER would now return the master's miPointerPtr but the input thread already got the slave's miPointerPtr in step 2 and segfaults by null ptr deref. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1260 Signed-off-by: Thomas Lindroth (cherry picked from commit dc7cb45482cea6ccec22d117ca0b489500b4d0a0) Part-of: commit b7f84e6d509c004a7abb514af75b94cb907d451b Author: Olivier Fourdan Date: Tue Feb 25 15:38:07 2025 +0100 xserver 21.1.16 Signed-off-by: Olivier Fourdan Part-of: commit a2c0f84c1cd0c92918f08f83f562c2e324cd4cbb Author: Olivier Fourdan Date: Mon Jan 20 17:10:31 2025 +0100 sync: Apply changes last in SyncChangeAlarmAttributes() SyncChangeAlarmAttributes() would apply the various changes while checking for errors. If one of the changes triggers an error, the changes for the trigger, counter or delta value would remain, possibly leading to inconsistent changes. Postpone the actual changes until we're sure nothing else can go wrong. Related to CVE-2025-26601, ZDI-CAN-25870 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit c285798984c6bb99e454a33772cde23d394d3dcd) Part-of: commit 043a4e959b8590ff37b72cd3440328ec3e39699f Author: Olivier Fourdan Date: Mon Jan 20 17:06:07 2025 +0100 sync: Do not fail SyncAddTriggerToSyncObject() We do not want to return a failure at the very last step in SyncInitTrigger() after having all changes applied. SyncAddTriggerToSyncObject() must not fail on memory allocation, if the allocation of the SyncTriggerList fails, trigger a FatalError() instead. Related to CVE-2025-26601, ZDI-CAN-25870 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 8cbc90c8817306af75a60f494ec9dbb1061e50db) Part-of: commit 330b4068212c02548b53d19c0078ddc75c36a724 Author: Olivier Fourdan Date: Mon Jan 20 16:54:30 2025 +0100 sync: Check values before applying changes In SyncInitTrigger(), we would set the CheckTrigger function before validating the counter value. As a result, if the counter value overflowed, we would leave the function SyncInitTrigger() with the CheckTrigger applied but without updating the trigger object. To avoid that issue, move the portion of code checking for the trigger check value before updating the CheckTrigger function. Related to CVE-2025-26601, ZDI-CAN-25870 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit f52cea2f93a0c891494eb3334894442a92368030) Part-of: commit e708ad021753d603580d314c48b93d3adf459c5f Author: Olivier Fourdan Date: Mon Jan 20 16:52:01 2025 +0100 sync: Do not let sync objects uninitialized When changing an alarm, the change mask values are evaluated one after the other, changing the trigger values as requested and eventually, SyncInitTrigger() is called. SyncInitTrigger() will evaluate the XSyncCACounter first and may free the existing sync object. Other changes are then evaluated and may trigger an error and an early return, not adding the new sync object. This can be used to cause a use after free when the alarm eventually triggers. To avoid the issue, delete the existing sync object as late as possible only once we are sure that no further error will cause an early exit. CVE-2025-26601, ZDI-CAN-25870 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 16a1242d0ffc7f45ed3c595ee7564b5c04287e0b) Part-of: commit 826cef825fe49a275deb28e85b8c714b697f5efa Author: Olivier Fourdan Date: Mon Dec 16 16:18:04 2024 +0100 dix: Dequeue pending events on frozen device on removal When a device is removed while still frozen, the events queued for that device remain while the device itself is freed. As a result, replaying the events will cause a use after free. To avoid the issue, make sure to dequeue and free any pending events on a frozen device when removed. CVE-2025-26600, ZDI-CAN-25871 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 6e0f332ba4c8b8c9a9945dc9d7989bfe06f80e14) Part-of: commit d09125fbb3b997ed77b7f008f8bd30328ba69fbb Author: Olivier Fourdan Date: Mon Jan 13 16:09:43 2025 +0100 composite: initialize border clip even when pixmap alloc fails If it fails to allocate the pixmap, the function compAllocPixmap() would return early and leave the borderClip region uninitialized, which may lead to the use of uninitialized value as reported by valgrind: Conditional jump or move depends on uninitialised value(s) at 0x4F9B33: compClipNotify (compwindow.c:317) by 0x484FC9: miComputeClips (mivaltree.c:476) by 0x48559A: miValidateTree (mivaltree.c:679) by 0x4F0685: MapWindow (window.c:2693) by 0x4A344A: ProcMapWindow (dispatch.c:922) by 0x4A25B5: Dispatch (dispatch.c:560) by 0x4B082A: dix_main (main.c:282) by 0x429233: main (stubmain.c:34) Uninitialised value was created by a heap allocation at 0x4841866: malloc (vg_replace_malloc.c:446) by 0x4F47BC: compRedirectWindow (compalloc.c:171) by 0x4FA8AD: compCreateWindow (compwindow.c:592) by 0x4EBB89: CreateWindow (window.c:925) by 0x4A2E6E: ProcCreateWindow (dispatch.c:768) by 0x4A25B5: Dispatch (dispatch.c:560) by 0x4B082A: dix_main (main.c:282) by 0x429233: main (stubmain.c:34) Conditional jump or move depends on uninitialised value(s) at 0x48EEDBC: pixman_region_translate (pixman-region.c:2233) by 0x4F9255: RegionTranslate (regionstr.h:312) by 0x4F9B7E: compClipNotify (compwindow.c:319) by 0x484FC9: miComputeClips (mivaltree.c:476) by 0x48559A: miValidateTree (mivaltree.c:679) by 0x4F0685: MapWindow (window.c:2693) by 0x4A344A: ProcMapWindow (dispatch.c:922) by 0x4A25B5: Dispatch (dispatch.c:560) by 0x4B082A: dix_main (main.c:282) by 0x429233: main (stubmain.c:34) Uninitialised value was created by a heap allocation at 0x4841866: malloc (vg_replace_malloc.c:446) by 0x4F47BC: compRedirectWindow (compalloc.c:171) by 0x4FA8AD: compCreateWindow (compwindow.c:592) by 0x4EBB89: CreateWindow (window.c:925) by 0x4A2E6E: ProcCreateWindow (dispatch.c:768) by 0x4A25B5: Dispatch (dispatch.c:560) by 0x4B082A: dix_main (main.c:282) by 0x429233: main (stubmain.c:34) Conditional jump or move depends on uninitialised value(s) at 0x48EEE33: UnknownInlinedFun (pixman-region.c:2241) by 0x48EEE33: pixman_region_translate (pixman-region.c:2225) by 0x4F9255: RegionTranslate (regionstr.h:312) by 0x4F9B7E: compClipNotify (compwindow.c:319) by 0x484FC9: miComputeClips (mivaltree.c:476) by 0x48559A: miValidateTree (mivaltree.c:679) by 0x4F0685: MapWindow (window.c:2693) by 0x4A344A: ProcMapWindow (dispatch.c:922) by 0x4A25B5: Dispatch (dispatch.c:560) by 0x4B082A: dix_main (main.c:282) by 0x429233: main (stubmain.c:34) Uninitialised value was created by a heap allocation at 0x4841866: malloc (vg_replace_malloc.c:446) by 0x4F47BC: compRedirectWindow (compalloc.c:171) by 0x4FA8AD: compCreateWindow (compwindow.c:592) by 0x4EBB89: CreateWindow (window.c:925) by 0x4A2E6E: ProcCreateWindow (dispatch.c:768) by 0x4A25B5: Dispatch (dispatch.c:560) by 0x4B082A: dix_main (main.c:282) by 0x429233: main (stubmain.c:34) Fix compAllocPixmap() to initialize the border clip even if the creation of the backing pixmap has failed, to avoid depending later on uninitialized border clip values. Related to CVE-2025-26599, ZDI-CAN-25851 Signed-off-by: Olivier Fourdan Acked-by: Peter Hutterer (cherry picked from commit b07192a8bedb90b039dc0f70ae69daf047ff9598) Part-of: commit 7169628a1715f8203665f9805c714ed111907914 Author: Olivier Fourdan Date: Tue Dec 17 15:19:45 2024 +0100 composite: Handle failure to redirect in compRedirectWindow() The function compCheckRedirect() may fail if it cannot allocate the backing pixmap. In that case, compRedirectWindow() will return a BadAlloc error. However that failure code path will shortcut the validation of the window tree marked just before, which leaves the validate data partly initialized. That causes a use of uninitialized pointer later. The fix is to not shortcut the call to compHandleMarkedWindows() even in the case of compCheckRedirect() returning an error. CVE-2025-26599, ZDI-CAN-25851 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Acked-by: Peter Hutterer (cherry picked from commit c1ff84bef2569b4ba4be59323cf575d1798ba9be) Part-of: commit 32decb1efb89341881de8266f3dd1c3356981bfd Author: Olivier Fourdan Date: Mon Dec 16 11:25:11 2024 +0100 Xi: Fix barrier device search The function GetBarrierDevice() would search for the pointer device based on its device id and return the matching value, or supposedly NULL if no match was found. Unfortunately, as written, it would return the last element of the list if no matching device id was found which can lead to out of bounds memory access. Fix the search function to return NULL if not matching device is found, and adjust the callers to handle the case where the device cannot be found. CVE-2025-26598, ZDI-CAN-25740 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit bba9df1a9d57234c76c0b93f88dacb143d01bca2) Part-of: commit 8cb23fac62e05d7340e320b2db0dd3e8538d1fba Author: Olivier Fourdan Date: Thu Nov 28 14:09:04 2024 +0100 xkb: Fix buffer overflow in XkbChangeTypesOfKey() If XkbChangeTypesOfKey() is called with nGroups == 0, it will resize the key syms to 0 but leave the key actions unchanged. If later, the same function is called with a non-zero value for nGroups, this will cause a buffer overflow because the key actions are of the wrong size. To avoid the issue, make sure to resize both the key syms and key actions when nGroups is 0. CVE-2025-26597, ZDI-CAN-25683 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 0e4ed94952b255c04fe910f6a1d9c852878dcd64) Part-of: commit b4293650b50efe7832cf9eac71217ad8d6341e02 Author: Olivier Fourdan Date: Thu Nov 28 11:49:34 2024 +0100 xkb: Fix computation of XkbSizeKeySyms The computation of the length in XkbSizeKeySyms() differs from what is actually written in XkbWriteKeySyms(), leading to a heap overflow. Fix the calculation in XkbSizeKeySyms() to match what kbWriteKeySyms() does. CVE-2025-26596, ZDI-CAN-25543 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 80d69f01423fc065c950e1ff4e8ddf9f675df773) Part-of: commit ea526ccb20d222196494b2adf9da52dab68a8997 Author: Olivier Fourdan Date: Wed Nov 27 14:41:45 2024 +0100 xkb: Fix buffer overflow in XkbVModMaskText() The code in XkbVModMaskText() allocates a fixed sized buffer on the stack and copies the virtual mod name. There's actually two issues in the code that can lead to a buffer overflow. First, the bound check mixes pointers and integers using misplaced parenthesis, defeating the bound check. But even though, if the check fails, the data is still copied, so the stack overflow will occur regardless. Change the logic to skip the copy entirely if the bound check fails. CVE-2025-26595, ZDI-CAN-25545 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 11fcda8753e994e15eb915d28cf487660ec8e722) Part-of: commit 5f0c4e0bf254c8b4552da276d01b1b80881b4e26 Author: Peter Hutterer Date: Wed Dec 4 15:49:43 2024 +1000 dix: keep a ref to the rootCursor CreateCursor returns a cursor with refcount 1 - that refcount is used by the resource system, any caller needs to call RefCursor to get their own reference. That happens correctly for normal cursors but for our rootCursor we keep a variable to the cursor despite not having a ref for ourselves. Fix this by reffing/unreffing the rootCursor to ensure our pointer is valid. Related to CVE-2025-26594, ZDI-CAN-25544 Reviewed-by: Olivier Fourdan (cherry picked from commit b0a09ba6020147961acc62d9c73d807b4cccd9f7) Part-of: commit 9e5ac777d0dfa9d4d78dd68558869489117c3f2c Author: Olivier Fourdan Date: Wed Nov 27 11:27:05 2024 +0100 Cursor: Refuse to free the root cursor If a cursor reference count drops to 0, the cursor is freed. The root cursor however is referenced with a specific global variable, and when the root cursor is freed, the global variable may still point to freed memory. Make sure to prevent the rootCursor from being explicitly freed by a client. CVE-2025-26594, ZDI-CAN-25544 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative v2: Explicitly forbid XFreeCursor() on the root cursor (Peter Hutterer ) v3: Return BadCursor instead of BadValue (Michel Dänzer ) Signed-off-by: Olivier Fourdan Suggested-by: Peter Hutterer Reviewed-by: Peter Hutterer (cherry picked from commit 01642f263f12becf803b19be4db95a4a83f94acc) Part-of: commit 32887f6ca479be268b7c867b924f80d3fd1611db Author: Olivier Fourdan Date: Tue Feb 25 18:47:05 2025 +0100 test: Fix xsync test The xsync test is relying on the values being changed even in the case of a BadMatch value. Typically, it updates the delta but does not update the test type comparison, so when passing a negative value, it generates a BadMatch. That's actually not correct, and that will fail with the new fixes that check the validity of the values prior to apply the changes. Fix the test by updating the test type as needed. Signed-off-by: Olivier Fourdan (cherry picked from commit 05e54fefafbcec11d847b9f8127bcd4820a20625) Part-of: commit 0c6a7750f2ac9158ace8161f94f7e3bd4c9f5263 Author: Doug Brown Date: Mon Jul 15 19:44:23 2024 -0700 dri2: Protect against dri2ClientPrivate assertion failures If DRI2ScreenInit hasn't been called yet, DRI2Authenticate and DRI2CreateDrawable2 cause the X server to crash. This has been observed to happen on multiple modern Linux distros in various conditions, including QEMU and VMware VMs. Make these functions more robust in order to prevent the crash. This patch was originally provided by Bernhard Übelacker and expanded upon by Mark Wagner. Signed-off-by: Doug Brown Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1053 Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1534 (cherry picked from commit a0834009cfb10b8982a1f2b47b8ed00de254c2c3) Part-of: commit a651eefc9e525072d99413c1aeabd01858c50819 Author: Daniel Kahn Gillmor Date: Fri Jan 3 14:41:59 2025 -0500 autotools: enable static use of Nettle for SHA1 Debian builds xserver 21 using autotools. When debian builds xserver-xorg for constrained environments like the installer, it wants to build against the static library of libnettle for SHA1, see debian/patches/03_static-nettle.diff in the debian repository at https://salsa.debian.org/xorg-team/xserver/xorg-server.git This modification of configure.ac makes it possible to build static nettle when needed, while preserving the build to use nettle with a dynamic library when passing a different configuration option. Part-of: commit e183b62e42f49fa297b5667a82199c7e76fc0a81 Author: Olivier Fourdan Date: Wed Jan 15 09:40:34 2025 +0100 os/connection: Make sure partial is initialized Following the change in Xtrans 1.5 that allows for partial connections to succeed, we need to make sure partial is properly initialized at first, otherwise we rely on an uninitialized variable. Signed-off-by: Olivier Fourdan Suggested-by: Twaik Yont Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1783 (cherry picked from commit 080fb49eff4de7ec3a29214994d1403e4d877f6a) Part-of: commit 6115eb1f65dc5198da01042e70d571d85286c31c Author: Olivier Fourdan Date: Fri Jan 10 15:02:54 2025 +0100 xkb: Always use MAP_LENGTH keymap size Generating the modifier modmap, the helper function generate_modkeymap() would check the entire range up to the MAP_LENGTH. However, the given keymap might have less keycodes than MAP_LENGTH, in which case we would go beyond the size of the modmap, as reported by ASAN: ==ERROR: AddressSanitizer: heap-buffer-overflow READ of size 1 at 0x5110001c225b thread T0 #0 0x5e7369393873 in generate_modkeymap ../dix/inpututils.c:309 #1 0x5e736930dcce in ProcGetModifierMapping ../dix/devices.c:1794 #2 0x5e7369336489 in Dispatch ../dix/dispatch.c:550 #3 0x5e736934407d in dix_main ../dix/main.c:275 #5 0x7e46d47b2ecb in __libc_start_main #6 0x5e73691be324 in _start (xserver/build/hw/xwayland/Xwayland) Address is located 0 bytes after 219-byte region allocated by thread T0 here: #0 0x7e46d4cfc542 in realloc #1 0x5e73695aa90e in _XkbCopyClientMap ../xkb/xkbUtils.c:1142 #2 0x5e73695aa90e in XkbCopyKeymap ../xkb/xkbUtils.c:1966 #3 0x5e73695b1b2f in XkbDeviceApplyKeymap ../xkb/xkbUtils.c:2023 #4 0x5e73691c6c18 in keyboard_handle_keymap ../hw/xwayland/xwayland-input.c:1194 As MAP_LENGTH is used in various code paths where the max keycode might not be easily available, best is to always use MAP_LENGTH to allocate the keymaps so that the code never run past the buffer size. If the max key code is smaller than the MAP_LENGTH limit, fill-in the gap with zeros. That also simplifies the code slightly as we do not constantly need to reallocate the keymap to adjust to the max key code size. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1780 Signed-off-by: Olivier Fourdan (cherry picked from commit 92bcebfd7e248f695503c0a6e7bee80be4c96834) Part-of: commit 309ec5a4a71aa189bcf1eb4263d0d34375051856 Author: Alan Coopersmith Date: Thu Oct 24 15:51:53 2024 -0700 modesetting: avoid memory leak when ms_present_check_unflip() returns FALSE Found by Oracle Parfait 13.3 static analyzer: Memory leak [memory-leak]: Memory leak of pointer event allocated with calloc(1, 16) at line 470 of hw/xfree86/drivers/modesetting/present.c in function 'ms_present_unflip'. event allocated at line 431 with calloc(1, 16) event leaks when ms_present_check_unflip(...) == 0 at line 438 and i >= config->num_crtc at line 445 Fixes: 13c7d53df ("modesetting: Implement page flipping support for Present.") Signed-off-by: Alan Coopersmith (cherry picked from commit bf63d9b34ef3a24427f884f66a387119dd5cdb8c) Part-of: commit fbb636bf6b9f8017cf4f905210d15b86a257dad9 Author: Alan Coopersmith Date: Sat Oct 12 17:33:24 2024 -0700 dix: limit checks to MAX_VALUATORS when generating Xi events Previously, it was looping through sizeof(ev->valuators.mask) * 8 valuators, where valuators.mask is defined as an array of (MAX_VALUATORS + 7) / 8 entries. Since MAX_VALUATORS is defined as 36, this made it actually loop through 40 entries. The last 4 bits in this array should never be set, so we should never access memory outside the bounds of the arrays defined to be exactly MAX_VALUATORS in length, but we can make the static analyzer happier and not waste time checking bits that should never be set. Found by Oracle Parfait 13.3 static analyzer: Read outside array bounds [read-outside-array-bounds]: In array dereference of ev->valuators.data[i] with index i Array size is 36 elements (of 8 bytes each), index >= 0 and index <= 39 at line 741 of dix/eventconvert.c in function 'eventToDeviceEvent'. Read outside array bounds [read-outside-array-bounds]: In array dereference of ev->valuators.data[i] with index i Array size is 36 elements (of 8 bytes each), index >= 0 and index <= 39 at line 808 of dix/eventconvert.c in function 'eventToRawEvent'. Read outside array bounds [read-outside-array-bounds]: In array dereference of ev->valuators.data_raw[i] with index i Array size is 36 elements (of 8 bytes each), index >= 0 and index <= 39 at line 809 of dix/eventconvert.c in function 'eventToRawEvent'. Fixes: b2ba77bac ("dix: add EventToXI2 and GetXI2Type.") Signed-off-by: Alan Coopersmith (cherry picked from commit b65eea43dd18cdf6d389b7f82ee55ae764c3bf31) Part-of: commit abfd0215946c23c36a4b1c689ea6b8b7d277e991 Author: Alan Coopersmith Date: Sat Oct 12 17:01:03 2024 -0700 dix: fix button offset when generating DeviceButtonStateNotify events Found by Oracle Parfait 13.3 static analyzer: Buffer Overflow in STD C function [buffer-overflow-call-stdc]: Buffer overflow in call to memcpy. Buffer &bev->buttons[4] of size 24 is written at an offset of 28 Array size is 28 bytes, index is 32 at line 743 of dix/enterleave.c in function 'DeliverStateNotifyEvent'. Fixes: a85f0d6b9 ("Xi: fix use of button->down - bitflags instead of int arrays.") Reviewed-by: Peter Hutterer Signed-off-by: Alan Coopersmith (cherry picked from commit 4b073d65bb5e1f4accb7ed280c8926134582b7ab) Part-of: commit 5406ddd003c95e2fcbb0411a7afff4daaa9b59f9 Author: Alan Coopersmith Date: Sat Oct 12 16:38:55 2024 -0700 render: avoid NULL pointer dereference if PictureFindVisual returns NULL Found by Oracle Parfait 13.3: Null pointer dereference [null-pointer-deref]: Read from null pointer pVisual at line 257 of dix/colormap.c in function 'CreateColormap'. Null pointer introduced at line 412 of render/picture.c in function 'PictureFindVisual'. Constant 'NULL' passed into function CreateColormap, argument pVisual, from call at line 431 in function 'PictureInitIndexedFormat'. Function PictureFindVisual may return constant 'NULL' at line 412, called at line 429. Fixes: d4a101d4e ("Integration of DAMAGE-XFIXES branch to trunk") Signed-off-by: Alan Coopersmith (cherry picked from commit 7af077dd2f939b76e7d6ba84250368b6649fb777) Part-of: commit cec3e55ec96a660a1884fc99784efb4536e557bb Author: Alan Coopersmith Date: Sat Oct 12 16:12:13 2024 -0700 Xi: avoid NULL pointer dereference if GetXTestDevice returns NULL The comments in that function say "This only happens if master is a slave device. don't do that" but static analysis doesn't respect that. Found by Oracle Parfait 13.3: Null pointer dereference [null-pointer-deref]: Read from null pointer XTestptr at line 274 of Xi/xichangehierarchy.c in function 'remove_master'. Null pointer introduced at line 691 of Xext/xtest.c in function 'GetXTestDevice'. Function GetXTestDevice may return constant 'NULL' at line 691, called at line 273 of Xi/xichangehierarchy.c in function 'remove_master'. Null pointer dereference [null-pointer-deref]: Read from null pointer XTestkeybd at line 279 of Xi/xichangehierarchy.c in function 'remove_master'. Null pointer introduced at line 691 of Xext/xtest.c in function 'GetXTestDevice'. Function GetXTestDevice may return constant 'NULL' at line 691, called at line 278 of Xi/xichangehierarchy.c in function 'remove_master'. Fixes: 0814f511d ("input: store the master device's ID in the devPrivate for XTest devices.") Signed-off-by: Alan Coopersmith (cherry picked from commit d10589cc09c68ad09bebd3a4155c44d1b8f2614b) Part-of: commit 23b3b7199c69d0052830c2b219ba06cb26950f51 Author: Alan Coopersmith Date: Sat Oct 12 15:55:06 2024 -0700 xfree86: avoid memory leak on realloc failure Found by Oracle Parfait 13.3 static analyzer: Memory leak [memory-leak]: Memory leak of pointer optname allocated with asprintf(&optname, "\"%s\"", p->name) at line 326 of hw/xfree86/common/xf86Configure.c in function 'configureDeviceSection'. optname allocated at line 309 with asprintf(&optname, "\"%s\"", p->name) Fixes: code inherited from XFree86 Signed-off-by: Alan Coopersmith (cherry picked from commit fa711c486a2c2c958c71d7bd8ac0efe552558717) Part-of: commit cbc2c654e4099e4d8a35e625e010fd73e7a75521 Author: Alan Coopersmith Date: Mon Sep 9 16:21:46 2024 -0700 os: NextDPMSTimeout: mark intentional fallthroughs in switch The comment at the top of the function tells humans the fallthroughs are intentional, but gcc doesn't parse that. Clears 3 -Wimplicit-fallthrough warnings from gcc 14.1 Signed-off-by: Alan Coopersmith (cherry picked from commit b306df5a6060beea82b5157c3603593527b220b0) Part-of: commit e38c23e5b81693a1b23ed91e4ecdead08615ab25 Author: Tj Date: Fri Jul 19 19:50:56 2024 +0200 xfree86: fbdevhw: fix pci detection on recent Linux Linux kernel v6.9 has changed the symlink to point to the parent device. This breaks fbdev_open() detection logic. Change it to use the subsystem symlink instead which will remain stable. Kernel v6.8: [ 14.067] (II) fbdev_open() sysfs_path=/sys/class/graphics/fb0 [ 14.067] (II) fbdev_open() buf=../../devices/platform/vesa-framebuffer.0/graphics/fb0 Kernel v6.9: [ 15.609] (II) fbdev_open() sysfs_path=/sys/class/graphics/fb0 [ 15.609] (II) fbdev_open() buf=../../devices/pci0000:00/0000:00:01.0/vesa-framebuffer.0/graphics/fb0 Originally found in automated Debian ISO QA testing [0] and confirmed in Linux [1]. Tested on kernels v6.9.7 and v6.8.12 [0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1075713 [1] https://lore.kernel.org/lkml/lLyvPFC_APGHNfyGNHRpQy5izBikkaTPOpHooZIT3fFAoJPquSI31ZMueA99XTdr8ysir3X7O7IMdc6za-0m79vr_claeparHhoRouVgHOI=@proton.me/ Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1714 Signed-off-by: Tj Reviewed-by: Thomas Zimmermann Reviewed-by: Enrico Weigelt, metux IT consult (cherry picked from commit 728b54528d37ffa27b07c9b181c5ed8d2d359379) Part-of: commit ac48573a9bc943572621aa4d0254f32fca58f7d4 Author: Olivier Fourdan Date: Mon Sep 23 09:27:21 2024 +0200 os: Fix NULL pointer dereference RemoveHost() can be called from DisableLocalHost() with a NULL client, but doesn't actually check whether the given client pointer is valid on error and assigns the error value unconditionally, leading to a possible NULL pointer dereference and a crash of the Xserver. To avoid the issue, simply check whether the client pointer is not NULL prior to assign the errorValue. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1752 See-also: https://bugzilla.redhat.com/2313799 Signed-off-by: Olivier Fourdan (cherry picked from commit 57a446c0f98693bd2e0263e91213344d870f4e03) Part-of: commit f241e4f884be062f947f5dab35465549b8bffdf8 Author: Peter Hutterer Date: Tue Jan 30 11:11:54 2024 +1000 Xi: when removing a master search for a disabled paired device If either the master pointer or keyboard was disabled, the respective GetMaster() call returns NULL, causing a segfault later accessing the deviceid. Fix this by looking in the off_devices list for any master device of the type we're looking for. Master devices lose the pairing when disabled (on enabling a keyboard we simply pair with the first available unpaired pointer). And for readability, split the device we get from the protocol request into a new "dev" variable instead of re-using ptr. Fixes #1611 (cherry picked from commit e7c876ab0b0daa546a23d4ef82537fdf8fd88e04) Part-of: commit de2e2e8d45eaffd8b961d22ba91d45ed4ffb9ea0 Author: Peter Hutterer Date: Tue Jan 30 10:44:58 2024 +1000 dix: don't push the XKB state to a non-existing master keyboard If our master keyboard is disabled, GetMaster() returns NULL and we segfault in XkbPushLockedStateToSlaves(). Fixes 45fb3a934dc0db51584aba37c2f9d73deff9191d Fixes #1611 (cherry picked from commit 9b983fecf999b9f50946973f2379a5ce00491cad) Part-of: commit 743f66d6a29d439aac7b9ef2816009f311d58aec Author: Olivier Fourdan Date: Mon Jul 29 11:54:15 2024 +0200 glamor: Fix possible double-free If glamor_link_glsl_prog() fails, we may jump to the failed code path which frees the variable vs_prog_string and fs_prog_string. But those variables were already freed just before, so in that case we end up freeing the memory twice. Simply move the free at the end of the success code path so we are sure to free the values only once, either in the successful of failed code paths. Fixes: 2906ee5e4 - glamor: Fix leak in glamor_build_program() Signed-off-by: Olivier Fourdan (cherry picked from commit 34ea020344ef5f2ea8ffce78c7e1abd6436b21ec) Part-of: commit 3bda7d119a289bc7706123b0544bb6ff792986ad Author: Patrik Jakobsson Date: Wed Jun 9 20:58:59 2021 +0200 modesetting: Fix dirty updates for sw rotation Rotation is broken for all drm drivers not providing hardware rotation support. Drivers that give direct access to vram and not needing dirty updates still work but only by accident. The problem is caused by modesetting not sending the correct fb_id to drmModeDirtyFB() and passing the damage rects in the rotated state and not as the crtc expects them. This patch takes care of both problems. Signed-off-by: Patrik Jakobsson (cherry picked from commit db9e9d45e8ba73510f11eb9e534c176102f6623e) Part-of: commit b5f1b211b4bbbf4049b422b0e08e02efaaf7a26a Author: Matt Turner Date: Tue Dec 17 12:39:36 2024 -0500 xserver 21.1.15 Part-of: commit 203e0667d21953737537d1991ec76b768fe588ae Author: Matt Turner Date: Mon Dec 16 22:38:24 2024 -0500 hw/xfree86: Fix -Wincompatible-pointer-types sbus compile failure ``` ../hw/xfree86/common/xf86sbusBus.c: In function ‘xf86SbusConfigureNewDev’: ../hw/xfree86/common/xf86sbusBus.c:751:21: error: passing argument 1 of ‘XNFasprintf’ from incompatible pointer type [-Wincompatible-pointer-types] 751 | XNFasprintf(&GDev->busID, "SBUS:%s", promPath); | ^~~~~~~~~~~~ | | | const char ** ``` Apply the same fix as in commit e1e01d2e3 ("xfree86/common: Warning fixes. Mostly const string handling.") (cherry picked from commit bdacb100bf6a551bc9045f7f0048cbb99eb3db5a) Part-of: commit 1958e0f25b6b46940625b407a5e15b39fa648b26 Author: Matt Turner Date: Mon Dec 16 22:38:03 2024 -0500 hw/xfree86: Fix -Wmissing-prototypes warnings None of these functions are used elsewhere in the Xserver nor in any of the xf86-video-sun* DDXs. (cherry picked from commit 00a96cd82a7be08f421dcbe3aa628fdbc7c8d856) Part-of: commit c3144adcbc01d4f9f4d1e42323fc51be689bee17 Author: Eric Curtin Date: Fri Dec 16 11:10:12 2022 +0000 config: add a quirk for Apple Silicon appledrm Xorg server does not correctly select the DCP for the display without a quirk on Apple Silicon. Signed-off-by: Eric Curtin Suggested-by: Hector Martin (cherry picked from commit 39934a656a44722d16a80bf4db411c53e2d67b38) Part-of: commit 1a836cd47be8177cb3ab3ac2bc90e926c24c0cac Author: Alan Coopersmith Date: Wed Oct 30 10:34:14 2024 -0700 dix-config.h: add HAVE_SOCKLEN_T definition Needed to build with IPv6 disabled using gcc 14 on some platforms to avoid: In file included from /usr/X11/include/X11/Xtrans/transport.c:67, from xstrans.c:17: /usr/X11/include/X11/Xtrans/Xtranssock.c: In function ‘_XSERVTransSocketOpen’: /usr/X11/include/X11/Xtrans/Xtranssock.c:467:28: error: passing argument 5 of ‘getsockopt’ from incompatible pointer type [-Wincompatible-pointer-types] 467 | (char *) &val, &len) == 0 && val < 64 * 1024) | ^~~~ | | | size_t * {aka long unsigned int *} (Backport to xserver-21.1-branch of commit a1b5aa5a7f12adc43720a5ae11e6c. Backport adds autoconf equivalent to meson change from master branch.) Signed-off-by: Alan Coopersmith Part-of: commit 18c9cd6ab799cf8bd7fb90b4965455bece0046c3 Author: Joaquim Monteiro Date: Sun Jun 23 21:23:47 2024 +0100 os: Fix siHostnameAddrMatch in the case where h_addr isn't defined When IPv6 support isn't enabled, and h_addr isn't defined, there is no for loop, so the break statement is invalid. Signed-off-by: Joaquim Monteiro (cherry picked from commit a6a993f9508ff0bd6f19695b2dfaef170c652525) Part-of: commit e8302b707d6fddf8e27daa0b3ef70fd3efec823c Author: Joaquim Monteiro Date: Sun Jun 23 21:17:25 2024 +0100 os: Fix assignment with incompatible pointer type struct hostent->h_addr_list is of type char**, not const char**. GCC considers this an error when in C99 mode or later. Signed-off-by: Joaquim Monteiro (cherry picked from commit 0ddcd8785199c08d9bded3c767a3b1227c670999) Part-of: commit b25ad9b8f0ebcc3ebe09ce9991410c60f3a8b2ce Author: José Expósito Date: Tue Oct 29 14:40:34 2024 +0100 xserver 21.1.14 Signed-off-by: José Expósito Part-of: commit ba1d14f8eff2a123bd7ff4d48c02e1d5131358e0 Author: Matthieu Herrb Date: Thu Oct 10 10:37:28 2024 +0200 xkb: Fix buffer overflow in _XkbSetCompatMap() The _XkbSetCompatMap() function attempts to resize the `sym_interpret` buffer. However, It didn't update its size properly. It updated `num_si` only, without updating `size_si`. This may lead to local privilege escalation if the server is run as root or remote code execution (e.g. x11 over ssh). CVE-2024-9632, ZDI-CAN-24756 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Reviewed-by: Peter Hutterer Tested-by: Peter Hutterer Reviewed-by: José Expósito (cherry picked from commit 85b776571487f52e756f68a069c768757369bfe3) Part-of: commit e3e14369c62a3647b8f125d9dcb7072f370c10f1 Author: Matthieu Herrb Date: Sat Oct 14 19:06:22 2023 +0200 Fix a double-free on syntax error without a new line. $ echo "#foo\nfoo" > custom_config $ X -config custom_config will trigger the double free because the contents of xf86_lex_val.str have been realloc()ed aready when free is called in read.c:209. This copies the lex token and adds all the necessary free() calls to avoid leaking it (cherry picked from commit fbc034e847a3862a0a28e5872135a3c502da6518) Part-of: commit 4adb5d589f4bb90bf0ff9f1c88096ce60c41286c Author: Matthieu Herrb Date: Sat Feb 17 16:47:38 2024 +0100 Return NULL in *cmdname if the client argv or argv[0] is NULL (cherry picked from commit 59f5445a7ff3ee1468d86f03943c976c790c0893) Part-of: commit 5f9cac4c34e6212e3e4fc22ff4c182d6013eeafc Author: Matthieu Herrb Date: Fri Nov 11 14:58:02 2022 +0100 Don't crash if the client argv or argv[0] is NULL. Report from bauerm at pestilenz dot org. (cherry picked from commit a8512146ba9f475a384a35337f51c7730ba7b4ce) Part-of: commit 9d310679476abb150b8b9055ad44132ffbfa0e3b Author: Enrico Weigelt, metux IT consult Date: Thu Feb 15 16:15:02 2024 +0100 Xnest: fix broken exposure events Xnest fails to properly pass through expose events: the coordinates are miscalculated in xnestCollectExposures(), before miSendExposures() is called. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1735 Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/132 Fixes: 605e6764df - Fix Motif menu drawing in Xnest Backport-Of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1397 Signed-off-by: Enrico Weigelt, metux IT consult Part-of: commit 00d0eba826bbf4b35becbd3fab1ee10e8b3bb89d Author: Alan Coopersmith Date: Sun Sep 8 13:27:45 2024 -0700 dix: FindBestPixel: fix implicit fallthrough warning Signed-off-by: Alan Coopersmith (cherry picked from commit 9c9e1afeb277030380daa9b22f88b05e1af783a0) Part-of: commit 52813e32f26c16b8210dbf5e4e2be7b8a4406360 Author: Alan Coopersmith Date: Sun Sep 8 13:21:14 2024 -0700 dix: GetPairedDevice: check if GetMaster returned NULL Clears warning from gcc 14.1: ../dix/devices.c: In function ‘GetPairedDevice’: ../dix/devices.c:2734:15: warning: dereference of NULL ‘dev’ [CWE-476] [-Wanalyzer-null-dereference] 2734 | return dev->spriteInfo? dev->spriteInfo->paired: NULL; | ~~~^~~~~~~~~~~~ Signed-off-by: Alan Coopersmith (cherry picked from commit e6fc0861d8016ab31536329acac6d6de4bc64164) Part-of: commit 65644c32b8062dd73b10e5f9092dfb833f469719 Author: Alan Coopersmith Date: Sun Sep 8 11:59:07 2024 -0700 dix: HashResourceID: use unsigned integers for bit shifting Clears warning from gcc 14.1: ../dix/resource.c: In function ‘HashResourceID’: ../dix/resource.c:691:44: warning: left shift of negative value [-Wshift-negative-value] 691 | return (id ^ (id >> numBits)) & ~((~0) << numBits); | ^~ Signed-off-by: Alan Coopersmith (cherry picked from commit 26a7ab09eae24fda6cbf51e03f974c7572e80e69) Part-of: commit f12dd2436f2b70dc2fb8e29bee9dfaf907764ca0 Author: Alan Coopersmith Date: Sun Sep 8 11:15:03 2024 -0700 dix: ProcListProperties: skip unneeded work if numProps is 0 No real harm, but clears warning from gcc 14.1: ../dix/property.c: In function ‘ProcListProperties’: ..//dix/property.c:605:27: warning: dereference of NULL ‘temppAtoms’ [CWE-476] [-Wanalyzer-null-dereference] 605 | *temppAtoms++ = pProp->propertyName; | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith (cherry picked from commit 39f337fd497d6fd95efaae9ff5a62d60b49e16aa) Part-of: commit 83a9950d7a8e365d13acaa1c38136d1b9068f4be Author: Alan Coopersmith Date: Sun Sep 8 11:03:41 2024 -0700 dix: dixChangeWindowProperty: don't call memcpy if malloc failed It shouldn't matter, since it would have a length of 0, but it clears warnings from gcc 14.1: ../dix/property.c: In function ‘dixChangeWindowProperty’: ../dix/property.c:287:9: warning: use of possibly-NULL ‘data’ where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument] 287 | memcpy(data, value, totalSize); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../dix/property.c:324:13: warning: use of possibly-NULL ‘data’ where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument] 324 | memcpy(data, value, totalSize); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith (cherry picked from commit 10cafd0bbebfbb92c4e73088ba168ef96fcb983c) Part-of: commit 3bca0f56fa509c57715ad9f2f1742d73f6ffee6d Author: Alan Coopersmith Date: Sun Sep 8 10:41:33 2024 -0700 dix: InitPredictableAccelerationScheme: avoid memory leak on failure Clears warning from gcc 14.1: ../dix/ptrveloc.c: In function ‘InitPredictableAccelerationScheme’: ../dix/ptrveloc.c:149:9: warning: leak of ‘’ [CWE-401] [-Wanalyzer-malloc-leak] 149 | free(vel); | ^~~~~~~~~ Signed-off-by: Alan Coopersmith (cherry picked from commit 462d13c2f6dc25adea1f19e6b621f97b997236af) Part-of: commit 6cefa3a592ce433a203ddc69e0d5bd1d8a0504fd Author: Alan Coopersmith Date: Sun Sep 8 10:03:08 2024 -0700 dix: CreateScratchGC: avoid dereference of pointer we just set to NULL Clears warning from gcc 14.1: ../dix/gc.c: In function ‘CreateScratchGC’: ../dix/gc.c:818:28: warning: dereference of NULL ‘pGC’ [CWE-476] [-Wanalyzer-null-dereference] 818 | pGC->graphicsExposures = FALSE; Signed-off-by: Alan Coopersmith (cherry picked from commit 7ee3a520184b355820923bc7a955d0834eb8afbd) Part-of: commit abaf3c6f204a42006ce1da4fc6d8206477d302e5 Author: Alan Coopersmith Date: Sun Sep 8 09:57:36 2024 -0700 dix: enterleave.c: fix implicit fallthrough warnings Clears 7 -Wimplicit-fallthrough warnings from gcc 14.1 Signed-off-by: Alan Coopersmith (cherry picked from commit 0cb826e3d0fd366914c34ab18e5917930f6695b4) Part-of: commit 0f10584ec43eb29512ac9c4748eccc7b1d60988b Author: Alan Coopersmith Date: Sun Sep 8 09:45:54 2024 -0700 dix: SetFontPath: don't set errorValue on Success Clears warning from gcc 14.1: ../dix/dixfonts.c: In function ‘SetFontPath’: ../dix/dixfonts.c:1697:28: warning: use of uninitialized value ‘bad’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1697 | client->errorValue = bad; | ~~~~~~~~~~~~~~~~~~~^~~~~ Signed-off-by: Alan Coopersmith (cherry picked from commit 1a86fba0d9ae2e107e3ed23519ab3b84d2e5240e) Part-of: commit f9a5bc6532f76758f7a7fd44047731541ebd23d5 Author: Alan Coopersmith Date: Sun Sep 8 09:28:19 2024 -0700 dix: PolyText: fully initialize local_closure Clears warning from gcc 14.1: ../dix/dixfonts.c:1352:15: warning: use of uninitialized value ‘*c.data’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1352 | free(c->data); | ~^~~~~~ Signed-off-by: Alan Coopersmith (cherry picked from commit d78836a3a6b827a282957c48898f9ba4cb0dbcf5) Part-of: commit 02e6639547361578e856a079814caef08db5260f Author: Alan Coopersmith Date: Sun Sep 8 09:17:17 2024 -0700 dix: check for calloc() failure in Xi event conversion routines Clears up 12 -Wanalyzer-possible-null-dereference warnings from gcc 14.1 Signed-off-by: Alan Coopersmith (cherry picked from commit 25762834c9a5da3a7c672d89a7da73297252d905) Part-of: commit 111dc7058891bd01b117f3984cf5ac701011e053 Author: Peter Hutterer Date: Mon Jan 22 14:22:12 2024 +1000 dix: fix valuator copy/paste error in the DeviceStateNotify event Fixes 219c54b8a3337456ce5270ded6a67bcde53553d5 (cherry picked from commit 133e0d651c5d12bf01999d6289e84e224ba77adc) Part-of: commit 408432fbd0f51d2404bfcfc60f20de8bac1f6178 Author: Konstantin Date: Sun Jun 26 00:01:54 2022 +0300 glamor: make use of GL_EXT_texture_format_BGRA8888 For 24 and 32 bit depth pictures xserver uses PICT_x8r8g8b8 and PICT_a8r8g8b8 formats, which must be backed with GL_BGRA format. It is present in OpenGL ES 2.0 only with GL_EXT_texture_format_BGRA8888 extension. We require such extension in glamor_init, so, why not to make use of it? Fixes #1208 Fixes #1354 Signed-off-by: Konstantin Pugin Reviewed-by: Adam Jackson Reviewed-by: Emma Anholt (cherry picked from commit 24cd5f34f8edcc6621ed9c0f2b1a3df08de7488d) Part-of: commit 03bbf4b1214b4e9aad153a5969c32264234fe4da Author: Alexey Date: Fri Jun 24 15:12:54 2022 +0000 Fixed mirrored glyphs on big-endian machines (cherry picked from commit 4cf89222701d73d46c098be9fcc8d9eb6d96f885) Part-of: commit b08cb8141b544788d8607fa31e69c089acdb4fa4 Author: Enrico Weigelt, metux IT consult Date: Wed Jul 31 15:11:27 2024 +0200 Xnest: cursor: fix potentially uninitialized memory It's safer to zero-out the cursor-private memory on allocation, instead of relying on being cleared initialized somewhere later. Fixes: 3f3ff971ec - Replace X-allocation functions with their C89 counterparts Backport-Of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1652 Signed-off-by: Enrico Weigelt, metux IT consult Part-of: commit 68129d7369f30e1448f587598d3e2c015329ae38 Author: Olivier Fourdan Date: Tue Jul 23 17:11:55 2024 +0200 build: Drop libxcvt requirement from SDK_REQUIRED_MODULES The SDK doed not need libxcvt, only Xorg and Xwayland do. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1721 Fixes: a4ab57cb7 - build: Add dependency on libxcvt Signed-off-by: Olivier Fourdan Part-of: commit 8407181c7dfe14086d99697af0b86120320ab73e Author: José Expósito Date: Fri Jan 19 13:05:51 2024 +0100 ephyr: Fix incompatible pointer type build error Fix a compilation error on 32 bits architectures with gcc 14: ephyr_glamor_xv.c: In function ‘ephyr_glamor_xv_init’: ephyr_glamor_xv.c:154:31: error: assignment to ‘SetPortAttributeFuncPtr’ {aka ‘int (*)(struct _KdScreenInfo *, long unsigned int, int, void *)’} from incompatible pointer type ‘int (*)(KdScreenInfo *, Atom, INT32, void *)’ {aka ‘int (*)(struct _KdScreenInfo *, long unsigned int, long int, void *)’} [-Wincompatible-pointer-types] 154 | adaptor->SetPortAttribute = ephyr_glamor_xv_set_port_attribute; | ^ ephyr_glamor_xv.c:155:31: error: assignment to ‘GetPortAttributeFuncPtr’ {aka ‘int (*)(struct _KdScreenInfo *, long unsigned int, int *, void *)’} from incompatible pointer type ‘int (*)(KdScreenInfo *, Atom, INT32 *, void *)’ {aka ‘int (*)(struct _KdScreenInfo *, long unsigned int, long int *, void *)’} [-Wincompatible-pointer-types] 155 | adaptor->GetPortAttribute = ephyr_glamor_xv_get_port_attribute; | ^ Build error logs: https://koji.fedoraproject.org/koji/taskinfo?taskID=111964273 Signed-off-by: José Expósito (cherry picked from commit e89edec497bac581ca9b614fb00c25365580f045) Part-of: commit be2767845d6ed3c6dbd25a151051294d0908a995 Author: Matt Turner Date: Fri Apr 12 13:09:23 2024 -0400 xserver 21.1.13 Signed-off-by: Matt Turner commit b4ea6f9eb6b9dfb25e92f617889db21348710173 Author: Olivier Fourdan Date: Fri Apr 5 15:24:49 2024 +0200 render: Avoid possible double-free in ProcRenderAddGlyphs() ProcRenderAddGlyphs() adds the glyph to the glyphset using AddGlyph() and then frees it using FreeGlyph() to decrease the reference count, after AddGlyph() has increased it. AddGlyph() however may chose to reuse an existing glyph if it's already in the glyphSet, and free the glyph that was given, in which case the caller function, ProcRenderAddGlyphs() will call FreeGlyph() on an already freed glyph, as reported by ASan: READ of size 4 thread T0 #0 in FreeGlyph xserver/render/glyph.c:252 #1 in ProcRenderAddGlyphs xserver/render/render.c:1174 #2 in Dispatch xserver/dix/dispatch.c:546 #3 in dix_main xserver/dix/main.c:271 #4 in main xserver/dix/stubmain.c:34 #5 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #6 in __libc_start_main_impl ../csu/libc-start.c:360 #7 (/usr/bin/Xwayland+0x44fe4) Address is located 0 bytes inside of 64-byte region freed by thread T0 here: #0 in __interceptor_free libsanitizer/asan/asan_malloc_linux.cpp:52 #1 in _dixFreeObjectWithPrivates xserver/dix/privates.c:538 #2 in AddGlyph xserver/render/glyph.c:295 #3 in ProcRenderAddGlyphs xserver/render/render.c:1173 #4 in Dispatch xserver/dix/dispatch.c:546 #5 in dix_main xserver/dix/main.c:271 #6 in main xserver/dix/stubmain.c:34 #7 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 previously allocated by thread T0 here: #0 in __interceptor_malloc libsanitizer/asan/asan_malloc_linux.cpp:69 #1 in AllocateGlyph xserver/render/glyph.c:355 #2 in ProcRenderAddGlyphs xserver/render/render.c:1085 #3 in Dispatch xserver/dix/dispatch.c:546 #4 in dix_main xserver/dix/main.c:271 #5 in main xserver/dix/stubmain.c:34 #6 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 SUMMARY: AddressSanitizer: heap-use-after-free xserver/render/glyph.c:252 in FreeGlyph To avoid that, make sure not to free the given glyph in AddGlyph(). v2: Simplify the test using the boolean returned from AddGlyph() (Michel) v3: Simplify even more by not freeing the glyph in AddGlyph() (Peter) Fixes: bdca6c3d1 - render: fix refcounting of glyphs during ProcRenderAddGlyphs Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1659 Signed-off-by: Olivier Fourdan Part-of: (cherry picked from commit 337d8d48b618d4fc0168a7b978be4c3447650b04) commit f54647dfa6e45481282c3650019449379059f113 Author: Willem Jan Palenstijn Date: Sun Mar 31 14:56:58 2024 +0200 mi: fix rounding issues around zero in miPointerSetPosition Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/577 This patch replaces the instances of trunc in miPointerSetPosition by floor, thereby removing the incorrect behaviour with subpixel pointer locations between -1 and 0. This is the relevant code fragment: /* In the event we actually change screen or we get confined, we just * drop the float component on the floor * FIXME: only drop remainder for ConstrainCursorHarder, not for screen * crossings */ if (x != trunc(*screenx)) *screenx = x; if (y != trunc(*screeny)) *screeny = y; The behaviour of this code does not match its comment for subpixel coordinates between -1 and 0. For example, if *screenx is -0.5, the preceding code would (correctly) clamp x to 0, but this would not be detected by this condition, since 0 == trunc(-0.5), leaving *screenx at -0.5, out of bounds. This causes undesirable behaviour in GTK3 code using xi2, where negative subpixel coordinates like this would (to all appearances randomly) remove the focus from windows aligned with the zero boundary when the mouse hits the left or top screen boundaries. The other occurences of trunc in miPointerSetPosition have a more subtle effect which would prevent proper clamping if there is a pointer limit at a negative integer rather than at 0. This patch changes these to floor for consistency. Signed-off-by: Willem Jan Palenstijn Part-of: (cherry picked from commit 0ee4ed286ea238e2ba2ca57227c3e66aca11f56b) commit 101caa1b03bc26b718f4618eb24104add5d14a4b Author: Povilas Kanapickas Date: Wed Apr 3 23:43:42 2024 +0300 xserver 21.1.12 Signed-off-by: Povilas Kanapickas commit 1173156404be826f50f453ca11bda28ccb5a5268 Author: Peter Hutterer Date: Tue Jan 30 13:13:35 2024 +1000 render: fix refcounting of glyphs during ProcRenderAddGlyphs Previously, AllocateGlyph would return a new glyph with refcount=0 and a re-used glyph would end up not changing the refcount at all. The resulting glyph_new array would thus have multiple entries pointing to the same non-refcounted glyphs. AddGlyph may free a glyph, resulting in a UAF when the same glyph pointer is then later used. Fix this by returning a refcount of 1 for a new glyph and always incrementing the refcount for a re-used glyph, followed by dropping that refcount back down again when we're done with it. CVE-2024-31083, ZDI-CAN-22880 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Part-of: (cherry picked from commit bdca6c3d1f5057eeb31609b1280fc93237b00c77) commit 0e34d8ebc98a0ba6f9f0a2f8f5045761bccc45d3 Author: Alan Coopersmith Date: Fri Mar 22 19:07:34 2024 -0700 Xquartz: ProcAppleDRICreatePixmap needs to use unswapped length to send reply CVE-2024-31082 Fixes: 14205ade0 ("XQuartz: appledri: Fix byte swapping in replies") Signed-off-by: Alan Coopersmith Part-of: (cherry picked from commit 6c684d035c06fd41c727f0ef0744517580864cef) commit cea92ca78f900bfb4c9a5540dfd631e065b9151b Author: Alan Coopersmith Date: Fri Mar 22 18:56:27 2024 -0700 Xi: ProcXIPassiveGrabDevice needs to use unswapped length to send reply CVE-2024-31081 Fixes: d220d6907 ("Xi: add GrabButton and GrabKeysym code.") Signed-off-by: Alan Coopersmith Part-of: (cherry picked from commit 3e77295f888c67fc7645db5d0c00926a29ffecee) commit 8a7cd0e3ef194610300c1a38fb5a5423b23dd6a5 Author: Alan Coopersmith Date: Fri Mar 22 18:51:45 2024 -0700 Xi: ProcXIGetSelectedEvents needs to use unswapped length to send reply CVE-2024-31080 Reported-by: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69762 Fixes: 53e821ab4 ("Xi: add request processing for XIGetSelectedEvents.") Signed-off-by: Alan Coopersmith Part-of: (cherry picked from commit 96798fc1967491c80a4d0c8d9e0a80586cb2152b) commit 5ca3a95135d9c89753e2af19da5a2615ea2be1c3 Author: Alan Coopersmith Date: Thu Mar 21 18:08:35 2024 -0700 Xext: SProcSyncCreateFence needs to swap drawable id too Otherwise it causes the server to return BadDrawable giving a byte-swapped resource id instead of the real id the client sent. Reported-by: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69762 Fixes: 397dfd9f8 ("Create/Destroy/Trigger/Reset/Query Fence Sync objs") Signed-off-by: Alan Coopersmith --- (cherry picked from commit e6573baa7d99a77f44229b9a96a41bbda57e2387) Part-of: commit 5d7272f05d9ef6bef93419febee3c9dfc63ec055 Author: Peter Hutterer Date: Sat Mar 23 10:42:33 2024 -0700 Allow disabling byte-swapped clients The X server swapping code is a huge attack surface, much of this code is untested and prone to security issues. The use-case of byte-swapped clients is very niche, so allow users to disable this if they don't need it, using either a config option or commandline flag. For Xorg, this adds the ServerFlag "AllowByteSwappedClients" "off". For all DDX, this adds the commandline options +byteswappedclients and -byteswappedclients to enable or disable, respectively. Fixes #1201 Signed-off-by: Peter Hutterer --- (cherry picked from commit 412777664a20dd3561b936c02c96571a756fe9b2) (cherry picked from commit af5cd5acc9012e527ee869f8e98bf6c2e9a02ca4) Backport to server-21.1-branch modified to keep byte-swapping enabled by default but easy to disable by users or admins (or even by distros shipping an xorg.conf.d fragment in their packages). Signed-off-by: Alan Coopersmith Part-of: commit 8a46a463f631ed52613d67f4088924acbbb6ca20 Author: Matthieu Herrb Date: Sun Dec 5 22:05:08 2021 +0100 Initialize Mode->name in xf86CVTMode() This was overlooked when converting the function to use libxcvt. Bring back name initialization from old code. This was causing a segfault in xf86LookupMode() if modes where name is NULL are present the modePool list. Signed-off-by: Matthieu Herrb --- (cherry picked from ed11c4d443ad2e82512df64358d38008e0ee7693) Reported-by: "Sergiy" Part-of: commit f653d9a0af912e577fab5c02b2a4eb380d33e8bb Author: Yusuf Khan Date: Sat Feb 17 12:38:10 2024 -0800 hw/xfree86: fix NULL pointer refrence to mode name Potentially, the pointer to the mode name could be unset, this can occur with the xf86-video-nv DDX, in that case there isnt much we can do except check if the next mode is any better. Signed-off-by: Yusuf Khan --- (cherry picked from db3aa4e03b180244e8b4b02272c49f1e0c48b463) Part-of: commit 8b75ec34dfbe435cd3a17e64138e22a37395a6d8 Author: Povilas Kanapickas Date: Sun Dec 19 18:11:07 2021 +0200 dix: Fix use after free in input device shutdown This fixes access to freed heap memory via dev->master. E.g. when running BarrierNotify.ReceivesNotifyEvents/7 test from xorg-integration-tests: ==24736==ERROR: AddressSanitizer: heap-use-after-free on address 0x619000065020 at pc 0x55c450e2b9cf bp 0x7fffc532fd20 sp 0x7fffc532fd10 READ of size 4 at 0x619000065020 thread T0 #0 0x55c450e2b9ce in GetMaster ../../../dix/devices.c:2722 #1 0x55c450e9d035 in IsFloating ../../../dix/events.c:346 #2 0x55c4513209c6 in GetDeviceUse ../../../Xi/xiquerydevice.c:525 ../../../Xi/xichangehierarchy.c:95 #4 0x55c450e3455c in RemoveDevice ../../../dix/devices.c:1204 ../../../hw/xfree86/common/xf86Xinput.c:1142 #6 0x55c450e17b04 in CloseDeviceList ../../../dix/devices.c:1038 #7 0x55c450e1de85 in CloseDownDevices ../../../dix/devices.c:1068 #8 0x55c450e837ef in dix_main ../../../dix/main.c:302 #9 0x55c4517a8d93 in main ../../../dix/stubmain.c:34 (/lib/x86_64-linux-gnu/libc.so.6+0x28564) #11 0x55c450d0113d in _start (/usr/lib/xorg/Xorg+0x117713d) 0x619000065020 is located 160 bytes inside of 912-byte region [0x619000064f80,0x619000065310) freed by thread T0 here: (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10d7cf) #1 0x55c450e19f1c in CloseDevice ../../../dix/devices.c:1014 #2 0x55c450e343a4 in RemoveDevice ../../../dix/devices.c:1186 ../../../hw/xfree86/common/xf86Xinput.c:1142 #4 0x55c450e17b04 in CloseDeviceList ../../../dix/devices.c:1038 #5 0x55c450e1de85 in CloseDownDevices ../../../dix/devices.c:1068 #6 0x55c450e837ef in dix_main ../../../dix/main.c:302 #7 0x55c4517a8d93 in main ../../../dix/stubmain.c:34 (/lib/x86_64-linux-gnu/libc.so.6+0x28564) previously allocated by thread T0 here: (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10ddc6) #1 0x55c450e1c57b in AddInputDevice ../../../dix/devices.c:259 #2 0x55c450e34840 in AllocDevicePair ../../../dix/devices.c:2755 #3 0x55c45130318f in add_master ../../../Xi/xichangehierarchy.c:152 ../../../Xi/xichangehierarchy.c:465 #5 0x55c4512cb9f5 in ProcIDispatch ../../../Xi/extinit.c:390 #6 0x55c450e6a92b in Dispatch ../../../dix/dispatch.c:551 #7 0x55c450e834b7 in dix_main ../../../dix/main.c:272 #8 0x55c4517a8d93 in main ../../../dix/stubmain.c:34 (/lib/x86_64-linux-gnu/libc.so.6+0x28564) The problem is caused by dev->master being not reset when disabling the device, which then causes dangling pointer when the master device itself is being deleted when exiting whole server. Note that RecalculateMasterButtons() requires dev->master to be still valid, so we can reset it only at the end of function. Signed-off-by: Povilas Kanapickas (cherry picked from commit 1801fe0ac3926882d47d7e1ad6c0518a2cdffd41) commit 31407c0199da877b359b2e37bb371804321279b7 Author: José Expósito Date: Tue Jan 16 10:15:15 2024 +0100 xserver 21.1.11 Signed-off-by: José Expósito commit a4f0e9466f3bc7073a8f0c28a581211c2d7adf0e Author: Olivier Fourdan Date: Wed Dec 6 11:51:56 2023 +0100 ephyr,xwayland: Use the proper private key for cursor The cursor in DIX is actually split in two parts, the cursor itself and the cursor bits, each with their own devPrivates. The cursor itself includes the cursor bits, meaning that the cursor bits devPrivates in within structure of the cursor. Both Xephyr and Xwayland were using the private key for the cursor bits to store the data for the cursor, and when using XSELINUX which comes with its own special devPrivates, the data stored in that cursor bits' devPrivates would interfere with the XSELINUX devPrivates data and the SELINUX security ID would point to some other unrelated data, causing a crash in the XSELINUX code when trying to (re)use the security ID. CVE-2024-0409 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 2ef0f1116c65d5cb06d7b6d83f8a1aea702c94f7) commit 8d825f72da71d6c38cbb02cf2ee2dd9e0e0f50f2 Author: Olivier Fourdan Date: Wed Dec 6 12:09:41 2023 +0100 glx: Call XACE hooks on the GLX buffer The XSELINUX code will label resources at creation by checking the access mode. When the access mode is DixCreateAccess, it will call the function to label the new resource SELinuxLabelResource(). However, GLX buffers do not go through the XACE hooks when created, hence leaving the resource actually unlabeled. When, later, the client tries to create another resource using that drawable (like a GC for example), the XSELINUX code would try to use the security ID of that object which has never been labeled, get a NULL pointer and crash when checking whether the requested permissions are granted for subject security ID. To avoid the issue, make sure to call the XACE hooks when creating the GLX buffers. Credit goes to Donn Seeley for providing the patch. CVE-2024-0408 Signed-off-by: Olivier Fourdan Acked-by: Peter Hutterer (cherry picked from commit e5e8586a12a3ec915673edffa10dc8fe5e15dac3) commit 5c4816afa7722ea47d1a7dea983a953e7b454d26 Author: Peter Hutterer Date: Fri Jan 5 09:40:27 2024 +1000 dix: when disabling a master, float disabled slaved devices too Disabling a master device floats all slave devices but we didn't do this to already-disabled slave devices. As a result those devices kept their reference to the master device resulting in access to already freed memory if the master device was removed before the corresponding slave device. And to match this behavior, also forcibly reset that pointer during CloseDownDevices(). Related to CVE-2024-21886, ZDI-CAN-22840 (cherry picked from commit 26769aa71fcbe0a8403b7fb13b7c9010cc07c3a8) commit 7b5694368b3f3b039fb523e66b816c1323f3cc39 Author: José Expósito Date: Fri Dec 22 18:28:31 2023 +0100 Xi: do not keep linked list pointer during recursion The `DisableDevice()` function is called whenever an enabled device is disabled and it moves the device from the `inputInfo.devices` linked list to the `inputInfo.off_devices` linked list. However, its link/unlink operation has an issue during the recursive call to `DisableDevice()` due to the `prev` pointer pointing to a removed device. This issue leads to a length mismatch between the total number of devices and the number of device in the list, leading to a heap overflow and, possibly, to local privilege escalation. Simplify the code that checked whether the device passed to `DisableDevice()` was in `inputInfo.devices` or not and find the previous device after the recursion. CVE-2024-21886, ZDI-CAN-22840 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit bc1fdbe46559dd947674375946bbef54dd0ce36b) commit 6236342157b9ddc9a4ebb3438e469a8cb37eaecb Author: Peter Hutterer Date: Thu Jan 4 10:01:24 2024 +1000 Xi: flush hierarchy events after adding/removing master devices The `XISendDeviceHierarchyEvent()` function allocates space to store up to `MAXDEVICES` (256) `xXIHierarchyInfo` structures in `info`. If a device with a given ID was removed and a new device with the same ID added both in the same operation, the single device ID will lead to two info structures being written to `info`. Since this case can occur for every device ID at once, a total of two times `MAXDEVICES` info structures might be written to the allocation. To avoid it, once one add/remove master is processed, send out the device hierarchy event for the current state and continue. That event thus only ever has exactly one of either added/removed in it (and optionally slave attached/detached). CVE-2024-21885, ZDI-CAN-22744 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit 4a5e9b1895627d40d26045bd0b7ef3dce503cbd1) commit 8887cb1f27c72324b50383b644cefb960e21f5ff Author: Peter Hutterer Date: Thu Dec 21 13:48:10 2023 +1000 Xi: when creating a new ButtonClass, set the number of buttons There's a racy sequence where a master device may copy the button class from the slave, without ever initializing numButtons. This leads to a device with zero buttons but a button class which is invalid. Let's copy the numButtons value from the source - by definition if we don't have a button class yet we do not have any other slave devices with more than this number of buttons anyway. CVE-2024-0229, ZDI-CAN-22678 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit df3c65706eb169d5938df0052059f3e0d5981b74) commit 7173a8911ebeaa7c9c12bd64a2ba9c8685c6593c Author: Peter Hutterer Date: Mon Dec 18 12:26:20 2023 +1000 dix: fix DeviceStateNotify event calculation The previous code only made sense if one considers buttons and keys to be mutually exclusive on a device. That is not necessarily true, causing a number of issues. This function allocates and fills in the number of xEvents we need to send the device state down the wire. This is split across multiple 32-byte devices including one deviceStateNotify event and optional deviceKeyStateNotify, deviceButtonStateNotify and (possibly multiple) deviceValuator events. The previous behavior would instead compose a sequence of [state, buttonstate, state, keystate, valuator...]. This is not protocol correct, and on top of that made the code extremely convoluted. Fix this by streamlining: add both button and key into the deviceStateNotify and then append the key state and button state, followed by the valuators. Finally, the deviceValuator events contain up to 6 valuators per event but we only ever sent through 3 at a time. Let's double that troughput. CVE-2024-0229, ZDI-CAN-22678 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit 219c54b8a3337456ce5270ded6a67bcde53553d5) commit c494debaa76c923621e6b9f54bbd59ed47842b30 Author: Peter Hutterer Date: Mon Dec 18 14:27:50 2023 +1000 dix: Allocate sufficient xEvents for our DeviceStateNotify If a device has both a button class and a key class and numButtons is zero, we can get an OOB write due to event under-allocation. This function seems to assume a device has either keys or buttons, not both. It has two virtually identical code paths, both of which assume they're applying to the first event in the sequence. A device with both a key and button class triggered a logic bug - only one xEvent was allocated but the deviceStateNotify pointer was pushed on once per type. So effectively this logic code: int count = 1; if (button && nbuttons > 32) count++; if (key && nbuttons > 0) count++; if (key && nkeys > 32) count++; // this is basically always true // count is at 2 for our keys + zero button device ev = alloc(count * sizeof(xEvent)); FixDeviceStateNotify(ev); if (button) FixDeviceStateNotify(ev++); if (key) FixDeviceStateNotify(ev++); // santa drops into the wrong chimney here If the device has more than 3 valuators, the OOB is pushed back - we're off by one so it will happen when the last deviceValuator event is written instead. Fix this by allocating the maximum number of events we may allocate. Note that the current behavior is not protocol-correct anyway, this patch fixes only the allocation issue. Note that this issue does not trigger if the device has at least one button. While the server does not prevent a button class with zero buttons, it is very unlikely. CVE-2024-0229, ZDI-CAN-22678 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit ece23be888a93b741aa1209d1dbf64636109d6a5) commit 4e78bc3a6e593f70aa5306b314edbec03d2f9081 Author: Peter Hutterer Date: Thu Dec 14 11:29:49 2023 +1000 dix: allocate enough space for logical button maps Both DeviceFocusEvent and the XIQueryPointer reply contain a bit for each logical button currently down. Since buttons can be arbitrarily mapped to anything up to 255 make sure we have enough bits for the maximum mapping. CVE-2023-6816, ZDI-CAN-22664, ZDI-CAN-22665 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit 9e2ecb2af8302dedc49cb6a63ebe063c58a9e7e3) commit c338d19f743ca5872ff74d6f2ce5d37d3b7f4a2a Author: Michael Wyraz Date: Fri Oct 14 15:07:27 2022 +0200 Removing the code that deletes an existing monitor in RRMonitorAdd In commit 7e1f86d4 monitor support was added to randr. At this time it seemed to be reasonable not to have more than one (virtual) monitor on a particular physical display. The code was never changed since. Nowadays, extremely large displays exists (4k displays, ultra-wide displays). In some use cases it makes sense to split these large physical displays into multiple virtual monitors. An example are ultra-wide screens that can be split into 2 monitors. The change in this commit makes this work. Besides that, removing a monitor in a function that is called "RRMonitorAdd" is bad practice and causes unexpected behaviour. commit 15e2409776014b41c77f7da7aeb9520613994d27 Author: Peter Hutterer Date: Wed Dec 13 11:12:59 2023 +1000 xserver 21.1.10 Signed-off-by: Peter Hutterer commit a7bda3080d2b44eae668cdcec7a93095385b9652 Author: Peter Hutterer Date: Tue Nov 28 15:19:04 2023 +1000 Xi: allocate enough XkbActions for our buttons button->xkb_acts is supposed to be an array sufficiently large for all our buttons, not just a single XkbActions struct. Allocating insufficient memory here means when we memcpy() later in XkbSetDeviceInfo we write into memory that wasn't ours to begin with, leading to the usual security ooopsiedaisies. CVE-2023-6377, ZDI-CAN-22412, ZDI-CAN-22413 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit 0c1a93d319558fe3ab2d94f51d174b4f93810afd) commit 58e83c683950ac9e253ab05dd7a13a8368b70a3c Author: Peter Hutterer Date: Mon Nov 27 16:27:49 2023 +1000 randr: avoid integer truncation in length check of ProcRRChange*Property Affected are ProcRRChangeProviderProperty and ProcRRChangeOutputProperty. See also xserver@8f454b79 where this same bug was fixed for the core protocol and XI. This fixes an OOB read and the resulting information disclosure. Length calculation for the request was clipped to a 32-bit integer. With the correct stuff->nUnits value the expected request size was truncated, passing the REQUEST_FIXED_SIZE check. The server then proceeded with reading at least stuff->num_items bytes (depending on stuff->format) from the request and stuffing whatever it finds into the property. In the process it would also allocate at least stuff->nUnits bytes, i.e. 4GB. CVE-2023-6478, ZDI-CAN-22561 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit 14f480010a93ff962fef66a16412fafff81ad632) commit c1ad8df2fc570c482af832681260864b98c47791 Author: nerdopolis Date: Tue Jan 11 18:41:42 2022 -0500 xephyr: Don't check for SeatId anymore After a change for the xserver to automatically determine the seat based on the XDG_SEAT variable, xephyr stopped working. This was because of an old feature where xephyr used to handle evdev directly. This was dropped some time ago, and now this check is not needed (cherry picked from commit 4c03b67d334b05b814239420776f2fdd4c4a98ac) commit 6197bea02eec072c19aa5365962e89949e674099 Author: Peter Hutterer Date: Wed Oct 25 11:05:28 2023 +1000 xserver 21.1.9 Signed-off-by: Peter Hutterer commit 3e290b3c7c3018acf1f08979d014fe3941c94f84 Author: Peter Hutterer Date: Thu Oct 5 12:19:45 2023 +1000 mi: reset the PointerWindows reference on screen switch PointerWindows[] keeps a reference to the last window our sprite entered - changes are usually handled by CheckMotion(). If we switch between screens via XWarpPointer our dev->spriteInfo->sprite->win is set to the new screen's root window. If there's another window at the cursor location CheckMotion() will trigger the right enter/leave events later. If there is not, it skips that process and we never trigger LeaveWindow() - PointerWindows[] for the device still refers to the previous window. If that window is destroyed we have a dangling reference that will eventually cause a use-after-free bug when checking the window hierarchy later. To trigger this, we require: - two protocol screens - XWarpPointer to the other screen's root window - XDestroyWindow before entering any other window This is a niche bug so we hack around it by making sure we reset the PointerWindows[] entry so we cannot have a dangling pointer. This doesn't handle Enter/Leave events correctly but the previous code didn't either. CVE-2023-5380, ZDI-CAN-21608 This vulnerability was discovered by: Sri working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson (cherry picked from commit 564ccf2ce9616620456102727acb8b0256b7bbd7) commit f2922f6ffa871b0d549878303ca09bc53cdadcf8 Author: Peter Hutterer Date: Tue Oct 3 11:53:05 2023 +1000 Xi/randr: fix handling of PropModeAppend/Prepend The handling of appending/prepending properties was incorrect, with at least two bugs: the property length was set to the length of the new part only, i.e. appending or prepending N elements to a property with P existing elements always resulted in the property having N elements instead of N + P. Second, when pre-pending a value to a property, the offset for the old values was incorrect, leaving the new property with potentially uninitalized values and/or resulting in OOB memory writes. For example, prepending a 3 element value to a 5 element property would result in this 8 value array: [N, N, N, ?, ?, P, P, P ] P, P ^OOB write The XI2 code is a copy/paste of the RandR code, so the bug exists in both. CVE-2023-5367, ZDI-CAN-22153 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer (cherry picked from commit 541ab2ecd41d4d8689e71855d93e492bc554719a) commit 2c33ee9f1d6da648a5176795608eb3138ef46e49 Author: Sam James Date: Wed Aug 2 12:33:19 2023 +0100 Switch to libbsd-overlay This is more portable than libbsd as everything Just Works, even on BSD systems, and is the recommended method of consuming libbsd nowadays. It also helpfully lets things work with glibc-provided functions for new enough glibc. [For the 21.1.x backport, take inspiration from @alanc's commit to libxdmcp at https://gitlab.freedesktop.org/xorg/lib/libxdmcp/-/commit/c01da8ebd0969efd15388ce999e121127cc46f67.] Closes: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/973 Co-authored-by: Guillem Jover (cherry picked from commit 94945a52746ee2612c6cd394692f49e2ed5fc56b) Signed-off-by: Sam James commit b98fc07d3442a289c6bef82df50dd0a2d01de71a Author: Adam Jackson Date: Thu Feb 2 12:26:27 2023 -0500 present: Send a PresentConfigureNotify event for destroyed windows This enables fixing a deadlock case on the client side, where the client ends up blocked waiting for a Present event that will never come because the window was destroyed. The new PresentWindowDestroyed flag allows the client to avoid blocking indefinitely. Signed-off-by: Adam Jackson See-also: https://gitlab.freedesktop.org/mesa/mesa/-/issues/116 See-also: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6685 Reviewed-by: Michel Dänzer (cherry picked from commit 462b06033e66a32308d940eb5fc47f5e4c914dc0) commit 7c791b15504cc86a929acaa88161f012cdbba59f Author: Olivier Fourdan Date: Wed Mar 29 13:58:30 2023 +0200 xserver 21.1.8 Signed-off-by: Olivier Fourdan commit fb51d5dd53b02422ea3b6f36bd017488d41f472d Author: Olivier Fourdan Date: Mon Mar 13 11:08:47 2023 +0100 composite: Fix use-after-free of the COW ZDI-CAN-19866/CVE-2023-1393 If a client explicitly destroys the compositor overlay window (aka COW), we would leave a dangling pointer to that window in the CompScreen structure, which will trigger a use-after-free later. Make sure to clear the CompScreen pointer to the COW when the latter gets destroyed explicitly by the client. This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson (cherry picked from commit 26ef545b3502f61ca722a7a3373507e88ef64110) commit 6bed5cfd515b9634ecf73fb884e4ec3388e8b7eb Author: Benno Schulenberg Date: Mon Mar 27 20:03:56 2023 +0200 xkbUtils: use existing symbol names instead of deleted deprecated ones Symbols `XK_Cyrillic_DZHE` and `XK_Serbian_DZE` were pure synonyms. (cherry picked from commit 6153c71cfb4698f1a416266564ecc748e4a25f2c) commit af9111ac7fa399a5a33fbfa145060e1850f41e0e Author: Peter Hutterer Date: Tue Feb 7 10:30:37 2023 +1000 xserver 21.1.7 Signed-off-by: Peter Hutterer commit 9ca7d3f61a88ae6cf47fdf139b6215d745db976b Author: Peter Hutterer Date: Wed Jan 25 11:41:40 2023 +1000 Xi: fix potential use-after-free in DeepCopyPointerClasses CVE-2023-0494, ZDI-CAN-19596 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer (cherry picked from commit 0ba6d8c37071131a49790243cdac55392ecf71ec) commit 4b925d388f76764dcb02dfd1cd7276262dcd7d74 Author: Mike Gorse Date: Wed Jan 25 02:02:48 2023 +0000 dix: Use CopyPartialInternalEvent in EnqueueEvent The event might be a DeviceEvent allocated on the stack, in AccessXKeyboardEvent for instance. Fixes out-of-bounds read. Signed-off-by: Mike Gorse (cherry picked from commit 2ef5ef57bd37a8bec2ac454053b283c6f87c3b40) commit 44d6c82ac82a78d904a6d47387ac363d9699b891 Author: Jeremy Huddleston Sequoia Date: Wed Jan 18 10:38:41 2023 -0800 darwin: Implement DetermineClientCmd for macOS Withoug a proper implementation of DetermineClientCmd, clients that connect via an ssh tunnel are miscategorized as local. This results in failures when we try to use SCM_RIGHTS (eg: in MIT-SHM). Fixes: https://github.com/XQuartz/XQuartz/issues/314 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 0ea9b595891f2f31915538192961f3404d9ca699) commit 1317083fbc407dc9dbb04ba5b98187b75222a16f Author: Jeremy Huddleston Sequoia Date: Wed Jan 18 12:19:05 2023 -0800 os: Use LOCAL_PEERPID from sys/un.h if it is available to detemine the pid when falling back on getpeereids() This provides a way to determine the pid of a peer connection on systems like darwin that do not support getpeerucred() nor SO_PEERCRED. Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 8a4ab2287398773a4868c220662d93bf84ec6241) commit a6c49106cef36e84eb11d64e325465250b7678be Author: Jeremy Huddleston Sequoia Date: Wed Jan 18 12:02:54 2023 -0800 os: Update GetLocalClientCreds to prefer getpeerucred() or SO_PEERCRED over getpeereid() GetLocalClientCreds() was preferring getpeereid() above other implementations. getpeereid(), however, only returns the effective uid and gid of the peer, leaving the pid unset. When this happens, we are unable to use the pid to determine the peer's command line arguments and incorrectly treat ssh-tunneled traffic as local. To address this, we now prioritize getpeerucred() or SO_PEERCRED as those two implementations will return the pid in addition to uid and gid. Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 165d5c1260edcb998c5cf31d3969723c7452aa7f) commit a220f53cb81248d06fb6f044c102c6ab8bffe2d5 Author: Jeremy Huddleston Sequoia Date: Wed Jan 18 10:44:27 2023 -0800 os: Update AllocNewConnection() debug logging to include whether or not the client is local Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 2577291f010e07173d0fc8b310ac355928f8ed7d) commit 07f9689507eee11bdbc2828ac1319fbde91ad27c Author: Jeremy Huddleston Sequoia Date: Sun Nov 27 22:25:49 2022 -0800 Revert "meson: Don't build COMPOSITE for XQuartz" This will allow us to remove build-time conditionalization on COMPOSITE while still allowing XQuartz to disable it and use ROOTLESS. This reverts commit 5f2d652377995c0c0c3cf07463b5018450661d13 (cherry picked from commit 66e7b7349dffda6fef51ed029fdc91b787ca4c08) commit 8ea43dd8bf8f8f2cb82a2a1f2c004ee873e7810d Author: Jeremy Huddleston Sequoia Date: Sun Nov 27 22:23:43 2022 -0800 xquartz: Disable COMPOSITE at runtime Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 2567388a2957cef526df1b7efb2684aa74feb641) commit aa0d8d440c39beb276cd26723d822728ce394e01 Author: Jeremy Huddleston Sequoia Date: Tue Jan 17 07:33:19 2023 -0800 xquartz: Update the about box copyright to 2023 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 15077090d371a2679d274c5d129a3102762d18ec) commit 8feba178f8b73b983033c197c384c580a6397a41 Author: Jeremy Huddleston Sequoia Date: Sat Jan 14 23:33:59 2023 -0800 xquartz: Fix building with autoconf Regressed-in: 5d302c378d9d21b34db2434425b766ac4f05de89 Signed-off-by: Jeremy Huddleston Sequoia commit c8ef9e38187e00dbaf956893f987e15e8f42f61c Author: Olivier Fourdan Date: Tue Jul 12 14:44:48 2022 +0200 dix: Fix overzealous caching of ResourceClientBits() Commit c7311654 cached the value of ResourceClientBits(), but that value depends on the `MaxClients` value set either from the command line or from the configuration file. For the latter, a call to ResourceClientBits() is issued before the configuration file is read, meaning that the cached value is from the default, not from the maximum number of clients set in the configuration file. That obviously causes all sort of issues, including memory corruption and crashes of the Xserver when reaching the default limit value. To avoid that issue, also keep the LimitClient value, and recompute the ilog2() value if that changes, as on startup when the value is set from the the xorg.conf ServerFlags section. v2: Drop the `cache == 0` test Rename cache vars Fixes: c7311654 - dix: cache ResourceClientBits() value Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1310 Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson (cherry picked from commit 2efa6d659508346358a1ef27b2393e18843f66a3) commit a0216de2367429788be4ef430026ada215106ff5 Author: Jeremy Huddleston Sequoia Date: Wed Dec 14 23:45:13 2022 -0800 rootless: Add additional debug logging to help triage XQuartz fb/rootless/damage crashes Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 07ed1a623a4b36cdb741a322008ba53d913dc765) commit 264272f3d76e4f1e50d984640c57de77aca9ba37 Author: Jeremy Huddleston Sequoia Date: Wed Dec 14 17:07:46 2022 -0800 xquartz: Use xorg_backtrace() instead of rolling our own for debugging Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit d1a9a50792110683ae3f993eeeffeee79cf9cbce) commit 20f380c6d93be3ef561251584163d1fe1ae2d966 Author: Jeremy Huddleston Sequoia Date: Wed Dec 21 01:18:11 2022 -0800 xquartz: Ignore SIGPIPE at process launch Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 9a66690eaf67c19b90e07f39b16436d34b59e27a) commit 59b6fc88ed9f4b22397a568c2483e4c558856ffa Author: Olivier Fourdan Date: Mon Dec 19 10:46:20 2022 +0100 xserver 21.1.6 Signed-off-by: Olivier Fourdan commit b7760d41c177983c2f2fca2ebdb8105628291720 Author: Peter Hutterer Date: Mon Dec 19 10:06:45 2022 +1000 Xext: fix invalid event type mask in XTestSwapFakeInput In commit b320ca0 the mask was inadvertently changed from octal 0177 to hexadecimal 0x177. Fixes commit b320ca0ffe4c0c872eeb3a93d9bde21f765c7c63 Xtest: disallow GenericEvents in XTestSwapFakeInput Found by Stuart Cassoff Signed-off-by: Peter Hutterer (cherry picked from commit bb1711b7fba42f2a0c7d1c09beee241a1b2bcc30) commit 69ab3bcaa0f6a5adef6ec19161eb856a4744b32c Author: Peter Hutterer Date: Wed Jul 13 11:23:09 2022 +1000 xkb: fix some possible memleaks in XkbGetKbdByName GetComponentByName returns an allocated string, so let's free that if we fail somewhere. Signed-off-by: Peter Hutterer (cherry picked from commit 18f91b950e22c2a342a4fbc55e9ddf7534a707d2) commit 5dbb2b52cfeab212b5c9b7e344692a6384efdc4c Author: Peter Hutterer Date: Tue Jul 5 12:06:20 2022 +1000 xkb: proof GetCountedString against request length attacks GetCountedString did a check for the whole string to be within the request buffer but not for the initial 2 bytes that contain the length field. A swapped client could send a malformed request to trigger a swaps() on those bytes, writing into random memory. Signed-off-by: Peter Hutterer (cherry picked from commit 11beef0b7f1ed290348e45618e5fa0d2bffcb72e) commit becf9d51c33a21e7700b18bb2324f466bb966de5 Author: Jeremy Huddleston Sequoia Date: Wed Dec 14 00:13:34 2022 -0800 xquartz: Fix some formatting Signed-off-by: Jeremy Huddleston Sequoia commit 61d18bed664769b1d94ea1320e27f71560a01af2 Author: John D Pell Date: Tue Jul 13 23:46:28 2021 -0700 XQuartz: stub: Call LSOpenApplication instead of fork()/exec() Reviewed-by: Jeremy Huddleston Sequoia commit f292fbfaac0c653ee49bbb24deb3add2b5da602f Author: Peter Hutterer Date: Wed Dec 14 11:34:41 2022 +1000 xserver 21.1.5 Signed-off-by: Peter Hutterer commit e860bbce4fdb169e84033529331ae2666e679de7 Author: Peter Hutterer Date: Mon Dec 5 15:55:54 2022 +1000 xkb: reset the radio_groups pointer to NULL after freeing it Unlike other elements of the keymap, this pointer was freed but not reset. On a subsequent XkbGetKbdByName request, the server may access already freed memory. CVE-2022-4283, ZDI-CAN-19530 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit ccdd431cd8f1cabae9d744f0514b6533c438908c) commit 8a1fa008b2f90abce6cabb27d9bc2ed76d07b678 Author: Peter Hutterer Date: Tue Nov 29 13:26:57 2022 +1000 Xi: avoid integer truncation in length check of ProcXIChangeProperty This fixes an OOB read and the resulting information disclosure. Length calculation for the request was clipped to a 32-bit integer. With the correct stuff->num_items value the expected request size was truncated, passing the REQUEST_FIXED_SIZE check. The server then proceeded with reading at least stuff->num_items bytes (depending on stuff->format) from the request and stuffing whatever it finds into the property. In the process it would also allocate at least stuff->num_items bytes, i.e. 4GB. The same bug exists in ProcChangeProperty and ProcXChangeDeviceProperty, so let's fix that too. CVE-2022-46344, ZDI-CAN 19405 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit 8f454b793e1f13c99872c15f0eed1d7f3b823fe8) commit 40f431de8a76f737c68ae659fee8472583f15e49 Author: Peter Hutterer Date: Tue Nov 29 13:24:00 2022 +1000 Xi: return an error from XI property changes if verification failed Both ProcXChangeDeviceProperty and ProcXIChangeProperty checked the property for validity but didn't actually return the potential error. Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit b8a84cb0f2807b07ab70ca9915fcdee21301b8ca) commit d6c7de9eadca980c8ce3b3b7752b67bfa95e6f31 Author: Peter Hutterer Date: Tue Nov 29 14:53:07 2022 +1000 Xext: free the screen saver resource when replacing it This fixes a use-after-free bug: When a client first calls ScreenSaverSetAttributes(), a struct ScreenSaverAttrRec is allocated and added to the client's resources. When the same client calls ScreenSaverSetAttributes() again, a new struct ScreenSaverAttrRec is allocated, replacing the old struct. The old struct was freed but not removed from the clients resources. Later, when the client is destroyed the resource system invokes ScreenSaverFreeAttr and attempts to clean up the already freed struct. Fix this by letting the resource system free the old attrs instead. CVE-2022-46343, ZDI-CAN 19404 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit 842ca3ccef100ce010d1d8f5f6d6cc1915055900) commit 67927cc41f452228188bbe2aa34a9ee4a9ce0c6b Author: Peter Hutterer Date: Wed Nov 30 11:20:40 2022 +1000 Xext: free the XvRTVideoNotify when turning off from the same client This fixes a use-after-free bug: When a client first calls XvdiSelectVideoNotify() on a drawable with a TRUE onoff argument, a struct XvVideoNotifyRec is allocated. This struct is added twice to the resources: - as the drawable's XvRTVideoNotifyList. This happens only once per drawable, subsequent calls append to this list. - as the client's XvRTVideoNotify. This happens for every client. The struct keeps the ClientPtr around once it has been added for a client. The idea, presumably, is that if the client disconnects we can remove all structs from the drawable's list that match the client (by resetting the ClientPtr to NULL), but if the drawable is destroyed we can remove and free the whole list. However, if the same client then calls XvdiSelectVideoNotify() on the same drawable with a FALSE onoff argument, only the ClientPtr on the existing struct was set to NULL. The struct itself remained in the client's resources. If the drawable is now destroyed, the resource system invokes XvdiDestroyVideoNotifyList which frees the whole list for this drawable - including our struct. This function however does not free the resource for the client since our ClientPtr is NULL. Later, when the client is destroyed and the resource system invokes XvdiDestroyVideoNotify, we unconditionally set the ClientPtr to NULL. On a struct that has been freed previously. This is generally frowned upon. Fix this by calling FreeResource() on the second call instead of merely setting the ClientPtr to NULL. This removes the struct from the client resources (but not from the list), ensuring that it won't be accessed again when the client quits. Note that the assignment tpn->client = NULL; is superfluous since the XvdiDestroyVideoNotify function will do this anyway. But it's left for clarity and to match a similar invocation in XvdiSelectPortNotify. CVE-2022-46342, ZDI-CAN 19400 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit b79f32b57cc0c1186b2899bce7cf89f7b325161b) commit a6c0d7b142e762a6b9934a23e060ea91ff5afcea Author: Peter Hutterer Date: Tue Nov 29 13:55:32 2022 +1000 Xi: disallow passive grabs with a detail > 255 The XKB protocol effectively prevents us from ever using keycodes above 255. For buttons it's theoretically possible but realistically too niche to worry about. For all other passive grabs, the detail must be zero anyway. This fixes an OOB write: ProcXIPassiveUngrabDevice() calls DeletePassiveGrabFromList with a temporary grab struct which contains tempGrab->detail.exact = stuff->detail. For matching existing grabs, DeleteDetailFromMask is called with the stuff->detail value. This function creates a new mask with the one bit representing stuff->detail cleared. However, the array size for the new mask is 8 * sizeof(CARD32) bits, thus any detail above 255 results in an OOB array write. CVE-2022-46341, ZDI-CAN 19381 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit 51eb63b0ee1509c6c6b8922b0e4aa037faa6f78b) commit 936d34bdff4c479ccd0405fc221ff8e4c6c7014d Author: Peter Hutterer Date: Tue Nov 29 12:55:45 2022 +1000 Xtest: disallow GenericEvents in XTestSwapFakeInput XTestSwapFakeInput assumes all events in this request are sizeof(xEvent) and iterates through these in 32-byte increments. However, a GenericEvent may be of arbitrary length longer than 32 bytes, so any GenericEvent in this list would result in subsequent events to be misparsed. Additional, the swapped event is written into a stack-allocated struct xEvent (size 32 bytes). For any GenericEvent longer than 32 bytes, swapping the event may thus smash the stack like an avocado on toast. Catch this case early and return BadValue for any GenericEvent. Which is what would happen in unswapped setups anyway since XTest doesn't support GenericEvent. CVE-2022-46340, ZDI-CAN 19265 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit b320ca0ffe4c0c872eeb3a93d9bde21f765c7c63) commit 5f2d652377995c0c0c3cf07463b5018450661d13 Author: Jeremy Huddleston Sequoia Date: Sun Nov 27 15:04:13 2022 -0800 meson: Don't build COMPOSITE for XQuartz Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 9c0373366988cc0b909ba31e61c43cc46e054b40) commit 3dee0aac2c0ed4538880b65ee528e4633d103592 Author: Jeremy Huddleston Sequoia Date: Thu Nov 24 10:58:26 2022 -0800 xquartz: Move default applications list outside of the main executable This will allow side-wide customization. Fixes: https://github.com/XQuartz/XQuartz/issues/274 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit e654de80ed560c480efc072d876808b1d78da052) commit 5d302c378d9d21b34db2434425b766ac4f05de89 Author: Jeremy Huddleston Sequoia Date: Thu Nov 24 11:04:08 2022 -0800 xquartz: Remove unused macro (X11LIBDIR) Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 3dbd809c0e2d8da4191dd4a3fd4abdd14be0d838) commit 6bf62381d0a1fb54226a10f9d0e6b03aff12f3aa Author: Povilas Kanapickas Date: Tue Jul 12 16:09:23 2022 +0300 xserver 21.1.4 commit 06b23cccb1166fcccc2f5fe7259b3ef9e1d0f32e Author: Peter Hutterer Date: Tue Jul 5 11:11:06 2022 +1000 xkb: add request length validation for XkbSetGeometry No validation of the various fields on that report were done, so a malicious client could send a short request that claims it had N sections, or rows, or keys, and the server would process the request for N sections, running out of bounds of the actual request data. Fix this by adding size checks to ensure our data is valid. ZDI-CAN 16062, CVE-2022-2319. This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer (cherry picked from commit 6907b6ea2b4ce949cb07271f5b678d5966d9df42) commit e3a530540f2f13739b0233ec51d7a3985a7ec4be Author: Peter Hutterer Date: Tue Jul 5 09:50:41 2022 +1000 xkb: swap XkbSetDeviceInfo and XkbSetDeviceInfoCheck XKB often uses a FooCheck and Foo function pair, the former is supposed to check all values in the request and error out on BadLength, BadValue, etc. The latter is then called once we're confident the values are good (they may still fail on an individual device, but that's a different topic). In the case of XkbSetDeviceInfo, those functions were incorrectly named, with XkbSetDeviceInfo ending up as the checker function and XkbSetDeviceInfoCheck as the setter function. As a result, the setter function was called before the checker function, accessing request data and modifying device state before we ensured that the data is valid. In particular, the setter function relied on values being already byte-swapped. This in turn could lead to potential OOB memory access. Fix this by correctly naming the functions and moving the length checks over to the checker function. These were added in 87c64fc5b0 to the wrong function, probably due to the incorrect naming. Fixes ZDI-CAN 16070, CVE-2022-2320. This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Introduced in c06e27b2f6fd9f7b9f827623a48876a225264132 Signed-off-by: Peter Hutterer (cherry picked from commit dd8caf39e9e15d8f302e54045dd08d8ebf1025dc) commit e75840565775dc95b848b366aeed44066a9d8a28 Author: Peter Hutterer Date: Tue Jul 5 12:40:47 2022 +1000 xkb: switch to array index loops to moving pointers Most similar loops here use a pointer that advances with each loop iteration, let's do the same here for consistency. No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Olivier Fourdan (cherry picked from commit f1070c01d616c5f21f939d5ebc533738779451ac) commit f3d9c6ff12b5a8a1a9f316b096d5573060747ff9 Author: Jeremy Huddleston Sequoia Date: Mon Jul 4 14:16:43 2022 -0700 xquartz: Add missing files to distribution tarball Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1346 Signed-off-by: Jeremy Huddleston Sequoia commit 147c17fc786c268ec51dc0f0655e69f6493f7ef2 Author: Jeremy Huddleston Sequoia Date: Sat Jul 2 14:15:50 2022 -0700 XQuartz: Improve type safety for X11Controller's application menu editor Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 4cfdc5af31ae8282903d0f65cff858330b9f9d1a) commit 9e2fc7e2484be7c577ee5baf3765734beef9adc2 Author: Jeremy Huddleston Sequoia Date: Sat Jul 2 14:17:18 2022 -0700 xquartz: Fix a possible crash when editing the Application menu due to mutaing immutable arrays Crashing on exception: -[__NSCFArray replaceObjectAtIndex:withObject:]: mutating method sent to immutable object Application Specific Backtrace 0: 0 CoreFoundation 0x00007ff80d2c5e9b __exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007ff80d027e48 objc_exception_throw + 48 2 CoreFoundation 0x00007ff80d38167b _CFThrowFormattedException + 194 3 CoreFoundation 0x00007ff80d382a25 -[__NSCFArray removeObjectAtIndex:].cold.1 + 0 4 CoreFoundation 0x00007ff80d2e6c0b -[__NSCFArray replaceObjectAtIndex:withObject:] + 119 5 X11.bin 0x00000001003180f9 -[X11Controller tableView:setObjectValue:forTableColumn:row:] + 169 Fixes: https://github.com/XQuartz/XQuartz/issues/267 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit dfd057996b26420309c324ec844a5ba6dd07eda3) commit 86ace20398a6c559e89213622538134b72e448b1 Author: Jeremy Huddleston Sequoia Date: Fri Jul 1 14:26:06 2022 -0700 xquartz: Use correct defines when building to support Sparkle updates Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit aa636b97c66343b25e508b9c73d8505e8c11b1d9) commit 855b96a85bc0711460a2542573a9a3959d1bfefa Author: Povilas Kanapickas Date: Sun Dec 19 16:51:39 2021 +0200 xfree86: Fix event data alignment in inputtest driver This fixes address sanitizer errors when running unit tests. The additional copying may reduce performance by a small amount, but we don't care about that because this driver is used for testing only. Signed-off-by: Povilas Kanapickas (cherry picked from commit 7d2014e7d523e10623203582b9f573303750f087) commit 9d05ee10c231edacc69b342677ae8c3cc32f97e5 Author: Povilas Kanapickas Date: Sun Jan 16 10:42:15 2022 +0200 dix: Don't send touch end to clients that do async grab without touches GTK3 menu widget creates a selection for touch and other events and after receiving touch events creates an async grab that excludes touch events. Unfortunately it relies on X server not sending the touch end event in order to function properly. Sending touch end event will cause it to think that the initiating touch ended and when it actually ends, the ButtonRelease event will make it think that the menu should be closed. As a result, the menu will be open only for the duration of the touch making it useless. This commit reverts f682e0563f736ed2c2c612ed575e05b6e3db945e. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1255 Signed-off-by: Povilas Kanapickas (cherry picked from commit 43e934a19f644cddedae73602e86429c9dc5074a) commit b713e717c34d539486f661c03a0f1b35b3208d21 Author: Povilas Kanapickas Date: Sun Jan 23 22:18:52 2022 +0200 dix: Correctly save replayed event into GrabInfoRec When processing events we operate on InternalEvent pointers. They may actually refer to a an instance of DeviceEvent, GestureEvent or any other event that comprises the InternalEvent union. This works well in practice because we always look into event type before doing anything, except in the case of copying the event. *dst_event = *src_event would copy whole InternalEvent event and would cause out of bounds read in case the pointed to event was not InternalEvent but e.g. DeviceEvent. This regression has been introduced in 23a8b62d34344575f9df9d057fb74bfefa94a77b. Fixes https://gitlab.freedesktop.org/xorg/xserver/-/issues/1261 Signed-off-by: Povilas Kanapickas (cherry picked from commit 6ef5c05728f8b18170fbc8415d7502495a08670b) commit cd3d21d8c44a35c22b7eca61a58bb5620b116102 Author: Samuel Thibault Date: Wed Jan 26 00:05:55 2022 +0100 xkb: fix XkbSetMap when changing a keysym without changing a keytype As the comment says: "symsPerKey/mapWidths must be filled regardless of client-side flags" so we always have to call CheckKeyTypes which will notably fill mapWidths and nTypes. That is needed for CheckKeySyms to work since it checks the width. Without it, any request with XkbKeySymsMask but not XkbKeyTypesMask will fail because of the missing width information, for instance this: XkbDescPtr xkb; if (!(xkb = XkbGetMap (dpy, XkbKeyTypesMask|XkbKeySymsMask, XkbUseCoreKbd))) { fprintf (stderr, "ERROR getting map\n"); exit(1); } XFlush (dpy); XSync (dpy, False); XkbMapChangesRec changes = { .changed = 0 }; int oneGroupType[XkbNumKbdGroups] = { XkbOneLevelIndex }; if (XkbChangeTypesOfKey(xkb, keycode, 1, XkbGroup1Mask, oneGroupType, &changes)) { fprintf(stderr, "ERROR changing type of key\n"); exit(1); } XkbKeySymEntry(xkb,keycode,0,0) = keysym; if (!XkbChangeMap(dpy,xkb,&changes)) { fprintf(stderr, "ERROR changing map\n"); exit(1); } XkbFreeKeyboard (xkb, 0, TRUE); XFlush (dpy); XSync (dpy, False); This had being going under the radar since about ever until commit de940e06f8733d87bbb857aef85d830053442cfe ("xkb: fix key type index check in _XkbSetMapChecks") fixed checking the values of kt_index, which was previously erroneously ignoring errors and ignoring all other checks, just because nTypes was not set, precisely because CheckKeyTypes was not called. Note: yes, CheckKeyTypes is meant to be callable without XkbKeyTypesMask, it does properly check for that and just fills nTypes and mapWidths in that case. Signed-off-by: Samuel Thibault (cherry picked from commit 0217cc6e0cf5013366105a90f5f91ccc4bab5425) commit f575524314e9f20a1ff639f6bd65386cdbd083f4 Author: Povilas Kanapickas Date: Thu Feb 3 20:04:52 2022 +0200 Revert "os: Try to discover the current seat with the XDG_SEAT var first" This reverts commit b27eaa72837eebe80adfe6c257a71a6b9eaf66ee. commit 419fbf639d8f53d39449c157a9554bd5482ed64f Author: Jeremy Huddleston Sequoia Date: Sun Jun 26 10:31:54 2022 -0700 XQuartz: Add TCC reason keys to Info.plist Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 9ce7264889e36fddbdf6bac332225ad6f628ad5d) commit 66ac50090dd191f1b16daf338ca3b46d9147fbbd Author: Jeremy Huddleston Sequoia Date: Sun Jun 26 02:40:20 2022 -0700 XQuartz: Build the bundle trampoline when using meson This brings the change for e1fdc856aedfcb4788011415930a0c6861df5123 into meson based builds Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit b00cf4aef881e00533f995c141c3586749cd7ca1) commit 033d93a021e86dd5ce9b2b3a1554a72c7031a7f2 Author: Jeremy Huddleston Sequoia Date: Mon Jun 20 17:08:53 2022 -0700 meson: Support building Xnest and Xorg on darwin Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit ef8101560eefd6160df6d4b57ddb65ea2328c441) commit 433f53a1a08390a038176b7c1207512cf1dd3f44 Author: Jeremy Huddleston Sequoia Date: Mon Jun 20 20:19:06 2022 -0700 tests: Fix build failure from missing micmap.c 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 (cherry picked from commit 6645ff59069d603806d749e8af73893cf88d2c06) commit 3868f364728ae0cc35621bbfdd36bfa2e3f09fda Author: Jeremy Huddleston Sequoia Date: Mon Jun 20 20:05:46 2022 -0700 xf86-input-inputtest: Fix build on systems without SOCK_NONBLOCK Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 707f23dab8787b4154011186206dc9964e2ebc11) commit afcaaac96767d773422512e755e5ad3691a0627c Author: Jeremy Huddleston Sequoia Date: Mon Jun 20 19:51:39 2022 -0700 print_edid: Fix a format string error ../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 (cherry picked from commit 199b8c0853c92ce19a589186f326621477401b74) commit 6bb98fc62ddf8b0dd90f7b0b45978a0d0425ed5a Author: Jeremy Huddleston Sequoia Date: Tue Jun 21 11:46:14 2022 -0700 xquartz: Update autotools-based builds of XQuartz to account for recent changes Signed-off-by: Jeremy Huddleston Sequoia commit 4ea6f661edbbd84b3f2b308675bd2aa848b53746 Author: Jeremy Huddleston Sequoia Date: Mon Jun 20 20:32:26 2022 -0700 Revert "meson: Bump requirement to meson-0.50.0" This bump is causing issues with our CI. Sorry about that. This reverts commit a6a20a7c40f86b5586286aaa614e6b64a5987d82 (cherry picked from commit 8cd0397e5b4c1f0e0add1fea67f82b811214bf3e) commit a6a20a7c40f86b5586286aaa614e6b64a5987d82 Author: Jeremy Huddleston Sequoia Date: Sun Jun 19 23:06:40 2022 -0700 meson: Provide options to set CFBundleVersion and CFBundleVersionString in XQuartz Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 4f5999826aa478ba5f138e74cfccdf3b854c8e54) commit 37285e6252ce3afca5bc205121f83271548dfca9 Author: Jeremy Huddleston Sequoia Date: Sun Jun 19 19:56:26 2022 -0700 xquartz: Update copyright for 2022 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit b12f5dc62d964d0279e1fa9403259cfd8e491285) commit 96e7b55c5d6898a6715b62d5e01581617d218997 Author: Jeremy Huddleston Sequoia Date: Sun Jun 19 19:55:44 2022 -0700 xquartz: Update Sparkle configuration to use SUPublicEDKey Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 1d90bef30c4dfe13dd5e70fea606a02380cbcee6) commit 6465263be8ae98283f8e99a3e95d04e786386040 Author: Jeremy Huddleston Sequoia Date: Sun Jun 19 22:18:16 2022 -0700 meson: Bump requirement to meson-0.50.0 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 (cherry picked from commit 0a27f96d1d0e474b308be982fa7069d3ae0d9892) commit e48acd9c40c09b7c66a7bfc6650afc216ba78cca Author: Jeremy Huddleston Sequoia Date: Thu Jun 16 00:10:26 2022 -0700 XQuartz: Ensure scroll events are delivered to a single window (not both X11 and AppKit) Fixes: https://github.com/XQuartz/XQuartz/issues/130 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 4532b696c644cb7f21e96cf76d3e6b21ccc0e309) commit 140d9a0f75194d4079d5cd1e4ad4683c6f47683e Author: Jeremy Huddleston Sequoia Date: Sat Feb 20 14:21:01 2021 -0800 xquartz: Fold spaces related preferences into NSUserDefaults+XQuartzDefaults Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit f40610e0b4f2b4ae54ef6bbff756cb4a60e17e3b) commit 03ec5b132f0b3e07f9340faaacaa2455717fd8d1 Author: Jeremy Huddleston Sequoia Date: Sat Feb 20 14:00:14 2021 -0800 xquartz pbproxy: Adopt NSUserDefaults+XQuartzDefaults for preferences Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 6134c73aebc3f928639e8f802be49ec8ecc17e66) commit 6df6178bb917f596ec2f61a3aabf99eea620b6ec Author: Jeremy Huddleston Sequoia Date: Fri Feb 19 22:49:11 2021 -0800 xquartz: Create a separate category for organizing user preferences Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 963ba6d9adf578ec8d7ed12ae22dece76b895172) commit c6c1cba397ffa203123a8a6690dee728089e7325 Author: Jeremy Huddleston Sequoia Date: Sat Sep 10 22:32:56 2016 -0700 os/connection: Improve abstraction for launchd secure sockets This changes away from hard-coding the /tmp/launch-* path to now supporting a generic [.] format for $DISPLAY. cf-libxcb: d978a4f69b30b630f28d07f1003cf290284d24d8 Signed-off-by: Jeremy Huddleston Sequoia CC: Adam Jackson (cherry picked from commit 83d0d911069d502232d719882cd1c5cd090defa1) commit 663af2f17eec2cc064f3d1e25e00fb840c441964 Author: Jeremy Huddleston Sequoia Date: Sun Jun 12 22:06:01 2022 -0700 X11Application: Ensure TIS operations are done on the main thread Fixes: https://github.com/XQuartz/XQuartz/issues/205 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit b1afcecc61d841f95e786e4f4f84184f91d149f1) commit bd3564cf377deace41b359740331d84e3086e916 Author: Jeremy Huddleston Sequoia Date: Fri Apr 23 02:15:30 2021 -0700 rootless: Dead code removal (ROOTLESS_REDISPLAY_DELAY is already defined) Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit c11b55f3c0c64645bca964aece825de0bdd92b1f) commit 53173fdab492f0f638f6616fcf01af0b9ea6338d Author: Olivier Fourdan Date: Thu Jan 20 10:20:38 2022 +0100 render: Fix build with gcc 12 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 Acked-by: Michel Dänzer Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1256 (cherry picked from commit c6b0dcb82d4db07a2f32c09a8c09c85a5f57248e) commit 69774044716039fa70655b3bc6dd6a4ff4535cfd Author: Błażej Szczygieł Date: Thu Jan 13 00:47:27 2022 +0100 present: Check for NULL to prevent crash Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1275 Signed-off-by: Błażej Szczygieł Tested-by: Aaron Plattner (cherry picked from commit 22d5818851967408bb7c903cb345b7ca8766094c) commit 85397cc2efe8fa73461cd21afe700829b2eca768 Author: Povilas Kanapickas Date: Mon Jan 3 00:23:30 2022 +0200 xserver 21.1.3 Signed-off-by: Povilas Kanapickas commit 001feb6692b77254db6a4906a82fa1bdadfd7b85 Author: Adam Jackson Date: Tue Oct 26 11:46:37 2021 -0400 glx/dri: Filter out fbconfigs that don't have a supported pixmap format 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) commit 66890ca569291a53ea9cdc6ec19070173e522260 Author: Jocelyn Falempe Date: Fri Dec 17 10:18:25 2021 +0100 xf86/logind: fix missing call to vtenter if the platform device is not paused 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 Tested-by: Olivier Fourdan Reviewed-by: Hans de Goede commit fec0e2501b424ec6cfbf4c7983727acfafea0ccb Author: Jocelyn Falempe Date: Thu Dec 16 15:46:43 2021 +0100 xf86/logind: Fix compilation error when built without logind/platform bus 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 Reviewed-by: Hans de Goede commit 8223a9d6d9ed2b9a4c1e6373f6ab854fdbda9ead Author: Matthieu Herrb Date: Tue Nov 16 23:38:46 2021 +0100 Convert more funcs to use InternalEvent. 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 (cherry picked from commit 5b8817a019845e1066c373022133985a0e2d718f) commit b27eaa72837eebe80adfe6c257a71a6b9eaf66ee Author: nerdopolis Date: Fri Oct 8 18:15:29 2021 -0400 os: Try to discover the current seat with the XDG_SEAT var first (cherry picked from commit ca1dfdc9aa4b548de624d3a9af5147a998ba3d79) commit 9852b29380673484aea25771a3e812c8e8a40393 Author: Povilas Kanapickas Date: Wed Dec 15 15:46:09 2021 +0200 xserver 21.1.2 Signed-off-by: Povilas Kanapickas commit 9fe2991075aca3321d59d03f3e45faca6cb718b8 Author: Sam James Date: Wed Dec 15 10:41:22 2021 +0200 hw/xfree86: fix sbus build for SPARC 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 (cherry picked from commit 6c1a1fcc4bff90546ebc954f428c6df97005ea50) commit 0b67785cd13e65d37416f75ab938bdc49cf4732f Author: Povilas Kanapickas Date: Wed Dec 15 10:41:21 2021 +0200 render: Fix out of bounds access in SProcRenderCompositeGlyphs() 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 (cherry picked from commit ebce7e2d80e7c80e1dda60f2f0bc886f1106ba60) commit 7209982d2a89f2e27d2f83f8952e9512be813aa4 Author: Povilas Kanapickas Date: Wed Dec 15 10:41:20 2021 +0200 Xext: Fix out of bounds access in SProcScreenSaverSuspend() 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 (cherry picked from commit 6c4c53010772e3cb4cb8acd54950c8eec9c00d21) commit 6f09e7d3913a8188e32062f5e196bebb06bab140 Author: Povilas Kanapickas Date: Wed Dec 15 10:41:19 2021 +0200 xfixes: Fix out of bounds access in *ProcXFixesCreatePointerBarrier() 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 (cherry picked from commit b5196750099ae6ae582e1f46bd0a6dad29550e02) commit a82d523edb30e5856adca9f258ac716108c71f19 Author: Povilas Kanapickas Date: Wed Dec 15 10:41:18 2021 +0200 record: Fix out of bounds access in SwapCreateRegister() 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 (cherry picked from commit e56f61c79fc3cee26d83cda0f84ae56d5979f768) commit a39218d99c6961dda0142d9956eb7404a37d9bd2 Author: Matthieu Herrb Date: Wed Dec 15 10:41:17 2021 +0200 remove the PRE_RELEASE message. With the new numbering scheme, XORG_VERISON_SNAP doesn't mean a pre-release version anymore. Signed-off-by: Matthieu Herrb (cherry picked from commit 4de9666b6d3c86660d728ddfc13d88700e5ff20d) commit fc2eb7e8cc19a41e034f2f4286af58f8b4825d65 Author: Matt Turner Date: Tue Dec 7 21:39:58 2021 -0800 test: #undef NDEBUG so assert is not compiled away (cherry picked from commit d189102c783653a10931051175de24277a157331) commit 7caf29ca6607ddf4c19a81d19c0f4acc6deb8936 Author: Povilas Kanapickas Date: Sat Nov 13 16:42:36 2021 +0200 meson: Correctly set DDXOSVERRORF and DDXBEFORERESET on xwin This worked with autotools, but not meson build system. Signed-off-by: Povilas Kanapickas (cherry picked from commit 04c93b98e9e4593aa2e6701bb08f5e27c3544d8a) commit 101791f80fdefea738421a414177899db7c76e83 Author: Jonathan Gray Date: Fri Dec 3 19:17:18 2021 +1100 glamor: fix free of uninitialised pointers 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 Reviewed-by: Olivier Fourdan Fixes: 2906ee5e4 ("glamor: Fix leak in glamor_build_program()") (cherry picked from commit 5ac6319776b13f96a2b336da4b35237618a5b001) commit 2c6989f81e62bac05a583c39fa09a06172d1ece5 Author: Peter Hutterer Date: Thu Dec 2 10:41:03 2021 +1000 xkb: fix XkbSetMap check for the keytypes count 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 (cherry picked from commit be16bd8543f80ad2933ec9c37f082617c7084165) commit 49444ce9f7ad34fff6ff94a9db95337f4bfd7b03 Author: Povilas Kanapickas Date: Sat Nov 13 17:23:54 2021 +0200 Revert "hw/xfree86: Propagate physical dimensions from DRM connector" 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 (cherry picked from commit 35af1299e73483eaf93d913a960e1d1738bc7de6) commit 6f11b3c803898e0effe6ade2ae951f5758936152 Author: Dave Airlie Date: Thu Nov 11 06:35:19 2021 +1000 dri2: add crocus to the list of va_gl users (cherry picked from commit a7b0a7fabd137183cc42a5edb15697e354c4450c) commit 8eb1396d3ecfd2bf968105a99759ae9445bdf768 Author: Jocelyn Falempe Date: Thu Nov 18 14:51:21 2021 +0100 xf86/logind: Fix drm_drop_master before vt_reldisp 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 Reviewed-by: Hans de Goede (cherry picked from commit da9d012a9c760896941769d4127e3cfb1a7a9f03) commit 6834f977a5eadbc3289f27b2bb83997132a39fdd Author: Jocelyn Falempe Date: Thu Nov 18 14:45:42 2021 +0100 xf86/logind: fix call systemd_logind_vtenter after receiving drm device resume 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 Reviewed-by: Hans de Goede (cherry picked from commit f5bd039633fa8360a10bd2aabb0111571f6275b0) commit 0ed7b1224ef17ff3d27e791e03e0d98dd6373c8a Author: nerdopolis Date: Fri Oct 8 21:51:43 2021 -0400 xfree86: On Linux, while only seat0 can have TTYs, don't assmume all seat0s have TTYs (cherry picked from commit b8c12aac651d626c5120e6e8e18b42e7528caf43) commit 6b997fb74e5c9473ee3989fca8d592a3a0d16067 Author: Povilas Kanapickas Date: Sun Nov 7 01:33:56 2021 +0200 xserver 21.1.1 Signed-off-by: Povilas Kanapickas commit 70a0c48ff3bb7e3392035ef333cc5c8453508f33 Author: Povilas Kanapickas Date: Sat Nov 6 20:09:48 2021 +0200 Makefile.am: Add missing meson build files to release tarball commit db0da823f55734baf4c1e4de680e7091f33aac17 Author: Matthieu Herrb Date: Sun Oct 31 11:28:28 2021 +0100 Make xf86CompatOutput() return NULL when there are no privates Some drivers (mach64 w/o DRI for instance) don't initialize privates. Signed-off-by: Matthieu Herrb (cherry picked from commit 80eeff3ebac772e25c9107199989e677457dbe06) commit fdb266ff814f6abb6ce006ecbac5ba78a92cdbca Author: Jon Turney Date: Tue Nov 2 14:04:08 2021 +0000 s/__/@/ in inputtestdrv manpage Update manpage subsitution style for 2e497bf8 (cherry picked from commit 0099412ea4347b02e61ea21946f309f2535cc07b) commit 27a0ee32ccef8d621aaa758c804fc9a5ceeb5a56 Author: Povilas Kanapickas Date: Wed Oct 27 13:36:45 2021 +0300 xserver 21.1 Signed-off-by: Povilas Kanapickas commit d4944ceda1727180bbee1c582b4ac0796c2748cc Author: Mario Kleiner Date: Mon Oct 18 08:14:04 2021 +0200 Fix RandR leasing for more than 1 simultaneously active lease. 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 Cc: Keith Packard (cherry picked from commit f467f85ca1f780d5c7cf3c20888e399708d761ac) commit e59faa4b8cc5aaa19474a5e7ca3a99d08006f8c5 Author: Povilas Kanapickas Date: Thu Oct 14 17:33:40 2021 +0300 xserver 21.1 RC 2 commit 3fb94f3c5ca73f15a78dbc6904380b9b9e402bf4 Author: Alex Richardson Date: Fri Jul 23 09:23:45 2021 +0100 dix/privates.c: Avoid undefined behaviour after realloc() 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 (cherry picked from commit f9f705bf3cf0d169d54a70f235cc99e106dbda43) commit b89fdd523e2c9e9b0cdf37b263833c4b0a8868b8 Author: nerdopolis Date: Thu Sep 30 08:51:18 2021 -0400 xf86: Accept devices with the 'simpledrm' driver. SimpleDRM 'devices' are a fallback device, and do not have a busid so they are getting skipped. This will allow simpledrm to work with the modesetting driver (cherry picked from commit b9218fadf3c09d83566549279d68886d8258f79c) commit fbc690ccaf12d6536951d0ba403dfbb92c7c4115 Author: Mario Kleiner Date: Fri Oct 1 09:47:41 2021 +0200 modesetting: Consider RandR primary output for selectioh of sync crtc. The "sync crtc" is the crtc used to drive the display timing of a drawable under DRI2 and DRI3/Present. If a drawable intersects multiple video outputs, then normally the crtc is chosen which has the largest intersection area with the drawable. If multiple outputs / crtc's have exacty the same intersection area then the crtc chosen was simply the first one with maximum intersection. Iow. the choice was random, depending on plugging order of displays. This adds the ability to choose a preferred output in such a tie situation. The RandR output marked as "primary output" is chosen on such a tie. This new behaviour and its implementation is consistent with other video ddx drivers. See amdgpu-ddx, ati-ddx and nouveau-ddx for reference. This commit is a straightforward port from amdgpu-ddx. Signed-off-by: Mario Kleiner (cherry picked from commit 4b75e65766a9ef3a26d4c1c9d7af9fc6d1d7be5b) commit 22f4ff1026eeffc566f87453d7f1f70dc23ad4e0 Author: Mario Kleiner Date: Fri Oct 1 08:49:10 2021 +0200 modesetting: Handle mixed VRR and non-VRR display setups better. In a setup with both VRR capable and non-VRR capable displays, it was so far inconsistent if the driver would allow use of VRR support or not, as "is_connector_vrr_capable" was set to whatever the capabilities of the last added drm output were. Iow. the plugging order of monitors determined the outcome. Fix this: Now if at least one display is VRR capable, the driver will treat an X-Screen as capable for VRR, plugging order no longer matters. Tested with a dual-display setup with one VRR monitor and one non-VRR monitor. This is also beneficial with the new Option "AsyncFlipSecondaries". When we are at it, also add some so far missing description of the "VariableRefresh" driver option, copied from amdgpu-ddx. Signed-off-by: Mario Kleiner (cherry picked from commit 017ce263376aa64a495c4d71a140a24b1dff7054) commit 0d0986bf3b924ccb26e4bc6a8c06aed41f238683 Author: Mario Kleiner Date: Fri Oct 1 07:42:01 2021 +0200 modesetting: Enable GAMMA_LUT for lut's with up to 4096 slots. A lut size of 4096 slots has been verified to work correctly, as tested with amdgpu-kms. Intel Tigerlake Gen12 hw has a very large GAMMA_LUT size of 262145 slots, but also issues with its current GAMMA_LUT implementation, as of Linux 5.14. Therefore we keep GAMMA_LUT off for large lut's. This currently excludes Intel Icelake, Tigerlake and later. This can be overriden via the "UseGammaLUT" boolean xorg.conf option to force use of GAMMA_LUT on or off. See following link for the Tigerlake situation: https://gitlab.freedesktop.org/drm/intel/-/issues/3916#note_1085315 Signed-off-by: Mario Kleiner (cherry picked from commit 66e5a5bb12c58413a4d71781c5a7f63f675bfe55) commit bc1327e6de82da560c97f66c9c196d9bbd2d24be Author: Ray Strode Date: Mon Oct 4 14:27:54 2021 -0400 xkb: Drop check for XkbSetMapResizeTypes Commit 446ff2d3177087b8173fa779fa5b77a2a128988b added checks to prevalidate the size of incoming SetMap requests. That commit checks for the XkbSetMapResizeTypes flag to be set before allowing key types data to be processed. key types data can be changed or even just sent wholesale unchanged without the number of key types changing, however. The check for XkbSetMapResizeTypes rejects those legitimate requests. In particular, XkbChangeMap never sets XkbSetMapResizeTypes and so always fails now any time XkbKeyTypesMask is in the changed mask. This commit drops the check for XkbSetMapResizeTypes in flags when prevalidating the request length. (cherry picked from commit 8b7f4d3259e8b7d1eb3d8a83e8852989e869596a) commit b87536682c185b6a825525d01e95e264018c0997 Author: Mario Kleiner Date: Tue Sep 14 07:52:33 2021 +0200 Revert "modesetting: Only use GAMMA_LUT if its size is 1024" This reverts commit 617f591fc44e24413e1f91017d16734999bbbac1. The problem described in that commit exists, but the two preceeding commits with improvements to the servers RandR code should avoid the mentioned problems while allowing the use of GAMMA_LUT's instead of legacy gamma lut. Use of legacy gamma lut's is not a good fix, because it will reduce color output precision of gpu's with more than 1024 GAMMA_LUT slots, e.g., AMD, ARM MALI and KOMEDA with 4096 slot luts, and some Mediathek parts with 512 slot luts. On KOMEDA, legacy lut's are completely unsupported by the kms driver, so gamma correction gets disabled. The situation is especially bad on Intel Icelake and later: Use of legacy gamma tables will cause the kms driver to switch to hardware legacy lut's with 256 slots, 8 bit wide, without interpolation. This way color output precision is restricted to 8 bpc and any deep color / HDR output (10 bpc, fp16, fixed point 16) becomes impossible. The latest Intel gen gpu's would have worse color precision than parts which are more than 10 years old. Signed-off-by: Mario Kleiner (cherry picked from commit 545fa90cbf37a4c18f013dabc9f3bfb8310a5a98) commit 473a48660fc8a326312df2d5925017ce8152c7db Author: Mario Kleiner Date: Tue Sep 14 07:51:46 2021 +0200 xfree86: Let xf86RandR12CrtcComputeGamma() deal with non-power-of-2 sizes. The assumption in the upsampling code was that the crtc->gamma_size size of the crtc's gamma table is a power of two. This is true for almost all current driver + gpu combos at least on Linux, with typical sizes of 256, 512, 1024 or 4096 slots. However, Intel Gen-11 Icelake and later are outliers, as their gamma table has 2^18 + 1 slots, very big and not a power of two! Try to make upsampling behave at least reasonable: Replicate the last gamma value to fill up remaining crtc->gamma_red/green/blue slots, which would normally stay uninitialized. This is important, because while the intel display driver does not actually use all 2^18+1 values passed as part of a GAMMA_LUT, it does need the very last slot, which would not get initialized by the old code. This should hopefully create reasonable behaviour with Icelake+ but is untested on the actual Intel hw due to lack of suitable hw. Signed-off-by: Mario Kleiner (cherry picked from commit 7326e131df3d1373dd796d9e2d931e81a3536bad) commit b33f487a7ca276e11214eb45b87aab970ca43d79 Author: Mario Kleiner Date: Tue Sep 14 07:40:49 2021 +0200 xfree86: Avoid crash in xf86RandR12CrtcSetGamma() memcpy path. If randrp->palette_size is zero, the memcpy() path can read past the end of the randr_crtc's gammaRed/Green/Blue tables if the hw crtc's gamma_size is greater than the randr_crtc's gammaSize. Avoid this by clamping the to-be-copied size to the smaller of both sizes. Note that during regular server startup, the memcpy() path is only taken initially twice, but then a suitable palette is created for use during a session. Therefore during an actual running X-Session, the xf86RandR12CrtcComputeGamma() will be used, which makes sure that data is properly up- or down-sampled for mismatching source and target crtc gamma sizes. This should avoid reading past randr_crtc gamma memory for gpu's with big crtc->gamma_size, e.g., AMD/MALI/KOMEDA 4096 slots, or Intel Icelake and later with 262145 slots. Tested against modesetting-ddx and amdgpu-ddx under screen color depth 24 (8 bpc) and 30 (10 bpc) to make sure that clamping happens properly. This is an alternative fix for the one attempted in commit 617f591fc44e24413e1f91017d16734999bbbac1. Signed-off-by: Mario Kleiner (cherry picked from commit 966f567432e91762382db09129f8fb4e2e434437) commit d1ca47e1242b51c79cec7287f52c36c8e494706b Author: Olivier Fourdan Date: Tue Sep 14 16:32:45 2021 +0200 glamor: Fix leak in glamor_build_program() Fix the possible leak of `vs_prog_string` and `fs_prog_string` in case of failure, as reported by covscan. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Reviewed-by: Michel Dänzer (cherry picked from commit 2906ee5e4a722138cccb3265a615da7705a52589) commit d00e7dfc9da165810a578fa0910475686e1fa51c Author: Povilas Kanapickas Date: Tue Sep 21 23:35:42 2021 +0300 xserver 21.1 RC 1 Signed-off-by: Povilas Kanapickas commit 4ee66f574a70948ca90a5db94dd666a389a5ff3e Author: Povilas Kanapickas Date: Wed Sep 15 21:49:17 2021 +0300 Drop XWayland DDX commit 72c5d153c920d769802ed73a1b9bfd0d32e7c178 Author: Aaron Plattner Date: Fri Sep 10 11:02:00 2021 -0700 xfree86: NUL-terminate strings in hwEnableIO The Linux version of xf86EnableIO calls a helper function called hwEnableIO(). Except on Alpha, this function reads /proc/ioports looking for the 'keyboard' and 'timer' ports, extracts the port ranges, and enables access to them. It does this by reading 4 bytes from the string for the start port number and 4 bytes for the last port number, passing those to atoi(). However, it doesn't add a fifth byte for a NUL terminator, so some implementations of atoi() read past the end of this string, triggering an AddressSanitizer error: ==1383==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff71fd5b74 at pc 0x7fe1be0de3e0 bp 0x7fff71fd5ae0 sp 0x7fff71fd5288 READ of size 5 at 0x7fff71fd5b74 thread T0 #0 0x7fe1be0de3df in __interceptor_atoi /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:520 #1 0x564971adcc45 in hwEnableIO ../hw/xfree86/os-support/linux/lnx_video.c:138 #2 0x564971adce87 in xf86EnableIO ../hw/xfree86/os-support/linux/lnx_video.c:174 #3 0x5649719f6a30 in InitOutput ../hw/xfree86/common/xf86Init.c:439 #4 0x564971585924 in dix_main ../dix/main.c:190 #5 0x564971b6246e in main ../dix/stubmain.c:34 #6 0x7fe1bdab6b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24) #7 0x564971490e9d in _start (/home/aaron/git/x/xserver/build.asan/hw/xfree86/Xorg+0xb2e9d) Address 0x7fff71fd5b74 is located in stack of thread T0 at offset 100 in frame #0 0x564971adc96a in hwEnableIO ../hw/xfree86/os-support/linux/lnx_video.c:118 This frame has 3 object(s): [32, 40) 'n' (line 120) [64, 72) 'buf' (line 122) [96, 100) 'target' (line 122) <== Memory access at offset 100 overflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:520 in __interceptor_atoi Shadow bytes around the buggy address: 0x10006e3f2b10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006e3f2b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006e3f2b30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006e3f2b40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006e3f2b50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x10006e3f2b60: 00 00 f1 f1 f1 f1 00 f2 f2 f2 00 f2 f2 f2[04]f3 0x10006e3f2b70: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006e3f2b80: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 0x10006e3f2b90: f1 f1 f8 f2 00 f2 f2 f2 f8 f3 f3 f3 00 00 00 00 0x10006e3f2ba0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 0x10006e3f2bb0: f1 f1 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==1383==ABORTING Fix this by NUL-terminating the string. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1193#note_1053306 Signed-off-by: Aaron Plattner commit 617f591fc44e24413e1f91017d16734999bbbac1 Author: Aaron Plattner Date: Thu Sep 9 15:29:50 2021 -0700 modesetting: Only use GAMMA_LUT if its size is 1024 GAMMA_LUT sizes other than 1024 cause a crash during startup if the memcpy() calls in xf86RandR12CrtcSetGamma() read past the end of the legacy X11 / XVidMode gamma ramp. This is a problem on Intel ICL / GEN11 platforms because they report a GAMMA_LUT size of 262145. Since it's not clear that the modesetting driver will generate a proper gamma ramp at that size even if xf86RandR12CrtcSetGamma() is fixed, just disable use of GAMMA_LUT for sizes other than 1024 for now. This will cause the modesetting driver to disable the CTM property and fall back to the legacy gamma LUT. Signed-off-by: Aaron Plattner Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1193 Tested-by: Mark Herbert commit e59e24c8779de65db87b8c07bc3f2abb479be082 Author: Povilas Kanapickas Date: Mon Sep 6 22:41:32 2021 +0300 glamor: Fix handling of 1-bit pixmaps Since 8702c938b33b9ec180d64754eb922515c7c4a98b the pixmap formats are handled in a single place. In the process of conversion the difference between pixmap formats that can be uploaded and those that can be rendered on GL side has been lost. This affects only 1-bit pixmaps: as they aren't supported on GL, but can be converted to a R8 or A8 format for rendering (see glamor_get_tex_format_type_from_pictformat()). To work around this we add a separate flag that specifies whether the format actually supports rendering in GL, convert all checks to use this flag and then add 1-bit pixmap formats that don't support rendering in GL. Fixes: 8702c938b33b9ec180d64754eb922515c7c4a98b Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1210 Acked-by: Olivier Fourdan Tested-by: Olivier Fourdan Reviewed-by: Adam Jackson Signed-off-by: Povilas Kanapickas commit 68f01c0f02ece4f6efe9ce18be81244246a1e114 Author: Mario Kleiner Date: Mon Aug 30 05:42:04 2021 +0200 modesetting: Add option for non-vsynced flips for "secondary" outputs. Whenever an unredirected fullscreen window uses pageflipping for a DRI3/Present PresentPixmap() operation and the X-Screen has more than one active output, multiple crtc's need to execute pageflips. Only after the last flip has completed can the PresentPixmap operation as a whole complete. If a sync_flip is requested for the present, then the current implementation will synchronize each pageflip to the vblank of its associated crtc. This provides tear-free image presentation across all outputs, but introduces a different artifact, if not all outputs run at the same refresh rate with perfect synchrony: The slowest output throttles the presentation rate, and present completion is delayed to flip completion of the "latest" output to complete. This means degraded performance, e.g., a dual-display setup with a 144 Hz monitor and a 60 Hz monitor will always be throttled to at most 60 fps. It also means non-constant present rate if refresh cycles drift against each other, creating complex "beat patterns", tremors, stutters and periodic slowdowns - quite irritating! Such a scenario will be especially annoying if one uses multiple outputs in "mirror mode" aka "clone mode". One output will usually be the "production output" with the highest quality and fastest display attached, whereas a secondary mirror output just has a cheaper display for monitoring attached. Users care about perfect and perfectly timed tear-free presentation on the "production output", but cares less about quality on the secondary "mirror output". They are willing to trade quality on secondary outputs away in exchange for better presentation timing on the "production output". One example use case for such production + monitoring displays are neuroscience / medical science applications where one high quality display device is used to present visual animations to test subjects or patients in a fMRI scanner room (production display), whereas an operator monitors the same visual animations from a control room on a lower quality display. Presentation timing needs to be perfect, and animations high-speed and tear-free for the production display, whereas quality and timing don't matter for the monitoring display. This commit gives users the option to choose such a trade-off as opt-in: It adds a new boolean option "AsyncFlipSecondaries" to the device section of xorg.conf. If this option is specified as true, then DRI3 pageflip behaviour changes as follows: 1. The "reference crtc" for a windows PresentPixmap operation does a vblank synced flip, or a DRM_MODE_PAGE_FLIP_ASYNC non-synchronized flip, as requested by the caller, just as in the past. Typically flips will be requested to be vblank synchronized for tear-free presentation. The "reference crtc" is the one chosen by the caller to drive presentation timing (as specified by PresentPixmap()'s "target_msc", "divisor", "remainder" parameters and implemented by vblank events) and to deliver Present completion timestamps (msc and ust) extracted from its pageflip completion event. 2. All other crtc's, which also page-flip in a multi-display configuration, will try to flip with DRM_MODE_PAGE_FLIP_ASYNC, ie. immediately and not synchronized to vblank. This allows the PresentPixmap operation to complete with little delay compared to a single-display present, especially if the different crtc's run at different video refresh rates or their refresh cycles are not perfectly synchronized, but drift against each other. The downside is potential tearing artifacts on all outputs apart from the one of the "reference crtc". Successfully tested on a AMD gpu with single-display, dual-display and triple-display setups, and with single-X-Screen as well as dual-X-Screen "ZaphodHeads" configurations. Please consider merging this commit for the upcoming server 1.21 branch. Signed-off-by: Mario Kleiner commit 1fd5dec11bbb85e87f70a39f1c1b59af95a7feaf Author: Ignacio Casal Quinteiro Date: Tue Sep 7 16:58:10 2021 +0200 touchevents: set the screen pointer after checking the device is enabled If the device is disabled the sprite is NULL so we get a seg fault commit b3b81c8c2090cd49410960a021baf0d27fdd2ab3 Author: Povilas Kanapickas Date: Fri Sep 3 14:33:15 2021 +0300 Drop DMX DDX It turns out xdmx currently crashes when any client attempts to use GL and it has been in such state for about 14 years. There was a patch to fix the problem [1] 4 years ago, but it never got merged. The last activity on any bugs referring to xdmx has been more than 4 years ago. Given such situation, I find it unlikely that anyone is still using xdmx and just having the code is a drain of resources. [1]: https://lists.x.org/archives/xorg-devel/2017-June/053919.html Signed-off-by: Povilas Kanapickas commit 8f8ebf870b55c9875b7cfd8ef69c1df02d589b4a Author: Mario Kleiner Date: Sat Aug 28 02:27:20 2021 +0200 modesetting: Allow Present flips with mismatched stride on atomic drivers. When using DRI3+Present with PRIME render offload, sometimes there is a mismatch between the stride of the to-be-presented Pixmap and the frontbuffer. The current code would reject a pageflip present in this case if atomic modesetting is not enabled, ie. always, as atomic modesetting is disabled by default due to brokeness in the current modesetting-ddx. Fullscreen presents without page flipping however trigger the copy path as fallback, which causes not only unreliable presentation timing and degraded performance, but also massive tearing artifacts due to rendering to the framebuffer without any hardware sync to vblank. Tearing is extra awful on modesetting-ddx because glamor afaics seems to use drawing of a textured triangle strip for the copy implementation, not a dedicated blitter engine. The rasterization pattern creates extra awful tearing artifacts. We can do better: According to a tip from Michel Daenzer (thanks!), at least atomic modesetting capable kms drivers should be able to reliably change scanout stride during a pageflip, even if atomic modesetting is not actually enabled for the modesetting client. This commit adds detection logic to find out if the underlying kms driver is atomic_modeset_capable, and if so, it no longer rejects page flip presents on mismatched stride between new Pixmap and frontbuffer. We (ab)use a call to drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 0); for this purpose. The call itself has no practical effect, as it requests disabling atomic mode, although atomic mode is disabled by default. However, the return value of drmSetClientCap() tells us if the underlying kms driver is atomic modesetting capable: An atomic driver will return 0 for success. A legacy non-atomic driver will return a non-zero error code, either -EINVAL for early atomic Linux versions 4.0 - 4.19 (or for non-atomic Linux 3.x and earlier), or -EOPNOTSUPP for Linux 4.20 and later. Testing on a MacBookPro 2017 with Intel Kabylake display server gpu + AMD Polaris11 as prime renderoffload gpu, X-Server master + Mesa 21.0.3 show improvement from unbearable tearing to perfect, despite a stride mismatch between display gpu and Pixmap of 11776 Bytes vs. 11520 Bytes. That this is correct behaviour was also confirmed by comparing the behaviour and .check_flip implementation of the patched modesetting-ddx against the current intel-ddx SNA Present implementation. Please consider merging this patch before the server-1.21 branch point. This patch could also be cherry-picked into the server 1.20 branch to fix the same limitation. Signed-off-by: Mario Kleiner commit 7d34b1f2b7c612c3171e0b9758b5fc094bc33f63 Author: Simon Ser Date: Fri Jun 18 11:04:45 2021 +0200 xwayland: add -noTouchPointerEmulation In some scenarios, the Wayland compositor might have more knowledge than the X11 server and may be able to perform pointer emulation for touch events better. Add a command-line switch to allow compositors to turn Xwayland pointer emulation off. Signed-off-by: Simon Ser commit 7c63c582a17b206a33b57a70dd61e7919a6ef9fe Author: Mario Kleiner Date: Thu Aug 26 17:06:49 2021 +0200 Revert "glamor: Enable modifier support for xfree86 too" This reverts commit 9b8999411033c9473cd68e92e4690a91aecf5b95. Turns out that defaulting glamor_egl->dmabuf_capable = TRUE breaks kms page-flipping on various Mesa+Linux/DRM-KMS+hardware combos, resulting in broken presentation timing, degraded performance and awful tearing. E.g., my testing shows that X-Server master + Mesa 21.2 + Linux 5.3 on Intel Kabylake has broken pageflipping. Similar behaviour was observed in the past on RaspberryPi 4/400 with VideoCore-6 by myself and others, and iirc by myself on some AMD gpu's, although my memories of the latter are a bit dim. Cfe. https://gitlab.freedesktop.org/mesa/mesa/-/issues/3601 and possibly https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/254 for related problems. The reason for pageflip failure on the modesetting-ddx under DRI3/Present seems to be the following sequence: 1. Atomic modesetting for the modesetting-ddx is broken and therefore both disabled by default in the modesetting-ddx itself and also force-disabled by the Linux kernel since quite a while. If the kernel detects drmSetClientCap(fd, DRM_CLIENT_CAP_ATOMIC, 1); from the X-Server, it will reject the request, as a countermeasure to all the past and current brokeness. 2. Without DRM_CLIENT_CAP_ATOMIC we don't get the implied universal planes support (DRM_CLIENT_CAP_UNIVERSAL_PLANES). 3. Without DRM_CLIENT_CAP_UNIVERSAL_PLANES, drmModeGetPlaneResources() will only return overlay planes, but not primary- or cursor planes. 4. As modesetting-ddx drmmode_crtc_create_planes() function can only operate on primary planes, but can't get any from drmModeGetPlaneResources(), the drmmode_crtc_create_planes() mostly turns into a no-op, never executes populate_format_modifiers() and therefore the Linux kernels DRM-KMS driver is not ever queried for the list of scanout/pageflip capable DRM format modifiers. Iow. the drmmode_crtc->formats[i].modifiers list stays empty with zero drmmode_crtc->formats[i].num_modifiers. 5. The list from step 4 provides the format+modifiers for intersection which would get returned by the X-Servers DRI3 backend as response to a xcb_dri3_get_supported_modifiers_window_modifiers() request. Given an empty list was returned in step 4, this will lead to return of an empty modifiers list by xcb_dri3_get_supported_modifiers_window_modifiers(). 6. Both Mesa's DRI3/Present OpenGL backbuffer allocation logic and iirc Mesa/Vulkan/WSI/X11's swapchain image allocation logic use the list from xcb_dri3_get_supported_modifiers_window_modifiers() for format+ modifier selection for scanout/pageflip capable buffers. Cfe. Mesa's dri3_alloc_render_buffer() function. Due to the empty list, the Mesa code falls back to the format+modifiers reported by xcb_dri3_get_supported_modifiers_screen_modifiers() instead. This list contains all modifiers reported by GLAMOR as result of glamor_get_formats() and glamor_get_modifiers(), which in turn are query results from Mesa eglQueryDmaBufFormatsEXT() and eglQueryDmaBufModifiersEXT(). Iow. all format+modifiers which are supported for rendering are considered for the OpenGL backbuffers and Vulkan swapchain buffers. 7. Depending on kms driver + gpu combo and Mesa version, such buffers are often not direct-scanout / pageflip capable, and so pageflipping can't be used for DRI3/Present of fullscreen windows. Whenever the system has to fallback to copies instead of pageflips, the results are broken presentation timing, degraded performance and quite horrible tearing, as the current DRI3/Present implementation does not perform any hardware synchronization of copy presents to the start of vblank or similar. By defaulting glamor_egl->dmabuf_capable = FALSE instead, as the server 1.20 branch does, we avoid this failure: 1. glamor_get_modifiers() turns into a no-op and returns false, not reporting any supported dmabuf modifiers to the servers DRI3 code, ie. the servers cache_formats_and_modifiers() function can't retrieve and cache any format+modifiers. Therefore the servers DRI3 code now also reports an empty format+modifiers list when Mesa does a xcb_dri3_get_supported_modifiers_screen_modifiers() query. 2. Mesa's buffer allocation code therefore falls back to using the old DRI image extensions createImage() function to allocate buffers with use flags __DRI_IMAGE_USE_SCANOUT | __DRI_IMAGE_USE_BACKBUFFER and our OpenGL backbuffers / Vulkan swapchain images get allocated in a direct-scanout / pageflip capable format. Pageflipping works, timing and performance is good, presentation is tear-free. Please consider merging this for branching the X-Server 1.21 branch. Signed-off-by: Mario Kleiner commit c5a9287dcf8d77ab104d56ac27ad6b1ff957fdfb Author: Jon Turney Date: Wed May 12 16:51:26 2021 +0100 Don't underlink inputtest on targets which require complete linkage Don't underlink inputtest on targets which require complete linkage (e.g. when building for PE/COFF) commit d68b50ec032fe4f02bde817abfd30328ec96a11c Author: Jon Turney Date: Sat Jul 10 17:38:01 2021 +0100 Fix compilation with windows.h from latest w32api misc.h has complex logic (checking MAXSHORT is undefined etc.) controlling if it includes assert.h or not. Including windows.h from w32api 9.0.0 now trips over that, causing assert.h to not be included, causing various errors, e.g. In file included from ../include/cursor.h:53, from ../include/dix.h:54, from ../os/osdep.h:139, from ../hw/xwin/winauth.c:40: ../include/privates.h: In function ‘dixGetPrivateAddr’: ../include/privates.h:121:5: error: implicit declaration of function ‘assert’ [-Werror=implicit-function-declaration] Fix this by IWYU in privates.h commit ab86be0ed9233d6683daf00d359c562b12e137c8 Author: Mario Kleiner Date: Fri Aug 27 19:27:29 2021 +0200 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 commit 18d3131f9a332096825c09106a931c427246ddb7 Author: Povilas Kanapickas Date: Thu Aug 5 22:43:54 2021 +0300 meson: Implement developer documentation build Signed-off-by: Povilas Kanapickas commit 722da1c62caad961ce09fc226daf84465f4b7a7e Author: Povilas Kanapickas Date: Fri Aug 6 15:21:53 2021 +0300 meson: Add option to disable libdrm support Signed-off-by: Povilas Kanapickas commit 1f720dc9a319bb66e2f5f28568614e81aa9e9e4d Author: Adam Jackson Date: Tue Aug 17 16:06:57 2021 -0400 dmx: Fix some redeclaration warnings from gcc 11 Of the form: ../hw/dmx/config/xdmxconfig.c:68:26: warning: redundant redeclaration of ‘dmxConfigEntry’ [-Wredundant-decls] 68 | extern DMXConfigEntryPtr dmxConfigEntry; | ^~~~~~~~~~~~~~ commit b49f0f9b323d66056aa9cd88f9ca1a124037bf32 Author: Adam Jackson Date: Tue Aug 17 16:04:40 2021 -0400 xkb: Silence a warning from gcc 11 I get this: In function ‘TryCopyStr’, inlined from ‘CopyISOLockArgs’ at ../xkb/xkbtext.c:875:9: ../xkb/xkbtext.c:720:13: warning: ‘tbuf’ may be used uninitialized [-Wmaybe-uninitialized] 720 | strcat(to, from); | ^~~~~~~~~~~~~~~~ ../xkb/xkbtext.c: In function ‘CopyISOLockArgs’: : note: by argument 1 of type ‘const char *’ to ‘__builtin_strlen’ declared here ../xkb/xkbtext.c:871:10: note: ‘tbuf’ declared here 871 | char tbuf[64]; | ^~~~ Just initialize tbuf so it definitely works. commit c1138d8ec8d029de54261e355c0e5da0b001044a Author: Adam Jackson Date: Fri Jul 9 15:30:16 2021 -0400 xinput: Silence a warning from gcc 11 [45/388] Compiling C object Xi/liblibxserver_xi.a.p/xichangehierarchy.c.o ../Xi/xichangehierarchy.c:61:32: warning: argument 1 of type ‘int[256]’ with mismatched bound [-Warray-parameter=] 61 | XISendDeviceHierarchyEvent(int flags[MAXDEVICES]) | ~~~~^~~~~~~~~~~~~~~~~ In file included from ../Xi/xichangehierarchy.c:54: ../Xi/xichangehierarchy.h:42:37: note: previously declared as ‘int[]’ 42 | void XISendDeviceHierarchyEvent(int flags[]); | ~~~~^~~~~~~ commit f3a98334e6a56858853f3894b0f48ee040741410 Author: Adam Jackson Date: Fri Jul 9 15:26:47 2021 -0400 selinux: Stop using security_context_t This is apparently deprecated now and is and was always just char *. commit 6f63873da55de33e51c1f6849a65501e380f19bc Author: Simon Ser Date: Mon Jul 5 15:30:16 2021 +0200 xwayland: fix xdg_output leak The xdg_output wasn't cleaned up when destroying the xwl_output. Signed-off-by: Simon Ser commit 659260a0b7c1cef6060bd62a83deb03e3fa472b1 Author: Demi Marie Obenour Date: Fri Aug 6 13:23:08 2021 -0400 More missing version checks in SProcs The bug in XFixes was also found in GenericEvent and Damage. commit e4dabe8d9395d60699aa9831626920adaa847680 Author: Roman Gilg Date: Sat Aug 7 14:15:07 2021 +0200 Remove build-only include from public header The dix-config.h file is not installed, but dix.h is. The include makes the compilation of external drivers fail (for example the libinput driver). The Xserver compilation also works without the include, so just remove it. Signed-off-by: Roman Gilg commit 31fb35a7afc782e857bf60e524e7d966dbcd2551 Author: Demi Marie Obenour Date: Tue Jul 20 22:58:42 2021 -0400 XFixes: add version check for byteswapped clients The version check for byteswapped clients was missing. commit 7eba412072afdc9d27896410872e40364a8010bf Author: Olivier Fourdan Date: Fri Mar 26 15:48:23 2021 +0100 xfree86: Move xf86CVTMode() function The xf86CVTMode() was implemented in a standalone source file because it was being used for both the xfree86 API and the standalone cvt utility. Now that the cvt utility is removed (as part of libxcvt) we can move the small xf86CVTMode() function with the rest of the xf86Modes sources. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142 Signed-off-by: Olivier Fourdan Reviewed-by: Matt Turner commit f2781e95369583259991cd3add6f90f33be32171 Author: Olivier Fourdan Date: Thu Mar 25 10:27:31 2021 +0100 xfree86/cvt: Drop cvt utility The cvt utility is now replaced by the standalone version found in libxcvt, no need to build the one in xfree86 anymore. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142 Signed-off-by: Olivier Fourdan Reviewed-by: Matt Turner commit f788289bdcc4f04bd2fb62552df1c8c1ae0aea45 Author: Olivier Fourdan Date: Thu Mar 25 10:19:55 2021 +0100 xfree86: Use libxcvt Replace the local implementation of the VESA CVT standard timing modelines generator with the one from libxct to avoid code duplication. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142 Signed-off-by: Olivier Fourdan Reviewed-by: Matt Turner commit 6ea2c001f9d23c91113b937fb99053e262d21df6 Author: Olivier Fourdan Date: Thu Mar 25 10:17:49 2021 +0100 xwayland: Use libxcvt Xwayland is using a copy of the CVT generator found in Xorg. Rather than duplicating the code within the xserver tree, use the libxcvt implementation instead. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142 Signed-off-by: Olivier Fourdan Reviewed-by: Matt Turner commit a4ab57cb748674823744a8ef5a0b416ee553efe8 Author: Olivier Fourdan Date: Thu Mar 25 10:16:31 2021 +0100 build: Add dependency on libxcvt libxcvt is a library providing a standalone version of the X server implementation of the VESA CVT standard timing modelines generator. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142 Signed-off-by: Olivier Fourdan Reviewed-by: Matt Turner commit 84897891e5e7eb44068cda22284dca70c6cfd1a2 Author: Olivier Fourdan Date: Fri Jul 9 15:11:51 2021 +0200 ci: Install libxcvt from git Signed-off-by: Olivier Fourdan commit 5c2592cbb19f996c4bb87bca4e4e46ab911d4bec Author: Demi Marie Obenour Date: Tue Jul 20 22:37:26 2021 -0400 Add do-while loops to DIX macros This ensures they will behave properly in conditionals and always require a trailing semicolon. commit d83c84bd9dc7fbd3588ce70b0c8bf0f63ed29ff3 Author: Alex Richardson Date: Fri Jul 23 09:24:50 2021 +0100 Mark the dixChangeWindowProperty() value argument as const It is copied using memcpy() and not modified so we can add const. This fixes a -Wincompatible-pointer-types-discards-qualifiers compiler warning that was failing a -Werror XVnc build for me. Signed-off-by: Alex Richardson commit fb5322ce2819260c07e06ab22b47df0a5d19f07d Author: Zoltán Böszörményi Date: Thu Jul 8 06:14:21 2021 +0200 glamoregl: Initialize glamor on the main device This allows e.g. an UDL device (driven by llvmpipe) to be automatically set up with GPU acceleration via reverse PRIME. The result is e.g.: # DISPLAY=:0.2 xrandr --listproviders Providers: number : 2 Provider 0: id: 0xec cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 1 outputs: 1 associated providers: 1 name:modesetting Provider 1: id: 0x12c cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 2 associated providers: 1 name:Intel Signed-off-by: Zoltán Böszörményi commit f08bc32f5abc23ea715c15e8e86150434cc99e4f Author: Zoltán Böszörményi Date: Thu Jul 8 06:13:24 2021 +0200 xf86: Assign GPUs to screens according to configuration If there is an explicit configuration, assign the RandR provider of the GPUDevice to the screen it was specified for. If there is no configuration (default case) the screen number is still 0 so it doesn't change behaviour. The result is e.g: # DISPLAY=:0.2 xrandr --listproviders Providers: number : 2 Provider 0: id: 0xd2 cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 0 name:modesetting Provider 1: id: 0xfd cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 2 associated providers: 0 name:Intel Signed-off-by: Zoltán Böszörményi commit cd567415cc5645f8cdc78e85e8887e5cce76e6d7 Author: Zoltán Böszörményi Date: Thu Jul 8 06:09:44 2021 +0200 xf86: Extract screen configuration matching into its own function Signed-off-by: Zoltán Böszörményi commit 16571b8926a5a7ba5a1885b36a16857addbe8f41 Author: Boris-Barboris Date: Tue Jun 22 00:51:08 2021 +0300 Don't hardcode fps for fake screen Currently, when main hardware screen is powered-off, X server initializes fake screen's timer with 1 second update interval. Streaming software like Nomachine or Vnc, as well as desktop input automation suffers from it, since it will forever be stuck on 1 fps until the display is turned back on. This commit adds command line option -fakescreenfps that allows the user to change the default fake screen timer. Signed-off-by: Baranin Alexander commit 8836b9d243444031b6396d39d345f2f83b5fa6a9 Author: Łukasz Spintzyk Date: Thu Jul 22 13:12:05 2021 +0200 modesetting: unflip not possible when glamor is not set This is fixing crashes of xfce when running under qemu commit d6c02ffd9c910637f6b3b7249507998e9e45f93c Author: Łukasz Spintzyk Date: Mon Jul 19 14:25:28 2021 +0200 present: fallback get_crtc to return crtc belonging to screen with present extension Since crtc can belong to secondary output that may not have present extension enabled we should fallback to first enabled crtc or fake crtc. Fix for issue xorg/xserver#1195 commit f6f2f203bcde47c334836191982d77bbbbbf533c Author: Michel Dänzer Date: Thu May 20 19:00:10 2021 +0200 present: Drop flip_idler member from present_vblank_rec It's redundant with the pixmap member of struct xwl_present_event. Acked-by: Olivier Fourdan commit 212cfbcf68d279f2b3494e79fe8e3fbaabeba77c Author: Michel Dänzer Date: Wed May 12 15:25:51 2021 +0200 xwayland/present: Use present_vblank_ptr instead of xwl_present_event* Where the latter isn't really needed. Acked-by: Olivier Fourdan commit fe8c7855f3a85f156c792a3f18a175138407054b Author: Michel Dänzer Date: Wed May 12 12:51:32 2021 +0200 xwayland/present: Fold xwl_present_release_event into _free_event The only difference was unhooking from the vblank.event_queue list, which is already done by xwl_present_flip_notify_vblank in xwl_present_msc_bump. commit 31d2ebca77fcabec81194ae6dcd724c699b1b513 Author: Michel Dänzer Date: Mon May 10 18:33:43 2021 +0200 xwayland/present: Drop target_msc member from struct xwl_present_event Use present_vblank_rec::exec_msc instead. Acked-by: Olivier Fourdan commit 495ec596640e26b6995c93eedc922d2702ad64ad Author: Michel Dänzer Date: Mon May 10 19:04:07 2021 +0200 xwayland/present: Drop pending member from struct xwl_present_event We are handling two cases here: the active flip or the pending flip. For the pending flip (event->pending == TRUE), we called xwl_present_release_pixmap. For the active flip (event->pending == FALSE), we called xwl_present_release_event. However, xwl_present_flip_notify_vblank already unhooked event->vblank.event_queue. So this was effectively the same as calling xwl_present_release_pixmap. Acked-by: Olivier Fourdan commit f73340445fe1da9ae9bc3197eb2ef41589aa2a4e Author: Michel Dänzer Date: Fri May 7 18:16:23 2021 +0200 xwayland/present: Drop list member from struct xwl_present_event Use present_vblank_rec::event_queue instead. The changes in xwl_present_execute shouldn't really be needed, since we should never hit queue_vblank in present_execute_wait. But let's be safe rather than sorry, plus this simplifies the code. Acked-by: Olivier Fourdan commit aac31d2758d4e84774b633ec108d18f0bad6ef64 Author: Michel Dänzer Date: Fri May 7 17:58:27 2021 +0200 xwayland/present: Drop exec_queue member from struct xwl_present_window Doesn't serve any purpose anymore. Acked-by: Olivier Fourdan commit f8c086b2145d1c9364e9b43ff4d796791d8af169 Author: Michel Dänzer Date: Fri May 7 17:55:13 2021 +0200 xwayland/present: Fold xwl_present_event_notify into its caller Can just call xwl_present_execute directly. This allows dropping the window member from struct xwl_present_window as well. Acked-by: Olivier Fourdan commit c30f3d08acb01a41df0fe7176f237137f3039480 Author: Michel Dänzer Date: Fri May 7 17:49:07 2021 +0200 xwayland/present: Use exec_queue for deferring completion events We clear the vblank->pixmap field, so next time xwl_present_execute falls through to present_execute_post. Acked-by: Olivier Fourdan commit 4503c8d9ea7df5bda470501e638a730d91d718c9 Author: Michel Dänzer Date: Fri May 7 12:56:30 2021 +0200 xwayland/present: Fold xwl_present_idle_notify into its caller Allows simplification by avoiding indirection. Acked-by: Olivier Fourdan commit b2a06e0700fa48c1e77fc687e6af39a4bb7c2ceb Author: Michel Dänzer Date: Fri May 7 12:34:49 2021 +0200 xwayland/present: Drop sync_flip member of struct xwl_present_window The same information can be determined from the flip queue. Acked-by: Olivier Fourdan commit fc53e3c536b5a338c595b5724c7d0b4734e45871 Author: Michel Dänzer Date: Thu May 6 18:42:46 2021 +0200 xwaland/present: Drop flip_pending member of struct xwl_present_window Use the first element of the flip_queue list for the same purpose. Acked-by: Olivier Fourdan commit c592c66625d964e8ed1f3fcfc01a245e4c8a8015 Author: Michel Dänzer Date: Fri May 7 12:21:44 2021 +0200 xwayland/present: Fold xwl_present_flip_notify into its callers No need for them to be separate anymore. Acked-by: Olivier Fourdan commit 42301760802ea1cbe3698797c2bfb3a91ee02430 Author: Michel Dänzer Date: Fri Apr 23 12:59:55 2021 +0200 xwayland/present: Embed present_vblank_rec in xwl_present_event This allows for various simplifications. Use the pointer to the struct memory as the event ID. In contrast to the SCMD code for Xorg (where pending DRM events cannot be cancelled), this is safe here, because we can destroy pending Wayland callbacks. So we can't get a callback with a stale pointer to freed memory. Remove xwl_present_window::release_list in favour of present_vblank_rec::window_list. Remove xwl_present_event::xwl_present_window in favour of present_vblank_rec::window. xwl_present_free_event is never called for a NULL pointer anymore, no need to check. v2: * Restore DestroyWindow wrapping order to make sure present_destroy_window doesn't call xwl_present_abort_vblank. Acked-by: Olivier Fourdan commit 61cc5d96ed281a082d8dd414506dea0084e446fd Author: Michel Dänzer Date: Wed May 5 15:02:25 2021 +0200 present: Refactor present_vblank_init helper ouf of _vblank_create Allows embedding into another struct. Acked-by: Olivier Fourdan commit 35f173ddb606f9fbac7957e427fe28a377204cfe Author: Michel Dänzer Date: Thu Apr 29 18:44:04 2021 +0200 xwayland/present: Drop abort member of struct xwl_present_event We can call xwl_present_free_event unconditionally from xwl_present_abort_vblank, since the sync_callback is already destroyed in xwl_present_cleanup. Acked-by: Olivier Fourdan commit 0517460301cbf9c6ed3020ef1dd0cd1df94ea178 Author: Michel Dänzer Date: Tue May 11 12:56:53 2021 +0200 xwayland/present: Simplify calls to Xwayland-private functions Change parameter types to what's really needed, or just fold the function into its only caller. Acked-by: Olivier Fourdan commit 490248ea70d3fe923446e17312880ae63590d45c Author: Michel Dänzer Date: Mon Apr 19 12:59:56 2021 +0200 xwayland/present: Rename present_wnmd_* functions to xwl_present_* The WNMD indirection is gone. Acked-by: Olivier Fourdan commit 0c0cbbc7cb4fa917a2b33494efb6dc03e5de9051 Author: Michel Dänzer Date: Wed Apr 21 17:15:27 2021 +0200 present: Remove present_wnmd_info_rec Doesn't serve any purpose anymore. Acked-by: Olivier Fourdan commit 561c63d0f13a8c6379ed05338172570f93dbce37 Author: Michel Dänzer Date: Mon Apr 19 18:41:59 2021 +0200 xwayland/present: Merge present_wnmd_flips_stop & xwl_present_flips_stop Just use the latter instead of the former elsewhere. No need for them to be separate anymore. Acked-by: Olivier Fourdan commit a67f16fde1ff094c3ec4fffe8a7269b30c7b8668 Author: Michel Dänzer Date: Mon Apr 19 18:53:36 2021 +0200 xwayland/present: Fold present_wnmd_get_ust_msc into its callers Just use xwl_present_get_ust_msc directly. No need for the indirection anymore. Acked-by: Olivier Fourdan commit 080c1ca3f57b4226f34624b0cd2171ffbbc2be4f Author: Michel Dänzer Date: Mon Apr 19 18:46:23 2021 +0200 xwayland/present: Fold present_wnmd_queue_vblank into its callers Just use xwl_present_queue_vblank directly. No need for the indirection anymore. Acked-by: Olivier Fourdan commit c22887bc7a83e9b8ad112aadaec069b0366fc38e Author: Michel Dänzer Date: Mon Apr 19 18:51:06 2021 +0200 xwayland/present: Fold present_wnmd_get_crtc into present_wnmd_pixmap And use xwl_present_get_crtc directly. No need for them to be separate anymore. Acked-by: Olivier Fourdan commit cb35ff596ec4e4fc6a4e96d55e280cdf399791e1 Author: Michel Dänzer Date: Mon Apr 19 18:34:07 2021 +0200 xwayland/present: Fold present_wnmd_check_flip into its callers Mainly into xwl_present_check_flip, and call that from present_wnmd_check_flip_window. No need for them to be separate anymore. Acked-by: Olivier Fourdan commit 7b78cf6b3ae386b9df2483692041dfa38a91bedb Author: Michel Dänzer Date: Mon Apr 19 18:26:55 2021 +0200 xwayland/present: Simplify query_capabilities No need for the WNMD indirection anymore. Acked-by: Olivier Fourdan commit 244403ec8718d782d57a830ece9357a75a0dd70b Author: Michel Dänzer Date: Mon Apr 19 18:01:52 2021 +0200 xwayland/present: Fold present_wnmd_abort_vblank into its only caller No need for them to be separate anymore. Acked-by: Olivier Fourdan commit f7adbc2166b7a4662cbd69507d8cbac11034c87e Author: Michel Dänzer Date: Mon Apr 19 18:06:22 2021 +0200 xwayland/present: Drop present_wnmd_flush in favour of xwl_present_flush No need for the indirection anymore. Acked-by: Olivier Fourdan commit 7fd114365d694360540bc46cd615aa47373be0a8 Author: Michel Dänzer Date: Mon Apr 19 19:02:32 2021 +0200 xwayland/present: Fold present_wnmd_flip into present_wnmd_execute No need for the indirection anymore. Acked-by: Olivier Fourdan commit 2e1dcd731f98a8beceee699cc57b7082f98916c4 Author: Michel Dänzer Date: Tue Apr 20 19:01:12 2021 +0200 xwayland/present: Fold present_wnmd_screen_init into xwl_present_init No need for them to be separate anymore. Acked-by: Olivier Fourdan commit b6419359b6b11ec659f59cc74075fcf049591425 Author: Michel Dänzer Date: Wed Apr 21 12:50:02 2021 +0200 present: Move present_wnmd.c contents to hw/xwayland/xwayland-present.c This will allow eliminating indirections and making the Xwayland Present code more efficient and easier to follow. While this technically changes the Xorg video driver ABI, I don't know of any drivers using the dropped present_wnmd_* symbols, and I doubt a Xorg driver could make use of them as is anyway. (As a bonus, Xorg no longer links any Xwayland specific Present code) v2: * Wrap DestroyWindow before initializing Present, so that present_destroy_window runs before xwl_present_cleanup. Avoids crash due to present_destroy_window calling xwl_present_* functions when xwl_present_window was already freed. (Olivier Fourdan) Acked-by: Olivier Fourdan commit c35a716b02921e2fcae5fe89295a99c6dd5dec8c Author: Michel Dänzer Date: Fri Apr 16 18:45:39 2021 +0200 present: Fold wnmd_init_mode_hooks into wnmd_screen_init Preparation for moving WNMD code to hw/xwayland. No functional change intended. Acked-by: Olivier Fourdan commit 10bdd87fe49cbd9b4c4b584024d663b928d3f1be Author: Michel Dänzer Date: Fri Apr 16 18:43:48 2021 +0200 present: Move present_wnmd_screen_init to present_wnmd.c Now all WNMD code is in present_wnmd.c. Acked-by: Olivier Fourdan commit b6d54b0f5d2fb3dc8a4b2812bfee94112c332256 Author: Michel Dänzer Date: Wed Apr 21 17:01:36 2021 +0200 present: Dispatch clear_window_flip via present_screen_priv hook Eliminates special cases in present_destroy_window. Acked-by: Olivier Fourdan commit 93666ebe37a9c8d64b814c7af6b895f89ca5ff88 Author: Michel Dänzer Date: Wed Apr 21 18:39:36 2021 +0200 present: Remove create_event_id hook Each present_vblank_create caller generates and sets the ID afterwards. Acked-by: Olivier Fourdan commit 44f705a5b6b4f79682c5e649eb718a193e01ec47 Author: Michel Dänzer Date: Mon Apr 19 18:19:30 2021 +0200 present: Pass capabilities to present_vblank_create by value Preparation for moving WNMD code to hw/xwayland. No functional change intended. Acked-by: Olivier Fourdan commit 86e645bcfaea63bc3f91e4ccbbc19569929b92c3 Author: Michel Dänzer Date: Fri Jul 2 12:41:34 2021 +0200 xwayland/eglstream: Drop xwl_eglstream_set_window_pixmap Not sure why we'd need to abandon a pending stream for a pixmap just because it's no longer a window pixmap. Let's try not to. Reviewed-by: Olivier Fourdan commit ba8763c27b2ebc91850abfcaf32ae972e80142e7 Author: Michel Dänzer Date: Fri Jul 2 12:57:21 2021 +0200 xwayland/eglstream: Consolidate pending_cb destruction Into a new xwl_eglstream_destroy_pending_stream helper. Reviewed-by: Olivier Fourdan commit 204f10c29e0f323e7829ecf48e0f002be96e194d Author: Michel Dänzer Date: Wed Jul 7 18:53:35 2021 +0200 xwayland: Call RRTellChanged if the RandR configuration may have changed This makes sure RandR events are sent to interested clients as needed. This was happening implicitly in some cases, but not in others, e.g. if the root window size didn't change. If this were to call RRTellChanged more often than necessary in some cases, that should be harmless, as it only sends events if something has actually changed since last time. Should fix https://bugzilla.redhat.com/show_bug.cgi?id=1979892 . v2: * Call RRTellChanged at the very end of update_screen_size, just in case. Reviewed-by: Olivier Fourdan commit a6d178b6af4bb4cd7ba28299c3ddd9d90bcbaaa5 Author: Michel Dänzer Date: Wed Jul 7 18:51:02 2021 +0200 randr: Bail from RRTellChanged if there's no root window yet This can happen if RRTellChanged is called during initialization. Continuing in that case makes no sense conceptually: * Any event sent over the wire requires a corresponding window. * No root window probably means there can't be any clients which could receive the events. In practice, it would result in a crash down the road due to dereferencing the NULL ScreenRec::root pointer. Reviewed-by: Olivier Fourdan commit 7e20c8b7b8357eb8986f89e85be22ab1c29f2ca4 Author: Matt Turner Date: Thu Jul 8 12:15:13 2021 -0700 Build xz tarballs instead of bzip2 Signed-off-by: Matt Turner commit a9552868697cae02e37e67ae774a072885f202f8 Author: Dave Airlie Date: Thu Jul 1 06:48:55 2021 +1000 glamor: add EXT_gpu_shader4 support This enables a number of the GLSL 1.30 paths on GPUs that have EXT_gpu_shader4 but don't have GLSL 1.30 exposed. (Intel gen4/5 mainly) Reviewed-by: Adam Jackson commit a2f5b917f511fca1c9b1501495664e2f63c2e1b0 Author: Dave Airlie Date: Fri Jul 2 04:52:23 2021 +1000 glamor: add glamor_glsl_has_ints wrapper This should make adding gpu shader4 support cleaner Reviewed-by: Adam Jackson commit b4f55712da4d7294bfeb6cffc45b572fd999d800 Author: Povilas Kanapickas Date: Mon Jul 5 21:40:55 2021 +0300 xserver 21.0.99.1 Signed-off-by: Povilas Kanapickas commit b67e514dbb59bffc23b75d47ca7f24e96c4aeb05 Author: Povilas Kanapickas Date: Sat Jun 26 09:44:39 2021 +0300 meson: Fix warnings when reading back and checking feature flags Meson does not like comparing things of different types which is a problem when reading back values of feature flags as they may contain either false (bool) or 1 (string). Since there is a strong reason why we use false when the feature does not exist, we work around this issue by always converting the returned value to int via to_int(). Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1190 Signed-off-by: Povilas Kanapickas commit b2a0de4f072fdcc0fb20a0853f7edaf714add9d9 Author: Adam Jackson Date: Tue Jun 22 12:39:56 2021 -0400 xfixes: Allow the client to upgrade the fixes protocol version If you say FixesQueryVersion twice we remember whatever the second version number was. With just libXfixes this isn't an issue because the request is hidden in extension setup, but libxcb-xfixes doesn't do that for you, which means the second one can _lower_ the requested fixes version, disabling requests that the client thought it had enabled. Paper over this by allowing the version number to be raised but not lowered. Also go ahead and delete the minor version number from the client state since xfixes doesn't have minor versions (yet, anyway). commit 7d509b6f342d9732b567dc4efa867ea24919853b Author: Olivier Fourdan Date: Fri Apr 30 09:56:05 2021 +0200 xwayland/eglstream: Remove stream validity To avoid an EGL stream in the wrong state, if the window pixmap changed before the stream was connected, we would still keep the pending stream but mark it as invalid. Once the callback is received, the pending would be simply discarded. But all of this is actually to avoid a bug in egl-wayland, there should not be any problem with Xwayland destroying an EGL stream while the compositor is still using it. With that bug now fixed in egl-wayland 1.1.7, we can safely drop all that logic from Xwayland EGLstream backend. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1189 commit 2be9f795bc15012dc912f595003e01bb6aa66f54 Author: Olivier Fourdan Date: Wed Jun 23 11:35:17 2021 +0200 xwayland/eglstream: Keep pending stream if the pixmap didn't change If the pixmap does not actually change in set_window_pixmap(), there is no need to invalidate the pending stream, if there's one. Signed-off-by: Olivier Fourdan Suggested-by: Michel Dänzer Reviewed-by: Michel Dänzer commit 2531ee02450e3be3549daa09407557c3addeba02 Author: orbea Date: Wed Jun 23 05:50:21 2021 -0700 hw/dmx/config: Link directly with libdmxconfig.a When building xserver with slibtool (https://dev.midipix.org/cross/slibtool) the build will fail. /usr/bin/ld: cannot find -ldmxconfig This is because xserver creates libdmxconfig.a internally and then links with the linker flag -ldmxconfig. However according to automake documentation the -lfoo linker flags should only be used for external dependencies and all internal libraries should be linked with the libtool archive file (.la) or the static archive (.a) when the former is not available. GNU libtool is far more permissive and happens to silently obscure this issue while slibtool fails because it instead sees '-L./.libs -ldmxconfig'. commit 2f53d1cf7304574a516f6868822307648bc35333 Author: Povilas Kanapickas Date: Wed Apr 7 18:22:05 2021 +0300 config: Fix platform busid parsing when there is no ID_PATH prop On at least Lenovo Thinkpad E585 udev does not have ID_PATH property for the drm node (see https://gitlab.freedesktop.org/xorg/xserver/-/issues/993). While this is likely udev bug, this causes the device to be not recognized as attribs->busid is NULL, which causes platform_find_pci_info to be not called and corresponding xf86_platform_devices[i]->pdev to be NULL. At this moment pdev being NULL will cause a crash, but this is a different bug. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/993 Fixes: 0816e8fc linux: Make platform device probe less fragile Reviewed-by: Zoltán Böszörményi Signed-off-by: Povilas Kanapickas commit d4b38e111946b934d0f8438dc295dd9f7316318c Author: Olivier Certner Date: Tue Feb 9 10:49:00 2021 +0100 os: Properly report failure to link lock file Stop assuming that a failure to link always means that the file indeed exists. In case of other failure (e.g., permissions), the user would get an inconsistent "Can't read lock file" message. Signed-off-by: Olivier Certner commit d66b7ec12986efd4f32fcc84cdaacbd04ec98ccb Author: Łukasz Spintzyk Date: Wed Jun 23 15:26:23 2021 +0200 xfree86: Fix out of array bound access to xf86Entities Signed-off-by: Łukasz Spintzyk commit 0d93bbfa2cfacbb73741f8bed0e32fa1a656b928 Author: Povilas Kanapickas Date: Fri Mar 26 00:51:02 2021 +0200 xfree86: Fix potentially NULL reference to platform device's PCI device xf86_platform_devices[i].pdev may be NULL in cases we fail to parse the busid in config_udev_odev_setup_attribs() (see also [1], [2]) such as when udev does not give use ID_PATH. This in turn leads to platform_find_pci_info() being not called and pdev being NULL. [1]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/993 [2]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1076 Reviewed-by: Zoltán Böszörményi Signed-off-by: Povilas Kanapickas commit 303763941f9941e2e215a3c978b72de495478033 Author: Povilas Kanapickas Date: Fri Mar 26 00:51:01 2021 +0200 xfree86: Consistently check for reference to primaryBus pci_device This is the only place where we don't check whether primaryBus.id.plat->pdev is not NULL before accessing its members. It may be NULL in cases we fail to parse the busid in config_udev_odev_setup_attribs() (see also [1], [2]) such as when udev does not give use ID_PATH. This in turn leads to platform_find_pci_info() being not called and pdev being NULL in one of the items within the xf86_platform_devices array. For this to cause a crash we only need it to become the primaryBus device. [1]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/993 [2]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1076 Signed-off-by: Povilas Kanapickas commit b9722d39cd619ac55c2cfbb5644eabb84ff57f1b Author: Povilas Kanapickas Date: Thu Jun 17 18:00:50 2021 +0300 configure.ac: Switch project version to 20.x.y style Reviewed-by: Zoltán Böszörményi Signed-off-by: Povilas Kanapickas commit ef89b6648e2a806237a6d2fa598e1b9c83f128b4 Author: Zoltán Böszörményi Date: Mon Jun 21 12:12:41 2021 +0200 xfree86: Fix NULL pointer dereference crash screenp->displays[count] (passed to configDisplay() in configScreen()) is NULL if there is no Virtual setting in the configuration. Fixes: f8a6be04d0c7e6a99824ff888ad6c010960c5c21 ("xfree86: Change displays array to pointers array to fix invalid pointer issues after table reallocation") Signed-off-by: Zoltán Böszörményi commit aad61e8e03311eb8bae4f7db59e65634733eadc2 Author: Olivier Fourdan Date: Fri Jun 18 14:52:55 2021 +0200 glx: Fix use after free in MakeCurrent The fix from commit c468d34c7 - "glx: Set ContextTag for all contexts" is actually incomplete, it correctly sets the context tag for direct contexts as well, but would fail to mark the context's currentClient. As a result, when the context is destroyed, it would be freed immediately rather than being just scheduled for deletion, even though it is still current for some client. leading to a use-after-free. Make sure to also set the context's currentClient for direct contexts as well, not just indirect ones. Signed-off-by: Olivier Fourdan Fixes: c468d34c7 - "glx: Set ContextTag for all contexts" Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1186 Reviewed-by: Adam Jackson commit 021b3c2f778e718338f232b94880fc3ae9092085 Author: Povilas Kanapickas Date: Tue Jun 15 12:40:47 2021 +0300 configure.ac: Bump inputproto dep to 2.3.99.1 This should have been part of 6cbcbc81525b131b5b94409ea870af663d5c28bb. Signed-off-by: Povilas Kanapickas commit 05b3c681ea2f478c0cb941c2f8279919cf78de6d Author: Daniel Strnad Date: Tue May 19 15:52:35 2020 +0200 hw/xfree86: Propagate physical dimensions from DRM connector Physical dimmension of display can be obtained not just by configuration or DDC, but also directly from kernel via drmModeGetConnector(). Until now xserver silently discarded these values even when no configuration nor EDID were present and fallbacked to default DPI. commit f8a6be04d0c7e6a99824ff888ad6c010960c5c21 Author: Łukasz Spintzyk Date: Tue Jun 8 20:02:21 2021 +0200 xfree86: Change displays array to pointers array to fix invalid pointer issues after table reallocation There are rare cases when xf86SetDepthBpp is resizing displays array in confScreen. As that array is shared between set of ScrnInfoRec's then realloc might invalidate chached DispPtr display values in otheres ScrnInfoRec objects. If we will change displays array as an array of pointers to DispRec then cached DispRec pointers in ScrnInfoRec won't be invalid after reallocation of displays array. Signed-off-by: Łukasz Spintzyk commit 1a1bd5cf7a1a3364afb625f020e1c013fbabfbb6 Author: Povilas Kanapickas Date: Fri Apr 16 16:15:35 2021 +0300 modesetting: Add a limit on async page flip error log frequency In certain circumstances we will have a lot of flip errors without a reasonable way to prevent them. In such case we reduce the number of logged messages to at least not fill the error logs. The details are as follows: At least on i915 hardware support for async page flip support depends on the used modifiers which themselves can change dynamically for a screen. This results in the following problems: - We can't know about whether a particular CRTC will be able to do an async flip without hardcoding the same logic as the kernel as there's no interface to query this information. - There is no way to give this information to an application, because the protocol of the present extension does not specify anything about changing of the capabilities on runtime or the need to re-query them. Even if the above was solved, the only benefit would be avoiding a roundtrip to the kernel and reduced amount of error logs. The former does not seem to be a good enough benefit compared to the amount of work that would need to be done. The latter is solved in this commit. Reviewed-by: Eero Tamminen Signed-off-by: Povilas Kanapickas commit 9992245c5f7821de1fbd866f43f0afe55080ed67 Author: Povilas Kanapickas Date: Fri Apr 16 16:15:34 2021 +0300 modesetting: Extract flip failure logging to a single place Reviewed-by: Eero Tamminen Signed-off-by: Povilas Kanapickas commit 9adb13e296baead53112a268ddfd291195742c71 Author: Jose Maria Casanova Crespo Date: Tue Jun 8 14:52:17 2021 +0200 glamor: Avoid using GL_QUADS on V3D Like in 0e3f1252dacdc3194 ("glamor: Avoid using GL_QUADS on VC4") this will avoid mesa to fallback doing conversion for QUADS primitives. Signed-off-by: Jose Maria Casanova Crespo Reviewed-by: Emma Anholt commit 104c7c50485238a1e8c2090dc96126e9624ef870 Author: Michel Dänzer Date: Tue May 18 18:02:59 2021 +0200 xwayland/present: Move wl_buffer check into xwl_glamor_check_flip Keeps the glamor specific code together more. Reviewed-by: Olivier Fourdan commit 3641c24bd012d032ec289cde312a9a5a3ba8c3bf Author: Michel Dänzer Date: Tue May 18 17:56:50 2021 +0200 xwayland/eglstream: Handle xwl_pixmap_get returning NULL In xwl_glamor_eglstream_get_wl_buffer_for_pixmap. This can likely be hit now with an SHM pixmap via the Present flip path. There might be other corner cases. Fixes: f3eb1684fa50 "xwayland: enable MIT-SHM shared pixmaps" Reviewed-by: Olivier Fourdan commit d163e0a1d5ec54cc726d45a239a0777d0a84d610 Author: Michel Dänzer Date: Fri Jun 11 18:25:01 2021 +0200 ci: Fix UPSTREAM_REPO -> FDO_UPSTREAM_REPO The latter is what ci-templates expect. Fixes: ab73c16930d6 "ci: Update to the latest templates" Reviewed-by: Simon Ser commit 7e7c147105ac704a7b33bdee0f85dc9ccdd8f747 Author: Lukasz Spintzyk Date: Mon Jun 7 09:30:46 2021 +0200 modesetting: Disable reverse prime offload mode for displays running on evdi,udl This mode for displays running on evdi/udl as side effect of failed glamor_egl_init reverse_prime_offload_mode was initialized to FALSE After Mesa upgrade to 21.0.0 GL_RENDERER is not llvmpipe that results in successful glamor_egl_init and reverse_prime_offload_mode enabled. This commit is explicitly disabling reverse_prime_offload_mode for evdi and udl drivers Signed-off-by: Łukasz Spintzyk commit c468d34c7208c9041f9c077b54a00ae9cccad6a3 Author: Olivier Fourdan Date: Thu Jun 3 17:51:01 2021 +0200 glx: Set ContextTag for all contexts Currently, xorgGlxMakeCurrent() would set the context tag only for indirect GLX contexts. However, several other places expect to find a context for the tag or they would raise a GLXBadContextTag error, such as WaitGL() or WaitX(). Set the context tag for direct contexts as well, to avoid raising an error and possibly killing the client. Thanks to Erik Kurzinger for spotting the issue. Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit 6b47321bc6138bcd737b36e038aba904d56f1cf6 Author: Olivier Fourdan Date: Wed Apr 28 13:33:29 2021 +0200 dix: Add optional terminate delay When the command line option "-terminate" is used, it could be interesting to give it an optional grace period to let the Xserver running for a little longer in case a new connection occurs. This adds an optional parameter to the "-terminate" command line option for this purpose. v2: Use a delay in seconds instead of milliseconds (Martin Peres ) v3: Clarify man page entry, ensure terminateDelay is always >= 0, simplify TimerFree(). (Peter Hutterer ) Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit e167299f6050d85778e62ed2a1e544ceef6452fc Author: Olivier Fourdan Date: Fri Feb 19 12:03:39 2021 +0100 xfixes: Add ClientDisconnectMode With Wayland compositors now being able to start Xwayland on demand, the next logical step is to be able to stop Xwayland when there is no more need for it. The Xserver itself is capable of terminating itself once all X11 clients are gone, yet in a typical full session, there are a number of X11 clients running continuously (e.g. the Xsettings daemon, IBus, etc.). Those always-running clients will prevent the Xserver from terminating, because the actual number of X11 clients will never drop to 0. Worse, the X11 window manager of a Wayland compositor also counts as an X11 client, hence also preventing Xwayland from stopping. Some compositors such as mutter use the XRes extension to query the X11 clients connected, match their PID with the actual executable name and compare those with a list of executables that can be ignored when deciding to kill the Xserver. But that's not just clumsy, it is also racy, because a new X11 client might initiate a connection the X11 server right when the compositor is about to kill it. To solve this issue directly at the Xserver level, this add new entries to the XFixes extension to let the X11 clients themselves specify the disconnect mode they expect. Typically, those X11 daemon clients would specify the disconnect mode XFixesClientDisconnectFlagTerminate to let the Xserver know that they should not be accounted for when checking the remaining clients prior to terminate. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit b7a85e44da91d1663d5b4eabac06327c92a80f91 Author: Erik Kurzinger Date: Thu Dec 10 14:24:32 2020 -0800 glx: don't create implicit GLXWindow if one already exists If a GLXMakeCurrent request specifies an X window as its drawable, __glXGetDrawable will implicitly create a GLXWindow for it. However, the client may have already explicitly created a GLXWindow for that X window. If that happens, two __glXDrawableRes resources will be added to the window. If the explicitly-created GLXWindow is later destroyed by the client, DrawableGone will call FreeResourceByType on the X window, but this will actually free the resource for the implicitly-created GLXWindow, since that one would be at the head of the list. Then if the X window is destroyed after that, the resource for the explicitly-created GLXWindow will be freed. But that GLXWindow was already destroyed above. This crashes the server when it tries to call the destroyed GLXWindow's destructor. It also means the implicitly-created GLXWindow would have been leaked since the FreeResourceByType call mentioned above skips calling the destructor. To fix this, if __glXGetDrawable is given an X window, it should check if there is already a GLXWindow associated with it, and only create an implicit one if there is not. Signed-off-by: Erik Kurzinger Reviewed-by: Adam Jackson commit 8274dd664335cd72739a1107f174e7a974a9ea24 Author: Jan Beich Date: Sun May 30 19:49:43 2021 +0000 meson: provide fallback for *proto dependencies Meson has a built-in facility to use bundled versions of dependencies if system packages are too old. Enable for xorgproto after 8e504d8b36eb: Run-time dependency xproto found: YES 7.0.33 Run-time dependency randrproto found: YES 1.6.0 Run-time dependency renderproto found: YES 0.11.1 Run-time dependency xextproto found: YES 7.3.0 Dependency inputproto found: NO found 2.3.2 but need: '>= 2.3.99.1' Found CMake: /usr/local/bin/cmake (3.20.2) Run-time dependency inputproto found: NO (tried pkgconfig and cmake) Looking for a fallback subproject for the dependency inputproto meson.build:73:0: ERROR: Neither a subproject directory nor a xorgproto.wrap file was found. commit 34a58d7714025bc1043bf5282358406eb10e4b8e Author: Olivier Fourdan Date: Thu May 20 16:46:33 2021 +0200 xwayland/eglstream: Log when GL_OES_EGL_image is missing That will dramatically affect performance, might as well log when we cannot use GL_OES_EGL_image with the NVIDIA closed-source driver. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit fae58e9b03696a3890f9c876306c68ffa6f9ff30 Author: Olivier Fourdan Date: Mon May 17 18:20:57 2021 +0200 xwayland/eglstream: Use "nvidia" for GLVND If the EGLStream backend is able to use hardware acceleration with the NVIDIA closed source driver, we should use the "nvidia" GLX implementation instead of the one from Mesa to take advantage of the NVIDIA hardware accelerated rendering. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 24fc8aea1e4bbaba780f1a316fba797a0198f603 Author: Olivier Fourdan Date: Thu May 20 12:11:42 2021 +0200 xwayland: Add preferred GLVND vendor to xwl_screen If Xwayland's EGLstream backend supports hardware acceleration with the NVIDIA closed-source driver, the GLX library also needs to be one shipped by NVIDIA, that's what GLVND is for. Add a new member to the xwl_screen that the backend can optionally set to the preferred GLVND vendor to use. If not set, "mesa" is assumed. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 2de5ded3c6d73c1672d2cb14d603cb23fcd477e5 Author: Niveditha Rau Date: Tue May 11 15:08:41 2021 -0700 glx: Check for byte-swapping in SetReplyHeader Check for the need to byte-swap when attempting to display GL apps between a big-endian server and little-endian client or vice versa. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1127 commit bcb1de600a7656e4ee6434a8d2e2772ca9fd0473 Author: Adam Jackson Date: Thu Apr 22 11:47:29 2021 -0400 glx: Fix error return code in GLXGetDrawableAttributes This should only ever throw GLXBadDrawable, says the protocol spec. commit eb6f8daca5dc15af321d0bcc54cd6cb8b6779257 Author: Povilas Kanapickas Date: Sun May 30 13:26:48 2021 +0300 Xi: Work around broken libxcb that doesn't ignore unknown device classes libxcb 14.1 and older are not forwards-compatible with new device classes as it does not properly ignore unknown device classes. Since breaking libxcb would break quite a lot of applications, we instead report Gesture device class only if the client advertised support for XI 2.4. Clients may still not work in cases when a client advertises XI 2.4 support and then a completely separate module within the client uses broken libxcb to call XIQueryDevice. Signed-off-by: Povilas Kanapickas commit 7e692633fb9ab8e1ed2a88c3abb4fe04144c0a80 Author: Povilas Kanapickas Date: Sun May 30 13:26:47 2021 +0300 Xi: Implement gesture support for XIQueryDevice commit 0886254f96f40e59193ccbb0e3acbd5ae92dbaa3 Author: Povilas Kanapickas Date: Sun May 30 13:26:46 2021 +0300 xfree86: Bump input minor ABI due to addition touchpad gestures Signed-off-by: Povilas Kanapickas commit 1cdc3b5d146818993c5a9436d17e1d0888054c38 Author: Povilas Kanapickas Date: Sun May 30 13:26:45 2021 +0300 xfree86: Implement gesture support for test input driver commit dccc0275f4f3740cc625fb60ab1d014d6ec10709 Author: Povilas Kanapickas Date: Sun May 30 13:26:44 2021 +0300 Bump XI protocol version to 2.4 commit 75feb1366809bfb6d50734c10ab11258783a2e9d Author: Povilas Kanapickas Date: Sun May 30 13:26:43 2021 +0300 Xi: Include gestures among events that may freeze device commit 5163fc8bc28ce8bc2703cddcd9f2775ebc311766 Author: Povilas Kanapickas Date: Sun May 30 13:26:42 2021 +0300 Implement gesture processing logic commit d3c52df16105de5ac37e196a49b173e426caf417 Author: Povilas Kanapickas Date: Sun May 30 13:26:41 2021 +0300 hw/xfree86: Implement public APIs to submit gesture events commit 100a2ad6da4ba90f8d489c7a2ed3f3f0ac879a6f Author: Povilas Kanapickas Date: Sun May 30 13:26:40 2021 +0300 dix: Implement gesture event submission code path commit 7656a9c8dddbc57adfd4fd05f8e26b1845ac8738 Author: Povilas Kanapickas Date: Sun May 30 13:26:39 2021 +0300 dix: Implement internal gesture state handling commit 0bf4123fd3bc945d150884e6ea38bd2b81c0994b Author: Povilas Kanapickas Date: Sun May 30 13:26:38 2021 +0300 dix: Implement gesture event fixups before delivery commit 227f601de31aabf6aaa897477e42e6b7f8f7c963 Author: Povilas Kanapickas Date: Sun May 30 13:26:37 2021 +0300 xi: Implement conversions from internal to Xi2 gesture event structs commit f3462178caf09a8777b8671eb03949b75c8ee07a Author: Povilas Kanapickas Date: Sun May 30 13:26:36 2021 +0300 test/xi2: Verify that XI_GestureSwipeEnd is ignored when outside mask commit 407a2234b32d9cb3fed2cc7e8069bb41b98e143f Author: Povilas Kanapickas Date: Sun May 30 13:26:35 2021 +0300 test/xi2: Update tests for gesture event types commit f83f7dbb1c1be406b82da9bca12be3c43d6bfeee Author: Povilas Kanapickas Date: Sun May 30 13:26:34 2021 +0300 xi: Bump max supported XI2 event type commit 81909546397eb180ed8983bdb80f5673dbae71ac Author: Povilas Kanapickas Date: Sun May 30 13:26:33 2021 +0300 xi: Implement selection logic for gesture event types commit 080bac39c844bd16b7e1493797c6e7644badf0ab Author: Povilas Kanapickas Date: Sun May 30 13:26:32 2021 +0300 xi: Implement grab support for new gesture event types commit b544a1fdb8fa7e7efc7dde66089e901d957061d9 Author: Povilas Kanapickas Date: Sun May 30 13:26:31 2021 +0300 xi: Implement internal gesture event struct commit 22fa31ed561ed1e78bf3651f28e11882b1eac51f Author: Povilas Kanapickas Date: Sun May 30 13:26:30 2021 +0300 dix: Add new internal event enums for gesture events commit 8e504d8b36eb8f23bf8cfa46143d046cc6b8ea51 Author: Povilas Kanapickas Date: Sun May 30 13:26:29 2021 +0300 meson: Depend on inputproto 2.3.99.1 Signed-off-by: Povilas Kanapickas commit 2acde60147797393e0ee9428cff0f74cdc0a9227 Author: Povilas Kanapickas Date: Sun May 30 13:26:28 2021 +0300 .gitlab-ci: Install xorgproto 2021.4.99.2 from git This is required for the support of upcoming XI 2.4 protocol. Signed-off-by: Povilas Kanapickas commit 236d1775509404b0dcf44873422dd8652b1e9588 Author: Claes Nästén Date: Fri May 14 13:57:10 2021 +0000 os: include unistd.h when HAVE_PSTACK is defined On Solaris when HAVE_PSTACK is defined unistd.h needs to be included to avoid implicit declarations of pipe, read, execle etc. commit 7515c23a416825f0db51f9b445279b12d5918ebf Author: Erik Kurzinger Date: Tue May 11 17:00:21 2021 -0400 xwayland/eglstream: flush stream after eglSwapBuffers When eglSwapBuffers inserts a new frame into a window's stream, there may be a delay before the state of the consumer end of the stream is updated to reflect this. If the subsequent wl_surface_attach, wl_surface_damage, wl_surface_commit calls are received by the compositor before then, it will (typically) re-use the previous frame acquired from the stream instead of the latest one. This can leave the window displaying out-of-date contents, which might never be updated thereafter. To fix this, after calling eglSwapBuffers, xwl_glamor_eglstream_post_damage should call eglStreamFlushNV. This call will block until it can be guaranteed that the state of the consumer end of the stream has been updated to reflect that a new frame is available. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1171 Signed-off-by: Erik Kurzinger commit f3eb1684fa5008ad7c881f798a5efb7441b23035 Author: Simon Ser Date: Mon Apr 19 22:49:56 2021 +0200 xwayland: enable MIT-SHM shared pixmaps Allow X11 clients to create shared pixmaps via the MIT-SHM extension under Xwayland. Tested with a wlroots patch [1]. Also add a few assertions to make sure we have wl_buffers where we need them. [1]: https://github.com/swaywm/wlroots/pull/2875 Signed-off-by: Simon Ser Acked-by: Michel Dänzer commit 3d33d885fcd1215a74c1819278cf6f9557c9860b Author: Erik Kurzinger Date: Fri May 14 08:26:49 2021 -0400 xwayland/eglstream: allow commits to dma-buf backed pixmaps As of commit 098e0f52 xwl_glamor_eglstream_allow_commits will not allow commits if the xwl_pixmap does not have an EGLSurface. This is valid for pixmaps backed by an EGLStream, however pixmaps backed by a dma-buf for OpenGL or Vulkan rendering will never have an EGLSurface. Unlike EGLStream backed pixmaps, though, glamor will render directly to the buffer that Xwayland passes to the compositor. Hence, they don't require the intermediate copy in xwl_glamor_eglstream_post_damage that EGLStream backed pixmaps do, so there is no need for an EGLSurface. Signed-off-by: Erik Kurzinger Acked-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 012350e3db47fef0404346f55968032e62004fcf Author: Olivier Fourdan Date: Fri Apr 30 16:23:10 2021 +0200 xwayland/eglstream: Set ALU to GXCopy for blitting The EGLstream backend's post damage function uses a shader and glDrawArrays() to copy the data from the glamor's pixmap texture prior to do the eglSwapBuffers(). However, glDrawArrays() can be affected by the GL state, and therefore not reliably produce the expected copy, causing the content of the buffer to be corrupted. Make sure to set the ALU to GXCopy prior to call glDrawArrays() to get the expected result. Signed-off-by: Olivier Fourdan Suggested-by: Michel Dänzer commit d85bfa6ab7495281516f3a4b05dc1ff0b2c4bf91 Author: Olivier Fourdan Date: Tue May 4 10:56:38 2021 +0200 xwayland/eglstream: Do not always increment pixmap refcnt on commit Currently, the EGLstream backend would increment the pixmap refcount for each commit, and decrease that refcount on the wl_buffer release callback. But that's relying on the compositor sending us a release callback for each commit, otherwise the pixmap refcount will keep increasing and the pixmap will be leaked. So instead, increment the refcount on the pixmap only when we have not received a release notification for the wl_buffer, to avoid increasing the pixmap refcount more than once without a corresponding release event. This way, if the pixmap is still in use when released on the X11 side, the EGL stream will be kept until the compositor releases it. Signed-off-by: Olivier Fourdan Suggested-by: Michel Dänzer Reviewed-by: Michel Dänzer commit b583395cd38ad101c7541bd8b0e91143ced44703 Author: Olivier Fourdan Date: Fri Apr 30 09:02:29 2021 +0200 xwayland/eglstream: Check eglSwapBuffers() EGLstream's post_damage() would unconditionally return success regardless of the actual status of the eglSwapBuffers(). Yet, if eglSwapBuffers() fails, we should not post the corresponding damage as they wouldn't match the actual content of the buffer. Use the eglSwapBuffers() return value as the return value for post_damage() and do not take a refrence on the pixmap if it fails. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit a45799971083c47082d085d3732a5b12692cf75b Author: Olivier Fourdan Date: Mon Apr 19 14:52:38 2021 +0200 xwayland/eglstream: Fix calloc/malloc Use calloc() instead of malloc() like the rest of the code. Also fix the arguments of calloc() calls to match the definition which is calloc(size_t nmemb, size_t size). This is a cleanup patch, no functional change. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 098e0f52c088c6eb52c7e54c5a11cefabd480908 Author: Olivier Fourdan Date: Mon Apr 19 18:11:19 2021 +0200 xwayland/eglstream: Do not commit without surface The EGL surface for the xwl_pixmap is created once the stream is ready and valid. If the pixmap's EGL surface fails, for whatever reason, the xwl_pixmap will be unusable and will end up as an invalid wl_buffer. Make sure we do not allow commits in that case and recreate the xwl_pixmap/stream. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit bee2ebb29f0999862ab39af26c673c00af40b082 Author: Olivier Fourdan Date: Tue Apr 27 14:17:19 2021 +0200 xwayland/eglstream: Drop the list of pending streams Now that the pending stream is associated with the xwl_pixmap for EGLStream and the xwl_pixmap itself is associated to the pixmap, we have a reliable way to get to those data from any pending stream. As a result, the list of pending streams that we keep in the EGLStream global structure becomes useless. So we can drop the pending stream's xwl_pixmap and also the list of pending streams altogether, and save us a walk though that list for each callback. Signed-off-by: Olivier Fourdan Suggested-by: Michel Dänzer Reviewed-by: Michel Dänzer commit e19bf86c17ef9c802fea24410cc6b1f51a19ce7f Author: Olivier Fourdan Date: Wed Apr 14 17:31:08 2021 +0200 xwayland/eglstream: Keep a reference to the pixmap Commit affc47452 - "xwayland: Drop the separate refcount for the xwl_pixmap" removed the separate reference counter for the xwl_pixmap which holds the EGLStream. While that works fine for the common case, if the window's pixmap is changed before the stream is ready, the older pixmap will be destroyed and the xwl_pixmap along with it, even if the compositor is still using the stream. The code that was removed with commit affc47452 was taking care of that by increasing the separate reference counter for the xwl_pixmap, but it no longer the case. As a result, we may end up with the EGL stream in the wrong state when trying to use it, which will cascade down into all sort of issues. To avoid the problem, increase the reference count on the pixmap when it is marked as invalid in EGLStream's SetWindowPixmap(). This way, the xwl_pixmap and the EGLStream are kept until released by the compositor, even when the pixmap changes before stream is ready. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Fixes: affc47452 xwayland: Drop the separate refcount for the xwl_pixmap https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit cb61ecc7291cfbed2f76d4437cd7450b8e4dab00 Author: Olivier Fourdan Date: Fri Apr 16 10:38:23 2021 +0200 xwayland/eglstream: Dissociate pending stream from window Previously, we would have pending streams associated with top level X11 windows, keeping temporary accounting for the pending streams before they get fully initialized for the xwl_pixmap which would be associated with X11 pixmaps. If the window content changes before the stream is ready, the corresponding pending stream would be marked as invalid and the pending stream would be eventually removed once the stream becomes ready. Since commit affc47452 - "xwayland: Drop the separate refcount for the xwl_pixmap", we no longer keep a separate reference counter for the xwl_pixmap, but rather tie it to the X11 pixmap lifespan. Yet, the pending stream would still be associated with the X11 toplevel window. Dissociate the pending streams from the X11 toplevel window, to keep it tied only to the xwl_pixmap so that we can have: - pixmap <-> xwl_pixmap - xwl_pixmap <-> pending stream Of course, the pending streams remain temporary and get removed as soon as the ready callback is triggered, but the pending streams are not linked to the X11 window anymore which can change their content, and therefore their X11 pixmap at any time. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit cc596bcfb273eeab82ac3d59867668af8bad2abf Author: Olivier Fourdan Date: Thu Apr 1 08:46:52 2021 +0200 xwayland/eglstream: Add more error checking eglCreateStreamKHR() can fail and return EGL_NO_STREAM_KHR, in which case there is no point in trying to create a buffer from it. Similarly, eglCreateStreamProducerSurfaceKHR() also fail and return EGL_NO_SURFACE, which in turn will be used in eglMakeCurrent() as draw/read surface, and therefore would mean no draw/read buffer. In those cases, log the error, and bail out early. That won't solve the issue but will help with investigating the root cause of issues with EGLStream backend. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit 823f3254fabd16e5e721da57cd260beac9b8f8bd Author: Olivier Fourdan Date: Thu Apr 15 10:59:36 2021 +0200 xwayland/eglstream: Small refactoring Some functions are called "callback" whereas they are not longer callback functions or "unref" while they no longer deal with a reference counter anymore, which is quite confusing. Rename those functions to be more explicit. Also, the pending streams can be destroyed in different places, move the common code to separate function to avoid duplicating code and help with readability of the code. Signed-off-by: Olivier Fourdan Acked-by: Michel Dänzer commit 85244d2a2081d61a2e4a06e847041f638de01e3f Author: Olivier Fourdan Date: Wed Mar 31 09:49:35 2021 +0200 xwayland/eglstream: Check framebuffer status The EGLStream backend would sometime generate GL errors trying to draw to the framebuffer, which gives an invalid buffer, which in turn would generate a Wayland error from the compositor which is fatal to the client. Check the framebuffer status and bail out early if it's not complete, to avoid getting into trouble later. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit 252cbad316f43edc08aa5c844789398a58ba270c Author: Olivier Fourdan Date: Wed Mar 31 13:57:45 2021 +0200 xwayland/glamor: Add return status to post_damage If the glamor backend failed to post damage, the caller should do the same to avoid a failure to attach the buffer to the Wayland surface. Change the API of Xwayland's glamor backend post_damage() to return a status so that xwl_window_post_damage() can tell whether the callee failed. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit 3b265c59a6456f6e4abfb9e1694237bc56f1776a Author: Olivier Fourdan Date: Tue Mar 30 08:48:25 2021 +0200 glamor: Dump backtrace on GL error Currrently, when a GL error is triggered, glamor would log the error which may not be sufficient to trace it back to the cause of the error. Also dump the backtrace which may give more information as to where the error comes from. Signed-off-by: Olivier Fourdan Reviewed-by: Martin Peres Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit 25d2f4948f0abd39e099b8ac69b7cb1dab38a10a Author: Olivier Fourdan Date: Mon Mar 29 15:01:15 2021 +0200 xwayland: Check buffer prior to attaching it If the buffer is NULL, do not even try to attach it, and risk a Wayland protocol error which would be fatal to us. Signed-off-by: Olivier Fourdan Reviewed-by: Martin Peres Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit 4f0889e98306d30a37aba0fadb1fd3790c13205a Author: Olivier Fourdan Date: Mon Mar 29 14:22:56 2021 +0200 xwayland/eglstream: Check buffer creation EGLStream wl_eglstream_display_create_stream() may fail, yet Xwayland would try to attach the buffer which may cause a fatal Wayland protocol error raised by the compositor. Check if the buffer creation worked, and fail gracefully otherwise (like wayland-eglsurface does). Signed-off-by: Olivier Fourdan Reviewed-by: Martin Peres Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit 4f6fbd5009ae533cf0b3bbe382502254f9276a01 Author: Erik Kurzinger Date: Tue Apr 27 07:23:44 2021 -0400 xwayland-eglstream: fix X11 rendering to flipping GL / VK window If a window is being used for direct rendering with OpenGL or Vulkan, and is using the flipping path for presentation, it's pixmap will be set to a dma-buf backed pixmap created by the client-side GL driver. However, this means that xwl_glamor_eglstream_post_damage won't work since it requires that the pixmap has an EGLSurface that it can render to, which dma-buf backed pixmaps do not. In this case, though, xwl_glamor_eglstream_post_damage is not necessary since glamor will have rendered directly to the pixmap, so we can simply pass it directly to the compositor. There's no need for the intermediate copy we normally do in that function. Therefore, this change adds an early-return case to post_damage for dma-buf backed pixmaps, and removes the corresponding asserts from that function and allow_commits. Signed-off-by: Erik Kurzinger Acked-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit a50a0e348542bf32fb4239ee05a485772837f2f3 Author: qarmin Date: Tue Apr 28 22:05:02 2020 +0200 glxcmds: Fix possible out of bounds commit 3ea46f9336693d713ab63f422fffce42f9060a2c Author: Mazlan, Hazwan Arif Date: Thu Jul 30 10:12:27 2020 +0800 dri2: Sync i965_pci_ids.h from mesa iris_pci_ids.h Copied TGL PCI ID from MESA iris_pci_ids.h This update brings in a significant number of new platform ID's Sync up until commit f02ae698 Signed-off-by: Mazlan, Hazwan Arif commit d3933a24d1abdcb56f45e6076cb84a1110674a8a Author: Jon Turney Date: Tue Apr 23 17:59:29 2019 +0100 CI: Add an x86 MinGW-w64 cross build Only cross-build for x86 MinGW-w64, as x64 MinGW-w64 will probably require fixing LLP64 issues. I don't know any source for pre-built cross-dependencies of the X server, so build these from git. Don't build with GLX enabled, so I don't have to deal with cross-building mesa and it's dependencies, for the moment. commit 7e142cb2a848acb6af986fa91d254d4c23963b24 Author: luporl Date: Wed Dec 9 11:11:15 2020 -0300 xserver: fix RGB mask handling On FreeBSD 13.0-CURRENT for PowerPC64 big-endian (BE), X was crashing in some cases. For instance, when twm was started and the background was clicked to open its menu, X crashed with a segmentation fault, trying to dereference a null pointer at CreatePicture(). There were 2 issues with xorg-server handling of RGB masks that caused the pointer above to be null and thus the crash: - wrong use of ffs() to get the RGB offsets from the masks - overflow when shifting a 16-bit integer This change fixes both issues. They happen when the system is BE but has a video adapter using a little-endian (LE) ARGB32 framebuffer. In order to display the correct colors, this setup requires a BE RGBA32 color format to be used by X, by setting the RGB masks appropriately, that didn't work properly because of the issues above. commit 5be3b80b8d084ca5721be8791910d5827d1b6014 Author: Łukasz Spintzyk Date: Fri Sep 18 14:32:01 2020 +0200 modesetting: Remove few common functions from ms namespace A lot of that code is the same as in xf86-amdgpu and xf86-nouveau drivers. By removing that functions from ms namespace we can move that code to common implementation. Signed-off-by: Łukasz Spintzyk commit c282be503e267afdd050df837d4cf61e0e7287b7 Author: Łukasz Spintzyk Date: Fri Sep 18 14:31:53 2020 +0200 modesetting: remove unnecessary ms_covering_xf86_crtc dup of ms_covering_randr_crtc Signed-off-by: Łukasz Spintzyk commit b923364c5ec8251e81b4aa5fd451d9d7bb038009 Author: Łukasz Spintzyk Date: Fri Sep 18 14:31:47 2020 +0200 modesetting: Find crtc on secondary outputs as fallback instead of returning primary crtc Signed-off-by: Łukasz Spintzyk commit d2dce22b6775c772282ac2c0e224ef9685ab34fa Author: Łukasz Spintzyk Date: Fri Sep 18 14:31:34 2020 +0200 present: fix msc offset calculation in screen mode Instead of getting the current msc value from the window crtc, which not exist take the last saved msc value saved in the window_priv struct Signed-off-by: Łukasz Spintzyk commit 908deb0895f9fe345d70be933d251ea10511d30a Author: Łukasz Spintzyk Date: Fri Sep 18 14:31:25 2020 +0200 present: Use crtc's screen present operation for syncing Signed-off-by: Łukasz Spintzyk commit d03c0de77ba36bb5221d00ac84dcdd6aae0df453 Author: Łukasz Spintzyk Date: Fri Sep 18 14:29:25 2020 +0200 modesetting: Initialize present extension despite glamor is disabled Signed-off-by: Łukasz Spintzyk commit 7aaf54a1884f71dc363f0b884e57bcb67407a6cd Author: Matthieu Herrb Date: Sun Mar 21 18:38:57 2021 +0100 Fix XChangeFeedbackControl() request underflow CVE-2021-3472 / ZDI-CAN-1259 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit 66ce61983db0a067e48143750c4d5557d5638b1c Author: Peter Hutterer Date: Thu Mar 18 09:59:17 2021 +1000 xkb: silence a compiler warning xkb.c: In function ‘ProcXkbSetMap’: xkb.c:2747:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 2747 | DeviceIntPtr master = GetMaster(dev, MASTER_KEYBOARD); Signed-off-by: Peter Hutterer commit f6b8f8c071a575e54645aeb0bd3cb37377b0e4d3 Author: Peter Hutterer Date: Thu Mar 18 09:44:53 2021 +1000 xkb: don't require a trailing slash for the XKM output dir Rework the function to use a single snprintf call instead of a mix of strcpy/strcats. This now also appends a trailing slash where needed so we don't rely on the build system to set this for us. Also, since /tmp/ is the fallback and we never check if everything succeeded, assert if we can't use /tmp/. This will never be triggered anyway, the only caller to OutputDirectory() uses sizeof(PATH_MAX-sized array). Follow-up from 6c51818a0f55282cbe5a870f58ca82ca45ee472d Signed-off-by: Peter Hutterer commit eceafd4a2d159f5c2b789ad77ee283c2aa848a59 Author: Jan Beich Date: Fri Apr 9 14:44:13 2021 +0000 meson: switch getpeer* checks to autotools style Checking for function "getpeereid" : YES Checking for function "getpeerucred" : NO [...] include/meson.build:182:7: ERROR: Argument to "not" is not a boolean. Fixes: 68c2cfadd6d3 ("meson: Make sure defines are either set to 1 or not defined") commit 9f8421af637942e5d9963828f4ce55f456410603 Author: Jan Beich Date: Fri Apr 9 15:22:22 2021 +0000 meson: check pthread_setname_np like autotools FreeBSD < 12.2 and OpenBSD only have pthread_set_name_np. As libpthread isn't in scope use -Werror to trip the check. Header has symbol "PTHREAD_MUTEX_RECURSIVE" : YES Checking if "pthread_setname_np(tid, name)" compiles: YES os/inputthread.c:326:5: error: implicit declaration of function 'pthread_setname_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pthread_setname_np (pthread_self(), "InputThread"); ^ os/inputthread.c:447:5: error: implicit declaration of function 'pthread_setname_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pthread_setname_np (pthread_self(), "MainThread"); ^ Fixes: c20e7b5e2222 ("meson: Automatically detect HAVE_PTHREAD_SETNAME_NP") commit 38e875904b039ec1889e7c81eb1d577a4f69b26d Author: Erik Kurzinger Date: Thu Dec 3 14:57:51 2020 -0800 xwayland: implement pixmap_from_buffers for the eglstream backend Provides an implementation for the pixmap_from_buffers DRI3 function for xwayland's eglstream backend. This will be used by the NVIDIA GLX driver to pass buffers from client applications to the server. These can then be presented using the PRESENT extension. To hopefully make this less error-prone, we also introduce a "type" field for this struct to distinguish between xwl_pixmaps for the new DRI3-created pixmaps and those for the existing glamor-created pixmaps. Additionally, the patch enables wnmd present mode with the eglstream backend. This involves creating a wl_buffer for the provided dma-buf before importing it into EGL and passing this to the compositor so it can be scanned out directly if possible. Since both backends now support this present mode, the HAS_PRESENT_FLIP flag is no longer needed, so it can be removed. Reviewed-by: Michel Dänzer Acked-by: Olivier Fourdan Signed-off-by: Erik Kurzinger commit bc99dd2127f12f1aae55971c09a2792eeaa98444 Author: Erik Kurzinger Date: Wed Mar 3 11:56:41 2021 +0100 xwayland: Add check_flip() glamor backend function This is preliminary work for hardware accelerated rendering with the NVIDIA driver. This exposes a new glamor backend function, check_flip, which can be used to control whether flipping is supported for the given pixmap. Reviewed-by: Michel Dänzer Acked-by: Olivier Fourdan Signed-off-by: Erik Kurzinger commit 400d4d0fdd55192f394e1a8273dfb2423c895ec0 Author: Erik Kurzinger Date: Fri Feb 12 12:09:27 2021 -0800 xwayland: move formats and modifiers functions to common glamor code This is preliminary work for hardware accelerated rendering with the NVIDIA driver. This moves the modifiers and formats functions previously only available to the GBM backend to the common glamor code so that it can be used by both the GBM and EGLStream backends. Reviewed-by: Michel Dänzer Acked-by: Olivier Fourdan Signed-off-by: Erik Kurzinger commit ae225417c0a0828ffb24e11eb4b968c34692e25a Author: Olivier Fourdan Date: Wed Mar 3 09:55:12 2021 +0100 xwayland: Move dmabuf interface to common glamor code This is preliminary work for hardware accelerated rendering with the NVIDIA driver. The EGLStream backend can possibly also use the dmabuf interface, so move the relevant code from the GBM specific source to the common bits. Signed-off-by: Olivier Fourdan commit d231ce2d9ce9644e77e8dbe8c5a23eeb11e85b55 Author: Povilas Kanapickas Date: Wed Apr 7 22:16:43 2021 +0300 meson: Disable LTO for tests `-flto=auto` together with `-Wl,-wrap` causes link errors at least in certain compilers (e.g. GCC 10.2.0). Since this is reoccurring issue (internet search shows similar problems with GCC 4.6 a decade ago) let's disable LTO for tests even if it's disabled elsewhere. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1116 Signed-off-by: Povilas Kanapickas commit 68c2cfadd6d31f0787bc35dbafe32d7dfd638e27 Author: Povilas Kanapickas Date: Mon Apr 5 16:24:47 2021 +0300 meson: Make sure defines are either set to 1 or not defined This will make the behavior of meson consistent with autotools. The configuration macros are exposed to public headers so any inconsistency is likely to break code for anyone who's not careful to use #ifdef instead of #if. Signed-off-by: Povilas Kanapickas commit faff5bbdf5dec53101a9d8f624f45262016154c1 Author: Povilas Kanapickas Date: Mon Apr 5 16:24:46 2021 +0300 meson: Sync the name of INPUTTHREAD conf macro with autotools build The rest of dix code uses INPUTTHREAD, so having a different name in meson configuration was an oversight. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/936 Signed-off-by: Povilas Kanapickas commit b25795462f4754ec2e3c677a41dea33ed1be79da Author: Povilas Kanapickas Date: Mon Apr 5 16:24:48 2021 +0300 meson: Add missing pthread dependency for libxserver_os library Signed-off-by: Povilas Kanapickas commit 9582ef4efc72afa9f84b6469b5f81ce5dd8eb15d Author: Povilas Kanapickas Date: Mon Apr 5 16:24:45 2021 +0300 meson: Fix typo in libxserver_os dependencies for openbsd This has not been tested, but os_deps is not used anywhere in the file, so it's likely this was a typo. Signed-off-by: Povilas Kanapickas commit 689496ed657ef055869f5eda7e09ff35edff30cc Author: Povilas Kanapickas Date: Wed Apr 7 21:55:03 2021 +0300 meson: Switch project version to 20.x.y style commit 2df55813d0f553050ff06065a67e90f678db593a Author: Povilas Kanapickas Date: Wed Apr 7 21:55:02 2021 +0300 meson: Drop version subpatch handling commit 5d3679104aaeabac585894606ad317b433b65238 Author: Adam Jackson Date: Wed Apr 7 21:55:01 2021 +0300 meson.build: Keep the protocol version looking like xserver 1.20.x did This effectively changes the versioning to be as if xserver 21.0 was xserver 1.21.0. This should keep any client-side version checks that know about the Xorg 7.0 -> xserver 1.0 epoch from getting confused. commit 3e4e70db10a4b2d531ccd649c18317ea2a49d256 Author: George Matsumura Date: Wed Apr 7 17:28:46 2021 -0600 meson: Fix DragonFly BSD identifier in meson build files This changes the operating system identifier tested against host_machine.system() in meson build files from "dragonflybsd" to the officially stable "dragonfly". Signed-off-by: George Matsumura commit 199f278a1b7570b1cb6e24b8bedb4d721b3c9938 Author: Edouard Gaulué Date: Tue Mar 16 20:59:17 2021 +0100 French text in Preferences Pane Review commit 65b27d82f2c6c3eecbc7370765ee7c036b245b2f Author: Jeremy Huddleston Sequoia Date: Sun Apr 4 16:10:28 2021 -0700 xquartz: Call PseudoramiXExtensionInit() through InitOutput() just like xwin Fixes: https://github.com/XQuartz/XQuartz/issues/140 Signed-off-by: Jeremy Huddleston Sequoia commit 34e2a64ce00c219d64b8169b774661d5727c45c7 Author: Pascal VITOUX Date: Fri Nov 27 16:54:59 2020 +0000 xfree86: fix gtf support detection for EDID 1.4 According to the "VESA Enhanced EDID Standard", all GTF compliant displays are continuous frequency. The GTF support flags in 'Display Range Limits Descriptor' cannot be used if the display is a non-continuous frequency multi-mode display. Closes #1105 Signed-off-by: Pascal VITOUX Fixes: 6a79a737 ("xfree86: add drm modes on non-GTF panels") Reviewed-by: Aaron Ma aaron.ma@canonical.com commit b75d0cca28aaae5cd21ad76ad2822138fac2882a Author: Aaron Plattner Date: Fri Feb 19 11:47:13 2021 -0800 modesetting: Defer crtc gamma size upgrade to drmmode_setup_colormap Rather than trying to create a gamma ramp array of the appropriate size in drmmode_crtc_init when the GAMMA_LUT property should be used, just flag the crtc as wanting to use the GAMMA_LUT property and then replace the gamma ramp later, right before calling xf86HandleColormaps. This avoids a problem during initial startup where xf86RandR12CreateObjects12 hard-codes a gamma ramp size of 256, causing xf86RandR12CrtcSetGamma to read past the end of the DIX layer's RandR gamma ramp array: PreInit drmmode_pre_init drmmode_crtc_init crtc->gamma_size = 1024 ScreenInit xf86CrtcScreenInit xf86RandR12Init xf86RandR12Init12 xf86RandR12CreateObjects12 RRCrtcCreate randr_crtc->gammaSize = 0 xf86RandR12InitGamma(pScrn, 256) RRCrtcGammaSetSize randr_crtc->gammaSize = 256 xf86RandR12InitGamma xf86RandR12CrtcInitGamma RRCrtcGammaSet xf86RandR12CrtcSetGamma // crtc->gamma_size is 1024 here, while randr_crtc->gammaRed // is a 256-element array. memcpy(crtc->gamma_red, randr_crtc->gammaRed, crtc->gamma_size * sizeof(crtc->gamma_red[0])); drmmode_setup_colormap xf86HandleColormaps xf86RandR12InitGamma RRCrtcGammaSetSize randr_crtc->gammaSize = 1024 Fixes: 245b9db0 - modesetting: Use GAMMA_LUT when available Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1126 Signed-off-by: Aaron Plattner Reviewed-by: Robert Morell commit ab8f8c98418db6954b17d93280b7b526fc1d3f7c Author: Jeremie Courreges-Anglas Date: Thu Jan 21 23:52:15 2021 +0100 xserver/os: safer IPv6 "kame hack" fix, only override sin6_scope_id if zero This helps on KAME-based systems which want to get rid of this hack. The assumption is that if sin6_scope_id is set, then the interface index is no longer embedded in the address. Signed-off-by: Jeremie Courreges-Anglas commit aeed57d722f2eb978c17fd7e859334d34af38d05 Author: Povilas Kanapickas Date: Fri Mar 26 00:09:41 2021 +0200 xkb: Fix parsing of XkbSA_DeviceValuator action type The xkb spec defines that the 7th element of the DeviceValuator key action description is "valuator 2 value". This error most likely was accidentally introduced as a copy-paste error in edeb033f29ae2d52e86c543ccbf22fb7ae1fdb7f. Signed-off-by: Povilas Kanapickas commit a3931ec6f43857aeed7feac5d223d7db6728145e Author: Povilas Kanapickas Date: Thu Mar 25 22:46:33 2021 +0200 xfree86: Create a symlink X -> Xorg when installing using meson This brings the behavior closer than what we currently have with autotools-based build system. Meson does not currently have native support for symlinks. See https://github.com/mesonbuild/meson/issues/1602. Signed-off-by: Povilas Kanapickas commit 09cd65233e0f5c04e7e3d063decf357f239a65f6 Author: Povilas Kanapickas Date: Thu Mar 25 22:48:56 2021 +0200 xfree86: Set appropriate install_mode for suid_wrapper commit 88b5e1a219a16dd66be6302dbf88ec93d317f991 Author: Povilas Kanapickas Date: Thu Mar 25 22:48:55 2021 +0200 meson: Bump min meson version to 0.47 to get install_mode support commit 82d2156ba7b4e592a2ceb5da767b690862852caa Author: Povilas Kanapickas Date: Thu Mar 25 22:51:39 2021 +0200 xfree86: Fix meson overwriting suid wrapper with the wrapped executable Meson gets confused when there are two targets of the same name within the same directory, so we use a different intermediate name. This is a problem with the Xorg SUID wrapper which has the same filename as the real Xorg executable and is configured in the same meson.build file. This commit works around this by using a different filename in build stage and renaming only when installing. Signed-off-by: Povilas Kanapickas commit ba51acb1de752924c389cedbca39b5dc63679ee6 Author: Povilas Kanapickas Date: Thu Mar 25 22:57:56 2021 +0200 miext: Remove if check which is always true In both cases we check for width > 0 just above, and the variable is not modified between the checks, so the condition is always true. Signed-off-by: Povilas Kanapickas commit 99e7ccffb38b4c93ff0c73586ec72a7fb78cae53 Author: Povilas Kanapickas Date: Thu Mar 25 23:18:14 2021 +0200 dix: Fix URL to description of focus in/out model The current URL points to an unrelated patch for acpid. Signed-off-by: Povilas Kanapickas commit 1b7dca27eb44eac9cb0a8d1463d968872c76f4d5 Author: Simon Ser Date: Thu Feb 18 12:04:48 2021 +0100 xwayland: remove wl_log_set_handler_client workaround This bumps the minimum Wayland version to 1.5 (released in 2014). Signed-off-by: Simon Ser Reviewed-by: Michel Dänzer Reviewed-by: Olivier Fourdan Reviewed-by: Martin Peres commit 6c51818a0f55282cbe5a870f58ca82ca45ee472d Author: Michel Dänzer Date: Fri Mar 5 15:23:53 2021 +0100 meson: Make sure XKM_OUTPUT_DIR has a trailing slash RunXkbComp passes an invalid file path to xkbcomp if there's no trailing slash. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1146 Suggested-by: Dylan Baker commit 376eaadde36f80fcbe6b0391a3385e77b4602854 Author: Jan Beich Date: Fri Mar 5 22:50:51 2021 +0000 meson: hide C API if Xorg is disabled (like autotools) When building only Xwayland using Meson some files are always installed. This causes package conflict if Xwayland is built separately from Xorg. include/xorg/compositeext.h include/xorg/damage.h include/xorg/damagestr.h include/xorg/dbestruct.h include/xorg/dri3.h include/xorg/fb.h include/xorg/fboverlay.h include/xorg/fbpict.h include/xorg/fbrop.h include/xorg/geext.h include/xorg/geint.h include/xorg/glyphstr.h include/xorg/mi.h include/xorg/micmap.h include/xorg/micoord.h include/xorg/migc.h include/xorg/miline.h include/xorg/mioverlay.h include/xorg/mipict.h include/xorg/mipointer.h include/xorg/mipointrst.h include/xorg/mistruct.h include/xorg/misync.h include/xorg/misyncfd.h include/xorg/misyncshm.h include/xorg/misyncstr.h include/xorg/mizerarc.h include/xorg/panoramiX.h include/xorg/panoramiXsrv.h include/xorg/picture.h include/xorg/picturestr.h include/xorg/present.h include/xorg/presentext.h include/xorg/randrstr.h include/xorg/rrtransform.h include/xorg/shadow.h include/xorg/shmint.h include/xorg/syncsdk.h include/xorg/vndserver.h include/xorg/wfbrename.h include/xorg/xace.h include/xorg/xacestr.h include/xorg/xorg-server.h include/xorg/xvdix.h include/xorg/xvmcext.h share/aclocal/xorg-server.m4 Reviewed-by: Michel Dänzer commit 4ae36f418ed683532b0b6991e4a1e7d56740b845 Author: Jeremy Huddleston Sequoia Date: Mon Mar 8 21:02:40 2021 -0800 xquartz: Ensure the mouse pointer is shown when switching to a native macOS alert or window Fixes: https://github.com/XQuartz/XQuartz/issues/100 Signed-off-by: Jeremy Huddleston Sequoia commit b2d96b5cd459963a9587ee9c86afc9266ba3d02b Author: Matthieu Herrb Date: Sat Feb 27 11:30:18 2021 +0100 Avoid sequences of malloc(0) / free() by checking the length. This has an impact on heap fragmentation. Signed-off-by: Matthieu Herrb commit 15a413e11d186a9206a39a9b2fe4b72c065d5918 Author: Jeremy Huddleston Sequoia Date: Mon Feb 22 23:02:42 2021 -0800 xquartz: Update meson build to remove deleted files Signed-off-by: Jeremy Huddleston Sequoia commit e59848548a462f1a0ac751bb8bb6afe56258cf4e Author: Jeremy Huddleston Sequoia Date: Fri Mar 5 22:57:24 2021 -0800 xquartz: Fix appFlags build failure with macOS 10.15+ SDKs Signed-off-by: Jeremy Huddleston Sequoia commit 69e087caa4fdfcc303080c021ba463afcf4290c7 Author: Olivier Fourdan Date: Fri Feb 5 11:36:15 2021 +0100 xwayland: Fix path in pkg-config with autoconf When using autoconf/automake to build Xwayland, the actual path to Xwayland is not fully qualified and refers to the "exec_prefix". As a result, the path provided by the generated pkg-config file is wrong when using autoconf to build the Xserver. Fix the xwayland.pc file to also set the variable "prefix" and "exec_prefix" so that the path to Xwayland is fully resolved. Add those variables to the meson build as well for good measure. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Acked-by: Michel Dänzer commit d7391f383ddca5089586b4d04fede56169a1a85e Author: Olivier Fourdan Date: Thu Mar 4 14:13:41 2021 +0100 xwayland: Fix LeaveNotify for relative pointer Since commit 20c78f38, we use the relative pointer for enter/leave events. However, sprite_check_lost_focus() which verifies whether the pointer has left an Xwayland surface still explicitly check for the absolute pointer. As a result, no LeaveNotify event is emitted anymore now when the pointer crosses from an Xwayland surface to a Wayland native one. Make sure to check the last slave device against get_pointer_event() as well, not just the absolute pointer. Signed-off-by: Olivier Fourdan Acked-by: Martin Peres Acked-by: Roman Gilg Tested-by: Roman Gilg Reviewed-by: Peter Hutterer Fixes: 20c78f38 - xwayland: use get_pointer_device() for enter/leave handling too commit a5367face12d8e4162bc49a60b5d13955a7fb293 Author: Jacob Cherry Date: Wed Mar 3 17:50:31 2021 +0000 xfree86: Fix autoconfig secondary GPU devices The code path added by commit 69e4b8e6 (xfree86: attempt to autoconfig gpu slave devices (v3)) assumes that it will only be run if the primary device on the screen is the first device in xf86configptr->conf_device_lst. While this is true most of the time, there are two specific cases where this assumption fails. First, if the first device in conf_device_lst is assigned to a different seat than the running X server, it will be skipped by the previous FIND_SUITABLE macro usage. Second, if the primary device was explicitly assigned to the screen but auto_gpu_device is still set and no secondary devices were explicitly listed, that device may not be the first device in conf_device_lst. When the first device in conf_device_lst is not the primary device assigned to the screen, two problems emerge. First, the first device in conf_device_lst will never be assigned to the screen as a secondary device. Second, the primary device is additionally assigned to the screen as a secondary device. The combination of these problems causes certain otherwise valid configurations to be invalid. For example, if a primary device is assigned to a screen and a secondary device is listed in the config but not explicitly assigned to the screen, then one order of the device sections results in a usable PRIME or Reverse PRIME setup and the other order does not. This commit removes the assumption that the primary device is the first device in conf_device_lst by starting the loop from the start of conf_device_lst and skipping the primary device when it is encountered. Signed-off-by: Jacob Cherry commit 97ed0048e45f4909a0c164b27e768af8c9364068 Author: Olivier Fourdan Date: Fri Dec 18 17:53:33 2020 +0100 xwayland: Delay cursor visibility update Xwayland won't emulate XWarpPointer requests if the cursor is visible, this is to avoid having the cursor jumping on screen and preventing random X11 clients from controlling the pointer in Wayland, while allowing games which use that mechanism with a hidden cursor to work in Xwayland. There are, however, games which tend to do it in the wrong order, i.e. show the cursor before moving the pointer, and because Xwayland will not allow an X11 client to move the pointer while the cursor is visible, the requests will fail. Add a workaround for such X11 clients, when the cursor is being shown, keep it invisible until the cursor is actually moved. This way, X11 clients which show their cursor just before moving it would still have a chance to succeed. v2: Add a timeout to show the cursor for well behaved clients. v3: Some cleanup (Michel) v4: Do not cancel cursor delay when updating the cursor to avoid delaying cursor visibility indefinitely if the client keeps settings different cursors (Michel) Signed-off-by: Olivier Fourdan Tested-by: Jaap Buurman jaapbuurman@gmail.com Reviewed-by: Michel Dänzer Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/734 commit 9d329a0fb17c1a7840408d329ee2e2a04d357387 Author: Jeremy Huddleston Sequoia Date: Sun Feb 21 21:49:58 2021 -0800 xquartz: Remove a check for NSAppKitVersionNumber >= NSAppKitVersionNumber10_7 This check is always true on our supported systems. Signed-off-by: Jeremy Huddleston Sequoia commit 839b49ac05c3285434d8487b48d8b52323187e44 Author: Jeremy Huddleston Sequoia Date: Sun Feb 21 21:49:14 2021 -0800 xquartz: Don't include strndup.c any more since we no longer support 10.8 and older Signed-off-by: Jeremy Huddleston Sequoia commit 677eb6827bd68bdf29e3539d1e10e9872896efec Author: Jeremy Huddleston Sequoia Date: Sun Feb 21 20:58:42 2021 -0800 xquartz: Add a launch trampoline to better integrate with modern versions of macOS Fixes: https://github.com/XQuartz/XQuartz/issues/6 Signed-off-by: Jeremy Huddleston Sequoia commit 25035229b73742f9e6a96ac3e535b30b5c6196a8 Author: Jeremy Huddleston Sequoia Date: Fri Feb 19 23:16:56 2021 -0800 xquartz: Don't process AppKit events if we haven't finished initializing Signed-off-by: Jeremy Huddleston Sequoia commit 487286d47260782d331229af10df17711cbca1ea Author: Jeremy Huddleston Sequoia Date: Sat Feb 20 17:24:14 2021 -0800 xquartz: Allocate each fbconfig separately A change during the 1.20 development cycle resulted in fbconfigs being walked and deallocated individually during __glXScreenDestroy. This change now avoids a use-after-free caused by that change. ==50859==ERROR: AddressSanitizer: heap-use-after-free on address 0x00010d3819c8 at pc 0x0001009d4230 bp 0x00016feca7a0 sp 0x00016feca798 READ of size 8 at 0x00010d3819c8 thread T5 #0 0x1009d422c in __glXScreenDestroy glxscreens.c:448 #1 0x10091cc98 in __glXAquaScreenDestroy indirect.c:510 #2 0x1009d2734 in glxCloseScreen glxscreens.c:169 #3 0x100740a24 in dix_main main.c:325 #4 0x10023ed50 in server_thread quartzStartup.c:65 #5 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0) #6 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38) 0x00010d3819c8 is located 200 bytes inside of 12800-byte region [0x00010d381900,0x00010d384b00) freed by thread T5 here: #0 0x101477ba8 in wrap_free+0x98 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fba8) #1 0x1009d4240 in __glXScreenDestroy glxscreens.c:449 #2 0x10091cc98 in __glXAquaScreenDestroy indirect.c:510 #3 0x1009d2734 in glxCloseScreen glxscreens.c:169 #4 0x100740a24 in dix_main main.c:325 #5 0x10023ed50 in server_thread quartzStartup.c:65 #6 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0) #7 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38) previously allocated by thread T5 here: #0 0x101477e38 in wrap_calloc+0x9c (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fe38) #1 0x100925a40 in __glXAquaCreateVisualConfigs visualConfigs.c:116 #2 0x10091cb24 in __glXAquaScreenProbe+0x224 (X11.bin:arm64+0x100730b24) #3 0x1009cd840 in xorgGlxServerInit glxext.c:528 #4 0x10074539c in _CallCallbacks dixutils.c:743 #5 0x100932a70 in CallCallbacks callback.h:83 #6 0x100932478 in GlxExtensionInit vndext.c:244 #7 0x10020a364 in InitExtensions miinitext.c:267 #8 0x10073fe7c in dix_main main.c:197 #9 0x10023ed50 in server_thread quartzStartup.c:65 #10 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0) #11 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38) Regressed-in: 4b0a3cbab131eb453e2b3fc0337121969258a7be CC: Giuseppe Bilotta Signed-off-by: Jeremy Huddleston Sequoia commit 6a83fb51b7a8b2e167e7d6380229b69e5452f91f Author: Jeremy Huddleston Sequoia Date: Sat Feb 20 15:17:18 2021 -0800 xquartz: Fix a compiler warning about const incompatible pointer assignment driWrap.c:541:30: error: assigning to 'GCOps *' (aka 'struct _GCOps *') from 'const GCOps *' (aka 'const struct _GCOps *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] pGCPriv->originalOps = pGC->ops; ^ ~~~~~~~~ Signed-off-by: Jeremy Huddleston Sequoia commit a3ddcdd56c246e2226c7cdf372c2a1294eb6d888 Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 23:16:15 2021 -0800 xquartz: Fix build with sparkle enabled Signed-off-by: Jeremy Huddleston Sequoia commit 279bcbd9cf9e557a6789d6e4cede8e8799c3788e Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 12:43:53 2021 -0800 xquartz: Silence a compiler warning about missing internal methods on NSApplication Signed-off-by: Jeremy Huddleston Sequoia commit fe89c70e472a9da0541b798eea60c5362b49a99d Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 22:19:21 2021 -0800 xquartz: Rewrite Window menu handling to not depend on X11App.windowsMenu.numberOfItems being correct in -awakeFromNib Fixes: https://github.com/XQuartz/XQuartz/issues/56 Signed-off-by: Jeremy Huddleston Sequoia commit 41aed8f69634ec61ea0e40fff1cfdaf868be843e Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 15:41:29 2021 -0800 xquartz: Convert X11Controller ivars into @properties Signed-off-by: Jeremy Huddleston Sequoia commit c2750e1fab774c8e6675ecf284124ff55b5be9cf Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 14:39:46 2021 -0800 xquartz: Convert X11Application ivars into @properties Signed-off-by: Jeremy Huddleston Sequoia commit f51b97b0de2e562e341f2d72c5f00a74c71a159f Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 14:47:50 2021 -0800 xquartz: Fold quartzCommon.h into quartz.h Everything declared in it comes from quartz.c, so match reality. Signed-off-by: Jeremy Huddleston Sequoia commit 4b4500c48f06e7ef41cd94f417e49b3f4f1412ae Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 13:00:43 2021 -0800 xquartz: Fold away some unnecessary hops to X11Controller through X11Application Signed-off-by: Jeremy Huddleston Sequoia commit 39c0e1c0ab6a0a89a71f26446973c779ca7fd927 Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 09:41:30 2021 -0800 xquartz: Fold away array_with_strings_and_numbers and simplify with more modern Objective-C Signed-off-by: Jeremy Huddleston Sequoia commit 87f8fe1f74f10faf0ffc84f03539799ad4c2465e Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 09:33:56 2021 -0800 xqaurtz: Remove message_kit_thread() and use dispatch instead Signed-off-by: Jeremy Huddleston Sequoia commit 94e4e173486c2a94ddcfd2d0515e1ee6731f6656 Author: Jeremy Huddleston Sequoia Date: Wed Feb 17 23:58:53 2021 -0800 xquartz: Use objc_autoreleasePoolPush / objc_autoreleasePoolPop directly in QuartzBlockHandler It violates @autoreleasepool best practices, and this helps collapse quartzCocoa.m into quartz.c Signed-off-by: Jeremy Huddleston Sequoia commit fba421f700498fa382089df47942df36a2d75ce6 Author: Jeremy Huddleston Sequoia Date: Wed Feb 17 22:04:55 2021 -0800 xquartz: Minor code modernization -- @autoreleasepool adoption Signed-off-by: Jeremy Huddleston Sequoia commit 318f8a4a8a47a0ce4bbbf4290469e933602c9b30 Author: Jeremy Huddleston Sequoia Date: Wed Feb 17 20:55:06 2021 -0800 xquartz: Remove some dead code for compatibility with older nibs Signed-off-by: Jeremy Huddleston Sequoia commit 72a39dccf99191fbfbb4b399c446fd017d55f24e Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 16:05:34 2021 -0800 xquartz: Remove a workaround for AppKit versions older than Lion Signed-off-by: Jeremy Huddleston Sequoia commit 7e2875035800887f3f41f75cba4299088daf939a Author: Jeremy Huddleston Sequoia Date: Wed Feb 17 15:45:45 2021 -0800 xquartz: Fix applications menu table background color for dark mode Fixes: https://github.com/XQuartz/XQuartz/issues/32 Signed-off-by: Jeremy Huddleston Sequoia commit 85beee9885a8e65960fbbde2de9aa28598b4d6ae Author: Jeremy Huddleston Sequoia Date: Wed Feb 17 15:16:26 2021 -0800 xquartz: Apply Xcode 12.4 automatic updates to nibs Signed-off-by: Jeremy Huddleston Sequoia commit 4e892aa6e132447e43d7bae7e3aca4f1fb172f93 Author: Jeremy Huddleston Sequoia Date: Wed Feb 17 13:38:31 2021 -0800 xquartz: Update the about box copyright to 2021 Signed-off-by: Jeremy Huddleston Sequoia commit c9a3b14c1472632afaff340f73a77a2b961f195a Author: Jeremy Huddleston Sequoia Date: Mon Feb 1 16:27:38 2021 -0800 xquartz: Ensure we call into TIS on the main thread There is a place where this code was called on the main thread. We're using a rather nasty anti-pattern to just call a block inline rather than synchonously calling it on the main thread if we're already on the main thread. This code could use a good overhaul, but I don't have time to rip it apart right now. This will address the immediate issue. Fixes: https://github.com/XQuartz/XQuartz/issues/40 Fixes: https://github.com/XQuartz/XQuartz/issues/48 Signed-off-by: Jeremy Huddleston Sequoia commit af17b5c499ded807395c7ef02254d5af8ddc4667 Author: Povilas Kanapickas Date: Mon Feb 15 14:52:32 2021 +0200 dix: Use correct listener to deliver touch end events This fixes an problem left in f682e0563f736ed2c2c612ed575e05b6e3db945e due to an incorrect cherry-pick. We must use old listener->listener to deliver the touch event. Otherwise grab won't let the event through and the abovementioned commit has no effect. Signed-off-by: Povilas Kanapickas commit 20c78f38a0b33b88bc82a2bcd54d2e6c74a4c132 Author: Peter Hutterer Date: Tue Feb 16 14:48:13 2021 +1000 xwayland: use get_pointer_device() for enter/leave handling too In Weston, clicking the window decoration of an Xwayland client gives us a wl_pointer.button event immediately followed by a wl_pointer.leave event. The leave event does not contain any button state information, so the button remains logically down in the DIX. Once the pointer button is released, a wl_pointer.enter event is sent with the current button state (zero). This needs to trigger a ButtonRelease event but for that we need to ensure that the device is the same as the one we send ButtonPress events through. Fixes a regression introduced in a4095162ca923992a8cfae6d0f09ff9f8144762a. Signed-off-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit dee2bb033e78e2f4aae7f5708c3d4fc74a9957de Author: Olivier Fourdan Date: Mon Feb 15 11:33:56 2021 +0100 dix: Guard against non-existing PtrFeedbackPtr Trying to change the pointer control settings on a device without PtrFeedbackPtr would be a bug and a crash in the Xserver. Guard against that case by returning early with a BadImplementation error, that might kill the X11 client but the Xserver would survive. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1137 commit ab76272a7d2bff997985893c89147412a7360310 Author: Olivier Fourdan Date: Mon Feb 15 11:23:59 2021 +0100 xwayland: Add PtrFeedback to the touch device Trying to change the acceleration/threshold on Xwayland cannot work, and the corresponding handler xwl_pointer_control() is a no-op. Yet, an X11 client trying to change those on the touch device may possibly cause a crash because the touch device in Xwayland doesn't set that. Initialize the touch device's PtrFeedback to make sure that just cannot happen. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1137 commit a4095162ca923992a8cfae6d0f09ff9f8144762a Author: Olivier Fourdan Date: Thu Feb 11 11:42:01 2021 +0100 xwayland: Use relative device for buttons/axis We are using the relative pointer for motion events, but buttons and axis events still go through the absolute pointer device. That means additional DeviceChanged events that could be avoided if the buttons and axis events were coming from the same device as motion events. Route those events to the relative pointer if available so that motion, buttons and axis events come from the same device (most of the time). Suggested-by: Peter Hutterer Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130 commit 1abab61dc23d585860bc847bcecb1b0315977c27 Author: Olivier Fourdan Date: Thu Feb 11 15:32:34 2021 +0100 xwayland: Add wheel axis to relative pointer The relative pointer only has 2 axis, if we want to route the mouse wheel events to that device, we need to add the axis definition, similar to what is done for the absolute pointer. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130 commit 71817928247971566903d56c0571db61b7933747 Author: Olivier Fourdan Date: Tue Feb 9 13:33:05 2021 +0100 xwayland: Split dispatch_pointer_motion_event This is a cleanup patch, no functional change. Split the function dispatch_pointer_motion_event() into three separate simpler functions, relative motion with a warp emulator, relative motion and absolute motion. This makes the code a lot easier to read for me, rather than having everything in a single function with nested if/else conditions. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit c5c5322ad69b0751f16c785a479b2989b8794235 Author: Olivier Fourdan Date: Tue Feb 9 13:04:59 2021 +0100 xwayland: Use relative values for raw events Xwayland supports relative motion events from the Wayland compositor via the relative-pointer protocol, and converts those to the absolute range in device units for raw events. Some X11 clients however wrongly assume relative values in the axis values even for devices explicitly labeled as absolute. While this is a bug in the client, such applications would work fine in plain Xorg but not with Xwayland. To avoid that issue, use the relative values for raw events without conversion, so that such application continue to work in Xwayland. Thanks Peter for figuring out the root cause. v2: Don't duplicate relative and absolute events (Peter) v3: Use POINTER_RAWONLY (Peter) Suggested-by: Peter Hutterer Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130 commit ebdb2e264676c3b27a708328348efe73e0d3c8c2 Author: Olivier Fourdan Date: Tue Feb 9 13:01:21 2021 +0100 xwayland: Use a resolution of 0 for relative motion That's what evdev/libinput drivers do. Suggested-by: Peter Hutterer Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130 commit b5e1f13681090fc327dc2cabee1dc123273e785b Author: Olivier Fourdan Date: Thu Feb 11 09:48:12 2021 +0100 dix: Add POINTER_RAWONLY flag This add a new flag POINTER_RAWONLY for GetPointerEvents() which does pretty much the opposite of POINTER_NORAW. Basically, this tells GetPointerEvents() that we only want the DeviceChanged events and any raw events for this motion but no actual motion events. This is preliminary work for Xwayland to be able to use relative motion events for raw events. Xwayland would use absolute events for raw events, but some X11 clients (wrongly) assume raw events to be always relative. To allow such clients to work with Xwayland, it needs to switch to relative raw events (if those are available from the Wayland compositor). However, Xwayland cannot use relative motion events for actual pointer location because that would cause a drift over time, the pointer being actually controlled by the Wayland compositor. So Xwayland needs to be able to send only relative raw events, hence this API. Bump the ABI_XINPUT_VERSION minor version to reflect that API addition. v2: Actually avoid sending motion events (Peter) v3: Keep sending raw emulated events with RAWONLY (Peter) Suggested-by: Peter Hutterer Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130 commit 213129012bc0fe508a8a4180ffda1ef661894049 Author: Povilas Kanapickas Date: Sun Dec 20 00:48:22 2020 +0200 Xi: Deliver pointer emulated touch events to grabbing client Delivery of emulated events usually happens only to the owning client. If there are grabs, only the grabbing client may receive these events. This logic does not work during the touch event replay in DeactivatePointerGrab(), as the previous grab is no longer in the listener queue of the touch, so the next owner gets whole emulated event sequence. This may trigger implicit grabs. After replay, DeactivatePointerGrab() will update the global grab without regard to this new implicit grab, which leads to issues down the line. This change is effectively the same as 35e5a76cc1 except that the change is limited to only emulated pointer events. Otherwise, in the case of a device grab we end up not sending any touch events to clients that selected XI_TouchOwnership event and should get touch events before they get ownership of touch sequence. Fixes #7 https://bugs.freedesktop.org/show_bug.cgi?id=96536 commit 30e11535afb3c4efc3a5cef640de44c7cd9bb561 Author: Povilas Kanapickas Date: Sun Dec 20 00:48:21 2020 +0200 Revert "Xi: Use current device active grab to deliver touch events if any" This reverts commit 98e3db2ac43d4a3f13475cb160c8ce0155ac7d61. commit f682e0563f736ed2c2c612ed575e05b6e3db945e Author: Povilas Kanapickas Date: Mon Feb 8 05:21:29 2021 +0200 dix: Send touch end to clients that do async grab without touch events If a XI2 client started listening to touches due to a selection and then creates an active async grab that does not include touch events, then it currently won't get the touch end event which will produce inconsistent view of the pending touches. Note that we only need to consider touch listeners and can ignore pointer emulation. Under XI2 if a active grab replaces a passive implicit grab and the active grab does not include the button release event, the client won't get it either. commit c7730cfe5577ebde006d408f502766d8c3a73670 Author: Olivier Fourdan Date: Wed May 13 16:48:55 2020 +0200 xwayland: Translate keyboard grabs on the root window When an X11 client issues an active grab on the keyboard, Xwayland forward this to the Wayland compositor using the Xwayland specific protocol "xwayland-keyboard-grab" if it can find the corresponding Xwayland window. Some X11 clients (typically older games) however try to issue the keyboard grab on the X11 root window, which has obviously no matching Xwayland window. In such a case, the grab is simply ignored and the game will not work as expected. To workaround that issue, if an X11 client issues a keyboard grab on the root window, Xwayland will search for a toplevel window belonging to the same X11 client that it can use as the grab window instead. This way, the grab can be forwarded to the Wayland compositor that can either grant or deny the request based on the window and its internal policies. The heuristic picks the first realized toplevel window belonging to the client so that the Wayland compositor will send it the keyboard events, and the Xserver grab mechanism will then take care of routing the events to the expected X11 window by itself. v2: Make the test more clear (Dor Askayo ) Signed-off-by: Olivier Fourdan Acked-by: Jonas Ådahl See-also: https://gitlab.gnome.org/GNOME/mutter/-/issues/1249 commit 520e7a1310ddc25b30bcaa0ea3eeaa6c4d137c8c Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 15:03:46 2021 -0800 xquartz: Ensure that NSRunAlertPanel() is run on the main thread Fixes: https://github.com/XQuartz/XQuartz/issues/30 Signed-off-by: Jeremy Huddleston Sequoia commit 7d0bb7ed061458698ff27856976939b261e73b23 Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:46:02 2021 -0800 xquartz: Remove support for older versions of libXplugin Signed-off-by: Jeremy Huddleston Sequoia commit 5e7c0762e6fdaefc9b8257c0f875432b1877c49e Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:43:01 2021 -0800 xquartz: Remove unused include of AvailabilityMacros.h from various sources Signed-off-by: Jeremy Huddleston Sequoia commit 59f22341a8b4cd468d6f37fb17dd7fde347e430b Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:40:48 2021 -0800 xquartz: Remove support for building for i386 Signed-off-by: Jeremy Huddleston Sequoia commit aea15a76593f98205e44f20632178dc384c02d57 Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:35:17 2021 -0800 xquartz: Remove support for Mountain Lion and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit c0b2d3e099a60f55b18ca9c30373000f12d40fe2 Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:33:22 2021 -0800 xquartz: Remove support for Lion and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit cc9cf6f085be6e8264f925a11d67a12ad47a042b Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:29:52 2021 -0800 xquartz: Remove support for SnowLeopard and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit f699aac2ea2cf6a3e2d3bdcb2d8179e103de1d4e Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:09:50 2021 -0800 xquartz: Remove check for libdispatch now that we don't support pre-SnowLeopard Signed-off-by: Jeremy Huddleston Sequoia commit 5ad49102722274f53b9b011082d9e0f202fcd9a4 Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:23:18 2021 -0800 xquartz: Remove support for Leopard and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit 6e6db055f8b517ae9d63351d4c00fd480cb6b54a Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:18:35 2021 -0800 xquartz: Remove support for Tiger and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit 20b86c4060c1d4fbc099675d5100fe17e4ac0147 Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:12:34 2021 -0800 os: Remove support for Tiger and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit 74aef85bd88a1fdb22d445ad14975232a7bebdd7 Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:25:54 2021 -0800 xquartz: Remove support for Panther and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit 0e272ac458fbd530787273073473e566b0ac306e Author: Jim DeLaHunt Date: Mon Dec 11 00:08:52 2017 -0800 Fix typo "XQaurtz" in Xquartz.man commit 5429791b1cf7f6cabf6c64aad0a4b1b5418253c9 Author: Olivier Fourdan Date: Thu Jan 28 17:11:44 2021 +0100 Revert "mi: Shortcut miDoCopy/miCopyArea based on clipList" This reverts commit f665a9c9e6c8643f3050378249db3088ae3057be. Signed-off-by: Olivier Fourdan Acked-by: Martin Peres Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1108 Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1128 commit 3cdac5ba07a79761652d960e0e907601f82718bc Author: Olivier Fourdan Date: Wed Sep 9 10:51:24 2020 +0200 mi: List extensions in usage message Not all extensions can be enabled or disabled at runtime, list the extensions which can from the help message rather than on error only. v2: * Print the header message in the ListStaticExtensions() (Peter Hutterer) * Do not export ListStaticExtensions() as Xserver API Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit a81c98e42a954580ca0d43c89169dc2069c87b96 Author: Olivier Fourdan Date: Tue Sep 8 18:34:48 2020 +0200 mi: Don't log the full extension list on disable When enabling or disabling an extension which is not known to the Xserver, it will log an error message and list the extensions it knows about. That clutters the logs when the Xserver is Xwayland spawned by the Wayland compositor who doesn't actually know the list of extensions enabled at build time in the Xserver. Considering that disabling a non-existing extension is a no-op anyway, list all the extensions available only when attempting to enable an extension which the Xserver doesn't know about. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 4341f1da728e4c67187b48865faf06c1312bcdff Author: Misha Gusarov Date: Wed Jan 27 12:37:51 2021 +0000 xwayland: Add -verbose option as in xfree86 Makes it easier to debug Xwayland problems. Signed-off-by: Misha Gusarov commit 0148a15da1616a868d71abe1b56e3f28cc79533c Author: Julien Cristau Date: Wed Jan 6 10:20:53 2021 +0100 compiler.h: don't define inb/outb and friends on mips The definition relies on IOPortBase, which is only ever set in hw/xfree86/os-support/bsd/arm_video.c This caused build failures on linux/mips with GCC 10, due to this change (from https://gcc.gnu.org/gcc-10/changes.html#c): "GCC now defaults to -fno-common. As a result, global variable accesses are more efficient on various targets. In C, global variables with multiple tentative definitions now result in linker errors. With -fcommon such definitions are silently merged during linking." As a result anything including compiler.h would get its own definition of IOPortBase and the linker would error out. commit f08ab719df921e1269691553daf56853380fb241 Author: Michel Dänzer Date: Thu Dec 17 18:58:28 2020 +0100 ci: Test ninja dist in meson jobs While this isn't critical yet, it might become so at some point, so let's make sure it keeps working. Don't set the PIGLIT/XTEST_DIR variables for ninja dist, testing XTS once against each DDX is enough (as part of ninja test). Requires git in the docker image. v2: * Drop /usr/local/bin/xkbcomp symlink, no longer needed with xkbcomp 1.4.1 (Peter Hutterer) commit 099eb6261cfb4a7a674ead467a8a9dfb2ee173d8 Author: Michel Dänzer Date: Fri Jan 15 18:32:30 2021 +0100 ci: Build xkbcomp 1.4.1 for the docker image This is a requirement for testing meson dist in CI. commit 9716c4193fd4db7cdf3c6d7fb32d4ad2919cbe46 Author: Olivier Fourdan Date: Fri Jan 22 10:29:29 2021 +0100 xwayland: Add new pkg-config variable for listenfd Since commit b3f3d65e, xwayland now supports the command line option "-listenfd" for passing file descriptors and marked "-listen" as deprecated for this specific purpose. Add a new pkg-config variable "have_listenfd" to the xwayland.pc so that compositors can know this is available and use listenfd in place of the deprecated option. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Reviewed-by: Jonas Ådahl commit a9269808f394955f213e34303c2c14fd61c35ab5 Author: Erik Kurzinger Date: Thu Jan 7 07:00:33 2021 -0800 xwayland: remove unused parameter of xwl_glamor_pixmap_get_wl_buffer There are currently no callers that make use of the "created" output parameter of xwl_glamor_pixmap_get_wl_buffer. Remove it, along with the corresponding argument of the associated EGL backend entrypoint. commit 532245798085a67b5ff906778f88373d5bcd2e4c Author: Povilas Kanapickas Date: Tue Dec 22 07:30:46 2020 +0200 xfree86/inputtest: Drop extraneous linux-specific include Signed-off-by: Povilas Kanapickas commit 3ab3083cc20534c83a5a35f0af1f2779f8df0b7b Author: Povilas Kanapickas Date: Sun Dec 20 01:11:43 2020 +0200 xi: Don't deliver emulated motion when there's no owner for touch end Pointer-emulated touch events should only be delivered to the client that owns the sequence even if it's a core client that became the effective owner of the sequency by selecting for pointer press and movement. Currently the emulated events are delivered like this already (see TouchResourceIsOwner() check in DeliverEmulatedMotionEvent()), except in the case of TouchEnd, in which case the generated motion event is still delivered to some client that's not necessarily the owner of the touch sequence. We already know whether a touch sequence that is about to emulate a pointer event has an owner, we just need to check that. This further allows to simplify DeliverEmulatedMotionEvent() as it won't ever be called for non-owned touch events. https://bugs.freedesktop.org/show_bug.cgi?id=60394 Signed-off-by: Povilas Kanapickas commit 365cbbfc4b99f7d9937d1b8b61f1483556a5b57a Author: Adam Jackson Date: Fri Dec 18 09:36:30 2020 -0500 os, shm: fcntl()'s third argument is integer, not pointer All of these uses were attempting to set FD_CLOEXEC, which happens to be (1<<0). Since flags is going to be aligned in memory, its address is never going to have the low bit set, so we were never actually setting what we meant to. Fixes: xorg/xserver#1114 commit 5e3900904ddc27f3d5580ce3a07929469d82fb5e Author: Povilas Kanapickas Date: Fri Dec 18 04:39:07 2020 +0200 xfree86: Use different scroll increment than libinput in inputtest drv Signed-off-by: Povilas Kanapickas commit 58465a3dd90c3bc698ba9ebb2c4a516df6ff7dfd Author: Povilas Kanapickas Date: Thu Dec 17 03:08:06 2020 +0200 xfree86: Add scroll axes to touch devices in inputtest driver Signed-off-by: Povilas Kanapickas commit 91a8013990a967bfd8c4145c4a79b86cc495a205 Author: Povilas Kanapickas Date: Thu Dec 17 03:08:05 2020 +0200 xfree86: Add support for pressure valuator axis in inputtest driver Signed-off-by: Povilas Kanapickas commit 742b87f7ee5abd1406a77ac1baacbc43759bd275 Author: Povilas Kanapickas Date: Thu Dec 17 03:08:04 2020 +0200 xfree86: Fix axis labels for PointerAbsolute input of inputtest driver Signed-off-by: Povilas Kanapickas commit e4a9f0bb4e36cffe4f7021bfa27753a9f42df2ff Author: Olivier Fourdan Date: Mon Dec 14 15:38:42 2020 +0100 xwayland: Remove unneeded variable Just a small code cleanup, there is no need to allocate a variable only to check the return value of eglInitialize(). Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Reviewed-by: Tony Lindgren commit 95be87db986470c8fce5ea91af0bbf3177f1de36 Author: Olivier Fourdan Date: Mon Dec 14 10:06:12 2020 +0100 xwayland: Refactor glamor EGL init Glamor requires at least big GL 2.1 or GLES2, therefore Xwayland tries to initialize first GL and then GLES2 if that fails. It does that all in one single function which makes the code slightly complicated, move the initialization of big-GL and GLES2 to separate functions to help with readability of the code. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Reviewed-by: Tony Lindgren commit 65673b02ef28884da3267fe1be579c20e2cddfa6 Author: Tony Lindgren Date: Tue Dec 1 12:54:36 2020 +0200 xwayland: fix GL version check for GLES only devices We currently bail out early for GLES only devices, and call epoxy_gl_version() too early for GLES only that will make GLES only devices return NULL for glGetString(GL_RENDERER). Let's also add a check to see if we need to recreate the context to avoid pointless warnings for GLES only devices as suggested by Olivier Fourdan . Fixes: a506b4ec - xwayland: make context current to check GL version Signed-off-by: Tony Lindgren commit 5d73a8b59e0d01d1ee4cb484e4b43563cec2eee9 Author: Fabrice Fontaine Date: Thu Dec 10 22:32:59 2020 +0100 meson.build: KMS support also depends on dri2 Kernel modesettings support also depends on dri2, see ./hw/xfree86/drivers/modesetting/meson.build So update meson.build to reflect the changes made in configure.ac by commit 9c81b8f5b5d7bc987f73e8ef01a81e61205e58ee Signed-off-by: Fabrice Fontaine commit 8c0afc9eb26a0866301072dec30717885fd14305 Author: Povilas Kanapickas Date: Sat Oct 10 02:09:05 2020 +0300 xfree86: Implement a test input driver Signed-off-by: Povilas Kanapickas commit f95d81e88be07f43c91660e675d077ccd9ee47a9 Author: Olivier Fourdan Date: Mon Dec 7 14:21:56 2020 +0100 xwayland: Hold window buffer until released The window buffer mechanism would free the pixmap and its corresponding Wayland buffer as soon as window buffers are disposed. Typically when the X11 window is unrealized, the current window buffer is still used by the Wayland compositor and yet Xwayland will destroy the buffer. As a matter of fact, Xwayland should not destroy the Wayland buffer before the wl_buffer.release event is received. Add a reference counter to the window buffer similar to the to pixmap reference counter to keep the buffer around until the release callback is received. Increase that reference counter on the buffer which will be attached to the surface, and drop that reference when receiving the release callback notification. v2: Use a specific reference counter on the buffer rather than relying on the pixmap refcnt (Michel Dänzer ) Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Acked-by: Martin Peres commit 85d8eac4bcf44c077bb82aaae10ae45feb9c4e72 Author: Olivier Fourdan Date: Mon Dec 7 14:09:58 2020 +0100 xwayland: Hold cursor buffer until released The cursor code would destroy the buffer as soon as the cursor is unrealized on X11 side. Yet, the Wayland compositor may still be using the buffer as long as a released callback has not been received. Increase the reference counter on the pixmap to hold a reference on the pixmap when attaching it to the surface and use the new pixmap release callback mechanism to release that reference when the buffer is released. Signed-off-by: Olivier Fourdan Acked-by: Martin Peres Reviewed-by: Michel Dänzer commit 79afbd608b7e6abc5d6d0f7e1fb6e460500c7934 Author: Olivier Fourdan Date: Thu Dec 10 10:10:05 2020 +0100 xwayland: Factorize common cursor code The seat and tablet cursor functions are very similar, factorize the commonalities to simplify the code and reduce the copy/paste. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 36e353bcf428c4e6a31292ffa749ea6395cba4a3 Author: Prabhu Sundararaj Date: Wed Nov 25 08:02:41 2020 +0100 Remove check for useSIGIO option Commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 removed the option to configure useSIGIO option. Indeed, the xfree86 SIGIO support was reworked to use internal versions of OsBlockSIGIO and OsReleaseSIGIO. As a result, useSIGIO is no longer needed and can dropped Fixes: 6a5a4e60 - Remove SIGIO support for input [v5] Closes: xorg/xserver#1107 Reviewed-by: Adam Jackson Signed-off-by: Prabhu Sundararaj Signed-off-by: Mylène Josserand Signed-off-by: Fabrice Fontaine commit 95539ab37baa1292d1f2daaa552f9741b0364cad Author: Mariusz Ceier Date: Wed Dec 2 12:29:15 2020 +0100 xwayland: Replace LogMessage with LogMessageVerb LogMessage logs only when the XLOG_VERBOSITY is >= 1, but by default XLOG_VERBOSITY is 0, so for example warning about deprected -listen parameter is never shown when running "Xwayland -listen 32 -help". Signed-off-by: Mariusz Ceier commit 74627d13c75cab7aa73c0e713feae0934e780ba0 Author: Michal Srb Date: Thu Jun 21 13:44:04 2018 +0200 xkb: Fix heap overflow caused by optimized away min. Calling strlen on char[4] that does not need to contain '\0' is wrong and X server may end up running into uninitialized memory. In addition GCC 8 is clever enough that it knows that strlen on char[4] can return 0, 1, 2, 3 or cause undefined behavior. With this knowledge it can optimize away the min(..., 4). In reality it can cause the memcpy to be called with bigger size than 4 and overflow the destination buffer. Fixes: 83913de25d35 (xkb: Silence some compiler warnings) Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/288 Signed-off-by: Matt Turner commit 446ff2d3177087b8173fa779fa5b77a2a128988b Author: Matthieu Herrb Date: Thu Nov 12 19:15:07 2020 +0100 Check SetMap request length carefully. Avoid out of bounds memory accesses on too short request. ZDI-CAN 11572 / CVE-2020-14360 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit 87c64fc5b0db9f62f4e361444f4b60501ebf67b9 Author: Matthieu Herrb Date: Sun Oct 11 17:05:09 2020 +0200 Fix XkbSetDeviceInfo() and SetDeviceIndicators() heap overflows ZDI-CAN 11389 / CVE-2020-25712 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit 11652706b0aa7d2609b710db0bd1262c5f6ed596 Author: Michel Dänzer Date: Fri Nov 20 16:54:02 2020 +0100 present/wnmd: Translate update region to screen space The region as passed in is in the source pixmap's coordinate space, so intersecting it with the clipList (which is in screen space) resulted in disappointment. Fixes Firefox popups such as the hamburger menu when using the EGL backend. v2: * Drop vblank->x/y_off from RegionTranslate call, since they're always 0 here (present_wnmd_check_flip rejects flips for x/y_off != 0). Reported-by: Robert Mader Tested-by: Robert Mader Reviewed-by: Olivier Fourdan Tested-by: Joakim Tjernlund # v1 commit b0530fe42286f340032566ce0bf22a5e9ddfe67f Author: Michel Dänzer Date: Tue Jan 28 18:51:53 2020 +0100 glx: Remove unused bswap_CARD64 GCC warned about it: ../../../glx/indirect_dispatch_swap.c:85:1: warning: ‘bswap_CARD64’ defined but not used [-Wunused-function] 85 | bswap_CARD64(const void *src) | ^~~~~~~~~~~~ commit 3ce05a44f3d9b114af936f39e3f44552c5bf2c43 Author: Olivier Fourdan Date: Thu Nov 26 14:39:32 2020 +0100 modesetting: Fix build with DebugPresent() enabled By default, the macro DebugPresent() is a no-op but it can be enabled at build time for debugging purpose. However, doing so prevents the code to build because one debug statement tries to make use of a non-existent variable: present.c: In function ‘ms_present_queue_vblank’: present.c:147:18: error: ‘vbl’ undeclared (first use in this function) 147 | vbl.request.sequence)); | ^~~ present.c:49:32: note: in definition of macro ‘DebugPresent’ 49 | #define DebugPresent(x) ErrorF x | ^ Fix the build with DebugPresent() by removing the vbl variable from the debug message. Signed-off-by: Olivier Fourdan commit 95b79aa907789a16f736097abe959e906f86f63a Author: Erik Kurzinger Date: Fri Nov 13 14:36:14 2020 -0800 GLX: fix context render type queries Querying the GLX_RENDER_TYPE of a GLX context via glXQueryContext will currently return the render type of the context's FB config, which is a bitmask of GLX_RGBA_BIT / GLX_COLOR_INDEX_BIT / ... values. However, this query should really return the render type that was specified when creating the context, which is one of GLX_RGBA_TYPE / GLX_COLOR_INDEX_TYPE / .... To enable this, save the render type when creating a new context (defaulting to GLX_RGBA_TYPE if unspecified), and then include this value in the context attributes sent to clients. commit 9c81b8f5b5d7bc987f73e8ef01a81e61205e58ee Author: Fabrice Fontaine Date: Wed Jan 8 22:51:42 2020 +0100 configure.ac: KMS support also depends on dri2 Kernel modesettings support also depends on dri2, see http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/drivers/modesetting/Makefile.am#n46 Fix #479 Signed-off-by: Bernd Kuhls [Patch retrieved (with a small update of commit message) from: https://git.buildroot.net/buildroot/tree/package/x11r7/xserver_xorg-server/1.20.6/0001-modesettings-needs-dri2.patch] Signed-off-by: Fabrice Fontaine commit 682167475c1930f80a68de58e522ac08dbb35fa8 Author: Böszörményi Zoltán Date: Thu Nov 14 09:29:20 2019 +0100 Introduce and use BUS_USB With !155, the device bus ID received via udev is constructed properly with the "usb:" prefix. But, it is not enough to make the following line to work in Section "Device": BusID "usb:0:1.2:1.0" Introduce BUS_USB, so the prefix can be distinguished from BUS_PCI and check the supplied BusID value against device->attribs->busid in xf86PlatformDeviceCheckBusID(). Signed-off-by: Böszörményi Zoltán commit c0dcadad6c18b06ddc6e349d7c58bfccb715ff55 Author: Reza Arbab Date: Wed Mar 27 11:45:02 2019 -0500 linux: Fix udev ID_PATH parsing for udl devices The ID_PATH for a udl device looks like this: $ udevadm info /dev/dri/card2 | grep -w ID_PATH E: ID_PATH=pci-0000:00:14.0-usb-0:9.1:1.0 The parsing added in 0816e8fca6194 ("linux: Make platform device probe less fragile"), sets OdevAttributes::busid to "pci:0000:00:14.0", where drmGetBusid() would have returned "3-9.1:1.0". Identifying this as a "pci:*" device eventually causes the vendor/device id check in probeSingleDevice() to fail, because a USB controller isn't a supported device: $ udevadm info --path=/devices/pci0000:00/0000:00:14.0 | grep -e VENDOR -e ID_PCI_CLASS E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller E: ID_VENDOR_FROM_DATABASE=Intel Corporation Instead of parsing out "pci:0000:00:14.0" in this case, use "usb:0:9.1:1.0" so the device probe will succeed. Fixes: 0816e8fca6194 ("linux: Make platform device probe less fragile") Signed-off-by: Reza Arbab commit af4622d3f90382225afb83e3896cb6f236f30c0a Author: Aaron Plattner Date: Fri Nov 20 19:43:25 2020 -0800 modesetting: Add missing copyright notices I forgot to add these in commits 4fefe73fe, b6985d6b3, 245b9db03, and 4e670f128. Signed-off-by: Aaron Plattner commit 07e6935030c8f0a757bce0a90c54b59d8bf47df6 Author: Povilas Kanapickas Date: Sat Oct 10 02:51:40 2020 +0300 test/xi2: Fix mask size in XISelectEvents test XI2LASTEVENT identifies the bit number, not the mask size in bits. The mask size in bits is XI2LASTEVENT + 1 and the mask size in bytes is (XI2LASTEVENT + 8) / 8 or XI2MASKSIZE. commit f5220117e970a40c09babe199709bb2db69c4311 Author: Povilas Kanapickas Date: Sat Oct 10 02:51:39 2020 +0300 dix: Extract FreezeThisEventIfNeededForSyncGrab() commit 36f8dacc0652ddc5657e70942269f1f9e22710c6 Author: Povilas Kanapickas Date: Sat Oct 10 02:51:37 2020 +0300 dix: Extract ActivateGrabNoDeliver() commit 23a8b62d34344575f9df9d057fb74bfefa94a77b Author: Povilas Kanapickas Date: Sat Oct 10 02:51:36 2020 +0300 dix: Store replayed event into GrabInfoRec struct as InternalEvent* commit 8bd8b3af1931629db548d39bb390edbef4315b0b Author: Povilas Kanapickas Date: Sat Oct 10 02:51:35 2020 +0300 dix: Rename LISTENER_* to TOUCH_LISTENER_* commit f6e0bf68333f7edb02e3b937bc164f6591da2320 Author: Povilas Kanapickas Date: Sat Oct 10 02:51:34 2020 +0300 Xi: Make check_for_touch_selection_conflicts() more generic commit 56d720592155c55617728e8ddf1ba8192fe5d46c Author: Povilas Kanapickas Date: Sat Oct 10 02:51:33 2020 +0300 dix: Extract DeliverDeviceClassesChangedEvent() utility function commit 5b0c5344b7131f0812bcbf070194adaa2175d150 Author: Povilas Kanapickas Date: Sat Oct 10 02:51:32 2020 +0300 dix: Extract CopySprite() utility commit acd819ac07bf66165f5d44af4a224f68c31bc30d Author: Povilas Kanapickas Date: Sat Oct 10 02:51:31 2020 +0300 dix: Extract FixUpXI2DeviceEventFromWindow() commit bb7aab6afe8655fc40ecff49791889b6512bb6a0 Author: Jon Turney Date: Sat Nov 21 15:45:49 2020 +0000 hw/xwin: Fix building with -fno-common Provide an actual definition of noDriExtension where used, rather than a tentative definition in a header, to fix compilation with -fno-common (the default with gcc 10). commit d18dcecbe08a9ff22e43f12b6b7679a6ef1a6eb0 Author: Olivier Fourdan Date: Mon Nov 2 10:24:45 2020 +0100 xwayland: Clean up pending eglstream on pixmap destroy EGLStream implementation in Xwayland keeps a list of pending streams for a window. If the windows's pixmap is destroyed while there is a pending stream, the pending stream will point to freed memory once the callback is triggered. Make sure to cancel the pending stream if there's one when the pixmap is destroyed. v2: * Use xorg_list_for_each_entry() instead of the safe variant (Michel Dänzer ) Signed-off-by: Olivier Fourdan Tested-by: Karol Szuster Acked-by: Michel Dänzer Closes https://gitlab.freedesktop.org/xorg/xserver/-/issues/1096 commit 662b2bcb84d5782aff1b93732eb010b0b43e5706 Author: Olivier Fourdan Date: Tue Sep 22 09:54:15 2020 +0200 xwayland: Use the pixmap release callback with EGLStream Commit 77658741 - "xwayland: Add buffer release callback" added an API to deal with Wayland buffer release callbacks. The EGLstream implementation has its own wl_buffer callback, move that to the buffer release API instead so we don't have to deal with Wayland buffers directly and match the other Xwayland pixmap backend implementations. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Tested-by: Erik Kurzinger commit e538601128c1a8bb4247a817da2bbb3f671811b3 Author: Alan Coopersmith Date: Sun Nov 1 15:52:48 2020 -0800 int10: wrap entire V_ADDR_R* macros in parens for safer expansion Resolves warnings from Oracle Parfait static analyser: Error: Misleading macro Misleading macro [misleading-macro]: misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses at line 392 of hw/xfree86/int10/generic.c. '|' operator has higher precedence than ternary '?:' operator inside macro body at line 431 low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 431 Misleading macro [misleading-macro]: misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses at line 392 of hw/xfree86/int10/generic.c. '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 431 low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 431 Misleading macro [misleading-macro]: misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses at line 392 of hw/xfree86/int10/generic.c. '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 442 low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 442 Misleading macro [misleading-macro]: misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses at line 392 of hw/xfree86/int10/generic.c. '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 443 low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 443 Misleading macro [misleading-macro]: misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses at line 392 of hw/xfree86/int10/generic.c. '|' operator has higher precedence than ternary '?:' operator inside macro body at line 443 low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 441 Misleading macro [misleading-macro]: misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses at line 392 of hw/xfree86/int10/generic.c. '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 443 low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 443 Signed-off-by: Alan Coopersmith commit a6574033f464c7cde02bce8f1b130ff6b2b2d9eb Author: Alan Coopersmith Date: Sun Nov 1 15:45:08 2020 -0800 xkb: always set *mask_rtrn in XkbVirtualModsToReal Resolves warning from Oracle Parfait static analyser: Error: Uninitialised memory Uninitialised memory variable [uninitialised-mem-var] (CWE 457): Possible access to uninitialised memory referenced by variable 'mask' at line 721 of xkb/XKBMisc.c in function 'XkbUpdateKeyTypeVirtualMods'. Path in callee avoiding write at line 720 mask allocated at line 718 Signed-off-by: Alan Coopersmith commit 034e792662a1c0c6ab52190e457b1f017bec01c6 Author: Alan Coopersmith Date: Sun Nov 1 13:55:59 2020 -0800 dmx: example code should set a good example Resolves warning from Oracle Parfait static analyser: Error: Unchecked result Unchecked result [unchecked-result-call-X]: Unchecked return value from call to XOpenDisplay. Value display must be ch ecked to ensure this function was successful. at line 73 of hw/dmx/examples/xbell.c in function 'main'. Signed-off-by: Alan Coopersmith commit d00594ebc7941a5491ad5583d6890ab7dc2ffc43 Author: Alan Coopersmith Date: Sun Nov 1 13:38:21 2020 -0800 AddInputDevice: only need to check once if we failed to calloc dev Resolves warning from Oracle Parfait static analyser: Warning: Impossible or redundant condition Impossible or redundant condition [impossible-redundant-condition]: Condition 'dev != NULL' of branch is determined by previous branch at line 270 of dix/devices.c in function 'AddInputDevice'. Condition 'dev != NULL' from this branch implies following branch is always true at line 262 Fixes: commit 493ad83323 Signed-off-by: Alan Coopersmith commit 250db8708ac7ab11356b42faa493b6f1ba753013 Author: Michel Dänzer Date: Tue Sep 15 11:49:20 2020 +0200 xwayland: Add and hook up test script It runs XTS via piglit on (non-rootless) Xwayland on weston using the headless backend. Xwayland might use glamor if enabled in the build, but we're making sure it uses software rendering. v2: * Use weston-info to wait for weston to be ready, instead of just a fixed sleep. (Martin Peres) v3: * Build wayland 1.18 & weston 9.0 locally, since the packages in Debian buster are too old for current Xwayland. Acked-by: Olivier Fourdan commit 821399a9c920323e4934a2fd6375b86a151fa83c Author: Michel Dänzer Date: Wed Nov 11 12:45:36 2020 +0100 ci: Base docker image on Debian buster instead of testing By its nature, testing incurs a risk of breaking something every time we bump the image. This requires building wayland-protocols locally, since the package in buster is too old for current Xwayland. Acked-by: Olivier Fourdan commit ab73c16930d67e5c80a23727804850406309b787 Author: Michel Dänzer Date: Wed Sep 16 16:32:02 2020 +0200 ci: Update to the latest templates They now ensure the image is up to date in forked projects, and we no longer need to reconstruct the image name. Acked-by: Olivier Fourdan commit 852d6d49109a3f0a9a73c86f5d5165d2c8dc5cbe Author: Michel Dänzer Date: Thu Nov 12 12:19:09 2020 +0100 ci: Explicitly list packages needed to build xserver Instead of relying on apt-get build-dep. Acked-by: Olivier Fourdan commit 8469935fe26659219560f425c7b35d564ad77324 Author: Michel Dänzer Date: Thu Nov 12 12:01:45 2020 +0100 ci: Use a variable for ephemeral packages So that they only need to be listed once. Acked-by: Olivier Fourdan commit 996ba1b99a7212471d3c24359056c412de70c28d Author: Michel Dänzer Date: Wed Nov 11 18:22:28 2020 +0100 ci: Remove rendercheck Git tree Noticed this was missing while making changes in this area. Acked-by: Olivier Fourdan commit 8fc84a00254f642947397276e14d7740f502895d Author: Michel Dänzer Date: Wed Nov 11 19:02:50 2020 +0100 ci: Set GIT_STRATEGY=none for the container build job It doesn't need a full checkout of the xserver Git tree, so this can save some time and resources. Acked-by: Olivier Fourdan commit 9a7515943f5a9b70567512cdc48cb2f688b3284b Author: Michel Dänzer Date: Wed Sep 16 12:55:35 2020 +0200 ci: Use $FDO_CI_CONCURRENT if set To take advantage of more than 4 CPU cores available to the container. Acked-by: Olivier Fourdan commit 28ed4b95e90fb225fc32cfdce16df603ab600fcd Author: Olivier Fourdan Date: Tue Nov 10 10:40:05 2020 +0100 xwayland: Add a man page Xwayland was missing a man page, add one. Signed-off-by: Olivier Fourdan Reviewed-by: Martin Peres commit d14cef853af52408e7ddba31b72cf5ac14389754 Author: Olivier Fourdan Date: Tue Nov 10 10:02:39 2020 +0100 xwayland: Do not list option "-eglstream" if not supported As Xwayland is usually spawned by the Wayland server/compositor, its command line options are not always adjustable. Yet, if EGLStream is not supported in a given Xwayland build, the option will do nothing (yet we must still accept it otherwise Xwayland would refuse to run if the Wayland compositor uses it). If Xwayland was built without support for EGLStream, there is not point in showing the option in the help message though. Signed-off-by: Olivier Fourdan Reviewed-by: Martin Peres commit d163f938a00c177c5ff28e779993f18ee69476d4 Author: Olivier Fourdan Date: Tue Nov 10 09:53:57 2020 +0100 xwayland: Add help entry for -shm The command line options "-shm" is used to instruct Xwayland to prefer shared-memory for passing buffers to the Wayland server, rather than using glamor and DRI3. The option was there from the beginning, yet not documented in the "-help" message. Signed-off-by: Olivier Fourdan Reviewed-by: Martin Peres commit df3aa4922fd7e256169e541188b724f67ca948e1 Author: Michel Dänzer Date: Fri Nov 6 10:14:19 2020 +0100 xwayland: Make window_get_client_toplevel non-recursive Noticed while reading the code. Reviewed-by: Olivier Fourdan commit 899cebb76ab7754fea49f7babcd64a7e94052cc8 Author: Olivier Fourdan Date: Tue Oct 27 16:33:55 2020 +0100 configure: Build hashtable for Xres and glvnd With autoconf, hashtable support is built along with Xres support. Yet, glvnd also use it, so when disabling Xres from configure, the build will fail at link time because hashtable functions are not available. Untie the build of hashtable from Xres support, just like meson build does. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1091 commit 606ba7fc51e5420646f75c4e672fbe61eb7c7e6e Author: Olivier Fourdan Date: Thu Nov 5 18:35:54 2020 +0100 xwayland: Create an xwl_window for toplevel only One general assumption in Xwayland is that the xwl_window remains the same for all the child windows of the toplevel window. When mapping a new X11 window, ensure_surface_for_window() checks for an existing xwl_window by using xwl_window_get() which will just check for the registered xwl_window for the window. That means that a client mapping a child window of an existing window with a xwl_window will get another different xwl_window. If an X11 client issues a Present request on the parent window, hence placed underneath its child window of the same size, the Wayland compositor may not send the frame callback event for the parent's Wayland surface which is reckoned to be not visible, obscured behind the other Wayland surface for the child X11 window. That bug affects some games running in wine which may get 1 fps because the repaint occurs only on timeout with a long interval (as with, e.g. https://bugs.winehq.org/show_bug.cgi?id=47066) Fix ensure_surface_for_window() by using xwl_window_from_window() which will walk the window tree, so that a child window won't get another xwl_window than its parent. https://gitlab.freedesktop.org/xorg/xserver/-/issues/1099 See-also: https://bugs.winehq.org/show_bug.cgi?id=47066 Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit ffd02d9b26bd560849c407a6dd4f5c4d7d2c1736 Author: Olivier Fourdan Date: Mon Nov 2 15:44:31 2020 +0100 xwayland: non-rootless requires the XDG-WM-Base protocol When running non-rootless, Xwayland requires that the Wayland compositor supports the XDG-WM-Base protocol. Check for XDG-WM-Base protocol support at startup and exit cleanly if missing rather than segfaulting later in ensure_surface_for_window() while trying to use xdg_wm_base_get_xdg_surface(). Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Reviewed-by: Simon Ser commit 7a7e55c5c1d6461a9f4d9a4e0129c1c6e1fd3d66 Author: Alex Goins Date: Mon Oct 5 18:19:52 2020 -0500 glamor: Update pixmap's devKind when making it exportable When making a pixmap exportable, glamor will currently create a temporary exported pixmap backed by a GBM bo, with the devKind updated to the stride of the bo. However, when the backing of the exported pixmap is swapped into the original, the devKind of the original is not updated. Some GBM bos may get implicitly padded, in which case the devKind of the pixmap will not match the stride of the backing bo. For example, an 800x600 pixmap will have a devKind of 3200, but the bo's stride will be 3328. This can cause corruption with PRIME, when the sink uses the wrong stride to display the shared pixmap. This commit changes glamor_make_pixmap_exportable() to update the devKind of the original pixmap after it swaps exported pixmap's backing into it, keeping everything consistent. Fixes issue #1018. Signed-off-by: Alex Goins Signed-off-by: Aaron Plattner Reviewed-by: Michel Dänzer commit affc47452507d7e4605fd8c9a16db078e4f2aea2 Author: Adam Jackson Date: Tue Sep 22 16:13:00 2020 -0400 xwayland: Drop the separate refcount for the xwl_pixmap Instead, bump the pixmap's refcount at the bottom of post_damage to reflect the compositor's hold on the buffer, and "destroy" the pixmap in the buffer release callback (which will dec the pixmap's refcount and free if necessary). Signed-off-by: Adam Jackson commit 4e670f1281ad75c5673b6ac75645036d810da8d9 Author: Aaron Plattner Date: Fri Oct 25 00:06:40 2019 -0700 modesetting: Add CTM RandR property When the "CTM" (color transform matrix) modesetting property is available, create a corresponding RandR property. To match the format of the property available in the amdgpu driver, expose it as an array of 18 32-bit XA_INTEGERs representing a 3x3 matrix in row-major order, where each entry is a S31.32 sign-magnitude fixed-point number with the fractional part listed first. Signed-off-by: Aaron Plattner Acked-by: Michel Dänzer Reviewed-by: James Jones commit 245b9db03a1e1189b992409283e3d88b5d56e62d Author: Aaron Plattner Date: Thu Oct 24 13:46:35 2019 -0700 modesetting: Use GAMMA_LUT when available If the kernel exposes GAMMA_LUT and GAMMA_LUT_SIZE properties and the size is not what the server has pre-configured for the crtc, free the old gamma ramp memory allocated by the server and replace it with new allocations of the appropriate size. In addition, when GAMMA_LUT is available, use drmModeCreatePropertyBlob() and drmModeObjectSetProperty() to set the gamma ramp rather than using the legacy drmModeCrtcSetGamma() function. Add a new option "UseGammaLUT" to allow disabling this new behavior and falling back to drmModeCrtcSetGamma() unconditionally. Signed-off-by: Aaron Plattner commit b6985d6b3fb3e9ae36f638b0fd65cfad3d4bbd46 Author: Aaron Plattner Date: Thu Oct 24 13:41:39 2019 -0700 modesetting: Query properties even in non-atomic mode Modeset properties can be set even when ms->atomic_modeset is disabled by using the drmModeObjectSetProperty() function. This will be necessary in a later change in order to set the GAMMA_LUT and CTM properties. Signed-off-by: Aaron Plattner commit 4fefe73feaee31a992b284963599d63feb598807 Author: Aaron Plattner Date: Tue Oct 22 10:06:30 2019 -0700 modesetting: Store property values in drmmode_prop_info_rec A later change will need to read the value of the GAMMA_LUT_SIZE property. Signed-off-by: Aaron Plattner commit 1626e9fa77c0d3715d38ededd43656aa6d942bd9 Author: Peter Harris Date: Wed Sep 30 16:01:06 2020 -0400 glx: set errorValue when returning GLXBadFBConfig client->errorValue is already set in validGlxFBConfig. Set it in __glXDisp_CreateContextAttribsARB for consistency. Signed-off-by: Peter Harris commit 96d19e898acb56d8fc6e6febbc6498f67cdd66a0 Author: Adam Jackson Date: Thu Sep 24 17:08:27 2020 -0400 glx: Implement GLX_EXT_get_drawable_type Trivial extension to let the client query whether this is a window pixmap or pbuffer. Mostly for Mesa's convenience when setting up drawable state, but plausibly useful for apps and middleware as well. Upstream OpenGL Registry merge request: https://github.com/KhronosGroup/OpenGL-Registry/pull/425 commit c15dd0ba4893f79f7181e783cb1ba404edca917a Author: Bernhard Übelacker Date: Sun Sep 27 18:03:48 2020 +0200 os: Fix instruction pointer written in xorg_backtrace The address retrieved in "pip.start_ip" is not necessarily the same address as unw_get_proc_name finds as nearest symbol and returns in "off". Therefore using "pip.start_ip + off" is not reliable, at least visible in the binaries from the Debian repository. Bug-Debian: https://bugs.debian.org/971088 Signed-off-by: Bernhard Übelacker commit acc581c96f16fe3c097dfd0da4ff33f7b104597d Author: Dor Askayo Date: Sat Sep 26 15:54:45 2020 +0300 dri3: Add missing libdrm dependency in Makefile.am Fixes: 0ce93e5ba774 "dri3: Include dix-config.h instead of xorg-config.h" Signed-off-by: Dor Askayo commit efb3abddd49fb75bd6d0e31046fed43d258c93da Author: Kishore Kadiyala Date: Sat Sep 19 01:28:14 2020 +0530 modesetting: keep going if a modeset fails on EnterVT There was a time when setting a mode on a CRTC would not depend on the associated connector's state. If a mode had been set successfully once, it would mean it would work later on. This changed with the introduction of new connectors type that now require a link training sequence (DP, HDMI 2.0), and that means that some events may have happened while the X server was not master that would then prevent the mode from successfully be restored to its previous state. This patch relaxes the requirement that all modes should be restored on EnterVT, or the entire X-Server would go down by allowing modesets to fail (with some warnings). If a modeset fails, the CRTC will be disabled, and a RandR event will be sent for the desktop environment to fix the situation as well as possible. Additional patches might be needed to make sure that the user would never be left with all screens black in some scenarios. v2 (Martin Peres): - whitespace fixes - remove the uevent handling (it is done in a previous patch) - improve the commit message - reduce the size of the patch by not changing lines needlessly - return FALSE if one modeset fails in ignore mode - add comments/todos to explain why we do things - disable the CRTCs that failed the modeset Signed-off-by: Kishore Kadiyala Signed-off-by: Martin Peres Reviewed-by: Daniel Vetter Tested-by: Kishore Kadiyala Closes: #1010 commit 293cf660c95d7ba36510bcc4114d7fd5c5f3801c Author: Martin Peres Date: Fri Apr 24 18:06:16 2020 +0300 modesetting: check the kms state on EnterVT Normally, we would receive a uevent coming from Linux's DRM subsystem, which would trigger the check for disappearing/appearing resources. However, this event is not received when X is not master (another VT is selected), and so the userspace / desktop environment would not be notified about the changes that happened while X wasn't master. To fix the issue, this patch forces a refresh on EnterVT by splitting the kms-checking code from the uevent handling into its own (exported) function called drmmode_update_kms_state. This function is then called from both the uevent-handling function, and on EnterVT right before restoring the modes. Signed-off-by: Martin Peres Reviewed-by: Daniel Vetter Acked-by: Kishore Kadiyala Tested-by: Kishore Kadiyala commit 4c00369024c9754e670fca37804711fef2980e2f Author: Povilas Kanapickas Date: Tue Sep 22 20:53:49 2020 +0300 Bump input minor ABI due to addition of input event drain callback Signed-off-by: Povilas Kanapickas commit 5eb985e3531b69d3ddc4dc0d4b69b4280b1626f8 Author: Povilas Kanapickas Date: Thu Sep 17 00:55:17 2020 +0300 mi: Add a callback to notify driver about input event submission This is useful for mock input drivers that control the server in integration tests. Given that input submission happens on a different thread than processing, it's otherwise impossible for the driver to synchronize with the completion of the processing of submitted events. Signed-off-by: Povilas Kanapickas commit a5f439dcd21b4fda093cb382bb1a758b434a1444 Author: Olivier Fourdan Date: Mon Sep 14 15:39:10 2020 +0200 xwayland: Remove pending stream reference when freeing The EGLStream backend keeps a queue of pending streams for each Xwayland window. However, when this pending queue is freed, the corresponding private data may not be cleared (typically if the pixmap for this window has changed before the compositor finished attaching the consumer for the window's pixmap's original eglstream), leading to a use-after-free and a crash when trying to use that data as the window pixmap. Make sure to clear the private data when the pending stream is freed. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1055 Signed-off-by: Olivier Fourdan Tested-by: Karol Szuster Reviewed-by: Adam Jackson commit 0b86c0c36241989d7e9662d007c5297fe22ae8b5 Author: Olivier Fourdan Date: Mon Sep 14 14:35:22 2020 +0200 xwayland: Add a flag for n-buffers in EGL backend Using multiple window buffers crashes with EGLStream, which does not need it anyway as this is handled through EGL directly. Add a flag to the EGL backend to indicate whether it would benefit from multiple buffers and use this in the get_buffer() function. Thanks to Adam Jackson for pointing out that issue with EGLStream. v2: Fix logical test (Adam Jackson ) Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit ae84f14fb554e5ad54c51c2e6d52ab4a68bf7a0a Author: Olivier Fourdan Date: Mon Sep 14 14:26:34 2020 +0200 xwayland: Add a flag to expose EGL backend features The present flip does not work with the EGLStream backend. Similarly, the EGLStream backend does not require the buffer to be flushed as eglSwapBuffers() should take care of this. Instead of actually checking the backend in use in the present code, add a flag in the form of a bitfield to the EGL backend to indicate its features and requirements. This should not introduce any functional change. v2: Fix logical test (Adam Jackson ) Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit 239ebdc9e447d4f836d0c2aa6068c6064fffb46c Author: Greg V Date: Tue Sep 15 17:41:04 2020 +0300 xwayland: use drmGetNodeTypeFromFd for checking if a node is a render one Major/minor numbers are a.. major (ha) source of pain in FreeBSD porting. In this case, Xwayland was thinking that /dev/dri/card0 is already a render node, because the st_rdev on FreeBSD was passing the Linux-style check, and because of the assumption, acceleration would fail because various ioctls like AMDGPU_INFO would be denied on the non-render node. Switch to libdrm's function that already works correctly on all platforms. Signed-off-by: Greg V Reviewed-by: Emmanuel Vadot commit add3df2001a2eadc41c47683f50fdc0fd8b14964 Author: Michel Dänzer Date: Tue Sep 15 11:43:16 2020 +0200 Consolidate fourcc.h Move the copy in hw/xfree86/common to include/, and remove the one in hw/kdrive/src/. Fixes DIX glamor code including an xfree86 DDX header. commit 62d8c1cc69e273199c9eb23e87b8631d32c56d33 Author: Michel Dänzer Date: Tue Sep 15 11:41:34 2020 +0200 present: Include dix-config.h instead of xorg-config.h This is DIX code. commit 0ce93e5ba774a53459bac8c23016c5d3232038eb Author: Michel Dänzer Date: Tue Sep 15 11:38:55 2020 +0200 dri3: Include dix-config.h instead of xorg-config.h This is DIX code. commit 97f858d336a85cb49de6275918793c773d5d9db1 Author: Uday Kiran Pichika Date: Wed Aug 19 16:20:15 2020 +0530 modesetting: Allow users to opt-in VRR support Fetch VariableRefresh option value from X conf file for modesetting backend DDX driver. This option defaults to false, and must be set to "true" in conf file for variable refresh support in the DDX driver. Signed-off-by: Uday Kiran Pichika commit ede2c32ce116138ddf081932ea2c33bd6f4b6990 Author: Uday Kiran Pichika Date: Thu Jun 18 16:07:33 2020 +0530 modesetting: Detect changes to the _VARIABLE_REFRESH window properties Window wrappers gets the notification when the window properties changes. These wrappers are mainly used to keep track of per-window _VARIABLE_REFRESH property values. These changes have been ported from AMDGPU Signed-off-by: Uday Kiran Pichika commit 9823ea4ed24db76b1e61d69a8da8f7599857d02a Author: Uday Kiran Pichika Date: Thu Jun 18 11:31:31 2020 +0530 modesetting: Lay the foundation for enabling VRR These changes have been ported from AMD GPU DDX driver. This patch adds support for setting the CRTC variable refresh property for suitable windows flipping via the Present extension. In order for a window to be suitable for variable refresh it must have the _VARIABLE_REFRESH property set by the MESA and inform Modesetting DDX driver with window property updates. Then the window must pass the checks required to be suitable for Present extension flips - it must cover the entire X screen and no other window may already be flipping. And also DRM connector should be VRR capable. With these conditions met every CRTC for the X screen will have their variable refresh property set to true. Kernel Changes to support this feature in I915 driver is under development. Tested with DOTA2, Xonotic and custom GLX apps. Signed-off-by: Uday Kiran Pichika commit 42878790708c2a9ecdbb81f635e5e3a34842e34c Author: Michel Dänzer Date: Fri Sep 4 13:03:35 2020 +0200 present/wnmd: Remove no-op present_wnmd_flip_destroy Reviewed-by: Roman Gilg commit 59c40b0ee7cd864dd098f5ac41bbfe96e7bd0e9b Author: Michel Dänzer Date: Fri Sep 4 13:02:04 2020 +0200 present/wnmd: Remove dead present_wnmd_can_window_flip present_can_window_flip is only called from the Xorg modesetting driver, never in WNMD mode. Reviewed-by: Roman Gilg commit b6b1161fd7ac409156fb69439897bcabdeacf393 Author: Michel Dänzer Date: Fri Sep 4 12:50:00 2020 +0200 present/wnmd: Remove dead check from present_wnmd_check_flip present_wnmd_toplvl_pixmap_window returns a window with the same window pixmap, so the check could never fail. Reviewed-by: Roman Gilg commit 4c25356d6cd908c5030c70e712076dff318ac00d Author: Michel Dänzer Date: Thu Aug 27 18:36:15 2020 +0200 xwayland: Check window pixmap in xwl_present_check_flip2 We can only flip if the window pixmap matches that of the toplevel window. Doing so regardless could cause the toplevel window pixmap to get destroyed while it was still referenced by the window, resulting in use-after-free and likely a crash. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1033 Reviewed-by: Olivier Fourdan Reviewed-by: Roman Gilg commit 7ac303c7b1e3b1be79ba3648e217798683e65a99 Author: Michel Dänzer Date: Fri Aug 28 11:57:39 2020 +0200 present/wnmd: Can't use page flipping for windows clipped by children Noticed this was missing while working on the following fix. v2: * Dropped present_wnmd_can_window_flip hunk (that function is never called, will be cleaned up in a follow-up MR). Reviewed-by: Olivier Fourdan # v1 Reviewed-by: Roman Gilg commit 727df0a74e75982f4352f0a3e574fcf6db3372f7 Author: Roman Gilg Date: Mon Aug 10 19:14:28 2020 +0200 xwayland: Replace need_rotate boolean with simple check on xdg-output The need_rotate variable is only used once anymore and had semantics which lead to errors in the past. In particular when negated we are dealing with a double negation. The variable gets replaced with a simple check on the xdg-output directly. Signed-off-by: Roman Gilg commit da791ed9fdc715dcbe73c60a4c4ab2d385ab28e4 Author: Roman Gilg Date: Thu Aug 13 16:55:03 2020 +0200 Revert "xserver: Fix a typo" This reverts commit 427f8bc00981703abe3153b6da575faa69fe2748. When receiving an output update for the mode size we need to rotate the stored width and height values if and only if we have an xdg-output for this output since in this case the stored values describe the output's size in logical space, i.e. rotated. The here reverted commit made a code change with which we would not rotate though when an xdg-output was available since in this case the need_rotate variable was set to False what caused in the check afterwards the first branch to execute. commit 92f4a9ade3c97bda833b0e10f10856b2542f793c Author: Roman Gilg Date: Mon Aug 10 19:01:52 2020 +0200 xwayland: Switch width and height argument order That is just a small style-change to the output_get_new_size function. The function before did take first the height and then the width argument, what is unusual since resolutions are normally named the other way around, for example 1920x1080. Also compare the update_screen_size function. Therefore change the order of arguments for output_get_new_size. Signed-off-by: Roman Gilg commit 1805383d9eb17ef8ac159366c684ac85b3d53731 Author: Roman Gilg Date: Mon Aug 10 18:58:56 2020 +0200 xwayland: simplify output_get_new_size function We can just read out the xdg_output field of the provided xwl_output to check if a rotation is necessary or not. This makes the function easier to understand. Additionally some documentation is added. Signed-off-by: Roman Gilg commit 919f1f46fc67dae93b2b3f278fcbfc77af34ec58 Author: Michel Dänzer Date: Mon Aug 31 12:10:43 2020 +0200 xfree86: Take second reference for SavedCursor in xf86CursorSetCursor The same pointer is kept in CurrentCursor as well, therefore two RefCursor calls are needed. Fixes use-after-free after switching VTs. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1067 commit 2902b78535ecc6821cc027351818b28a5c7fdbdc Author: Matthieu Herrb Date: Tue Aug 18 14:55:01 2020 +0200 Fix XRecordRegisterClients() Integer underflow CVE-2020-14362 ZDI-CAN-11574 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit 144849ea27230962227e62a943b399e2ab304787 Author: Matthieu Herrb Date: Tue Aug 18 14:52:29 2020 +0200 Fix XkbSelectEvents() integer underflow CVE-2020-14361 ZDI-CAN 11573 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit c940cc8b6c0a2983c1ec974f1b3f019795dd4cff Author: Matthieu Herrb Date: Tue Aug 18 14:49:04 2020 +0200 Fix XIChangeHierarchy() integer underflow CVE-2020-14346 / ZDI-CAN-11429 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit f7cd1276bbd4fe3a9700096dec33b52b8440788d Author: Matthieu Herrb Date: Tue Aug 18 14:46:32 2020 +0200 Correct bounds checking in XkbSetNames() CVE-2020-14345 / ZDI 11428 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit 1cccb486d48a5d2e7649836b993805bb65dc09e3 Author: Michel Dänzer Date: Tue Jul 28 18:40:47 2020 +0200 present/wnmd: Execute copies at target_msc-1 already It always takes one update cycle for the copy to become visible on the host windowing system, so waiting for the target MSC resulted in 1 cycle delay. We re-use the idle list for copies which were executed but need their completion event sent. Fixes black seams when resizing the "Builder" sub-window of GDK_BACKEND=x11 gtk4-demo on Xwayland (see https://gitlab.gnome.org/GNOME/mutter/-/issues/1290#note_873557). Unfortunately, this cannot completely fix the seams with apps which queue up multiple frames in advance, since there's always at least one queued frame corresponding to the old window size. But it should at least help a little in that case as well. v2: * Bug fix: Don't update exec_msc in present_wnmd_check_flip_window. (Roman Gilg) * Use exec_msc = target_msc - 1 instead of exec_msc--, and add a comment, for clarity. v3: * Drop exec_msc = target_msc again in present_wnmd_execute. * present_execute_copy should never set vblank->queued in present_wnmd_execute now, so replace that branch with an assertion. (Roman Gilg) Reviewed-by: Roman Gilg Tested-by: Roman Gilg commit d14ea667feccf085c7d66a7c63f380975e07af66 Author: Michel Dänzer Date: Tue Jul 28 18:53:45 2020 +0200 present/wnmd: Move up present_wnmd_queue_vblank Allowing it to be called from more functions than before. No functional change. Reviewed-by: Roman Gilg Tested-by: Roman Gilg commit b0b3159abd8001fa3f6dfc44a288a95a62aa5cf6 Author: Michel Dänzer Date: Wed Aug 12 17:38:33 2020 +0200 present: Add present_vblank::exec_msc field For tracking the MSC when the present can be executed separately from the target MSC. Allows removing the requeue field instead, plus more later. v2: * Rename wait_msc → exec_msc (Roman Gilg) * Use exec_msc = target_msc instead of exec_msc++, for clarity. * Bug fix: Set exec_msc = target_msc also if present_flip returned false in present_execute. v3: * Set exec_msc = target_msc also if present_wnmd_flip returned false in present_wnmd_execute, for consistency. v4: * Specifically check for exec_msc == crtc_msc + 1 in present_execute_wait/copy, to avoid re-introducing https://bugs.freedesktop.org/show_bug.cgi?id=94596 . Reviewed-by: Roman Gilg Tested-by: Roman Gilg commit 4c92dea952f7fed19857904f0f552900257ef4b9 Author: Michel Dänzer Date: Tue Jul 28 18:48:42 2020 +0200 present: Move flip target_msc adjustment out of present_vblank_create Preparation for different handling between SCMD & WNMD. No functional change intended. Reviewed-by: Roman Gilg Tested-by: Roman Gilg commit 032af35657aa95c6bbdb74ff8c72e535b9b56cfa Author: Michel Dänzer Date: Fri Jul 24 18:21:05 2020 +0200 glamor: Fix glamor_poly_fill_rect_gl xRectangle::width/height handling (Using GLSL 1.30 or newer) The width/height members of xRectangle are unsigned, but they were being interpreted as signed when converting to floating point for the vertex shader, producing incorrect drawing for values > 32767. v2: * Use separate GL_UNSIGNED_SHORT vertex attribute for width/height. (Eric Anholt) Reviewed-by: Eric Anholt commit b22b4da980b763af5124f26627cad93983542d6b Author: Adam Jackson Date: Fri Aug 14 19:19:46 2020 -0400 glamor: Fix debugging callback setup on GLES You will not find GL_ARB_* extensions in a GLES context by definition, the droid you're looking for is named GL_KHR_debug. Reviewed-by: Eric Anholt Reviewed-by: Michel Dänzer commit 5c20e4b834145f590c68dbc98e33c7d3d710001a Author: Olivier Fourdan Date: Wed Jun 3 10:17:13 2020 +0200 xwayland: Disable the MIT-SCREEN-SAVER extension when rootless Xwayland is just a Wayland client, no X11 screensaver should be expected to work reliably on Xwayland when running rootless because Xwayland cannot grab the input devices so it has no way to actually lock the screen managed by the Wayland compositor. Turn off the screensaver on Xwayland when running rootless by setting the screensaver timeout and interval and their default values to zero and disable the MIT-SCREEN-SAVER extension. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1051 Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Reviewed-by: Peter Hutterer commit aac28e162e5108510065ad4c323affd6deffd816 Author: Matthieu Herrb Date: Sat Jul 25 19:33:50 2020 +0200 fix for ZDI-11426 Avoid leaking un-initalized memory to clients by zeroing the whole pixmap on initial allocation. This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb Reviewed-by: Alan Coopersmith commit 9d8e7c4828747f6bba438528c6ef6e2577b50522 Author: Ignacio Casal Quinteiro Date: Thu Jul 16 10:19:43 2020 +0200 XKB: Add debug key actions for grabs & window tree Replicate 7d2543a3cb3089241982ce4f8984fd723d5312a1 but for all types of X servers commit c24eb7e31e750d2b9ba8f1b72f53b07a57495395 Author: Roman Gilg Date: Tue Jul 28 20:24:50 2020 +0200 xwayland: Simplify Present event handling code Instead of optionally return early when an event is aborted and potentially clean it up in there we can only optionally inform Present if not aborted and afterwards clean it up if required. Saves some lines of code and conditional branches. Signed-off-by: Roman Gilg commit 06901e12c07691112b91b26b0c2000f8971e48b5 Author: Jon Turney Date: Thu Jun 4 13:25:45 2020 +0100 meson: Also ignore kms, kms_udev, hal options on Cygwin commit 4c2d1fe0454ca2b7c13e600a31f6733705c1c7b9 Author: Jon Turney Date: Wed Jul 29 20:32:49 2020 +0100 hw/xwin: Update for renames in xserver/output API Update commit ea47af87 renaming master_pixmap to primary_pixmap in struct PixmapRec. commit 9fbd3e43dd9e13700df96b508c3d97f77e2b9f7e Author: Huacai Chen Date: Sun Jul 5 05:59:58 2020 -0400 linux: Fix platform device probe for DT-based PCI On a DT-base PCI platform, the sysfs path of vga device is like this: /sys/devices/platform/bus@10000000/1a000000.pci/pci0000:00/0000:00:11.0/0000:04:00.0. Then the ID_PATH from udev is platform-1a000000.pci-pci-0000:04:00.0 and the BusID will be pci-0000:04:00.0, which causes Xorg start fail. This is because config_udev_odev_setup_attribs() use strstr() to search the first "pci-" in ID_PATH. To fix this, we implement a strrstr() function and use it to search the last "pci-" in ID_PATH, which can get a correct BusID. Signed-off-by: Huacai Chen commit 591916ea9e7a77f68f436b4a541402d9deadfe64 Author: Roman Gilg Date: Fri Jul 24 12:21:37 2020 +0200 present: Check valid region in window mode flips For Pixmap flips to have well defined outcomes the window must be contained by the valid region if such region was specified. The valid region is inserted as an argument to the check in window mode. Setting this argument is missing in screen mode as well but we ignore it for now and only add it to window mode. It seems there are none or only very few clients actually making use of valid regions at the moment. For simplicity we therefore just check if a valid region was set by the client and in this case do never flip, independently of the window being contained by the region or not. Signed-off-by: Roman Gilg commit bf794bd7bfa3bdcf7de95ce237eb50ecc6ec11d2 Author: Roman Gilg Date: Tue Jul 14 14:32:25 2020 +0200 present: Remove superfluous set abort flip function in window mode The function is never called from present_screen.c in contrast to the behavior in screen mode. In present_wnmd.c we can simply remove the function which does an unnecessary check of the property before setting it and directly set the property at the two locations the function was called previously. Signed-off-by: Roman Gilg commit ab880b8b9e8d67a05fcb085097c94bbddf7dcb95 Author: Roman Gilg Date: Sun Jul 12 13:42:31 2020 +0200 present: Idle vblanks any time in window mode With the newly introduced separate API method for idling a presented Pixmap in window mode we can simplify the logic by allowing calls to it at any point in time. This is done by setting the flip_idler flag if the Pixmap was idled before being presented. Signed-off-by: Roman Gilg commit 932c6baca274f57beab51cd0dff1f7fa934e0ed0 Author: Roman Gilg Date: Sat Jul 11 19:15:46 2020 +0200 present: Notify via distinct API functions in window mode Notifying Present about events' states was done prior with the single function present_wnmd_event_notify just like in screen mode. But it is more intelligible if at least in window mode we make use of three different functions with names that directly indicate what their purpose is: * present_wnmd_event_notify only for queued events feedback. * present_wnmd_flip_notify for when a presentation occured (flip). * present_wnmd_idle_notify for when the Pixmap of the event can be reused. This is an API-breaking change in regards to window mode. DDX written against the previous version won't work anymore. It is assumed that there only exists the XWayland DDX at the moment using the window mode such that this is not an issue for the overall ecosystem. Signed-off-by: Roman Gilg commit f8211095c3d94307225318902598e8f79d038f26 Author: Roman Gilg Date: Sat Feb 15 01:58:22 2020 +0100 xwayland: Rename present event lists Rename the lists release_queue to release_list and event_list to wait_list. The prior names release_queue and event_list were ambiguous: in both are event- like vblanks which can be removed from the lists in random order. In the release_queue can be flips that are already released but still wait for the sync or frame callback but normally the release comes later. In the event_list are queued events waiting for a later msc. Signed-off-by: Roman Gilg commit 0db326e5ca3dd244dda502c8261801c04ff792ab Author: Roman Gilg Date: Wed Jul 8 10:24:41 2020 +0200 xwayland: Remove unused xwl_screen entry In xwl_present_window an xwl_screen entry was declared but never actually used. Signed-off-by: Roman Gilg commit 495bf63a7df066672d9d44dedeb1f49658a247d8 Author: Alex Goins Date: Thu Jul 2 20:03:06 2020 -0500 randr: Re-add removed NULL checks to xf86RandR12.c Commit 1e3f9ea1 removed some NULL checks from xf86RandR12.c, on the premise that they can't be reached unless RandR has already been initialized. For threesuch calls, that's not true: xf86Crtc.c::xf86CrtcScreenInit(): if (c == config->num_crtc) { xf86RandR12SetRotations(screen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270 | RR_Reflect_X | RR_Reflect_Y); xf86RandR12SetTransformSupport(screen, TRUE); } else { xf86RandR12SetRotations(screen, RR_Rotate_0); xf86RandR12SetTransformSupport(screen, FALSE); } xf86Crtc.c::xf86CrtcCloseScreen(): xf86RandR12CloseScreen(screen); This change adds checks back to xf86RandR12Set{Rotations,TransformSupport}() and xf86RandR12CloseScreen(), checking that xf86RandR12KeyRec has been registered. Without this, X will hit an assert that causes it to abort. Signed-off-by: Alex Goins commit 8eeff5d7880c6885ee6f206355599f13d739afa7 Author: Alex Goins Date: Thu Jul 2 20:12:43 2020 -0500 randr: Check rrPrivKey in RRHasScanoutPixmap() RRHasScanoutPixmap() is called from xf86CheckHWCursor(), regardless of whether or not RandR has been initialized. As mentioned in commit 4226c6d, it's possible that RandR has not been initialized if the server is configured with Xinerama and there is more than one X screen. Calling rrGetScrPriv when RandR isn't initialized causes an assertion failure that aborts the server: Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion key->initialized' failed. Just as in commit 4226c6d, fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv. Signed-off-by: Alex Goins commit 6172bd2b41a7ce158b9052af3e373318e5e4381c Author: Alex Goins Date: Thu Jul 2 18:39:11 2020 -0500 randr: Check rrPrivKey before autobinding GPU screens RRProviderAutoConfigGpuScreen() is called from outside RandR, so there is no guarantee that RandR has been initialized when it is called. As mentioned in commit 4226c6d, it's possible that RandR has not been initialized if the server is configured with Xinerama and there is more than one X screen. Calling rrGetScrPriv when RandR isn't initialized causes an assertion failure that aborts the server: Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion key->initialized' failed. Just as in commit 4226c6d, fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv. Signed-off-by: Alex Goins commit e33453f9111b21e4814d628e6ae00bc7b200f404 Author: Michel Dänzer Date: Fri Jul 10 18:56:42 2020 +0200 xwayland: Handle NULL xwl_seat in xwl_seat_can_emulate_pointer_warp This can happen e.g. with weston's headless backend. Reviewed-by: Olivier Fourdan commit ddb86e94c07a269dfc9cd80543f9f6a2c3e934a2 Author: Emmanuel Gil Peyrot Date: Sat Jul 11 19:47:40 2020 +0200 xwayland: Remove harmless duplicated #include commit a137dd5f79d272a57c6704143dc9c25a9b59c927 Author: Emmanuel Gil Peyrot Date: Sat Jul 11 19:34:59 2020 +0200 xwayland: Use memfd_create() when available This (so-far) Linux-only API lets users create file descriptors purely in memory, without any backing file on the filesystem and the race condition which could ensue when unlink()ing it. It also allows seals to be placed on the file, ensuring to every other process that we won’t be allowed to shrink the contents, potentially causing a SIGBUS when they try reading it. This patch is best viewed with the -w option of git log -p. This is a port of this commit from Weston: https://gitlab.freedesktop.org/wayland/weston/-/commit/deae98ef45e060b8412a5edd195fb0c7c14f0321 Fixes #848. Signed-off-by: Emmanuel Gil Peyrot commit ba0e789b912671c724a21b3a30291247718bcf7d Author: Lyude Paul Date: Tue Jul 14 18:32:39 2020 -0400 xwayland: Store xwl_tablet_pad in its own private key When a slave device causes the master virtual pointer device to change device types, the device's private data pointer (device->public.devicePrivate) is also changed to match the type of the slave device. This can be a problem though, as tablet pad devices will set the device's private data pointer to their own xwl_tablet_pad struct. This can cause us to dereference the pointer as the wrong type, and result in a segfault: Thread 1 "Xwayland" received signal SIGSEGV, Segmentation fault. wl_proxy_marshal (proxy=0x51, opcode=opcode@entry=0) at src/wayland-client.c:792 792 va_start(ap, opcode); (gdb) bt 0 wl_proxy_marshal (proxy=0x51, opcode=opcode@entry=0) at src/wayland-client.c:792 1 0x00005610b27b6c55 in wl_pointer_set_cursor (hotspot_y=0, hotspot_x=0, surface=0x0, serial=, wl_pointer=) at /usr/include/wayland-client-protocol.h:4610 2 xwl_seat_set_cursor (xwl_seat=xwl_seat@entry=0x5610b46d5d10) at xwayland-cursor.c:137 3 0x00005610b27b6ecd in xwl_set_cursor (device=, screen=, cursor=, x=, y=) at xwayland-cursor.c:249 4 0x00005610b2800b46 in miPointerUpdateSprite (pDev=0x5610b4501a30) at mipointer.c:468 5 miPointerUpdateSprite (pDev=0x5610b4501a30) at mipointer.c:410 6 0x00005610b2800e56 in miPointerDisplayCursor (pCursor=0x5610b4b35740, pScreen=0x5610b3d54410, pDev=0x5610b4501a30) at mipointer.c:206 7 miPointerDisplayCursor (pDev=0x5610b4501a30, pScreen=0x5610b3d54410, pCursor=0x5610b4b35740) at mipointer.c:194 8 0x00005610b27ed62b in CursorDisplayCursor (pDev=, pScreen=0x5610b3d54410, pCursor=0x5610b4b35740) at cursor.c:168 9 0x00005610b28773ee in AnimCurDisplayCursor (pDev=0x5610b4501a30, pScreen=0x5610b3d54410, pCursor=0x5610b4b35740) at animcur.c:197 10 0x00005610b28eb4ca in ChangeToCursor (pDev=0x5610b4501a30, cursor=0x5610b4b35740) at events.c:938 11 0x00005610b28ec99f in WindowHasNewCursor (pWin=pWin@entry=0x5610b4b2e0c0) at events.c:3362 12 0x00005610b291102d in ChangeWindowAttributes (pWin=0x5610b4b2e0c0, vmask=, vlist=vlist@entry=0x5610b4c41dcc, client=client@entry=0x5610b4b2c900) at window.c:1561 13 0x00005610b28db8e3 in ProcChangeWindowAttributes (client=0x5610b4b2c900) at dispatch.c:746 14 0x00005610b28e1e5b in Dispatch () at dispatch.c:497 15 0x00005610b28e5f34 in dix_main (argc=16, argv=0x7ffc7a601b68, envp=) at main.c:276 16 0x00007f8828cde042 in __libc_start_main (main=0x5610b27ae930
, argc=16, argv=0x7ffc7a601b68, init=, fini=, rtld_fini=, stack_end=0x7ffc7a601b58) at ../csu/libc-start.c:308 17 0x00005610b27ae96e in _start () at cursor.c:1064 Simple reproducer in gnome-shell: open up an Xwayland window, press some tablet buttons, lock and unlock the screen. Repeat if it doesn't crash the first time. So, let's fix this by registering our own device-specific private key for storing a backpointer to xwl_tablet_pad, so that all input devices have their private data pointers set to their respective xwl_seat. Reviewed-by: Peter Hutterer Signed-off-by: Lyude Paul commit 85a6fd11c723888ca093785a3df43066fdca9c33 Author: Roman Gilg Date: Wed Jul 8 17:08:55 2020 +0200 xwayland: Damage surface in surface-relative coordinates In 9141196d positional coordinates were added to the damage call of pixmap flips. The damage box coordinates are in screen space though and we need to convert them first to surface-relative ones by substracting the origin of the window. Signed-off-by: Roman Gilg commit ed624544d4aef72db8dd575ad55ef5e206c54757 Author: Michel Dänzer Date: Fri Jul 10 11:01:10 2020 +0200 xfree86: Bump ABI_VIDEODRV_VERSION to 25.2 This gives out of tree drivers a fighting chance to build against both sides of https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/468 . Reviewed-by: Dave Airlie commit ea47af87f692b291a988834c6f14d73a08cb1d75 Author: Dave Airlie Date: Mon Jul 6 07:00:50 2020 +1000 xserver/output: rename some badly named variables/APIs. This is an API and ABI break Reviewed-by: Peter Hutterer commit 15b7738389b36ec2739d4f599539bcb7c2be89a1 Author: Dave Airlie Date: Mon Jul 6 07:00:04 2020 +1000 exa: rename some badly named variables Reviewed-by: Peter Hutterer commit 5188603ff7d25186c9076fefeceba825f3a40d47 Author: Olivier Fourdan Date: Mon Apr 20 11:29:16 2020 +0200 xwayland: Add a pkg-config file for Xwayland Xwayland is usually spawned by the Wayland compositor which sets the command line options. If a command line option is not supported, Xwayland will fail to start. That somehow makes the Xwayland command line option sort of ABI, the Wayland compositor need to know if a particular option is supported by Xwayland at build time. Also, currently, Xwayland is being installed along with the rest of the common executable programs that users may run, which is sub-optimal because, well, Xwayland is not a common executable program, it's meant to be a proxy between the Wayland compositor and the legacy X11 clients which wouldn't be able to run on Wayland otherwise. Xwayland would be better installed in `libexec` but that directory is (purposedly) not in the user `PATH` and therefore the Wayland compositor may not be able to find Xwayland in that case. To solve both problems (which options are supported by Xwayland and where to look for it), add a `pkg-config` file specifically for Xwayland which gives the full path to Xwayland (`xwayland`) and which options it supports (using `pkg-config` variables). The `pkg-config` file also provides the `Version` so the build scripts can check for a particular version if necessary. Obviously, Wayland compositors are not required to use the `pkg-config` file and can continue to use whatever mechanism they deem preferable. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 2beefda5a80e5a016c32c1da733f9415a121179d Author: Michel Dänzer Date: Tue Mar 17 12:55:34 2020 +0100 xwayland: Move xwl_surface_damage definition to xwayland-screen.c It was already declared in xwayland-screen.h, and only takes a screen parameter, no window ones. Reviewed-by: Olivier Fourdan commit 12af425acd3f4a3a8aa85352857b130b0006b83c Author: Michel Dänzer Date: Thu Jun 25 17:56:41 2020 +0200 xwayland: Rename xwl_pixmap_cb → xwl_buffer_release_cb Seems clearer. While we're at it, also drop the unused pixmap parameter. Reviewed-by: Olivier Fourdan commit 9eb0b4f731e21952f93e168900f10bf07e261107 Author: Michel Dänzer Date: Thu Jun 25 17:49:27 2020 +0200 xwayland: Remove xwl_present_event::buffer_released in favor of ::pixmap No need for the separate boolean. Reviewed-by: Olivier Fourdan commit 9141196d3104ab37385c3e385deaa70c002dd184 Author: Michel Dänzer Date: Tue Mar 17 12:58:12 2020 +0100 xwayland: Propagate damage x1/y1 coordinates in xwl_present_flip This couldn't have worked correctly for non-0 x1/y1. Noticed by inspection. Reviewed-by: Simon Ser commit 0006aecba097b437f96a462075494d68bdad24c1 Author: Alan Coopersmith Date: Sun Jul 5 13:18:45 2020 -0700 doc: Update URLs in Xserver-DTrace.xml Signed-off-by: Alan Coopersmith commit 23e83724df4809fd7857cc609c33ce7e8d3021a4 Author: Alan Coopersmith Date: Sun Jul 5 13:07:33 2020 -0700 Fix spelling/wording issues Most (but not all) of these were found by using codespell --builtin clear,rare,usage,informal,code,names but not everything reported by that was fixed. Signed-off-by: Alan Coopersmith commit b0413b6e99c6b5fbc04229ce64ddf1f41b08e63e Author: Olivier Fourdan Date: Tue Jun 2 11:23:46 2020 +0200 xwayland: Use a fixed DPI value for core protocol The way Xwayland works (like all Wayland clients), it first queries the Wayland registry, set up all relevant protocols and then initializes its own structures. That means Xwayland will get the Wayland outputs from the Wayland compositor, compute the physical size of the combined outputs and set the corresponding Xwayland screen properties accordingly. Then it creates the X11 screen using fbScreenInit() but does so by using a default DPI value of 96. That value is used to set the physical size of the X11 screen, hence overriding the value computed from the actual physical size provided by the Wayland compositor. As a result, the DPI computed by tools such as xdpyinfo will always be 96 regardless of the actual screen size and resolution. However, if the Wayland outputs get reconfigured, or new outputs added, or existing outputs removed, Xwayland will recompute and update the physical size of the screen, leading to an unexpected change of DPI. To avoid that discrepancy, use a fixed size DPI (defaults to 96, and can be set using the standard command lime option "-dpi") and compute a physical screen size to match that DPI setting. Note that only affects legacy core protocols, X11 clients can still get the actual physical output size as reported by the Wayland compositor using the RandR protocol, which also allows for the size to be 0 if the size is unknown or meaningless. Signed-off-by: Olivier Fourdan Reviewed-by: Simon Ser Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/731 commit 6748a4094158d2bde1630b915a5318f9f22c8e0a Author: SimonP Date: Tue Jun 9 13:26:48 2020 +0200 xwayland: Initialise values in xwlVidModeGetGamma() ProcVidModeGetGamma() relies on GetGamma() to initialise values if it returns TRUE. Without this, we're sending uninitialised values to clients. Fixes: xorg/xserver#1040 commit d35f68336b0a462dc660797d1779581f348af04e Author: Sjoerd Simons Date: Fri Apr 10 16:34:06 2020 +0200 xwayland: Fix crashes when there is no pointer When running with a weston session without a pointer device (thus with the wl_seat not having a pointer) xwayland pointer warping and pointer confining should simply be ignored to avoid crashes. Signed-off-by: Sjoerd Simons commit 73480f172aeced074dd9301ae4d97f7d2f3a9a45 Author: Jose Maria Casanova Crespo Date: Fri May 15 18:33:11 2020 +0200 modesetting: Fix front_bo leak at drmmode_xf86crtc_resize on XRandR rotation Since the introduction of "modesetting: Remove unnecessary fb addition from drmmode_xf86crtc_resize" the fb_id isn't initialited at drmmode_xf86crtc_resize. Rotate operation of XRandR uses rotate_bo. So in this case the fb_id associated to the front_bo is not initialized at drmmode_set_mode_major. So fd_id remains 0. As every call to drmmode_xf86crtc_resize allocates a new front_bo we should destroy unconditionally the old_front_bo if operation success. So we free the allocated GBM handles. This avoids crashing xserver with a OOM in the RPI4 1Gb at 4k resolution after 3 series xrandr rotations from normal to left and vice versa reported at https://github.com/raspberrypi/firmware/issues/1345 Signed-off-by: Jose Maria Casanova Crespo Reviewed-by: Keith Packard Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1024 Fixes: 8774532121 "modesetting: Remove unnecessary fb addition from drmmode_xf86crtc_resize" commit b67052742980fd3ec669100048da71e09aa61358 Author: Michel Dänzer Date: Fri Jun 19 18:10:18 2020 +0200 xwayland: Free all remaining events in xwl_present_cleanup These events aren't reachable after xwl_present_cleanup, so they're leaked if we don't free them first. This requires storing the pixmap pointer in struct xwl_present_window. Luckily, the buffer pointer isn't used for anything, so just replace that. v2: * Bump pixmap reference count in xwl_present_flip and drop it in xwl_present_free_event, fixes use-after-free in the latter due to the pixmap already being destroyed. Reviewed-by: Dave Airlie commit 1beffba699e2cc3f23039d2177c025bc127966de Author: Michel Dänzer Date: Fri Jun 19 18:14:35 2020 +0200 xwayland: Always use xwl_present_free_event for freeing Present events Minor cleanup, and will make the next change simpler. No functional change intended. Reviewed-by: Dave Airlie commit 1bdedc8dbb9d035b85444c2558a137470ff52113 Author: Michel Dänzer Date: Fri Jun 19 17:24:42 2020 +0200 present/wnmd: Free flip_queue entries in present_wnmd_clear_window_flip When present_wnmd_clear_window_flip is done, present_destroy_window frees struct present_window_priv, and the events in the flip queue become unreachable. So if we don't free them first, they're leaked. Also drop the call to present_wnmd_set_abort_flip, which just sets a flag in struct present_window_priv and thus can't have any observable effect after present_destroy_window. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1042 Reviewed-by: Dave Airlie commit bc9dd1c71c3722284ffaa7183f4119151b25a44f Author: Michel Dänzer Date: Fri Jun 19 17:02:40 2020 +0200 present/wnmd: Keep pixmap pointer in present_wnmd_clear_window_flip The comment was incorrect: Any reference held by the window (see present_wnmd_execute) is in addition to the one in struct present_vblank (see present_vblank_create). So if we don't drop the latter, the pixmap will be leaked. Reviewed-by: Dave Airlie commit 7ae221ad5774756766dc78a73d71f4163ac7b1c6 Author: Martin Weber Date: Fri Jun 19 16:51:15 2020 +0200 hw/xfree86: Avoid cursor use after free During a VT-Switch a raw pointer to the shared cursor object is saved which is then freed (in case of low refcount) by a call to xf86CursorSetCursor with argument pCurs = NullCursor. This leads to a dangling pointer which can follow in a use after free. This fix ensures that there is a shared handle saved for the VT-Switch cycle. Reviewed-by: Michel Dänzer commit 6a79a737e2c0bc730ee693b4ea4a1530c108be4e Author: Aaron Ma Date: Sat Apr 11 17:29:35 2020 +0800 xfree86: add drm modes on non-GTF panels EDID1.4 replaced GTF Bit with Continuous or Non-Continuous Frequency Display. Check the "Display Range Limits Descriptor" for GTF support. If panel doesn't support GTF, then add gtf modes. Otherwise X will only show the modes in "Detailed Timing Descriptor". V2: Coding style changes. V3: Coding style changes, remove unused variate. V4: remove unused variate. BugLink: https://gitlab.freedesktop.org/drm/intel/issues/313 Signed-off-by: Aaron Ma Reviewed-by: Adam Jackson commit d6558477d7a264c2132bc977b51d80fc0277d1e0 Author: Simon Ser Date: Tue Jun 2 15:40:16 2020 +0200 xwayland: allow using linux-dmabuf with DRM_FORMAT_MOD_INVALID When the linux-dmabuf protocol is available, prefer it over the old wl_drm protocol. Previously wl_drm was used when modifiers aren't supported, however linux-dmabuf supports formats without modifiers too. In this case, linux-dmabuf will send a DRM_FORMAT_MOD_INVALID modifier for each supported format [1]. This allows compositors to better handle these buffers, getting a DMA-BUF and implementing features like direct scan-out. A similar logic has been implemented for EGL [2]. DRM_FORMAT_MOD_INVALID is now stored in the xwl_screen->formats list. glamor_get_modifiers still returns FALSE with zero modifiers if the only advertised modifier is DRM_FORMAT_MOD_INVALID. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/fb9b2a87317c77e26283da5f6c9559d709f6fdcd [2]: https://gitlab.freedesktop.org/mesa/mesa/-/commit/c376865f5eeca535c4aa8e33bcf166052c1ce2f2 Signed-off-by: Simon Ser Reviewed-by: Michel Dänzer commit c0e13cbf5a56e1fdd1e4ce58ebdefb6d2904e4b3 Author: Simon Ser Date: Tue Jun 2 15:28:38 2020 +0200 xwayland: only use linux-dmabuf if format/modifier was advertised Previously, linux-dmabuf was used unconditionally if the buffer had a modifier. However creating a linux-dmabuf buffer with a format/modifier which hasn't been advertised will fail. Change xwl_glamor_gbm_get_wl_buffer_for_pixmap to use linux-dmabuf when the format/modifier has been advertised only. Signed-off-by: Simon Ser Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1035 Tested-by: Emmanuel Gil Peyrot Reviewed-by: Michel Dänzer commit 9c8d2744584868aa2655bf3ec047f2f9669e4291 Author: Simon Ser Date: Mon May 4 10:53:57 2020 +0200 xwayland: don't use GBM_BO_USE_SCANOUT This flag should only be used when the caller intends to display the buffer on a hardware plane. Xwayland isn't a DRM client, so it doesn't make sense to use this flag. This change will allow the driver to potentially use buffer parameters that are more optimized. Signed-off-by: Simon Ser Reviewed-by: Daniel Stone Reviewed-by: Michel Dänzer commit fc4f248544f207ffd68303da22ea1e27beb3729f Author: Adam Jackson Date: Fri Jun 5 14:33:03 2020 -0400 xwayland: Set the vendor name for GLX_EXT_libglvnd Without this the client library will flail around looking for a default provider, probably one named "indirect", and that defeats the point of having the EGL provider for direct context support in the first place. This assumes that "mesa" will work, of course, and in general it should. Mesa drivers will DTRT through the DRI3 setup path, and if our glamor is atop something non-Mesa then you should fall back to llvmpipe like 1.20. In the future it might be useful to differentiate the vendor here based on whether glamor is using gbm or streams. Fixes: xorg/xserver#1032 commit 5dc16f6fec672c10fc26dcaaf00df0f6bed0ef9a Author: Matthieu Herrb Date: Tue Jun 2 17:32:11 2020 +0200 Remove BSD APM support. None of the current BSD is actually using this code. (checked DragonFly 5.8.1, FreeBSD 11.2, NetBSD 9.0 and OpenBSD 6.7) Signed-off-by: Matthieu Herrb commit b5b529799a20f8a262066daeb726307c0631f208 Author: Jan Beich Date: Sun Feb 9 15:28:10 2020 +0000 meson: split udev from udev_kms which requires systemd DragonFly and FreeBSD can use xf86-input-libinput with config/udev. ld: error: undefined symbol: xf86PlatformDeviceProbe >>> referenced by xf86platformBus.c >>> xf86platformBus.c.o:(xf86platformProbe) in archive hw/xfree86/common/libxorg_common.a ld: error: undefined symbol: xf86PlatformDeviceCheckBusID >>> referenced by xf86platformBus.c >>> xf86platformBus.c.o:(xf86platformProbeDev) in archive hw/xfree86/common/libxorg_common.a ld: error: undefined symbol: xf86PlatformReprobeDevice >>> referenced by xf86platformBus.c >>> xf86platformBus.c.o:(xf86platformVTProbe) in archive hw/xfree86/common/libxorg_common.a ld: error: undefined symbol: NewGPUDeviceRequest >>> referenced by udev.c >>> udev.c.o:(device_added) in archive config/liblibxserver_config.a ld: error: undefined symbol: DeleteGPUDeviceRequest >>> referenced by udev.c >>> udev.c.o:(device_removed) in archive config/liblibxserver_config.a commit be731e0bdc7d76ad3782d5b533b6bcc8378f41ad Author: Jan Beich Date: Sun Feb 9 15:12:39 2020 +0000 glx: unbreak on Unix without /usr/include/drm In file included from ../glx/glxdri2.c:35: /usr/local/include/GL/internal/dri_interface.h:43:10: fatal error: 'drm.h' file not found #include ^~~~~~~ In file included from ../glx/glxdriswrast.c:39: /usr/local/include/GL/internal/dri_interface.h:43:10: fatal error: 'drm.h' file not found #include ^~~~~~~ commit f2cf236da8e8fefd6f503ceb0a448c5ad9651024 Author: Jan Beich Date: Sat Nov 16 18:40:36 2019 +0000 os: unbreak xsha1 on FreeBSD ../os/xsha1.c:36:10: fatal error: 'sha1.h' file not found #include ^~~~~~~~ ../os/xsha1.c:45:5: error: implicit declaration of function 'SHA1Init' is invalid in C99 [-Werror,-Wimplicit-function-declaration] SHA1Init(ctx); ^ ../os/xsha1.c:54:5: error: implicit declaration of function 'SHA1Update' is invalid in C99 [-Werror,-Wimplicit-function-declaration] SHA1Update(sha1_ctx, data, size); ^ ../os/xsha1.c:63:5: error: implicit declaration of function 'SHA1Final' is invalid in C99 [-Werror,-Wimplicit-function-declaration] SHA1Final(result, sha1_ctx); ^ commit 4195e8035645007be313ade79032b8d561ceec6c Author: Olivier Fourdan Date: Tue May 5 15:40:43 2020 +0200 xwayland: Clear private on device removal Xwayland uses the device private to point to the `xwl_seat`. Device may be removed at any time, including on suspend. On resume, if the DIX code ends up calling a function that requires the `xwl_seat` such as `xwl_set_cursor()` we may end up pointing at random data. Make sure the clear the device private data on removal so that we don't try to use it and crash later. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer https://gitlab.freedesktop.org/xorg/xserver/issues/709 commit 6ef1b0108ebe98c58fe5e00c86de52452c817518 Author: Peter Hutterer Date: Fri May 8 10:54:31 2020 +1000 gitlab CI: use the fdo ci-templates repository wayland/ci-templates was moved to freedesktop/ci-templates, everything else stayed the same so the sha is still valid. Signed-off-by: Peter Hutterer Acked-by: Michel Dänzer commit 421ce458f1d295015c108eb32f9611e527649cf8 Author: Simon Ser Date: Mon May 4 18:20:17 2020 +0200 xwayland: import DMA-BUFs with GBM_BO_USE_RENDERING only Drop GBM_BO_USE_SCANOUT from the GBM_BO_IMPORT_FD import, add GBM_BO_USE_RENDERING to the GBM_BO_IMPORT_FD_MODIFIER import. If the DMA-BUF cannot be scanned out, gbm_bo_import with GBM_BO_USE_SCANOUT will fail. However Xwayland doesn't need to scan-out the buffer and can work fine without scanout. Glamor only needs GBM_BO_USE_RENDERING. Signed-off-by: Simon Ser Reviewed-by: Michel Dänzer Reviewed-by: Daniel Stone commit 0777cf46d7260f3d0c7fe82af5c94137d1e4f3de Author: Carlos Garnacho Date: Thu May 7 20:15:14 2020 +0200 xwayland: Improve checks for confined_to on InputOnly windows In this pretty Wine/Proton specific kludge, we try to handle confining grabs on InputOnly windows by trying to find the InputOutput window that the pointer would get visually confined to. The grabbing window and the visible window come from different clients, so we used to simply resort to the pointer focus. This is troublesome though, as the call may happen very soon at a time that the toplevel wasn't yet mapped by the Wayland compositor, so the pointer focus may well be out of date soon. In these situations, it does seem that even though the confining grab happens too early to have the wayland surface mapped, the xserver view of the WindowPtr does already reflect the size. Use this to find out the better window to assign the confining grab to, one whose geometry fully contains the InputOnly window's. Signed-off-by: Carlos Garnacho Reviewed-by: Olivier Fourdan commit f486e2fdaa1b252405a3aee90bd495b8b4c851f2 Author: Olivier Fourdan Date: Tue May 5 10:38:50 2020 +0200 xwayland: Remove undeeded test xwl_seat_maybe_lock_on_hidden_cursor() checks that the value of cursor_confinement_window is not NULL, yet there is no code path that could lead to this. Remove the test for cursor_confinement_window being set, it's useless. Signed-off-by: Olivier Fourdan Reviewed-by: Carlos Garnacho Reviewed-by: Peter Hutterer commit baa8d12e464664b5ad3c591be05a0087482790ca Author: Olivier Fourdan Date: Thu Apr 30 13:55:42 2020 +0200 xwayland: Lock on entering surface if needed When an X11 client issues a ConfinePointer wit ha hidden cursor, Xwayland may translate that as a pointer lock. However, if the pointer is located on another window at the time, the request may be ignored, even if the pointer later enters the window. To avoid that issue, check again if locking the pointer with a hidden cursor is needed when pointer enters a surface. Signed-off-by: Olivier Fourdan Reviewed-by: Carlos Garnacho Reviewed-by: Peter Hutterer commit 1345f804a88efc11c58f8388983d34445d3e5928 Author: Olivier Fourdan Date: Tue Mar 24 16:33:16 2020 +0100 xwayland: confine motion events to the confined window When an X11 client has an active grab on the pointer, all events are reported relative to the window with the grab. For Xwayland, if an X11 client has a grab with a pointer confinement active, while pointer focus is on another window, motion events should not be reported to the client with the grab, because that sets the X11 client appart, the events would be reported when the pointer is on any X11 window but not on Wayland native surfaces. Therefore, if the pointer is confined on a window and that window differs from the actual pointer focus window, just pretend we lost pointer focus to another window. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/962 Reviewed-by: Carlos Garnacho Reviewed-by: Peter Hutterer commit 5929b789f9c6531ee257504a7be9c9e3a49b30eb Author: Olivier Fourdan Date: Tue Mar 24 16:12:38 2020 +0100 xwayland: Do not lock the pointer on the wrong window If a client issues a grab on the pointer while the cursor is on another X11 window, and then hides the cursor, we may end up locking the pointer onto that other window. Then a button click might end up moving the focus away from the window which issued the grab, leaving the whole setup in a mixed up state. Typically, if the pointer is on another X11 window, we should not try to lock the pointer, so that it can be moved back to the window which actually issues the grab (and hence the pointer confinement). Typically, this is the same as an X11 client issuing a pointer grab while the cursor is on another Wayland native window. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/962 Reviewed-by: Carlos Garnacho Reviewed-by: Peter Hutterer commit a5151f58cf98d1696d60a3577dc50851f159da8a Author: Alan Coopersmith Date: Sun May 10 17:46:33 2020 -0700 Update URL's in man pages Mostly http->https conversions, but also replaces gitweb.fd.o with gitlab.fd.o, and xquartz.macosforge.org with xquartz.org. Signed-off-by: Alan Coopersmith commit 9bf33bab32fdfbe68b287947f55906ff0ac67f04 Author: Martin Weber Date: Fri May 8 16:45:50 2020 +0200 test: Fix struct initialization warning commit 462beb5338a44390e2fff03096942b035b509830 Author: Christopher Chavez Date: Sat Apr 25 05:09:51 2020 +0000 XQuartz: recognize F16-F20 and Menu keys Signed-off-by: Christopher Chavez commit 9937183e4bd2e96154bb4724805f74341ae84bd6 Author: Alexander Volkov Date: Tue Apr 21 12:38:03 2020 +0300 Fix build with gcc 9.3.0's -Werror=alloc-size-larger-than= commit 89f42b88216c0899977dd3861cbf13c5bae321d8 Author: Alexander Volkov Date: Tue Apr 21 01:01:21 2020 +0300 gitlab-ci: Bump DEBIAN_TAG to build with gcc 9.3.0 commit 9890e91265cb58c0cddc4de3c8845d18ae6e5a77 Author: Tobias Stoeckmann Date: Sun Apr 19 15:29:43 2020 +0200 hw/xfree86: Support ACPI without APM. On systems with ACPI but disabled APM (e.g. --disable-linux-apm) the code does not compile due to preprocessor directives. If APM is disabled, the final return statement is considered to be part of ACPI's last if-statement, leading to a function which has no final return statement at all. I have refactored the code so ACPI and APM are independent of each other. Signed-off-by: Tobias Stoeckmann commit 785e59060c00129e47da6c0877604a56d7e0e32f Author: Olivier Fourdan Date: Fri Apr 24 17:45:49 2020 +0200 xwayland: Fix infinite loop at startup Mutter recently added headless tests, and when running those tests the Wayland compositor runs for a very short time. Xwayland is spawned by the Wayland compositor and upon startup will query the various Wayland protocol supported by the compositor. To do so, it will do a roundtrip to the Wayland server waiting for events it expects. If the Wayland compositor terminates before Xwayland has got the replies it expects, it will loop indefinitely calling `wl_display_roundtrip()` continuously. To avoid that issue, add a new `xwl_screen_roundtrip()` that checks for the returned value from `wl_display_roundtrip()` and fails if it is negative. Signed-off-by: Olivier Fourdan Reviewed-by: Roman Gilg Reviewed-by: Jonas Ådahl commit 2fe13a1f448ff27925f92a557f145bab9ab91a0e Author: Jon Turney Date: Fri Feb 11 16:10:36 2011 +0000 hw/xwin: Drop call to setlocale() Since we now only work with UTF-8 (or ISO8859-1) text in the clipboard, we don't need to setlocale(). commit f269e01e1a783227c88b395cf6f55dcadeb751c9 Author: Jon Turney Date: Mon Jul 2 17:25:53 2018 +0100 hw/xwin: Consistently use BOOL type from Xmd.h This avoids including Xdefs.h, which means we avoid all the issues with _XSERVER64 effecting how types are defined by that. commit 4055fed1e7933c05afe143cbd18743c1ff1c7fee Author: Jon Turney Date: Sun Jul 1 15:53:42 2018 +0100 hw/xwin: Remove XSetAuthorization() for helper clients All helper client code now uses xcb, so calling XSetAuthorization() is no longer needed. This is the last reference to libX11 from helper clients, so linking with x11-xcb and libX11 is no longer required. Also drop (unneeded?) linking with libXau. Also drop installing these prerequistes on AppvVeyor. Also move prototypes for functions in winauth.c from win.h into a new header, winauth.h, and include that where needed. commit 9e02e023b08e24d4213ca14d99612e4cf5ef2f1e Author: Jon Turney Date: Sat Jun 30 16:00:16 2018 +0100 hw/xwin: xcbify clipboard integration Convert clipboard integration code from libX11 to xcb This drops support for COMPOUND_TEXT. Presumably some ancient (pre-2000) clients exist which support that, but not UTF8_STRING, but we don't have an example to test with. (Given the nature of the thing, the users of those clients probably work in CJK languages) Supporting COMPOUND_TEXT would also involve writing (or extracting from Xlib) support for the ISO 2022 encoding. v2: Fix the length of text property set by a SelectionRequest The length of the text property is not neccessarily the same as the length of the clipboard text before it is d2u converted (specifically, if that contains any '\r\n' sequences, it will be shorter as they are now just '\n') commit f4936de73c094e35eb293f32ab470347741a4fa0 Author: Jon Turney Date: Sun Jul 1 12:11:19 2018 +0100 hw/xwin: Remove nounicodeclipboard option Always use CF_UNICODETEXT clipboard format. Windows will automatically down-convert to CF_TEXT for clients which request that. This is subtly different in one way: if CF_TEXT is requested, we now post CF_UNICODETEXT and it is converted to CF_TEXT *in the locale of the requesting process*. Previously, we would convert to CF_TEXT *in our locale* and post that. It looks like the code in the !X_HAVE_UTF8_STRING case didn't actually work correctly, but fortunately that has never been true... commit 9f51dfdec37c991173c7a580fd1c279cfe09142e Author: Jon Turney Date: Sat Jun 30 16:15:52 2018 +0100 hw/xwin: Remove support for pre-Vista Win32 clipboard API The original Win32 clipboard API is widely regarded as terrible, since it relies on clients co-operatively managing the clipboard viewer chain, and a single buggy client can break it for all other clients. The last Windows version only supporting that API was Windows XP (5.1), EOLed in 2014. (This requires MinGW-w64 w32api 6.0.0 or later for Add/RemoveClipboardListener correctly exported by the x86_64 user32 implib) commit 9a4b62798bf4bcc2828a2a485e878e7d4447d03d Author: Jon Turney Date: Fri Apr 26 02:26:44 2019 +0100 hw/xwin: Fix lingering uses of libX11 types and values commit d7010cd93a381f1fc0cc681ddb70df9371370644 Author: Jon Turney Date: Thu Nov 19 18:06:28 2015 +0000 hw/xwin: Warn about too large Windows -> X clipboard pastes XChangeProperty() requests larger than the ~16MB permitted even with BigReq will fail BadLength commit 56a91f20671402a8c6f60c40e5e4e18f7978c740 Author: Jon Turney Date: Wed Nov 18 21:27:23 2015 +0000 hw/xwin: Implement INCR protocol for X clipboard -> Windows clipboard Also, relax the timeout mechanism so it allows 1 second between events, rather than 1 second for the entire transfer, as transfers of large pastes can take more than 1 second. Also, prefer UTF8_STRING encoding to COMPOUND_TEXT encoding commit 4f95d87d66b6a6e11aa8616c9242e0907ffee66b Author: Michael Stapelberg Date: Thu Mar 26 21:53:58 2020 +0100 Xorg: honor AutoRepeat option This option was implemented before the drivers were split in ≈2006, and e.g. XWin still supports it. With this commit, Xorg regains support, so that the following configuration can be used to set the repeat rate for all keyboard devices without having to modify Xorg command-line flags or having to automate xset(1): Section "InputClass" Identifier "system-keyboard" MatchIsKeyboard "on" Option "XkbLayout" "de" Option "XkbVariant" "neo" Option "AutoRepeat" "250 30" EndSection Signed-off-by: Michael Stapelberg commit 5684d436e2b65cd0fe305460e437a2f69af29865 Author: Adam Jackson Date: Thu Apr 19 14:49:22 2018 -0400 xinput: Remove PropagateMask Initialized to a constant value, never modified, never varied by device. Signed-off-by: Adam Jackson commit 4520ec9bd54b261fa2b210e9550d76087ef06259 Author: Adam Jackson Date: Thu Apr 19 14:42:47 2018 -0400 xinput: Remove ExtExclusiveMasks Initialized to a constant value, never modified, never varied by device. Signed-off-by: Adam Jackson commit 1e29f3ea3eb63cfcb78a463ee0345ec22a013033 Author: Adam Jackson Date: Thu Mar 5 16:32:56 2020 -0500 glx: Require screens match for share contexts for classic CreateContext The GLX_ARB_create_context path (with which this should all get unified, someday, sigh) already enforces this, but the classic path does not. It's effectively assumed by the implementation anyway, so let's enforce it rather than do crashy things. Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit b56e501092169a9c0a60663d832ee71898a8bc4b Author: Vasily Khoruzhick Date: Fri Mar 20 20:36:25 2020 -0700 glx: fixup symbol name for get_extensions function glxProbeDriver() concatenates __DRI_DRIVER_GET_EXTENSIONS with driver name to get symbol name for get_extension function. Unfortunately that doesn't work for drivers that have hyphen in their name, e.g. sun4i-drm -- get_extensions() for these uses underscore instead. As result dlsym() doesn't find get_extension() function and AIGLX initialization fails resulting in following message in Xorg.0.log: (EE) AIGLX error: sun4i-drm does not export required DRI extension Replace all non-alpha-numeric characters with underscore to fix the issue. Signed-off-by: Vasily Khoruzhick commit 5e91587302e85fd6f0e8d5ffbe30182e18c6913f Author: Michel Dänzer Date: Tue Mar 17 11:45:22 2020 +0100 xwayland: Delete all frame_callback_list nodes in xwl_unrealize_window We were only calling xwl_present_unrealize_window for the toplevel window, but the list can contain entries from child windows as well, in which case we were leaving dangling pointers to freed memory. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/1000 Fixes: c5067feaeea1 "xwayland: Use single frame callback for Present flips and normal updates" Reviewed-by: Olivier Fourdan Tested-by: Olivier Fourdan commit 5b9010fa6b0ab0971dddf5108d5a5046c05180b0 Author: Yuriy Vasilev Date: Fri Mar 6 20:22:19 2020 +0300 modesetting: add support for GBM_FORMAT_ARGB1555 Reviewed-by: Michel Dänzer Signed-off-by: Yuriy Vasilev commit 8315fc4ea2e04598ce0c7e9771786a9334f0d456 Author: Yuriy Vasilev Date: Thu Mar 5 17:02:26 2020 +0300 modesetting: add support for GBM_FORMAT_RGB565 This allow x-server to run with -depth 16. Reviewed-by: Michel Dänzer Signed-off-by: Yuriy Vasilev commit 3d6efc4aaff80301c0b10b7b6ba297eb5e54c1a0 Author: mntmn Date: Sat Feb 22 17:25:15 2020 +0100 xwayland: port rooted xwayland from wl_shell to xdg-shell protocol Recently, rooted Xwayland crashes on wlroots-based compositors, because wlroots removed the deprecated wl_shell protocol. This MR fixes this by changing the code in question to the xdg-shell protocol. My motivation do this: on etnaviv-based embedded platforms, rooted Xwayland is much faster and doesn't cause UI rendering bugs compared to rootless Xwayland. Signed-off-by: Lukas F. Hartmann commit de940e06f8733d87bbb857aef85d830053442cfe Author: Peter Harris Date: Thu Nov 14 14:06:21 2019 -0500 xkb: fix key type index check in _XkbSetMapChecks This code block was moved from a function that returns 0 for failure to a function that returns 0 for Success in commit 649293f6b634e6305b6737a841d6e9d0f0065d6c. Change the return value to BadValue to match the other checks in _XkbSetMapChecks. Set nTypes to xkb->map->num_types when XkbKeyTypesMask is not set, to allow requests with the XkbKeyTypesMask flag unset in stuff->present to succeed. Fixes a potential heap smash when client->swapped is true, because the remainder of the request will not be swapped after "return 0", but _XkbSetMap will be called anyway (because 0 is Success). Signed-off-by: Peter Harris commit 270e439739e023463e7e0719a4eede69d45f7a3f Author: Peter Harris Date: Thu Nov 14 14:00:31 2019 -0500 xkb: only swap once in XkbSetMap The server swaps part of the request in _XkbSetMapChecks instead of SProcXkbSetMap (presumably because walking the XkbSetMap request is hard, and we don't want to maintain another copy of that code). Swap the first time _XkbSetMapChecks is called, not the second time. Signed-off-by: Peter Harris commit d4faab8708779df265239b203ed5f020bff681bf Author: Hans de Goede Date: Mon Nov 4 15:01:18 2019 +0100 xwayland: Remove unnecessary xwl_window_is_toplevel() check from xwl_output_set_window_randr_emu_props() Since the recent fix to call xwl_output_set_window_randr_emu_props() from ensure_surface_for_window(), it is now only called on a toplevel window, so the is-toplevel check is not necessary for the xwl_output_set_window_randr_emu_props() case. This commit moves the check to xwl_output_set_randr_emu_prop_callback() so that we only do it when we are walking over all Windows of a client to update the property on a change of the emulated resolution. Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 148f428dfccf606b932a00d5a00af06e8dca8a7e Author: Hans de Goede Date: Mon Nov 4 14:32:29 2019 +0100 xwayland: Fix setting of _XWAYLAND_RANDR_EMU_MONITOR_RECTS prop on new windows For window-manager managed windows, xwl_realize_window is only called for the window-manager's decoration window and not for the actual client window on which we should set the _XWAYLAND_RANDR_EMU_MONITOR_RECTS prop. Usualy this is not a problem since we walk all client windows to update the property when the resolution is changed through a randr call. But for apps which first do the randr change and only then create their window this does not work, and our xwl_output_set_window_randr_emu_props call in xwl_realize_window is a no-op as that is only called for the wm decoration window and not for the actual client's window. This commit fixes this by making ensure_surface_for_window() call xwl_output_set_window_randr_emu_props on the first and only child of window-manager managed windows. Note this also removes the non-functional xwl_output_set_window_randr_emu_props call from xwl_realize_window, which was intended to do this, but does not work. This fixes apps using the ogre3d library always running at the monitors native resolution. Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 4cfc2677f5c82ca5db0919de549b9b077f1ba113 Author: Hans de Goede Date: Mon Nov 4 11:46:49 2019 +0100 xwayland: Call xwl_window_check_resolution_change_emulation() on newly created O-R windows Some clients, which use vidmode to change the resolution when going fullscreen, create an override-redirect window and never trigger the screen->ResizeWindow callback we rely on to do the xwl_window_check_resolution_change_emulation(). This causes us to not apply a viewport to them, causing the fullscreen window to not fill the entire monitor. This commit adds a call to xwl_window_check_resolution_change_emulation() at the end of ensure_surface_for_window() to fix this. Note that ensure_surface_for_window() exits early without creating an xwl_window for new windows which will not be backed by a wayland surface and which thus will not have an xwl_window. This fixes ClanLib-0.6.x and alleggl-4.4.x using apps not properly fullscreening. Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 88342353de45e64f408c38bb10cd1506ba0f159a Author: Hans de Goede Date: Mon Oct 7 14:27:49 2019 +0200 xwayland: Fix emulated modes not being removed when screen rotation is used The code building the mode-list does the following to deal with screen rotation: if (need_rotate || xwl_output->rotation & (RR_Rotate_0 | RR_Rotate_180)) { mode_width = xwl_output->width; mode_height = xwl_output->height; } else { mode_width = xwl_output->height; mode_height = xwl_output->width; } This means we need to do something similar in xwl_output_set_emulated_mode() to determine if the mode being set is the actual (not-emulated) output mode and we this should remove any emulated modes set by the client. All callers of xwl_output_set_emulated_mode always pass a mode pointer to a member of xwl_output->randr_output->modes, so we do not need to duplicate this code, instead we can simply check that the passed in mode is modes[0] which always is the actual output mode. Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 10df0437a2b142e61c4d84ffffa9592ac6846ef1 Author: Hans de Goede Date: Thu Jan 9 11:00:36 2020 +0100 xwayland: Also hook screen's MoveWindow method Not only hook the ResizeWindow method of the screen (which really is MoveAndResize) but also hook the MoveWindow method for checking if we need to setup a viewport for resolution change emulation. Our resolution change emulation check if the windows origin matches the monitors origin and the windows origin can also be changed by just a move without being resized. Also checking on a move becomes esp. important when we move to checking on changes to the top-level non-window-manager client (X11)Window instead of on changes to the xwl_window later on in this patch series. Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 4fc107460a349a1a46f0e5251e6fd2a31f4c0428 Author: Hans de Goede Date: Wed Jan 15 14:36:45 2020 +0100 xwayland: Also check resolution-change-emulation when the xwl_window itself moves The recent change to use the top-level non-window-manager Window drawable coordinates from xwl_window_check_resolution_change_emulation() in combination with only calling it on a resize when the top-level window is moved breaks things with mutter/gnome-shell. When fullscreening a X11 window, mutter moves its window-decoration Window wrapping the top-level Window to the monitor's origin coordinates (e.g. 0x0) last. This updates the top-level's drawable coordinates, but as the actual MoveWindow is called on the wrapper Window and not on the toplevel we do not call xwl_window_check_resolution_change_emulation() and we never enable the viewport. This commit fixes this by also calling xwl_window_check_resolution_change_emulation() if the Window being moved is an xwl_window itself. Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 6d98f840da6dfcf2a69e03a1b3fa0bf602ba1f27 Author: Roman Gilg Date: Fri Jan 3 17:55:28 2020 +0100 xwayland: Check emulation on client toplevel resize When a reparented window is resized directly check the emulation instead of doing this only when the window manager parent window is resized, what might never happen. For that to work we need to make sure that we compare the current size of the client toplevel when looking for an emulated mode. Changes by Hans de Goede: - Remove xwl_window x, y, width and height members as those are no longer used. - Add check for xwl_window_from_window() returning NULL. Signed-off-by: Roman Gilg Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 060f10062eb1761515b762b46cba56c7a53db72c Author: Roman Gilg Date: Wed Jan 15 10:07:58 2020 +0100 xwayland: Make window_get_none_wm_owner return a Window instead of a Client Make window_get_none_wm_owner return the first non-wm-window instead of the owner (client) of the first non-wm-window and rename it to window_get_client_toplevel to match its new behavior. This is a preparation patch for switching to using the drawable coordinates in xwl_window_should_enable_viewport() Changes by Hans de Goede: - Split this change out into a separate patch for easier reviewing - Rename window_get_none_wm_owner to window_get_client_toplevel to match its new behavior Signed-off-by: Roman Gilg Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit a69f7fbb54efc8ffad320c8afd23cb41fc9edc27 Author: Roman Gilg Date: Fri Jan 3 17:27:28 2020 +0100 xwayland: Recurse on finding the none-wm owner An X11 window manager might add a chain of parent windows when reparenting to a decoration window. That is for example the case for KWin, which reparents client windows to one decoration and another wrapper parent window. Account for that by a recursion into the tree. For now assume as before that all X11 window managers reparent with one child only for these parent windows. Changes by Hans de Goede: - Move the xwl_window_is_toplevel() from a later patch in this series here as it really belongs together with these changes - Drop no longer necessary xwl_window argument from window_get_none_wm_owner parameters Signed-off-by: Roman Gilg Reviewed-by: Hans de Goede Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 948e02872feb641a176b3af82b6ef1201c97bb16 Author: Roman Gilg Date: Fri Jan 3 17:12:14 2020 +0100 xwayland: Reuse viewport instead of recreating When a viewport is already created we can reuse this object instead of destroying it and getting a new one for updating the source rectangle and destination size. Signed-off-by: Roman Gilg Reviewed-by: Hans de Goede Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit ded89300c1dd541f59fe6e93c5c69d7fe7088244 Author: Hans de Goede Date: Mon Jan 27 11:08:00 2020 +0100 xwayland: Cache client-id for the window-manager client Instead of iterating over all clients which are listening for events on the root window and checking if the client we are dealing with is the one listening for SubstructureRedirectMask | ResizeRedirectMask events and thus is the window-manager, cache the client-id of the window-manager in xwl_screen and use that when checking if a client is the window-manager. Note that we cache and compare the client-id rather then the ClienPtr, this saves reading the ClientPtr from the global clients array when doing the comparison. Suggested-by: Olivier Fourdan Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 1e44861aba449eec81d69b1da3a6e6f88676e04f Author: Roman Gilg Date: Mon May 27 23:01:53 2019 +0200 present: Rename window_msc variable in present function The value is not the current msc of the window, but the target value the client sets independently of the window speicific msc offset. Make this clearer. Signed-off-by: Roman Gilg Reviewed-by: Michel Dänzer commit d3c1b223cec2b475c4f1661d7e5dc5238d08d8f6 Author: Roman Gilg Date: Mon May 27 22:58:49 2019 +0200 present: Move scmd-update-window-crtc function Move the code portion down. That way it is at a similar position as in the window mode file. Signed-off-by: Roman Gilg Reviewed-by: Michel Dänzer commit 8c2dcc5f800438d2b4545d21a515e013e6aac484 Author: Roman Gilg Date: Mon May 27 22:49:23 2019 +0200 present: Code cleanup of window to crtc timings update Make the code more readable by going through some logical abort conditions. Also make the function only about updating the crtc msc value and not about also returning the next target msc. Signed-off-by: Roman Gilg Reviewed-by: Michel Dänzer commit 4d89ba0058457d51f2e1a132c0b7fc8a3ec5c76d Author: Roman Gilg Date: Mon May 27 22:42:34 2019 +0200 present: Unfold and annotate the target-msc getter Unfold and extensively annotate the target-msc adjustment function, to make it easier to understand what's happening and why. Signed-off-by: Roman Gilg Reviewed-by: Michel Dänzer commit 99e55f1b955e2db442184756fcd8b95791fd71de Author: Roman Gilg Date: Mon May 27 22:32:22 2019 +0200 present: Adjust timings with value arguments We can use value arguments instead of pointers when adjusting the timings by returning the adjusted value. This improves the readability. Signed-off-by: Roman Gilg Reviewed-by: Michel Dänzer commit 4709d24f8e3ef5ee79085b77401eaacd7e1690c7 Author: Olivier Fourdan Date: Fri Feb 14 15:20:59 2020 +0100 xwayland: Add version command line option Xorg supports the '-version' command line option, add something similar to Xwayland. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/976 Signed-off-by: Olivier Fourdan Reviewed-by: Jonas Ådahl Reviewed-by: Michel Dänzer commit ee9f6e20de1408d572dc1eba33f3d2a8501d7da5 Author: Adam Jackson Date: Tue Aug 27 18:10:38 2019 -0400 meson: Add support for libunwind commit 42aaf37241fedfd6a0f72b255f2d45d6ea34d8c6 Author: Zoltán Böszörményi Date: Wed Feb 12 21:29:52 2020 +0000 Fix modesetting device matching through kmsdev device path xf86platformProbeDev didn't check the device path, fix it. This is a problem when trying to set up a non-PCI device via explicit xorg.conf.d configuration. An USB DisplayLink device, being non-PCI was always set up as a GPU device assigned to screen 0 instead of a regular framebuffer, potentially having its own dedicated screen, despite such configuration as below. Only the relevant parts of the configuration are quoted, it's part of a larger context with an Intel chip that has 3 outputs: * DP1 connected to an LCD panel, * VGA1 connected to an external monitor, * HDMI1 unconnected and having no user visible connector Section "ServerFlags" Option "AutoBindGPU" "false" EndSection ... Section "Device" Identifier "Intel2" Driver "intel" BusID "PCI:0:2:0" Screen 2 Option "Monitor-HDMI1" "HDMI1" Option "ZaphodHeads" "HDMI1" EndSection Section "Device" Identifier "UDL" Driver "modesetting" Option "kmsdev" "/dev/dri/card0" #BusID "usb:0:1.2:1.0" Option "Monitor-DVI-I-1" "DVI-I-1" Option "ShadowFB" "on" Option "DoubleShadow" "on" EndSection ... Section "Screen" Identifier "SCREEN2" Option "AutoServerLayout" "on" Device "UDL" GPUDevice "Intel2" Monitor "Monitor-DVI-I-1" SubSection "Display" Modes "1024x768" Depth 24 EndSubSection EndSection Section "ServerLayout" Identifier "LAYOUT" Option "AutoServerLayout" "on" Screen 0 "SCREEN" Screen 1 "SCREEN1" RightOf "SCREEN" Screen 2 "SCREEN2" RightOf "SCREEN1" EndSection On the particular machine I was trying to set up an UDL device, I found the following structure was being used to match the device to a platform device while I was debugging the issue: xf86_platform_devices[0] == Intel, /dev/dri/card1, primary platform device xf86_platform_devices[1] == UDL, /dev/dri/card0 devList[0] == "Intel0", ZaphodHeads: DP1 devList[1] == "Intel1", ZaphodHeads: VGA1 devList[2] == "UDL" devList[3] == "Intel2", ZaphodHeads: HDMI1 (intended GPU device to UDL) When xf86platformProbeDev() matched the UDL device, the BusID check failed in both cases of: * BusID "usb:0:1.2:1.0" was specified * Option "kmsdev" "/dev/dri/card0" was specified As a result, xf86platformProbeDev() went on to call probeSingleDevice() with xf86_platform_devices[0] and devList[2], resulting in the UDL device being set up as a GPU device assigned to the first screen instead of as a framebuffer on the third screen as the configuration specified. Checking Option "kmsdev" in code code may be a layering violation. But the modesetting driver is actually part of the Xorg sources instead of being an external driver, so he "kmsdev" path knowledge may be used here. Signed-off-by: Böszörményi Zoltán commit a542224ea28e2e8ccaf5e0df85bf6c603e97599a Author: Michel Dänzer Date: Fri Feb 7 12:15:07 2020 +0100 xwayland: Call glamor_block_handler from xwl_screen_post_damage In between the two phases introduced by the previous change. This makes sure all pending drawing to the new buffers is flushed before they're committed to the Wayland server. commit f88d9b1f779835302e02e255fcd45989db7f488d Author: Michel Dänzer Date: Fri Feb 7 12:06:39 2020 +0100 xwayland: Split up xwl_screen_post_damage into two phases The first phase sets the new surface properties for all damaged windows, then the second phase commits all surface updates. This is preparatory for the next change, there should be no observable change in behaviour (other than the order of Wayland protocol requests). Reviewed-by: Adam Jackson commit 7b33c2d3f31fe03f88cc26f08590f2baf1a6ef36 Author: Michel Dänzer Date: Thu Feb 6 18:45:19 2020 +0100 Revert "xwayland/glamor-gbm: Add xwl_glamor_gbm_post_damage hook" This reverts commit 9e85aa9c1fbf51ef00674e3a91aded4083a14a15. To be replaced with a better solution. Reviewed-by: Adam Jackson commit 1310346d6052c91910f526cbdcc81061fe6abd94 Author: Michel Dänzer Date: Mon Feb 10 18:48:05 2020 +0100 gitlab-ci: Add meson build job with glamor disabled To prevent breakage with glamor disabled from creeping in again. Reviewed-by: Adam Jackson commit 72ccd7f540a36185ecdb62324c68496fb57e65fe Author: Michel Dänzer Date: Mon Feb 10 18:44:11 2020 +0100 gitlab-ci: Drop "-build-and-test" job name suffix It's long and kind of redundant. Reviewed-by: Adam Jackson commit 49553049e871d03e9e26672843de8712d20f688a Author: Michel Dänzer Date: Mon Feb 10 18:57:42 2020 +0100 modesetting: Remove local variable only used with glamor enabled Resulted in a build failure with -Werror: ../hw/xfree86/drivers/modesetting/drmmode_display.c: In function ‘drmmode_crtc_set_mode’: ../hw/xfree86/drivers/modesetting/drmmode_display.c:759:15: error: unused variable ‘screen’ [-Werror=unused-variable] 759 | ScreenPtr screen = crtc->scrn->pScreen; | ^~~~~~ Fixes: c66c548eabf0 "modesetting: Call glamor_finish from drmmode_crtc_set_mode" Reviewed-by: Adam Jackson commit 0cb9fa7949d6c5398de220fbdbe1e262e943fcbb Author: Michel Dänzer Date: Mon Feb 10 18:41:44 2020 +0100 modesetting: Fix build with glamor disabled Fixes: cb1b1e184723 "modesetting: Indirect the glamor API through LoaderSymbol" Reviewed-by: Adam Jackson commit bfb36a5806196e257958907bfcdd71c24acc5d37 Author: Pekka Paalanen Date: Mon Feb 10 16:07:41 2020 +0100 randr: auto-bind of GPU is a config change When a GPU is auto-bound adding more outputs to a screen, that needs to count as a configuration change on that screen so that a WM listening for RRScreenChangeNotify gets notified and handles it as a hotplug. This is particularly for cases where the outputs are already connected. Otherwise nothing might happen. Issue #909 describes a real world case where plugging in a DisplayLink dock with a monitor already connected is sometimes left inactive by GNOME. That issue is a race, and requires adding a sleep(5); as the first thing in NewGPUDeviceRequest() to reproduce reliably. With the sleep, the monitor in the dock will never activate automatically. Add this fix over the sleep, and the issue is gone. This fix was originally developed on a branch replicating Ubuntu 19.04 patch set based on xserver 1.20.4. Testing on master branch was impossible due to xorg/xserver#910. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/909 Signed-off-by: Pekka Paalanen Reviewed-by: Michel Dänzer commit 3aa754c3637694a2a3083b8fd9fba0bc862b1a67 Author: David Seifert Date: Wed Feb 5 11:32:24 2020 +0100 Always use `-fno-common` in CI * This prevents issues from creeping back in at a later stage. commit 1cfdd1a96580733df3625bcea3384ffee3dc92df Author: Dave Airlie Date: Tue Feb 4 16:02:06 2020 +1000 modesetting: remove unnecessary error message, fix zaphod leases I introduced this error with the MST hotplug code, but it can trigger on zaphod setups, and is perfectly fine. There is no support for MST/hotplug on zaphod setups currently, so we can just skip over the dynamic connector handling here. However we shouldn't skip over the lease handling so move it into the codepath. Fixes: 9257b1252da9 ("modesetting: add dynamic connector hotplug support (MST) (v3)") Reviewed-by: Michel Dänzer Signed-off-by: Dave Airlie commit 9e85aa9c1fbf51ef00674e3a91aded4083a14a15 Author: Michel Dänzer Date: Thu Jan 30 12:29:03 2020 +0100 xwayland/glamor-gbm: Add xwl_glamor_gbm_post_damage hook It flushes any pending drawing to the kernel, to make sure it'll be visible to the Wayland server. Without this, it was possible for the Wayland server to process surface commits before Xwayland got around to flushing the corresponding drawing, which could result in stale or even completely random window contents being visible. v2: * Make EGL backend post_damage hook mandatory, don't check for NULL in xwl_glamor_post_damage. (Olivier Fourdan) Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/951 Reviewed-by: Olivier Fourdan commit 6a5e47c57d16de8b6a6a2636f3cbad1aebec32e2 Author: Michel Dänzer Date: Mon Jan 27 17:47:10 2020 +0100 xfree86/modes: Bail from xf86RotateRedisplay if pScreen->root is NULL Avoids a crash in xf86RotatePrepare -> DamageRegister during CreateScreenResources if rotation or another transform is configured for any connected RandR output in xorg.conf. The generic rotation/transform code generally can't work without the root window currently. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/969 Fixes: 094f42cdfe5d "xfree86/modes: Call xf86RotateRedisplay from xf86CrtcRotate" Acked-by: Olivier Fourdan Reviewed-by: Adam Jackson commit 578371616e09364318c9fb2371a693d438b31b29 Author: Daniel Llewellyn Date: Wed Jan 29 21:33:24 2020 +0000 os: Ignore dying client in ResetCurrentRequest You might as well, it's harmless. Better, some cleanup code (like DRI2 swap wait) needs to run both normally and at client exit, so it simplifies the callers to not need to check first. See 4308f5d3 for a similar example. Props: @ajax (Adam Jackson) Fixes: xorg/xserver#211 Signed-off-by: Daniel Llewellyn commit b6a5389e1789d63c6c61983b973b8559953afc88 Author: Michel Dänzer Date: Tue Jan 28 18:39:10 2020 +0100 gitlab-ci: Enable -Werror in the meson build job There are no warnings left, so let's prevent new ones from creeping back in. commit 794fd7e563ca9430a4a29a8e9f1923c07c23a480 Author: Michel Dänzer Date: Tue Jan 28 18:35:45 2020 +0100 tests/misc: Drop redundant screenInfo declaration GCC warned about it: ../test/misc.c:36:19: warning: redundant redeclaration of ‘screenInfo’ [-Wredundant-decls] 36 | extern ScreenInfo screenInfo; | ^~~~~~~~~~ In file included from ../test/misc.c:30: ../include/scrnintstr.h:688:29: note: previous declaration of ‘screenInfo’ was here 688 | extern _X_EXPORT ScreenInfo screenInfo; | ^~~~~~~~~~ commit 4287604425e7ff905036541829896d1ddf7c65d0 Author: Michel Dänzer Date: Tue Jan 28 18:31:13 2020 +0100 Xephyr: Cast "red" to char* for xcb_aux_parse_color xcb_aux_parse_color takes a non-const pointer, even though it doesn't modify the string or take ownership of its memory. Avoids the following warning from GCC: ../hw/kdrive/ephyr/hostx.c: In function ‘hostx_init’: ../hw/kdrive/ephyr/hostx.c:683:30: warning: passing argument 1 of ‘xcb_aux_parse_color’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 683 | if (!xcb_aux_parse_color("red", &red, &green, &blue)) { | ^~~~~ In file included from ../hw/kdrive/ephyr/hostx.c:50: /usr/include/xcb/xcb_aux.h:194:27: note: expected ‘char *’ but argument is of type ‘const char *’ 194 | xcb_aux_parse_color(char *color_name, | ~~~~~~^~~~~~~~~~ commit 65387391a551fff6fec808d48b9bf4b6181cb050 Author: Michel Dänzer Date: Tue Jan 28 18:22:45 2020 +0100 loader: strdup const string assigned to local variable name There's a free(name) at the end of the function. GCC warned about this: ../hw/xfree86/loader/loadmod.c: In function ‘LoadModule’: ../hw/xfree86/loader/loadmod.c:702:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 702 | m = name = "int10"; | ^ commit e1fa3beb2fe2519e69f859f0acdc68e5a770de27 Author: Adam Jackson Date: Tue Jan 28 13:26:41 2020 -0500 Revert "dri2: Don't make reference to noClientException" It's true that the value would always be -1, if it's not zero, but it's usually zero is the problem. As a result we return failure from otherwise successful indirect GLX paths, which isn't very nice of us. This reverts commit 7d33ab0f8c7958b205076f71e4b47c24aace77fd. Fixes: https://gitlab.freedesktop.org/xorg/xserver/issues/211 commit 435d41d5ffe5467f43225b59411ca9f9a05c10a6 Author: David Seifert Date: Fri Jan 24 12:49:44 2020 +0100 Fix building with `-fno-common` * GCC 10 will switch the default to `-fno-common`. https://gcc.gnu.org/PR85678 Bug: https://bugs.gentoo.org/705880 Signed-off-by: Matt Turner commit 83826075e59c0393c16d2a2482dc5c9f2fdf4564 Author: George Matsumura Date: Thu Dec 26 23:01:26 2019 +0000 Restrict 1x1 pixmap filling optimization to GXcopy This restricts an optimization whereby the filling of 1x1 pixmaps went around the driver-provided function to cases where the source color is meant to be directly copied to the destination, as opposed to other operations which should produce different destination values than just the foreground color. Signed-off-by: George Matsumura Reviewed-by: Michel Dänzer commit 0839b0523a01067cb9c9b53ebdd9ce4c00f0eb12 Author: E5ten Date: Wed Jan 15 17:36:06 2020 +0000 meson: add prefix to serverconfigdir fixes #853 commit a24a786fc8490fda08b15c3dab6fa6750f008ecb Author: Michel Dänzer Date: Tue Jan 14 09:23:34 2020 +0100 modesetting: Explicitly #include "mi.h" For the miClearDrawable prototype. Apparently it doesn't get pulled in for some build configurations, breaking the build. Reviewed-by: Kenneth Graunke commit 25ca99df38a2c28c25ab20a917e68442285f2353 Author: Kenneth Graunke Date: Mon Jan 13 23:34:49 2020 -0800 configure: Define GLAMOR_HAS_EGL_QUERY_DRIVER when available Commit 195c2ef8f9f07b9bdabc0f554a9033b7857b99c7 added this to the Meson build but neglected to add it to autotools. v2: Also update dix-config.h.in Fixes: 195c2ef8f ("glamor: Add a function to get the driver name via EGL_MESA_query_driver") Reviewed-by: Michel Dänzer [v1] Reviewed-by: Eric Engestrom [v1] Reviewed-by: Matt Turner commit 49456e0a37fac7bc9d1f01bc1519fb0d699956db Author: Fabrice Fontaine Date: Fri Dec 27 23:33:37 2019 +0100 hw/xfree86/common/xf86Init.c: fix build without glx Since commit d8ec33fe0542141aed1d9016d2ecaf52da944b4b, an include on glxvndabi.h has been added to hw/xfree86/common/xf86Init.c However, if glx is disabled through --disable-glx and GLX headers are not installed in the build's environment, build fails on: In file included from xf86Init.c:81: ../../../include/glxvndabi.h:64:10: fatal error: GL/glxproto.h: No such file or directory 64 | #include | ^~~~~~~~~~~~~~~ Fix this failure by removing this include which does not seem to be needed (an other option would have been to keep it under an ifdef GLXEXT block) Fixes: - http://autobuild.buildroot.org/results/de838a843f97673d1381a55fd4e9b07164693913 Signed-off-by: Fabrice Fontaine commit 26004df63c25061586a967f3586795a75280acc2 Author: Lubomir Rintel Date: Wed Dec 25 18:54:03 2019 +0100 glamor_egl: Reject OpenGL < 2.1 early on The Etnaviv driver on GC2000 reports desktop OpenGL 1.3 but also OpenGL ES 2.0. However, with the modesetting driver, GLES2 never gets a chance: [ 11233.393] Require OpenGL version 2.1 or later. [ 11233.393] (EE) modeset(0): Failed to initialize glamor at ScreenInit() time. [ 11233.393] (EE) Fatal server error: [ 11233.395] (EE) AddScreen/ScreenInit failed for driver 0 Let's reject old desktop GL early on, just like XWayland seems to do. This is perhaps a slightly bit more complicated that one would expect, since we need to call eglMakeCurrent() before we query the GL version. Signed-off-by: Lubomir Rintel commit 98bfee6a1b901a6f886d74dcc9fd3cbb68838375 Author: Michel Dänzer Date: Mon Dec 23 09:26:17 2019 +0100 xwayland: Include xwayland-window.h from xwayland-glamor-eglstream.c Fixes build failure. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/954 Fixes: 89e32d00f6e0 "xwayland: Move Xwayland windows to its own sources" Reviewed-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit e914fb16adcab8807a280450d5cdfff4bbdce96b Author: Michel Dänzer Date: Mon Dec 23 09:53:26 2019 +0100 gitlab-ci: Install libnvidia-egl-wayland-dev package In order to build-test the Xwayland eglstream code. Reviewed-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit a52122c7f2697361f53e82ac384ff3f4eba24c76 Author: Michel Dänzer Date: Mon Dec 23 09:32:07 2019 +0100 gitlab-ci: Use sorted lists of distro packages, one per line This will make it easier to review changes. Reviewed-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit 37a64ede3b545cda9edde65c65c02054d2da43cb Author: Michel Dänzer Date: Mon Dec 23 09:51:43 2019 +0100 gitlab-ci: Strip down docker image contents more Making the image significantly smaller. Reviewed-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit 23b72d8e4b624ffd81a35e3b62be2430051a6ffa Author: Michel Dänzer Date: Mon Dec 23 09:35:09 2019 +0100 gitlab-ci: Use -j4 instead of -j$(proc) The shared GitLab CI runners are configured for jobs making use of up to 4 CPU cores, attempting to use more may overload them. Reviewed-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit 9107a610deb130d0e4ddee92d6ca9a08a8e103f3 Author: Michel Dänzer Date: Mon Dec 23 10:41:32 2019 +0100 gitlab-ci: Use host-mapped directory for ccache Same as done in Mesa. Reviewed-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit 4226c6d0329df440551b7b91ae573a82c64a1ac9 Author: Aaron Plattner Date: Thu Dec 26 13:40:17 2019 -0800 modesetting: Check whether RandR was initialized before calling rrGetScrPriv Calling rrGetScrPriv when RandR isn't initialized causes an assertion failure that aborts the server: Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion `key->initialized' failed. Thread 1 "Xorg" received signal SIGABRT, Aborted. 0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6 (gdb) bt #0 0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff7892897 in abort () from /usr/lib/libc.so.6 #2 0x00007ffff7892767 in __assert_fail_base.cold () from /usr/lib/libc.so.6 #3 0x00007ffff78a1526 in __assert_fail () from /usr/lib/libc.so.6 #4 0x00007ffff7fb57c1 in dixGetPrivateAddr (privates=0x555555ab1b60, key=0x555555855720 ) at ../include/privates.h:121 #5 0x00007ffff7fb5822 in dixGetPrivate (privates=0x555555ab1b60, key=0x555555855720 ) at ../include/privates.h:136 #6 0x00007ffff7fb586a in dixLookupPrivate (privates=0x555555ab1b60, key=0x555555855720 ) at ../include/privates.h:166 #7 0x00007ffff7fb8445 in CreateScreenResources (pScreen=0x555555ab1790) at ../hw/xfree86/drivers/modesetting/driver.c:1335 #8 0x000055555576c5e4 in xf86CrtcCreateScreenResources (screen=0x555555ab1790) at ../hw/xfree86/modes/xf86Crtc.c:744 #9 0x00005555555d8bb6 in dix_main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/main.c:214 #10 0x00005555557a4f0b in main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/stubmain.c:34 This can happen, for example, if the server is configured with Xinerama and there is more than one X screen: Section "ServerLayout" Identifier "crash" Screen 0 "modesetting" Screen 1 "dummy" RightOf "modesetting" Option "Xinerama" EndSection Section "Device" Identifier "modesetting" Driver "modesetting" EndSection Section "Screen" Identifier "modesetting" Device "modesetting" EndSection Section "Device" Identifier "dummy" Driver "dummy" EndSection Section "Screen" Identifier "dummy" Device "dummy" EndSection The problem does not reproduce if there is only one X screen because of this code in xf86RandR12Init: #ifdef PANORAMIX /* XXX disable RandR when using Xinerama */ if (!noPanoramiXExtension) { if (xf86NumScreens == 1) noPanoramiXExtension = TRUE; else return TRUE; } #endif Fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv. This is similar to what the xf86-video-amdgpu driver does: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/blob/fd66f5c0bea2b7c22a47bfd5eb1f22d32d166d9c/src/amdgpu_kms.c#L388 Signed-off-by: Aaron Plattner Reviewed-by: Michel Dänzer commit b1ee4036bfd59dfd506ed8312b63edffc913b1c1 Author: Michel Dänzer Date: Mon Dec 23 10:06:25 2019 +0100 gitlab-ci: Mark jobs as interruptible Allowing redundant pipelines to be automatically cancelled. commit 1e9c63beddb3010bb1f6eb96679410ca0aca037e Author: Michel Dänzer Date: Mon Dec 23 10:03:20 2019 +0100 gitlab-ci: Turn .retry YAML anchor into .ci-run-policy template To match Mesa. commit 456dff1bf890459840718339279dcb84d36531eb Author: Alex Goins Date: Thu Dec 12 20:18:53 2019 -0600 modesetting: Fix msSharePixmapBacking Segfault Regression Commit cb1b1e184 modified msSharePixmapBacking() to derive modesettingPtr from the 'screen' argument. Unfortunately, the name of the argument is misleading -- the screen is the slave screen. If the master is modesetting, and the slave is not modesetting, it will segfault. To fix the problem, this change derives modesettingPtr from ppix->drawable.pScreen. This method is already used when calling ms->glamor.shareable_fd_from_pixmap() later in the function. To avoid future issues, this change also renames the 'screen' argument to 'slave'. Signed-off-by: Alex Goins Reviewed-by: Michel Dänzer commit 58155baeac494c95a45d99d44dd9307e8aedd2af Author: Olivier Fourdan Date: Wed Dec 18 15:00:11 2019 +0100 xwayland: Cleanup and remove `xwayland.h` Now that each source and header should be in order, we can safely cleaup the last remaining bits from the main `xwayland.h` which is not needed anymore and can be removed. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit c830bd847fa5b60db95dcbb54dde3868f2a31a9a Author: Olivier Fourdan Date: Wed Dec 18 10:33:16 2019 +0100 xwayland: Remove `MODIFIER_META` definition It's nowhere to be used. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 4c644fd792e642fc566f7b0b08bc000ecf641a50 Author: Olivier Fourdan Date: Wed Dec 18 14:13:34 2019 +0100 xwayland: Move Xwayland GLX declaration Move the Xwayland GLX declaration to its own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 808a0a038b945171e0c6e18093fe1b9daeafe26a Author: Olivier Fourdan Date: Wed Dec 18 11:18:22 2019 +0100 xwayland: Move Xwayland vidmode declaration Move the Xwayland vidmode declaration to its own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit e8ba8a94e120abf78886ca809f0bf01e7258367c Author: Olivier Fourdan Date: Wed Dec 18 10:56:34 2019 +0100 xwayland: Move Xwayland CVT declaration Move the Xwayland CVT declaration to its own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 0617c635fa3577965c5fa198ed4e57da8fee919d Author: Olivier Fourdan Date: Wed Dec 18 10:03:43 2019 +0100 xwayland: Separate Xwayland screen code Move Xwayland screen related code to a separate source file and header. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 211609a9387a5fb0df83ef6ddea59ef817ea2f59 Author: Olivier Fourdan Date: Wed Dec 18 10:45:17 2019 +0100 xwayland: Move Xwayland cursor declarations Move the Xwayland cursor declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit aaeeb10b74920110c36efe069a47722bda5063dd Author: Olivier Fourdan Date: Tue Dec 17 18:02:17 2019 +0100 xwayland: Move Xwayland output declarations Move the Xwayland output declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 091b24f13e3a9cf46f1c55ba0ba3f35e0bb41a59 Author: Olivier Fourdan Date: Tue Dec 17 17:40:21 2019 +0100 xwayland: Move Xwayland input declarations Move the Xwayland input declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit e23d2223d89ee9ae7977b028f2a6522707e921d6 Author: Olivier Fourdan Date: Tue Dec 17 17:18:11 2019 +0100 xwayland: Move Xwayland present declarations Move the Xwayland Present declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit d780bdc2fdaeb94b873a9b6dd05a3ab636840ce7 Author: Olivier Fourdan Date: Tue Dec 17 17:07:58 2019 +0100 xwayland: Separate Xwayland pixmap code Move Xwayland generic pixmap code to a separate source file and header. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 89e32d00f6e03fcdab267bfd9f0b0c5c2747d380 Author: Olivier Fourdan Date: Tue Dec 17 15:07:07 2019 +0100 xwayland: Move Xwayland windows to its own sources Over time, Xwayland main source file `xwayland.c` has grown in size which makes it look cluttered and harder to read. Move the code dealing with Xwayland window to its own source and header files. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 3a59650ba74e9d97473fa39269fdb74ad7e1cd43 Author: Olivier Fourdan Date: Mon Dec 16 17:23:30 2019 +0100 xwayland: Move GLAMOR declarations to their own header Currently, `xwayland.h` contains all the declarations, which is a bit awkward and hard to follow. Move the GLAMOR relevant declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 177c8a230232d114cdbe1650bd22a396d182f5f8 Author: Olivier Fourdan Date: Mon Dec 16 17:07:02 2019 +0100 xwayland: Move SHM declarations to their own header Currently, `xwayland.h` contains all the declarations, which is a bit awkward and hard to follow. Move the SHM relevant declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit c20e61fddc8c2b8838533f23f54c1c5acea3e05f Author: Olivier Fourdan Date: Tue Dec 17 08:48:51 2019 +0100 xwayland: Move Xwayland structures to their own header Currently, `xwayland.h` contains all the declarations, which is a bit awkward and hard to follow. Move the Xwayland structures declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 5bfca0038e92d61e58d4dc1a54748faef8273023 Author: Michel Dänzer Date: Wed Dec 18 18:18:50 2019 +0100 glamor: Only use dual blending with GLSL >= 1.30 It can't be used with older GLSL. Fixes a crash when attempting to anyway. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/97 Fixes: e7308b6c7756 "glamor: Add support for CA rendering in a single pass." Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 846e81ecb83f30b555ce71a32cd6965d7b9939a5 Author: Michel Dänzer Date: Tue Dec 17 18:39:17 2019 +0100 xwayland: Create duplicate TrueColor GLXFBConfigs for Composite Similar to what is done in Xorg. Not doing this prevented apps from using GLX with a Composite visual, e.g. Firefox WebRender or Chromium. v2: * Fix inverted direct_color test, fixes Chromium as well. * Drop Composite extension guards, since other Xwayland code calls compRedirectWindow/compUnredirectWindow unconditionally anyway. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/921 Fixes: 8469241592b94b "xwayland: Add EGL-backed GLX provider" Reviewed-by: Adam Jackson # v1 commit 02e7a497ceacef490921a8ae7115cd9f28a66dec Author: Michel Dänzer Date: Tue Dec 17 18:43:07 2019 +0100 xwayland: Fix duplicate "direct_color" comment to say "double_buffer" Fixes: 8469241592b94b "xwayland: Add EGL-backed GLX provider" Reviewed-by: Adam Jackson commit 9b31358c52e951883bf7c01c953a9da080542244 Author: Michel Dänzer Date: Wed Nov 27 18:56:05 2019 +0100 xwayland: Use frame callbacks for Present vblank events Instead of only the fallback timer. Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/854 v2: * Drop unused frame_callback member of struct xwl_present_window (Olivier Fourdan) Reviewed-by: Olivier Fourdan commit c5067feaeea115761f0a72f37407c6e5e943d1a1 Author: Michel Dänzer Date: Wed Nov 27 18:04:06 2019 +0100 xwayland: Use single frame callback for Present flips and normal updates Using a list of Present windows that need to be called back. This prepares for the following change, there should be no change in observed behaviour. v2: * Use xwl_window_create_frame_callback instead of making the frame_listener struct non-static (Olivier Fourdan) Reviewed-by: Olivier Fourdan commit f80eea0529b2cfb805a9c7d4994a4235451131e3 Author: Michel Dänzer Date: Fri Dec 13 18:26:35 2019 +0100 xwayland: Add xwl_window_create_frame_callback helper This will be used by the following changes. No functional change intended. Reviewed-by: Olivier Fourdan commit 46e5236bbe0ca90f1c2a480c54d3f729d4930dfb Author: Olivier Fourdan Date: Thu Dec 12 13:50:16 2019 +0100 xwayland: Take border width into account Damage coordinates are relative to the drawable, (0,0) being the top left corner inside the border. Therefore, when applying damages or accumulating damages between window buffers, we need to take the window border width into account as well, otherwise the updates might be only partial or misplaced. Related: https://gitlab.freedesktop.org/xorg/xserver/issues/951 Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 1cb886bc2a3e556b15779300350ec8867b4f907e Author: Olivier Fourdan Date: Fri Dec 13 11:10:03 2019 +0100 xwayland: Recycle window buffers when setting pixmap Right now, we would recycle the window buffers whenever the window the window is resized. This, however, is not sufficient to guarantee that the buffers are up to date, since changing the window border width for example would not trigger a `WindowResize` (the border being outside the window). Make sure we recycle the buffers on `SetWindowPixmap` to ensure that the buffers will be recycled whenever the pixmap size is changed. Related: https://gitlab.freedesktop.org/xorg/xserver/issues/951 Suggested-by: Michel Dänzer Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 71c3a97142265804d64f443bd1ddb68ac356f8a3 Author: dslater38 Date: Thu Dec 12 04:54:46 2019 +0000 XWin: Fix infinite loop in GetShift() GetShift(int mask) can be called with mask==0, causing it to go into an infinite loop. Note: GetShift(mask) will return 0 for a mask of both 0 and -1. The assumption is that if mask == 0, then the corresponding bits for which we're calculating the shift, are also 0. commit 0c729bb958375fbd8fb6811ff1ecc88bd9f80282 Author: Peter Hutterer Date: Thu Dec 12 09:23:47 2019 +1000 gitlab CI: update to the latest version of the ci-templates Primarily to fix the skopeo copy issue that causes pipelines to fail right now, see ci-templates commit 0a9bdd33a98f05af67. Signed-off-by: Peter Hutterer commit 2a2234ad1a0fe88400c1511fea67741e4ad09f7f Author: Michel Dänzer Date: Fri Nov 29 09:40:13 2019 +0100 xwayland: Do flush GPU work in xwl_present_flush The Present code sends the idle notification event to the client after xwl_present_flush returns. If we don't flush our GPU work here, the client may race to draw another frame to the same buffer, so we may end up copying (parts of) that new frame instead of the one we meant to. Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/835 Reviewed-by: Olivier Fourdan commit cd999f08c608458d6207110ed237c3a78441870b Author: Olivier Fourdan Date: Fri Oct 25 16:28:50 2019 +0200 xwayland: Use multiple window buffers Xwayland takes care of not attaching a new buffer if a frame callback is pending. Yet, the existing buffer (which was previously attached) may still be updated from the X11 side, causing unexpected visual glitches to the buffer. Add multiple buffering to the xwl_window and alternate between buffers, to leave the Wayland buffer untouched between frame callbacks and avoid stuttering or tearing issues. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/835 Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 1c6f875f52d74d2137161399e134c4888c4eadf2 Author: Olivier Fourdan Date: Wed Nov 6 11:49:33 2019 +0100 xwayland: Add multiple window buffering support Add a mechanism to create, recycle and destroy window buffers when needed. Typically, this adds a new `xwl_window_buffer` structure which represents a buffer for a given Xwayland window. Each Xwayland window has two different pools of buffers: - The available buffers pool: Those are buffers which where created previously and that have either not been submitted to the compositor or submitted and released. - The unavailable buffers pool: Those are typically the buffers which are being used by the compositor, awaiting a release. Initially, an Xwayland window starts with both pools empty. As soon as a new buffer is needed, it's either created (if there is none available) or picked from the pool of available buffers. Once submitted to the compositor, the buffer is moved to the pool of unavailable buffers. When the corresponding `wl_buffer` is released by the compositor, it is moved back to pool of available buffers again to be reused when needed. To avoid keeping too many buffers around doing nothing, a garbage collection of older, unused buffers also takes care of disposing the buffers being unused for some time. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 77658741869f6a01cec0bdf49827494fb0f06edf Author: Olivier Fourdan Date: Wed Oct 30 13:17:34 2019 +0100 xwayland: Add buffer release callback The API `wl_buffer_add_listener` is misleading in the sense that there can be only one `wl_buffer` release callback, and trying to add a new listener when once is already in place will lead to a protocol error. The Xwayland EGL backends may need to set up their own `wl_buffer` release listener, meaning that there is no way to our own `wl_buffer` release callback. To avoid the problem, add our own callback API to be notified when the `wl_buffer` associated with an `xwl_pixmap` is released, triggered from the different `xwl_pixmap` implementations. Also update the Present code to use the new buffer release callback API. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 8d4be7f6c4f7c673d7ec1a6bfdef944907a3916e Author: Kenneth Graunke Date: Thu Nov 21 23:03:50 2019 -0800 modesetting: Use EGL_MESA_query_driver to select DRI driver if possible New now ask Glamor to use EGL_MESA_query_driver to obtain the DRI driver name; if successful, we use that as the DRI driver name. Following the existing dri2.c logic, we also use the same name for the VDPAU driver, except for i965 (and now iris), where we switch to the "va_gl" fallback. This allows us to bypass the PCI ID lists in xserver and centralize the driver selection mechanism inside Mesa. The hope is that we no longer have to update these lists for any future hardware. commit 195c2ef8f9f07b9bdabc0f554a9033b7857b99c7 Author: Kenneth Graunke Date: Thu Nov 21 23:01:28 2019 -0800 glamor: Add a function to get the driver name via EGL_MESA_query_driver This maps to eglGetDisplayDriverName if EGL_MESA_query_render is supported, otherwise it returns NULL. commit 60003023fa5b301dd621da4797f8a93035ebeeca Author: Michel Dänzer Date: Fri Nov 22 18:32:38 2019 +0100 modesetting: Use glamor_clear_pixmap in drmmode_clear_pixmap Should be slightly more efficient. Reviewed-by: Adam Jackson commit 9ba13bac9dd076f166ff0d063fc144b904a40d12 Author: Michel Dänzer Date: Mon Nov 18 18:06:28 2019 +0100 modesetting: Clear new screen pixmap storage on RandR resize Fixes random garbage being visible intermittently. Reviewed-by: Adam Jackson commit 327df450ffcf5bda5b4254db0208d355860d1010 Author: Michel Dänzer Date: Fri Nov 22 17:51:22 2019 +0100 xfree86/modes: Call xf86RotateRedisplay from xf86CrtcRotate If a new rotate buffer was allocated. This makes sure the new buffer has valid transformed contents when it starts being displayed. Reviewed-by: Adam Jackson commit c66c548eabf06835cb0cb906598fb87c7bb30cf4 Author: Michel Dänzer Date: Fri Nov 22 17:58:12 2019 +0100 modesetting: Call glamor_finish from drmmode_crtc_set_mode This makes sure any pending drawing to a new scanout buffer will be visible from the start. This makes the finish call in drmmode_copy_fb superfluous, so remove it. Reviewed-by: Adam Jackson commit 06ef320e9bc1f1098df9cd5581f072528f28128e Author: Michel Dänzer Date: Fri Nov 22 18:05:04 2019 +0100 modesetting: Add glamor_finish() convenience macro This will simplify backporting the following fix to the 1.20 branch. Reviewed-by: Adam Jackson commit e6ab7f9f342f463092c45226f3294074351fdd5e Author: Matt Turner Date: Thu Nov 21 11:23:18 2019 -0500 xfree86: Test presence of isastream() isastream() was never more than a stub in glibc, and was removed in glibc-2.30 by commit a0a0dc83173c ("Remove obsolete, never-implemented XSI STREAMS declarations"). Bug: https://bugs.gentoo.org/700838 Reviewed-by: Julien Cristau Signed-off-by: Matt Turner commit ebf549db2d9341d99e0d0847b948dd798d98f7dc Author: Dor Askayo Date: Fri Nov 22 17:12:03 2019 +0100 glamor: make sure the correct FBO is cleared This also removes an unnecesary call to glDrawBuffer. Signed-off-by: Dor Askayo Fixes: 0e9a0c20 - "xwayland: clear pixmaps after creation in rootless mode" Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/933 Reviewed-by: Michel Dänzer commit cb1b1e184723fc4748b9a28736fa07fdc5c2990c Author: Adam Jackson Date: Mon Nov 18 16:46:44 2019 -0500 Revert "Revert "modesetting: Indirect the glamor API through LoaderSymbol"" Now that we've fixed LoaderSymbolFromModule this should work properly. This reverts commit 5c7c6d5cffa98e4749185af9211d7642b57673d8. Reviewed-by: Michel Dänzer commit ab61c16ef07fde6eb7110c63c344c54eb2a2d117 Author: Adam Jackson Date: Mon Nov 18 16:43:50 2019 -0500 loader: Make LoaderSymbolFromModule take a ModuleDescPtr The thing you get back from xf86LoadSubModule is a ModuleDescPtr, not a dlsym handle. We don't expose ModuleDescPtr to the drivers, so change LoaderSymbolFromModule to cast its void * argument to a ModuleDescPtr. Reviewed-by: Michel Dänzer commit 4308f5d3d1fbd0f5dce81e22c0c3f08c65a7c9d8 Author: Aaron Plattner Date: Tue Nov 19 10:08:51 2019 -0800 os: Don't crash in AttendClient if the client is gone If a client is in the process of being closed down, then its client->osPrivate pointer will be set to NULL by CloseDownConnection. This can cause a crash if freeing the client's resources results in a call to AttendClient. For example, if the client has a pending sync fence: Thread 1 "X" received signal SIGSEGV, Segmentation fault. AttendClient (client=0x5571c4aed9a0) at ../os/connection.c:942 (gdb) bt #0 AttendClient (client=0x5571c4aed9a0) at ../os/connection.c:942 #1 0x00005571c3dbb865 in SyncAwaitTriggerFired (pTrigger=) at ../Xext/sync.c:694 #2 0x00005571c3dd5749 in miSyncDestroyFence (pFence=0x5571c5063980) at ../miext/sync/misync.c:120 #3 0x00005571c3dbbc69 in FreeFence (obj=, id=) at ../Xext/sync.c:1909 #4 0x00005571c3d7a01d in doFreeResource (res=0x5571c506e3d0, skip=skip@entry=0) at ../dix/resource.c:880 #5 0x00005571c3d7b1dc in FreeClientResources (client=0x5571c4aed9a0) at ../dix/resource.c:1146 #6 FreeClientResources (client=0x5571c4aed9a0) at ../dix/resource.c:1109 #7 0x00005571c3d5525f in CloseDownClient (client=0x5571c4aed9a0) at ../dix/dispatch.c:3473 #8 0x00005571c3d55eeb in Dispatch () at ../dix/dispatch.c:492 #9 0x00005571c3d59e96 in dix_main (argc=3, argv=0x7ffe7854bc28, envp=) at ../dix/main.c:276 #10 0x00007fea4837cb6b in __libc_start_main (main=0x5571c3d1d060
, argc=3, argv=0x7ffe7854bc28, init=, fini=, rtld_fini=, stack_end=0x7ffe7854bc18) at ../csu/libc-start.c:308 #11 0x00005571c3d1d09a in _start () at ../Xext/sync.c:2378 (gdb) print client->osPrivate $1 = (void *) 0x0 Since the client is about to be freed, its ignore count doesn't matter and AttendClient can simply be a no-op. Check for client->clientGone in AttendClient and remove similar checks from two callers that had them. Signed-off-by: Aaron Plattner commit 66da95a172c4941b75ffedcdaa0138c0a48f11fb Author: Olivier Fourdan Date: Tue Nov 12 10:03:55 2019 +0100 xwayland: Do not discard frame callbacks on allow commits Currently, when a X11 client (usually the X11 window manager from a Wayland compositor) changes the value of the X11 property `_XWAYLAND_ALLOW_COMMITS` from `false` to `true`, all pending frame callbacks on the window are discarded so that the commit occurs immediately. Weston uses that mechanism to prevent the content of the window from showing before it's ready when mapping the window initially, but discarding the pending frame callbacks has no effect on the initial mapping of the X11 window since at that point there cannot be any frame callback on a surface which hasn't been committed yet anyway. However, discarding pending frame callbacks can be problematic if we were to use the same `_XWAYLAND_ALLOW_COMMITS` mechanism to prevent damages to be posted before the X11 toplevel is updated completely (including the window decorations from the X11 window manager). Remove the portion of code discarding the pending frame callback, Xwayland should always wait for a pending frame callback if there's one before posting new damages. Signed-off-by: Olivier Fourdan Reviewed-by: Pekka Paalanen Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/merge_requests/333 commit 4f984fc06bd57cabfa38f6191f10714878dc8969 Author: Olivier Fourdan Date: Mon Nov 18 17:28:45 2019 +0100 present/wnmd: Relax assertion on CRTC on abort_vblank() Currently, the function `present_wnmd_abort_vblank()` would fail if the given `crtc` is NULL. However, `xwl_present_get_crtc()` can return `NULL` under some circumstances, which would cause an unexpected termination of Xwayland in such a case, caused by the assertion failure being triggered. Remove the assertion, considering that the `crtc` isn't actually used in neither `present_wnmd_abort_vblank()` nor `xwl_present_abort_vblank()`. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/937 commit 5c7c6d5cffa98e4749185af9211d7642b57673d8 Author: Michel Dänzer Date: Fri Nov 15 11:32:38 2019 +0100 Revert "modesetting: Indirect the glamor API through LoaderSymbol" This reverts commit dd63f717fe8636315343f421f4f2ee299258f079. Caused a crash at least on some systems. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/934 commit dd63f717fe8636315343f421f4f2ee299258f079 Author: Adam Jackson Date: Tue Oct 8 13:11:09 2019 -0400 modesetting: Indirect the glamor API through LoaderSymbol Prerequisite for building all of xserver with -z now. Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692 commit 45f35a0c6666c5f35df482948e0c8e91167429ef Author: Adam Jackson Date: Tue Oct 8 12:52:28 2019 -0400 modesetting: Indirect the shadow API through LoaderSymbol Prerequisite for building all of xserver with -z now. Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692 commit 8760fab0a15805bdd12bb8f12bb1c665fde86cc2 Author: Adam Jackson Date: Tue Oct 8 13:29:22 2019 -0400 loader: Move LoaderSymbolFromModule() to public API Bare LoaderSymbol() isn't really a great API, this is more of a direct map to dlsym like you want. Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692 commit e5e9a8ca91d1c087edd8788a110251ad940dbc94 Author: Aaron Plattner Date: Wed Nov 6 10:45:43 2019 -0800 xfree86: Call ScreenInit for protocol screens before GPU screens During startup, the xfree86 DDX's InitOutput() calls PreInit for protocol screens first, and then GPU screens. On teardown, dix_main() calls CloseScreen in the reverse order: GPU screens first starting with the last one and then working backwards, and then protocol screens also in reverse order. InitOutput() calls ScreenInit in the wrong order: for GPU screens first and then for protocol screens. This causes a problem for drivers that have global state that is tied to the first screen that calls ScreenInit. Fix this by simply re-ordering the for loops to call PreInit for protocol screens first and then for GPU screens second. commit 562c7888be538c4d043ec1f374a9d9afa0b305a4 Author: Alex Goins Date: Tue Sep 17 18:36:35 2019 -0500 modesetting: Implement ms_covering_randr_crtc() for ms_present_get_crtc() ms_present_get_crtc() returns an RRCrtcPtr, but derives it from a xf86CrtcPtr found via ms_dri2_crtc_covering_drawable()=>ms_covering_crtc(). As a result, it depends on all associated DIX ScreenRecs having an xf86CrtcConfigPtr DDX private. Some DIX ScreenRecs don't have an xf86CrtcConfigPtr DDX private, but do have an rrScrPrivPtr DDX private. Given that we can derive all of the information we need from RandR, we can support these screens by avoiding the use of xf86Crtc. This change implements an RandR-based path for ms_present_get_crtc(), allowing drawables to successfully fall back to syncing to the primary output, even if the slave doesn't have an xf86CrtcConfigPtr DDX private. Without this change, if a slave doesn't have an xf86CrtcConfigPtr DDX private, drawables will fall back to 1 FPS if they overlap an output on that slave. Signed-off-by: Alex Goins commit 797e7a0ceb673fe2870c673e248835526a84d000 Author: Alex Goins Date: Tue Sep 17 18:03:34 2019 -0500 modesetting: Fix ms_covering_crtc() segfault with non-xf86Crtc slave DIX ScreenRecs don't necessarily have an xf86CrtcConfigPtr DDX private. ms_covering_crtc() assumes that they do, which can result in a segfault. Update ms_covering_crtc() to check the XF86_CRTC_CONFIG_PTR() returned pointer before dereferencing it. This will still mean that ms_covering_crtc() can't fall back to the primary output when a drawable overlaps a slave output (going to the 1 FPS default instead), but it won't segfault. Signed-off-by: Alex Goins commit 3ef9029ace4245d9f8929aa71e22bc6a6f40b7b3 Author: Alex Goins Date: Wed Aug 28 18:24:16 2019 -0500 modesetting: Fix ms_covering_crtc() segfault with non-modesetting slave primary ms_covering_crtc() uses RRFirstOutput() to determine a primary output to fall back to if a drawable is overlapping a slave output. If the primary output is a slave output, RRFirstOutput() will return a slave output even if passed a master ScreenPtr. ms_covering_crtc() dereferences the output's devPrivate, which is invalid for non-modesetting outputs, and can crash. Changing RRFirstOutput() could have unintended side effects for other callers, so this change replaces the call to RRFirstOutput() with ms_first_output(). ms_first_output() ignores the primary output if it doesn't match the given ScreenPtr, choosing the first connected output instead. Signed-off-by: Alex Goins commit c82f814313a813d7e1a2d7d3b1f7561810446b34 Author: Alex Goins Date: Wed Sep 4 12:25:31 2019 -0500 randr: Fix RRCrtcDetachScanoutPixmap() segfault during server teardown During server teardown, mrootdraw is NULL, which can cause segfaults if master->Stop{,Flipping}PixmapTracking() don't do NULL checking. In this case we shouldn't need to do master->Stop{,Flipping}PixmapTracking() anyway, so just skip it. Signed-off-by: Alex Goins commit fe439596b99db65bbae35eff1ea0b79db167f8d6 Author: Arthur Williams Date: Thu Oct 17 22:47:37 2019 -0700 include: Increase the number of max. input devices to 256. Extending the decade old f0124ed93, to increase the number of input devices from 40 to 256. 40 translates at most 9 MD, while 256 will allow 63 MD. It is an arbitrary number, but people are hitting the current limit under reasonable conditions. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64793 Signed-off-by: Arthur Williams commit eddad048e35cbf0968d0f892009a248359a15ecd Author: Olivier Fourdan Date: Wed Oct 30 15:33:39 2019 +0100 xwayland: Cosmetic, fix indentation For some reason, indentation for EGL backend hooks was broken. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 4a857b161ce1202c60ac464c8eb6de358fed5508 Author: Olivier Fourdan Date: Wed Oct 30 13:11:28 2019 +0100 xwayland/shm: Use `calloc()` Currently, Xwayland pixmap SHM code uses `malloc()` to allocate the xwl_pixmap. Use `calloc()` instead, as the EGLstream backend does, as it is safer (initializing the allocated data to 0). Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 0d4667b65a81047fe5d5af537d295c64cfa08d9c Author: Olivier Fourdan Date: Wed Oct 30 11:50:24 2019 +0100 xwayland/glamor-gbm: Use `calloc()` Currently, glamor GBM backend uses `malloc()` to allocate the xwl_pixmap. Use `calloc()` instead, as the EGLstream backend does, as it is safer (initializing the allocated data to 0). Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 2c5acdef3aab52d0a416aee3654a63328847f22e Author: Olivier Fourdan Date: Thu Oct 31 09:04:19 2019 +0100 xwayland/eglstream: Fix order of `calloc()` args The definition by the manual is `calloc(size_t nmemb, size_t size)`. Swap the arguments of calloc() calls to match the definition. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 0e9a0c203c2ae4eae12bdbb95428f398211c7bee Author: Dor Askayo Date: Thu Nov 7 12:25:42 2019 +0100 xwayland: clear pixmaps after creation in rootless mode When a pixmap is created with a backing FBO, the FBO should be cleared to avoid rendering uninitialized memory. This could happen when the pixmap is rendered without being filled in its entirety. One example is when a top-level window without a background is resized. The pixmap would be reallocated to prepare for more pixels, but uninitialized memory would be rendered in the resize offset until the client sends a frame that fills these additional pixels. Another example is when a new top-level window is created without a background. Uninitialized memory would be rendered after the pixmap is allocated and before the client sends its first frame. This issue is only apparent in OpenGL implementations that don't zero the VRAM of allocated buffers by default, such as RadeonSI. Signed-off-by: Dor Askayo Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/636 Reviewed-by: Michel Dänzer commit a506b4ecb6c54fd0388e628520eec75ea3bcb27c Author: Olivier Fourdan Date: Wed Nov 6 15:37:22 2019 +0100 xwayland: make context current to check GL version `glGetString(GL_VERSION)` will return NULL without a current context. Commit dabc7d8b (“xwayland: Fall back to GLES2 if we don't get at least GL 2.1 in glamor”) would check the context is created, but it is made current just after, so the call to `epoxy_gl_version()` would return 0, hence defeating the version check. Make the context current prior to call `epoxy_gl_version()`. Fixes: dabc7d8b - xwayland: Fall back to GLES2 if we don't get at least GL 2.1 in glamor Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/932 https://gitlab.freedesktop.org/xorg/xserver/merge_requests/324 Signed-off-by: Olivier Fourdan commit dabc7d8bf2d964460286168b52899c42b3369f8d Author: Adam Jackson Date: Wed Oct 30 11:20:40 2019 -0400 xwayland: Fall back to GLES2 if we don't get at least GL 2.1 in glamor Some particularly unfortunate hardware (Intel gen3, mostly) will give you GLES2 but not GL 2.1. Fall back to GLES2 for such cases so you still get accelerated GLX. commit 741bd73429e337071f49509ddcc5fb392e20b0f6 Author: Hans de Goede Date: Mon Nov 4 20:03:17 2019 +0100 glamor/xwayland: Define EGL_NO_X11 Define EGL_NO_X11 everywhere were we also define MESA_EGL_NO_X11_HEADERS, EGL_NO_X11 is the MESA_EGL_NO_X11_HEADERS equivalent for the egl headers shipped with libglvnd. This fixes the xserver not building with the libglvnd-1.2.0 headers: In file included from /usr/include/EGL/eglplatform.h:128, from /usr/include/epoxy/egl_generated.h:11, from /usr/include/epoxy/egl.h:46, from glamor_priv.h:43, from glamor_composite_glyphs.c:25: /usr/include/X11/Xlib.h:222:2: error: conflicting types for 'GC' 222 | *GC; | ^~ In file included from glamor.h:34, from glamor_priv.h:32, from glamor_composite_glyphs.c:25: ../include/gcstruct.h:282:3: note: previous declaration of 'GC' was here 282 | } GC; | ^~ Signed-off-by: Hans de Goede commit 622eea366aaf162479eaabd93c88fa04efe98bcc Author: Jon Turney Date: Sat Oct 26 17:12:26 2019 +0100 meson: Add sha1 library options v2: Set the define for xha1.c programatically, rather than using loads of conditionals. commit 417e4553f143820acc33998898bbd5c3d4567bcd Author: Adam Jackson Date: Wed Oct 9 12:07:00 2019 -0400 misprite: Stop wrapping GetImage/GetSpans SourceValidate handles this for us consistently now. Reviewed-by: Michel Dänzer commit 77f614eb331b0240c699f7aef13a8046c9c2c70a Author: Adam Jackson Date: Wed Oct 9 12:05:56 2019 -0400 composite: Stop wrapping GetImage/GetSpans SourceValidate handles this for us consistently now. Reviewed-by: Michel Dänzer commit 516e75dbb6bbf97c7af9c2226242ffd9259fec11 Author: Adam Jackson Date: Wed Oct 9 11:57:18 2019 -0400 dix: Call SourceValidate before GetImage This ensures that any prep work for the drawable we're about to read from is already done before we call down to GetImage. This should be no functional change as most of the callers with a non-trivial SourceValidate are already wrapping GetImage and doing the equivalent thing, but we'll be simplifying that shortly. More importantly this ensures that if any of that prep work would generate events - like automatic compositing flushing rendering to a parent pixmap which then triggers damage - then it happens entirely before we start writing the GetImage reply header. Note that we do not do the same for GetSpans, but that's okay. The only way to get to GetSpans is through miCopyArea or miCopyPlane - where the callers must already call SourceValidate - or miGetImage - which this commit now protects with SourceValidate. Fixes: xorg/xserver#902 Reviewed-by: Michel Dänzer commit ff310903f34ac34c916ad74e919d1ac12aea4715 Author: Adam Jackson Date: Wed Oct 9 11:27:12 2019 -0400 mi: Add a default no-op miSourceValidate Slightly simplifies the callers since they don't need to check for non-NULL anymore. I do extremely hate the workarounds here to suppress misprite taking the cursor down though. Surely there's a better way. Reviewed-by: Michel Dänzer commit 89a9927b1e5ac416441a33b44abddf8372edfe6a Author: Adam Jackson Date: Wed Oct 16 14:44:49 2019 -0400 include: Remove now-empty site.h commit ff4e2c24ec599ecdbd24eb181afb50f896beb46d Author: Adam Jackson Date: Wed Oct 16 14:43:36 2019 -0400 dix: Move default screensaver defaults into globals.c commit 43fc5307804edc9a09e7ad8794a02b5e18c4f9db Author: Adam Jackson Date: Wed Oct 16 14:41:20 2019 -0400 include: Move some input-related default #defines to input.h commit 2d1ed64d2aedb1af5476ba011bbd36ddcf00c311 Author: Adam Jackson Date: Wed Oct 16 14:33:43 2019 -0400 dix: Remove -to option to set the default connection timeout One minute is admittedly arbitrary, but again, pretty sure this never gets set on the command line in practice. commit 46a275522f8692b8fc20043ec7a5e74d43448f0b Author: Adam Jackson Date: Wed Oct 16 14:30:18 2019 -0400 xdmcp: Remove unconfigurable COMPILEDDISPLAYCLASS commit 66eb933ec91724a351b7368cf7171adb108299fb Author: Adam Jackson Date: Wed Oct 16 14:28:33 2019 -0400 os: Remove unconfigurable DEFAULT_ACCESS_CONTROL macro commit 56ea4c769c2d65df2de86009e8e499f39a8a3d4d Author: Adam Jackson Date: Wed Oct 16 14:21:06 2019 -0400 dix: Remove -fn and -fc options to set default text/cursor fonts I strongly suspect these never get used in the wild, and it's not an especially useful thing to do in any case. commit 4ebce1ed8b63decb0919146a034f0c80ac47c3cd Author: Adam Jackson Date: Wed Oct 16 13:56:34 2019 -0400 os: Move log verbosity defaults into os/log.c There's not any configuration knobs for this so there's no real reason to leave them in a configgy header. commit e21371984def00b0e0b5cfc976bfd1756a2905d4 Author: Adam Jackson Date: Wed Oct 16 13:52:54 2019 -0400 include: Remove unused default value for COMPILEDDEFAULTFONTPATH Again, we're setting this at configure time now. commit f58fee67b1730798a57629da2f496c9fa594d143 Author: Adam Jackson Date: Wed Oct 16 13:51:41 2019 -0400 include: Remove unused default value for VENDOR_RELEASE We're always setting this in the appropriate blah-config.h now. commit 4b936ebcaaa80cc1dc1a51f110c7ecd77b06950e Author: Adam Jackson Date: Wed Oct 16 13:51:11 2019 -0400 include: Remove unused VENDOR_STRING commit ec659f021e62338018ac09ea61c3f4baa4fdf6e2 Author: Adam Jackson Date: Wed Oct 16 13:49:13 2019 -0400 dix: Remove now-unused SetVendorString commit fc671085ee52c6599005e2359930bebe6195ca83 Author: Adam Jackson Date: Wed Oct 16 13:42:15 2019 -0400 dmx: Stop overriding the vendor string commit 0e4bd71d02d09c320e76280ae8f14df169387507 Author: Ville Syrjälä Date: Tue Sep 3 16:44:56 2019 +0300 modesetting: Fix possible_crtcs Populate outout possible_crtcs as the union of possible_crtcs from the encoders rather than the intersection. Otherwise we're easily left with possible_crtcs==0 when all the possible encoders have non-overlapping possible_crtcs. No idea what the magic 0x7f is about, but keep it around in case it matters. Signed-off-by: Ville Syrjälä commit 334f1107146a2e6ebf6f7743b77aec2ad5c46f75 Author: Alexander Tsoy Date: Mon Sep 23 18:23:40 2019 +0300 configure: Set libdrm flags correctly if only XORG is enabled This fixes modesetting driver build failure which can be triggered with the following configure options: $ ./configure --disable-dri --disable-dri2 --disable-dri3 --disable-config-udev --enable-xorg Bugzilla: https://bugs.gentoo.org/689768 Signed-off-by: Alexander Tsoy Reviewed-by: Emil Velikov commit a1e3dfa50a9a9a41c93c12f19f40d97c56ddf850 Author: Jon Turney Date: Sat Oct 26 18:43:01 2019 +0100 xquartz: Remove trailing quote to fix build Fix xquartz build after typo in 3c78d637 ("global: Remove BUILD_DATE and BUILD_TIME") commit 0cf15714e1253f4ef61bb5e1f825b318a48b3cac Author: Keith Packard Date: Thu May 16 12:24:01 2019 -0700 modesetting: typo in drmmode_display.c -- ',' instead of ';' at end of line This seems like a simple typo to me; thanks to C it isn't caught by the compiler. Signed-off-by: Keith Packard commit 427f8bc00981703abe3153b6da575faa69fe2748 Author: Robert Mader Date: Wed Oct 16 19:14:06 2019 +0200 xserver: Fix a typo If `need_rotate` is TRUE, we should check for the right rotate. commit 55482c1caf4dbe7f4735b75366bd4acd81937fc1 Author: Adam Jackson Date: Tue Oct 15 13:40:01 2019 -0400 render: Fix undefined shift in xRenderColorToCard32 Delightfully this is undefined even though CARD16 is an "unsigned" type, because it's an unsigned short, which C promotes to signed int because everything is stupid. commit 592525386ad81cf9c8816f42f01a5bea01034e98 Author: Adam Jackson Date: Tue Oct 15 13:32:36 2019 -0400 dix: Fix undefined memset in _dixInitScreenPrivates Again, memset(0, ...) is undefined. commit f44ac101c523a0439bd1a864850e3c1a4e154549 Author: Adam Jackson Date: Tue Oct 15 13:21:37 2019 -0400 record: Fix undefined memcpy in RecordAClientStateChange If we don't have any recording contexts just skip all this. Note this also skips a pointless trip through malloc(0)/free. commit 9155e0c7c6696ec8c657e32bf41a08f88a8f3d0d Author: Adam Jackson Date: Tue Oct 15 13:16:17 2019 -0400 mi: Fix undefined memcpy in mieqGrowQueue The first time we get here, eventQueue->events is NULL. commit 6fe7c43fa52ffa9b91887ea7f8044e54b12637c9 Author: Adam Jackson Date: Tue Oct 15 13:10:35 2019 -0400 dix: Fix undefined shift in ht_generic_hash The hits keep coming. commit 1e5f478b7e1183d38ad07d1f5e68fdc9680f2eb8 Author: Adam Jackson Date: Tue Oct 15 13:08:57 2019 -0400 dix: Fix undefined shift in HashResourceID Again, we need all of the bits of an unsigned int to make this work. commit 3671a3ee88dac3cf1a301adf27dc2b43b069815b Author: Adam Jackson Date: Tue Oct 15 13:01:27 2019 -0400 mi: Fix undefined shift in miSetVisualTypesAndMasks The masks we end up building will occupy all 32 bits of an unsigned int, which means we had better build the shifts out of unsigned ints, because left-shifting a signed int all the way into the sign bit is undefined. commit a41d45eedc0c217c28def47acbd8759e31706b96 Author: Adam Jackson Date: Tue Oct 15 11:59:39 2019 -0400 dix: Fix undefined memset in dixInitPrivates When we set these up initially, no subsystems have allocated any privates yet, so the storage address will be null, and memset(NULL, ...) is undefined. commit 535f14656a2a42f0cca13a4264e8111300e5806d Author: Michel Dänzer Date: Mon Oct 14 12:48:24 2019 +0200 Revert https://gitlab.freedesktop.org/xorg/xserver/merge_requests/235 Caused assertion failures / crashes with Xorg. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/916 commit 5315f988d9f175e4850f4259f691a68d95ce7ac2 Author: Hans de Goede Date: Mon Sep 2 17:32:45 2019 +0200 xwayland: Set _XWAYLAND_RANDR_EMU_MONITOR_RECTS property for resolution emulation Apps using randr to change the resolution when going fullscreen, in combination with _NET_WM_STATE_FULLSCREEN to tell the window-manager (WM) to make their window fullscreen, expect the WM to give the fullscreen window the size of the emulated resolution as would happen when run under Xorg (*). We need the WM to emulate this behavior for these apps to work correctly, with Xwaylands resolution change emulation. For the WM to emulate this, it needs to know about the emulated resolution for the Windows owning client for each monitor. This commit adds a _XWAYLAND_RANDR_EMU_MONITOR_RECTS property, which contains 4 Cardinals (32 bit integers) per monitor with resolution emulation info. Window-managers can use this to get the emulated resolution for the client and size the window correctly. *) Since under Xorg the resolution will actually be changed and after that going fullscreen through NET_WM_STATE_FULLSCREEN will size the window to be equal to the new resolution. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 0c305dbff8a44f3fa3d6aefd372a967029a7a527 Author: Hans de Goede Date: Mon Aug 26 12:26:34 2019 +0200 xwayland: xwl_window_should_enable_viewport: Add extra test Games based on the allegro gaming library or on ClanLib-1.0 do not size their window to match the fullscreen resolution, instead they use a window covering the entire screen, drawing only the fullscreen resolution part of it. This commit adds a check for these games, so that we correctly apply a viewport to them making fullscreen work properly for these games under Xwayland. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 38de6260816674b5430144cc38a8a27d93d1bf19 Author: Hans de Goede Date: Tue Jul 9 09:31:13 2019 +0200 xwayland: Add vidmode mode changing emulation support Add support for fake mode changes using viewport, for apps which want to change the resolution when going fullscreen. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit bcad1b813a04b9f3ff225f57a4baad09bd6315b9 Author: Hans de Goede Date: Mon Jul 8 18:35:27 2019 +0200 xwayland: Add xwlVidModeGetCurrentRRMode helper to the vidmode code crtc->mode reflects the mode set through the xrandr extension, once we add support for also changing the mode through the vidmode extension this will no longer correctly reflect the emulated resolution. Add a new xwlVidModeGetCurrentRRMode helper which determines the mode by looking at the emulated_mode instead. Likewise add a xwlVidModeGetRRMode helper and use that in xwlVidModeCheckModeForMonitor/xwlVidModeCheckModeForDriver to allow any mode listed in the randr_output's mode list. This is a preparation patch for adding emulated mode/resolution change support to Xwayland's XF86 vidmode extension emulation. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 43c80078126f6f33c6ab7d3cf4668733bde03366 Author: Hans de Goede Date: Mon Jul 8 14:00:27 2019 +0200 xwayland: Add xwlRRModeToDisplayMode() helper function This is a preparation patch for adding emulated mode/resolution change support to Xwayland's XF86 vidmode extension emulation, using the Wayland viewport extension. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit d99b9ff0f237d15e7eb507484493c73b393d5dba Author: Hans de Goede Date: Tue Jul 2 11:55:26 2019 +0200 xwayland: Add support for randr-resolution change emulation using viewport Add support for per client randr-resolution change emulation using viewport, for apps which want to change the resolution when going fullscreen. Partly based on earlier work on this by Robert Mader Note SDL2 and SFML do not restore randr resolution when going from fullscreen -> windowed, I believe this is caused by us still reporting the desktop resolution when they query the resolution. This is not a problem because when windowed the toplevel window size includes the window-decorations so it never matches the emulated resolution. One exception would be the window being resizable in Windowed mode and the user resizing the window so that including decorations it matches the emulated resolution *and* the window being at pos 0x0. But this is an extreme corner case. Still I will submit patches upstream to SDL2 and SFML to always restore the desktop resolution under Xwayland, disabling resolution emulation all together when going windowed. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit aca0a588eb40a5e6669094a2ab7f71ca0ba06b16 Author: Hans de Goede Date: Thu Aug 29 23:04:36 2019 +0200 xwayland: Add support for storing per client per output emulated resolution Add support for storing per output randr/vidmode emulated resolution into the per client data. Since we do not have a free/delete callback for the client this uses a simple static array. The entries are tied to a specific output by the server_output_id, with a server_output_id of 0 indicating a free slot (0 is the "None" Wayland object id). Note that even if we were to store this in a linked list, we would still need the server_output_id as this is *per client* *per output*. This is a preparation patch for adding randr/vidmode resolution change emulation. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 905cb8b9e27add5f49a45fe167a0005bf05218bc Author: Hans de Goede Date: Thu Aug 29 22:45:12 2019 +0200 xwayland: Add per client private data Add per client private data, which for now is empty. This is a preparation patch for adding randr/vidmode resolution change emulation. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit e89872f51aa834fa9d94a4ca4822f03b0341ab4f Author: Robert Mader Date: Mon Jan 22 17:57:38 2018 +0100 xwayland: Use RandR 1.2 interface (rev 2) This adds the RandR 1.2 interface to xwayland and allows modes advertised by the compositor to be set in an undistructive manner. With this patch, applications that try to set the resolution will usually succeed and work while other apps using the same xwayland instance are not affected at all. The RandR 1.2 interface will be needed to implement fake-mode-setting and already makes applications work much cleaner and predictive when a mode was set. [hdegoede@redhat.com: Make crtc_set only succeed if the mode matches the desktop resolution] Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 0d656d796071fb637e4969ea800855fe5d1c9728 Author: Hans de Goede Date: Wed Jun 26 16:46:54 2019 +0200 xwayland: Add fake output modes to xrandr output mode lists This is a preparation patch for adding support for apps which want to change the resolution when they go fullscreen because they are hardcoded to render at a specific resolution, e.g. 640x480. Follow up patches will fake the mode-switch these apps want by using WPviewport to scale there pixmap to cover the entire output. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 7c6f17790d3aedb164481264b0f05a8a14103731 Author: Robert Mader Date: Tue Jul 2 12:03:12 2019 +0200 xwayland: Use buffer_damage instead of surface damage if available When a viewport is set, damage will only work properly when using wl_surface_damage_buffer instead of wl_surface_damage. When no viewport is set, there should be no difference between surface and buffer damage. This is a preparation patch for using viewport to add support for fake mode-changes through xrandr for apps which want to change the resolution when going fullscreen. Changes by Hans de Goede : -Split the damage changes out into their own patch -Add xwl_surface_damage helper -Also use buffer_damage / the new helper for the present and cursor code Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 47bba4625339592d08b375bcd8e51029c0000850 Author: Robert Mader Date: Mon Jan 22 22:02:32 2018 +0100 xwayland: Add wp_viewport wayland extension support This commit adds support for the wayland wp_viewport extension, note nothing uses this yet. This is a preparation patch for adding support for fake mode-changes through xrandr for apps which want to change the resolution when going fullscreen. [hdegoede@redhat.com: Split the code for the extension out into its own patch] Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 834a467af978ac7a24ed17b8c8e58b6cddb4faf9 Author: Hans de Goede Date: Thu Aug 29 14:18:28 2019 +0200 dix: Add GetCurrentClient helper Request-handlers as registered in the requestVector array, always get passed the clientPtr for the client which sent the request. But the implementation of many request-handlers typically consists of a generic handler calling implementation specific callbacks and / or various helpers often multiple levels deep and in many cases the clientPtr does not get passed to the callbacks / helpers. This means that in some places where we would like to have access to the current-client, we cannot easily access it and fixing this would require a lot of work and often would involve ABI breakage. This commit adds a GetCurrentClient helper which can be used as a shortcut to get access to the clienPtr for the currently being processed request without needing a lot of refactoring and ABI breakage. Note using this new GetCurrentClient helper is only safe for code which only runs from the main thread, this new variable MUST NOT be used by code which runs from signal handlers or from the input-thread. The specific use-case which resulted in the creation of this patch is adding support for emulation of randr / vidmode resolution changes to Xwayland. This emulation will not actually change the monitor resolution instead it will scale any window with a size which exactly matches the requested resolution to fill the entire monitor. The main use-case for this is games which are hard-coded to render at a specific resolution and have sofar relied on randr / vidmode to change the monitor resolution when going fullscreen. To make this emulation as robust as possible (e.g. avoid accidentally scaling windows from other apps) we want to make the emulated resolution a per client state. But e.g. the RRSetCrtc function does not take a client pointer; and is a (used) part of the Xorg server ABI (note the problem is not just limited to RRSetCrtc). Reviewed-by: Olivier Fourdan Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit b2a0d6065d86b8bf409ffae41180662560c42ce7 Author: Emil Velikov Date: Fri Jul 12 14:45:16 2019 +0100 vfb: add DRI3/glamor support This commit adds DRI3/glamor support, effectively translating into hardware GPU support. Theoretically it should be possible to use DRM/GPU drivers such as virtio or vgem, although only the intel i915 driver is currently tested. Since Xvfb does no modeset, it opens the render node. Currently that is fixed to "/dev/dri/renderD128" and will be tweaked with future commits. Specific use-cases are left for the reader - testing glamor, GL driver or others. v2: Drop GLAMOR_NO_XV, use GLAMOR_FOR_XORG instead (Michel Dänzer) v3: Fix build w/o glamor v4: - Split out glamor dependency patch for meson (Pekka) - Enhance commit message (Pekka) - Use O_CLOEXEC with open() (Pekka) - Enhance error path, memory leak comments (Pekka) Signed-off-by: Emil Velikov commit 9e574a5bd828e813ff31bdd5cbec52539534a958 Author: Emil Velikov Date: Mon Sep 23 16:23:02 2019 +0100 meson: glamor depends on gbm and epoxy mark as such Currently glamor depends on epoxy and gbm, even the autotools build enforces that. Follow suite and do the same for the meson build. v1: Split out from larger patch (Pekka) Signed-off-by: Emil Velikov commit 86c8458f3d09d2c4fb68de7e6ab515739e8f8b3c Author: Emil Velikov Date: Fri Jul 12 11:34:44 2019 +0100 vfb: clarify code flow in vfbScreenInit v2: Enhance commit message (Pekka) Signed-off-by: Emil Velikov commit 744c419cb4eaed4006b5f0f319b72d7ffa9fbc6d Author: Emil Velikov Date: Fri Jul 19 10:53:19 2019 +0100 glamor: check for non NULL pixmap at close_screen DDX such as Xorg, Xwayland & Xephyr do not destroy the pixmap before they call into CloseScreen. At the same time Xvfb (support for glamor coming with later commit) do. As such the pixmap will be NULL and we'll crash out. Signed-off-by: Emil Velikov commit 7667180fb9dbd606e40c000aefc807371d2fb478 Author: Emil Velikov Date: Fri Jul 19 10:53:19 2019 +0100 glamor_egl: check for non NULL pixmap at egl_close_screen DDX such as Xorg, Xwayland & Xephyr do not destroy the pixmap before they call into CloseScreen. At the same time Xvfb (support for glamor coming with later commit) do. As such the pixmap will be NULL and we'll crash out. Signed-off-by: Emil Velikov commit 15354fb68f09eecceec5747a58cd16e6ce9236ca Author: Emil Velikov Date: Fri Jul 19 15:57:52 2019 +0100 glamor_egl: override the CloseScreen/DestroyPixmap earlier Currently we wrap the EGL CloseScreen/DestroyPixmap callbacks after the glamor ones. Thus upon teardown, we'll end calling things in the wrong order. Signed-off-by: Emil Velikov commit 89597eeba6e7a3418caa375f19f8dd303219881c Author: Emil Velikov Date: Thu Jul 18 14:04:33 2019 +0100 glamor_egl: remove unneeded xf86 includes/GLAMOR_FOR_XORG As of last commit, all of glamor_egl ix xf86 agnostic, so adjust the includes and drop the GLAMOR_FOR_XORG instances. Note the macro is still used for glamor_xv_init() which pulls xf86. v2: Drop GLAMOR_FOR_XORG guards (Michel Dänzer) Signed-off-by: Emil Velikov commit f3ab3d0c6123c8e7ddd3be6142f721590d153848 Author: Emil Velikov Date: Thu Jul 18 13:57:02 2019 +0100 glamor_egl: disable modifiers via glamor_init() Currently we parse through xf86Info.debug to check if we the modifiers should be disabled. Handle that within DDX and pass GLAMOR_NO_MODIFIERS into the glamor_init() flags. This allows individual DDX control over the setting - say when modifiers are woking OK with one implementation and not the other. Most importantly, this removes the final xf86 piece from the codebase. Signed-off-by: Emil Velikov commit 4018811838c344ee92d10e60789853e4ba512612 Author: Emil Velikov Date: Wed Jul 17 16:07:43 2019 +0100 glamor_egl: don't use ScrnInfoRec::privates Move from the xf86 specific ScrnInfoRec::privates, to the dix private handling. Since there's no FreeScreen function in ScreenPtr, fold the former within the existing CloseScreen. Users, such as modesetting are updated, and out of tree drivers will need equivalent, yet trivial, patch. Note: we need to ensure that the screen private is unset and the screen callbacks are restored in our CloseScreen function. Signed-off-by: Emil Velikov commit 1b5183b26d9977d46f6624126a2b2b6d77a74659 Author: Emil Velikov Date: Thu Jul 18 15:58:13 2019 +0100 glamor_egl: move glamor_egl_cleanup() further up We'll use the function within glamor_egl_close_screen() with next patch. Signed-off-by: Emil Velikov commit 6a557167366b8b1352709397df50649d5665b755 Author: Emil Velikov Date: Tue Jul 16 17:50:13 2019 +0100 glamor/egl: remove unused function pointers The following two members of glamor_egl_screen_private has been unused for a little while now. CreateScreenResources CloseScreen Signed-off-by: Emil Velikov commit 52a2a052aa3ab92b07c185c1fc2bf4ee2d727f4d Author: Emil Velikov Date: Fri Jul 12 17:47:27 2019 +0100 glamor_egl: use LogMessage over xf86DrvMsg Much of glamor already use LogMessage() so we might as well be consistent. This effectively paves the way of making glamor-egl xf86 agnostic. Signed-off-by: Emil Velikov commit 3340ddf37743fdf197dfc16a97107435ff53c6e4 Author: Adam Jackson Date: Wed Oct 9 16:03:17 2019 -0400 meson: Apparently 1.2 is < 1.2.0 Siiiigh. commit c7486613b0dc586f93f6ba293d9b55c69995b05c Author: Adam Jackson Date: Wed Oct 9 15:17:47 2019 -0400 meson: Fix another reference to "gl" 9.2.0 Previous commit e6ef2b12 missed a spot. commit e6ef2b12404dfec7f23592a3524d2a63d9d25802 Author: Marvin Schmidt Date: Tue Sep 24 09:58:43 2019 +0200 build: glx: Lower gl version to work with libglvnd When using mesa with libglvnd support, mesa will no longer install the gl, glx, egl pkg-config files but instead let libglvnd provide them. libglvnd maintainers decided to change the versioning as it was mesa-specific previously. Now the libraries have versions of the API they expose[1]. This causes problems when building the X server: checking for glproto >= 1.4.17 gl >= 9.2.0... no configure: error: Package requirements (glproto >= 1.4.17 gl >= 9.2.0) were not met: Requested 'gl >= 9.2.0' but version of gl is 1.2 Lower the version requirement to 1.2 to allow building against libglvnd provided libraries [1] https://github.com/NVIDIA/libglvnd/commit/0dfaea2bcb7cdcc785f95e244223bd004a2d7fba commit afd80cfcd5ed7cd45d72620e74df86b016f81f3a Author: Jon Turney Date: Mon Sep 16 12:43:20 2019 +0100 Revert "appveyor: Drop building Xorg server" This reverts commit a9537cfdd1ed9656f4e29225af8861418b4fd682. This is buildable again since !244 commit e693c9657f98c334e9921ca2f8ebf710497c0c6a Author: Arthur Williams Date: Sun Oct 6 11:55:35 2019 -0700 dix: Check for NULL spriteInfo in GetPairedDevice There is a race when reseting the XServer that causes spriteInfo to be NULL in GetPairedDevice resulting a segfault and subsequent crash. The problem was noticed when opening a connection, creating master devices, destroying master devices and closing the connection during testing. Signed-off-by: Arthur Williams commit a505ecba1048048c168472e4b4a92c13f92b0613 Author: Sven Joachim Date: Fri Oct 4 10:29:31 2019 +0200 gitlab-ci: Add a manpage substitutions regression test This catches the broken manpages in the autoconf build which appeared after commit 2e497bf887ac ("man: s/__/@/g") and were only partly rectified by commit 0445705a8bbf ("man: Fix automake seddery"). Reviewed-by: Michel Dänzer commit de0d39f825cce7422986011ee9d5db91f15e2987 Author: Sven Joachim Date: Wed Oct 2 18:26:07 2019 +0200 modesetting: Fix broken manpage in autoconf build The autoconf build for the modesetting driver still relied on xorg-macros.m4 for string replacements and did not include the top-level manpages.am. As a result, no substitutions took place after commit 2e497bf887aca832dc0dd30d071c5288ab5c1e15. This should be a candidate for the 1.20 branch. Reviewed-by: Michel Dänzer commit 726e4230c6ffe3148f9877eba32287cfe8d158c1 Author: Sven Joachim Date: Wed Oct 2 18:25:17 2019 +0200 xwayland: Add more files to .gitignore Also sort the file again, missed in commit c8c276c9569b. commit b2de577f6388c6dd7a463e5cebb8b1366bb45d1f Author: Adam Jackson Date: Tue Jul 23 14:33:45 2019 -0400 xfree86: Merge vbe into int10 There's not really a good reason to keep these separate, the vbe code requires int10 and is not very large. This change eliminates the build-time options for vbe; if you build int10, you get vbe. Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692 Reviewed-by: Emil Velikov commit e7b5af451c101608d8cc003e8dd0ff83ded17146 Author: Sven Joachim Date: Mon Sep 30 18:44:25 2019 +0200 .dir-locals.el: Add missing final newline commit 47387916fb84f8f9c7931eb7162d1663a6023467 Author: Sven Joachim Date: Mon Sep 30 18:43:13 2019 +0200 Fix various spelling errors commit 2a9268e4a0ba7b062ded4d361be3119d887aac41 Author: Adam Jackson Date: Tue Sep 3 11:20:58 2019 -0400 dri2: Set fallback driver names for Intel and AMD chips i965 and radeonsi, respectively, are the drivers that have been receiving new hardware support. It's really silly to need to update the server side to know specific new devices IDs every time a new ASIC comes out. Reviewed-by: Michel Dänzer commit cbdde938cbaf604741cd057fac743859ada342ec Author: Adam Jackson Date: Fri Sep 27 11:43:52 2019 -0400 modesetting: Reduce "glamor initialization failed" message to X_INFO This might be an error or not, for example refusing to work on llvmpipe is normal and expected. glamor_egl_init() will print X_ERROR messages if appropriate, so we don't need to here. Reviewed-by: Michel Dänzer commit 0d8cc7bb180468fee72330f40d87f6e9db7b42c0 Author: Michel Dänzer Date: Mon Sep 23 18:35:41 2019 +0200 miext/sync: Make struct _SyncObject::initialized fully ABI compatible With a 32-bit build, putting the initialized field at the end of the struct bumped the struct size from 20 bytes to 24, changing the layout of other structs embedding struct _SyncObject. While this would be acceptable on master, it caused crashes with 1.20. Making the initialized field a char and putting it in the hole before the beingDestroyed field restores the 32-bit ABI as well. Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/892 Reviewed-by: Aaron Plattner Reviewed-by: Alex Goins commit 6036e845271800b2e268f5cba9283ce07a7fad3a Author: Alan Coopersmith Date: Mon Sep 23 16:28:42 2019 -0700 meson: fix builds on Solaris 11.4 Signed-off-by: Alan Coopersmith commit 0e8c0d2f238e5d50daaf4672bd80ad519673b5e3 Author: Alan Coopersmith Date: Mon Sep 23 15:12:01 2019 -0700 ospoll: Fix Solaris ports implementation to build on Solaris 11.4 Wrong version got committed, but wasn't noticed since it only builds with meson, not autoconf. Signed-off-by: Alan Coopersmith commit cca4bc342cacdbd1ce819c08af2f4795f6a704c3 Author: Andres Rodriguez Date: Fri Sep 6 18:32:44 2019 -0400 xf86: Disable unused crtc functions when a lease is revoked This fixes 'non-desktop' displays staying powered on after their lease has been revoked. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111620 Cc: Keith Packard Signed-off-by: Andres Rodriguez commit 0f19381f4906e3100cd43544f1cad82d2a933c63 Author: Olivier Fourdan Date: Tue Jul 9 11:08:27 2019 +0200 xwayland: Don't create wl_buffer backing pixmap In non-rootless mode, not all pixmaps need a wl_buffer backing. Suggested-by: Twaik Yont (@twaik) in #834 Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit edf964434eac10ffbe27cc883e3ab95505669aee Author: Jonas Ådahl Date: Fri Sep 13 17:11:27 2019 +0200 xwayland/glamor-gbm: Handle DRM_FORMAT_MOD_INVALID gracefully The compositor may send DRM_FORMAT_MOD_INVALID instead of a list of modifiers for various reasons. Handle this gracefully by ignoring it. Without this, if a compositor would send DRM_FORMAT_MOD_INVALID, it'd result in empty windows provided by Xwayland. Signed-off-by: Jonas Ådahl Reviewed-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 429ee86ab949d6e49c07491a88d6b8d8babc3246 Author: Martin Weber Date: Wed Sep 18 14:29:05 2019 +0200 udev: Fixed NULL pointer argument of strcmp Signed-off-by: Martin Weber commit bcf2dd0cd20825ccf4284c67f678ad37ecd1d2b1 Author: Jon Turney Date: Fri Feb 19 21:53:00 2016 +0000 hw/xwin: Add -icon option to set the screen window icon in windowed mode Add an -icon option to set the screen window icon in windowed mode Allow cygwin paths in an icon-specification Update man pages and system.XWinrc appropriately Also, log an error if the icon specified for TRAYICON cannot be loaded Also, fix a bug in appending a '\' to IconDirectory only if it doesn't already end with one, which was fortunately benign. Note: LoadImageComma would be simpler if we just stated that XWinrc paths are Cygwin paths on Cygwin, Windows paths on MinGW, but that could break existing .XWinrc files Note: Given that we can specify paths in an icon-specifier, I'm not sure what IconDirectory wins us. v2: Fix formatting problems in man page additions v3: Fix some more s/_/@/g in man pages commit ac5d3a200a6d4bdb9ae4a9ef6f2238cf185d38e5 Author: Alan Coopersmith Date: Tue Sep 10 17:28:36 2019 -0700 meson: don't require xf86bigfontproto if not building xf86bigfont support Signed-off-by: Alan Coopersmith commit 7ad1d0d384085fb480e00547c22a3e8a14b514ea Author: Carlos Garnacho Date: Sat Jul 20 00:16:43 2019 +0200 xwayland: Allow passing a fd for set up clients This FD also triggers the "wait for WM_S0" paths, so that the compositor may set up a "maintenance line" for Xwayland, for services that are essential to run before any client (eg. xrdb). Those services would use this FD, disguised as an extra display connection. This -initfd can be seen as a generalization of -wm, a Wayland compositor may use -initfd to launch its WM and any other clients that should start up, or it may use -wm as a dedicated connection for the WM and optionally use -initfd for the misc. startup clients. If either of -wm or -initfd is passed, Xwayland will expect a selection notification on WM_S0 before incorporating the FDs in -listen to the poll list. Also, correct a minor typo in the listenfd argument output, give → given. Signed-off-by: Carlos Garnacho commit 78cc8b6f9613fc71f6ecc7e8848d54364a250634 Author: Carlos Garnacho Date: Mon Jan 7 15:33:35 2019 +0100 xwayland: Handle the case of windows being realized before redirection If Xwayland gets to realize a window meant for composition before the compositor redirected windows (i.e. redirect mode is not RedirectDrawManual yet), the window would stay "invisible" as we wouldn't create a wl_surface/wl_shell_surface for it at any later point. This scenario may happen if the wayland compositor sets up a X11 socket upfront, but waits to raise Xwayland until there are X11 clients. In this case the first data on the socket is the client's, the compositor can hardly beat that in order to redirect subwindows before the client realizes a Window. In order to jump across this hurdle, allow the late creation of a matching (shell) surface for the WindowPtr on SetWindowPixmapProc, so it is ensured to be created after the compositor set up redirection. Signed-off-by: Carlos Garnacho Reviewed-by: Michel Dänzer Reviewed-by: Olivier Fourdan commit c2e8ae964052944312c5023ca7ea5c41a92990e5 Author: Carlos Garnacho Date: Mon Jan 7 15:33:31 2019 +0100 xwayland: Refactor surface creation into a separate function This is just called from xwl_window_realize() ATM, but will be useful in future commits. Signed-off-by: Carlos Garnacho commit 4e50440ae20c537d6a4edf356cda67dd33d4e5a8 Author: Carlos Garnacho Date: Mon Jan 7 15:20:05 2019 +0100 xwayland: Separate DamagePtr into separate window data This will be dissociated in future commits to handle the cases where windows are being realized before there is a compositor handling redirection. In that case, we still want the DamagePtr to be registered upfront on RealizeWindowProc before a corresponding xwl_window might be created. Most notably, it cannot be lazily created on SetWindowPixmapProc as damage accounting gets broken. Signed-off-by: Carlos Garnacho commit 07463a40458ecc52d935b1a0bd820f6d9664da22 Author: Simon Ser Date: Tue Sep 3 13:10:33 2019 +0300 ci: bump DEBIAN_TAG The previous commit requires wayland-protocols 1.18. Bump DEBIAN_TAG to re-generate the Debian image and get the wayland-protocols update. Signed-off-by: Simon Ser Reviewed-by: Michel Dänzer commit 01ed478c65227ae961d33bc1daf4a64da84f15a6 Author: Simon Ser Date: Mon Sep 2 22:42:17 2019 +0300 xwayland: add support for xdg-output-unstable-v1 version 3 This adds support for xdg-output-unstable-v1 version 3, added in [1]. This new version deprecates zxdg_output_v1.done and replaces it with wl_output.done. If the version is high enough, there's no need to wait for both an xdg_output.done event and a wl_output.done event -- we only care about wl_output.done. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/962dd535372c8e4681374c23d2603cbe06cd7031 Signed-off-by: Simon Ser Reviewed-by: Olivier Fourdan commit f0d78b47ac49977a6007f5fe081f00c6eb19a12e Author: Maarten Lankhorst Date: Thu Apr 25 11:46:41 2019 +0200 modesetting: Disable atomic support by default The atomic driver has issues with modesetting when stealing connectors from a different crtc, a black screen when doing rotation on a different crtc, and in general is just a mapping of the legacy helpers to atomic. This is already done in the kernel, so just fallback to legacy by default until this is fixed. Please backport to 1.20, as we don't want to enable it for everyone there. It breaks for existing users. The fixes to make the xserver more atomic have been pending on the mailing list for ages. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110375 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110030 References: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/36/commits Signed-off-by: Maarten Lankhorst commit 7d0e660e0e2808e098ab9d4de843e9b31c64af21 Author: Adam Jackson Date: Tue Aug 27 15:54:42 2019 -0400 meson: Add dtrace support commit e0e051a3920e3e2731d35807e00d30ba9ef7f122 Author: Adam Jackson Date: Tue Aug 27 15:50:23 2019 -0400 dtrace: s/#if/#ifdef/ for XSERVER_DTRACE No functional change, matches meson style. commit 7968d10fadd37eabd811481e1d47fe01706269f3 Author: Adam Jackson Date: Tue Aug 27 15:48:59 2019 -0400 dtrace: Move Xserver.d from dix/ to include/ dix/ is typically not in the include path, and this properly belongs in include anyway since it's needed from os/ too. commit 4fa43fc5134bedf50904ec634f9a63d0570b0827 Author: Adam Jackson Date: Tue Aug 27 15:43:50 2019 -0400 dtrace: Remove Xserver-dtrace.h.in hack This was a workaround for very old versions of dtrace(1) that didn't support the -h switch. We no longer support such old OSes. commit f8c85961c8fcb283e4ed6fc2b942428e4da2d093 Author: Adam Jackson Date: Thu Aug 22 15:07:18 2019 -0400 glx: Disable GLX_EXT_import_context if !enableIndirectGLX GLX_EXT_import_context allows multiple clients to share the same indirect context. If you can't create an indirect context, you're certainly not going to be able to share one. Hide the extension from the server string if we've disabled indirect contexts. This turns piglit's tests from fail to skip when indirect contexts are disabled. Since GLX_EXT_import_context has been supported in xfree86-derived servers since day 1 (it was included in the initial GLX code drop from SGI), this is now also a hint to the client that indirect contexts are unlikely to work at all. Reviewed-by: Michel Dänzer commit 4f27d1e05f67eb8953a9bbed7e6f34b03456c64f Author: Christopher Chavez Date: Sat Jul 27 10:51:57 2019 -0500 XQuartz: translate additional mouse buttons Old behavior was to translate the middle mouse button, as well as every other button that isn't the left or right mouse button, to act as the middle mouse button (2). New behavior is to translate only the middle mouse button to 2, and translate higher-numbered buttons to 8 and higher. This allows additional mouse buttons to behave under XQuartz more like they do by default under X11 on other platforms (e.g. Linux and BSD distributions). Signed-off-by: Christopher Chavez commit 436fd7e8b4966c305ea9c43f3c14c2ca04c35539 Author: Adam Jackson Date: Wed Jan 23 11:47:44 2019 -0500 render: Break PICT_a4 The Render protocol requires this format, but it is wrong to do so. We are not aware of any hardware with a real 4bpp implementation of this format. Some GL hardware may have GL_LUMINANCE4_ALPHA4_EXT, and may also be able to wire L to 1, but that would win you none of memory, quality, or (likely) performance over A8. Any attempt to use this format is therefore likely a (painful) software fallback. Pleasantly (and given the above, unsurprisingly) it seems to be unused in the wild. None of the major toolkits will try to use it, and rendercheck does not in fact validate that all of the "standard" picture formats exist. Drop the explicit A4 setup from picture format initialization. Note that the DDXes are not changed and still expose a depth-4 pixmap format, but we only add picture formats for True/DirectColor-credible depths (i.e. depth >= 15). Implements: xorg/proto/xorgproto!1 Signed-off-by: Adam Jackson commit 0c5179c280a193a1dbbe29160906087f06eae6f2 Author: Ville Syrjälä Date: Tue Aug 20 17:46:09 2019 +0300 modesetting: Update props for dynamically added outputs Dynamically added outputs should have their properties properly updated as well. Otherwise we're left with an output with many of its propeties not exposed. Signed-off-by: Ville Syrjälä Reviewed-by: Michel Dänzer commit 194ba38728b34a76885275dae153057c8afaf72e Author: Adam Jackson Date: Mon Aug 19 14:27:54 2019 -0400 miext/sync: Fix needless ABI change The initialized field was added in: commit 82f01ad7869e3f2be51e41a8246dab5982bbc36a Author: Alex Goins Date: Wed Apr 10 13:48:02 2019 -0500 xsync: Add resource inside of SyncCreate, export SyncCreate But it added this field not at the end of SyncObject. It may not have been _usefully_ possible to create those from another extension prior to that commit, but that's still an ABI-incompatible change. commit 95dcc81cb122e5a4c5b38e84ef46eb872b2e1431 Author: Adam Jackson Date: Fri Aug 16 14:56:19 2019 -0400 glx: Fix previous context validation in xorgGlxMakeCurrent vnd has already verified that the context tag is valid before this gets called, and we only set the context tag private data to non-null for indirect clients. Mesa happens to be buggy and doesn't send MakeCurrent requests nearly as much as it should for direct contexts, but if you fix that, then unbinding a direct context would fail here with GLXBadContextTag. Sadly Mesa will still need to carry a workaround here for broken servers, but we should still fix the server. commit aed62f8fbea3f618f97ee0105b2d430c8cddf8f5 Author: Olivier Fourdan Date: Thu Aug 1 13:34:13 2019 +0200 meson/xwayland: No libdrm nor epoxy without glamor When building Xwayland with neither DRI nor GLamor support enabled with the Meson build system, the resulting binary would still link against libdrm and epoxy even though those are not used/needed. Make sure we require and link against libdrm and epoxy only if needed. Signed-off-by: Olivier Fourdan commit e8a85ba818a82d8c5acacc53dfc4fdfff573ae90 Author: Olivier Fourdan Date: Thu Aug 1 13:28:48 2019 +0200 meson: Build miext/sync for Xwayland When using the Meson build system, miext/sync would be build only for dri3. As a result, when building with Meson without DRI3 enabled, Xwayland would fail to link because `miSyncShmScreenInit()` is nowhere to be found. Make sure to build miext/sync for either DRI3 or Xwayland. Signed-off-by: Olivier Fourdan commit c0bbc29ae59737ea0e55fd9c8b65133010d32b80 Author: Olivier Fourdan Date: Thu Aug 1 09:48:59 2019 +0200 meson: Move requirements in a single place Some modules are required in multiple places in the meson file. Move the actual requirements to the top of the file as a variable so that updating a version does not require changing the actual value in multiple places. Signed-off-by: Olivier Fourdan commit bf758660c9c0e20abd141a1215e2e2b1ac342097 Author: Olivier Fourdan Date: Thu Aug 1 13:39:47 2019 +0200 configure/xwayland: No libdrm nor epoxy without glamor When building Xwayland without neither DRI nor GLamor support enabled with the autotools build system, the resulting binary would still link against libdrm and epoxy even though those are not used/needed. Make sure we require and link against libdrm and epoxy only if needed. Signed-off-by: Olivier Fourdan commit 5096fcd492b1efd178773748e5f42177439426d6 Author: Adam Jackson Date: Wed Aug 14 14:10:07 2019 -0400 composite: Be more paranoid in compDestroyDamage Consider these two facts: - You can't rely on resource deletion order - damageDestroyWindow automatically destroys any damage listener connected to the doomed window Now consider a redirected window being destroyed. If the damage associated with the redirection is destroyed before the window, then when compFreeClientWindow tries to unredirect the window, the call to compSetParentPixmap may see that cw->damageRegistered is still true, and call DamageUnregister(NULL) (because compDestroyDamage already zeroed out cw->damage), and you get a backtrace that looks like: #6 #7 DamageUnregister (pDamage=0x0) at damage.c:1773 <----------------- #8 0x000000000051f767 in compSetParentPixmap (pWin=pWin@entry=0x28489c0) at compalloc.c:646 #9 0x000000000051fa01 in compFreeClientWindow (pWin=0x28489c0, id=) at compalloc.c:291 #10 0x000000000051a499 in FreeCompositeClientWindow (value=, ccwid=) at compext.c:74 #11 0x0000000000597932 in doFreeResource (res=0x28494c0, skip=0) at resource.c:880 #12 0x000000000059850e in FreeResource (id=857, skipDeleteFuncType=skipDeleteFuncType@entry=0) at resource.c:910 #13 0x000000000051ee01 in compUnredirectWindow (pClient=0x1f6b4e0, pWin=pWin@entry=0x28489c0, update=update@entry=0) at compalloc.c:336 #14 0x000000000051b723 in compCheckBackingStore (pWin=0x28489c0) at compinit.c:131 #15 compChangeWindowAttributes (pWin=0x28489c0, mask=) at compinit.c:152 #16 0x000000000051d1f9 in compDestroyWindow (pWin=0x28489c0) at compwindow.c:664 #17 0x00000000004d85be in damageDestroyWindow (pWindow=0x28489c0) at damage.c:1570 #18 0x00000000004896f0 in DbeDestroyWindow (pWin=0x28489c0) at dbe.c:1326 #19 0x00000000004d229e in present_destroy_window (window=0x28489c0) at present_screen.c:163 #20 0x000000000059c4e4 in FreeWindowResources (pWin=pWin@entry=0x28489c0) at window.c:1032 #21 0x000000000059f2c6 in DeleteWindow (value=0x28489c0, wid=) at window.c:1101 #22 0x0000000000597932 in doFreeResource (res=0x2843bd0, skip=skip@entry=0) at resource.c:880 #23 0x0000000000598b0c in FreeClientResources (client=client@entry=0x2848560) at resource.c:1146 #24 0x0000000000572e2f in CloseDownClient (client=0x2848560) at dispatch.c:3473 Fix this by zeroing out more of the CompWindowPtr when the damage is destroyed, so that any further calls into composite will avoid touching cw->damage. commit 3c78d637553a5ed207cd67a6f84b9b1fffe5b91f Author: Adam Jackson Date: Wed Aug 14 14:51:56 2019 -0400 global: Remove BUILD_DATE and BUILD_TIME All this does is make reproducible builds impossible. commit 61aa40aeb3d4efefda47f245ed4b83a1a19b1d4c Author: Matt Turner Date: Fri Aug 9 20:22:29 2019 -0700 dix: Assert noPanoramiXExtension is false in PanoramiX code When compiling with link time optimization, GCC thinks it's discovered undefined behavior: events.c: In function 'XineramaConfineCursorToWindow': events.c:609:13: warning: iteration 2147483647 invokes undefined behavior [-Waggressive-loop-optimizations] events.c:609:11: note: within this loop events.c:605:49: warning: array subscript -1 is below array bounds of 'struct _Window *[16]' [-Warray-bounds] events.c:606:31: warning: array subscript -1 is below array bounds of 'struct _Screen *[16]' [-Warray-bounds] events.c:610:39: warning: array subscript -2 is below array bounds of 'struct _Screen *[16]' [-Warray-bounds] events.c:617:38: warning: array subscript -2 is below array bounds of 'struct _Window *[16]' [-Warray-bounds] events.c:619:35: warning: array subscript -2 is below array bounds of 'struct _Screen *[16]' [-Warray-bounds] This results from i = PanoramiXNumScreens - 1; RegionCopy(&pSprite->Reg1, &pSprite->windows[i]->borderSize); off_x = screenInfo.screens[i]->x; off_y = screenInfo.screens[i]->y; where GCC believes that PanoramiXNumScreens might be 0. Unfortunately GCC is just smart enough to be an annoyance because this case is not actually possible: XineramaConfineCursorToWindow() is only called when noPanoramiXExtension is false, and if noPanoramiXExtension is false then PanoramiXNumScreens must be >1 (see PanoramiXExtensionInit()). So, add an assert(!noPanoramiXExtension), which to my surprise provides GCC with information even in release builds and lets GCC understand that the code is not doing anything that is undefined behavior. I chose this solution instead of the proposed assert(i >= 0) because the same pattern occurs in CheckVirtualMotion() but is inside an 'if (!noPanoramiXExtension)' and does not generate any warnings. Fixes: xorg/xserver#590 Signed-off-by: Matt Turner commit c69b37e8da87c9f76dbf4add7340a77ea443c760 Author: Hans de Goede Date: Thu Aug 8 21:56:59 2019 +0200 modesetting: Only log 1 error for consecutive flip failures Only log 1 error for consecutive flip failures, instead of filling the log and the disk with errors for each attempted flip. Despite our best efforts we may end up with a BO which gets refused when we try to import it as a framebuffer, see e.g. : https://bugs.freedesktop.org/show_bug.cgi?id=111306 This should not happen, but as the above bugs shows sometimes it does and chances are it will happen again. Note ideally we should check if the import is possible at ms_present_check_flip time, like the amdgpu code is doing since: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/merge_requests/35 but that requires a chunk of refactoring work on the modesetting driver, so for now this will have to do. Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit 3dc838f77d9a9417adf6a03cc82aa4e9337153a7 Author: Hans de Goede Date: Thu Aug 8 21:54:51 2019 +0200 modesetting: Improve page-flip error reporting Before this commit ms_do_pageflip logged a single error for both the drmmode_bo_import failure path as well as for the queue_flip_on_crtc path. This commit splits this into 2 separate error logs so that it is clear what the cause of the flip-failure is. Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit 12821852f0d82ecef686262382c84b2c1625a99f Author: Hans de Goede Date: Mon Jul 15 14:35:49 2019 +0200 modesetting: Avoid duplicate error messages on present-flip errors Currently on present-flip failures we log 2 messages for each failure, 1 from ms_do_pageflip and then another one from ms_present_flip which is the caller of ms_do_pageflip. This commit adds a log_prefix argument to ms_do_pageflip so that its log messages can show if it is a DRI2 or a Present flip which fails and removes the redundant error message from ms_present_flip. Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit 078277e4d92f05a90c4715d61b89b9d9d38d68ea Author: Dave Airlie Date: Fri Aug 17 09:49:24 2012 +1000 xf86: autobind GPUs to the screen This is a modified version of a patch we've been carry-ing in Fedora and RHEL for years now. This patch automatically adds secondary GPUs to the master as output sink / offload source making e.g. the use of slave-outputs just work, with requiring the user to manually run "xrandr --setprovideroutputsource" before he can hookup an external monitor to his hybrid graphics laptop. There is one problem with this patch, which is why it was not upstreamed before. What to do when a secondary GPU gets detected really is a policy decission (e.g. one may want to autobind PCI GPUs but not USB ones) and as such should be under control of the Desktop Environment. Unconditionally adding autobinding support to the xserver will result in races between the DE dealing with the hotplug of a secondary GPU and the server itself dealing with it. However we've waited for years for any Desktop Environments to actually start doing some sort of autoconfiguration of secondary GPUs and there is still not a single DE dealing with this, so I believe that it is time to upstream this now. To avoid potential future problems if any DEs get support for doing secondary GPU configuration themselves, the new autobind functionality is made optional. Since no DEs currently support doing this themselves it is enabled by default. When DEs grow support for doing this themselves they can disable the servers autobinding through the servers cmdline or a xorg.conf snippet. Signed-off-by: Dave Airlie [hdegoede@redhat.com: Make configurable, fix with nvidia, submit upstream] Signed-off-by: Hans de Goede Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov --- Changes in v2: -Make the default enabled instead of installing a xorg.conf snippet which enables it unconditionally Changes in v3: -Handle GPUScreen autoconfig in randr/rrprovider.c, looking at rrScrPriv->provider, rather then in hw/xfree86/modes/xf86Crtc.c looking at xf86CrtcConfig->provider. This fixes the autoconfig not working with the nvidia binary driver commit fbd2bb9dd047a206b9c8cfaca62079c8d866c617 Author: Hans de Goede Date: Thu Aug 1 12:38:35 2019 +0200 mi: Use GC clipregion instead of drawable in miDoCopy/miCopyArea As discussed in issue #829 the "mi: Shortcut miDoCopy/miCopyArea based on clipList" change leads to pointer-trails (area under pointer not restored when it moves) when using a software cursor. Checking pGC->pCompositeClip instead of pDstDrawable->clipList fixes this problem. Fixes: #829 Signed-off-by: Hans de Goede commit 0aaac8d783e78c040a70a55ba8d67809abd7e625 Author: Hans de Goede Date: Mon Jun 24 21:46:26 2019 +0200 modesetting: Disable pageflipping when using a swcursor The miPointerSpriteFunc swcursor code expects there to only be a single framebuffer and when the cursor moves it will undo the damage of the previous draw, potentially overwriting what ever is there in a new framebuffer installed after a flip. This leads to all kind of artifacts, so we need to disable pageflipping when a swcursor is used. The code for this has shamelessly been copied from the xf86-video-amdgpu code. Fixes: https://gitlab.freedesktop.org/xorg/xserver/issues/828 Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit 0331153b227c1cadf94f912cc02949d7159b02a2 Author: Hans de Goede Date: Mon Jun 24 21:49:59 2019 +0200 modesetting: Fix compiler warning Fix the following compiler warning: drmmode_display.c: In function ‘drmmode_create_bo’: drmmode_display.c:1019:9: warning: ISO C90 forbids mixed declarations and code [ 1019 | uint32_t num_modifiers; | ^~~~~~~~ Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit 13f359fa838a9b5e855fbbee9c2f79bad84a1ace Author: Hans de Goede Date: Mon Jun 24 21:20:06 2019 +0200 modesetting: Remove obsolete, unused msPixmapPrivate declaration and macro When the pixmapPrivateKeyRec was moved from a global to being embedded inside the drmmode_rec these 2 where missed, clean them up. Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit f9e7cdf65901665cf5a4efc4df3164337229f3ac Author: Hans de Goede Date: Mon Aug 5 17:12:01 2019 +0200 xf86: dri2: Use va_gl as VDPAU driver for Intel i965 GPUs The modesetting driver (which now often is used with Intel GPUs), relies on DRI2ScreenInit() to setup the DRI and VDPAU driver names. Before this commit it would always assign the same name to the 2 names, but the VDPAU driver for i965 GPUs should be va_gl. This commit adds a special case for the i965 case, replacing the VDPAU driver name with "va_gl" if the GPU is using the i965 driver for DRI. Note this commit adds a FIXME comment for a related memory leak, that leak was already present and fixing it falls outside of the scope of this commit. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1413733 Cc: kwizart@gmail.com Reviewed-by: Emil Velikov Signed-off-by: Hans de Goede commit 6f41bf31051ec915cb4316421d3b7eddfebdd8c6 Author: Ross Burton Date: Thu Aug 1 15:24:51 2019 +0100 sdksyms.sh: don't embed the build path This script generates a header that has a comment containing the build path for no real reason. As this source can end up deployed on targets in debug packages this means there is both potentially sensitive information leakage about the build environment, and a source of change for reproducible builds. commit b7dae57f1d50ca3c8197f894c445a00b92a3ee9c Author: Alan Coopersmith Date: Sun Aug 4 10:28:51 2019 -0700 Fix NO_UNDEFINED build with statically linked fb Stop trying to link to a shared library we no longer build Fixes: commit c1703cdf3b - "xfree86: Link fb statically" Signed-off-by: Alan Coopersmith commit f107bde1e2e8c67eb42d0a5c757c0a1c777b0327 Author: Olivier Fourdan Date: Wed Jul 31 11:14:37 2019 +0200 xwayland: Fix build warning without glamor Building Xwayland without glamor support would raise a warning at build time: xwayland.c: In function ‘xwl_screen_init’: xwayland.c:980:10: warning: unused variable ‘use_eglstreams’ 980 | Bool use_eglstreams = FALSE; | ^~~~~~~~~~~~~~ When building without glamor support, we cannot have EGL Streams support either, the two being related. So we do not need to declare the variable `use_eglstreams` if glamor is not enabled. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 8587bbd85adaa92a429257a7b6f75e60f56cd603 Author: Olivier Fourdan Date: Wed Jul 31 09:25:09 2019 +0200 xwayland: Fix build without glamor When building Xwayland without glamor support enabled using automake, the build would fail at link time trying to find `glamor_block_handler`: /usr/bin/ld: xwayland-glx.o: in function `egl_drawable_wait_x': hw/xwayland/xwayland-glx.c:102: undefined reference to `glamor_block_handler' Make sure we don't try to build `xwayland-glx.c` without glamor in the Xwayland Makefile. Note: Meson build is fine because it's already build only with glamor enabled. Fixes: commit 8469241 - "xwayland: Add EGL-backed GLX provider" Signed-off-by: Olivier Fourdan commit a026972776b303fa640f54e5e8f0fc1abf879071 Author: Jon Turney Date: Mon Mar 16 15:43:07 2015 +0000 Clarify authorization failure reason strings sent back to the client commit c1703cdf3b0d6663fcac68598eefe324ae4e1e71 Author: Adam Jackson Date: Tue Jul 23 11:54:15 2019 -0400 xfree86: Link fb statically There's no real benefit to leaving this loadable, virtually every driver is going to load it. Reviewed-by: Jon Turney commit d9ec525059dbe96fc893c73c0362be2a6dd73e85 Author: Olivier Fourdan Date: Tue Jul 23 11:01:47 2019 +0200 xwayland: Do not free a NULL GBM bo Both `gbm_bo_create()` and `gbm_bo_create_with_modifiers()` can fail and return `NULL`. If that occurs, `xwl_glamor_gbm_create_pixmap()` will not create a pixmap for the (NULL) GBM bo, but would still try to free the bo which leads to a crash in mesa: [...] #7 #8 in gbm_bo_destroy (bo=0x0) at ../src/gbm/main/gbm.c:439 #9 in xwl_glamor_gbm_create_pixmap () at xwayland-glamor-gbm.c:245 #10 in ProcCreatePixmap () at dispatch.c:1440 #11 in Dispatch () at dispatch.c:478 #12 in dix_main () at main.c:276 To avoid the crash, only free the GBM bo if not `NULL`. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Bugzilla: https://bugzilla.redhat.com/1729925 commit 454b3a826edb5fc6d0fea3a9cfd1a5e8fc568747 Author: Adam Jackson Date: Mon Jul 22 13:51:06 2019 -0400 hw: Rename boolean config value field from bool to boolean "bool" conflicts with C++ (meh) and stdbool.h (ngh alright fine). This is a driver-visible change and will likely break the build for mach64, but it can be fixed by simply using xf86ReturnOptValBool like every other driver. Signed-off-by: Adam Jackson commit 074c98cf5365c3d534f7c62ad6dbdd332883b46b Author: Paolo Borelli Date: Mon Jul 22 12:46:31 2019 +0200 Xvfb: set rotations ret value commit a9537cfdd1ed9656f4e29225af8861418b4fd682 Author: Jon Turney Date: Sun Jul 21 14:43:24 2019 +0100 appveyor: Drop building Xorg server (Temporarily) drop building Xorg server (since this doesn't work after a530b6e8) until we come up with a better solution. (See #692) commit 401ff618cf5bb93648c05f025dfa96b0324e94b7 Author: Jon Turney Date: Sat Jul 6 17:58:12 2019 +0100 appveyor: Workaround a Cygwin setup bug Run Cygwin's setup a second time to workaround for it's defective handling of obsolete packages. (Specifically, python3-lxml is currently obsoleted by python36-lxml, but that doesn't get installed on the first run) commit 011b87a8c6e68b992ed27db4e93ae1f1e6dc508f Author: Yaakov Selkowitz Date: Wed Oct 29 14:05:52 2014 +0000 hw/xwin: Add EWMH properties for describing multiple desktops to the root window mate-terminal apparently requires these to be present to work We just set them to describe one desktop, for the moment. It seems we can safely ignore the _NET_WM_DESKTOP property on child windows, and any _NET_WM_DESKTOP messages, as we only support one desktop for windows to be on. Signed-off-by: Jon Turney commit 3d493e91ab66c8f66efaded6b81c87385863b843 Author: Colin Harrison Date: Tue Aug 28 15:30:23 2018 +0100 hw/xwin: Respect -notrayicon option on taskbar restart commit a588e6f81b1d8dfb9076358e5039d3ee6628a50f Author: Jon Turney Date: Thu Jul 2 22:21:28 2015 +0100 hw/xwin: Rename WM_WM_MAP{2,3} to WM_WM_MAP_{UN,}MANAGED WM_WM_MAP was removed in 52e05b92 Rename WM_WM_MAP2 as WM_WM_MAP_UNMANAGED (meaning an override-redirect window, which manages it's own activation) Rename WM_WM_MAP3 as WM_WM_MAP_MANAGED (meaning a normal window, which is activated when clicked) commit a47e7eb247d5c61be43d31b32887dee1dc89ba67 Author: Jon Turney Date: Fri May 9 22:09:38 2014 +0100 hw/xwin: Log counts of pixel formats which couldn't be used Log a count of pixel formats which couldn't be used for various reasons commit 82225aab81d581e943c67c679695a1d15757d69d Author: Ignacio Casal Quinteiro Date: Wed Jul 17 14:45:46 2019 +0200 vfb: set gamma size to avoid xrandr to complain about it missing commit 492639f5e167b12ef81c4e4fa0e6a2749cbfe3a0 Author: Ignacio Casal Quinteiro Date: Wed Jul 17 14:39:29 2019 +0200 vfb: factor out method to free a single screen info commit 356ffd6729861bc9d0cd059fd8a99d7135fe50dd Author: Ignacio Casal Quinteiro Date: Wed Jul 17 14:18:47 2019 +0200 vfb: no need for else if we are returning commit d0850241c6218f61127c45c2f95d6e791c3fea44 Author: Adam Jackson Date: Mon Jul 15 11:38:44 2019 -0400 xwayland: Expand the RANDR screen size limits There's not really a good way to query this from the wayland server, so just set the maximum to the X11 protocol limits. While we're at it, lower the minimum screen size to something implausibly small too, just in case. Fixes: xorg/xserver#850 Reviewed-by: Michel Dänzer commit fe4cd0e7f5c58fa94db36326aadc1bd4e6d73eba Author: Olivier Fourdan Date: Mon Jul 1 13:20:39 2019 +0200 compiler.h: Do not include sys/io.h on ARM with glibc on ARM hasn't worked for a long, long time, so it was removed it from glibc upstream. Remove the include to avoid a compilation failure on ARM with glibc. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/840 commit ce9455b5ee389b100a9b7da76b79690d97211b7a Author: Olivier Fourdan Date: Fri Jun 28 16:55:11 2019 +0200 xwayland: Update screen pixmap on output resize Running Xwayland non-rootless and resizing the output would lead to a crash while trying to update the larger areas of the root window. Make sure we resize the backing pixmap according to the new output size to avoid the crash. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/834 Reviewed-by: Michel Dänzer commit a530b6e8923f2b9153a773c8618a1e2f41619288 Author: Adam Jackson Date: Tue Apr 30 18:01:27 2019 -0400 meson: Fix libshadow.so linkage Don't link against fb, it's the driver's responsibility to load that first. Underlinking like this is unpleasant but this matches what autotools does. Fixes: xorg/xserver#540 commit a8d9ebeb43583e8d8ef182ac15adbdce256d4867 Author: Matt Roper Date: Wed Jun 26 09:34:46 2019 -0700 dri2: Sync i965_pci_ids.h from mesa Copied from Mesa with no modifications. This update brings in a significant number of new platform ID's. Syncs with mesa up to commit e334a595e ("intel/icl: Add new ICL PCI-IDs"). Signed-off-by: Matt Roper commit 2f0dd1816d556eef8c4b691330d39f13e1ed93f0 Author: Michel Dänzer Date: Wed Jul 3 11:53:56 2019 +0200 Revert "present/scmd: Check that the flip and screen pixmap pitches match" This reverts commit ef91da2757050652c724f6e674e8b1acf5d0cb31. I thought this couldn't work under any circumstances, but I was wrong, and drivers are already checking for cases that really cannot work. Fixes issue #839. commit fabc4219622f3c0b41b1cb897c46e092377059e3 Author: Samuel Thibault Date: Mon Jul 1 02:33:26 2019 +0200 Fix crash on XkbSetMap Since group_info and width are used for the key actions allocations, when modifying them we need to take care of reallocation key actions if needed. commit 8469bfead9515ab3644f1769a1ff51466ba8ffee Author: Samuel Thibault Date: Mon Jul 1 02:31:02 2019 +0200 Fix crash on XkbSetMap Some devices may not have keyboard information. Fixes #574 commit ff6b771eeea763c19d057e8741a2cadb37db9b68 Author: Jon Turney Date: Thu Mar 8 14:25:54 2018 +0000 hw/xwin: Improve data returned for RANDR queries Set a linear gamma ramp. This avoids the xrandr command always warning 'Failed to get size of gamma for output default' (perhaps we should be using GDI GetDeviceGammaRamp(), if possible?) Make CRTC report non-zero physical dimensions initially commit 2549ab2065ad293139d4e82e5d5a5ea13f7257c9 Author: Jon Turney Date: Fri Mar 9 14:16:01 2018 +0000 hw/xwin: Always keep RANDR fake mode information up to date The rrGetInfo hook is not called for all RANDR requests (e.g. RRGetOutputInfo), so we must always keep the fake mode information up to date, rather than doing it lazily in the rrGetInfo hook) Because we are so bad, most GTK+3 versions treat the output name 'default' specially, and don't try to use RANDR with it. But versions 3.21.6 to 3.22.24, don't do this, and get badly confused by a CRTC with size 0x0. See: https://bugzilla.gnome.org/show_bug.cgi?id=771033 https://bugzilla.gnome.org/show_bug.cgi?id=780101 Future work: Rather than reporting a single fake CRTC with a mode matching the entire virtual display, the fake CRTCs we report should match our 'pseudo-xinerama' monitors commit b078e03410f5f2a004ab9732eb6e5ed24da3edcf Author: Jon Turney Date: Wed Apr 19 14:50:38 2017 +0100 hw/xwin: Make QueryMonitor() slightly less insane Make QueryMonitor() slightly less insane, making it return TRUE if the specified monitor exists, rather than always returning TRUE (which we are uselessly checking, and then also checking if the specified monitor exists) (Note that EnumDisplayMonitors() doesn't seem to have meaningful way to return errors, see 5940580f) Also: Spamming the long UseMsg() after "Invalid monitor number" isn't very helpful. Also: If we are exiting in ddxProcessArgument() due to an error in options, use a non-zero exit status. commit 8f7e4b56d2e0abd09526c7d0eeee15bfb754e557 Author: Jon Turney Date: Sun Oct 8 22:17:40 2017 +0100 hw/xwin: Fix transposed RaiseVolume and LowerVolume scan codes commit bfcaaecc552c7a3d85f6309b8079eb8e6fda8779 Author: Colin Harrison Date: Sat Jun 30 13:43:11 2018 +0100 hw/xwin: Add the Belgian (Comma) keyboard layout commit 188f461463fcc60432f9d7a76ad69ec97631db5d Author: Colin Harrison Date: Thu Feb 22 13:18:42 2018 +0000 hw/xwin: Add Russian keyboard layout commit e39dc0f5b7c88c9ba670383658846a1f658cbc47 Author: Adam Jackson Date: Thu Jun 20 12:15:31 2019 -0400 present: Require presentproto 1.2 The PresentOptionSuboptimal support code is not optional (once you've enabled building Present at all), so require a protocol package version that defines what we need. Fixes: xorg/xserver#821 commit 9acff309434a8029bcce1b22530043459bb71791 Author: Adam Jackson Date: Wed Jun 19 14:23:56 2019 -0400 linux: Fix platform device PCI detection for complex bus topologies Suppose you're in a Hyper-V guest and are trying to use PCI passthrough. The ID_PATH that udev will construct for that looks something like "acpi-VMBUS:00-pci-b8c8:00:00.0", and obviously looking for "pci-" in the first four characters of that is going to not work. Instead, strstr. I suppose it's possible you could have _multiple_ PCI buses in the path, in which case you'd want strrstr, if that were a thing. commit b3f3d65ed302baf78befe45eed458e666e1ff143 Author: Olivier Fourdan Date: Wed Jun 19 09:19:24 2019 +0200 xwayland: Add "-listenfd" option Using the existing command line option "-listen" for passing file descriptors between the Wayland compositor and Xwayland is misleading, Xwayland should add is own command line option for that specific use. As XWayland is spawned by the Wayland compositor, we cannot just change the option, as that would break all existing Wayland compositors using Xwayland, so we add a new options "-listenfd" and mark the previous one as deprecated and log a warning, but it still works for backward compatibility. Signed-off-by: Olivier Fourdan https://gitlab.freedesktop.org/xorg/xserver/merge_requests/214 commit 4a287cc2b6d849c29b43af07d93fa0048d8d6e90 Author: Olivier Fourdan Date: Tue Jun 18 10:41:02 2019 +0200 xwayland: Allow for regular transport types for listen Xwayland uses the command line option “-listen” to pass file descriptors from the Wayland compositor. That breaks the traditional, documented behavior of the “-listen” command line option which is to enable a transport type. Checks if the given option starts with a digit, otherwise treat it as a regular transport type. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/817 Suggested-by: Rodrigo Exterckötter Tjäder Signed-off-by: Olivier Fourdan commit 0dc0cef4959dfb16d8334f235150733e634e2ba9 Author: Adam Jackson Date: Tue Jun 18 14:52:04 2019 -0400 xwayland-glx: Fix GLX visual mask setup a2rgb10 configs would end up with channel masks corresponding to argb8888. This would confuse the GLX core code into matching an a2rgb10 config to the root window visual, and that would make things look wrong and bad. Fix this by handling more cases. We're still not fully general here, and this could still be wrong on big-endian. The XXX comment about doing something less ugly still applies, ideally we would get this information out of EGL instead of making lucky guesses. Still, better than it was. Fixes: xorg/xserver#824 commit 2afee831a439add6cca5b7fa8c76a9de4326b2b7 Author: Jon Turney Date: Thu Jan 5 13:17:59 2017 +0000 hw/xwin: Add an option to use alpha channel in multiwindow mode Add an option to turn on the use of the X window's alpha channel in multiwindow mode, i.e. this uses the X window's alpha channel for compositing into the native desktop. This works on W7/Vista (using DwmEnableBlurBehindWindow()), and Windows 10 (using the undocumented SetWindowCompositionAttribute()), but not on Windows 8/8.1 -compositewm must be enabled for this to be useful, as we only have a pixmap with an alpha channel for the X window in that case. The framebuffer/root window doesn't have one (unless perhaps you are using the rootless extension, maybe...). v2: Update meson.build Future work: A window property to control use of alpha? Option to turn off blur on W7/Vista Implement _NET_WM_WINDOW_OPACITY commit 2e1bc743734cc1e1043c8f2c9497a5a172507bc9 Author: Jon Turney Date: Tue Dec 1 19:33:38 2015 +0000 hw/xwin: Set convenience variables for WM_CREATE as well Set convenience variables in winTopLevelWindowProc() for WM_CREATE as well. commit f67918353a14dad8aa75c965e036d106e7d2d1a4 Author: Jon Turney Date: Sat Nov 7 19:44:09 2015 +0000 hw/xwin: Improve performance of -compositewm I think that a major cost in the current implementation is doing a CreateDIBSection()/DestroyObject() on every refresh. So provide our own CreatePixmap() instead, which does the CreateDIBSection(), once. Testcase: glxgears or foobillard with direct swrast Testcase: scrolling in a full-screen xterm v2: Fix handling of RENDER Scratch Pixmaps (A problem easily shown with gitk or emacs) v3: Note that we don't own screen pixmap to release in DestroyPixmap Log if unimplemented slow-path ever gets hit commit 6865fe71477206d989f982235fc32be4ff164ccd Author: Jon Turney Date: Mon Aug 10 20:16:16 2015 +0100 hw/xwin: Avoid artefacts when resizing a window Fill the area outside the current window size with black, rather than leaking framebuffer contents or leaving it undrawn. commit ebcea16e71cd9c037351f2dc4527ca696346c8a6 Author: Jon Turney Date: Mon Aug 3 16:47:38 2015 +0100 hw/xwin: A simpleminded attempt at composition Rather than drawing the window contents from the shadow framebuffer, use Composite extension redirection to cause the server to maintain a bitmap image of each top-level X window, and draw the window contents from that, so that window contents which are occluded in the framebuffer show correctly in the task bar and task switcher previews. v2: Fix incorrect use of memset() found by gcc5 hw/xwin/winshadgdi.c: In function ‘winBltExposedWindowRegionShadowGDI’: hw/xwin/winshadgdi.c:861:9: warning: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args] v3: Turn on -compositewm by default v4: Ignore -swcursor if -compositewm -swcursor is not compatible with -compositewm (because the window contents are drawn from an off-screen pixmap, not from the screen pixmap, where the software cursor will be drawn). v5: Update meson.build also Add -compositewm option to help output Update CI to install prerequisites commit adebc376b9fbda53d234a27f11eea9a0b945b50e Author: Jon Turney Date: Mon Aug 3 15:59:40 2015 +0100 hw/xwin: Push multiwindow wndproc WM_PAINT down into drawing engine Push the multiwindow wndproc WM_PAINT handling down into the drawing engine. Only the GDI engine is supported in multiwindow mode currently, so we only need to do this in the GDI engine. commit 065f73353bfa5667e0fb4f42e338978b40e86652 Author: Jon Turney Date: Mon Aug 3 11:39:36 2015 +0100 hw/xwin: Align winBltExposedRegionsShadowGDI with winTopLevelWindowProc's WM_PAINT Make winBltExposedRegionsShadowGDI() do the same stuff that winTopLevelWindowProc()'s WM_PAINT handler does. Note that winBltExposedRegionsShadowGDI() is currently used 1) in windowed mode when the GDI engine is selected, and 2) in multiwindow mode when "Hide Root Window" is off. commit f4cdbf640b6440df4af784ca35e1b1340965cc10 Author: Peter Hutterer Date: Wed May 29 16:19:55 2019 +1000 Xi: return AlreadyGrabbed for key grabs > 255 We can't have high keycodes because everything in XKB relies on 8 bits. XI2's API allows for 32-bit keycodes so we have to take those but nothing in the server is really ready for this. The effect of this right now is that any high keycode grab is clipped to 255 and thus ends up grabbing a different key instead. https://bugzilla.redhat.com/show_bug.cgi?id=1697804 Signed-off-by: Peter Hutterer commit dea4a74621294391ce5901bb3339e1b8e7151efc Author: Carlos Garnacho Date: Wed May 22 17:51:04 2019 +0200 xwayland: Reset scheduled frames after hiding tablet cursor Hiding the tablet tool cursor results in it being hidden forever after. This is due to the stale frame callback that will neither be disposed or replaced. This can be reproduced in krita (X11) as the pointer cursor is hidden while over the canvas. Clearing the frame callback ensures the correct behavior in future xwl_tablet_tool_set_cursor() calls (i.e. a new cursor surface being displayed, and a new frame callback created), and is 1:1 with xwl_seat_set_cursor() for pointers. Signed-off-by: Carlos Garnacho commit 26fe29f4fa53cbb7d51892e2cf397c084093812f Author: Olivier Fourdan Date: Fri Apr 26 13:37:09 2019 +0200 glamor: Make pixmap exportable from `gbm_bo_from_pixmap()` If a pixmap is not exportable, `glamor_gbm_bo_from_pixmap()` would fail and the modesettings driver would consequently fail to do its page flip, which both prevents Present from working and also fill up the logs with error messages such as: (EE) modeset(0): Failed to get GBM bo for flip to new front. (EE) modeset(0): present flip failed Refactor the code so that `glamor_gbm_bo_from_pixmap()` takes care of making the pixmap exportable. Signed-off-by: Olivier Fourdan Signed-off-by: Yuxuan Shui yshui@hadean.com See-also: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/131 Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/68 Fixes: 86b2d8740a "glamor: Reallocate pixmap storage without modifiers if necessary" commit 48f4ab750955106cd650bb5d3fb1c44d7696aafa Author: Olivier Fourdan Date: Tue Mar 12 17:25:41 2019 +0100 xwayland: check `glamor_set_pixmap_texture()` status With `glamor_set_pixmap_texture()` returning its status, remove the hack and use the return value. Signed-off-by: Olivier Fourdan commit 9e37e41fa78a33b95fd78e92b74b961086ab712b Author: Olivier Fourdan Date: Tue Mar 12 17:15:10 2019 +0100 glamor: return status from `glamor_set_pixmap_texture()` Chnage the API for `glamor_set_pixmap_texture()` to return a status, so that the caller can know whether it succeeded or not. Signed-off-by: Olivier Fourdan commit fc6380a11be4c6202ed72f241dd9ee8c7c24671d Author: Olivier Fourdan Date: Tue Mar 12 15:38:03 2019 +0100 xwayland: Check status in GBM pixmap creation The current code in `xwl_glamor_gbm_create_pixmap_for_bo()` may fail in several cases that are not checked for: - `eglCreateImageKHR()` may have failed to create the image, - `glEGLImageTargetTexture2DOES()` may fail and set an error, - `glamor_set_pixmap_texture()` may fail for very large pixmaps because the corresponding FBO could not be created. Trying to upload content to a pixmap with no texture will crash Mesa, glamor and Xwayland, e.g.: XXX fail to create fbo. (EE) (EE) Backtrace: (EE) 0: Xwayland (OsSigHandler+0x29) (EE) 1: libpthread.so.0 (funlockfile+0x50) (EE) 2: libc.so.6 (__memmove_avx_unaligned_erms+0x215) (EE) 3: dri/i965_dri.so (_mesa_format_convert+0xab3) (EE) 4: dri/i965_dri.so (_mesa_texstore+0x205) (EE) 5: dri/i965_dri.so (store_texsubimage+0x28c) (EE) 6: dri/i965_dri.so (intel_upload_tex+0x13b) (EE) 7: dri/i965_dri.so (texture_sub_image+0x134) (EE) 8: dri/i965_dri.so (texsubimage_err+0x150) (EE) 9: dri/i965_dri.so (_mesa_TexSubImage2D+0x48) (EE) 10: Xwayland (glamor_upload_boxes+0x246) (EE) 11: Xwayland (glamor_copy+0x4d1) (EE) 12: Xwayland (miCopyRegion+0x96) (EE) 13: Xwayland (miDoCopy+0x43c) (EE) 14: Xwayland (glamor_copy_area+0x24) (EE) 15: Xwayland (damageCopyArea+0xba) (EE) 16: Xwayland (compCopyWindow+0x31c) (EE) 17: Xwayland (damageCopyWindow+0xd3) (EE) 18: Xwayland (miResizeWindow+0x7b7) (EE) 19: Xwayland (compResizeWindow+0x3a) (EE) 20: Xwayland (ConfigureWindow+0xa96) (EE) 21: Xwayland (ProcConfigureWindow+0x7d) (EE) 22: Xwayland (Dispatch+0x320) (EE) 23: Xwayland (dix_main+0x366) (EE) 24: libc.so.6 (__libc_start_main+0xf3) (EE) 25: Xwayland (_start+0x2e) (EE) Fatal server error: (EE) Caught signal 11 (Segmentation fault). Server aborting (EE) Check for the possible cases of failure above and fallback to the regular glamor pixmap creation when an error is detected. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/661 commit 766bf01b21306ec6bcf5ca884c0af15bdcde25f6 Author: Adam Jackson Date: Thu May 16 15:48:14 2019 -0400 glamor: Fix more fallback paths with non-GXcopy rop with GLES Desktop GL can handle arbitrary rops here, GLES can't. The switch statement attempts to optimize some cases that GLES can still handle if we precompute the right pixel value, but we were then throwing that pixel value away and using gc->fgPixel anyway. Fix this, and now xts-render passes against glamor+gles. commit 8469241592b94b002a975274a596ca0dcdd9563f Author: Adam Jackson Date: Wed May 8 14:09:00 2019 -0400 xwayland: Add EGL-backed GLX provider Without this we're using driswrast to set up GLX visuals. This is unfortunate because llvmpipe does not expose multisample configs, so various apps that expect them will fail. With this we just query the capabilities of the EGL that's backing glamor, and reflect that to the GLX clients. This also paves the way for xserver to stop being a DRI driver loader, which is nice. Fixes: xorg/xserver#640 Fixes: xorg/xserver#643 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98272 Reviewed-by: Olivier Fourdan Signed-off-by: Adam Jackson commit b4231d69028adc8123801a7552b40a15ea928d1b Author: Aaron Plattner Date: Tue May 21 10:50:42 2019 -0700 GLX: Set GlxServerExports::{major,minor}Version Commit 56c0a71fdd94a008e5d746261f70a713c4767f93 incremented the GLXSERVER_VENDOR_ABI_MINOR_VERSION define, but this define was not actually being used to set glxServer.minorVersion. Update the initializer for glxServer to use the correct version numbers. Signed-off-by: Aaron Plattner commit 0a07446318f248b65fcbc8ab8a73ead51153f09e Author: Olivier Fourdan Date: Thu May 9 10:36:19 2019 +0200 xwayland: Avoid a crash on pointer enter with a grab On pointer enter notification, Xwayland checks for an existing pointer warp with a `NULL` sprite. In turn, `xwl_pointer_warp_emulator_maybe_lock()` checks for an existing grab and the destination window using `XYToWindow()` which does not check for the actual sprite not being `NULL`. So, in some cases, when the pointer enters the surface and there is an existing X11 grab which is not an ownerEvents grab, Xwayland would crash trying to dereference the `NULL` sprite pointer: #0 __GI_raise () #1 __GI_abort () at abort.c:79 #2 OsAbort () at utils.c:1351 #3 AbortServer () at log.c:879 #4 FatalError () at log.c:1017 #5 OsSigHandler () at osinit.c:156 #6 OsSigHandler () at osinit.c:110 #7 #8 XYToWindow (pSprite=0x0, x=0, y=0) at events.c:2880 #9 xwl_pointer_warp_emulator_maybe_lock () at xwayland-input.c:2673 #10 pointer_handle_enter () at xwayland-input.c:434 Avoid the crash by simply checking for the sprite being not `NULL` in `xwl_pointer_warp_emulator_maybe_lock()` Signed-off-by: Olivier Fourdan Bugzilla: https://bugzilla.redhat.com/1708119 commit 965eda947d4c847c6e520317b57024b4586507ec Author: Jon Turney Date: Thu Apr 25 23:11:08 2019 +0100 mi: Provide ffs when compiling using MinGW I don't know how I feel about the promise made in 2e7f790b :) commit a838c840a3f8c55157615f072b9a3c3a4b476b37 Author: Jon Turney Date: Thu Apr 25 22:44:49 2019 +0100 os: Ensure sigset_t is provided when compiling for MinGW Only _sigset_t is defined by MinGW's signal.h commit 7b4b030df8f9c994f3dc60cf85e74d234464af28 Author: Jon Turney Date: Thu Jul 28 14:46:15 2016 +0100 configure: Check for sigprocmask MinGW defines SIG_BLOCK, but doesn't have signal masks, so rather than checking for SIG_BLOCK, add a configure check for sigprocmask. v2: Also add check to meson.build commit 6c5d048095379a85f1862429b9049edc1c82e167 Author: Jon Turney Date: Thu Jul 28 14:09:51 2016 +0100 os: Fix build of xserver_poll.c on MinGW Include winsock.h for definition of fd_set type and select() Future work: Maybe this also needs some error checking for fd > FD_SETSIZE? commit 246b729df87e94e405a8b257f34a22fa2719d30c Author: Jon Turney Date: Thu Jul 28 14:26:38 2016 +0100 configure: Force --disable-input-thread for MinGW I don't think an input thread can ever be useful on Windows. There is a pthread emulation, so having the thread itself isn't much of a problem. However, there is no device to wait on for Windows events, and even if we were to replace select() with WFMO, Windows wants to send events for a window to the thread which created that window. So, disable input thread by default for MinGW v2: Also add similar to meson.build commit 29a8baa031a87ef44d1e5320ecec5015d26fd385 Merge: 2aec5c3c8 56c0a71fd Author: Aaron Plattner Date: Fri May 17 08:39:50 2019 -0700 Merge commit 'refs/merge-requests/194/head' of gitlab.freedesktop.org:xorg/xserver commit 56c0a71fdd94a008e5d746261f70a713c4767f93 Author: Kyle Brenneman Date: Thu May 2 07:17:21 2019 -0600 GLX: Add a function to change a clients vendor list. Add a new function, GlxServerExports::setClientScreenVendor, which will change the vendor that handles GLX requests for a screen, but only for requests from a specific client. v2: Increment the GLXVND minor version number. v3: Note the GLXVND version requirement for setClientScreenVendor. Signed-off-by: Aaron Plattner Reviewed-by: Aaron Plattner Reviewed-by: Adam Jackson commit 8b67ec7cc6fda243480a5a8ca118b66242f3eb2c Author: Kyle Brenneman Date: Wed May 8 08:44:54 2019 -0600 GLX: Use the sending client for looking up XID's When GlxGetXIDMap looks up an unknown XID, it will now look up a vendor based on the screen number for the XID and the client that sent the current request. In GlxGetXIDMap, if the XID is for a regular X window, then it won't be in the (XID -> vendor) mapping, so we have to look up a vendor by screen number. With this change, GlxGetXIDMap will use the (screen -> vendor) map for whichever client sent the current request, instead of using the global (screen -> vendor) map. Since GlxGetXIDMap doesn't take a ClientPtr argument, GlxDispatchRequest will store the client for the current request in a global variable. That way, the ABI for GLXVND doesn't need to change. v2: Fix an error check in GlxDispatchRequest. Signed-off-by: Aaron Plattner Reviewed-by: Aaron Plattner Reviewed-by: Adam Jackson commit 37a36a6b5b887d5c5a17a6931ceba8ad5d1bb6d5 Author: Kyle Brenneman Date: Thu Oct 19 15:14:51 2017 -0600 GLX: Add a per-client vendor mapping. Each client now has its own (screen, vendor) mapping. Currently, it's just a copy of the global mapping, but later changes will allow it to change. Signed-off-by: Aaron Plattner Reviewed-by: Aaron Plattner Reviewed-by: Adam Jackson commit 2aec5c3c812ffe4a85b5e62452b244819a812dd6 Author: Adam Jackson Date: Tue May 14 12:39:23 2019 -0400 glx: Fix potential crashes in glXWait{GL,X} glxc->drawPriv will be NULL if the context is direct, or if it is current but without a bound drawable. Mesa's libGL won't normally emit protocol for direct contexts for these calls, but a malign client could still crash the server. commit a0f738a67327ca1315bacdf543c28cc3046989dc Author: brian Date: Thu May 2 16:25:50 2019 -0500 Fixed ioperm calls in hwEnableIO commit bb46e785405891775a30636a647e40a7dc4d1ca7 Author: Topi Miettinen Date: Wed May 1 18:07:03 2019 +0300 os: add support for systemd notification It can take some time for Xorg to start. If Xorg runs as a systemd service and other services are based on it, they have no way to determine when Xorg is really ready to accept requests. Let's use sd_notify() provided by libsystemd to signal systemd for readiness. If Xorg has not been started as a systemd service, this won't do anything. Signed-off-by: Topi Miettinen commit 9d25408a59d6273f1c4c994de9cc53f488a8ec3c Author: Adam Richter Date: Thu May 2 15:02:36 2019 -0700 assert(a && b) --> assert(a); assert(b) Separate each statement of the form "assert(a && b);" into "assert(a);" and "assert(b);" for more precise diagnostics, except for this clever use in drmmode_display.c where it was used to pass a hint to developers: assert(num_infos <= 32 && "update return type"); commit dd1aebccf2e1722ac10fb73ed438251785283b8d Author: Jon Turney Date: Sat Apr 20 13:50:57 2019 +0100 travis: Suppress uninteresting warnings on OSX Suppress uninteresting warnings on OSX that we are drowning in, turned on by default in meson. commit f0e22a76c93c98d67dbd5c966812b2901de5ed49 Author: Jon Turney Date: Fri Apr 19 15:37:22 2019 +0100 travis: Add OSX meson build to matrix Unfortunately, a 'brew update' is currently needed to get the meson >= 0.46.0 required by xserver. commit 0bdfa5bc0ab050ce74c2289178f2f89790e2c8ef Author: Jon Turney Date: Sat Apr 20 01:24:21 2019 +0100 travis: Don't produce fat binaries on OSX Trying to build fat binaries for multiple arches tickles a bug [1] in the framework detector in meson 0.50. Workaround this by not bothering building for x86, which is probably no great loss :S https://github.com/mesonbuild/meson/issues/5290 commit 655b1eb32e3f7f9ba587e878a691fbc9195e81f5 Author: Jon Turney Date: Thu Apr 18 17:06:41 2019 +0100 meson: Convert xquartz from autotools Differences from autotools: * Autotools defined NO_ALLOCA for OSX builds. I don't think we need this anymore as Xalloc.h is no longer used anywhere in the xserver. * X11.bin is linked with -u,miDCInitialize, and then libserver_mi provided to satisfy (just) that. It's been that way since the commit which added it. We can't write the equivalent in meson due to linker argument ordering issues, but do we really need to? * An explicit -Dsecure-rpc=false is required for OSX, since in meson we don't do the checks that XTRANS_SECURE_RPC_FLAGS did for the existence of the specific RPC functions required. commit e5f4c7c80b3f15b1941c530e58fbded0fd06a97e Author: Jon Turney Date: Fri Apr 19 14:03:58 2019 +0100 xquartz: Fix a typo in man page substitution The typo fixed in d69460159 was still present for this setting when added in ac439842. meson warns that there is no substitution with this name. commit ecf62b7ba6e7eba1a3f3a50d46eaf9f4f11550c4 Author: Jon Turney Date: Fri Apr 19 14:01:48 2019 +0100 meson: Build rootless extension commit b4ed20c4f118031305f6ce76dda4e325950b2958 Author: Jon Turney Date: Sat Apr 20 12:45:11 2019 +0100 Promote file containing date & time build was configured to top-level Promote the generated file containing the date & time build was configured to top-level. Rename it from xf86Build.h to buildDateTIme.h. Use it as well in XQuartz, stringize BUILD_DATE when needed. commit 71cff63c06a6b494dc8921270535f33fb78bd32b Author: Adam Richter Date: Wed May 1 15:22:15 2019 -0700 hw/dmx/glxProxy/glxcmds.c CreateContext(): free glxc->real_ids and glxc in a couple of error branches, per complaints from cppcheck. commit b6eb8cf03f5850d13ec21101ec1783a444aefcab Author: Adam Richter Date: Wed May 1 15:22:02 2019 -0700 hw/xfree86/os-support/linux/lnx_agp.c xf86GetAGPInfo(): free(info) in an error path, caught by cppcheck. commit 99904a3a7b10f8a8314e7ab6b8c4af41cb445693 Author: Adam Richter Date: Wed May 1 15:21:48 2019 -0700 hw/xwin/glx/indirect.c glxWinScreenProbe(): Add free(screen) that was missing from an error path. Caught by cppcheck. commit 007d812a832cf32b02542bbae13a3997e655171a Author: Adam Jackson Date: Tue Apr 30 13:40:43 2019 -0400 glx: Fix GLX_CONTEXT_RELEASE_BEHAVIOR_ARB handling None of this was getting compiled because we hadn't defined the macro (and aren't getting them from because reasons). Fix that. Fixes: xorg/xserver#684 commit a2302de6feb43dd10b159661d5fe7d2036c6c020 Author: Jon Turney Date: Thu Oct 13 14:20:14 2016 +0100 hw/xwin: Remove mwextwm mode This has always been described as 'experimental' We don't think this has any users: This mode has been disabled in Cygwin packages since March 2016. We've never provided the xwinwm WM for x86_64 Cygwin. No one has even asked where the option has gone. This leaves XQuartz as the only user of the rootless extension. Remove --enable-windowswm configure option Remove multiwindowextwm stuff from Makefiles Remove -mwextwm option Remove -mwextwm from man-page and help Un-ifdef XWIN_MULTIWINDOWEXTWM v2: Remove rootless include paths Remove windowswmproto from meson.build commit 504468d2cf56c6588342249c4625a0bfadf0751d Author: Jon Turney Date: Fri Apr 26 19:46:05 2019 +0100 meson: Don't use strndup() unless it's prototyped A workaround for https://github.com/mesonbuild/meson/issues/3672 MinGW-w64 gcc has a built-in strndup, but it's not in the C library and MinGW-w64 headers don't prototype it. Don't try to use it, as that will cause an undefined reference if gcc decides that an out-of-line call is appropriate. commit d3a528c91ec77b29d4d70091f5eb6939919a19ab Author: Jon Turney Date: Thu Apr 25 23:21:46 2019 +0100 Remove unneeded include of dix.h from strcasestr.c In the meson build, functions to make up for the shortcomings of libc are compiled into a separate library. We don't bother making the pixman headers available (reasonably enough) to this compilation, but they are required indirectly by dix.h. Just remove this unneeded include. commit fd52110ec44b97359c2d75bb54047e6de10ed856 Author: Jon Turney Date: Fri Apr 26 01:09:25 2019 +0100 meson: Don't try to build tests on Windows Most of these could be made to work, but would need to be ported off using fork and poll... commit 50b8670fdf7ab9195617145c229d8fae8519f5a9 Author: Jon Turney Date: Fri Apr 26 01:00:28 2019 +0100 meson: Require clock_gettime() as well for MONOTONIC_CLOCK As configure.ac, require that clock_gettime() exists as well to use MONOTONIC_CLOCK (MinGW provides the define, but not the function) commit 92a52611f6ee2777cb11d5125c04a983b9a662d1 Author: Jon Turney Date: Fri Apr 26 00:46:09 2019 +0100 meson: Link with ws2_32 for socket functions on Windows commit d21224cd150e28c2868c8d194e68fe4474cdce1b Author: Jon Turney Date: Fri Apr 26 00:32:29 2019 +0100 meson: Don't set UNIXCONN on Windows As XTRANS_CONNECTION_FLAGS did, don't try to build unix socket support on Windows. commit 93a1cdcc78bc909e25a224b76ae8f6a90322d0ba Author: Jon Turney Date: Thu Apr 25 14:53:38 2019 +0100 meson: Fix hw/xwin for -Dglx=false hw/xwin/meson.build:140:0: ERROR: Unknown variable "xwin_windowsdri". hw/xwin/meson.build:141:0: ERROR: Unknown variable "xwin_glx". commit 331850ce6f0c48a1cfc489da2a27ca0220997a2f Author: Jon Turney Date: Thu Apr 25 14:39:58 2019 +0100 meson: Fix value of libglxvnd in -Dglx=false build hw/vfb/meson.build:7:0: ERROR: '' is not a target. commit c2feeca1b008fb01b2128daef2dc361dfb193a41 Author: Jon Turney Date: Sun Apr 28 21:56:20 2019 +0100 meson: Absence of dri.pc is an error if building with GLX Currently, this can error if dri.pc isn't found, as we can't then get the value of pkgconfig variable from it: include/meson.build:199:10: ERROR: 'dri' is not a pkgconfig dependency I think we need DRI_DRIVER_PATH (only) when building GLX, even if dri2/3 isn't enabled, so we know where to load swrast_dri.so from. (For autotools, configure.ac directly calls `pkg-config --variable=dridriverdir dri`, the backticks swallowing any error, causing the value of this define to be empty if dri.pc isn't present) commit 1f5742d27187fabba0c556b50ebfcd9fddfdcf2b Author: Jon Turney Date: Mon Dec 17 12:01:59 2018 +0000 meson: Fix building unit tests when protocol headers aren't in default include path commit f013979507da96377fad0e58b0699d9de051bb39 Author: Jon Turney Date: Thu Apr 18 11:37:32 2019 +0100 xquartz: Add stub ddxInputThread() Omitted from 4ad21c32 commit 836f93de99b35050d78d61d3654f7c5655184144 Author: Fabrice Fontaine Date: Fri Apr 19 10:19:50 2019 +0200 hw/xwayland/Makefile.am: fix build without glx Commit d8ec33fe0542141aed1d9016d2ecaf52da944b4b added libglxvnd.la to Xwayland_LDFLAGS but GLX can be disabled through --disable-glx. In this case, build fails on: make[3]: *** No rule to make target '../../glx/libglxvnd.la', needed by 'Xwayland'. Stop. make[3]: *** Waiting for unfinished jobs.... Fixes: - http://autobuild.buildroot.org/results/397f8098c57fc6c88aa12dc8d35ebb1b933d52ef Signed-off-by: Fabrice Fontaine commit 0854732d55a76cdb584306e8e653c2bcd292a7cb Author: Diego Viola Date: Fri Apr 19 22:13:46 2019 -0300 ephyr: fix typo: rquires -> requires Signed-off-by: Diego Viola commit 9c7ebf259f49f5e63906f572a1101747ac023b72 Author: Jon Turney Date: Sun Sep 17 14:55:04 2017 +0100 appveyor: Use ccache Reduces i686 cygwin no-change build time from ~7 minutes to ~2.5 minutes commit 16d851375994332844fd434ed91fc6c0c24f8983 Author: Jon Turney Date: Thu Apr 18 12:44:40 2019 +0100 appveyor: Drop cleaning of packaged libtool .la files Not needed as meson doesn't use libtool. I think they've all been rebuilt now, in any case... commit f3e6002d79aa51633ef06e34c2b13553ae008218 Author: Jon Turney Date: Thu Apr 18 12:01:54 2019 +0100 appveyor: Drop trying to preserve build artefacts We stopped staging them in 1519475a, so this did nothing. commit 883530835d463124fcc9bc6143ef139819f6c981 Author: Jon Turney Date: Thu Apr 18 12:07:34 2019 +0100 appveyor: Drop installing unnecessary packages Drop installing packages which were used by the autotools build (or maybe even monolithic build!) but are no longer required by the meson build Also, alphabetically sort within tools, protocol headers, devel libraries, miscellaneous groups to match [1] [1] https://x.cygwin.com/docs/cg/prog-build-prerequisites.html Also, update to require xkbcomp-devel, split from xkbcomp commit 6370cf026ae0d752b0f28d4a25fd22c60fea26f0 Author: Jon Turney Date: Wed Aug 8 17:29:55 2018 +0100 appveyor: Reformat an absurdly long line in .appveyor.yml Using YAML line-folding doesn't seem possible, as setup doesn't tolerate spaces between package names, so instead drop some unneeded double quotes, double quote the whole thing and escape newlines commit 7f962c70b6d9c346477f23f6c15211e749110078 Author: Alex Goins Date: Wed Apr 10 13:48:02 2019 -0500 xsync: Add resource inside of SyncCreate, export SyncCreate As shown by DRI3 adding the SyncCreateFenceFromFD() function, extensions may want to create a fence, then initialize it in their own way. This currently can't be done without adding a function directly to Xext/sync.c due to the fact that the RTFence resource type is private and there is no external interface to add to it. To facilitate other X extensions creating fences and initializing them, this change exports SyncCreate() and adds the resource directly within it. Callers no longer need to call AddResource() after SyncCreate(), they only need to initialize the SyncObject. To prevent FreeFence() and FreeCounter() from segfaulting if the call to AddResource() fails before the sync object is initialized, this adds a new 'initialized' parameter to SyncObject that, when FALSE, causes FreeFence() and FreeCounter() to skip de-initialization and simply free the object. Initialization after adding the resource shouldn't otherwise be a problem due to the single-threaded nature of X. Signed-off-by: Alex Goins Reviewed-by: James Jones Signed-off-by: Aaron Plattner commit 8702c938b33b9ec180d64754eb922515c7c4a98b Author: Eric Anholt Date: Tue Mar 26 15:10:49 2019 -0700 glamor: Introduce a central place for our pixmap format/type handling. We had various helper functions trying to come up with the internalformat/format/type/render formats for pixmaps, and it's much nicer to just detect what those should be once at startup. This gives us a chance to do the right thing for GLES. It also, notably, fixes our format/type for depth 15 and 16 setup for desktop GL, so that we actually allocate 16bpp (GL_RGB/565) on most drivers instead of 32bpp (GL_RGB/UBYTE). GLES still has regressions over desktop (2 regressions in llvmpipe XTS, many in rendercheck), but I think this is a good baseline. Signed-off-by: Eric Anholt commit c94da112a77bfc8c6b45ffe31c04e6b7931a3c9a Author: Eric Anholt Date: Tue Mar 26 16:57:24 2019 -0700 glamor: Plumb the pixmap through fbo creation instead of a "format" For GLES, we're going to need a lot more logic for picking the iformat/format/type of texture setup, so we'll want the pixmap's depth and is_cbcr flag. Signed-off-by: Eric Anholt commit 34485be2560ea6f96a849b5d05edb1de28caf2f3 Author: Eric Anholt Date: Tue Mar 26 15:58:59 2019 -0700 glamor: Stop trying to store the pixmap's "format" in glamor_pixmap_fbo. "format" is a bit of a confused term (internalformat vs GL format), and all we really needed was "is this GL_RED?" Signed-off-by: Eric Anholt commit 1b2e224d7dca9d6d86d6150ba0a5ddf0abee1f22 Author: Eric Anholt Date: Tue Mar 26 15:02:38 2019 -0700 glamor: Switch the gl_flavor to a boolean is_gles. There are only 2 flavors we are distinguishing -- GL versions are handled separately. Signed-off-by: Eric Anholt commit 2764128e9fe775fabe28b0b9be427c16754e7128 Author: Jon Turney Date: Wed Apr 17 11:43:57 2019 +0100 Fix missing prototype warning for xf86_find_platform_device_by_devnum() ../hw/kdrive/src/kdrive.c:999:1: warning: no previous prototype for ‘xf86_find_platform_device_by_devnum’ [-Wmissing-prototypes] Place the same guards around this stub as are around including the hotplug.h header which declares the prototype. commit ba59427abae3a8b260e66fcfab90c9de96c3e01c Author: Jon Turney Date: Wed Apr 17 11:37:56 2019 +0100 Fix maybe-uninitialized warning in xf86NewInputDevice() If SYSTEMD_LOGIND is not defined, systemd_logind_take_fd is defined as a macro evaluating to -1 by systemd-logind.h, leaving paused uninitialized. ../hw/xfree86/common/xf86Xinput.c: In function ‘xf86NewInputDevice’: ../hw/xfree86/common/xf86Xinput.c:919:16: warning: ‘paused’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xfree86/common/xf86Xinput.c:877:10: note: ‘paused’ was declared here commit 7c266cafed14b38c039091651069ae9888c3a8ae Author: Jon Turney Date: Wed Apr 17 11:37:11 2019 +0100 Fix old-style definition warning for xf86OSInputThreadInit() ../hw/xfree86/os-support/stub/stub_init.c: In function ‘xf86OSInputThreadInit’: ../hw/xfree86/os-support/stub/stub_init.c:29:1: warning: old-style function definition [-Wold-style-definition] commit 6975807945d12c07f00e18df7fafeff43efa0267 Author: Adam Jackson Date: Thu Mar 14 16:37:35 2019 -0400 dix: Remove WindowRec::backStorage This is only being set, never read. commit 0f477cc68bbfe37555f73313dcc50b303c3ca210 Author: Adam Jackson Date: Thu Mar 14 16:34:40 2019 -0400 dix, composite: Optimize setting window backing store state We hide CWBackingStore from the screen hook if nothing's actually changing, which means compChangeWindowAttributes no longer needs to compare the requested state with the present one. commit 4e101e7e3b4d3e6cdb38f1cd60a764aaade5c4a2 Author: Adam Jackson Date: Thu Mar 14 16:19:02 2019 -0400 mi: Simplify a conditional in miHandleExposures miHandleExposures does two things: computes the region for which to generate expose events, and (if the destination is a window) paints the exposed regions with the background. The bit of this conditional we're deleting here asserts that the source is either a pixmap or a window without backing store. The only other possibility is a window _with_ backing store. In the old backing store implementation, this was where you would recover bits from backing store. Since our "backing store" is the redirected window pixmap, we know we've already copied all we could, because CopyArea had already seen the entire window pixmap. So now in that third case, we are still drawing to a pixmap (so there's no background to paint) and we are still not generating events, so we can exit early. The comment above the function about recovering bits from backing store is clearly misleading, so delete that too. commit 147ed28bbf78f6b75a22b21458785aea536e44f8 Author: Aaron Plattner Date: Wed Apr 3 13:11:14 2019 -0700 xfree86: Export xf86GPUScreens and xf86NumGPUScreens Drivers may need to loop over the allocated screens during PreInit, for example to consolidate xorg.conf options that apply to a GPU device as a whole. Currently, this works for protocol screens becuase x86Screens is exported, but does not work for GPU screens. Export xf86GPUScreens and xf86NumGPUScreens for consistency with xf86Screens and xf86NumScreens. Signed-off-by: Aaron Plattner commit 0a005c4fe4fccc9bb6c3a5266065f8437621fdb9 Author: Eric Anholt Date: Thu Apr 4 16:26:26 2019 -0700 test: Fix meson build with xvfb disabled. Fixes #678 Signed-off-by: Eric Anholt commit 8ab80fd5057f3d954ac6dc310cc8773e9694a0b1 Author: Dave Airlie Date: Fri Mar 29 08:44:07 2019 +1000 xf86: set status to connected for monitors enabled in conf If the user sets Option "Enable" "TRUE" for a monitor, the X server will connect the connector a crtc but tell the user it is disconnected. However the user in this case is mutter, when it gets it's view of the output configuration it sees the output is disconnected and never sets it up again, which seems like the right thing to do. If we let the user enable a monitor, lets just set it as always connected. Reviewed-by: Olivier Fourdan Signed-off-by: Dave Airlie commit f1790339d0c4cf09aa1b3f68c01d66eab1901718 Author: Jon Turney Date: Sun Mar 31 16:35:16 2019 +0100 tests: Always separate rendercheck -f and -o options with a space commit fee147d75eef91be8cbfdd77dd444cc65c29b038 Author: Michel Dänzer Date: Fri Mar 29 10:12:40 2019 +0100 gitlab-ci: Retry jobs after runner system failures Up to twice, for a total of 3 attempts maximum. This will hopefully avoid spurious CI pipeline failures due to intermittent GitLab/docker infrastructure issues. Inspired by https://gitlab.freedesktop.org/mesa/mesa/commit/6140ed3d2c5409bcdb5c0879411690ef222b086c Reviewed-by: Eric Anholt commit b5ef99f26ab5fdc5e9b4f63c977de3cb0f4d5d4f Author: Michel Dänzer Date: Fri Mar 29 10:01:20 2019 +0100 gitlab-ci: Simplify autotools job script Drop the verbose test log output, matching the meson job script. Reviewed-by: Eric Anholt commit 35561d4d1e2bc168affdadd74e73ae5321c43a8a Author: Michel Dänzer Date: Fri Mar 29 09:58:21 2019 +0100 gitlab-ci: Simplify meson job script This way, the second ninja command line will be visible again as well in the job output. Reviewed-by: Eric Anholt commit 4adda1f6359fd96436dd61d0250b84f55b2fd277 Author: Roman Gilg Date: Fri Mar 29 10:55:31 2019 +0100 present: Call present_vblank_scrap in screen mode This cleans up some code duplication. No functional change. Signed-off-by: Roman Gilg Reviewed-by: Michel Dänzer commit d7b1753d446ecde3ff58e3de39a634c3137473c8 Author: Peter Hutterer Date: Mon Mar 25 13:19:41 2019 +1000 dix: leave last.valuators alone on slave switch Terms: dev->last.valuator[] is the last value given to us by the driver dev->valuator.axisVal[] is the last value sent to the client dev->last.scroll[] is the abs value of the scroll axis as given by the driver, used for button emulation calculation (and the remainder) This function updates the device's last.valuator state based on the current master axis state. This way, relative motion continues fluidly when switching between devices. Before mouse 2 comes into effect, it's valuator state is updated to wherever the pointer currently is so the relative event applies on top of that. This can only work for x/y axes, all other axes aren't guaranteed to have the same meaning and/or may not be present: - xtest device: no valuator 2 - mouse: valuator 2 is horizontal scroll axis - tablet: valuator 2 is pressure Scaling the current value from the pressure range into the range for horizontal scrolling makes no sense. And it causes scroll jumps: - scroll down, last.valuator == axisVal == 20 - xdotool click 1, the XTest device doesn't have that valuator - scroll up - updateSlaveDeviceCoords reset last.valuator to 0 (axisVal == 20) - DeviceClassesChangedEvent includes value 20 for the axis - event is processed, last.value changes from 0 to -1 - axisVal is updated to -1, causing a jump of -21 The same applies when we switch from tablet to mouse wheel if the pressure value is 0 on proximity out (basically guaranteed). So let's drop this code altogether and only leave the scaling for the relative x/y motion. Signed-off-by: Peter Hutterer commit 3b26b90cb787a14fa5f8bb2033eab8ab6562a9a5 Author: Eric Anholt Date: Mon Mar 25 16:30:18 2019 -0700 glamor: Fix a compiler warning since the recent OOM fixes. Signed-off-by: Eric Anholt commit a63d796ce02ae94a016e6ec027fdf0d4bff68805 Author: Eric Anholt Date: Tue Mar 26 11:30:55 2019 -0700 gitlab-ci: Build and test glamor using Xephyr. I keep wanting this when reviewing people's glamor patches. Signed-off-by: Eric Anholt commit ce5242fa2eef25c9921311480401bda6cd8952be Author: Eric Anholt Date: Tue Mar 26 13:38:22 2019 -0700 gitlab-ci: Build and install a current version of rendercheck. For really testing glamor, we want it installed. Use master instead of whatever version is in repos, because we'll want to update when new tests are added. Signed-off-by: Eric Anholt commit 2a2f0ac3a99f32e6e5cc23003360534400d8f445 Author: Eric Anholt Date: Tue Mar 26 13:35:41 2019 -0700 gitlab-ci: Make shallow clones of git trees we'll be nuking at the end. We only check out master, and delete .git when we're done, so save the bandwidth. Signed-off-by: Eric Anholt commit 0dc271690b0841473e442ffbf97464876234a7c8 Author: Eric Anholt Date: Tue Mar 26 13:33:09 2019 -0700 gitlab-ci: Don't bother building piglit. We don't use any of piglit's tests, just the framework. Signed-off-by: Eric Anholt commit 8c1dac5f83fba8fcd51f68214c0c5cf5d14ed2a7 Author: Eric Anholt Date: Tue Mar 26 12:58:39 2019 -0700 gitlab-ci: Install Mesa so we can test glamor. We need the DRI swrast driver (for GLX in vfb), and also libgl (for libepoxy in glamor) Signed-off-by: Eric Anholt commit 3f3c489e51e1b8a82adee9c7c5942dadf218b70d Author: Eric Anholt Date: Tue Mar 26 11:06:00 2019 -0700 test: Trim the Render ops that we test the composite paths on. We cover all Render ops under the "blend" group, so when we're doing the cross products of some formats for the masking operation, skip most of the ops (covering just zero, one, and src/dst alpha blend factors along with a definitely non-glamor-accelerated one) . All the tests now complete in <20s of runtime on my skylake. Signed-off-by: Eric Anholt commit 58c168ad93d770a3c48cc07daaa8a2acd1c0729d Author: Eric Anholt Date: Tue Mar 26 10:21:29 2019 -0700 test: Execute rendercheck tests without using piglit. This gets us parallelism between rendercheck tests at the cost of spinning up more Xvfbs, and nicer logging of the tests that are run. Signed-off-by: Eric Anholt commit 82aab622952197003799d756f06881b2c7df48bc Author: Eric Anholt Date: Wed Mar 27 09:47:41 2019 -0700 docker: Stop dumping long-summary and meson test logs in the CI logs. I've found that it's hard to find the original error in a dump full of xserver debug spam for the passing cases, and when I needed to look at this I end up using a proper editor on the file from the artifacts view anyway. Signed-off-by: Eric Anholt commit 05ded049acaa90ba07295f939910c22bb1e10e3a Author: Eric Anholt Date: Tue Mar 26 13:43:05 2019 -0700 test: Skip a few tests on glamor that are known to fail on llvmpipe. Signed-off-by: Eric Anholt commit 30369c6345250d71ef9ca5b12e4991c601e350c6 Author: Eric Anholt Date: Wed Mar 27 09:45:34 2019 -0700 gitlab-ci: Add a note about where to manage your containers. Michel noted that I could do this instead of bumping the tag as I developed, so leave that note for the next person. Signed-off-by: Eric Anholt commit 164a37eac2a5e7390f69ce152796df54e2f00d98 Author: Eric Anholt Date: Tue Mar 26 10:59:27 2019 -0700 simple-xinit: Introduce an escaped "--" argument. For testing xephyr-glamor on top of Xvfb in CI better, I want to be able to make one command line describing the nested server invocation, but that means I need to get two simple-xinits to split client/server on different "--" arguments. Signed-off-by: Eric Anholt commit 29aed56ec72d2e95dba8975eb44f385a5f6ef1ff Author: Eric Anholt Date: Tue Mar 26 12:26:34 2019 -0700 simple-xinit: Avoid hanging if the server fails to set up the display fd. Early fatal errors may leave us with nothing in the displayfd pipe, and we'd block forever. Signed-off-by: Eric Anholt commit f7069723093de585d082cfd98f0191d163569a78 Author: Benjamin Tissoires Date: Mon Mar 18 11:09:29 2019 +0100 CI: use wayland-ci-templates to manage the images There shouldn't be a difference for users, but this way we do manage all of our containers from freedesktop.org Signed-off-by: Benjamin Tissoires Reviewed-by: Michel Dänzer commit 5a549c957a873bd44ab351e627828905ee7dbf18 Author: Michael Biebl Date: Wed Jan 24 04:05:47 2018 +0100 Revert "systemd-logind: Monitor systemd-logind going away" systemd-logind since version 234 (released 2017-07-12) supports being restarted without losing state [1]. From the systemd NEWS file [2]: * systemd-logind may now be restarted without losing state. It stores the file descriptors for devices it manages in the system manager using the FDSTORE= mechanism. Please note that further changes in other components may be required to make use of this (for example Xorg has code to listen for stops of systemd-logind and terminate itself when logind is stopped or restarted, in order to avoid using stale file descriptors for graphical devices, which is now counterproductive and must be reverted in order for restarts of systemd-logind to be safe. See https://cgit.freedesktop.org/xorg/xserver/commit/?id=dc48bd653c7e101.) This reverts commit dc48bd653c7e1013e2d69e3f59ae3cbc0c893473. Closes: #531 [1] https://github.com/systemd/systemd/pull/5600 [2] https://github.com/systemd/systemd/commit/9f09a95a7e6127f526c0ef7b6fd060cc0b01cdcc commit f3567600cff5e91cbc2110cd72ce3fefbb8cab3a Author: Jon Turney Date: Thu Mar 14 17:15:52 2019 +0000 meson: handle missing xkbcomp.pc better Applying get_pkgconfig_variable() to a not-found dependency was always documented as an error, but meson 0.49 now actually raises an error[1]: meson.build:110:4: ERROR: 'xkbcomp' is not a pkgconfig dependency Check xkbcomp_dep is a suitable dependency type before applying get_pkgconfig_variable() to it. [1] but this is more by accident than design (see the discusssion at [2] et seq.), so who knows where things will come to rest... [2] https://github.com/mesonbuild/meson/pull/4444#issuecomment-442443301 commit ef91da2757050652c724f6e674e8b1acf5d0cb31 Author: Michel Dänzer Date: Wed Feb 27 18:29:50 2019 +0100 present/scmd: Check that the flip and screen pixmap pitches match If they don't, flipping will result in corrupted display. Test case: * Run Xorg at 1920x1080 with no window manager * glxgears -geometry 2048x1080 commit 9114c4341cec91ed41c9527c88200b7712357951 Author: Jon Turney Date: Wed Mar 13 13:25:02 2019 +0000 meson: Drop a meson version check Drop some code conditional on meson version, which is not needed since 7e046b94 bumped the minimum meson version commit c020769dbfb965740c8441d8242b738ef572a7c9 Author: Jon Turney Date: Wed Mar 13 14:57:14 2019 +0000 Add xf86OSInputThreadInit to stub os-support as well stub os support also needs to provide xf86OSInputThreadInit, omitted in ea1527a8 commit 2e18eec6f03cc4d9d5bf62853c65d341b363f4b3 Author: Michel Dänzer Date: Fri Mar 8 18:49:04 2019 +0100 xwayland/present: Destroy sync_callback in xwl_present_cleanup xwl_present_cleanup frees the struct xwl_present_window memory, so if there's a pending callback, we have to destroy it to prevent use-after-free in xwl_present_sync_callback. Should fix issue #645. Reviewed-by: Olivier Fourdan commit f665a9c9e6c8643f3050378249db3088ae3057be Author: Adam Jackson Date: Tue Sep 30 12:26:28 2014 -0400 mi: Shortcut miDoCopy/miCopyArea based on clipList This is maybe one more comparison, but it catches FullyObscured windows slightly earlier, so it's kind of a wash. The important thing is this allows for paintable but unmapped windows, which will have non-empty clipList. commit 3904216b01fd9dabee65e6cb120fa8aad5e8b459 Author: Adam Jackson Date: Wed Mar 6 17:03:58 2019 -0500 dix: Outdent Unmap{Window,Subwindows} a bit No functional change, just folding some conditionals together. commit 74479a99ecf18fdfdafd033b5efd8d785dd12c28 Author: Olivier Fourdan Date: Fri Mar 8 18:19:16 2019 +0100 glamor: pixmap FBO may not be allocated If `_glamor_create_tex()` fails to allocate the FBO because of GL_OUT_OF_MEMORY error, the `pixmap_priv->fbo` is NULL. However, `glamor_get_pixmap_texture()` doesn't actually check whether the `pixmap_priv->fbo` is NULL and will segfault with a NULL pointer dereference trying to access the `pixmap_priv->fbo->tex`. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/647 commit 8c4e8d9eff03cefc987f13c900b0a47403946127 Author: Paul Kocialkowski Date: Mon Mar 4 11:52:43 2019 +0100 glamor: Fallback to system memory for RW PBO buffer allocation We currently support two modes of operation for RW PBO buffers: one that allocates a pack buffer with GL memory and one that uses system memory when the former is not supported. Since allocation with system memory is less likely to fail, add a fallback to system memory when GL memory failed instead of bailing out. Signed-off-by: Paul Kocialkowski commit de6b3fac1f26075ce915006c914c4a4755617715 Author: Paul Kocialkowski Date: Mon Mar 4 11:38:20 2019 +0100 glamor: Propagate glamor_prepare_access failures in copy helpers glamor_prepare_access can fail for a few reasons, especially when failing to allocate a PBO buffer. Take this in account and bail in the copy helpers that call the helper when a failure happens. Signed-off-by: Paul Kocialkowski commit bc2e12239f86e5a4acd220744f42eb83ba55d328 Author: Paul Kocialkowski Date: Mon Mar 4 11:47:11 2019 +0100 glamor: Error out on out-of-memory when allocating PBO for FBO access Packed buffer allocation (which happens at glBufferData time with the buffer bound) can fail when there is no GL memory left. Pick up the error when it happens, print a proper error message, do some cleanup and bail. Signed-off-by: Paul Kocialkowski commit c98c7709c67d8ed6b7455ec700a49b58c396ec2c Author: Paul Kocialkowski Date: Mon Mar 4 11:24:26 2019 +0100 glamor: Propagate FBO allocation failure for picture to texture upload When uploading a picture to a texture, glamor_upload_picture_to_texture calls glamor_pixmap_ensure_fbo to ensure that there is backing FBO. The FBO will be allocated if the picture's drawable pixmap does not have one already, which can fail when there is no GL memory left. glamor_upload_picture_to_texture checks that the call succeeded and will enter the failure path if it did not. However, unlike many other functions in glamor, this one has ret set to TRUE initially, so it needs to be set to FALSE when a failure happens. Otherwise, the error is not propagated and the failure path return TRUE. This leads to a fault when trying to access the FBO pointer later on. Signed-off-by: Paul Kocialkowski commit e51ebc18a7fb5b30213b3b5e743cba1f2e7a0e83 Author: Andy Ritger Date: Wed Feb 13 13:20:52 2019 -0800 xfree86/modes: Add "NoOutputInitialSize" option Normally, the X server infers the initial screen size based on any connected outputs. However, if no outputs are connected, the X server picks a default screen size of 1024 x 768. This option overrides the default screen size to use when no outputs are connected. In contrast to the "Virtual" Display SubSection entry, which applies unconditionally, "NoOutputInitialSize" is only used if no outputs are detected when the X server starts. Parse this option in the new exported helper function xf86AssignNoOutputInitialSize(), so that other XFree86 loadable drivers can use it, even if they don't use xf86InitialConfiguration(). Signed-off-by: Andy Ritger Reviewed-by: Keith Packard commit 7e046b9467784451769af3a03db46e3c690063b0 Author: Adam Jackson Date: Tue Mar 5 11:31:29 2019 -0500 meson: Bump required meson version to 0.46 We were being naughty: WARNING: Project specifies a minimum meson_version '>= 0.42.0' but uses features which were added in newer versions: * 0.46.0: {'compiler.has_multi_link_argument', 'compiler.has_link_argument'} commit 0ec9a13c2a207e98e2dd6b352552c0e069af0727 Author: Michel Dänzer Date: Wed Feb 27 16:47:40 2019 +0100 Revert "gitlab-ci: Only run docker-image stage if relevant source files change" This reverts commit 8694395fcfd407190db74f31064960e484747377. Some scenarios have come to light where this failed to ensure the docker image exists: * If the master branch of a forked repository is used for an MR which doesn't modify .gitlab-ci.yml, the docker-image job may not run. * If the docker-image job of the first pipeline in a forked repository is cancelled or fails for any reason, and .gitlab-ci.yml isn't modified for the next pipeline run. commit 12769c516d9356bd92f90e2f53a4853dbfdc4aed Author: Alan Coopersmith Date: Thu Feb 21 15:38:07 2019 -0800 os-support/solaris: Set IOPL for input thread too Since the Solaris kernel tracks IOPL per thread, and doesn't inherit raised IOPL levels when creating a new thread, we need to turn it on in the input thread for input drivers like vmmouse that need register access to work correctly. Signed-off-by: Alan Coopersmith commit ea1527a8a662dcc5ac3ed49135740aa5f24f74bc Author: Alan Coopersmith Date: Thu Feb 21 15:35:38 2019 -0800 Add xf86OSInputThreadInit call from common layer into os-support layer Allows os backends to run additional code as necessary to set up the input thread. Signed-off-by: Alan Coopersmith commit 4ad21c3247d98ac6c5ad71fa36be60ed04f7c92c Author: Alan Coopersmith Date: Thu Feb 21 15:22:57 2019 -0800 Add ddxInputThread call from os layer into ddx layer Allows ddx's to run additional code as necessary to set up the input thread. Signed-off-by: Alan Coopersmith commit 7533fa9bd5a4a0f7743d553be186514d684308c8 Author: Alan Coopersmith Date: Thu Feb 21 14:51:22 2019 -0800 os-support/solaris: Drop ExtendedEnabled global variable Keeping track of kernel state in user space doesn't buy us anything, and introduces bugs, as we were keeping global state but the Solaris kernel tracks IOPL per thread. Signed-off-by: Alan Coopersmith commit 432fad04e7aaad1f10d732a51665ecbe934246c6 Author: Michel Dänzer Date: Fri Feb 22 10:22:49 2019 +0100 gitlab-ci: Run make distcheck in autotools build & test job We don't set the PIGLIT_DIR and XTS_DIR environment variables for make distcheck for now, otherwise it complains about files left behind by piglit. commit f9bbc9d5ead5cf298f0e3e0b7ac5229af830f6e7 Author: Michel Dänzer Date: Fri Feb 22 10:21:27 2019 +0100 glx,xquartz: Fix make distcheck Guard BUILT_SOURCES and CLEANFILES by XWIN_GLX_WINDOWS/XQUARTZ. commit 2f12c8017508f23195db92503435fc3ef183da4b Author: Michel Dänzer Date: Tue Feb 19 18:37:53 2019 +0100 gitlab-ci: Add autotools build & test job commit b577df77451d34e28cfef3bda5031a43caeba90a Author: Michel Dänzer Date: Thu Feb 14 17:39:24 2019 +0100 gitlab-ci: Use ccache Meson picks it up automatically. Based on: * https://gitlab.freedesktop.org/mesa/mesa/merge_requests/240 * https://gould.cx/ted/blog/2017/06/10/ccache-for-Gitlab-CI/ * https://stackoverflow.com/questions/53659419/ccache-no-hits-in-gitlab-ci v2 based on the corresponding Mesa change: * Quote CCACHE_(BASE)DIR environment variables. * Clear ccache stats in before_script. * Move cache stanza to the build-and-test job, the cache isn't used in the docker-image job. Reviewed-by: Adam Jackson # v1 commit 537f06e21ee2c4c88ee062c26555338257e043ef Author: Michel Dänzer Date: Tue Feb 19 18:16:16 2019 +0100 gitlab-ci: Add ccache to docker image, and leave in autotools We're going to make use of these in build & test jobs. commit f6753c117ef0f83499d5e2d6dda226fec9ddf803 Author: Alexander Volkov Date: Mon Feb 11 18:54:10 2019 +0300 shm: Use memfd_create when possible It doesn't require shared memory dir and thus allows to avoid cases when this dir is detected incorrectly, as in https://bugreports.qt.io/browse/QTBUG-71440 Signed-off-by: Alexander Volkov commit 678d64aa2e929368b6d6f2b83bbf5540c4fa292d Author: Peter Hutterer Date: Fri Feb 8 13:29:14 2019 +1000 Xi: lock the input thread for any pointer barrier list manipulation The input thread checks the barriers for pointer positioning, swapping the list out from underneath is considered impolite. Reported-by: Michel Dänzer Signed-off-by: Peter Hutterer Reviewed-by: Michel Dänzer commit fede384962edd175b1a2ce6edd8d2ef9b0fd74f0 Author: Michel Dänzer Date: Mon Feb 11 18:32:07 2019 +0100 gitlab-ci: Don't rely on $CI_PROJECT_NAME The name of a forked repository can be changed later, in which case this would fail to refer to the main repository. Pointed out by Eric Engestrom in https://gitlab.freedesktop.org/mesa/mesa/merge_requests/224 . commit 8694395fcfd407190db74f31064960e484747377 Author: Michel Dänzer Date: Thu Feb 7 17:35:13 2019 +0100 gitlab-ci: Only run docker-image stage if relevant source files change Otherwise there's normally no need to run it. It will also run when a new branch is created, which ensures that the docker image always exists (e.g. in a newly forked repository). Inspired by https://gitlab.freedesktop.org/mesa/mesa/merge_requests/143 commit 8f8d358bad2d33de36686e8405ade8b5b921cafd Author: Adam Jackson Date: Tue Jul 8 12:36:10 2014 -0400 ramdac: Remove core ramdac code Now that there are no ramdac drivers this can go. Signed-off-by: Adam Jackson commit f0385fb420158ac3bc1c4c325431ffc5c62344bb Author: Adam Jackson Date: Fri Feb 28 16:07:27 2014 -0500 ramdac: Remove ramdac drivers External RAMDACs are a very 1996 kind of thing, this code really doesn't belong in the server. Signed-off-by: Adam Jackson commit 937a5b78a2f6ea771132ff0f9ece708a23c1bdad Author: Peter Harris Date: Wed Jan 30 14:51:07 2019 -0500 os: Fix GetTimeInMicros resolution GetTimeInMillis is called first, which sets clockid to CLOCK_MONOTONIC_COARSE, which is typically much lower resolution than the callers of GetTimeInMicros want. Prior to a779fda224bee0c4d27636503367e55ae93b33c2, GetTimeInMillis and GetTimeInMicros did not share a clockid. Restore the clockid split to fix the granularity of GetTimeInMicros. Signed-off-by: Peter Harris commit a093a88531599832811a1ba5cb85101af91a545e Author: Michel Dänzer Date: Tue Jan 29 18:59:09 2019 +0100 present/wnmd: Allow flipping if the window pixmap matches the toplevel's Instead of testing window->redirectDraw. With Xwayland, the toplevel window is always redirected, so this would unnecessarily preclude flipping there in some cases, e.g. with wlroots based Wayland compositors or with fullscreen X11 windows in weston. Fixes issue #631. commit ff560488558deb299b0822a3e3bc66672f4c690f Author: Adam Jackson Date: Wed Jan 23 14:23:40 2019 -0500 dri2: Stop pretending VGA arbitration matters The VGA arbiter controls the PCI bus' routing of legacy VGA resources, specifically the video memory aperture at 0xa0000-0xb0000 (640k should be etc.) and a handful of I/O ports. Since 128k is far too small for a real framebuffer these days, every driver instead maps a linear version of VRAM through the PCI BAR. And no DRI2 drivers ever need I/O port access, because all operations they might be used for (legacy VGA CRTC setup, mostly) happen on the kernel side. In other words, this just works, and we can stop breaking it. Signed-off-by: Adam Jackson Reviewed-by: Dave Airlie commit d3a26bbf618507e1ca05b2bc99a880075b77db77 Author: A. Wilcox Date: Sat Jan 26 15:37:56 2019 -0600 DRI2: Add another Coffeelake PCI ID A user of Adélie Linux reported that modesetting wasn't working properly on their Intel i7-9700K-integrated UHD 630 GPU. Xorg.0.log showed: [ 131.902] (EE) modeset(0): [DRI2] No driver mapping found for PCI device 0x8086 / 0x3e98 [ 131.902] (EE) modeset(0): Failed to initialize the DRI2 extension. Indeed, that PCI ID is missing from i965_pci_ids. Adding it fixed the issue and allowed the system to work with i965_dri under modesetting. commit 709c6562975c3bea10dd0571527a4aac79a6bf6f Author: Adam Jackson Date: Tue Oct 16 12:58:25 2018 -0400 vnd: Fix a silly memory leak 'disp' was already allocated by LookupVendorPrivDispatch above, clobbering it will do no good. Signed-off-by: Adam Jackson commit bf991a5f989c5e6e726a3731f468b7b7d65d9f4a Author: Adam Jackson Date: Wed Jan 16 14:20:17 2019 -0500 mi: When {en,dis}abling extensions, match names case-insensitively Both because extension names are inconsistently capitalized on the wire, and because the table we're walking spells it COMPOSITE not Composite. The latter is certainly also a bug, but there's no reason for us to be that strict. Signed-off-by: Adam Jackson commit 086c2e3de55bbf0cbc1d97f7dc2db70a7f5e69e3 Author: Adam Jackson Date: Mon Jan 14 12:42:00 2019 -0500 dri3: Fix XACE access mode for open and get_supported_modifiers Neither opening a screen nor querying its modifiers confers the right to attach the buffer for any particular pixmap. GetAttr seems more correct. Fixes: xorg/xserver#550 commit 6c1d720047b193f138e877e994cb4a4fb8e73753 Author: Adam Jackson Date: Tue Oct 30 11:37:32 2018 -0400 agp: Make the legacy AGP interface optional The only thing using this anymore is the i810 driver, so this can safely be disabled on non-i686 builds. Signed-off-by: Adam Jackson commit 1e3f9ea14cced2ee894d072c977507ad43cb59c5 Author: Adam Jackson Date: Fri Jan 11 11:38:34 2019 -0500 randr: Remove funky indirection around the xf86 screen private key All of the null checks here are redundant, you can't get to those paths unless RANDR's already been initialized. Delete them, and remove the pointer too. Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer commit 30044b2253c2dd51e1aedb2f897159c657ca8f0d Author: Michel Dänzer Date: Wed Dec 5 18:31:27 2018 +0100 xfree86/modes: Don't clobber gamma LUT of compatibility output's CRTC If the driver calls xf86HandleColormaps, CMapChangeGamma updates the HW gamma LUT of all CRTCs via xf86RandR12LoadPalette. However, xf86RandR12ChangeGamma was then clobbering the gamma LUT of the RandR 1.2 compatibility output's CRTC with the gamma curves computed from the screen's global gamma values. Fix this by bailing if xf86RandR12LoadPalette is installed. Fixes: 02ff0a5d7e32 "xf86RandR12: Fix XF86VidModeSetGamma triggering a BadImplementation error" commit cc05c01925755310f027c61daa29648a10155f96 Author: Rohan Garg Date: Thu Dec 13 19:15:01 2018 +0100 glamor/glamor_egl.c: EGL_NATIVE_PIXMAP_KHR do not require contexts From https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_image_pixmap.txt * If is EGL_NATIVE_PIXMAP_KHR, and is not EGL_NO_CONTEXT, the error EGL_BAD_PARAMETER is generated. Fixes: a5321ea4 ("Allow to create textured pixmaps from gbm_bo without using gem names") commit 88dd4cea51f7e461cb4859c06bfe641890caa97b Author: Rohan Garg Date: Thu Dec 13 17:46:27 2018 +0100 glamor/egl: Drop a implicit depends on EGL_KHR_no_config_context Not all platforms provide EGL_KHR_no_config_context, this ensures that eglCreateContext works on such platforms by querying for a config. commit e3fb178617a579c98877a3baae14c4dfe4d55db8 Author: Maya Rashish Date: Thu Jan 10 14:55:17 2019 +0200 xfree86: Try nouveau on NetBSD as well. commit bf2a7bb4ffbd199882fe4bd183561469833a9e6b Author: Maya Rashish Date: Thu Jan 10 18:39:33 2019 +0200 Fix typo in error message commit e8295c50209f2963fa2823e8de7e8363a38cd2d1 Author: Olivier Fourdan Date: Tue Jan 8 12:48:53 2019 +0100 xwayland: handle case without any crtc Xwayland creates and destroys the CRTC along with the Wayland outputs, so there is possibly a case where the number of CRTC drops to 0. However, `xwl_present_get_crtc()` always return `crtcs[0]` which is invalid when `numCrtcs` is 0. That leads to crash if a client queries the Present capabilities when there is no CRTC, the backtrace looks like: #0 raise() from libc.so #1 abort() from libc.so #2 OsAbort() at utils.c:1350 #3 AbortServer() at log.c:879 #4 FatalError() at log.c:1017 #5 OsSigHandler() at osinit.c:156 #6 OsSigHandler() at osinit.c:110 #7 #8 main_arena() from libc.so #9 proc_present_query_capabilities() at present_request.c:236 #10 Dispatch() at dispatch.c:478 #11 dix_main() at main.c:276 To avoid returning an invalid pointer (`crtcs[0]`) in that case, simply check for `numCrtcs` being 0 and return `NULL` in that case. Thanks to Michel Dänzer for pointing this as a possible cause of the crash. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Bugzilla: https://bugzilla.redhat.com/1609181 commit bf5613f888e837641b9e16aacb36ffb43a9cccda Author: Roman Gilg Date: Wed Jan 2 21:55:23 2019 +0100 xwayland: Fix wm_fd readin with no listen_fds Since 08843efc KWin was not able to start a Wayland session. Independently of listen_fd_count add_client_fd must be called. Same holds for the wm_selection_callback. Therefore just remove the condition. Bugzilla: https://bugs.freedesktop.org/109220 Signed-off-by: Roman Gilg commit 7fb6338c68e158053295cb448faa5c559aa9990c Author: Alan Coopersmith Date: Tue Jan 1 16:49:32 2019 -0800 os: Report errors opening authorization file (#469) Fixes: xorg/xserver#469 Signed-off-by: Alan Coopersmith commit a3d01ee9d0b5e523b0771e2a26542ac15e29a33f Author: Michel Dänzer Date: Wed Dec 19 10:11:22 2018 +0100 glamor: Remove unused format_for_pixmap helper Reviewed-by: Eric Anholt commit 2e256e8260648619e407b1de70fe43cf32819247 Author: Michel Dänzer Date: Wed Dec 19 11:10:10 2018 +0100 glamor: Allow HW acceleration for more RENDER formats As long as the storage format is compatible. v2: * Remove explicit cases for formats handled by the default case. Reviewed-by: Eric Anholt commit 7e6faa5b3c05e0b7149ee840403885b0b40b5827 Author: Michel Dänzer Date: Wed Dec 19 10:06:23 2018 +0100 glamor: Check that storage format is compatible with RENDER format Fixes x2r10g10b10 related rendercheck failures. Reviewed-by: Eric Anholt commit d12881ea1d95bc8b189582da9e847a801927acce Author: Michel Dänzer Date: Fri Dec 14 16:19:46 2018 +0100 Revert "ci: Work around broken python UTF8 handling in the CI docker image" This reverts commit 899d260701ff783254f8ead91dab8dc515d554f6. No longer necessary with the previous changes. Reviewed-by: Eric Anholt commit bc6998b728749015bfd93a85fbae48af777c9a34 Author: Michel Dänzer Date: Fri Dec 14 17:25:41 2018 +0100 gitlab-ci: Set LC_ALL=C.UTF-8 Although piglit could now handle non-ASCII characters in the environment, meson was still failing without this (even though it's using Python 3). Reviewed-by: Eric Anholt commit 4aaaf69229be574d6d11084225ecd91446a15170 Author: Michel Dänzer Date: Wed Oct 10 10:31:12 2018 +0200 test: Use .../piglit instead of .../piglit-*.py The latter use Python 2 and break with any non-ASCII characters in the environment, the former uses Python 3 and works fine in that case. Reviewed-by: Eric Anholt commit f56d8e2282a3d1344aa1300c78faede0071a3bfa Author: Michel Dänzer Date: Fri Dec 14 11:04:24 2018 +0100 gitlab-ci: Docker image can be generated as part of pipeline This removes the dependency on an externally generated docker image, and should make it easier to update the docker image or make other changes related to it. This is based on Debian testing, because I'm most familiar with Debian. But it should be easy to base it on another distro. v2: * Use kaniko instead of docker-in-docker for image generation, so it can also work in unprivileged runners. * Drop piglit.conf & tetexec.cfg overrides, just make sure the files in the image work. commit ed44f9cd6a4ccf6de7dda70432764b4da10f3f44 Author: Michel Dänzer Date: Thu Dec 13 18:29:31 2018 +0100 Drop Travis Linux build in favour of GitLab CI Fold build-travis-deps.sh into .gitlab-ci.yml. Preparation for the next change, which would break the Travis Linux build. Reviewed-by: Eric Anholt commit 0e541b10933377572373da48d1f2932ff095dcde Author: Jon Turney Date: Thu Dec 13 23:00:32 2018 +0000 meson: Add misc unit tests v2: has_link_argument requires meson 0.46.0 commit fde27b9b4814b18aca6ec587bd3cfe9ab04b0c72 Author: Peter Hutterer Date: Wed Nov 28 10:05:49 2018 +1000 test: fix failing tests Broken since 69d8ea4a49793a94f821d1a328856901a1c02a5a because our fake screen didn't have a root window and writing the XKB rules prop would happily segfault. Fix this by setting up the required bits. Signed-off-by: Peter Hutterer Tested-by: Michel Dänzer michel.daenzer@amd.com commit a7472da94136ef977b8d6af956a15767736236ea Author: Michel Daenzer Date: Wed Dec 12 18:34:36 2018 +0100 Make artifacts of piglit results if job fails Can be useful for figuring out what caused the failure. commit c1bb392b1df4023e9dec489facfa221a53499ddc Author: Michel Daenzer Date: Wed Dec 12 12:55:57 2018 +0100 travis: Use a single meson invocation The prefix setting didn't take for some reason. commit c73116540205c20162befe935ef608f4bed3af0a Author: Olivier Fourdan Date: Fri Nov 30 13:09:53 2018 +0100 dix: cache ResourceClientBits() value The `LimitClient` is set once and for all at startup, whereas the function `ResourceClientBits()` which returns the client field offset within the XID based on the value of `LimitClient` can be called repeatedly. Small optimization, cache the result of `ilog2()`, that saves running the same loop over and over each time `ResourceClientBits()` is called. Signed-off-by: Olivier Fourdan commit 48b1af2718ab81c66f565438553415c05f1faa5c Author: Ilia Mirkin Date: Mon Dec 10 23:34:11 2018 -0500 modesetting: fix conn_id termination and potential overrun by 1 byte Noticed when porting this logic to xf86-video-nouveau, and valgrind complained about conditional jump based on uninitialized data. Signed-off-by: Ilia Mirkin Reviewed-by: Pekka Paalanen commit 899d260701ff783254f8ead91dab8dc515d554f6 Author: Adam Jackson Date: Tue Dec 11 12:30:59 2018 -0500 ci: Work around broken python UTF8 handling in the CI docker image Gitlab very kindly exposes the details of the git commit message (among much else) in the environment. Unfortunately, piglit tries to handle the environment in non-UTF8-safe ways, which means if the top-of-tree commit mentions non-ASCII characters (say, in the author's name) then all the tests fail and so does the pipeline. Fortunately none of those variables are things our piglit invocation needs. Since I've failed to rebuild the docker image as yet, just clear the likely variables from the environment before running piglit. This-makes-me: ☹ commit 82ed89c0f8b18d8214430580dc80c8d3e37bef33 Author: Adam Jackson Date: Thu Nov 29 14:48:11 2018 -0500 automake: Distribute meson's configure header templates Fixes: xorg/xserver#17 commit a425eee6dce3b0cfd18b591907e8302a91b648c6 Author: Lionel Landwerlin Date: Fri Nov 9 12:34:59 2018 +0000 present: fix compile warning with debug traces Signed-off-by: Lionel Landwerlin commit 7a44e8d4007b9c3ca55a5cc3f5e98601565311c7 Author: Lyude Paul Date: Tue Nov 13 20:14:10 2018 -0500 modesetting: Actually disable CRTCs in legacy mode Believe it or not, somehow we've never done this in legacy mode! We currently simply change the DPMS property on the CRTC's output's respective DRM connector, but this means that we're just setting the CRTC as inactive-not disabled. From the perspective of the kernel, this means that any shared resources used by the CRTC are still in use. This can cause problems for drivers that are not yet fully atomic, despite using the atomic helpers internally. For instance: if CRTC-1 and CRTC-2 are still enabled and use shared resources within the kernel (an MST topology, for example), and then userspace tries to go enable CRTC-3 on the same topology this might suddenly fail if CRTC-3 needs the shared resources CRTC-1 and CRTC-2 are using. While I don't know of any situations in the mainline kernel that actually trigger this, future plans for reworking the atomic check of MST drivers are absolutely going to make this into a real issue (they already are in my WIP branches for the kernel). So: actually do the right thing here and disable CRTCs when they're not going to be used anymore, even in legacy mode. Signed-off-by: Lyude Paul commit 17a22ad948009badbc79bbcd9a067004c98f5744 Author: Alan Coopersmith Date: Sun Nov 25 12:56:29 2018 -0800 Update configure.ac bug URL for gitlab migration Signed-off-by: Alan Coopersmith commit 5d097c2a20fce44cdb9d5c302d46bc7fa16edfec Author: Alan Coopersmith Date: Sun Nov 18 15:49:27 2018 -0800 Update README for gitlab migration Signed-off-by: Alan Coopersmith commit e6cd1c9bdefe83e7d99b703a68d26eebb451f889 Author: Michel Dänzer Date: Thu Nov 15 17:16:59 2018 +0100 xwayland: Don't take buffer release queue into account for frame timer The buffer release queue has two kinds of entries: * Pending async flips. * Completed flips waiting for their buffer to be released by the Wayland compositor. xwl_present_timer_callback neither completes async flips nor releases buffers, so the timer isn't needed for the buffer release queue. commit f541615342ce6bfb0e6d4e68deb3a924a87e8ba9 Author: Michel Dänzer Date: Fri Nov 9 17:18:53 2018 +0100 xwayland: Don't need xwl_window anymore in xwl_present_queue_vblank Fixes issue #12. Presumably the problem was that Present operations on unmapped windows were executed immediately instead of only when reaching the target MSC. commit 8c9538573cb9a342897eb3fb4b0c1e4ed917bd0e Author: Michel Dänzer Date: Thu Nov 1 18:24:28 2018 +0100 xwayland: Add xwl_present_unrealize_window When a window is unrealized, a pending frame callback may never be called, which could result in repeatedly freezing until the frame timer fires after a second. Fixes these symptoms when switching from fullscreen to windowed mode in sauerbraten. commit 6b016d58d23d16eaae9908a92ed90547d1926317 Author: Michel Dänzer Date: Thu Nov 1 18:44:24 2018 +0100 xwayland: Replace xwl_window::present_window with ::present_flipped There's no need to keep track of the window which last performed a Present flip. This fixes crashes due to the assertion in xwl_present_flips_stop failing. Fixes issue #10. The damage generated by a flip only needs to be ignored once, then xwl_window::present_flipped can be cleared. This may fix freezing in the (hypothetical) scenario where Present flips are performed on a window, followed by other drawing requests using the window as the destination, but nothing triggering xwl_present_flips_stop. The damage from the latter drawing requests would continue being ignored. commit 8738ce85df535bdfdfecfce1c0d64e209cc6e508 Author: Ray Strode Date: Fri Nov 16 14:36:55 2018 -0500 dix: ensure work queues are cleared on reset If the server resets, most client workqueues are cleaned up as the clients are killed. The one exception is the server's client, which is exempt from the killing spree. If that client has a queued work procedure active, it won't get cleared on reset. This commit ensures it gets cleared too. commit 364d64981549544213e2bca8de6ff8a5b2b5a69e Author: Samuel Thibault Date: Tue Oct 30 18:43:51 2018 +0100 dix: do not send focus event when grab actually does not change c67f2eac5651 ("dix: always send focus event on grab change") made dix always sent events when it's a NotifyGrab or NotifyUngrab, even if from == to, because 'from' can just come from a previous XSetInputFocus call. However, when an application calls XGrabKeyboard several times on the same window, we are now sending spurious FocusOut+FocusIn with NotifyGrab, even if the grab does not actually change. This makes screen readers for blind people spuriously emit activity events which disturb screen reading workflow when e.g. switching between menus. This commit avoids calling DoFocusEvents in that precise case, i.e. when oldWin is a previous grab and the new grab is the same window. Signed-off-by: Samuel Thibault Reviewed-by: Adam Jackson commit 82f8cf8990009f6cac567814dd6b7fd41cfad82d Author: Manoj Gupta Date: Tue Nov 13 11:35:25 2018 -0800 config/udev: Include header to use major/minor glibc 2.25 has dropped sys/sysmacros.h from sys/types.h, so add it explicitly in config/udev.c. This is similar to the commit 84e3b96b531363e47f6789aacfcae4aa60135e2e Signed-off-by: Manoj Gupta Reviewed-by: Adam Jackson commit fbdd4d679a7d020f78f7b877033b83e00f5a0f73 Author: Michal Srb Date: Mon Nov 12 13:51:48 2018 +0100 dix/window: Use ConfigureWindow instead of MoveWindow The screensaver can regularly move its window to random offsets. It should use the ConfigureWindow function instead of calling the Screen's MoveWindow directly. Some MoveWindow implementations, such as compMoveWindow, rely on Screen's ConfigNotify being called first as it happens in ConfigureWindow. Reviewed-by: Adam Jackson commit 23752b3ef889ada7b705c51f478f5817e5caaed3 Author: Adam Jackson Date: Thu Oct 25 13:13:13 2018 -0400 os: Establish new connections synchronously not on the work queue This contortion made a bit more sense before we got SetNotifyFd and friends, but now there's no need for it. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit 69d8ea4a49793a94f821d1a328856901a1c02a5a Author: Adam Jackson Date: Thu Oct 25 11:22:19 2018 -0400 xkb: Write the _XKB_RULES_NAMES window property synchronously I can't think of a good reason why this would need to be deferred to the work queue. When we get to this point we're never in the middle of request processing, so we can't corrupt the event/reply stream. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit 0a95a8ae625accaf0ef5e2372ef7f65a52658d9d Author: Adam Jackson Date: Tue Oct 23 15:07:48 2018 -0400 xwayland: Move command line fd initialization to InitOutput Again, as this is DDX state not screen state, run it from DDX setup not screen setup. Signed-off-by: Adam Jackson commit 08843efc5940563a2275c654804c999cfc772987 Author: Adam Jackson Date: Tue Oct 23 14:33:24 2018 -0400 xwayland: Move wm_fd and listen_fds out of xwl_screen There are logically server state not screen state. Not that multiple screens works, at the moment, but that's no excuse to be sloppy. Signed-off-by: Adam Jackson commit 2118e4471be037f2e642f35ff0494aa09177c9ee Author: Marco Trevisan (Treviño) Date: Sat Oct 27 03:54:09 2018 +0200 dix/events: reuse grab pointer value commit 35e5a76cc1d02801fadd49d12e60664b02e4bebc Author: Marco Trevisan (Treviño) Date: Fri Oct 26 19:52:49 2018 +0200 Xi: Use current device active grab to deliver touch events if any When Retrieving touch delivery data we need to check if we have an active grab on such device, and in that case use it to delivery events. If we don't do this, when rejecting the touch events in DeactivatePointerGrab, we will end-up in creating an implicit grab that will change the device deviceGrab's state, causing a recursion during TouchEndTouch. Fixes #7 https://bugs.freedesktop.org/show_bug.cgi?id=96536 commit 700505144fcdd55b4bd1f6c30b7aa01bf848af11 Author: Alan Coopersmith Date: Sat Nov 10 15:00:31 2018 -0800 Remove obsolete B16 & B32 tags in struct definitions They were defined as empty macros on all platforms except for the long unsupported Cray systems which needed to use bitfields to define types smaller than 64-bits. Signed-off-by: Alan Coopersmith commit 6ef025a8728282db6a233bde55789b114f916abb Author: Michel Dänzer Date: Tue Nov 6 11:33:19 2018 +0100 Revert "dix: Work around non-premultiplied ARGB cursor data harder" This reverts commit b45c74f0f2868689e7ed695b33e8c60cd378df0b. It broke the cursor in other games. Apparently those use cursor data with premultiplied alpha, but with some pixels having r/g/b values larger than the alpha value (which corresponds to original r/g/b values > 1.0), triggering the workaround. Seems the cure turned out worse than the disease, so revert. Bugzilla: https://bugs.freedesktop.org/108650 commit c901adc327bce4c0d19caf350cbcb0cd5254f306 Author: Adam Jackson Date: Wed Oct 31 11:43:33 2018 -0400 modesetting: Hush an unimportant log message Verbosity level 0 is "always print", just make it a normal message. Signed-off-by: Adam Jackson commit 52451f1f89890e3088c6fd9d7da0708fd9263950 Author: Adam Jackson Date: Wed Sep 5 12:10:20 2018 -0400 dix: De-ugly the prototype for Add{GPU,}Screen commit e50c85f4ebf559a3bac4817b41074c43d4691779 Author: Eric Anholt Date: Fri Oct 26 17:47:30 2018 -0700 Fix segfault on probing a non-PCI platform device on a system with PCI. Some Broadcom set-top-box boards have PCI busses, but the GPU is still probed through DT. We would dereference a null busid here in that case. Signed-off-by: Eric Anholt commit 3297a1c871a25647d9d08b5f528e640cc2a1d2c2 Author: Adam Jackson Date: Wed Oct 24 16:30:40 2018 -0400 include: Remove ___CLIENTSIGNALALL_DEFINED___ copypasta ___CLIENTSIGNAL_DEFINED___ is a hack to work around the declaration of ClientSignal both in our own headers and in , the latter of which is properly part of libXfont (1, only) but packaged in xorgproto because we have made some mistakes. ClientSignalAll needs no such workaround. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 06f448d4af905412b1e0b4074f7763ec85f2b6e8 Author: Adam Jackson Date: Wed Oct 24 16:23:04 2018 -0400 include: Stop including Despite being packaged in xorgproto (formerly fontsproto), fontproto.h is actually a list of the ABI libXfont version 1 expected of the X server. We switched to libXfont2 three years ago, this is unnecessary. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit ace551d8a2603e37b18237a52f62d627c75d9e2a Author: Michel Dänzer Date: Thu Oct 18 17:42:01 2018 +0200 xwayland: Complete "synchronous" Present flips from xwl_present_msc_bump Completing them from xwl_present_sync_callback had at least two issues: * It was before the MSC was incremented in xwl_present_frame_callback, so the MSC value in the completion event could be lower than the target specified by the client. This could cause hangs with the Mesa Vulkan drivers. * It allowed clients to run at a frame-rate higher than the Wayland compositor's frame-rate, wasting energy on generating frames which were never displayed. This isn't expected to happen unless the client specified PresentOptionAsync (in which case flips are still completed from xwl_present_sync_callback, allowing higher frame-rates). v2: * Make xwl_present_has_events return true when there's a pending "synchronous" flip, so those complete after at most ~1 second even if the Wayland server doesn't send a frame event. Bugzilla: https://bugs.freedesktop.org/106713 commit 2bfc46d4147dc0bec4cdbb80431a0f4cc1d3b030 Author: Michel Dänzer Date: Thu Oct 18 17:36:24 2018 +0200 xwayland: Rename xwl_present_events_notify to xwl_present_msc_bump And consolidate more code from xwl_present_timer_callback and xwl_present_frame_callback in it. commit 5e8b9a3a563047e3998d45e761f7a50e4b0f6cb3 Author: Michel Dänzer Date: Wed Oct 24 11:23:05 2018 +0200 xwayland: Use xwl_present_reset_timer in xwl_present_timer_callback Apart from simplifying the code, this should also prevent a condition (which might only be possible with the following fix) reported in https://gitlab.freedesktop.org/wayland/weston/issues/115#note_52467: 1. xwl_present_timer_callback indirectly calls xwl_present_reset_timer -> xwl_present_free_timer 2. xwl_present_timer_callback then returns a non-0 value, so DoTimer calls TimerSet with the old xwl_present_window->frame_timer pointer which was freed in step 1 => use after free Calling xwl_present_reset_timer explicitly passes NULL to TimerSet if step 1 freed xwl_present_window->frame_timer, and it will allocate a new one. commit 036794bebce72a3fa2f95996d2e537ff568e0ff1 Author: Olivier Fourdan Date: Fri Oct 19 16:04:32 2018 +0200 xwayland: do not crash if `gbm_bo_create()` fails The function `xwl_glamor_gbm_create_pixmap()` first creates a buffer objects and then creates the xwl_pixmap from it. However, `xwl_glamor_gbm_create_pixmap_for_bo()` is not called if the buffer object creation fails, and `xwl_glamor_gbm_create_pixmap()` simply returns `glamor_create_pixmap()`. The problem with this is that if `xwl_glamor_gbm_create_pixmap_for_bo()` is not called then neither is `xwl_pixmap_set_private()` and further calls to `xwl_pixmap_get()` will return NULL and cause a NULL pointer dereference if the return value is not checked: #0 xwl_glamor_gbm_get_wl_buffer_for_pixmap () at hw/xwayland/xwayland-glamor-gbm.c:248 #1 xwl_window_post_damage () at hw/xwayland/xwayland.c:697 #2 xwl_display_post_damage () at hw/xwayland/xwayland.c:759 #3 block_handler () at hw/xwayland/xwayland.c:890 #4 BlockHandler () at dix/dixutils.c:388 #5 WaitForSomething () at os/WaitFor.c:201 #6 Dispatch () at dix/dispatch.c:421 #7 dix_main () at dix/main.c:276 #8 __libc_start_main () at ../csu/libc-start.c:308 #9 _start () (gdb) print xwl_pixmap $1 = (struct xwl_pixmap *) 0x0 Make sure we check for `xwl_pixmap_get()` returned value where relevant and fail gracefully if this is the case. See also: https://gitlab.gnome.org/GNOME/mutter/issues/340 Signed-off-by: Olivier Fourdan Reviewed-by: Marco Trevisan Reviewed-by: Peter Hutterer commit 32abc222880119eba0adf17897c3d8d1cc1f17db Author: Olivier Fourdan Date: Mon Oct 22 11:54:31 2018 +0200 present: Remove `present_event_abandon()` This has never been actually implemented, do not tempt people to use it. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Daenzer Reviewed-by: Peter Hutterer commit b768b7d6cec41b8b320c468ec41aab5a8b49b27b Author: Olivier Fourdan Date: Mon Oct 22 11:48:25 2018 +0200 present/wnmd: Fix use after free on CRTC removal Xwayland will add and remove CRTCs as Wayland outputs are added or removed. If there is a pending flip when this occurs, the `xwl_present_sync_callback()` will be triggered after the Xwayland output's RRCtrcPtr has been destroyed, hence causing a crash in Xwayland while trying to use freed memory: #1 abort () #2 OsAbort () at utils.c:1350 #3 AbortServer () at log.c:877 #4 FatalError () at log.c:1015 #5 OsSigHandler () at osinit.c:156 #6 #7 dixGetPrivate () at ../include/privates.h:122 #8 dixLookupPrivate () at ../include/privates.h:166 #9 present_screen_priv () at present_priv.h:198 #10 present_wnmd_flip () at present_wnmd.c:358 #11 present_wnmd_execute () at present_wnmd.c:466 #12 present_wnmd_re_execute () at present_wnmd.c:80 #13 xwl_present_sync_callback () at xwayland-present.c:287 #14 ffi_call_unix64 () from /lib64/libffi.so.6 #15 ffi_call () from /lib64/libffi.so.6 #16 wl_closure_invoke () at src/connection.c:1006 #17 dispatch_event () at src/wayland-client.c:1427 #18 dispatch_queue () at src/wayland-client.c:1573 #19 wl_display_dispatch_queue_pending () at src/wayland-client.c:1815 #20 wl_display_dispatch_pending () at src/wayland-client.c:1878 #21 xwl_read_events () at xwayland.c:814 #22 ospoll_wait () at ospoll.c:651 #23 WaitForSomething () at WaitFor.c:208 #24 Dispatch () at ../include/list.h:220 #25 dix_main () at main.c:276 To avoid the issue, get the `ScreenPtr` from the window instead of the CRTC that might have been just freed, `xwl_present_flip()` has no use for the CRTC anyway. Bugzilla: https://bugs.freedesktop.org/108249 Suggested-by: Michel Daenzer Signed-off-by: Olivier Fourdan Reviewed-by: Michel Daenzer Reviewed-by: Peter Hutterer commit 8d048a1fd3e3806c408192d33e62859f5bc5c343 Author: Adam Jackson Date: Tue Oct 23 14:28:21 2018 -0400 os: Factor out CHECK_FOR_REQUIRED_ARGUMENTS Lifted from vfb. xfree86 had almost the same thing but unparameterized, port it to the vfb style. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit b45c74f0f2868689e7ed695b33e8c60cd378df0b Author: Michel Dänzer Date: Thu Oct 25 10:50:03 2018 +0200 dix: Work around non-premultiplied ARGB cursor data harder Turns out some apps (e.g. the Civilization VI game) use non-premultiplied cursor data which doesn't have any pixels with 0 alpha but non-0 non-alpha, but can still result in visual artifacts. This uses the method suggested by Kamil in https://bugs.freedesktop.org/92309#c19: check for pixels where any colour component value is larger than the alpha value, which isn't possible with premultiplied alpha. There can still be non-premultiplied data which won't be caught by this, but that should result in slightly incorrect colours and/or blending at the worst, not wildly incorrect colours such as shown in the bug report below. Bugzilla: https://bugs.freedesktop.org/108355 Suggested-by: Kamil Paral commit 248d164eae27f1f310266d78e52f13f64362f81e Author: Matthieu Herrb Date: Tue Oct 23 21:29:09 2018 +0200 LogFilePrep: add a comment to the unsafe format string. CVE-2018-14665 also made it possible to exploit this to access memory. With -logfile forbidden when running with elevated privileges this is no longer an issue. Signed-off-by: Matthieu Herrb Reviewed-by: Adam Jackson commit 50c0cf885a6e91c0ea71fb49fa8f1b7c86fe330e Author: Matthieu Herrb Date: Tue Oct 23 21:29:08 2018 +0200 Disable -logfile and -modulepath when running with elevated privileges Could cause privilege elevation and/or arbitrary files overwrite, when the X server is running with elevated privileges (ie when Xorg is installed with the setuid bit set and started by a non-root user). CVE-2018-14665 Issue reported by Narendra Shinde and Red Hat. Signed-off-by: Matthieu Herrb Reviewed-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Adam Jackson commit 08ff37d05a04a1ceed6086cfceae9c34331cb633 Author: Andreas Fett Date: Mon Oct 22 22:03:22 2018 +0200 os/xdmcp: Fix binding of ipv6 source address Choose the socket fd of the correct address family based on the address family of the argument to the -from option. Fixes: xorg/xserver#4 commit 96e00730e7ab4a5a2bea453b0ce84e4f8c93acd8 Author: Adam Jackson Date: Wed Oct 24 15:00:09 2018 -0400 xfree86: bump video ABI version to 25.0 Signed-off-by: Adam Jackson commit cb0de153bf0c486da7e968ab0f258c9c0c9ed34a Author: Michel Dänzer Date: Fri Oct 19 18:27:37 2018 +0200 xwayland: Plug leaks in xwl_present_sync_callback xwl_present_window->sync_callback was leaked. The event memory was leaked if the corresponding buffer had already been released. commit 53d32c94f39b4a89f70fed2e102c5fb5d6cae8bc Author: Adam Jackson Date: Tue Oct 23 14:09:55 2018 -0400 dix: Remove the magic WhenMapped backing store hack Automatic compositing exists, if that's what you want then use it. Signed-off-by: Adam Jackson commit 382c26dade81a4c629307a3bfe6f5cca5af640e0 Author: Michel Dänzer Date: Fri Oct 5 12:24:23 2018 +0200 glamor: Add support for exporting depth 15/8 pixmaps This allows X to run with glamor at these depths. commit a2d188c7db1baaf21b42c2e8bccf54c8d5486548 Author: Olivier Fourdan Date: Mon Oct 8 16:38:01 2018 +0200 xwayland: keep `xwl_present_timer_callback()` private `xwl_present_timer_callback()` is initially marked a private and later implemented as public. Let's keep that private, shall we. Signed-off-by: Olivier Fourdan commit 0816e8fca6194dfb4cc94c3a7fcb2c7f2a921386 Author: Adam Jackson Date: Tue Sep 18 14:37:51 2018 -0400 linux: Make platform device probe less fragile At the point where xf86BusProbe runs we haven't yet taken our own VT, which means we can't perform drm "master" operations on the device. This is tragic, because we need master to fish the bus id string out of the kernel, which we can only do after drmSetInterfaceVersion, which for some reason stores that string on the device not the file handle and thus needs master access. Fortunately we know the format of the busid string, and it happens to almost be the same as the ID_PATH variable from udev. Use that instead and stop calling drmSetInterfaceVersion. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 71703e4e8bd00719eefad53c2ed6c604079f87ea Author: rpm-build Date: Wed Oct 17 09:00:59 2018 +1000 xfree86: ensure the readlink buffer is null-terminated Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit ff91c696ff8f5f56da40e107cb5c321539758a81 Author: Michal Srb Date: Tue Oct 16 09:32:13 2018 +0200 xfree86: Only switch to original VT if it is active. If the X server is terminated while its VT is not active, it should not change the current VT. v2: Query current state in xf86CloseConsole using VT_GETSTATE instead of keeping track in xf86VTEnter/xf86VTLeave/etc. commit 7c25439f0db4c20a4eab4ed44262eb396305f58a Author: Peter Hutterer Date: Tue Oct 16 10:37:16 2018 +1000 xwayland: fix a realloc OOM error case Found by coverity Signed-off-by: Peter Hutterer commit bd5fe7593fd0df236f3b2be1f062166ddba7d67c Author: Peter Hutterer Date: Tue Oct 16 09:42:51 2018 +1000 xfree86: fix readlink call Misplaced parenthesis caused us to compare the sizeof, not the readlink return value. Signed-off-by: Peter Hutterer commit dda2323d239a48e50ac9fd6617d7b630d8a14235 Author: Peter Hutterer Date: Tue Oct 16 09:39:54 2018 +1000 xwayland: make a if noop clearer to the compiler/coverity Signed-off-by: Peter Hutterer commit fc78bcca21e767697de6ad4d8e03b6728856f613 Author: Adam Jackson Date: Wed Oct 10 14:09:11 2018 -0400 fbdevhw: Refuse to touch PCI devices on the fallback probe path Fixes: https://gitlab.freedesktop.org/xorg/driver/xf86-video-fbdev/issues/9 Signed-off-by: Adam Jackson commit af151895f3cb1755a7a5631f2398a3d3b219cbef Author: Adam Jackson Date: Fri Oct 5 14:50:20 2018 -0400 glamor/egl: Avoid crashing on broken configurations 0a9415cf apparently can tickle bugs in the GL stack where glGetString returns NULL, presumably because the eglMakeCurrent() didn't manage to actually install a dispatch table and you're hitting a stub function. That's clearly not our bug, but if it happens we should at least not crash. Notice this case and fail gently. Signed-off-by: Adam Jackson commit 32677ce03d793a1f2aa8871112eb3d19b3cb762f Author: Alexander Volkov Date: Mon Feb 26 19:41:18 2018 +0300 os/xdmcp: Don't create a new socket in XdmcpReset() xdmcpSocket survives during the reset, there is no need to create a new one. This commit restores logic that was broken by 49c0f2413d32fdfe36e45861fcb32aaeab633094 in Xorg 1.19. Signed-off-by: Alexander Volkov commit 1bd5d0a53c5ff4169c5a6704c1c4b276f998b938 Author: Pierre Ossman Date: Wed Oct 3 10:28:52 2018 +0200 Switch automatic composite update to WorkQueue It is currently (ab)using the screen BlockHandler callback to do this. But this can cause problems with other extension as their block handlers might have executed before Composite's. And the operations Composite does might result in them wanting to change timeouts. Practically this caused problems for TigerVNC's VNC extension which failed to send out updates for Composite's screen updates. commit 43a0f9a5dbb469f4f403a8530f33be67618933b8 Author: Adam Jackson Date: Mon Oct 1 11:42:37 2018 -0400 modesetting: Don't free(dst) in drmmode_prop_info_copy The destination is always either on the stack or in the middle of some struct. Signed-off-by: Adam Jackson commit 361894497c6802b62c2da4a3dc7e98939fb24404 Author: Olivier Fourdan Date: Wed Sep 26 15:40:32 2018 +0200 xwayland: search for a render node to use wl_drm's protocol "device" event provides the path to the DRM device, which may not be a render node, thus causing Xwayland to fall back to DRM authentication which may fail if the user has switched to another VT while Xwayland is starting. Search for a render node corresponding to the given DRM device and try to use it instead, as render nodes do not need DRM authentication and Xwayland can make use of them if it can find one. Closes: https://bugs.freedesktop.org/108038 Signed-off-by: Olivier Fourdan commit 03b2125005b1c8d4eb62a4173a74458bbe72807b Author: Adam Jackson Date: Tue Aug 7 15:40:13 2018 -0400 dix: Remove LegalModifier() This hasn't done anything besides return TRUE in a long long time. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit a23eba2a91024d27da45e5aee1f4215f7ec2ae82 Author: Adam Jackson Date: Mon Nov 20 14:28:13 2017 -0500 dix: Merge AbortDDX into ddxGiveUp These are so close to identical that most DDXes implement one in terms of the other. All the relevant cases can be distinguished by the error code, so merge the functions together to make things simpler. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d78ac2f15913bf6f00e06986cc7db0ade9ebd806 Author: Adam Jackson Date: Tue Aug 7 15:16:16 2018 -0400 mi: Factor out miSaveScreen Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 0a9415cf793babed1f28c61f8047d51de04f1528 Author: Adam Jackson Date: Fri Sep 14 11:33:43 2018 -0400 glamor_egl: Don't initialize on llvmpipe Mesa started supporting GL_OES_EGL_image on llvmpipe in 17.3, after this commit: commit bbdeddd5fd0b797e1e281f058338b3da4d98029d Author: Gurchetan Singh Date: Tue Aug 1 14:49:33 2017 -0700 st/dri: add drisw image extension That's pretty cool, but it means glamor now thinks it can initialize on llvmpipe. This is almost certainly not what anyone wants, as glamor on llvmpipe is pretty much uniformly slower than fb. This fixes both Xorg and Xwayland to refuse glamor in such a setup. Xephyr is left alone, both because glamor is not the default there and because Xephyr+glamor+llvmpipe is one of the easier ways to get xts to exercise glamor. The (very small) downside of this change is that you lose DRI3 support. This wouldn't have helped you very much (since an lp glamor blit is slower than a pixman blit), but it would eliminate the PutImage overhead for llvmpipe's glXSwapBuffers. A future change should add DRI3 support for the fb-only case. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit feca61cdb5351bbe178f7083938a973703aff866 Author: Jon Turney Date: Thu Sep 27 22:23:14 2018 +0100 test: Initialize the pixmap in damage test commit d1c00c859c6676fbb540420c9055788bc19cb18f Author: Adam Jackson Date: Tue Aug 28 15:58:54 2018 -0400 xfree86: Remove -flippixels No supported driver supports 1bpp anymore, nor has in a very long time. This option only worked with vgahw anyway. Signed-off-by: Adam Jackson commit 2bd631810d910975a5df55c0e76b02856d53688d Author: Adam Jackson Date: Thu Sep 13 16:11:23 2018 -0400 automake: Fix Linux build with --disable-apm --disable-acpi Fixes: accd32a4 (xorg: Remove the XF86PM define.) Signed-off-by: Adam Jackson commit 89901e14d2f98def2399fd0546838721e7ac452d Author: Eric Anholt Date: Wed Sep 19 18:02:41 2018 -0700 test: Add the start of a testsuite for damage. Inspired by the previous bug, build something we can use to write damage testcases, including testing for the bug. Signed-off-by: Eric Anholt commit bc36594e0eb8bfa5a673bcfd8c8168f70994a1df Author: Cedric Roux Date: Wed Sep 12 19:14:18 2018 +0200 miext/damage: take care of the coordinate mode in damagePolyPoint The mode (CoordModeOrigin or CoordModePrevious) was not taken into account when computing the box. The result was a bad drawing of points in some situations (on my hardware/software configuration, calling XDrawString followed by XDrawPoints in the mode CoordModePrevious). Signed-off-by: Cedric Roux Signed-off-by: Eric Anholt commit 734b2d6907f730571a2805cbc53fe7056190f19e Author: Olivier Fourdan Date: Thu Sep 20 16:32:29 2018 +0200 xwayland: Use `double` for `xwl_tablet_tool` So we do not lose subpixel precision in Xwayland. Suggested-by: Peter Hutterer Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/libinput/libinput/issues/138 commit 2f424df0ca340b1c4e47d9461b04a2c5ec3ec649 Author: Jon Turney Date: Tue May 2 14:00:47 2017 +0100 hw/xwin/glx: Fix logging about WGL pxfs with overlays Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit d63f9dddeb0c656af2b8c6135cc40a76f0b5604f Author: Jon Turney Date: Fri Jul 15 15:18:36 2016 +0100 hw/xwin/glx: Use multisample attributes with wglChoosePixelFormatARB() Seems like this was omitted in error Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit e3398d921be74df9c5d23408f39e70548df896d8 Author: Jon Turney Date: Fri Jul 15 15:15:18 2016 +0100 hw/xwin/glx: Add GLX_ARB_framebuffer_sRGB extension v2: Fix a bogus warning about a missing pixelformat attribute issued for every pixelformat when WGL_ARB_framebuffer_sRGB isn't available Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 1fc240c6877e44fc9e6d85837dc2d27e26193291 Author: Jon Turney Date: Fri Jul 15 13:46:45 2016 +0100 hw/xwin/glx: publish GLX create_context extensions Future work: To properly support GLX_ARB_create_context in indirect mode, we need to use wglCreateContextAttribsARB() rather than wglCreateContext(), when attribs are provided, rather than just dropping attribs on the floor, as we currently do. That probably entails removing the deferred context creation and instead using a temporary window, as direct WGL does. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 67b47d50dfb5f7a994ae44708d1b1ef1c42537b5 Author: Jon Turney Date: Fri Jul 15 14:06:32 2016 +0100 hw/xwin/glx: Add support for float format fbconfig GLX extensions v2: Set renderType more correctly Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 6be9681eb9eb6645b19c09f7b3b6d5b5bef8866d Author: Jon Turney Date: Fri Jul 15 14:02:10 2016 +0100 hw/xwin/glx: Make WGL -> GLX extension mapping table-driven Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit ad6b4113cd27e7c57908081c0a20ab956d418f06 Author: Jon Turney Date: Thu Jul 24 12:26:22 2014 +0100 hw/xwin/glx: Fallback to ChoosePixelFormat() if wglChoosePixelFormatARB() fails In glxWinSetPixelFormat() handle the case where wglChoosePixelFormatARB() fails and fallback to ChoosePixelFormat() It seems for some drivers, wglChoosePixelFormatARB() can fail when the provided DC doesn't belong to the driver (e.g. it's a compatible DC for a bitmap, so allow a fallback to ChoosePixelFormat() if it fails. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 8c0adf404a25407995dae79664ef4875ce093497 Author: Jon Turney Date: Sat Jan 11 16:35:31 2014 +0000 hw/xwin/glx: Don't create fbConfigs for un-accelerated pixelFormats Exposing these pixelFormats is problematic: they are provided by the 'GDI Generic' renderer, which doesn't support the same set of extensions as the IGD providing the more capable pixelFormats. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 6a2ce6c5da9456b97683db6224f38ef3b02cce4b Author: Ross Burton Date: Thu Sep 20 13:21:34 2018 +0100 compiler.h: only use inx/outx on ARM with glibc musl only implements inx/outx on x86, so check for __GLIBC__ instead of __linux__. Signed-off-by: Ross Burton commit 5f65a6246fe752764045dd1e38912f1dccec71e4 Author: Ross Burton Date: Thu Sep 20 20:12:24 2018 +0100 xorg-server.m4: just all cflags instead of just sdkdir Instead of fetching just the sdkdir variable of xorg-server using pkg-config, simply get all of the CFLAGS. Aside from completeness, this helps builds in sysroots as pkg-config knows what to do with --cflags but doesn't remap arbitrary variables. Signed-off-by: Ross Burton commit 19f6cb570becbc4e355807199c6e251fc7935132 Author: Eric Anholt Date: Wed Sep 19 13:28:06 2018 -0700 shm: Pick the shm dir at run time, not build time. Prodding the builder's filesystem for tmp dirs doesn't necessarily tell you anything about what the actual host's filesystem is going to look like, so we should just try the dirs at runtime. Signed-off-by: Eric Anholt commit 804a9b4f57107fa2d0ed1ae0becda5bebaffe6e1 Author: Eric Anholt Date: Wed Sep 19 13:20:12 2018 -0700 shm: reindent shm_tmpfile to follow our standards. Signed-off-by: Eric Anholt commit b8b64cd627232a1fed791b8baf562900144bf186 Author: Eric Anholt Date: Wed Sep 19 13:12:40 2018 -0700 xorg: Don't log "Build Operating System: Linux 4.9.0-5-amd64 x86_64 Debian" I don't think this is useful information to have in the log, and it's a bunch of autotools and meson logic to produce it. Signed-off-by: Eric Anholt commit bfa6e84641fc7473fc2eb7e0e872e6b9fc339c2a Author: Eric Anholt Date: Wed Sep 19 13:07:16 2018 -0700 meson: Add configure option and autodetection of HAVE_INPUTTHREAD. Signed-off-by: Eric Anholt commit a56da0ff2814f86af08668610327082b8e2f4308 Author: Adam Jackson Date: Wed Sep 12 17:19:38 2018 -0400 include: Remove now-dead declarations 60ec8ead broke the autotools build: sdksyms.o:(.data+0x58): undefined reference to `InitConnectionLimits' sdksyms.o:(.data+0x2ec8): undefined reference to `xf86ServerName' collect2: error: ld returned 1 exit status Makefile:811: recipe for target 'Xorg' failed Likewise 3a4d7c79 for InitConnectionLimits. Signed-off-by: Adam Jackson commit a2c1260958fb8b4ec81b9107c5d1ca222cc7d770 Author: Adam Jackson Date: Mon Aug 27 15:02:50 2018 -0400 xfree86: Remove vestigial lastScrnFlag Only the mga XAA code ever set this (hence the compat macro), since XAA is long gone this can go too. Signed-off-by: Adam Jackson commit c7414f4d07b69a4b2f0d0af06f032393cf5fe6aa Author: Adam Jackson Date: Wed Aug 22 14:57:05 2018 -0400 xfree86: Remove NoTrapSignals This was dangerous on UMS and largely pointless on KMS. commit d1aeaad5c6fc614c28129f5d2717c12ff7320081 Author: Adam Jackson Date: Wed Aug 22 12:30:32 2018 -0400 xfree86: Remove a fallback path we never hit If it's really this important we should just do it and not complain. We never do it so it must not matter. Signed-off-by: Adam Jackson commit 771980fc02c79bb44e8cee48da9ba159e6baeaa6 Author: Adam Jackson Date: Mon Aug 20 17:01:24 2018 -0400 xfree86: Remove some not-terribly-useful debugging I'm sure printing the address of function pointers in modules you'd loaded might have made sense back when we rolled our own dlopen, but we got better. Signed-off-by: Adam Jackson commit 6a094185d14db6818d98a320c59e0c4d7d43d5a8 Author: Adam Jackson Date: Wed Aug 22 11:18:58 2018 -0400 xfree86: Remove some redundant zero-fill for ScrnInfoRec xf86AllocateScreen() callocs these for us. Signed-off-by: Adam Jackson commit 60ec8eadc370a9b06cc3f105974c0c6b8ad1bb4e Author: Adam Jackson Date: Tue Aug 21 15:09:03 2018 -0400 xfree86: Remove unused xf86GetServerName() Signed-off-by: Adam Jackson commit a41ccaa0857146e986f11360d4f2aeb3913af9a6 Author: Adam Jackson Date: Wed Sep 12 15:45:52 2018 -0400 gitlab: Skip the docker-in-docker step No idea which cult's cargo I was looking at there. Cuts about a minute off the build time. Signed-off-by: Adam Jackson commit 3a4d7c79e7fb14c6f914db921c3dce1c22f62cd9 Author: Adam Jackson Date: Wed Aug 29 15:48:28 2018 -0400 dix: Remove MaxClients This variable was no longer being read anywhere. MAXCLIENTS the macro is the compile-time maximum limit, LIMITCLIENTS the macro is the default limit, LimitClients the variable is the limit for the current server. Signed-off-by: Adam Jackson commit 7d689f049c3cc16b8e0cb0103a384a2ceb84ea33 Author: Adam Jackson Date: Wed Aug 29 15:42:20 2018 -0400 xfree86: Fix Option "MaxClients" validation The old code would not in fact validate the option value, though it might complain about it in the log. It also didn't let you set some legal values that the -maxclients command line option would. Signed-off-by: Adam Jackson commit d791c8e5abc174ae589d954b0beb51d232f60019 Author: Adam Jackson Date: Mon Aug 27 16:42:42 2018 -0400 dga: Make shutdown less magical and/or terrifying DGAShutdown() walks every screen and attempts to reset the mode. That's maybe a reasonable thing to do, although the explicit loop is certainly a bad smell. In ddxGiveUp it's called after we've torn down the vga arbiter - and in fact most of the rest of screen state - which is... very very bad. The other place it's called is from the Control-Alt-BackSpace handler, where we don't even attempt to do vga arb setup, and where in any case we're going to escape the main loop eventually anyway. Move all that cleanup work inside DGACloseScreen. This means it happens earlier in server teardown than previously, but not in a way you're ever going to be upset about. Signed-off-by: Adam Jackson commit 3d06d111b272d495c2f12779097a3d9f1e632603 Author: Adam Jackson Date: Mon Aug 27 16:39:10 2018 -0400 dga: Simplify mieq handler registration Signed-off-by: Adam Jackson commit 801977e8252f87f9ab156c7e02ad00fb1d70f8e5 Author: Adam Jackson Date: Mon Aug 27 16:34:20 2018 -0400 mi: Hush mieqSetHandler for no-op changes If we set the handler to the thing it's already set to, that's fine. Signed-off-by: Adam Jackson commit ba0f5d854f4db52974ab5cd09191303b01b075ff Author: Dave Airlie Date: Wed Sep 12 11:39:32 2018 +1000 devices: break after finding and removing device from lists Coverity complains about a use after free in here after the freeing, I can't follow the linked list so well, but whot says the device can only be on one list once, so break should fix it. Signed-off-by: Dave Airlie commit c4591ea17110b5c318a5ef4b0f17a4eea306ea71 Author: Dave Airlie Date: Wed Sep 12 11:12:51 2018 +1000 mibltblt: free prgnSrcClip on error path. Pointed out by coverity. Signed-off-by: Dave Airlie commit 758393951233d1b2520cf4cefd33ec4288a3880a Author: Dave Airlie Date: Wed Sep 12 11:09:40 2018 +1000 xkb: fix what looks to be a copy-paste error with first vs firstMM Pointed out by coverity. Signed-off-by: Dave Airlie commit cad3a1a82da3c8421b5cc98af27a779a38b5c709 Author: Dave Airlie Date: Wed Sep 12 11:05:45 2018 +1000 posix_tty: free leak of xf86SetStrOption return value. Pointed out by coverity. Signed-off-by: Dave Airlie commit b6c29a881eb49300fddfd0187cb10891f5257d3b Author: Dave Airlie Date: Wed Sep 12 10:56:40 2018 +1000 modesetting: get pEnt after error checks This saves us having to make sure we clean it up. Pointed out by coverity. Signed-off-by: Dave Airlie commit f0a5c0d1fdaeee3cd701215f4f57b7eacaf783c2 Author: Dave Airlie Date: Wed Sep 12 10:52:25 2018 +1000 glamor: fix leak of fs_getcolor_source. This is created using XNFstrdup, so it needs to be freed. Pointed out by coverity. Signed-off-by: Dave Airlie commit c7fa6a0a0d4ad28ee21b8dd9ad4fbe33f462bc71 Author: Dave Airlie Date: Wed Sep 12 10:50:21 2018 +1000 fboverlay: move bpp checks above malloc Avoids having to free the malloced object. Pointed out by coverity. Signed-off-by: Dave Airlie commit 51ae6126dcf3e234d0f678f02934bc9515abb8ae Author: Dave Airlie Date: Wed Sep 12 10:33:04 2018 +1000 xi: free modifiers_failed on error path. (v2) Pointed out by coverity. v2: set modifies_failed to NULL at start (whot) Signed-off-by: Dave Airlie commit 3439929c510501929c6ef1d90477c33bf8838632 Author: Dave Airlie Date: Wed Sep 12 10:30:13 2018 +1000 shm: move shmsize verify before allocating the drawable. Otherwise if the VERIFY_SHMSIZE macro fails we leak the drawables we allocated earlier. Noticed by coverity scan. Signed-off-by: Dave Airlie commit 047794e3503774c576a815cc170663cbcff198dd Author: Adam Jackson Date: Tue Sep 11 10:33:25 2018 -0400 xselinux: warning fix ../Xext/xselinux_ext.c: In function ‘SELinuxExtensionInit’: ../Xext/xselinux_ext.c:692:21: warning: variable ‘extEntry’ set but not used [-Wunused-but-set-variable] Signed-off-by: Adam Jackson commit f4115bcc8c5f9d30ccfca5d5a7fc27acded02864 Author: Julien Isorce Date: Tue Sep 11 10:28:33 2018 -0700 glamor: add support for NV12 in Xv Useful when video decoders only output NV12. Currently glamor Xv only supports I420 and YV12. Note that Intel's sna supports I420, YV12, YUY2, UYVY, NV12. Test: xvinfo | grep NV12 Test: gst-launch-1.0 videotestsrc ! video/x-raw, format=NV12 ! xvimagesink v2: Combine the two texture2Ds on u_sampler. Signed-off-by: Julien Isorce Tested-by: Olivier Fourdan Reviewed-by: Alex Deucher commit 44f5885686a30776160891e09cd4453afb9d5ade Author: Julien Isorce Date: Thu Sep 6 15:38:14 2018 -0700 glamor: add support for GL_RG Allow to upload the CbCr plane of an NV12 image into a GL texture. Signed-off-by: Julien Isorce Tested-by: Olivier Fourdan Reviewed-by: Alex Deucher commit f98ff253c722da3f5ad747e6813752f9e74c54b5 Author: Julien Isorce Date: Thu Sep 6 15:38:13 2018 -0700 xfree86: define FOURCC_NV12 and XVIMAGE_NV12 Useful for glamor. Signed-off-by: Julien Isorce Tested-by: Olivier Fourdan Reviewed-by: Alex Deucher commit fc855216028e6a34b667c11e198aea405fb4bc00 Author: Adam Jackson Date: Thu Aug 9 09:55:23 2018 -0400 Remove old region API conversion scripts This was eight years ago, if you still need these you're in a bad place. Signed-off-by: Adam Jackson commit c4f3e42fe316c90a73908a838ce64abbb28fe0a2 Author: Adam Jackson Date: Wed Aug 29 16:07:59 2018 -0400 modesetting: Document Option "DoubleShadow" in the man page Signed-off-by: Adam Jackson commit 0dc2c419e11cf28b8fa1e607d4cf2d15f2eb2306 Author: Adam Jackson Date: Wed Aug 29 15:57:46 2018 -0400 modesetting: Lie less in the man page We don't support 8bpp, and we do have acceleration. Signed-off-by: Adam Jackson commit 3f31f56929e80001970e3821ed8b10c6075df8e6 Author: Olivier Fourdan Date: Wed Sep 5 10:49:27 2018 +0200 xwayland: Remove xwl_present_window from privates on cleanup Xwayland's `xwl_destroy_window()` invokes `xwl_present_cleanup()` before the common `DestroyWindow()`. But then `DestroyWindow()` calls `present_destroy_window()` which will possibly end up in `xwl_present_abort_vblank()` which will try to access data that was previously freed by `xwl_present_cleanup()`: Invalid read of size 8 at 0x434184: xwl_present_abort_vblank (xwayland-present.c:378) by 0x53785B: present_wnmd_abort_vblank (present_wnmd.c:651) by 0x53695A: present_free_window_vblank (present_screen.c:87) by 0x53695A: present_destroy_window (present_screen.c:152) by 0x42A90D: xwl_destroy_window (xwayland.c:653) by 0x584298: compDestroyWindow (compwindow.c:613) by 0x53CEE3: damageDestroyWindow (damage.c:1570) by 0x4F1BB8: DbeDestroyWindow (dbe.c:1326) by 0x46F7F6: FreeWindowResources (window.c:1031) by 0x472847: DeleteWindow (window.c:1099) by 0x46B54C: doFreeResource (resource.c:880) by 0x46C706: FreeClientResources (resource.c:1146) by 0x446ADE: CloseDownClient (dispatch.c:3473) Address 0x182abde0 is 80 bytes inside a block of size 112 free'd at 0x4C2FDAC: free (vg_replace_malloc.c:530) by 0x42A937: xwl_destroy_window (xwayland.c:647) by 0x584298: compDestroyWindow (compwindow.c:613) by 0x53CEE3: damageDestroyWindow (damage.c:1570) by 0x4F1BB8: DbeDestroyWindow (dbe.c:1326) by 0x46F7F6: FreeWindowResources (window.c:1031) by 0x472847: DeleteWindow (window.c:1099) by 0x46B54C: doFreeResource (resource.c:880) by 0x46C706: FreeClientResources (resource.c:1146) by 0x446ADE: CloseDownClient (dispatch.c:3473) by 0x446DA5: ProcKillClient (dispatch.c:3279) by 0x4476AF: Dispatch (dispatch.c:479) Block was alloc'd at at 0x4C30B06: calloc (vg_replace_malloc.c:711) by 0x433F46: xwl_present_window_get_priv (xwayland-present.c:54) by 0x434228: xwl_present_get_crtc (xwayland-present.c:302) by 0x539728: proc_present_query_capabilities (present_request.c:227) by 0x4476AF: Dispatch (dispatch.c:479) by 0x44B5B5: dix_main (main.c:276) by 0x75F611A: (below main) (libc-start.c:308) This is because `xwl_present_cleanup()` frees the memory but does not remove it from the window's privates, and `xwl_present_abort_vblank()` will still find it and hence try to access that freed memory... Remove `xwl_present_window` from window's privates on cleanup so that no other function can find and reuse that data once it's freed. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1616269 Signed-off-by: Olivier Fourdan commit 53ce2ba0a19af9c549f47a4cc678afcebeb6087e Author: Lionel Landwerlin Date: Tue Aug 28 21:30:05 2018 +0100 xwayland: fix access to invalid pointer xwl_output->randr_crtc is used in the update_screen_size() function : ==5331== Invalid read of size 4 ==5331== at 0x15263D: update_screen_size (xwayland-output.c:190) ==5331== by 0x152C48: xwl_output_remove (xwayland-output.c:413) ==5331== by 0x6570FCD: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x657093E: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x4DDB183: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD79D8: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD8EA3: wl_display_dispatch_queue_pending (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x14BCCA: xwl_read_events (xwayland.c:814) ==5331== by 0x2AC0D0: ospoll_wait (ospoll.c:651) ==5331== by 0x2A5322: WaitForSomething (WaitFor.c:208) ==5331== by 0x27574B: Dispatch (dispatch.c:421) ==5331== by 0x279945: dix_main (main.c:276) ==5331== Address 0x1aacb5f4 is 36 bytes inside a block of size 154 free'd ==5331== at 0x48369EB: free (vg_replace_malloc.c:530) ==5331== by 0x1F8AE8: RROutputDestroyResource (rroutput.c:421) ==5331== by 0x29A2AC: doFreeResource (resource.c:880) ==5331== by 0x29AE5B: FreeResource (resource.c:910) ==5331== by 0x152BE0: xwl_output_remove (xwayland-output.c:408) ==5331== by 0x6570FCD: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x657093E: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x4DDB183: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD79D8: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD8EA3: wl_display_dispatch_queue_pending (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x14BCCA: xwl_read_events (xwayland.c:814) ==5331== by 0x2AC0D0: ospoll_wait (ospoll.c:651) ==5331== Block was alloc'd at ==5331== at 0x48357BF: malloc (vg_replace_malloc.c:299) ==5331== by 0x1F93E0: RROutputCreate (rroutput.c:83) ==5331== by 0x152A75: xwl_output_create (xwayland-output.c:361) ==5331== by 0x14BE59: registry_global (xwayland.c:764) ==5331== by 0x6570FCD: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x657093E: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x4DDB183: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD79D8: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD8EA3: wl_display_dispatch_queue_pending (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x14BCCA: xwl_read_events (xwayland.c:814) ==5331== by 0x2AC0D0: ospoll_wait (ospoll.c:651) ==5331== by 0x2A5322: WaitForSomething (WaitFor.c:208) Signed-off-by: Lionel Landwerlin Reviewed-by: Daniel Stone commit 75448671abe2c6ae3745eb5d2ed2e76df2de9c41 Author: Olivier Fourdan Date: Wed Sep 5 15:20:17 2018 +0200 glx: check for indirect context in CreateContextAttribsARB() Commit 99f0365b "Add a command line argument for disabling indirect GLX" added a test to check if indirect context are enabled in `DoCreateContext()` but `__glXDisp_CreateContextAttribsARB()` doesn't use `DoCreateContext()` and doesn't check if indirect context is enabled. As a result, clients can still manage to create indirect contexts using `glXCreateContextAttribsARB()` even if indirect contexts are disabled, which can possibly crash Xservers such as Xwayland or Xephyr when the context is destroyed. To avoid the issue, check for `enableIndirectGLX` in `__glXDisp_CreateContextAttribsARB()` as well. Fixes: 99f0365b "Add a command line argument for disabling indirect GLX" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107508 Signed-off-by: Olivier Fourdan commit ce271535adb6974e0a43bb64c8ed7a5dcaff67a2 Author: Lionel Landwerlin Date: Mon Aug 27 01:04:45 2018 +0100 present: fix freed pointer access When a vblank has been marked as aborted, it's going to be free in the flip_notify function when stopped. We can't notify it after it's stopped because the pointer is invalid. Valgrind backtrace: ==5331== Invalid read of size 8 ==5331== at 0x212B4D: present_vblank_notify (present_vblank.c:34) ==5331== by 0x21439B: present_wnmd_flip_notify (present_wnmd.c:194) ==5331== by 0x21439B: present_wnmd_event_notify (present_wnmd.c:228) ==5331== by 0x156216: xwl_present_sync_callback (xwayland-present.c:282) ==5331== by 0x6570FCD: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x657093E: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x4DDB183: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD79D8: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD8EA3: wl_display_dispatch_queue_pending (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x14BCCA: xwl_read_events (xwayland.c:814) ==5331== by 0x2AC0D0: ospoll_wait (ospoll.c:651) ==5331== by 0x2A5322: WaitForSomething (WaitFor.c:208) ==5331== by 0x27574B: Dispatch (dispatch.c:421) ==5331== Address 0x1b44dc98 is 40 bytes inside a block of size 184 free'd ==5331== at 0x48369EB: free (vg_replace_malloc.c:530) ==5331== by 0x213B0A: present_wnmd_free_idle_vblanks (present_wnmd.c:118) ==5331== by 0x213B0A: present_wnmd_flips_stop (present_wnmd.c:161) ==5331== by 0x2143EF: present_wnmd_flip_notify (present_wnmd.c:192) ==5331== by 0x2143EF: present_wnmd_event_notify (present_wnmd.c:228) ==5331== by 0x156216: xwl_present_sync_callback (xwayland-present.c:282) ==5331== by 0x6570FCD: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x657093E: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x4DDB183: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD79D8: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD8EA3: wl_display_dispatch_queue_pending (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x14BCCA: xwl_read_events (xwayland.c:814) ==5331== by 0x2AC0D0: ospoll_wait (ospoll.c:651) ==5331== by 0x2A5322: WaitForSomething (WaitFor.c:208) ==5331== Block was alloc'd at ==5331== at 0x48377D5: calloc (vg_replace_malloc.c:711) ==5331== by 0x212D9F: present_vblank_create (present_vblank.c:69) ==5331== by 0x214014: present_wnmd_pixmap (present_wnmd.c:610) ==5331== by 0x21576C: proc_present_pixmap (present_request.c:150) ==5331== by 0x27599D: Dispatch (dispatch.c:479) ==5331== by 0x279945: dix_main (main.c:276) ==5331== by 0x633AB16: (below main) (libc-start.c:310) v2: Still notify aborted flips (Roman) Signed-off-by: Lionel Landwerlin Reviewed-by: Daniel Stone Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107314 Reviewed-by: Roman Gilg Tested-by: Roman Gilg commit b3f64786a3fd428f7fdccd8c884478fd62b70c16 Author: Eric Anholt Date: Tue Sep 4 20:52:57 2018 -0700 glamor: Add support for exporting depth 16 pixmaps. With a patch to mesa to expose rgb565 pbuffers even on a server with only depth 24 and 32 visuals, fixes dEQP-EGL.functional.render.single_context.gles2.rgb565_pbuffer. Those pbuffers (or at least something renderable with 565) are required by the current CTS for GLES3, and having the server support DRI3 on those pixmaps means that we can avoid having a different path for EGL pbuffers compared to pixmaps. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit b84e7f1c2293f22bd9fcd92a6a82601f94a060a5 Author: Lyude Paul Date: Thu Sep 6 16:40:06 2018 -0400 meson: Fix building with -Ddga=false We forget to assign a value to xf86dgaproto_dep if -Ddga=false, which causes the meson build to fail: meson.build:448:0: ERROR: Unknown variable "xf86dgaproto_dep". A full log can be found at /home/lyudess/build/xserver/meson-logs/meson-log.txt FAILED: build.ninja So, just set it to an empty dependency to fix that. Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit a9a5bd0020dc76040d9b3722c0c88ccb12132dc0 Author: Jon Turney Date: Mon Aug 27 12:41:22 2018 +0100 hw/xwin: Fix 'make distcheck' Add internal.h to SOURCES, omitted from 126c1cfa Signed-off-by: Jon Turney Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit cd285922cdec966825e47220b1182a57abc1ff90 Author: Scott Anderson Date: Mon Aug 6 18:09:26 2018 +1200 xwayland: use wayland axis_discrete event This prevents multiple scroll events happening for wayland compositors which send axis values other than 10. For example, libinput will typically return 15 for each scroll wheel step, and if a wayland compositor sends those to xwayland without normalising them, 2 scroll wheel steps will end up as 3 xorg scroll events. By listening for the discrete_axis event, this will now correctly send only 2 xorg scroll events. The wayland protocol gurantees that there will always be an axis event following an axis_discrete event. However, it does not gurantee that other events (including other axis_discrete+axis pairs) will not happen in between them. So we must keep a list of outstanding axis_discrete events. Signed-off-by: Scott Anderson Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f79e5368512b72bb463925983d265b070261b7aa Author: Jim Qu Date: Mon Aug 27 13:37:38 2018 +0800 modesetting: code refactor for PRIME sync The X will be crashed on the system with other DDX driver, such as amdgpu. show the log like: randr: falling back to unsynchronized pixmap sharing (EE) (EE) Backtrace: (EE) 0: /usr/lib/xorg/Xorg (xorg_backtrace+0x4e) (EE) 1: /usr/lib/xorg/Xorg (0x55cb0151a000+0x1b5ce9) (EE) 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f1587a1d000+0x11390) (EE) (EE) Segmentation fault at address 0x0 (EE) The issue is that modesetting as the master, and amdgpu as the slave. Thus, when the master attempts to access pSlavePixPriv in ms_dirty_update(), problems result due to the fact that it's accessing AMD's 'ppriv' using the modesetting structure definition. Apart from fixing crash issue, the patch fix other issue in master interface in which driver should refer to master pixmap. Signed-off-by: Jim Qu Reviewed-by: Alex Goins commit 8a3ae555efb02b3811cca0bfb4ddaf8fe1457778 Author: Eric Anholt Date: Thu Aug 9 13:02:41 2018 -0700 meson: Add an option to build XSELINUX. Dependencies are ported from the automake build. v2: Make it a tristate defaulting to 'auto'. Use pkg-config for libaudit. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit a90f33721eba7f2dbde4a7278f1a213d696c85e9 Author: Alex Goins Date: Tue Aug 14 15:05:46 2018 -0500 randr: rrCheckPixmapBounding should only increase screen size The purpose of rrCheckPixmapBounding() is to make sure that the fb is large enough to accommodate the region scanned out by a GPU screen. Currently, however, it will actually shrink the fb if it's larger than it needs to be. This is a problem when combining PRIME output slaving with arbitrary transforms with xrandr. Although arbitrary transforms are not supposed to constrain the size of the fb (https://lists.freedesktop.org/archives/xorg-devel/2018-January/055563.html), xrandr will use RRSetScreenSize to resize the desktop to accommodate scaling transforms, e.g. scaling a 1920x1080 display to 3840x2160 will result in a desktop size of 3840x2160. In the case of PRIME, rrCheckPixmapBounding() will be called after RRSetScreenSize() and it will resize the fb back down to what it would be without the scaling transform, e.g. 1920x1080. This represents divergence in behavior between PRIME and non-PRIME outputs. I had originally made rrCheckPixmapBounding() account for arbitrary transforms, but realized that the fb being large enough to accommodate arbitrary transforms is not a hard requirement enforced in the server. Instead, this change simply makes it so that rrCheckPixmapBounding() will only resize the fb to be larger than it already is, preventing it from stepping on prior requests to increase the size of the fb. Signed-off-by: Alex Goins Reviewed-by: Keith Packard Reviewed-by: Michel Dänzer commit 1fc20b985cc888345bc8c6fce7b43f10ce71fe43 Author: Eric Anholt Date: Tue Aug 7 16:23:19 2018 -0700 meson: Add detection of libsystemd-daemon. This enables Xtrans's systemd socket activation. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 4ba786677050684c8801201f6bd83ce884f2885e Author: Eric Anholt Date: Tue Aug 7 16:23:18 2018 -0700 meson: Get close to parity with autotools for CLIENTIDS tracking. The client ID is only needed for XRes, and autotools build ignores the --clientids= arg if xres is disabled. We haven't made a meson option for disabling tracking client ids (is it actually worth a build option?), so just make this depend on xres. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit e047da37becc23a8d2549d8f264aaa18e4965186 Author: Eric Anholt Date: Tue Aug 7 16:23:17 2018 -0700 meson: Add missing setup of the NO_LOCAL_CLIENT_CRED define. Ported from autotools. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 049d2346abee091f18e6f62bcf7331267c2ba656 Author: Eric Anholt Date: Tue Aug 7 16:23:16 2018 -0700 meson: Make FALLBACK_INPUT_DRIVER configurable in meson. This makes us match the featureset of autotools, and also fixes the non-Linux default value to match. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 97bd8bc9cb6d910420627760288696e2a0c5d226 Author: Eric Anholt Date: Tue Aug 7 16:23:14 2018 -0700 meson: Make xf86vidmodeproto mandatory. This is silly to have optional based on detection of the protocol headers, particularly now that we have a single protocol header repo to install. Reviewed-by: Peter Hutterer Signed-off-by: Eric Anholt commit db53c439ba785a16f789918fe66da6ba161a0742 Author: Eric Anholt Date: Tue Aug 7 16:23:13 2018 -0700 meson: Add linking to x86 iopl libs on BSDs. Ported from automake. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 9869512cbf1bd87146f59106c0c71bda76cc0dcc Author: Eric Anholt Date: Tue Aug 7 16:23:12 2018 -0700 meson: Add HAVE_LIBDISPATCH define to xquartz build. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 843e44adf17b2828991a26ac3f8f82cf2fa63bd3 Author: Eric Anholt Date: Tue Aug 7 16:23:11 2018 -0700 meson: Add PIO access support for FreeBSD and NetBSD on Alpha. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 513d52d58915f291c0f706b67b8dc73f45de109f Author: Eric Anholt Date: Tue Aug 7 16:23:10 2018 -0700 meson, automake: Drop unused USESTDRES cflag setup. Nothing in tree references the flag. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit d0545847a06f375586927ea66c521a039439f708 Author: vadym.shovkoplias Date: Thu Aug 9 12:25:08 2018 -0400 autotools: Handle case when bindir var in xkbcomp.pc is absent Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107521 Fixes: 726839459cb (autotools: Derive xkb configuration from xkbcomp.pc) Reviewed-by: Adam Jackson Signed-off-by: vadym.shovkoplias commit 4fe02b8da3ca58500f7e6e017e388907cf4a8b73 Author: Peter Hutterer Date: Wed Aug 8 15:22:41 2018 +1000 dix: check_modmap_change() returns Success, not true Not sure what if anything calls XSetDeviceModifierMapping() but this would've failed all the time. check_modmap_change() returns Success but we were treating it like a boolean. Fix this. Reported-by: Adam Jackson Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit c20e7b5e2222c0cae2a487264748fa5db711e6e4 Author: Eric Anholt Date: Wed Aug 1 13:49:54 2018 -0700 meson: Automatically detect HAVE_PTHREAD_SETNAME_NP Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 86c9245838b95e8a0c37fa61d835112933c738f0 Author: Eric Anholt Date: Wed Aug 1 13:49:53 2018 -0700 meson: Try to hook up BSD APM build configuration. I don't have a BSD to test on, but this should do the same as what autotools did. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit accd32a466a1a87ab45b5422dff2ef5a9c867049 Author: Eric Anholt Date: Wed Aug 1 13:49:52 2018 -0700 xorg: Remove the XF86PM define. We already have pm_noop.c being built most of the time for the no-OS-PM case, so just switch to always using it. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 708ddfbda1391468d66957e247f51854b39db5fa Author: Eric Anholt Date: Wed Aug 1 13:49:51 2018 -0700 automake,meson: Remove HAVE_LIBUDEV define. CONFIG_UDEV and CONFIG_UDEV_KMS are the actual defines that are used in the C code. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 7deaf990079b94c70d263d8f1e16bb954bd2917f Author: Eric Anholt Date: Wed Aug 1 13:49:50 2018 -0700 meson: Automatically detect support for XTRANS_SEND_FDs. The SCM_RIGHTS flag seems to be the thing that xtrans depends on, and meson makes the check easy without needing a build option. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit e3e5265743a3536f15c8b7ae521848a646cdc189 Author: Eric Anholt Date: Wed Aug 1 13:49:49 2018 -0700 meson: Remove XXX for libconfig in kdrive. This is already included in ephyr (the only kdrive server left) Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 1ef7aed3e2bb2af32330f19b1e7560000512ddfe Author: Keith Packard Date: Tue Jun 26 09:20:00 2018 -0700 During reset/shutdown, clean up leases in DIX instead of each driver Instead of having every video driver loop over any pending leases to free them during CloseScreen, do this up in the DIX layer by terminating leases when a leased CRTC or Output is destroyed and (just to make sure), also terminating leases in RRCloseScreen. The latter should "never" get invoked as any lease should be associated with a resource which was destroyed. This is required as by the time the driver's CloseScreen function is invoked, we've already freed all of the DIX randr structures and no longer have any way to reference the leases Signed-off-by: Keith Packard Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=106960 Cc: Thomas Hellstrom commit d625e16918ef9104863709eb108346464767c444 Author: Takashi Iwai Date: Thu Jul 19 14:38:19 2018 +0200 modesetting: Fix cirrus 24bpp breakage The recent rewrite of modesetting driver broke the 24bpp support. As typically found on cirrus KMS, it leads to a blank screen, spewing the error like: failed to add fb -22 (EE) modeset(0): failed to set mode: Invalid argument The culript is that the wrong bpp value of the front buffer is passed to drmModeAddFB(). Fix it by replacing with the back buffer bpp, drmmode->kbpp. Signed-off-by: Takashi Iwai Tested-by: Stefan Dirsch Reviewed-by: Adam Jackson commit cdec2b3c195d1d080207ef01c55ff14b45370010 Author: Olivier Fourdan Date: Wed Jul 25 16:33:23 2018 +0200 xwayland: Enable DRI3 for glamor glamor_fds_from_pixmap() will bail out early if DRI3 is not enabled, unfortunately Xwayland's glamor code would not set it as enabled which would lead to blank pixmaps when using texture from pixmap. Make sure to mark DRI3 as enabled from glamor_egl_screen_init() in Xwayland. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107287 Fixes: c8c276c956 ("glamor: Implement PixmapFromBuffers and BuffersFromPixmap") Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit ce2dde9ed0243a18ae18af0879134f7c1afbd700 Author: emersion Date: Fri Jul 13 15:51:26 2018 -0400 xwayland: rotate logical size for RRMode The logical size is the size of the output in the global compositor space. The mode width/height should be scaled as in the logical size, but shouldn't be transformed. Thus we need to rotate back the logical size to be able to use it as the mode width/height. This fixes issues with pointer input on transformed outputs. Signed-Off-By: Simon Ser Reviewed-by: Olivier Fourdan commit 93cafb0828d2e24bd14616df1aa9883fb843dd6c Author: Peter Hutterer Date: Wed Jul 18 13:22:43 2018 +1000 Xext: dynamically allocate the PanoramiXDepths[j].vids array Control flow is: PanoramiXMaybeAddDepth() allocates an array size 240 (pDepth->numVisuals) PanoramiXMaybeAddVisual() finds up to 270 matches (pScreen->numVisuals) and writes those into the previously allocated array. This caused invalid reads/writes followed by eventually a double-free abort. Reproduced with xorg-integration-tests server test XineramaTest.ScreenCrossing/* (and a bunch of others). Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 1c7f34e99ff9750979a03ae20c6be1f2b42c284c Author: Stefan Agner Date: Thu Dec 22 15:41:06 2016 +0100 modesetting: Fix 16 bit depth/bpp mode When setting DefaultDepth to 16 in the Screen section, the current code requests a 32 bpp framebuffer, however the X-Server seems to assumes 16 bpp. Fixes commit 21217d02168d ("modesetting: Implement 32->24 bpp conversion in shadow update") Reviewed-by: Adam Jackson Signed-off-by: Stefan Agner commit d95a1310ef8e08a93a28f9766d1b4093f7891404 Author: Lyude Paul Date: Fri Jun 22 12:49:47 2018 -0400 meson: ensure the libc has RPC functions when secure-rpc is enabled Currently our meson.build just makes the assumption that the libc is going to provide RPC functions. This doesn't actually seem to be the case on Fedora, which causes compilation to fail unexpectedly: ../../Projects/xserver/os/rpcauth.c:47:10: fatal error: rpc/rpc.h: No such file or directory #include ^~~~~~~~~~~ compilation terminated. So, in the event that we can't use libtirpc ensure that we actually check whether or not the libc provides rpc/rpc.h. If it doesn't, raise an error. Reviewed-by: Adam Jackson Signed-off-by: Lyude Paul commit d83efc47b7a524b4f8d4a993c27a3e402a98fa7c Author: Keith Packard Date: Tue Jun 26 16:34:29 2018 -0700 xf86-video-modesetting: Lease planes as well if using atomic If we're using atomic modesetting, then we're also using universal planes, and so the lease we create needs to include the plane. Signed-off-by: Keith Packard Reviewed-by: Daniel Stone commit 4a11f66e4690f9e94dc61cb264f5ef78dbdb255a Author: Keith Packard Date: Tue Jun 26 14:05:31 2018 -0700 xf86-video-modesetting: Don't enable UNIVERSAL_PLANES separately We don't want universal_planes unless we're using atomic APIs for modesetting, and the kernel already enables universal_planes automatically when atomic is enabled. If we enable universal_planes when we're not using atomic, then we won't have selected a plane for each crtc, and this will break lease creation which requires planes for each output when universal_planes is enabled. Signed-off-by: Keith Packard Reviewed-by: Daniel Stone commit 2faf4cef8bcf9bb2034a27219a656ea7221afc6c Author: Keith Packard Date: Thu Jun 28 11:45:16 2018 -0700 xfree86: Wrap RRCrtcIsLeased and RROutputIsLeased to check for DIX structures Before DIX structures are allocated for crtcs and outputs, we don't want to call DIX randr code with NULL pointers. This can happen if the driver sets video modes early in server initialization, which Nouveau does in zaphod mode. Cc: thellstrom@vmware.com Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=106772 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=106960 Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit c55a44a9a86aaece17c1a2e73c77e3e665c4888e Author: Keith Packard Date: Thu Jun 28 11:45:15 2018 -0700 xfree86: Reset randr_crtc and randr_output early in xf86CrtcCloseScreen The DIX crtc and output structures are freed when their resources are destroyed, which happens before CloseScreen is called. As a result, we know these pointers are invalid and referencing them during any of the remaining CloseScreen sequence will be bad. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard Cc: thellstrom@vmware.com Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=106960 commit 49283e238a0ba6051034ae635e5970891f17f9df Author: Jon Turney Date: Sat Jun 30 12:53:35 2018 +0100 meson: use absolute paths in manpage substitutions paths returned by get_option('foodir') are potentially relative to prefix Noticed when comparing manpages generated by a meson build with those generated by an autotools build Signed-off-by: Jon Turney Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 38ff29ec8ead0a293f50ac52146199babe4205ca Author: Keith Packard Date: Thu Jan 18 18:07:29 2018 -0800 modesetting: Allow a DRM fd to be passed on command line with -masterfd [v2] This lets an application open a suitable DRM device and pass the file descriptor to the mode setting driver through an X server command line option, '-masterfd'. There's a companion application, xlease, which creates a DRM master by leasing an output from another X server. That is available at git clone git://people.freedesktop.org/~keithp/xlease v2: Always print usage, but note that it can't be used if setuid/gid Suggested-by: Lyude Paul Signed-off-by: Keith Packard Reviewed-by: Lyude Paul commit 2f39b2a07805194fdd7def30d941666963d6e670 Author: Laurent Carlier Date: Sat Jun 16 13:00:01 2018 +0200 meson: Add configuration of listening on tcp, unix and local bugzilla: https://bugs.kde.org/show_bug.cgi?id=395419 bugzilla: https://bugs.archlinux.org/task/59025 Signed-off-by: Laurent Carlier Reviewed-by: Aaron Plattner Signed-off-by: Peter Hutterer commit c41d4ff48f72aa964afd131b59e1538295d062dc Author: Lyude Paul Date: Wed Jun 27 20:29:42 2018 -0400 modesetting: Fix uninitialized memory usage in drmmode_crtc_get_fb_id() This really sucked to find out :( Signed-off-by: Lyude Paul Reviewed-by: Karol Herbst commit 9f02855e7a1b7a3c1e2ee7bfbc73e87c29126920 Author: Thomas Hellstrom Date: Wed Jun 20 19:23:48 2018 +0200 glamor: Work around GEM usage v2 KMS drivers are not required to support GEM. In particular, vmwgfx doesn't support flink and handles and names are identical. Getting a bo name should really be part of a lower level API, if needed, but in the mean time work around this by setting the name identical to the handle if GEM isn't supported. This fixes modesetting driver dri2 on vmwgfx. Reviewed-by: Deepak Rawat Signed-off-by: Thomas Hellstrom commit dc90b1c3c328f1d0b022a234b69ef32bda7ccb01 Author: Lyude Paul Date: Wed Jun 20 19:12:32 2018 -0400 randr: Scream when creating a shared pixmap fails This seems like a problem worth screaming about. Signed-off-by: Lyude Paul Reviewed-by: Dave Airlie commit 186a21c4bac744ffe645c8d1a6dda2d41c6d33d8 Author: Lyude Paul Date: Wed Jun 20 19:12:31 2018 -0400 glamor: Unbreak glamor_fd_from_pixmap() When support for allocating GBM BOs with modifiers was added, glamor_fd_from_pixmap() was changed so that it would return an error if it got a bo with modifiers set from glamor_fds_from_pixmap(). The problem is that on systems that support BOs with modifiers, glamor_fds_from_pixmap() will always return BOs with modifiers. This means that glamor_fd_from_pixmap() was broken entirely, which broke a number of other things including glamor_shareable_fd_from_pixmap(), which meant that modesetting using multiple GPUs with the modesetting DDX was also broken. Easy reproducer: - Find a laptop with DRI prime that has outputs connected to the dedicated GPU and integrated GPU - Try to enable one display on each using the modesetting DDX - Fail Since there isn't a way to ask for no modifiers from glamor_fds_from_pixmap, we create a shared _glamor_fds_from_pixmap() function used by both glamor_fds_from_pixmap() and glamor_fd_from_pixmap() that calls down to the appropriate glamor_egl_fd*_from_pixmap() function. Signed-off-by: Lyude Paul Reviewed-by: Dave Airlie Cc: Louis-Francis Ratté-Boulianne Fixes: c8c276c956 ("glamor: Implement PixmapFromBuffers and BuffersFromPixmap") commit c12f1bd4b76088ea66e3bec9ab9721a52b20cdf2 Author: Lyude Paul Date: Thu Jun 7 20:30:34 2018 -0400 modesetting: Also disable CRTC in drmmode_output_disable() So, this did actually work on older kernels at one point in time, however it seems that this working was a result of some of the Linux kernel's atomic modesetting helpers not preserving the CRTC's enabled state in the right spots. This was fixed in: 846c7dfc1193 ("drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2") As a result, atomic commits which simply disassociate a DRM connector with it's CRTC while leaving the CRTC in an enabled state aren't enough to disable the CRTC, and result in the atomic commit failing. This currently can cause issues with MST hotplugging where X will end up failing to disable the MST outputs after they've left the system. A simple reproducer: - Start up Xorg - Connect an MST hub with displays connected to it - Remove the hub - Now there should be CRTCs stuck on the orphaned MST connectors, and X won't be able to reclaim them. Signed-off-by: Lyude Paul Cc: Louis-Francis Ratté-Boulianne Reviewed-by: Dave Airlie commit 5a8b886a956773669ceb2a2bcacd59184bcc7c99 Author: Adam Jackson Date: Mon Jun 11 15:10:04 2018 -0400 configure: Remove unused CONFIGFILE This isn't used for anything, which is just as well, because /etc/xorg.conf is not in fact a path xserver will try to use. Bugzilla: https://bugs.freedesktop.org/8890 Signed-off-by: Adam Jackson Reviewed-by: Aaron Plattner commit a85e94a50c94b07574c8701a3ff3c1243f4257f4 Author: Olivier Fourdan Date: Fri Jun 15 08:57:12 2018 +0200 modesetting: use drmmode_bo_import() for rotate_fb drmmode_shadow_allocate() still uses drmModeAddFB() which may fail if the format is not as expected, preventing from using a rotated output. Change it to use the new function drmmode_bo_import() which takes care of calling the drmModeAddFB2() API. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106715 Signed-off-by: Olivier Fourdan Tested-by: Tomas Pelka Reviewed-by: Lyude Paul commit f5aace7a27d6d61068dcae46c9756b669ab51d50 Author: John Lumby Date: Tue Jun 26 17:14:34 2018 -0700 Change the DPMS initialization to be conditional on not set from config Any DPMS timeout values set in ServerFlags section of the xorg.conf are being overwritten by DPMS extension initialization. Therefore change the DPMS initialization of timeout values to be conditional on not set from config. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106963 Signed-off-by: John Lumby Reviewed-by: Emil Velikov Signed-off-by: Keith Packard commit f33cb4264387ed14a586ba080885b4d21e4aa48b Author: Damien Leone Date: Mon Jun 18 16:24:28 2018 -0700 os: Recompute whether any clients are ready after check_timers() If a driver calls AttendClient() from within a timer callback we need to re-compute the local 'are_ready' to prevent the attended client from waiting until WaitForSomething() times out. This is a fix similar to commit 9ed5b263. Signed-off-by: Damien Leone Reviewed-by: Keith Packard commit 92daeb31fa3235dc791e0444b072ec4bbc6e35ab Author: Olivier Fourdan Date: Mon Jun 11 09:21:08 2018 +0200 xwayland: mandatory EGL backend API The API init_wl_registry() and has_wl_interfaces() are marked as being optional, but both GBM And EGLStream backends implement them so there is point in keeping those optional. Suggested-by: Emil Velikov Signed-off-by: Olivier Fourdan commit 792359057bd54548555674d2d309c0cfeebac12d Author: Olivier Fourdan Date: Mon Jun 11 09:13:30 2018 +0200 xwayland: simplify xwl_glamor_pixmap_get_wl_buffer() When retrieving the Wayland buffer from a pixmap, if the buffer already exists, the GBM backend will return that existing buffer. However, as seen with the Present issues, if the call had previously passed a wrong size, that buffer will remain at the wrong size for as long as the buffer exists, which is error prone. Considering that the width/height passed to get_wl_buffer() is always the actual pixmap drawable size, and considering that the EGLStream backend makes no use of the size either, there is really no point in passing the width/height around. Simplify the xwl_glamor_pixmap_get_wl_buffer() and EGL backends API by removing the pixmap size, and use the drawable size instead. Signed-off-by: Olivier Fourdan commit bdadaa25f5c1f62d30d8e76b4ebfcef414ed9c90 Author: Olivier Fourdan Date: Tue Jun 5 19:38:45 2018 +0200 xwayland: EGL_IMG_context_priority required by EGLStream xwl_glamor_eglstream_init_egl() uses "EGL_IMG_context_priority" extension, make sure it's actually available before using it. Suggested-by: Emil Velikov Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit 5d843f6947538dabde258584a5795e0b25ea8779 Author: Olivier Fourdan Date: Tue Jun 5 19:38:44 2018 +0200 xwayland: check for EGLStream backend explicitly Now that we have separate backends for EGLStream and GBM, we can explicitly check for the EGLStream backend to disable present support in that case. Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit d7185a84b60ed03aaa84eb522dcff365218e7211 Author: Olivier Fourdan Date: Tue Jun 5 19:38:43 2018 +0200 xwayland: refactor EGL backends for wayland registry To be able to check for availability of the Wayland interfaces required to run a given EGL backend (either GBM or EGLStream for now), we need to have each backend structures and vfuncs in place before we enter the Wayland registry dance. That basically means that we should init all backends at first, connect to the Wayland compositor and query the available interfaces and then decide which backend is available and should be used (or none if either the Wayland interfaces or the EGL extensions are not available). For this purpose, hold an egl_backend struct for each backend we are to consider prior to connect to the Wayland display so that, when we get to query the Wayland interfaces, everything is in place for each backend to handle the various Wayland interfaces. Eventually, when we need to chose which EGL backend to use for glamor, the available Wayland interfaces and EGL extensions available are all known to Xwayland. Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit 48f037a27c45b571c9750ac812977ac0a33ab12b Author: Olivier Fourdan Date: Tue Jun 5 19:38:42 2018 +0200 xwayland: move EGL backend init to glamor Move EGL backends initialization to its own function in xwayland-glamor.c Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit f2fcb4877e976d078b0eb4755177170467341484 Author: Olivier Fourdan Date: Tue Jun 5 19:38:41 2018 +0200 xwayland: Add Wayland interfaces check Introduces a new egl_backend function to let the EGL backend check for the presence of the required Wayland interfaces. Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit b74b0f18b8d3032317e38453ee63ae9efd33a098 Author: Olivier Fourdan Date: Tue Jun 5 19:38:40 2018 +0200 xwayland: move egl_backend to its own struct EGL backend availability requires both EGL extensions and Wayland interfaces to be present, so we will need to consider multiple backends during initialization. As a preliminary work, move the egl_backend to its own struct so that we can have more than one backend at any given time. Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit de004eefc60ec595f5d6d81658468e082f8df930 Author: Olivier Fourdan Date: Tue Jun 5 19:38:39 2018 +0200 xwayland: skip drm authentication with render node If using a render node, we can skip DRM authentication. Suggested-by: Emil Velikov Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit b823b43dca143810146f563d09e8996058b9d09e Author: Olivier Fourdan Date: Tue Jun 5 19:38:38 2018 +0200 xwayland: GBM should fail w/out "GL_OES_EGL_image" Surely, we should fail to init GBM backend if "GL_OES_EGL_image" is missing. This seems to have been lost with commit 1545e2dba ("xwayland: Decouple GBM from glamor"). Suggested-by: Emil Velikov Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit 78ce4aa979ff3f5870fbc12a7e5c53547084a61a Author: Olivier Fourdan Date: Tue Jun 5 19:38:37 2018 +0200 xwayland: swap "name" and "id" in init_wl_registry() Both xwl_glamor_init_wl_registry() and the Wayland global registry handler use the interface id/name in that order, using name/id in the egl_backend vfunc makes things confusing and error prone. Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit f6b2109c1b49484af772df518314ec8e8432febe Author: Olivier Fourdan Date: Tue Jun 5 19:38:36 2018 +0200 xwayland: move glamor specific routines Functions such as: xwl_glamor_egl_supports_device_probing() xwl_glamor_egl_get_devices() xwl_glamor_egl_device_has_egl_extensions() Are of no use outside of EGLStream support, move them to the relevant source file. Similarly, the other glamor functions such as: xwl_glamor_init() xwl_screen_set_drm_interface() xwl_screen_set_dmabuf_interface() xwl_glamor_pixmap_get_wl_buffer() xwl_glamor_init_wl_registry() xwl_glamor_post_damage() xwl_glamor_allow_commits() xwl_glamor_egl_make_current() Are useless without glamor support enabled, move those within a a "#ifdef XWL_HAS_GLAMOR" in xwayland.h Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit d31a7be15e259275599a9f67e0d921471ae64913 Author: Olivier Fourdan Date: Tue Jun 5 19:37:58 2018 +0200 xwayland: make xwl_output_get_xdg_output() static Make xwl_output_get_xdg_output() private, it doesn't need to be available elsewhere. Signed-off-by: Olivier Fourdan Reviewed-by: Lyude Paul Reviewed-by: Emil Velikov commit e16a6da79dea793a335be70ba07d5e1c1295b5eb Author: Olivier Fourdan Date: Tue Jun 5 19:37:57 2018 +0200 xwayland: do not disable glamor if EGLStream failed EGLStream requires glamor, but the opposite is not true. So if someone passes "-eglstream" with a GPU which does not support EGLStream, we could maybe still try GBM and be lucky. That allows Wayland compositors to pass "-eglstream" regardless of the actual hardware, if they want to enable EGLStream on GPU which support it. Signed-off-by: Olivier Fourdan Reviewed-by: Lyude Paul Reviewed-by: Emil Velikov commit 44560af02823239e1b5b236e8cb365b5bdf24b6a Author: Olivier Fourdan Date: Tue Jun 5 19:37:56 2018 +0200 xwayland: process Wayland events after adding screen When we're done adding a new screen, we need to process any pending Wayland events again. Hence we don't end up processing xdg_output events unexpectedly when glamor is disabled. Be that because "-shm" was passed or "-eglstream" has failed. Failing to do that could lead to a crash at startup: Xwayland: dixGetPrivateAddr: Assertion `key->initialized' failed. (EE) (EE) Backtrace: (EE) 0: Xwayland (OsSigHandler) (EE) 1: libpthread.so.0 (funlockfile) (EE) 2: libc.so.6 (gsignal) (EE) 3: libc.so.6 (abort) (EE) 4: libc.so.6 (?+0x0) (EE) 5: libc.so.6 (__assert_fail) (EE) 6: Xwayland (dixGetPrivateAddr) (EE) 7: Xwayland (_fbGetWindowPixmap) (EE) 8: Xwayland (getDrawableDamageRef) (EE) 9: Xwayland (damageRegionProcessPending) (EE) 10: Xwayland (damagePolyFillRect) (EE) 11: Xwayland (miPaintWindow) (EE) 12: Xwayland (miWindowExposures) (EE) 13: Xwayland (miHandleValidateExposures) (EE) 14: Xwayland (SetRootClip) (EE) 15: Xwayland (update_screen_size) (EE) 16: Xwayland (apply_output_change) (EE) 17: libffi.so.6 (ffi_call_unix64) (EE) 18: libffi.so.6 (ffi_call) (EE) 19: libwayland-client.so.0 (wl_log_set_handler_client) (EE) 20: libwayland-client.so.0 (_init) (EE) 21: libwayland-client.so.0 (wl_display_dispatch_queue_pending) (EE) 22: libwayland-client.so.0 (wl_display_roundtrip_queue) (EE) 23: Xwayland (InitInput) (EE) 24: Xwayland (dix_main) (EE) 25: libc.so.6 (__libc_start_main) (EE) 26: Xwayland (_start) (EE) (EE) Fatal server error: (EE) Caught signal 6 (Aborted). Server aborting (EE) Aborted (core dumped) Signed-off-by: Olivier Fourdan Reviewed-by: Lyude Paul Reviewed-by: Emil Velikov commit dbde3fec32641ae23389cffa12a04d3608936795 Author: Olivier Fourdan Date: Tue Jun 5 19:37:55 2018 +0200 xwayland: "EGL_EXT_device_base" required for EGLStream eglQueryDevicesEXT() would abort if the required extensions are not available, meaning that enabling “-eglstream” on a non-EGLStream capable hardware would lead to an abort(). Check that "EGL_EXT_device_base" extension is available and bail out early if not, so we don't abort() later in eglQueryDevicesEXT(). Signed-off-by: Olivier Fourdan Reviewed-by: Lyude Paul Reviewed-by: Emil Velikov commit 06c31e782e360363238cf20e7afd3e4990a2c304 Author: Olivier Fourdan Date: Tue Jun 5 19:37:54 2018 +0200 xwayland: allow "-eglstream" option The command line option "-eglstream" used to enable EGLStream support for NVidia GPU was made available only when Xwayland was built with EGLStream support enabled. Wayland compositors who spawn Xwayland have no easy way to tell whether or not Xwayland was built with EGLStream support enabled, and adding "-eglstream" command line option to Xwayland when it wasn't built with EGLStream support would prevent Xwayland from starting (“Unrecognized option” error). Make sure we support the command line option "-eglstream" regardless of EGLStream support in Xwayland. Obviously, if Xwayland was built without EGLStream support, this has no effect. Signed-off-by: Olivier Fourdan Reviewed-by: Lyude Paul Reviewed-by: Emil Velikov commit 707d0f912b916e7546c4f7e7a5f7023a53e74615 Author: Vladimir Panteleev Date: Wed Jun 20 13:37:45 2018 +0000 glx/vndcmds: Fix vendor hash table key size The keySize parameter of the hashing/comparison functions was incorrectly specified to be sizeof(void*), even though the keys of this hashtable are CARD32. Fixes address sanitizer failure on 64-bit builds. Reviewed-by: Adam Jackson commit 0170e200f546e4b3430bd07a70551436cf44b0be Author: Peter Hutterer Date: Mon Jun 11 09:04:22 2018 +1000 xwayland: add "tablet" into the tablet device names Changes the device name from "xwayland-stylus" to "xwayland-tablet stylus". This doesn't fully address #26 but it goes a little step into making it more human-readable. https://gitlab.freedesktop.org/wayland/wayland/issues/26 Signed-off-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit ec7e2b54c5b4a34b2a077082967bc3ead30e227e Author: Alexander Volkov Date: Tue Jun 5 13:05:39 2018 +0300 Xext/shm: Refuse to work for remote clients Avoid access to System V shared memory segment on the X server side for clients forwarded via SSH. Also prevent them from hanging while waiting for the reply from the ShmCreateSegment request. v2: Allow ShmQueryVersion request even for remote clients Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=11080 Signed-off-by: Alexander Volkov Reviewed-by: Adam Jackson commit 5c95be38e5af28108d8c6c08dfe08d1dfcb7ed42 Author: Michał Górny Date: Mon Jun 11 17:17:31 2018 -0400 xfree86: Makefile shouldn't rely on superuser being named 'root' Change the 'chown' statement in Makefile.am to use the numeric UID of superuser instead of relying on the name 'root'. Bugzilla: https://bugs.freedesktop.org/27726 Signed-off-by: Adam Jackson Signed-off-by: Michał Górny Reviewed-by: Peter Hutterer commit 166ac294aefe21a6cfcc0e7a4c9525eef49c2f0c Author: Matt Turner Date: Tue May 22 21:10:55 2018 -0700 xfree86: Inline xf86{Read,Write}Mmio{8,16,32} on alpha In commit 9db2af6f757e (xfree86: Remove xf86{Map,Unmap}VidMem) we somehow stopped exporting xf86{Read,Write}Mmio{8,16,32}. Since the function pointer indirection was intended to support dense vs sparse and sparse support is now gone, we can just make the functions static inline in compiler.h and avoid all of this. Bugzilla: https://bugs.gentoo.org/548906 Tested-by: Christopher May-Townsend Reviewed-by: Adam Jackson Signed-off-by: Matt Turner commit 1993f147d08170f07a72e43f0a0f27687e16967b Author: Olivier Fourdan Date: Fri Jun 8 16:23:44 2018 +0200 xwayland: use pixmap size on present flip If the pixmap size does not match the present box size, flickering occurs. This can happen when the client changes its size (e.g. switching to fullscreen), and since the buffer is kept as long as the pixmap is valid, once the buffer is created, it remains at the wrong (old) size and causes continuous flickering. Use the actual pixmap's drawable size instead of the present box to create the buffer so that it's sized appropriately. Bugzilla: https://bugs.freedesktop.org/106841 Fixes: 0fb2cca193e6 "xwayland: Preliminary support for Present's new window flip mode" Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Reviewed-by: Roman Gilg commit 10eec2ccb11701fe29ab246acd6c0bdc2991b775 Author: Michel Dänzer Date: Thu Jun 7 17:55:21 2018 +0200 present/wnmd: Preserve window pixmap's screen_x/y on flip The incorrect values could result in the new pixmap's contents getting corrupted down the line. v2: * Guard screen_x/y lines by #ifdef COMPOSITE Bugzilla: https://bugs.freedesktop.org/106841 Fixes: 029608dd8020 "present: Add window flip mode" Reviewed-by: Adam Jackson # v1 Reviewed-by: Keith Packard # v1 Reviewed-by: Roman Gilg Tested-by: Olivier Fourdan # v1 commit 6300049a9a4b84789a2e8141f5cad17adf22185c Author: Dave Airlie Date: Tue May 29 10:39:22 2018 +1000 xwayland: fix typo in non-modifier fallback path Pointed out on irc by q66. Reviewed-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 40586cc4f8faa271d62fd84fe98c41debb878984 Author: Roman Kapl Date: Thu Jun 7 03:31:42 2018 +0200 Xi: add forgotten byte-swaps for Valuator fields This has caused nonsensical values in xinput output. Signed-off-by: Roman Kapl Signed-off-by: Peter Hutterer commit cefbc6a9356e5c6cf935b61557efa897762defae Author: Roman Kapl Date: Thu Jun 7 03:31:41 2018 +0200 Xi: fix byte-swapping of button labels The byte-swapping code forgot that the xXIButtonInfo is followed by a button mask, not directly by the button labels. This resulted in client crashes in cross-endian setups, for example in `xinput list --long`, since the client got an invalid atom. A new function was introduced to get the right positions for the label and mask data. Signed-off-by: Roman Kapl Signed-off-by: Peter Hutterer commit 9b8999411033c9473cd68e92e4690a91aecf5b95 Author: Adam Jackson Date: Wed Jun 6 15:56:26 2018 -0400 glamor: Enable modifier support for xfree86 too This was left disabled in 1.20.0, it's time to start being sure it works. Signed-off-by: Adam Jackson Acked-by: Keith Packard Acked-by: Daniel Stone commit 3ebef6ab850675e1091df2125ebdfbb147436e6c Author: Michel Dänzer Date: Fri Jun 1 11:57:15 2018 +0200 exa: Use PictureMatchFormat for source-only picture format description Their pFormat member is NULL, which resulted in a crash in miRenderColorToPixel. Fixes: 8171d4c2d67b "render: Store and use all 16bpc of precision for solid pixels (v2.1)" Reviewed-by: Adam Jackson commit 4d5950ce14676f970d9de97380929a93948b98f2 Author: Michel Dänzer Date: Wed May 23 11:18:02 2018 +0200 glamor: Propagate glamor_fds_from_pixmap error in glamor_fd_from_pixmap glamor_fds_from_pixmap returns 0 on error, but we were treating that as success, continuing with uninitialized stride and fd values. Also bail if the offset isn't 0, same as in dri3_fd_from_pixmap. v2: * Reduce to a simple one-liner fix (Emil Velikov) Fixes: c8c276c9569b "glamor: Implement PixmapFromBuffers and BuffersFromPixmap" Reviewed-by: Emil Velikov commit 3da999a0390407d512bf784e4faf01482bfff9ea Author: Michel Dänzer Date: Wed May 23 11:38:13 2018 +0200 glamor: Always return 0 from glamor_fds_from_pixmap on error This matches what glamor_egl_fds_from_pixmap and dri3_fds_from_pixmap do and what proc_dri3_buffers_from_pixmap expects. Fixes: c8c276c9569b "glamor: Implement PixmapFromBuffers and BuffersFromPixmap" Reviewed-by: Emil Velikov commit 315c63c41d833700c505e4f21ffac4c59e1e3b2c Author: Michel Dänzer Date: Fri May 18 11:23:01 2018 +0200 modesetting: Pass O_CLOEXEC when opening a DRM device We don't want DRM file descriptors to leak to child processes. Reviewed-by: Keith Packard Signed-off-by: Michel Dänzer commit ab53e2859facecc0486344679dc01ea31fb427e9 Author: Michel Dänzer Date: Fri May 18 11:23:00 2018 +0200 xfree86: Fix O_CLOEXEC usage in lnx_platform It was passing O_CLOEXEC as permission bits instead of as a flag. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard commit 1e9d5533e3c08fc22099d6dd0f11fa642ab4f1b0 Author: Chris Wilson Date: Sun Apr 15 15:40:05 2018 +0100 os/WaitFor: Use the simpler xorg_list_for_each_entry() As we are not freeing elements while iterating the list of timers, we can forgo using the safe variant, and reduce the number of pointer dances required for the insertion sort. Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit 6115d8b40ce0c91620b6d5e7d18e0da704409f89 Author: Chris Wilson Date: Sun Apr 15 15:40:04 2018 +0100 os/WaitFor: Use xorg_list_append() Currently, we use xorg_list_add(new, head->prev) which is functionaly equivalent to xorg_list_append(), but with more pointer chasing, so reduce the strain on the reader and compiler by using the simpler append(). Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit 7437b6dbdee050f8ebb3a79b9077d051c91880c3 Author: Lukas F. Hartmann Date: Tue May 15 21:51:56 2018 +0200 glamor_init: clamp GLSL to 120 if platform doesn't have instanced arrays Hi, I upgraded Xwayland and the assorted libraries from git masters today, and noticed that glamor wouldn't work anymore on i.MX6/etnaviv. The error was: No provider of glVertexAttribDivisor found. Requires one of: Desktop OpenGL 3.3 OpenGL ES 3.0 GL extension "GL_ANGLE_instanced_arrays" GL extension "GL_ARB_instanced_arrays" GL extension "GL_EXT_instanced_arrays" GL extension "GL_NV_instanced_arrays" The problem is that etnaviv offers GLSL 140 on GL 2.1 and glamor rendering assumes that glVertexAttribDivisor() is always available on GLSL>=130, which is not the case here. Forcing GLSL 120 makes glamor work fine again on this platform. After chatting with ajax in #xorg-devel, the following solution was proposed. This is my first time of submitting a patch, so please excuse me and advise if I'm doing it wrong ;) Cheers Lukas (mntmn) Reviewed-by: Eric Anholt commit 3ab32a537840c6e6d6228b4ba62f98fbf5224f8a Author: Bas Nieuwenhuizen Date: Sun May 13 15:31:37 2018 +0200 DRI2: Sync radeonsi_pci_ids.h from Mesa Fixes DRI2 client driver name mapping for newer AMD GPUs with the modesetting driver, allowing the DRI2 extension to initialize. Fixes using GL with the modesetting driver for me. Seems we were way behind on this one, time to look into something more scalable? Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher commit 27eff10bfa1a02da7338a82e2312d2080e3e5876 Author: Jon Turney Date: Sun May 13 19:36:05 2018 +0100 meson: don't put literal 'PACKAGE_STRING' and 'XORG_MAN_PAGE' in man pages Instead, substitute the same values as autotools does Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit 47321bb455b1226c04711241496e62667eea34ea Author: Jon Turney Date: Sun May 13 19:36:04 2018 +0100 meson: don't install xorg wrapper manpages if suid-wrapper isn't being used Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit 08a3583b5b2f812cc7f039aebd74ff9b1cb0dbcd Author: Jon Turney Date: Sun May 13 19:36:03 2018 +0100 meson: install xwinclip and Xwinrc man pages Omitted from a1e8dc05 Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit f50afa19fd67ca8a059eb909814a4d673bcb5a31 Author: Adam Jackson Date: Mon May 14 14:08:01 2018 -0400 Post-1.20 version bump Signed-off-by: Adam Jackson commit 82f8fc5ffc0065537896ec43ae60d67d9a164c75 Author: Adam Jackson Date: Thu May 10 12:24:11 2018 -0400 xserver 1.20 Signed-off-by: Adam Jackson commit b6bf68b8416ec4b717eb78703fb63789c68e509a Author: Aaron Plattner Date: Wed May 2 12:54:26 2018 -0700 meson: Fix module_dir configuration (v2) meson.build has code to set the module_dir variable to ${libdir}/xorg/modules if the module_dir option string is empty. However, this has several problems: 1. The variable is only used for an unused @moduledir@ substitution in the man page. The rule for xorg-server.pc uses option('module_dir') directly instead. 2. The 'module_dir' option has a default value of 'xorg/modules' so the above rule doesn't do anything by default. 3. The xorg-server.pc rule uses ${exec_prefix}/option('module_dir'), so the effect of #2 is that the default moduledir is different between autoconf and meson. E.g. if ${prefix} is /X, then you get autoconf: moduledir=/X/lib/xorg/modules meson: moduledir=/X/xorg/modules Fix this by using the module_dir variable when generating xorg-server.pc, and by using join_paths() to assign module_dir unconditionally. v2: Keep the 'xorg/modules' default path, but use join_paths() unconditionally (Thierry Reding) Signed-off-by: Aaron Plattner Reviewed-by: Peter Hutterer commit 9d628ee5facf6318368d5b8ca181e083adcffe8c Author: Roman Gilg Date: Wed May 2 21:32:48 2018 +0200 modesetting: set gbm as dependency in meson build Modifiers support needs gbm as a dependency. Without setting the dependency included headers are not found reliably and the build might fail if the headers are not placed in the default system include paths. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 0445705a8bbf76a5532997823ea8110daff26c6d Author: Adam Jackson Date: Mon May 7 17:21:20 2018 -0400 man: Fix automake seddery Because this is an automakefile, things inside @@ get expanded, which means your sed ends up saying s|/var/log|/var/log| and your manual pages still have @logdir@ in them. Fix this by hiding the @s inside a trivial character range, which keeps the pattern preserved all the way into the Makefile. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 9f21872ad8591c1f6f8ea1e466f212c3582d3c33 Author: Adam Jackson Date: Mon May 7 17:21:19 2018 -0400 glx: Be sure to set an error for ghost contexts Otherwise the caller is going to return garbage memory for the error value. Signed-off-by: Adam Jackson commit b9f415cbad47412bfb218cf7375d0c2856a27d1b Author: Adam Jackson Date: Mon May 7 17:21:18 2018 -0400 present: Fix swapping of PresentCompleteNotify events The code would fall through to the PresentIdleNotify case, and nothing good would come of it. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit cc66777d85f3509b0f9dfc9210d0a0415a2a388d Author: Adam Jackson Date: Mon May 7 17:21:17 2018 -0400 xwayland: Don't create a "fake" crtc for Present We probably don't want a fake crtc to be visible to clients, and we definitely don't want to generate events every time we create such a fake (which would happen as a side effect from RRCrtcCreate hitting RRTellChanged). As it happens we're not actually using that crtc for anything because xwayland doesn't store any state on the crtc object, so it suffices to use the real crtc for the screen. Signed-off-by: Adam Jackson Tested-by: Roman Gilg Reviewed-by: Roman Gilg commit b23a0e4ded62500f2c248f23962ff5ac718467e6 Author: Eric Anholt Date: Mon May 7 16:46:20 2018 -0700 xwayland: Fix a 32-bit build warning. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit ef95331603ff31d3643360c399b3865db5b0b97d Author: Eric Anholt Date: Mon May 7 16:46:19 2018 -0700 dri3: Switch fds_from_pixmap to stdint types. Again, this was causing 32-bit build warnings due to mixing CARD* and stdint. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 4c754b01fafc4b042d9918c05a71157f6fa6392a Author: Eric Anholt Date: Mon May 7 16:46:18 2018 -0700 dri3: Switch get_modifiers to using stdint. We were mixing stdint and CARD* types, causing compiler warnings on 32-bit. Just switch over to stdint, which is what we'd like the server to be using long term, anyway. Reviewed-by: Adam Jackson commit 5e86484a183f051d7a8a67ea13c23a3d6e69e76b Author: Eric Anholt Date: Mon May 7 16:46:17 2018 -0700 dri3: Switch get_drawable_modifiers to using stdint. We were mixing stdint and CARD* types, causing compiler warnings on 32-bit. Just switch over to stdint, which is what we'd like the server to be using long term, anyway. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 4ec02b573ef2424965d7ce2d33d150ddb92ec544 Author: Eric Anholt Date: Mon May 7 16:46:16 2018 -0700 randr: Fix a compiler warning on 32-bit. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit e1ccd0fa0e1081edf8a2c69ce6e8e3f67a4aecba Author: Eric Anholt Date: Mon May 7 16:46:15 2018 -0700 dix: Fix a warning about GetTimeInMillis return value in XFont2. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit cf838f5ca81e0c967902b74fb1971bc6fac5c601 Author: Roman Gilg Date: Fri May 4 03:07:31 2018 +0200 xwayland: persistent window struct on present Instead of reusing xwl_window introduce a persistent window struct for every window, that asks for Present flips. This struct saves all relevant data and is only freed on window destroy. Signed-off-by: Roman Gilg Tested-by: Olivier Fourdan commit c9afd8cb5ec975b189ab7b678e1f997d6a2ba5ee Author: Mario Kleiner Date: Sun May 6 07:34:31 2018 +0200 modesetting: Fix and improve ms_kernel_msc_to_crtc_msc() The old 32-Bit wraparound handling didn't actually work, due to some integer casting bug, and the mapping was ill equipped to deal with input from the new true 64-bit GetCrtcSequence/QueueCrtcSequence api's introduced in Linux 4.15. For 32-Bit truncated input from pageflip events and old vblank events and old drmWaitVblank ioctl, implement new wraparound handling, which also allows to deal with wraparound in the other direction, e.g., if a 32-Bit truncated sequence value is passed in, whose true 64-Bit in-kernel hw value is within 2^30 counts of the previous processed value, but whose 32-bit truncated sequence value happens to lie just above or below a 2^32 boundary, iow. one of the two values 'sequence' vs. 'msc_prev' lies above a 2^32 border, the other one below it. The method is directly translated from Mesa's proven implementation of the INTEL_swap_events extension, where a true underlying 64-Bit wide swapbuffers count (SBC) needs to get reconstructed from a 32-Bit LSB truncated SBC transported over the X11 protocol wire. Same conditions apply, ie. successive true 64-Bit SBC values are close to each other, but don't always get received in strictly monotonically increasing order. See Mesa commit cc5ddd584d17abd422ae4d8e83805969485740d9 ("glx: Handle out-of-sequence swap completion events correctly. (v2)") for explanation. Additionally add a separate path for true 64-bit msc input originating from Linux 4.15+ drmCrtcGetSequence/QueueSequence ioctl's and corresponding 64-bit vblank events. True 64-bit msc's don't need remapping and must be passed through. As a reliability bonus, they are also used here to update the tracking values msc_prev and ms_high with perfect 64-Bit ground truth as baseline for mapping msc from pageflip completion events, because pageflip events are always 32-bit wide, even when the new kernel api's are used. Because each pageflip(-event) is always preceeded close in time (and vblank count) by a drmCrtcQueueSequence queued event or drmCrtcGetSequence query as part of DRI2 or DRI3+Present swap scheduling, we can be certain that each pageflip event will get its truncated 32-bit msc remapped reliably to the true 64-bit msc of flip completion whenever the sequence api is available, ie. on Linux 4.15 or later. Note: In principle at least the 32-bit mapping path could also be backported to earlier server branches, as this seems to be broken for at least server 1.16 to 1.19. Signed-off-by: Mario Kleiner Reviewed-by: Adam Jackson Cc: Keith Packard Cc: Michel Dänzer commit 73f0ed2d928afc692ed057eb3d7627328a6e5b12 Author: Mario Kleiner Date: Fri May 4 14:14:10 2018 +0200 modesetting: Remove ms_crtc_msc_to_kernel_msc(). The function is ported from intel-ddx uxa backend around 2013, where its stated purpose was to apply a vblank_offset to msc values to correct for problems with those kernel provided msc values. Some (somewhat magic and puzzling to myself) heuristic tried to guess if provided values were unreasonable and tried to adapt the corrective vblank_offset to account for that. Except: It wasn't applied to kernel provided msc values, but the values delivered by clients via DRI2 or Present, so valid client targetmsc values, e.g., requesting a vblank event > 1000 vblanks in the future, triggered the offset correction in arbitrarily wrong ways, leading to wrong msc values being returned and thereby vblank events queued to the kernel for the wrong time. This causes glXSwapBuffersMscOML and glXWaitForMscOML to swap / return immediately whenever a swap/wait in > 1000 vblanks is requested. The original code was also written to only deal with 32 bit mscs, but server 1.20 modesetting ddx can now use new Linux 4.15+ kernel vblank api to process true 64 bit msc's, which may confuse the heuristic even more due to 32 bit integer truncation/wrapping. This code caused various problems in the intel-ddx in the past since year 2013, and was removed there in 2015 by Chris Wilson in commit 42ebe2ef9646be5c4586868cf332b4cd79bb4618: " uxa: Remove the filtering of bogus Present MSC values If the intention was to filter the return values from the kernel, the filtering would have been applied to the kernel values and not to the incoming values from Present. This filtering introduces crazy integer promotion and truncation bugs all because Present feeds garbage into its vblank requests. " Indeed, i found a Mesa bug yesterday which can cause Mesa's PresentPixmap request to spuriously feed garbage targetMSC's into the driver under some conditions. However, while other video drivers seem to cope relatively well with that, modesetting ddx causes KDE-5's plasmashell to lock up badly quite frequently, and my suspicion is that the code removed in this commit is one major source of the extra fragility. Also my own tests fail for any swap scheduled more than 1000 vblanks into the future, which is not uncommon for some scientific applications. Iow. modesetting's swap scheduling seems to be more robust without this function afaics. Signed-off-by: Mario Kleiner Reviewed-by: Adam Jackson Cc: Chris Wilson Cc: Keith Packard Tested-by: Mike Lothian commit f5ded22e14e2e15390eff8e01ce32de496ae0e86 Author: Aaron Plattner Date: Fri May 4 10:48:17 2018 -0700 meson: Set XCONFIGFILE to 'xorg.conf' instead of '/etc/xorg.conf' The autoconf build hard-codes XCONFIGFILE to just 'xorg.conf': XF86CONFIGFILE="xorg.conf" AC_DEFINE_DIR(XCONFIGFILE, XF86CONFIGFILE, [Name of configuration file]) Later, the X server passes that into DoSubstitution() which expands the path: DoSubstitution(template="/etc/X11/%X", ..., XConfigFile="xorg.conf") This returns "/etc/X11/xorg.conf". The Meson build, on the other hand, sets XCONFIGFILE to join_paths(get_option('sysconfdir'), 'xorg.conf'). If sysconfdir is /etc, this results in '/etc/xorg.conf', resulting in DoSubstitution returning '/etc/X11/etc/xorg.conf'. Fix this by just hard-coding XCONFIGFILE to 'xorg.conf'. Signed-off-by: Aaron Plattner Reviewed-by: Thierry Reding commit 1a3e4a2f6722048c5c7c4c1a9d6748e68a895a3e Author: Aaron Plattner Date: Fri May 4 15:09:22 2018 -0700 meson: Define DEFAULT_LIBRARY_PATH as join_paths(get_option('prefix'), get_option('libdir')) 'libdir' defaults to 'lib', so running X -showDefaultLibPath just prints 'lib' instead of '/usr/lib' or '/usr/local/lib'. Use joint_paths() to get the correct full path. Signed-off-by: Aaron Plattner Reviewed-by: Thierry Reding commit 1dcd784a677c58e77c368a676fd9dbd3159db94f Author: Anuj Phogat Date: Thu May 3 11:29:11 2018 -0700 dri2: Sync i965_pci_ids.h from mesa Copied from Mesa with no modifications. Gives us Cofeelake platform names updates and sync on Kaby Lake, Ice Lake PCI IDs. Acked-by: Kenneth Graunke Signed-off-by: Anuj Phogat commit 4191b59bd5458ea3a8b0d5272bdcd250fee1e129 Author: Adam Jackson Date: Wed May 2 15:09:52 2018 -0400 meson: Fix build with three-component version numbers Otherwise: include/meson.build:5:0: ERROR: Index 3 out of bounds of array of size 3. Signed-off-by: Adam Jackson commit 531e1648fc0da03816ecc57481479e6fc6a45ac3 Author: Adam Jackson Date: Wed Apr 25 13:39:18 2018 -0400 gitlab-ci: Add for gitlab.freedesktop.org Looks quite a bit like the travis path, doesn't it? Still, nice to not rely on an external service if we don't have to. Signed-off-by: Adam Jackson commit 22285a6f1c5fa6ba22f4214c4ccc09e27d1925f6 Author: Roman Gilg Date: Fri Apr 20 17:10:06 2018 +0200 present: fix msc offset calculation in window mode Instead of getting the current msc value from the window, which might be different to old one directly take the last saved msc value saved in the window_priv struct. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit d7297b00444b0e2cd936fbfb08206a575ab8c29d Author: Chris Wilson Date: Mon Apr 30 15:19:53 2018 -0700 randr: Account for panning and transforms when constraining the cursor commit 56c90e29f04727c903bd0f084d23bf44eb1a0a11 [1.10.99.901] Author: Adam Jackson Date: Mon Nov 15 14:29:14 2010 -0500 randr: Add RRConstrainCursorHarder introduced a regression as it ignored the effect of panning and transforms upon the crtc bounds. The result was that the cursor would be constrained to the visible area even though the panning arena was much bigger, or the cursor was constrained to a region that did not even match the visible area when the output was transformed or reflected. This supercedes the hack introduced by commit 1bf81af4a6be1113bcc3b940ab264d5c9e0f0c5d [1.12.99.904] Author: Rui Matos Date: Mon Jul 30 14:32:12 2012 -0400 xf86RandR12: Don't call ConstrainCursorHarder() if panning is enabled which disabled the cursor constraints if a panning mode was active, but did not fix the regression with arbitrary output transforms. Signed-off-by: Chris Wilson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39949 Reviewed-by: Adam Jackson Cc: Rui Matos commit a843c61456b2046fb1780415f17162b503243af7 Author: Roman Gilg Date: Fri Apr 20 17:07:42 2018 +0200 xwayland: restrict present cleanup to presenting and top parent window Clean up only if the request points to the presenting window or its top parent window. Since in this case all events are removed unconditionally, always stop the timer. Reviewed-by: Adam Jackson Signed-off-by: Roman Gilg commit 975d3a509667579b81d88616b91491472059354d Author: Adam Jackson Date: Mon Apr 30 14:10:26 2018 -0400 xwayland: Avoid using epoxy_has_egl() There's no real point - if we don't have EGL then the extension check is also going to fail - and the entrypoint is new in 1.5.0, which we don't need to require yet. Signed-off-by: Adam Jackson Reviewed-by: Mario Kleiner commit d6f2272f44ce1a7a96ae04fdbde8708514c60771 Author: Adam Jackson Date: Mon Apr 30 14:07:44 2018 -0400 meson: Bump version number here too Signed-off-by: Adam Jackson commit 6cace4990abc2386b6ea68536b321994d264c295 Author: Louis-Francis Ratté-Boulianne Date: Thu Apr 26 11:04:15 2018 -0400 modesetting: Fix GBM objects leak when checking for flip GBM objects were never destroyed after looking for format and modifier compatibility when deciding whether flipping or copying a presented pixmap. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106106 Signed-off-by: Louis-Francis Ratté-Boulianne commit e00ada9fbbddf4570fe38c3ceeb922af7afcfd1a Author: Mario Kleiner Date: Mon Apr 30 09:06:09 2018 +0200 glamor: Don't fail in glamor_get_formats if not dmabuf_capable. If dmabuf_capable is false, because the server "dmabuf_capable" debug flag isn't set, treat it as successfull query with zero returned formats, instead of failure. This allows the servers cache_formats_and_modifiers() function to cache the fact that formats are not supported during the current server generation, instead of pointless retesting at every invocation. Signed-off-by: Mario Kleiner Reviewed-by: Adam Jackson commit 55db3c9cfc1bc92a53b75b99e8fa49a32d7efe63 Author: Mario Kleiner Date: Mon Apr 30 09:06:08 2018 +0200 dri3: Robustly clamp to 1.0 if not all screens support 1.2 Checking for dri3_screen_info_rec.version >= 2 is insufficient, as some shipping drivers, e.g., intel-ddx, nouveau-ddx, set the version to DRI3_SCREEN_INFO_VERSION, ie. to whatever version the installed servers headers define. On server 1.20 that would be version 2, but the drivers still don't support the v1.2 hooks. Make sure all hooks are defined before reporting v1.2. Also make clamping of reported version to minimum of client or server robust against possible future clients with possible majorVersion >= 2.0. Signed-off-by: Mario Kleiner Reviewed-by: Adam Jackson Cc: Daniel Stone commit fbc5c5cd532962d2df96a04e5c8cc0d21b47b08a Author: Mario Kleiner Date: Mon Apr 30 09:06:07 2018 +0200 dri3: Fix error handling in dri3_buffer_from_pixmap request. The old info->fd_from_pixmap() driver hook, which is preferentially used in dri3_fd_from_pixmap(), can return error codes other than -1, e.g., -EINVAL (-22) on nouveau-ddx. Not handling the error causes a broken/corrupted X-Connection resulting from a failed request. This fixes failure of sddm-greeter to start up under nouveau-ddx with DRI3 enabled and DRI3 protocol version properly clamped to 1.0 by the server (see followup patch). Fixes: 75bba3aedcb0 ("dri3: Use single-FD screen call for single-FD request") Signed-off-by: Mario Kleiner Reviewed-by: Adam Jackson Cc: Daniel Stone commit 19d006ee3db4b4635ef9ef5c92562f3ffeddb305 Author: Adam Jackson Date: Tue Apr 24 16:08:26 2018 -0400 dri3: Clamp to 1.0 if not all screens support 1.2 Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit 352a5ac87fd344936b759a5766eb74271e7d295d Author: Mario Kleiner Date: Tue Apr 24 10:17:26 2018 +0200 dri3: Fix DRI3.2 support for drivers other than modesetting-ddx. Both xf86-video-intel and xf86-video-nouveau cause OpenGL clients to fail when used with DRI3 on server 1.20 with Mesa 18.1. Reason is that the servers DRI3 version is now unconditionally reported as DRI3 1.2 to 1.2 capable clients. This causes clients using Mesa 18.1 to use the new DRI 3.2 requests DRI3GetSupportedModifiers, DRI3PixmapFromBuffers, etc. Drivers other than modesetting-ddx do not support the needed hooks like info->pixmap_from_fds or info->get_formats, info->get_modifiers. Unfortunately we can't simply report the servers DRI3 version as 1.0 in this case, as the reported version can not be specific to a X-Screen, and different screens may have drivers with different capabilities. Luckily the server has fallbacks to ->pixmap_from_fd, ->fd_from_pixmap, and simply reporting an empty set of supported modifiers for the DRI3GetSupportedModifiers request if the ddx doesn't support DRI 3.2. Clients like Mesa 18.1's dri3 loader respond to the empty set of reported modifiers by falling back to a dri driver selected buffer format (image->createImageWithModifiers responds to a NULL modifier_list by acting like ->createImage()). This works, but Mesa 18.1 will still try to use the DRI3PixmapFromBuffers request to create the corresponding pixmap, just passing in a modifier that corresponds to whatever tiling the dri driver selected by default. To prevent this request - and thereby the client - from failing with a BadImplementation error, remove the check for modifier == DRM_MOD_FORMAT_INVALID in the pixmap_from_fd fallback path of dri3_pixmap_from_fds() and trust that if we hit the fallback path then the client will have passed a buffer with some driver specific default tiling that can be handled by pixmap_from_fd. Another approach would be for Mesa's dri3 loader to keep track how a buffer was created (with explicit modifiers or not), and then call DRI3PixmapFromBuffers or DRI3PixmapFromBuffer, but then any future DRI3 client implementation would need to be fixed, so the server side is probably the better place for this. Tested on Intel Ivybridge and NVidia Pascal. Fixes: 6e7c40f62db6 ("dri3: Add multi-planar/modifier buffer requests") Signed-off-by: Mario Kleiner Cc: Daniel Stone Cc: Louis-Francis Ratté-Boulianne Tested-by: Mike Lothian Reviewed-by: Adam Jackson commit c6ab21022ce876f9c1409db4bb1967134f9f6dbe Author: Adam Jackson Date: Tue Apr 24 17:03:07 2018 -0400 xserver 1.20 RC5 Signed-off-by: Adam Jackson commit c593d843f6305dd8bc5fa7762273d319a223abc4 Author: Daniel Stone Date: Tue Apr 24 21:27:47 2018 +0100 dri3: Don't call vfuncs on old DRI3 screens Only call the get_supported_modifiers vfunc if the DRI3 screen struct is sufficiently new. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson commit 54ac09717cd8c49259f53a4a227d903ebe8e0a32 Author: Lyude Paul Date: Fri Apr 20 14:38:05 2018 -0400 xwayland: Add glamor egl_backend for EGLStreams This adds initial support for displaying Xwayland applications through the use of EGLStreams and nvidia's custom wayland protocol by adding another egl_backend driver. This also adds some additional egl_backend hooks that are required to make things work properly. EGLStreams work a lot differently then the traditional way of handling buffers with wayland. Unfortunately, there are also a LOT of various pitfalls baked into it's design that need to be explained. This has a very large and unfortunate implication: direct rendering is, for the time being at least, impossible to do through EGLStreams. The main reason being that the EGLStream spec mandates that we lose the entire color buffer contents with each eglSwapBuffers(), which goes against X's requirement of not losing data with pixmaps. no way to use an allocated EGLSurface as the storage for glamor rendering like we do with GBM, we have to rely on blitting each pixmap to it's respective EGLSurface producer each frame. In order to pull this off, we add two different additional egl_backend hooks that GBM opts out of implementing: - egl_backend.allow_commits for holding off displaying any EGLStream backed pixmaps until the point where it's stream is completely initialized and ready for use - egl_backend.post_damage for blitting the content of the EGLStream surface producer before Xwayland actually damages and commits the wl_surface to the screen. The other big pitfall here is that using nvidia's wayland-eglstreams helper library is also not possible for the most part. All of it's API for creating and destroying streams rely on being able to perform a roundtrip in order to bring each stream to completion since the wayland compositor must perform it's job of connecting a consumer to each EGLstream. Because Xwayland has to potentially handle both responding to the wayland compositor and it's own X clients, the situation of the wayland compositor being one of our X clients must be considered. If we perform a roundtrip with the Wayland compositor, it's possible that the wayland compositor might currently be connected to us as an X client and thus hang while both Xwayland and the wayland compositor await responses from eachother. To avoid this, we work directly with the wayland protocol and use wl_display_sync() events along with release() events to set up and destroy EGLStreams asynchronously alongside handling X clients. Additionally, since setting up EGLStreams is not an atomic operation we have to take into consideration the fact that an EGLStream can potentially be created in response to a window resize, then immediately deleted due to another pending window resize in the same X client's pending reqests before Xwayland hits the part of it's event loop where we read from the wayland compositor. To make this even more painful, we also have to take into consideration that since EGLStreams are not atomic that it's possible we could delete wayland resources for an EGLStream before the compositor even finishes using them and thus run into errors. So, we use quite a bit of tracking logic to keep EGLStream objects alive until we know the compositor isn't using them (even if this means the stream outlives the pixmap it backed). While the default backend for glamor remains GBM, this patch exists for users who have had to deal with the reprecussion of their GPU manufacturers ignoring the advice of upstream and the standardization of GBM across most major GPU manufacturers. It is not intended to be a final solution to the GBM debate, but merely a baindaid so our users don't have to suffer from the consequences of companies avoiding working upstream. New drivers are strongly encouraged not to use this as a backend, and use GBM like everyone else. We even spit this out as an error from Xwayland when using the eglstream backend. Signed-off-by: Lyude Paul Acked-by: Daniel Stone Reviewed-by: Adam Jackson commit 994f781007079176e0247ee64af5696d34debcde Author: Lyude Paul Date: Fri Apr 20 14:38:04 2018 -0400 xwayland: Add xwayland-config.h Just a small autogenerated header that will soon contain more then just one macro. Signed-off-by: Lyude Paul Reviewed-by: Daniel Stone Reviewed-by: Adam Jackson commit 1545e2dbadcb147d7d52b546d053149de866a031 Author: Lyude Paul Date: Fri Apr 20 14:38:03 2018 -0400 xwayland: Decouple GBM from glamor This takes all of the gbm related code in wayland-glamor.c and moves it into it's own EGL backend for Xwayland, xwayland-glamor-gbm.c. Additionally, we add the egl_backend struct into xwl_screen in order to provide hooks for alternative EGL backends such as nvidia's EGLStreams. Signed-off-by: Lyude Paul Reviewed-by: Lyude Paul Reviewed-by: Daniel Stone Reviewed-by: Adam Jackson commit d2d664df974ac5a55d5819f0379fcdac05d22fa3 Author: Adam Jackson Date: Mon Apr 23 17:21:09 2018 -0400 vfb: Fix man page in re depth 32 is not a valid depth, and the default is now 24 not 8. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 79a7137557d33d4e92713ae8cabe838c44fea488 Author: Adam Jackson Date: Mon Apr 23 16:19:15 2018 -0400 glx: Require depth > 12 for GLX visuals fb is happy to do TrueColor to 8bpp drawables, but mesa is not. Depth 12 is the biggest pseudocolor anyone ever really did, and 15 is the least truecolor. Without this Xvfb at depth 8 would "have" GLX, but no vendors would actually back any of the screens. libGL will attempt to call GLXQueryServerString to figure out the GLX version, and vnd will throw an error because there's no vendor to dispatch that to, and then clients crash. Signed-off-by: Adam Jackson commit 818885e6198cf2883155cb3d2e22c8c7bc4239fb Author: Adam Jackson Date: Mon Apr 23 16:19:14 2018 -0400 vnd: Disable GLX if no vendors successfully initialized Signed-off-by: Adam Jackson commit fc25bceb515e5c18eecdebf5933c3e05cdac1a5a Author: Adam Jackson Date: Mon Apr 23 16:19:13 2018 -0400 dix: Allow an extension to disable itself GLX registers an extension before we know if there are any screens that can actually do it. It's inconvenient to shrink the extension list, so instead allow the extension to simply zero out its base opcode to indicate that it needed to panic and disable itself. Signed-off-by: Adam Jackson commit 73a1cb9c92c936c2c1ae3d69fed743e21916d687 Author: Adam Jackson Date: Mon Apr 23 16:19:12 2018 -0400 dix: Factor out extension availability check Signed-off-by: Adam Jackson commit 9d5af632fde0373babfa32e66a59cfbf26ed7e5d Author: Adam Jackson Date: Mon Apr 23 15:21:14 2018 -0400 animcur: Fix crash when removing a master device Reproducer: $ Xvfb -ac -noreset :1 & $ DISPLAY=:1 xinput create-master touch1 $ DISPLAY=:1 xinput remove-master "touch1 pointer" Bugzilla: https://bugs.freedesktop.org/105761 Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit 8275903956d7876519fa55fb805669dc301bf243 Author: Thomas Klausner Date: Mon Apr 23 14:56:17 2018 -0400 sdksyms: Cope with __pid_t and __uint32_t Kludge sdksyms.c generator to not fail on GetClientPid. It returns pid_t which on NetBSD is #define pid_t __pid_t This slightly alters the GCC preprocessor output which this fragile code could not deal with when using GCC 5+ Signed-off-by: Adam Jackson commit e29d783278608544a208f211231a6a3ad2f8fa09 Author: Mario Kleiner Date: Fri Apr 20 19:59:40 2018 +0200 modesetting: Only use modifiers on kms drivers which do support them. Use the DRM_CAP_ADDFB2_MODIFIERS query to make sure the kms driver supports modifiers in the addfb2 ioctl, and fall back to addfb ioctl without modifiers if modifiers are unsupported. E.g., as of Linux 4.17, nouveau-kms so far does not suppport modifiers and gets angry if drmModeAddFB2WithModifiers() is called (-> failure to set a video mode -> blank screen), but Mesa's nvc0+ gallium driver causes gbm_bo_get_modifier() to return a valid modifier by translating the default tiling of bo's created via gbm_bo_create() into a modifier other than DRM_FORMAT_MOD_INVALID (see Mesa's nvc0_miptree_get_modifier()). Testing for != DRM_FORMAT_MOD_INVALID is apparently not sufficient for safe use of drmModeAddFB2WithModifiers. Bonus: Handle potential failure of populate_format_modifiers(). The required DRM_CAP is defined since libdrm v2.4.65, and we require v2.4.89+ for the server, so we can use it unconditionally. Tested on intel-kms, radeon-kms, nouveau-kms. Fixes failure on NVidia Pascal. Fixes: 2f807c2324b4 ("modesetting: Add support for multi-plane pixmaps when page-flipping") Signed-off-by: Mario Kleiner Cc: Daniel Stone Cc: Louis-Francis Ratté-Boulianne Reviewed-by: Louis-Francis Ratté-Boulianne commit fe4d1876b4f01c0b0e1916d548c398789f196164 Author: Lyude Paul Date: Wed Apr 18 17:57:54 2018 -0400 meson: Fix indenting in glx/meson.build No functional changes, just fixing a tabs vs. space error I noticed Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit 4e28a6a223c4f9d0f5defe0313a94e22e0416787 Author: Lyude Paul Date: Wed Apr 18 18:09:15 2018 -0400 meson: Ensure we always build Xext/hashtable.c for glx Seems that while glxvnd relies on some of the hashtable functions in Xext, we only build hashtable support for Xext if we're also building the res extension. This leads to some errors if you try to build glx without res enabled: glx/liblibglxvnd.a(vndcmds.c.o): In function `LookupVendorPrivDispatch': /home/lyudess/Projects/xserver/glx/vndcmds.c:65: undefined reference to `ht_find' /home/lyudess/Projects/xserver/glx/vndcmds.c:67: undefined reference to `ht_add' glx/liblibglxvnd.a(vndcmds.c.o): In function `GlxDispatchInit': /home/lyudess/Projects/xserver/glx/vndcmds.c:405: undefined reference to `ht_generic_compare' /home/lyudess/Projects/xserver/glx/vndcmds.c:405: undefined reference to `ht_generic_hash' /home/lyudess/Projects/xserver/glx/vndcmds.c:405: undefined reference to `ht_create' glx/liblibglxvnd.a(vndcmds.c.o): In function `GlxDispatchReset': /home/lyudess/Projects/xserver/glx/vndcmds.c:468: undefined reference to `ht_destroy' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. So, make sure that hashtable.c gets both for both glx and res Reviewed-by: Adam Jackson Signed-off-by: Lyude Paul commit 3b4671f9e9c85f23e7593652e1482b11dc3ad4af Author: Olivier Fourdan Date: Thu Apr 19 09:13:23 2018 +0200 xwayland: Clean up all frame callbacks Regardless of the order we un-realize windows. Suggested-by: Roman Gilg Signed-off-by: Olivier Fourdan Reviewed-by: Roman Gilg commit 8b8f9007cc56fdcee5479876e88e06b7f8b6de35 Author: Olivier Fourdan Date: Wed Apr 18 16:02:02 2018 +0200 xwayland: avoid using freed xwl_window on unrealize xwl_unrealize_window() would use freed xwl_window which can lead to various memory corruption and crashes, as reported by valgrind: Invalid read of size 8 at 0x42C802: xwl_present_cleanup (xwayland-present.c:84) by 0x42BA67: xwl_unrealize_window (xwayland.c:601) by 0x541EE9: compUnrealizeWindow (compwindow.c:285) by 0x57E1FA: UnrealizeTree (window.c:2816) by 0x581189: UnmapWindow (window.c:2874) by 0x54EB26: ProcUnmapWindow (dispatch.c:879) by 0x554B7D: Dispatch (dispatch.c:479) by 0x558BE5: dix_main (main.c:276) by 0x7C4B1BA: (below main) (libc-start.c:308) Address 0xf520f60 is 96 bytes inside a block of size 184 free'd at 0x4C2EDAC: free (vg_replace_malloc.c:530) by 0x42B9FB: xwl_unrealize_window (xwayland.c:624) by 0x541EE9: compUnrealizeWindow (compwindow.c:285) by 0x57E1FA: UnrealizeTree (window.c:2816) by 0x581189: UnmapWindow (window.c:2874) by 0x54EB26: ProcUnmapWindow (dispatch.c:879) by 0x554B7D: Dispatch (dispatch.c:479) by 0x558BE5: dix_main (main.c:276) by 0x7C4B1BA: (below main) (libc-start.c:308) Block was alloc'd at at 0x4C2FB06: calloc (vg_replace_malloc.c:711) by 0x42B307: xwl_realize_window (xwayland.c:488) by 0x541E59: compRealizeWindow (compwindow.c:268) by 0x57DA40: RealizeTree (window.c:2617) by 0x580B28: MapWindow (window.c:2694) by 0x54EA2A: ProcMapWindow (dispatch.c:845) by 0x554B7D: Dispatch (dispatch.c:479) by 0x558BE5: dix_main (main.c:276) by 0x7C4B1BA: (below main) (libc-start.c:308) This is because UnrealizeTree() traverses the tree from top to bottom, which invalidates the assumption that if the Window doesn't feature an xwl_window on its own, it's the xwl_window of its first ancestor with one. This reverts commit 82df2ce3 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 12a6b189fb17894d2c3851b70a396bbf41f444c6 Author: David Woodhouse Date: Tue Apr 17 22:22:21 2018 +0100 glamor: fix glamor_xv_query_image_attributes() for odd-width images Images which are one pixel wider than a multiple of 8 are being handled incorrectly. Other drivers round up the width to a multiple of two before they start calculating. Do the same. https://bugzilla.gnome.org/show_bug.cgi?id=795235 Reviewed-by: Adam Jackson Signed-off-by: David Woodhouse commit ac7a4bf44c68c5f323375974b208d4530fb5b60f Author: Chris Wilson Date: Sun Apr 15 15:40:03 2018 +0100 os/WaitFor: Check timers on every iteration Currently we only check timer expiry if there are no client fd (or other input) waiting to be serviced. This makes it very easy to starve the timers with long request queues, and so miss critical timestamps. The timer subsystem is just another input waiting to be serviced, so evaluate it on every loop like all the others, at the cost of calling GetTimeInMillis() slightly more frequently. (A more invasive and likely OS specific alternative would be to move the timer wheel to the local equivalent of timerfd, and treat it as an input fd to the event loop exactly equivalent to all the others, and so also serviced on every pass. The trade-off being that the kernel timer wheel is likely more efficiently integrated with epoll, but individual updates to each timer would then require syscalls.) Reviewed-by: Peter Harris Signed-off-by: Chris Wilson commit 78b6f940217c127f0f345b7710aa5994c6ded99c Author: Adam Jackson Date: Mon Apr 16 14:08:27 2018 -0400 modesetting: Fix inverted check in dri2 WaitMSC ms_queue_vblank() returns false on failure. Reported-by: Chris Wilson Signed-off-by: Adam Jackson Reviewed-by: Frank Binns Tested-by: Mike Lothian commit 4e92c51ce4d6ab50c1507a23a01c6be0d1954d79 Author: Mario Kleiner Date: Mon Apr 16 08:14:47 2018 +0200 dri3: Fix dri3_buffers_from_pixmap request. Sending pixmap depth and bpp was omitted, so the Mesa X11 + EGL + DRI3 side of things always failed to dri3_create_image_khr_pixmap_from_buffers(), which led to failure of X11 + EGL compositing under DRI3 under, e.g., KDE Plasma 5. Fixes: 6e7c40f62db6 ("dri3: Add multi-planar/modifier buffer requests") Signed-off-by: Mario Kleiner Cc: Daniel Stone Cc: Louis-Francis Ratté-Boulianne Reviewed-by: Louis-Francis Ratté-Boulianne Tested-by: Mike Lothian commit a98a95b798a0062783ae6fd2135ad488af5efcfd Author: Matt Turner Date: Sun Apr 15 23:37:45 2018 -0700 modesetting: Move GBM code inside #ifdef GLAMOR_HAS_GBM Fixes a compilation error without Glamor. Bugzilla: https://bugs.gentoo.org/653288 Signed-off-by: Matt Turner Reviewed-by: Olivier Fourdan commit c3ae963a7b19e05b8296aae8b6354587756d48fa Author: Olivier Fourdan Date: Mon Apr 16 09:39:09 2018 +0200 xwayland: Fix build without glamor Present support in Xwayland relies on glamor, make sure Xwayland can be built without glamor by moving references to Present code inside the conditional GLAMOR_HAS_GBM. Reported-by: Matt Turner Signed-off-by: Olivier Fourdan Reviewed-by: Matt Turner Reviewed-by: Roman Gilg commit bf147f67b2b7170fcc5cca07192f6b195dce85e5 Author: Adam Jackson Date: Thu Apr 12 17:24:08 2018 -0400 xwayland: Don't crash on WarpPointer(dest_w = None) Turns out that's legal, and xts exercises it, and we crash: Thread 1 "Xwayland" received signal SIGSEGV, Segmentation fault. dixGetPrivate (key=0x813660 , privates=0x20) at ../../include/privates.h:122 122 return (char *) (*privates) + key->offset; (gdb) bt #0 dixGetPrivate (key=0x813660 , privates=0x20) at ../../include/privates.h:122 #1 dixLookupPrivate (key=0x813660 , privates=0x20) at ../../include/privates.h:166 #2 xwl_window_of_top (window=0x0) at xwayland.c:128 #3 xwl_cursor_warped_to (device=, screen=0x268b6e0, client=, window=0x0, sprite=0x300bb30, x=2400, y=1350) at xwayland.c:292 #4 0x00000000005622ec in ProcWarpPointer (client=0x32755d0) at events.c:3618 In this case, x/y are the screen-space coordinates where the pointer ends up, and we need to look up the (X) window there. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit d7269b49c3408f93a6cb8e28ddc3dda88224620a Author: Emil Velikov Date: Wed Apr 11 18:51:16 2018 +0100 configure.ac: make use of wayland-scanner.pc Replace the current (incorrect) assumption that wayland-scanner is located in the wayland-client prefix. Make use of the wayland_scanner variable in wayland-scanner.pc It was introduced back in 2013 and we already require newer wayland bits Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 0031bbad8400d35699664d18c0d8fc2e9e82d8a7 Author: Adam Jackson Date: Wed Apr 11 15:39:33 2018 -0400 sdksyms: Skip empty symbols Apparently on NetBSD we can hit failures like this: sdksyms.c:1773:15: error: expected expression before ',' token (void *) &, /* ../../dri3/dri3.h:110 */ I've been unable to reproduce that locally (even in a NetBSD vm), but an obvious workaround might be to just notice empty symbol names and ignore them rather than emit invalid C code. Tested-by: Thomas Klausner Signed-off-by: Adam Jackson commit d61e516c847b9ff7e89e6be269050032070c1ad3 Author: Adam Jackson Date: Tue Apr 10 15:45:02 2018 -0400 xserver 1.20 RC4 Signed-off-by: Adam Jackson commit a42992a4cca49cedd3930f5694c7a16e4f614b36 Author: Emil Velikov Date: Mon Apr 2 16:41:24 2018 +0100 dri3: rework format/modifier caching Cut down the unnecessary malloc/memcpy/free by utilising the explicit copy provided by the client. But above all: do so, after ensuring we get valid data from the implementation. Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 71a069fd7fbe815d386fc1b3c44cda732cff7af0 Author: Emil Velikov Date: Mon Apr 2 16:41:23 2018 +0100 glamor: zero num_formats from the start The caller may ignore the return value (will be addressed with later commit) so simply zero the count from the get-go. We're pretty much do so, in all cases but one :-\ Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit ac48724639e0a6a9e421b3b4e545d8506fd6bf5d Author: Emil Velikov Date: Mon Apr 2 16:41:22 2018 +0100 xwayland: zero num_formats from the start The caller may ignore the return value (will be addressed with later commit) so simply zero the count from the get-go. We're pretty much do so, in all cases but one :-\ Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit e2f45002fc3c53c6196935447b8fe77d0850175b Author: Emil Velikov Date: Mon Apr 2 16:41:20 2018 +0100 dri3: check for ::get_drawable_modifiers failure Currently if the function fails, we'll fall into two false assumptions: - the the count is zero - that the storage pointer is safe for free() I've just fixed the former (in glamor + xwayland) and have no plans on adding yet another workaround for the latter. Simply zero both variables. Regardless if the implementation is missing the callback or it foobars with output variables (normally a bad idea). Bonus points - this fixes a bug where we feed garbage to free() further down ;-) Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 150e4b12ad160b093899107ed586aa0cb258879e Author: Emil Velikov Date: Mon Apr 2 16:41:19 2018 +0100 glamor: zero num_modifiers from the start The caller may ignore the return value (will be addressed with later commit) so simply zero the count from the get-go. We're pretty much do so, in all cases but one :-\ Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit b36a14c0b0e7e38406622eb5ff0666a8b8bc50f4 Author: Emil Velikov Date: Mon Apr 2 16:41:18 2018 +0100 xwayland: zero num_modifiers from the start The caller may ignore the return value (will be addressed with later commit) so simply zero the count from the get-go. We're pretty much do so, in all cases but one :-\ Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit a83ceec868a6d544bc7775a753b67aa40d0d0efc Author: Emil Velikov Date: Mon Apr 2 16:41:15 2018 +0100 dri3: simplify dri3_open() implementation Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 9a159f37e00ed47ec8cbff7c57d8787b8f5685f5 Author: Emil Velikov Date: Mon Apr 2 16:41:14 2018 +0100 dri3: annotate fds/strides/offsets arrays as const It makes it perfectly clear that we should not be modifying them. Should help highlight issues like the one fixed with previous commit. Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 877fa0c66469628748dbd01506f15ddc4f11b849 Author: Emil Velikov Date: Mon Apr 2 16:41:13 2018 +0100 xwayland: don't close() fds we don't own The glamor_pixmap_from_fds error path erroneously closes the fds. We don't own them, plus the caller closes them after the function in called. Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 66b632bb068672f507212b00bd313b5040bf1a39 Author: Emil Velikov Date: Mon Apr 2 16:41:12 2018 +0100 dri3: annotate the dri3_screen_info data as const dri3_screen_info is the user provide dispatch. Something that we do not and should not change. When using the _ptr typecast + const the compiler barfs at us (rightfully so), so use the _rec one. [Silence a new const mismatch warning too - ajax] Fixes: 56313829886 ("dri3: Add DRI3 extension") Cc: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit c67f2eac56518163981af59f5accb7c79bc00f6a Author: Samuel Thibault Date: Mon Apr 9 14:35:30 2018 +0200 dix: always send focus event on grab change Focus events are useless when 'from' and 'to' are the same. But when this is the result of a (Un)GrabKeyboard request, we should always send them, including when the window manager had previously used XSetInputFocus to specify the focus on a window which happens to be now taking a grab. This is notably needed for window manager using XI to always get keyboard events even during grabs, so they can determine exactly when grabbing is active. Signed-off-by: Samuel Thibault Reviewed-by: Peter Hutterer commit 14be894b3f7976c133fc186e0e3c475606bab241 Author: Michal Srb Date: Tue Aug 1 10:29:03 2017 +0200 Xext: Fix memory leaks in hashtable. Do not forget to delete key and value of every item and the hashtable itself. commit 1326ee0bc5eb858c3c00847b3ba65134e4ca2e2d Author: Michal Srb Date: Tue Feb 13 10:33:30 2018 +0100 glx: Do not call into Composite if it is disabled. Otherwise X server crashes if GLX is enabled and Composite disabled. For example the compIsAlternateVisual function will try to lookup CompScreenPtr using the CompScreenPrivateKey, but that was never initialized if Composite is disabled. Fixes: f84e59a4f4. ("glx: Duplicate relevant fbconfigs for compositing visuals") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104993 Signed-off-by: Michal Srb commit b9764b8489cabd15b50c360cfbd799fdab0883fd Author: Jon Turney Date: Tue Apr 3 16:54:00 2018 +0100 hw/xwin/glx: Allocate fbconfigs correctly 4b0a3cba fixed leaking of GLX fbconfigs, so now xwin needs to allocate them correctly (individually, rather than all at once), so they can be freed successfully. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit e0a137ce5d653063604fa8d16c8498b8ac3ab3a7 Author: Kyle Brenneman Date: Fri Apr 6 12:42:33 2018 -0600 GLX: Fix a use after free error with the GLVND vendor handle. The GLVND layer will destroy all of the vendor handles at the end of each server generation, but the GLX module then tries to re-use the same (now-freed) handle in xorgGlxServerInit at the start of the next generation. In xorgGlxCloseExtension, explicitly destroy the vendor handle and set it to NULL so that the next call to xorgGlxServerInit will recreate it. Reviewed-by: Adam Jackson commit 31c1489eeb8c5391cd978303989de167819f0041 Author: Peter Hutterer Date: Fri Apr 6 12:28:56 2018 +1000 xfree86: drop KDSKBMUTE handling This was never merged upstream. It was a Fedora kernel patch but dropped from Fedora in 2013 with kernel 3.12. The reason for the KDSKBMUTE proposal has been fixed in systemd in Feb 2013, systemd 198. https://lists.freedesktop.org/archives/systemd-devel/2013-February/008795.html Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit 74aef564a7faea4410e92fa606216ab877b0d452 Author: Adam Jackson Date: Thu Apr 5 13:24:13 2018 -0400 xwayland: Silence a build warning if we can [735/786] Generating 'hw/xwayland/Xwayland@exe/relative-pointer-unstable-v1-protocol.c'. Using "code" is deprecated - use private-code or public-code. See the help page for details. Use private-code if wayland-scanner is new enough. Signed-off-by: Adam Jackson commit 6f0903ddc905f44272b85942323a467d82fef644 Author: Adam Jackson Date: Thu Apr 5 13:09:38 2018 -0400 dix: Hush an almost certainly bogus warning ../dix/getevents.c: In function ‘transformAbsolute’: ../dix/getevents.c:1195:28: warning: ‘oy’ may be used uninitialized in this function [-Wmaybe-uninitialized] struct pixman_f_vector p = {.v = {*x, *y, 1} }; ^ ../dix/getevents.c:1234:22: note: ‘oy’ was declared here double x, y, ox, oy; ^~ This one is truly special. Even though both ox and oy are set and read along the same paths, only oy is marked for this warning! Initializing just oy = 0.0 fixes it entirely, but let's not make a weird thing weirder. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 57e872301f5e836be2efb8f952f9c9711650b447 Author: Adam Jackson Date: Thu Apr 5 13:07:09 2018 -0400 mi: Hush an almost certainly bogus warning In file included from ../mi/miexpose.c:83: ../mi/miexpose.c: In function ‘miHandleExposures’: ../include/regionstr.h:174:22: warning: ‘expBox.y2’ may be used uninitialized in this function [-Wmaybe-uninitialized] (_pReg)->extents = *(_pBox); ~~~~~~~~~~~~~~~~~^~~~~~~~~~ ../mi/miexpose.c:139:12: note: ‘expBox.y2’ was declared here BoxRec expBox; ^~~~~~ etc. It's initialized if (extents), and then only read if (extents), but gcc doesn't seem to figure that out. Whatever, bzero it to be explicit. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 83913de25d35709b3ab7b0ab124b73924145d2dd Author: Adam Jackson Date: Thu Apr 5 12:59:11 2018 -0400 xkb: Silence some compiler warnings Of the form: ../xkb/XKBGAlloc.c: In function ‘SrvXkbAddGeomKeyAlias’: ../xkb/XKBGAlloc.c:591:13: warning: ‘strncpy’ specified bound 4 equals destination size [-Wstringop-truncation] strncpy(alias->real, realStr, XkbKeyNameLength); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is intentional; the code that reads from these fields never reads more than 4 bytes anyway. Rephrase things in terms of memcpy so that's clear. Obviously this is awful but in XKB awful is par. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit d13cd3862e9ccd35c91a06680d02f2fc8fd03420 Author: Adam Jackson Date: Thu Apr 5 12:48:26 2018 -0400 dmx: Silence a string truncation warning. ../hw/dmx/config/dmxparse.c: In function ‘dmxConfigCreateOption’: ../hw/dmx/config/dmxparse.c:385:13: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] strncpy(option->string + offset, p->string, len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../hw/dmx/config/dmxparse.c:383:23: note: length computed here int len = strlen(p->string); ^~~~~~~~~~~~~~~~~ The thing it's warning about is intentional, the surrounding code does its own nul-termination. Make that obvious by using memcpy instead. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 176f26e96ab9958c84c98c88f31729d0240c420e Author: Adam Jackson Date: Thu Apr 5 12:45:51 2018 -0400 dmx: Clean up some argument parsing code This threw: ../hw/dmx/input/dmxarg.c: In function ‘dmxArgParse’: ../hw/dmx/input/dmxarg.c:128:5: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=] strncpy(tmp, string, len); ^~~~~~~~~~~~~~~~~~~~~~~~~ ../hw/dmx/input/dmxarg.c:126:11: note: length computed here len = strlen(string) + 2; ^~~~~~~~~~~~~~ This code predates xstrtokenize, but that's no excuse. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit be99072a1a20af44d2457b8c86bd9041f61efa79 Author: Adam Jackson Date: Thu Apr 5 12:35:59 2018 -0400 dmx: Fix a read-from-uninitialized warning ../hw/dmx/dmxpixmap.c: In function ‘dmxBitmapToRegion’: ../include/regionstr.h:174:22: warning: ‘Box.x1’ may be used uninitialized in this function [-Wmaybe-uninitialized] (_pReg)->extents = *(_pBox); ~~~~~~~~~~~~~~~~~^~~~~~~~~~ ../hw/dmx/dmxpixmap.c:208:12: note: ‘Box.x1’ was declared here BoxRec Box; ^~~ Signed-off-by: Adam Jackson Acked-by: Keith Packard commit c3b190f9da3a8cd6f98c127220683dd20aed0f9b Author: Adam Jackson Date: Thu Apr 5 12:31:04 2018 -0400 dmx: Fix some snprintf warnings. snprintf doesn't terminate the string if it truncates, so things like this are lurking crashers: ../hw/dmx/dmxprop.c: In function ‘dmxPropertyIdentifier.part.0’: ../hw/dmx/dmxprop.c:94:36: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 123 [-Wformat-truncation=] snprintf(buf, sizeof(buf), "%s:%s:%s", DMX_IDENT, hostname, display); ^~ ~~~~~~~~ ../hw/dmx/dmxprop.c:94:5: note: ‘snprintf’ output 7 or more bytes (assuming 262) into a destination of size 128 snprintf(buf, sizeof(buf), "%s:%s:%s", DMX_IDENT, hostname, display); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../hw/dmx/dmxprop.c: In function ‘dmxPropertyWindow’: ../hw/dmx/dmxprop.c:372:36: warning: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size between 0 and 127 [-Wformat-truncation=] snprintf(buf, sizeof(buf), "%s,%d", id, dmxScreen->index); ^~ ../hw/dmx/dmxprop.c:372:5: note: ‘snprintf’ output between 3 and 140 bytes into a destination of size 128 snprintf(buf, sizeof(buf), "%s,%d", id, dmxScreen->index); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We could be more precise about termination, but meh. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 4c1453393feaebd688571ed1ba16c21703119ced Author: Adam Jackson Date: Thu Apr 5 12:21:53 2018 -0400 gtf: Warning fix ../hw/xfree86/utils/gtf/gtf.c: In function ‘print_fb_mode’: ../hw/xfree86/utils/gtf/gtf.c:241:50: warning: cast from function call of type ‘double’ to non-matching type ‘int’ [-Wbad-function-cast] printf(" timings %d %d %d %d %d %d %d\n", (int) rint(1000000.0 / m->pclk), /* pixclock in picoseconds */ That's pretty nitpicky of you, gcc, but at least it's easy to fix. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 99f9b077c62e14ba955b9c1f7afda47f7799d317 Author: Daniel Stone Date: Thu Apr 5 16:47:39 2018 +0100 modesetting: Actually get framebuffer ID We would fail to get the FB ID if it wasn't already imported, since we were checking to see if the pointer was NULL (it never was) rather than if the content of the pointer was 0. Signed-off-by: Daniel Stone Reported-by: Olivier Fourdan Tested-by: Olivier Fourdan Reviewed-by: Olivier Fourdan commit 8ff1cdb2bff72a37e75004f562737dd0af6daf14 Author: Daniel Stone Date: Thu Apr 5 15:00:38 2018 +0100 dri3: Set stride and size for old clients For old clients using the fd_from_pixmap entrypoint, make sure we set stride and size correctly. Noticed by inspection. Signed-off-by: Daniel Stone commit 78574a66b5b286e26839877640592980de089d64 Author: Daniel Stone Date: Thu Apr 5 14:58:40 2018 +0100 modesetting: Don't reuse iterator in nested loop drmmode_crtc_set_mode has a loop nested inside another loop, where both of them were using 'i' as the loop iterator. Rename it to avoid an infinite loop. Signed-off-by: Daniel Stone Reported-by: Michel Dänzer Reviewed-and-Tested-by: Michel Dänzer Reviewed-by: Adam Jackson commit ce2a4313dd31084f7766af59b8477cabe029bf44 Author: Mario Kleiner Date: Wed Apr 4 03:49:02 2018 +0200 modesetting: Fix page flipping harder under DRI 3.2. Non-atomic kms drivers like radeon-kms (or nouveau-kms with default setting of "atomic ioctl disabled") don't export any formats, so num_formats == 0. Some atomic drivers (nouveau-kms with boot param nouveau.atomic=1, or intel-kms on, e.g., Linux 4.13) expose num_formats == 0, or don't expose any modifiers, so num_modifiers == 0. Let the drmmode_is_format_supported() check pass in these cases to allow page flipping, as it works just fine. Tested on NV-96 for nouveau, HD-5770 for radeon, Intel Ivybridge with Linux 4.13 and drm-next to fix page flipping. Fixes: 9d147305b404 ("modesetting: Check if buffer format is supported when flipping") Signed-off-by: Mario Kleiner Reviewed-by: Daniel Stone commit 44e7098367b87c79470d6760753e42014be7ca01 Author: Louis-Francis Ratté-Boulianne Date: Wed Apr 4 00:01:15 2018 -0400 modesetting: Have consistent state when using atomic modesetting We need to make sure that the atomic commit are consistent or else the kernel will reject it. For example, when moving a CRTC from one output to another one, the first output CRTC_ID property needs to be reset. Also if the second output was using another CRTC beforehands, it needs to be disabled to avoid an inconsistent state. Signed-off-by: Louis-Francis Ratté-Boulianne Tested-by: Daniel Stone Reviewed-by: Adam Jackson commit bc4d278132956ec3c43695f1bd34083ef5fe7f22 Author: Louis-Francis Ratté-Boulianne Date: Wed Apr 4 00:01:14 2018 -0400 modesetting: Use atomic modesetting to set DPMS mode CRTCs and outputs needs to be enabled/disabled when the current DPMS mode is changed. We also try to do it in an atomic commit when possible. Signed-off-by: Louis-Francis Ratté-Boulianne Tested-by: Daniel Stone Reviewed-by: Adam Jackson commit 23c67987a337beb91292f8e318d566941453baa3 Author: Daniel Stone Date: Wed Apr 4 16:16:38 2018 +0100 glamor: Add fd_from_pixmap hook Add a fd_from_pixmap (singular) hook to go with fds_from_pixmap, which will ensure that the pixmap is allocated without modifiers and is thus exportable to non-modifier-aware clients. This makes it possible to run a compositing manager on an old GLX/EGL stack on top of an X server which allocates internal buffer storage using exotic modifiers from modifier-aware GBM/EGL/KMS. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit 9c407f0a1b40128fc65b19b6a499f1d4dae6f702 Author: Daniel Stone Date: Wed Apr 4 16:16:37 2018 +0100 glamor: Fall back to non-modifier allocations If we try to allocate with particular modifiers but it fails, try to fall back to non-modifier allocations. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit 86b2d8740a330deafe8a9bbf0402705a43efbb42 Author: Daniel Stone Date: Wed Apr 4 16:16:36 2018 +0100 glamor: Reallocate pixmap storage without modifiers if necessary If we need a pixmap's storage to be exported to a context in which we aren't aware of modifiers, reallocate the buffer again without modifiers. This makes it possible to run a compositing manager on an old GLX/EGL stack on top of an X server which allocates internal buffer storage using exotic modifiers from modifier-aware GBM/EGL/KMS. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit aab5c46ccbe769830cae383330fd62c074a0d2f7 Author: Daniel Stone Date: Wed Apr 4 16:16:35 2018 +0100 glamor: Push make_exportable into callers Rather than calling make_exportable from the get_bo entrypoint, make sure that someone has already explicitly requested the pixmap be exportable. This is technically an ABI break in that it changes observable behaviour, but no driver other than modesetting has ever used get_bo. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit 1b9fa3b64ca420eb54b5e5f28074c326e1fbe825 Author: Daniel Stone Date: Wed Apr 4 16:16:34 2018 +0100 glamor: Track if BO allocation used modifiers Keep track of whether or not we fed modifiers into GBM when we allocated a BO. We'll use this later inside Glamor, to reallocate buffer storage if we allocate buffer storage using modifiers, and a non-modifier-aware client requests an export of that pixmap. This makes it possible to run a compositing manager on an old GLX/EGL stack on top of an X server which allocates internal buffer storage using exotic modifiers from modifier-aware GBM/EGL/KMS. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit 0e9504e10c4363e24a83f1a82e6a4b9f5fd8f846 Author: Daniel Stone Date: Wed Apr 4 16:16:33 2018 +0100 drmmode: Track if BO allocation used modifiers Keep track of whether or not we fed modifiers into GBM when we allocated a BO. We'll use this later inside Glamor, to reallocate buffer storage if we allocate buffer storage using modifiers, and a non-modifier-aware client requests an export of that pixmap. This makes it possible to run a compositing manager on an old GLX/EGL stack on top of an X server which allocates internal buffer storage using exotic modifiers from modifier-aware GBM/EGL/KMS. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit 75bba3aedcb04132a4fe2806680cd38a8f2bd206 Author: Daniel Stone Date: Wed Apr 4 16:16:32 2018 +0100 dri3: Use single-FD screen call for single-FD request When importing client buffers into Pixmaps, we can use the fds_to_pixmap hook for both single-FD and multi-FD client requests without any harm. For the other direction of exporting Pixmap buffers to client FDs, create a new helper which calls the old pixmap_to_fd hook if available. This allows the implementation to ensure that the Pixmap storage is accessible to clients not aware of multiple planes or modifiers, e.g. by reallocating and copying. This makes it possible to run a compositing manager on an old GLX/EGL stack on top of an X server which allocates internal buffer storage using exotic modifiers from modifier-aware GBM/EGL/KMS. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit 574069c2912893a9b9fd3d701eb3ad4784e31553 Author: Aaron Plattner Date: Mon Apr 2 15:04:08 2018 -0700 xfree86: Restore newline before "X Protocol Version" string The newline before the protocl version got lost in commit 6cbefc3e0a33b380c147c533914437c7798d9b93. Prior to that commit, the release date printed a newline at the end: X.Org X Server 1.19.6 Release Date: 2017-12-20 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.14.12-1-ARCH x86_64 Now, that string gets run together with the version: X.Org X Server 1.19.99.903 (1.20.0 RC 3)X Protocol Version 11, Revision 0 Build Operating System: Linux Since the version string printing has a variety of #ifdefs in it, just add the newline to the begining of the protocol version string. Signed-off-by: Aaron Plattner Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit df6cbf7a2b3b45be6910afb34459d30ca7783c16 Author: Adam Jackson Date: Mon Apr 2 15:44:50 2018 -0400 xserver 1.20 RC3 Signed-off-by: Adam Jackson commit f580116f3c89b3c086655cbd441f84e50115ea78 Author: Louis-Francis Ratté-Boulianne Date: Thu Mar 29 01:07:26 2018 -0400 modesetting: Fix reported size when using atomic modesetting The framebuffer can include multiple CRTCs in multi-monitors setup. So we shouldn't use the buffer size but the CRTC size instead. Rotated displays are shadowed, so we don't need to worry about it there. Signed-off-by: Louis-Francis Ratté-Boulianne Tested-by: Olivier Fourdan Reviewed-by: Olivier Fourdan Reviewed-by: Daniel Stone commit ce7d5087cfe1d2df756d93b7f567b3c0b0a7f6a8 Author: Louis-Francis Ratté-Boulianne Date: Thu Mar 29 01:07:25 2018 -0400 modesetting: Ignore alpha channel when importing BOs for modesetting Fixes a regression caused by modifiers support. For some hw to continue working even if not supporting ARGB8888 and ARGB2101010 formats, we assume that all imported BOs are opaque. Signed-off-by: Louis-Francis Ratté-Boulianne Tested-by: Olivier Fourdan Reviewed-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 85b3fc18606e56d01734defb0e9fa04182f9fc1c Author: Olivier Fourdan Date: Thu Mar 29 09:42:08 2018 +0200 modesetting: Use actual crtc position for pageflip Otherwise the same content is shown on all outputs. Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit a10f1c9e08b982029186028b144d9243a2ebdde3 Author: Emil Velikov Date: Mon Apr 2 18:51:21 2018 +0100 docs: remove resource management references The code referenced was removed back in 2009. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 32c07e6b83fdb5b0ed99fc6b1eaa18064f6c3527 Author: Emil Velikov Date: Mon Apr 2 18:51:20 2018 +0100 docs: purge some ISA references The respective ISA functions were dropped back in 2008 Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 80d4098411ad96b662e830db06e59a7ab7f5c9d3 Author: Thierry Reding Date: Thu Mar 29 13:07:56 2018 +0200 meson: Add pixman-1 to required modules in xorg-server.pc pixman headers will be included for builds of external modules against the xorg-server SDK. Make sure pixman is listed as a required module so that the correct CFLAGS will be added. Note that the xorg-server.pc generated by the autotools-based build has many more modules listed, but this seems to be enough to build at least some of the external drivers against an X server built with Meson (I've tested with xf86-input-libinput, xf86-video-nouveau and xf86-video-ati). Reviewed-by: Adam Jackson Signed-off-by: Thierry Reding commit 88c7b8bf4bae080ecb879fe7e3f8be2bede6f0a6 Author: Thierry Reding Date: Thu Mar 29 13:07:55 2018 +0200 meson: Distribute more SDK headers Install missing headers to the SDK directory to allow external modules to properly build against the SDK. After this commit, the list of files installed in the SDK include directory is the same as the list of files installed by the autotools-based build. Reviewed-by: Adam Jackson Signed-off-by: Thierry Reding commit f3b0a2aee21f12f3332bf598d3ba0fcbd2832f95 Author: Thierry Reding Date: Thu Mar 29 13:07:54 2018 +0200 meson: Remove usage of pkg-config --variable=includedir Querying a pkg-config variable using the --variable option produces the value of the given variable as stored in the pkg-config file and should not be used to add directories to the include search path. The reason for this is that it breaks cross-compilation, because header files are installed relative to the host sysroot. pkg-config supports a PKG_CONFIG_SYSROOT_DIR environment variable that points to this sysroot and will prepend that to the path of directories in -I or -L options in pkg-config's Cflags, Libs or Libs.private keywords. However, because no context can be inferred from variable names, as opposed to the keywords with fixed meaning, the sysroot path will not be prepended to them. The build system is responsible for doing so if necessary since it is aware of the context in which the variable is used. Adding the include directory returned by pkg-config to the include path leaks build system information into the cross-build and break with very confusing errors such as this: In file included from include/misc.h:82:0, from dix/atom.c:55: /usr/include/pthread.h:682:6: warning: '__regparm__' attribute directive ignored [-Wattributes] __cleanup_fct_attribute; ^~~~~~~~~~~~~~~~~~~~~~~ or this: In file included from include/misc.h:139:0, from dix/atom.c:55: /usr/include/stdlib.h:133:8: error: '_Float128' is not supported on this target extern _Float128 strtof128 (const char *__restrict __nptr, ^~~~~~~~~ Fix this by replacing the include directory with the appropriate xproto dependency required to add the correct include directory to the compile command for subdirectories that are missing the dependency. As detailed above, this gives pkg-config the opportunity to prepend the sysroot for all paths in -I compiler options. Reviewed-by: Adam Jackson Signed-off-by: Thierry Reding commit 1c002bc43472063cf8599abb0d6d7367e30456e2 Author: Tobias Klausmann Date: Fri Mar 30 22:32:13 2018 +0200 modesetting/drmmode: add NULL pointer check in drmmode_output_dpms drmmode_output_dpms is called especially with !output->crtc found in xf86DisableUnusedFunctions so we have to guard for it, else the server segfaults: 0 0x00007fdc1706054b in drmmode_output_dpms (output=0x55e15243c210, mode=3) at drmmode_display.c:2243 1 0x000055e1500b6873 in xf86DisableUnusedFunctions (pScrn=0x55e152133f00) at xf86Crtc.c:3021 2 0x000055e1500be940 in xf86RandR12CrtcSet (pScreen=, randr_crtc=0x55e1524b2b90, randr_mode=0x0, x=0, y=0, rotation=, num_randr_outputs=0, randr_outputs=0x0) at xf86RandR12.c:1244 3 0x000055e1500fa1c2 in RRCrtcSet (crtc=, mode=0x0, x=0, y=0, rotation=rotation@entry=1, numOutputs=numOutputs@entry=0, outputs=0x0) at rrcrtc.c:763 4 0x000055e1500fba9e in ProcRRSetCrtcConfig (client=0x55e152bfae50) at rrcrtc.c:1390 5 0x000055e150044008 in Dispatch () at dispatch.c:478 6 0x000055e150047ff8 in dix_main (argc=13, argv=0x7ffc68561038, envp=) at main.c:276 7 0x00007fdc1a0c6a87 in __libc_start_main () at /lib64/libc.so.6 8 0x000055e150031d0a in _start () at ../sysdeps/x86_64/start.S:120 Fixes: ba0c75177 ("modesetting: Fix up some XXX from removing GLAMOR_HAS_DRM_*") Signed-off-by: Tobias Klausmann Reviewed-by: Adam Jackson commit 258081759fa70202a2e6134eeee4fe25ca54bedb Author: Tobias Klausmann Date: Fri Mar 30 22:31:46 2018 +0200 glamor: sanitze handling of "Debug" Option for "dmabuf_capable" With the appearance of the this new Option the X Server would crash if the option is not set. Default dmabuf_capable to off/FALSE for now - a user without knowledge about this option does not want to enable it until its save. Fixes: d11d5bb80 ("glamor: Hide new DRI behind Option "Debug" "dmabuf_capable") Signed-off-by: Tobias Klausmann Reviewed-by: Adam Jackson commit debf75bd0b0ddfec82dad9580efa7d19479b55df Author: Adam Jackson Date: Wed Mar 28 15:47:33 2018 -0400 xserver 1.20 RC2 Signed-off-by: Adam Jackson commit 726839459cb887a60361cb4779f9871c03f372b1 Author: Adam Jackson Date: Wed Mar 28 16:11:18 2018 -0400 autotools: Derive xkb configuration from xkbcomp.pc ... if available, falling back to the current heuristics otherwise. This _finally_ gets me to being able to run util/modular/release.sh without overriding $prefix. Signed-off-by: Adam Jackson commit d11d5bb80d21f2aaa54ddf2f26a50aa6ef31d2fa Author: Adam Jackson Date: Wed Mar 28 12:46:01 2018 -0400 glamor: Hide new DRI behind Option "Debug" "dmabuf_capable" ... for xfree86, at least for now. Things appear to work for Xwayland but not yet for modesetting. Hopefully we can fix that before 1.20 but in the meantime this makes testing both paths easier than a rebuild. Signed-off-by: Adam Jackson commit df13ea7da9174d2e1c732985d9b7a9a35a6916bc Author: Adam Jackson Date: Wed Mar 28 12:46:00 2018 -0400 xfree86: Add Option "Debug" to ServerFlags This provides a generic way to control obscure runtime behavior knobs without making interface promises. Signed-off-by: Adam Jackson commit c95361465ee98dd97a99778d8a31be88fe9e4c4f Author: Antoine Martin Date: Wed Mar 28 15:16:02 2018 -0400 os: Fix -logfile when used with -displayfd Trivial way to reproduce the bug: $ Xorg -logfile /tmp/mylog -config /etc/xpra/xorg.conf -displayfd 2 The server then moans: Failed to rename log file "/tmp/mylog" to "/tmp/mylog": No such file or directory And the log file is created but immediately renamed to "/tmp/mylog.old". This is caused by the changes to the log file handling introduced by this commit: https://cgit.freedesktop.org/xorg/xserver/commit/?id=edcb6426f20c3be5dd5f50b76a686754aef2f64e To fix this, only rename the logfile if the log filename contains the magic substitution string "%s". Signed-off-by: Antoine Martin Reviewed-by: Alan Coopersmith commit b355e55f500c18d55d0ac241e5f7e826ed62f555 Author: Olivier Fourdan Date: Wed Mar 28 12:17:48 2018 +0200 automake: Fix 'make dist' Automake would skip a few meson files that would prevent to build with meson a dist file previously generated by automake. Signed-off-by: Olivier Fourdan Reviewed-by: Thierry Reding commit 16639ab77d14cecb7d03fd2d5c796c2fb1714c18 Author: Kyle Brenneman Date: Fri Mar 2 17:58:07 2018 -0700 Don't delete GLX's extensionInitCallback list during a reset. When a callback list is initialized using CreateCallbackList via AddCallback, the list gets added to the listsToCleanup array, and as a result the list gets deleted at the end of the server generation. But, vendor libraries add themselves to that callback list only once, not once per generation, so if you delete the list, then no vendor will register itself on the next generation, and GLX breaks. Instead, use a static CallbackListRec for the extensionInitCallback list. That way, it doesn't get added to listsToCleanup, and doesn't get deleted during a reset. Reviewed-by: Adam Jackson commit 7004a7c3c983b4453756b92341bf22790b1eb98d Author: Daniel Stone Date: Fri Mar 23 13:50:23 2018 +0000 modesetting/drmmode: Remove unused flink call We don't use flink in the GetFB import path anymore, as we do an FD-based import instead. Signed-off-by: Daniel Stone Reviewed-by: Emil Velikov commit be087778a0eae3093ffdbba3ff7c9f3863d8e1d4 Author: Roman Gilg Date: Tue Mar 13 16:00:57 2018 +0100 xwayland: Activate Present flips in rootless mode with Glamor Link the newly introduced support for Present flips. For now flips can only be used in rootless mode together with Glamor. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 07750ff3c084c6549a5612d1f935a9a3ab3df67c Author: Roman Gilg Date: Tue Mar 13 16:00:55 2018 +0100 xwayland: Implement queuing present vblanks Queue present events to msc values. Fake msc events with a refresh rate of about 60fps when flips are not possible. When flips are executed rely on frame callbacks with a slow updating timer as fallback. This is important for applications, that want to limit their framerate. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 86df366973de1c10da5fbdc57d1ff12b681c321f Author: Roman Gilg Date: Tue Mar 13 16:00:54 2018 +0100 xwayland: Add fallback timer for msc counting When the compositor is not sending frame callbacks while we still wait on buffer release events fake a continuous msc counter with a timer. Having this timer is a prerequisite for queuing events. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 0fb2cca193e60b731c8e75a2a7e795477fb5fd8f Author: Roman Gilg Date: Tue Mar 13 16:00:53 2018 +0100 xwayland: Preliminary support for Present's new window flip mode Introduce support for Present's window flip mode. The support is not yet complete, but works reasonable well for the most important use case, that is fullscreen applications. We take a Present flip and if the xwl_window->window has the same dimensions as the presenting window, the flip is represented by a wl_buffer and attached to the main wl_surface of the xwl_window. After commit we are listening for the sync callback in order to tell Present, that the pixmap flip is not longer pending, for the frame callback in order to update the msc counter and for the buffer release callback in order to tell Present that the pixmap is idle again. The following functionality is missing from this patch: * (slowed down) flips in case the compositor is not sending frame callbacks, * queuing events to MSC times, * per window flips for child windows with smaller size than the xwl_window. To make use of this functionality Xwayland must run rootless and with Glamor/GBM. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 8fba2a03f1410f3bc7504e218ac1e5c964279ea2 Author: Roman Gilg Date: Tue Mar 13 16:00:52 2018 +0100 xwayland: Add arguments to glamor_pixmap_get_wl_buffer Add arguments to give the caller more information and control over the creation of a wl_buffer with GBM, in particular let the caller determine the size of the buffer. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 902429f077325b98e30ede2710bd7a88440d2937 Author: Roman Gilg Date: Tue Mar 13 16:00:51 2018 +0100 present: Add exported init function of window flip mode Allow drivers now to initialize window flip mode. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit a337949f99bc473ea0ae0af64736eae3d5b39399 Author: Roman Gilg Date: Tue Mar 13 16:00:50 2018 +0100 present: Add cleanups for window flip mode Make sure that vblanks and windows get cleaned up correctly in window flip mode. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 66a5c0bccb222ad8b9b57b10490c3041e1b3f05e Author: Roman Gilg Date: Tue Mar 13 16:00:49 2018 +0100 present: In window flip mode report damage on flip to driver Calculate damage before trying to flip and report it to the driver. This allows drivers to optimize their rendering. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 029608dd80204ac96423ef79ec46c1a18bbdd5ff Author: Roman Gilg Date: Tue Mar 13 16:00:48 2018 +0100 present: Add window flip mode In contrast to screen flip mode this mode: * supports flips per windows (these windows currently need to have the same size as their parent windows with the same pixmap), * sends pixmap idle signals to the client only after the driver has given an additional event notify. This patch only introduces the new mode as a stub. It additionally needs a driver hook, such that it can get initialized and appropriate cleanup functions. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 8d370fcdcaed210d9f4afc1650aa8b161c7fbb44 Author: Roman Gilg Date: Tue Mar 13 16:00:47 2018 +0100 present: Add driver facing window flip mode hooks To enable special functionality of window flips introduce for window flips a separate set of driver facing function hooks. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 7b071b4e440313254398f06eb59b1596a6d3e8fe Author: Roman Gilg Date: Tue Mar 13 16:00:46 2018 +0100 present: Adapt flip mode API hooks for window flip mode Flipping pixmaps per window needs additional arguments in the flip mode API. Add these as preperation for window flip mode. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 92b91b8cf34a38de39281044d8441b6cabe87a85 Author: Roman Gilg Date: Tue Mar 13 16:00:45 2018 +0100 present: Add flip_idler vblank property Introduce vblank property for flip modes, that demand explicite allowance by the driver for vblanks to become idle. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 84e47f3fe68f05f7b0b762e96acd4c95fa8000ca Author: Roman Gilg Date: Tue Mar 13 16:00:44 2018 +0100 present: Add present_window_priv properties for window flip mode For window flip mode data about flips needs to be stored per window. Add properties to 'present_window_priv' and initialize them on creation. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 3aaaac0be573fb09a206966075d81ebe0510ca23 Author: Roman Gilg Date: Tue Mar 13 16:00:43 2018 +0100 present: Refactor present_screen_init To initialize easily different flip modes, refactor 'present_screen_init'. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 6d813bbd5ea0fc38a8114c08368a7954eeb2ef37 Author: Roman Gilg Date: Tue Mar 13 16:00:42 2018 +0100 present: Add more hooks to internal flip mode API Add hooks to query caps, get crtcs, abort vblanks and destroy a flip. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 6a338b5959ca5a9e5260d71b6a739a5c672d77e7 Author: Roman Gilg Date: Tue Mar 13 16:00:41 2018 +0100 present: Move timings adjustment in common part of flip mode API To reduce future code duplication refactor timings adjustment out as a separate function. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 84112a1d0b221c00d7d3c23fd5b97687e6e3749a Author: Roman Gilg Date: Tue Mar 13 16:00:40 2018 +0100 present: Add flip mode API hook for present_can_window_flip Flip modes can now have different implementations of present_can_window_flip. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 1db7cf0429eabf33f8e2b55a15db4d1f87e1fb95 Author: Roman Gilg Date: Tue Mar 13 16:00:39 2018 +0100 present: Add flip mode API hook for present_pixmap Make present_pixmap a common function callable by any flip mode. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 679ffbf5f39822ea508e50f1b7c92a2a9e79f7bb Author: Roman Gilg Date: Tue Mar 13 16:00:38 2018 +0100 present: Refactor execute in separate file To be shared by multiple flip modes, refactor execute functionality, such that logical chunks can go in new separate file. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 1e7d8902bfe7cfb79c41b14fc6b50bcbe4f7c800 Author: Roman Gilg Date: Tue Mar 13 16:00:37 2018 +0100 present: Add flip mode API hooks for several functions Add 'queue_vblank', 'flush' and 're_execute' hooks, that are supposed to be shared with other flip modes. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 5365ece70a75a05df3d6351767d19c3edcf0305d Author: Roman Gilg Date: Tue Mar 13 16:00:36 2018 +0100 present: Move vblank functionality in seperate file With the new internal flip mode API move vblank creation and so on into a seperate file, such that it can be shared between flip modes. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit c5c50c6db1e71e976596750277b1a618704c04aa Author: Roman Gilg Date: Tue Mar 13 16:00:35 2018 +0100 present: Preliminary internal flip mode API Add some basic function hooks to our future present-internal flip mode API, that will allow us to share functionality in between modes and move more code in separate files. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit dda7efec36b495e100e670e057d7ef5022ef3976 Author: Roman Gilg Date: Tue Mar 13 16:00:34 2018 +0100 present: Move screen flip functionality in separate file As a preperation for future flip mode alternatives move most of the functionality from 'present.c' into a separate file. Leave some functions needed by future other flip modes in 'present.c'. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 4303deae78c4e2a60856be87bf87cd1643c268f5 Author: Thierry Reding Date: Wed Mar 28 14:04:38 2018 +0200 meson: Properly extract ABI versions for xorg-server.pc The newline in the middle of the awk expression confuses Meson and causes it to pass only the string before the newline to awk, which will subsequently fail because it encounters an unterminated string. One fix would be to escape the newlines ('\\n'), but that causes the newline to end up in the pkg-config file and separate the ABI version lines by blank lines. Instead, simply drop the newlines to make the generated pkg-config file look more like the one generated as part of the autotools-based build. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit 465b38cadd573ce50eca959f4b56bf4a6a638d91 Author: Thierry Reding Date: Wed Mar 28 14:04:37 2018 +0200 meson: Fix generation of xorg-server.pc Meson stores relative paths for includedir, libdir and friends. These have to be concatenated with the ${prefix} or ${exec_prefix} variables to create a working pkg-config file. While at it, set a default value for the module_dir option so that it points to the same location as used in the autotools-based build. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit d905e3330fd4f9b15a0277b22d608705787cb8bc Author: Thierry Reding Date: Wed Mar 28 14:04:36 2018 +0200 meson: Fill in missing data for xorg-server.h Provide more values for the definitions in xorg-server.h for Meson builds. The only missing defines left after this are _BSD_SOURCE, _POSIX_SOURCE and _XOPEN_SOURCE, but Meson seems to already define these via the command-line if necessary. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit 0babe78ed5afec8a06a517346f39b5ebd003773c Author: Thierry Reding Date: Wed Mar 28 14:04:35 2018 +0200 meson: Generate xorg-server.h Some drivers (such as xf86-input-libinput) require the xorg-server.h to build. Generate it and install it so that it can be used by users. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit b04ff31b9d471822fe96ed63eda93fc4cd8c22d0 Author: Thierry Reding Date: Wed Mar 28 14:04:34 2018 +0200 dix: Remove unused definitions from dix-config.h.in There is no code around that will ever define values for the WORKING_UNALIGNED_INT or XORG_RELEASE symbols, so they will always end up commented out and are therefore completely useless. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit c62a8b60b9a07092ebebf9aeb67a0c39c583aabe Author: Thierry Reding Date: Wed Mar 28 14:04:33 2018 +0200 xorg: Remove unused definitions from xorg-server.h.in There is no code around that will ever define values for the XLOADABLE, WORKING_UNALIGNED_INT or XORG_RELEASE symbols, so they will always end up commented out and are therefore completely useless. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit 66402fcd8280b393d3992121c0bcff9c646c97ed Author: Thierry Reding Date: Wed Mar 28 14:04:32 2018 +0200 meson: Fix build if Xdmcp is missing Xdmcp is an optional dependency, so make sure the build succeeds if it is missing. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit 0a7dabc86c1a7b8d91a5d22ad12fbf03d859f43e Author: Adam Jackson Date: Mon Mar 26 14:57:07 2018 -0400 meson: Add option to set default font path (v2) The autotools build gets this from some macros in fontutil, but they're just wrappers around pkgconfig. v2: Use same default as autotools (Keith Packard) Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit a26195d5c1eba86ada8f43e775c4190683e0f874 Author: Adam Jackson Date: Tue Mar 27 12:58:15 2018 -0400 Revert "suid touchup" Pushed the wrong thing, sigh. This reverts commit 73a0562615aa1adfb934b953e23b1e69b126db4f. commit 73a0562615aa1adfb934b953e23b1e69b126db4f Author: Adam Jackson Date: Tue Mar 27 12:06:38 2018 -0400 suid touchup commit 64b3227374f7f161e610df735f376fcc5bb0fd58 Author: Adam Jackson Date: Tue Mar 27 10:47:05 2018 -0400 autotools: Fix excessive \-escaping that broke the build Signed-off-by: Adam Jackson commit d3e8af99dc1139fac3307bbcb0046500b3feff11 Author: Adam Jackson Date: Mon Mar 26 18:43:02 2018 -0400 meson: Fix install path for 10-quirks.conf Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 84507507ea03db2f6197b94c160bbee9768c4baa Author: Adam Jackson Date: Mon Mar 26 18:43:01 2018 -0400 meson: Install xorg-server.m4 Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 8c684f59d517db0812fbad5fc6bcd90c7c810493 Author: Adam Jackson Date: Mon Mar 26 18:43:00 2018 -0400 meson: Generate xorg-server.pc Otherwise external drivers can't build against us. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 9b67303a52f5380bc96862624778b101f6379527 Author: Adam Jackson Date: Mon Mar 26 18:42:59 2018 -0400 meson: Install the dmx utilities And add the forgotten dmxrminput to the list. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit f9ef293cf612e50830ff316d67066ea544905dc9 Author: Adam Jackson Date: Mon Mar 26 18:42:58 2018 -0400 meson: Build cvt and gtf Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit a1e8dc05163956de9ab73e567f86b91cb8790c0f Author: Adam Jackson Date: Mon Mar 26 18:42:57 2018 -0400 meson: Install man pages Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 1e0df64738d6924151adbbd4b040df80178cfa6b Author: Adam Jackson Date: Mon Mar 26 18:42:55 2018 -0400 meson: Build Xorg suid wrapper Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit ab063cf96779c521618c022d4f669f69e3d9cc8f Author: Adam Jackson Date: Mon Mar 26 18:42:54 2018 -0400 meson: Fix installing protocol.txt One fix the constructed path, two actually install it. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit e3baacacda29afe524b3e4cab78ca057241c0551 Author: Adam Jackson Date: Mon Mar 26 18:42:53 2018 -0400 meson: Add libdrm to hw/xfree86/common's dependencies Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 2e497bf887aca832dc0dd30d071c5288ab5c1e15 Author: Adam Jackson Date: Mon Mar 26 18:42:52 2018 -0400 man: s/__/@/g A cosmetic change for automake (though we have to replicate some of xorg-macros.m4 in manpages.am now), but meson's configure_file() wants @-delimited strings. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 6cbefc3e0a33b380c147c533914437c7798d9b93 Author: Adam Jackson Date: Mon Mar 26 18:42:51 2018 -0400 autotools: Stop caring about XORG_DATE Signed-off-by: Adam Jackson Acked-by: Keith Packard commit ba0c75177239ced7037d74cf61590377f6d075bb Author: Adam Jackson Date: Thu Mar 22 14:47:21 2018 -0400 modesetting: Fix up some XXX from removing GLAMOR_HAS_DRM_* Signed-off-by: Adam Jackson Reviewed-by: Emil Velikov commit 757e0ee1884f2a34a287d632462e3bc689eccb3d Author: Mario Kleiner Date: Mon Mar 12 17:57:50 2018 +0100 modesetting: Fix page flipping under DRI 3.2. The check for "no modifier specified" in drmmode_is_format_supported() should check for DRM_FORMAT_MOD_INVALID, not for zero, as zero actually means DRM_FORMAT_MOD_LINEAR. This allows page-flipping again when appropriate, as tested under nouveau and ati drivers. Fixes: 9d147305b404 ("modesetting: Check if buffer format is supported when flipping") Signed-off-by: Mario Kleiner Reviewed-by: Daniel Stone commit 136b45e0c0f5b96b5ce014681d77756dc47f0768 Author: Adam Jackson Date: Fri Mar 16 18:03:18 2018 -0400 travis: Drop Xcode 8.2 Travis has only so many OSX builders, presumably due to the EULA requiring that it be run on Apple-branded hardware. They're also really slow to provision, presumably because they're virtual machines and not containers. In any case it's not something I'm willing to be punished for. Signed-off-by: Adam Jackson commit 243a34e170c4a7cc5d38b78f7409704adf703e9b Author: Adam Jackson Date: Fri Mar 16 18:28:19 2018 -0400 travis: Bump rawhide image The image now has enough mojo to run xts, hooray! Note there's a couple of ugly bits in here. The piglit config fragment and stock tetexec.cfg reflect missing features from the test suites (using an installed copy of xts, figuring out the xserver test matrix at runtime, etc.), I'll be happy to remove them once the tests are fixed. Signed-off-by: Adam Jackson commit 610055809f4030bd0e7312c6b0c561fdfe6e0183 Author: Eric Engestrom Date: Tue Mar 13 10:55:22 2018 +0000 exa: promise not to touch the data when swapping pointers exa/exa.c:525:10: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] swap(pExaGC, pGC, funcs); ^ Signed-off-by: Eric Engestrom Reviewed-by: Emil Velikov commit d36128a72acac4d54813c52c93efefad2dc9af41 Author: Alexander Volkov Date: Mon Mar 12 15:12:10 2018 +0300 Xext/shm: Downgrade from error to debug log output about success Signed-off-by: Alexander Volkov Reviewed-by: Adam Jackson commit 319af6f471912160ab3eb6395ef50f9950063d43 Author: Nicolai Hähnle Date: Tue Mar 13 17:46:37 2018 -0400 glx: honor LIBGL_DRIVERS_PATH when loading DRI drivers Allow switching to another driver build without a full installation. Glamor already takes LIBGL_DRIVERS_PATH into account, so this change makes sure that the same driver is used in both parts of the server. Signed-off-by: Nicolai Hähnle Reviewed-by: Ben Crocker Reviewed-by: Antoine Martin Tested-by: Ben Crocker commit 75a869a4e7c06072380931b714ac83b1037d3bbe Author: Nicolai Hähnle Date: Tue Mar 13 17:46:36 2018 -0400 xfree86: replace all uses of xf86PrivsElevated with PrivsElevated [... but leave it defined and exported, since we're ABI-frozen - ajax] Signed-off-by: Nicolai Hähnle Reviewed-by: Ben Crocker Reviewed-by: Antoine Martin Tested-by: Ben Crocker restore abi commit 1b6910af12cfefcc293be2f4144986fe3b56a36b Author: Nicolai Hähnle Date: Tue Mar 13 17:46:35 2018 -0400 os: use PrivsElevated instead of a manual check Signed-off-by: Nicolai Hähnle Reviewed-by: Ben Crocker Reviewed-by: Antoine Martin Tested-by: Ben Crocker commit 9ef602de46de2beae1d6231dc72a1a783a26122f Author: Nicolai Hähnle Date: Tue Mar 13 17:46:34 2018 -0400 os: move xf86PrivsElevated here Having different types of code all trying to check for elevated privileges is a bad idea. This implementation is the most thorough one. Signed-off-by: Nicolai Hähnle Reviewed-by: Ben Crocker Reviewed-by: Antoine Martin Tested-by: Ben Crocker Reviewed-by: Emil Velikov commit 1519475a4382066707276d7463c7c6e52c382caa Author: Adam Jackson Date: Wed Mar 14 15:29:15 2018 -0400 appveyor: use meson i686 cygwin build time with autotools: 16:22 i686 cygwin build time with meson: 6:56 Signed-off-by: Adam Jackson commit 2415ef5b228f5a235377decde95cb146c6642ea9 Author: Adam Jackson Date: Tue Mar 20 14:00:33 2018 -0400 meson: Add the x(org)proto headers to the include path Without this meson won't properly use headers installed into a non-default location. Signed-off-by: Adam Jackson commit 21e8a4a1b993a9b1abd4a7510cd3d8a152be998b Author: Emil Velikov Date: Wed Mar 7 18:45:33 2018 +0000 modesetting: remove fallback DRM_CAP_* defines All the macros are available in the libdrm that we depend on. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit d2568c058745ea66353fefa8f7296a6f37795905 Author: Emil Velikov Date: Wed Mar 7 18:45:32 2018 +0000 modesetting: remove always true DRM_IOCTL_CRTC_QUEUE_SEQUENCE guard We already require libdrm 2.4.89 which provides the definition plus guarding kernel UABI like that is generally a bad idea. See previous commit for details why :-) Cc: Keith Packard Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit f368428ab84c14f32f52e50b880d9353fbb87181 Author: Emil Velikov Date: Wed Mar 7 18:45:31 2018 +0000 modesetting: remove always true defined(DRM_CAP_PRIME) guards The macro was available in libdrm for ages. Furthermore having a guard like this is a very bad idea. Building on an old server will result in a missing run-time functionality. Since it's UABI one can use a local fallback, old kernels will return -EINVAL and the fallback path will kick in. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 22b489d27365d2513bf1cab6da92254e3bdbcf41 Author: Emil Velikov Date: Wed Mar 7 18:45:30 2018 +0000 Remove always true GLAMOR_HAS_DRM_* guards With earlier commit the required version was bumped to 2.4.89, thus the guards always evaluate to true. Fixes: e4e3447603b ("Add RandR leases with modesetting driver support [v6]") Cc: Keith Packard Cc: Daniel Stone Cc: Louis-Francis Ratté-Boulianne Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit e0748b10a8621066b404d713a76826907da777b9 Author: Emil Velikov Date: Wed Mar 7 18:45:29 2018 +0000 configure: remove libdrm version check We already require said version. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 8718d46157b9317554aba3e01b9919a1c0c28026 Author: Adam Jackson Date: Wed Mar 14 16:43:09 2018 -0400 ci: Ignore builds for branches aimed at other CI services Make appveyor ignore builds for /travis.*/ and vice versa. If you're only testing a Windows change, building for OSX and Linux too is a bit rude. Signed-off-by: Adam Jackson commit ae5c0dd199a5fbfbdf7a2d6b8c1b28c410289106 Author: Emil Velikov Date: Tue Mar 13 18:38:49 2018 +0000 dri3: cap the version returned to the client As per the protocol, the server should not return version greater than the one supported by the client. Add a spec quote and tweak the numbers accordingly. Fixes: 563138298868 ("dri3: Add DRI3 extension") Cc: Daniel Stone Cc: Keith Packard Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 6a5d51e0823b43280e3646b7a0c919a3b76146ea Author: Emil Velikov Date: Mon Mar 19 16:04:43 2018 +0000 present: cap the version returned to the client As per the protocol, the server should not return version greater than the one supported by the client. Add a spec quote and tweak the numbers accordingly. Fixes: 5c5c1b77982 ("present: Add Present extension") Cc: Thierry Reding Cc: Daniel Stone Cc: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit abb9b58d1af9a0286162e52ef9db390d0c950fc1 Author: Thierry Reding Date: Fri Mar 16 14:24:21 2018 +0100 present: Advertise protocol version 1.2 Everything is implemented to support protocol version 1.2. Make it official. Reviewed-by: Daniel Stone Signed-off-by: Thierry Reding Reviewed-by: Emil Velikov commit 7fc89251ef5e7363dfbf6d831ed448bbcd8519b8 Author: Alan Coopersmith Date: Sun Mar 4 13:00:05 2018 -0800 Revert "modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD" This reverts commit 8c455db0ebb6e5313ca81428bb6dd75ef12aaa15. Since xf86platformBus.h is only included when XSERVER_PLATFORM_BUS is defined, and configure.ac only defines that on systems with udev, this commit breaks the build on non-udev systems like Solaris. Signed-off-by: Alan Coopersmith commit edf08bd654dcdf31da9a592513b218bbd9f64cc6 Author: Adam Jackson Date: Wed Mar 14 12:10:27 2018 -0400 appveyor: Switch to xorgproto Also build with -j2, the builder VM has two cores. Signed-off-by: Adam Jackson commit 8f628033bed408c4de215ca117fa2fa2d9f9d5cd Author: Adam Jackson Date: Wed Mar 14 12:54:16 2018 -0400 travis: Update OSX build Install and use xorgproto, and build with optimization as clang has warnings that only work above -O0. Also expand the build matrix for both Xcode 8.3 and 9.2. Both images are OSX 10.12 at the moment so this is really just a way to test with clang 8 vs 9. Signed-off-by: Adam Jackson commit 1ca092f990e67c7dccf5790a72c41e84711c28a8 Author: Adam Jackson Date: Wed Mar 14 13:13:54 2018 -0400 travis: Switch linux build from stretch to rawhide Stretch's Mesa is too far behind, and building Mesa to build xserver is not the sort of problem we're trying to solve here. But our Travis scripts run inside a docker image, and that image can be whatever, so since I have to keep rawhide building anyway let's switch to that for now. The dockerfile can be found at: https://github.com/nwnk/xserver-travis The $DISTRO part of the change is foreshadowing for the day we readd a (probably sid-based) debian image; patches for other environments are welcome. Signed-off-by: Adam Jackson commit 17d30369f4445e1693a1b75dc6620bbc21ec8e61 Author: Michel Dänzer Date: Wed Mar 14 16:48:23 2018 +0100 randr: Initialize RROuptutRec::nonDesktop Flagged by valgrind: ==13695== Conditional jump or move depends on uninitialised value(s) ==13695== at 0x22461C: RRNoticePropertyChange (rrproperty.c:150) ==13695== by 0x22461C: RRChangeOutputProperty (rrproperty.c:263) ==13695== by 0x222FC4: RROutputSetNonDesktop (rroutput.c:333) ==13695== by 0x22319C: RROutputCreate (rroutput.c:122) ==13695== by 0x1E1CE9: xf86RandR12CreateObjects12 (xf86RandR12.c:1734) ==13695== by 0x1E1CE9: xf86RandR12Init12 (xf86RandR12.c:2375) ==13695== by 0x1E1CE9: xf86RandR12Init (xf86RandR12.c:895) ==13695== by 0x1D469B: xf86CrtcScreenInit (xf86Crtc.c:778) ==13695== by 0xC095A54: RADEONScreenInit_KMS (radeon_kms.c:2436) ==13695== by 0x161444: AddGPUScreen (dispatch.c:3966) ==13695== by 0x1A3E46: InitOutput (xf86Init.c:763) ==13695== by 0x1654A7: dix_main (main.c:193) ==13695== by 0x7041A86: (below main) (libc-start.c:310) ==13695== Uninitialised value was created by a heap allocation ==13695== at 0x4C2CB8F: malloc (vg_replace_malloc.c:299) ==13695== by 0x223083: RROutputCreate (rroutput.c:83) ==13695== by 0x1E1CE9: xf86RandR12CreateObjects12 (xf86RandR12.c:1734) ==13695== by 0x1E1CE9: xf86RandR12Init12 (xf86RandR12.c:2375) ==13695== by 0x1E1CE9: xf86RandR12Init (xf86RandR12.c:895) ==13695== by 0x1D469B: xf86CrtcScreenInit (xf86Crtc.c:778) ==13695== by 0xC095A54: RADEONScreenInit_KMS (radeon_kms.c:2436) ==13695== by 0x161444: AddGPUScreen (dispatch.c:3966) ==13695== by 0x1A3E46: InitOutput (xf86Init.c:763) ==13695== by 0x1654A7: dix_main (main.c:193) ==13695== by 0x7041A86: (below main) (libc-start.c:310) Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 52048ce29f872192478fece3887b7bc1c8aace7d Author: Keith Packard Date: Mon Mar 12 12:14:44 2018 -0700 Xext/saver: Swap ScreenSaverSuspend 'suspend' field. Handle old XCB clients. This field was defined as a Bool in the protocol headers and BOOL in xcb. Bool is not a valid type for protocol fields. It is defined as 'int' by Xdefs.h, which we expect to be 32-bits on all machines. The protocol headers and xcb have patches posted to switch to CARD32, which is at least well defined. This change adds the necessary byte swapping to handle other-endian clients with this 32-bit field, and then changes the request processing to compare all 32-bits against zero so that it works with both new and old clients. On MSB machines, Xlib will continue to work properly, but old XCB will not interoperate with the X server (either before or after this patch). Signed-off-by: Keith Packard Reviewed-by: Mihai Moldovan Reviewed-by: Adam Jackson commit beda6afb3c33adbf77637141f05631081894e93a Author: Mario Kleiner Date: Fri Mar 9 04:58:20 2018 +0100 glamor/xwayland: Add depth 30 format mapping for DRI 3.2 as well. Signed-off-by: Mario Kleiner Reviewed-by: Daniel Stone commit 07c369e05ac116901dacc20f4742622bdca2784f Author: Jon Turney Date: Thu Mar 8 12:34:26 2018 +0000 meson: Require libdrm for dri1/2/3 when configured 'auto' as well as 'true' If dri1/2/3 are configured for auto-detection, libdrm is required, as well as the corresponding proto. (Practically we will always have the corresponding protos now, as they are part of xorgproto). Signed-off-by: Jon Turney Reviewed-by: Emil Velikov commit f69cd2024ef25e7fd2bd2d7012e33ce16eeb79ff Author: Adam Jackson Date: Thu Mar 8 11:13:16 2018 -0500 os: Define {ReadFdFrom,WriteFdTo}Client unconditionally Otherwise this is broken on cygwin: rrlease.c: In function ‘ProcRRCreateLease’: rrlease.c:305:9: error: implicit declaration of function ‘WriteFdToClient’ [-Werror=implicit-function-declaration] if (WriteFdToClient(client, fd, TRUE) < 0) { Signed-off-by: Adam Jackson commit 90e0cdd42dfda2accfadffa5c550712696902e14 Author: Rodrigo Vivi Date: Wed Mar 7 07:46:20 2018 -0800 dri2: Sync i965_pci_ids.h from Mesa. Copied from Mesa with no modifications. Gives us Geminilake and Kaby Lake platform names updates and sync on Coffee Lake PCI IDs. Cc: Timo Aaltonen Signed-off-by: Rodrigo Vivi Reviewed-by: Adam Jackson commit 43576b901151a1f32209f476249a4de6980b654f Author: Michel Dänzer Date: Tue Mar 6 10:53:19 2018 +0100 glamor: Restore glamor_fd_from_pixmap and glamor_pixmap_from_fd They're part of the 1.20 RC1 ABI, and actually used by external drivers. Also, requiring drivers which don't support the new functionality in DRI3 1.2 to switch to the new interfaces seems unreasonable. Signed-off-by: Michel Dänzer Reviewed-by: Daniel Stone commit 5d3fd3856b718cfbc87d17f1de698ced94923c78 Author: Samir Benmendil Date: Sat Mar 3 01:41:12 2018 +0000 xkb: XkbSetMap on the lastSlave needs to change the master The layout needs to be set on the master too if the layout is changed on the device that was last used by the master. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=85256 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91571 Signed-off-by: Samir Benmendil Acked-by: Daniel Stone commit ce8da936464cc78ec31de6e970e1353ffecf2547 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:46 2018 +0000 dri3: Enable DRI3 version 1.2 Enable DRI3 v1.2 now that all functions have been implemented and that there is at least one backend implementing the driver hooks (modesetting/glamor). Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 8d0d89715984e321315631dd6667e05813d26e03 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:45 2018 +0000 glamor: Use gbm_bo_create_with_modifiers for internal pixmap allocation Using modifier might allow the driver to use a more optimal format (e.g. tiled/compressed). Let's try to use those if possible. v2: Don't filter out multi-plane modifiers Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit cef12efc15ca1444d6d8cd839116b318a4668692 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:44 2018 +0000 glamor: Implement GetSupportedModifiers Implement function added in DRI3 v1.1. A newest version of libepoxy (>= 1.4.4) is required as earlier versions use a problematic version of Khronos EXT_image_dma_buf_import_modifiers spec. v4: Only send scanout-supported modifiers if flipping is possible v5: Fix memory corruption in XWayland (uninitialized pointer) Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit c8c276c9569b3ca1e695682a5443f1b615c606bd Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:43 2018 +0000 glamor: Implement PixmapFromBuffers and BuffersFromPixmap It relies on GBM >= 17.1.0 where we can import BO with multiple planes and a format modifier (GBM_BO_IMPORT_FD_MODIFIER). v2: Properly free fds in Xwayland [Also add glamor_egl_ext.h to Makefile.am for distcheck's sake - ajax] Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 9d147305b4048dcec7ea4eda3eeea83f843f7788 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:42 2018 +0000 modesetting: Check if buffer format is supported when flipping Add support for 'check_flip2' so that the present core can know why it is impossible to flip in that scenario. The core can then let know the client that the buffer format/modifier is suboptimal. v2: No longer need to implement 'check_flip' Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit e375f29662ad7589cc6d8d179846da9b8a897122 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:41 2018 +0000 modesetting: Create scanout buffers using supported modifiers Use most optimal buffer format (e.g. tiled/compressed) available for scanout. v2: Don't use multi-plane modifier to create scanout buffer v3: Add flag to retrieve modifiers set from enabled CRTCs only v4: Fix uses when GBM/EGL driver doesn't support modifiers Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit ca1c390ec7bf617c0147d69cf874dadce28e903b Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:40 2018 +0000 modesetting: Get supported formats/modifiers for scanout Retrieve IN_FORMATS property from the plane. It gives the allowed formats and modifiers for BO allocation. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 9817c14f6a2ea5db44459659131c13f403716df1 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:39 2018 +0000 modesetting: Use atomic modesetting to configure output/CRTCs To make sure we also use the same primary plane and to avoid mixing uses of two APIs, it is better to always use the atomic modesetting API when possible. v2: Don't use mode_output->connector_id Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 2f807c2324b46fbd9a557e7a4f177a392d5851b3 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:38 2018 +0000 modesetting: Add support for multi-plane pixmaps when page-flipping This allows the uses of CCS compressed or tiled pixmaps as BOs when page-flipping. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 4023d537341b9c36b9bb248c206e40694e4b08d2 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:37 2018 +0000 modesetting: Use atomic modesetting API for pageflip if available In order to flip between compressed and uncompressed buffers - something drmModePageFlip explicitly bans us from doing - we need to port use the atomic modesetting API. It's only 'fake' atomic though given we still commit for each CRTC separately and CRTC and connector properties are not set with the atomic API. The helper functions to retrieve DRM properties have been borrowed from Weston. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit e2ef3b44fa697f2ed453767e98da72ea56d4046f Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:36 2018 +0000 present: Send PresentCompleteModeSuboptimalCopy appropriately Add 'check_flip2' hook for driver to let know the core about why flipping is not possible ('reason'). If it is because of unsupported buffer format/modifier, a PresentCompleteNotify event is sent to the client with the PresentCompleteModeSuboptimalCopy mode. v2: Check for PresentOptionSuboptimal and check driver version before using 'check_flip2'. v3: Only require one of 'check_flip' or 'check_flip2' to be implemented by the driver. Refactor reasons list to enum Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 6e7c40f62db66f5b59b2cf59f1e6a26e4fd21bda Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:35 2018 +0000 dri3: Add multi-planar/modifier buffer requests Initial implementation for DRI3 v1.1. Only the DRI3 implementation is there, backends need to implement the proper hooks. Version is still set to 1.0 so clients shouldn't use the new requests yet. v2: Use depth/bpp instead of DRM formats in requests v3: Remove DMA fence requests from v1.1 Add screen/drawable modifier sets v4: Free array returned by 'get_drawable_modifiers()' v5: Fix FD leak Signed-off-by: Daniel Stone Signed-off-by: Louis-Francis Ratté-Boulianne Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 0ff4074224ea370e021d79526c63cef91356730d Author: Keith Packard Date: Fri Mar 2 17:05:04 2018 -0800 Require libdrm 2.4.89 or newer Both autotools and meson build systems had complicated logic around what version of libdrm to require for various options. Remove that and just check for a new enough version to support all of the options which need libdrm. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 43ffd572592d26bb78decfdf55e643bdfb011d3f Author: Laurent Carlier Date: Thu Mar 1 12:58:16 2018 +0100 meson: Make SHM extension optional v2: check for header 'sys/shm.h' Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit de4565727a0bb199365d33e3c98d9ddd3e0de6f2 Author: Laurent Carlier Date: Thu Mar 1 12:57:27 2018 +0100 meson: get rid of useless HAVE_SYSV_IPC Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit e02afb94783a25c21b07e44a7b615acdd86fa3f7 Author: Laurent Carlier Date: Thu Mar 1 12:56:28 2018 +0100 meson: Make ACPI support optional v2: Define HAVE_ACPI in dix-config.h Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit 238219e7312e2b5d972a8620b02379009686a005 Author: Laurent Carlier Date: Thu Mar 1 12:55:11 2018 +0100 meson: Make APM support optional v2: Define HAVE_APM in dix-config.h Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit 2af0a50a4bb9be9f58681d417ceb9a7029caaf3b Author: Adam Jackson Date: Wed Feb 28 11:23:41 2018 -0500 randr: Fix a crash on initialization with GPU screens RRSetChanged (immediately above) was immune to screens with no master, but RRTellChanged was not: Thread 1 "X" received signal SIGSEGV, Segmentation fault. RRTellChanged (pScreen=) at ../../randr/randr.c:576 576 mastersp = rrGetScrPriv(master); (gdb) bt #0 RRTellChanged (pScreen=) at ../../randr/randr.c:576 #1 0x000055555566f1e9 in RRNoticePropertyChange (value=0x555555bfbf28, property=70, output=0x555555bfef10) at ../../randr/rrproperty.c:153 #2 RRChangeOutputProperty (output=output@entry=0x555555bfef10, property=, type=type@entry=19, format=format@entry=32, mode=, mode@entry=0, len=len@entry=1, value=0x7fffffffe77c, sendevent=1, pending=0) at ../../randr/rrproperty.c:263 #3 0x000055555566dba5 in RROutputSetNonDesktop (output=output@entry=0x555555bfef10, nonDesktop=nonDesktop@entry=0) at ../../randr/rroutput.c:333 ... Reported-by: Michel Dänzer Signed-off-by: Adam Jackson commit cf485c659d93c92b26c4390402575f061eb175f6 Author: Adam Jackson Date: Wed Feb 28 12:18:28 2018 -0500 xserver 1.20 RC 1 Signed-off-by: Adam Jackson commit afccb266edc8b2ca014aec5b2a67bb1627f29fe9 Author: Adam Jackson Date: Wed Feb 28 12:26:26 2018 -0500 glx: Add vndserver.h to the SDK Also unbreak 'make distcheck', sigh autotools. Signed-off-by: Adam Jackson commit 85ff1cdbd3286838e512fe7c70af149a8743b6fe Author: Emil Velikov Date: Tue Feb 27 17:05:50 2018 +0000 protocol.txt: add GLX req. 35 - SetClientInfo2ARB Noticed while skimming for the typo'd version ;-) Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit e4e3447603b5fd3a38a92c3f972396d1f81168ad Author: Keith Packard Date: Mon Feb 12 13:51:56 2018 -0800 Add RandR leases with modesetting driver support [v6] This adds support for RandR CRTC/Output leases through the modesetting driver, creating a lease using new kernel infrastructure and returning that to a client through an fd which will have access to only those resources. v2: Restore CRTC mode when leases terminate When a lease terminates for a crtc we have saved data for, go ahead and restore the saved mode. v3: Report RR_Rotate_0 rotations for leased crtcs. Ignore leased CRTCs when selecting screen size. Stop leasing encoders, the kernel doesn't do that anymore. Turn off crtc->enabled while leased so that modesetting ignores them. Check lease status before calling any driver mode functions When starting a lease, mark leased CRTCs as disabled and hide their cursors. Also, check to see if there are other non-leased CRTCs which are driving leased Outputs and mark them as disabled as well. Sometimes an application will lease an idle crtc instead of the one already associated with the leased output. When terminating a lease, reset any CRTCs which are driving outputs that are no longer leased so that they start working again. This required splitting the DIX level lease termination code into two pieces, one to remove the lease from the system (RRLeaseTerminated) and a new function that frees the lease data structure (RRLeaseFree). v4: Report RR_Rotate_0 rotation for leased crtcs. v5: Terminate all leases on server reset. Leases hang around after the associated client exits so that the client doesn't need to occupy an X server client slot and consume a file descriptor once it has gotten the output resources necessary. Any leases still hanging around when the X server resets or shuts down need to be cleaned up by calling the kernel to terminate the lease and freeing any DIX structures. Note that we cannot simply use the existing drmmode_terminate_lease function on each lease as that wants to also reset the video mode, and during server shut down that modesetting: Validate leases on VT enter The kernel doesn't allow any master ioctls to run when another VT is active, including simple things like listing the active leases. To deal with that, we check the list of leases whenever the X server VT is activated. xfree86: hide disabled cursors when resetting after lease termination The lessee may well have played with cursors and left one active on our screen. Just tell the kernel to turn it off. v6: Add meson build infrastructure [Also bumped libdrm requirement - ajax] Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 023d4aba8d45e9e3630b944ecfb650c081799b96 Author: Keith Packard Date: Mon Feb 12 13:51:55 2018 -0800 xf86-video-modesetting: Create CONNECTOR_ID properties for outputs [v2] This lets a DRM client map between X outputs and kernel connectors. v2: Change CONNECTOR_ID to enum -- Adam Jackson Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 39573605050f6253d14a4786bb79ce2b48537039 Author: Keith Packard Date: Mon Feb 12 13:51:54 2018 -0800 randr: Support "non-desktop" property Tracks changes to the non-desktop property so that when non-zero, outputs will always appear to be disconnected. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit b91c787c4cd2d20685db69426c539938c556128a Author: Keith Packard Date: Mon Feb 12 13:51:53 2018 -0800 xf86-video-modesetting: Record non-desktop kernel property at PreInit time Save any value of the kernel non-desktop property in the xf86Output structure to avoid non-desktop outputs in the default configuration. [Also bump randrproto requirement to a version that defines RR_PROPERTY_NON_DESKTOP - ajax] Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit fabbaa8d6260da14fe5b7ca0f3f8748af16253a2 Author: Keith Packard Date: Mon Feb 12 13:51:52 2018 -0800 xfree86/modes: Check for non-desktop monitors during PreInit [v2] At startup, we want to ignore non-desktop monitors unless we don't find any desktop monitors. Because there are no DIX RandR resources allocated, let the driver store this information in a new field in the xf86Output structure and then use that value to help decide whether to include an output as part of the default configuration. v2: Suggested-by: Michel Dänzer Bump XF86_CRTC_VERSION from 7 to 8. This will let out-of-tree drivers know whether this field is available. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 80d4f4b6c20288aa3e0c9908d5d845fc0088a662 Author: Mario Kleiner Date: Tue Feb 27 03:05:32 2018 +0100 modesetting: Enable screen color depth 30 support. glamor now supports depth 30, so allow use of it. Signed-off-by: Mario Kleiner Reviewed-by: Eric Anholt Reviewed-by: Antoine Martin commit 7bc86c7d2346eadb3aafe1550ec55e63f2a3b3e5 Author: Mario Kleiner Date: Tue Feb 27 03:05:31 2018 +0100 modesetting: Adapt xf86HandleColorMaps() for > 24 color depth. (v2) This retains old behavior for depths <= 24, but allows gamma table and colormap updates to work properly at depth 30. This needs the xf86Randr12CrtcComputeGamma() fix for depth 30 from a previous commit to work. Otherwise the server will work, but gamma table updates will silently fail, iow. the server would always run with a default identity gamma lut. v2: Simplify as proposed by Michel. Signed-off-by: Mario Kleiner Reviewed-by: Antoine Martin (v1) commit b5f9fcd50a999a00128c0cc3f6e7d1f66182c9d5 Author: Mario Kleiner Date: Tue Feb 27 03:05:30 2018 +0100 xfree86/modes: Adapt xf86Randr12CrtcComputeGamma() for depth 30. (v2) At screen depths > 24 bit, the color palettes passed into xf86Randr12CrtcComputeGamma() can have a larger number of slots than the crtc's hardware lut. E.g., at depth 30, 1024 palette slots vs. 256 hw lut slots. This palette size > crtc gamma size case is not handled yet and leads to silent failure, so gamma table updates do not happen. Add a new subsampling path for this case. This makes lut updates work again, as tested with the xgamma utility (uses XF86VidMode extension) and some RandR based gamma ramp animation. v2: Better resampling when subsampling the palette, as proposed by Ville. Now reaches the max index of the palette and deals with non-power-of-two sizes. Thanks. Signed-off-by: Mario Kleiner Reviewed-by: Antoine Martin (v1) Cc: commit 125201408ddd51ca8ea961a7338a6ad299e5816c Author: Mario Kleiner Date: Tue Feb 27 03:05:29 2018 +0100 glamor: Bump version to 1.0.1 to signal depth 30 support. Signed-off-by: Mario Kleiner Reviewed-by: Antoine Martin commit 7a687da24c9d3c9e40ffa426631bf355322d470e Author: Mario Kleiner Date: Tue Feb 27 03:05:28 2018 +0100 glamor: Enable composite acceleration for rgb10 formats. (v2) Specifically for xrgb2101010 format. Tested on KDE Plasma-5 with XRender based composite acceleration backend. Much smoother and faster. (v2) Dropped argb2101010, because of depth 32 confusion with argb8888, as pointed out by Eric. Thanks! Signed-off-by: Mario Kleiner Reviewed-by: Antoine Martin commit c326c717c8dbf4a3f0c64a031fbe6030e73ff355 Author: Mario Kleiner Date: Tue Feb 27 03:05:27 2018 +0100 glamor: Fix loose ends in color depth 30 support. This makes it work properly with OpenGL based desktop compositing, as tested with EGL and GLX based compositing under OpenGL-2/3, and also artifact free with XRender based 2D compositing. Signed-off-by: Mario Kleiner Reviewed-by: Eric Anholt Reviewed-by: Antoine Martin commit 9ab5d91c6c228e8f5b34e4b30c5104aed6c41958 Author: Mario Kleiner Date: Tue Feb 27 03:05:26 2018 +0100 glamor: Make Xv extension initialize at depth 30. Support x-screens of depth 30, so init doesn't fail. Signed-off-by: Mario Kleiner Reviewed-by: Eric Anholt Reviewed-by: Antoine Martin commit efe9e3e9ff96a06f50d94dc93ad2c19085fa3d09 Author: Mario Kleiner Date: Tue Feb 27 06:51:59 2018 +0100 modesetting: Fix fallback for lack of new vblank kernel API. Turns out that the kernel DRM ioctl handling returns EINVAL instead of ENOTTY if one tries to call the new drmCrtcGetSequence() or drmCrtcQueueSequence() ioctl's introduced in Linux 4.15 on an older kernel where they are missing. This causes the fallback code not to fall back to the old drmWaitVblank() ioctl and thereby failure of vblank stuff. E.g., on Linux 4.13, glxgears -info runs unthrottled at 10000 fps instead of 60 fps. Also breakage of OML_sync_control extension. Check for errno != EINVAL before setting has_queue_sequence = TRUE. Additionally in case of supported drmCrtcQueueSequence(), set has_queue_sequence = TRUE on success, or we might get at least a temporary failure in ms_queue_vblank(). One slight ambiguity is that we can also get EINVAL if drm_crtc_vblank_get() fails in the kernel, so if that happened at first invocation of the new api, we'd fall back to drmWaitVblank() and then fail there, instead of failing in the new api, but the end result would be the same. Fixes: 44d5f2eb8a2f ("xf86-video-modesetting: Support new vblank kernel API [v2]") Signed-off-by: Mario Kleiner Cc: Keith Packard Reviewed-by: Keith Packard commit 8171d4c2d67b2990a278dc018ac32534c3afe606 Author: Adam Jackson Date: Fri Feb 23 16:08:10 2018 -0500 render: Store and use all 16bpc of precision for solid pixels (v2.1) This plumbs the full width color for solid pictures through to fb, exa, and glamor. External drivers and acceleration code may wish to make a similar change for sufficiently new servers. v2: Don't break ABI (Michel Dänzer) v2.1: Use the (correct) full color in fb too (Michel Dänzer) Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 92272378064a878ce7a62852b877d674bcad89cd Author: Jeffrey Smith Date: Thu Feb 15 06:46:55 2018 -0600 modesetting: Do not close uninitialized dri2 screen If a dri2 screen is not successfully initialized, attempting to close it results in a null dereference. Maintain a flag indicating whether the dri2 screen was successfully initialized, and check it before attempting to close the dri2 screen. https://bugzilla.redhat.com/show_bug.cgi?id=1485811 https://bugzilla.redhat.com/show_bug.cgi?id=1493805 https://bugzilla.redhat.com/show_bug.cgi?id=1534459 https://bugzilla.redhat.com/show_bug.cgi?id=1541745 https://bugs.freedesktop.org/show_bug.cgi?id=101282 Signed-off-by: Jeff Smith commit aa29298416a6323fad1681a019dbcd54867b66c4 Author: Adam Jackson Date: Mon Feb 26 15:26:35 2018 -0500 glamor: unifdef XORG_VERSION_CURRENT This is always true now that glamor is in-tree. Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher commit 059879b3edb104014959426f953e1faf103d99ff Author: Adam Jackson Date: Mon Feb 26 13:58:26 2018 -0500 xquartz: Fix linking with glxvnd Signed-off-by: Adam Jackson commit 22a3ffe68c9c498e0b6b74ebcf1404becda8e2b1 Author: Michel Dänzer Date: Mon Feb 26 17:30:57 2018 +0100 glx: Don't pass NULL to glxGetClient These guards were dropped by the commit below, but it turns out they're needed. Fixes crash on VT switch. Fixes: d8ec33fe0542 ("glx: Use vnd layer for dispatch (v4)") Bugzilla: https://bugs.freedesktop.org/105233 Signed-off-by: Michel Dänzer Reviewed-by: Adam Jackson commit 528c94c6501db936882cd06338e2250a0b884b36 Author: Adam Jackson Date: Tue Feb 20 11:03:46 2018 -0500 glx: Fix indirect no-config contexts We would throw BadValue here for the GLX_SCREEN attribute. The upper dispatch layer already checks this, we can ignore it here. Signed-off-by: Adam Jackson commit a63ab81f6be7ad46b7e2d98a50aef4da5e664847 Author: Adam Jackson Date: Tue Feb 20 11:03:45 2018 -0500 glx: Enable GLX_ARB_create_context_no_error (v2) This is mostly for the client library's convenience, if this extension is listed then it can know the attribute won't be rejected. Note that we don't honor this attribute for indirect contexts. That's fine, we don't want to introduce undefined behavior into a potentially privileged process. v2: Remember to ignore the attribute (Eric Anholt) Signed-off-by: Adam Jackson commit 701f3a206d6f71c4754f457e95e2b954cf0b80c7 Author: Adam Jackson Date: Fri Feb 23 16:08:11 2018 -0500 render: Simplify miCompositeRects Make a solid-fill picture for this instead of a 1x1 pixmap. In principle the backend can accelerate this directly, and we also get to preserve all the bits of the fill color. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 9339fa87d03204b29d47eb8c9406f701517b3514 Author: Adam Jackson Date: Thu Feb 22 16:53:22 2018 -0500 render: Cosmetic cleanup to default format creation Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit ddf752eafe951bb9723aabf2579c4725a6ffc9de Author: Adam Jackson Date: Thu Feb 22 16:53:21 2018 -0500 render: Remove some 24bpp handling This can't happen anymore. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit efd84bff238f8e12bf652525990d36baada8785b Author: Peter Harris Date: Thu Feb 22 18:07:38 2018 -0500 composite: Fix use-after-free in compReparentWindow If an implicitly redirected window is unredirected by the reparent operation, cw will be a stale pointer. Signed-off-by: Peter Harris Reviewed-by: Keith Packard commit ac13d740bf14ba8799d4dfbee1f6f99a297dbc7e Author: Emil Velikov Date: Wed Feb 21 17:12:15 2018 +0000 mi: Mention extension loading in verbose logs Listing the extensions is useful, despite being annoying for normal usecases. Print it only when extra (lvl 3) vebose is requested. v2: Move the logging to InitExtensions(), as requested by Adam. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 9237c5e2878c088a6cd26ea380763465a9e67012 Author: Emil Velikov Date: Mon Feb 19 15:18:11 2018 +0000 docs: correct LoadExtensionList() documentation Add the missing arguments to the function signature. Fixes: e46820fb897 ("miinitext: introduce LoadExtensionList() to replace over LoadExtension()") Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 089a1b0f9fa2e80457dc3d5f05c84565c9113a21 Author: Emil Velikov Date: Mon Feb 19 15:18:10 2018 +0000 glx: set the version we implement in GlxServerExports Set the major/minor version it's currently implemented, not the one provided by the GLXSERVER_VENDOR_ABI_{MAJOR,MINOR}_VERSION macros. Those are identical for now, but can change in the future. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit edc00e020310d8f53ebc16295c373fe84ec6ec87 Author: Emil Velikov Date: Mon Feb 19 15:18:09 2018 +0000 glx: use C99 initializers for GlxServerExports Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 7fc757986947ad89d76fc0fd3d69f5fdeefc9055 Author: Emil Velikov Date: Mon Feb 19 15:18:08 2018 +0000 glx: NULL check the correct argument in dispatch_GLXVendorPriv malloc can return NULL, unlike GetVendorDispatchFunc. The latter provides DispatchBadRequest. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 1310241e8d606687811c7394811fe337c3e4de11 Author: Emil Velikov Date: Mon Feb 19 15:18:07 2018 +0000 glx: keep glvnd_vendor a private [static] variable Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit a054532668cbbb152d0d7acfcce1e03e884bb491 Author: Jason Ekstrand Date: Tue Feb 20 09:41:39 2018 -0800 xwayland: Fix backwards need_rotate logic (v2) When xdg_output support was added to Xwayland, need_rotate parameter was added to output_get_new_size where true gave you the old pre-xdg_output behavior and false gave the new behavior. Unfortunately, the two places where this is called, need_rotate was set backwards. This caused input get clampped to the wrong dimensions. Also, the logic for deciding whether or not to flip was wrong because, if need_rotate was false, it would always flip which is not what you want. v2 (Daniel Stone): - Fix output_get_new_size so that it doesn't flip the dimensions when need_rotate is false. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Stone Reviewed-by: Olivier Fourdan commit 343ee7d07565a75b90e6489c5c29f772dca79c43 Author: Alexander Volkov Date: Tue Feb 20 18:07:18 2018 +0300 Xephyr: Avoid calling xcb_shm_detach() twice This call was forgotten to be removed in 90996f5909aab4bc9aa4011a6a6d0555a7aa3adf in which hostx_destroy_shm_segment() was introduced, which itself does it. Signed-off-by: Alexander Volkov Reviewed-by: Adam Jackson commit 5ba0ba93e127a8c460b013e3c6851dd186377c27 Author: Laurent Carlier Date: Sun Feb 18 10:58:35 2018 +0100 meson: Make DGA extension optional Signed-off-by: Laurent Carlier commit e790bc621b8f55489e35b1de260c649d8d105d63 Author: Laurent Carlier Date: Sun Feb 18 10:58:34 2018 +0100 dga: #if XFreeXDGA → #ifdef XFreeXDGA ../include/events.h:32:14: error: #if with no expression Signed-off-by: Laurent Carlier commit ce4e20f80ff64a5a8b9f344e2507128f379e0715 Author: Laurent Carlier Date: Sun Feb 18 10:58:33 2018 +0100 meson: Make Xv and XvMC extensions optional Just mimic autoconf file, XvMC can't be enabled without Xv Signed-off-by: Laurent Carlier commit 82d9e99bf99660537a11d9475369c43814cad664 Author: Laurent Carlier Date: Sun Feb 18 10:58:32 2018 +0100 meson: Xephyr Requires xcb-shm version 1.9.3 or newer Sync with commit 8510f542e5474b719f7d7edba7ef0cc05af0271e Signed-off-by: Laurent Carlier commit 272fa1817091117d078a22252a03d3161dfc7b0f Author: Jeffrey Smith Date: Thu Feb 15 23:47:46 2018 -0600 os: avoid uninitialized offsets in backtrace When xorg_backtrace calls unw_get_proc_name and an error occurs, offset might not be set for the current frame. Initialize offset for each frame so that the offset from another frame cannot be used inadvertently. Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 6f9d29040cd9f4723a2e6c1e5d2ec8104efc0710 Author: Jon Turney Date: Fri Feb 16 16:44:37 2018 +0000 hw/xwin: Update for glxvnd - Link with libglxvnd in meson.build - Call xorgGlxCreateVendor() like all other DDX Signed-off-by: Jon Turney commit 500cc4a029efce9b962ab8fbb10da9f87d83372e Author: Adam Jackson Date: Wed Feb 14 17:21:43 2018 -0500 dmx: warning fix /home/ajax/git/xserver/at/../hw/dmx/input/dmxinputinit.c: In function ‘dmxInputInit’: /home/ajax/git/xserver/at/../hw/dmx/input/dmxinputinit.c:1019:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] int found; Signed-off-by: Adam Jackson commit 9bcddaf9619d01cdbf965cedb9f86a08ed6dc524 Author: Adam Jackson Date: Wed Feb 14 17:20:16 2018 -0500 dri2: warning fix /home/ajax/git/xserver/at/../glx/glxdri2.c: In function ‘create_driver_context’: /home/ajax/git/xserver/at/../glx/glxdri2.c:444:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] const __DRIconfig *driConfig = config ? config->driConfig : NULL; I don't know why autotools has decided not to be C99 but at least it's trivial to fix. Signed-off-by: Adam Jackson commit 133bd4443be6b76a36afadfae0905b832e998165 Author: Adam Jackson Date: Wed Jan 10 13:05:48 2018 -0500 glx: Large commands are context state, not client state There's no reason a multithreaded client shouldn't be allowed to interleave other requests (for other contexts) with a RenderLarge. Move the check into __glXForceCurrent, and store the state in the context not the client. Signed-off-by: Adam Jackson commit 5d87e4f71355272c8da38c83f493b826623301cc Author: Adam Jackson Date: Wed Jan 10 13:05:47 2018 -0500 miinitext: Remove separate extension toggle list This was only separate because GLX was loadable. The frontend is now linked statically, so we can use the static extension list directly. Signed-off-by: Adam Jackson commit 67c303fff303f94b62f03a76de97116c6ebcfda9 Author: Adam Jackson Date: Wed Jan 10 13:05:46 2018 -0500 miinitext: Load GLX on the mi path Add a stub for Xnest so it continues to link, but otherwise we support GLX on every server so there's no need to make every DDX add it. Signed-off-by: Adam Jackson commit d8ec33fe0542141aed1d9016d2ecaf52da944b4b Author: Adam Jackson Date: Wed Jan 10 13:05:45 2018 -0500 glx: Use vnd layer for dispatch (v4) The big change here is MakeCurrent and context tag tracking. We now delegate context tags entirely to the vnd layer, and simply store a pointer to the context state as the tag data. If a context is deleted while it's current, we allocate a fake ID for the context and move the context state there, so the tag data still points to a real context. As a result we can stop trying so hard to detach the client from contexts at disconnect time and just let resource destruction handle it. Since vnd handles all the MakeCurrent protocol now, our request handlers for it can just be return BadImplementation. We also remove a bunch of LEGAL_NEW_RESOURCE, because now by the time we're called vnd has already allocated its tracking resource on that XID. v2: Update to match v2 of the vnd import, and remove more redundant work like request length checks. v3: Add/remove the XID map from the vendor private thunk, not the backend. (Kyle Brenneman) v4: Fix deletion of ghost contexts (Kyle Brenneman) Signed-off-by: Adam Jackson commit 8753218beae641e5c5ac2c2ba598cfb99a893cf4 Author: Kyle Brenneman Date: Wed Jan 10 13:05:44 2018 -0500 glx: Import glxvnd server module (v2) This is based on an out-of-tree module written by Kyle: https://github.com/kbrenneman/libglvnd/tree/server-libglx I (ajax) did a bunch of cosmetic fixes, ported it off xfree86 API, added request length checks, and fixed a minor bug or two. v2: Use separate functions to set/get a context tag's private data, and call the backend's MakeCurrent when a client disconnects to unbind the context. (Kyle Brenneman) Signed-off-by: Adam Jackson commit d1fdddeb76328ab84d9a181a5c72b90013f0f0a6 Author: Laurent Carlier Date: Tue Feb 13 22:33:51 2018 +0100 meson: Make Security extension optional Just mimic autoconf file, Security extension needs X-ACE extension Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit 43ef94068e072228446484bf58c0624b9b9649ac Author: Laurent Carlier Date: Tue Feb 13 22:33:50 2018 +0100 meson: Make more extensions optional Just mimic autoconf file for xf86bigfont, screensaver, xres, xace and xinerama extensions Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit 3203dd175bd71ef4d154578165d930eec29afddb Author: Laurent Carlier Date: Tue Feb 13 22:33:49 2018 +0100 meson: Make DPMS extension optional Just mimic autoconf file, DPMS is disabled with Xquartz Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit 2c3e137b786dab4a8002a4934fbcf4ef0742f473 Author: Adam Jackson Date: Wed Feb 14 14:10:44 2018 -0500 dmx: #if PANORAMIX → #ifdef PANORAMIX Signed-off-by: Adam Jackson commit ceaf4277447407a7430b9bc3205462fbdbae0e39 Author: Adam Jackson Date: Mon Feb 12 15:35:05 2018 -0500 xfixes: Restore monitoring of animated cursors This was broken by: commit aa6651f83c698e8cc40de61aad36c73ca7a6adcf Author: Adam Jackson Date: Thu Jun 8 16:23:12 2017 -0400 xfixes: Remove the CursorCurrent array As of that change we look up the current cursor dynamically instead of trying to track every time it's set through ->DisplayCursor. That would work, except the 'bits' of an animated cursor is a transparent 1x1 pixel. So now, look up whether there's an animated cursor, and use its current frame if so. Signed-off-by: Adam Jackson commit 0b7a5700ad3d65e408a2fae00bdee867a8d2e1a8 Author: Adam Jackson Date: Mon Feb 12 15:35:04 2018 -0500 animcur: Change which CursorPtr we save in external state Formerly spriteInfo->anim.pCursor would point to the animated cursor (or NULL if not animated). That value would also be available in spriteInfo->sprite->current, so instead lets use anim.pCursor to point to the current animation element. Signed-off-by: Adam Jackson commit 8510f542e5474b719f7d7edba7ef0cc05af0271e Author: Alexander Volkov Date: Wed Feb 7 14:08:50 2018 +0300 Xephyr: Require xcb-shm version 1.9.3 or newer It's needed for FD-passing. Signed-off-by: Alexander Volkov Reviewed-by: Adam Jackson commit 2ff6eaad85fd702e3cc597c44ccf2210570004ea Author: Roman Gilg Date: Fri Feb 9 23:40:42 2018 +0100 Correct xorg_list_is_empty return value description The helper xorg_list_is_empty returns True when the list is empty and not when it contains one or more elements. Signed-off-by: Roman Gilg Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit bebcc8477c8070ade9dd4be7299c718baeab3d7a Author: Mario Kleiner Date: Mon Feb 5 11:20:41 2018 +0100 glx: Only assign 8 bpc fbconfigs for composite visuals. Commit 91c42093b248 ("glx: Duplicate relevant fbconfigs for compositing visuals") adds many new depth 32 fbconfigs as composite visuals. On a X-Screen running at depth 24, this also adds bgra 10-10-10-2 fbconigs, as they also have config.rgbBits == 32, but these are not displayable on a depth 24 screen, leading to visually corrupted desktops under some compositors, e.g., fdo bug 104597 "Compton weird colors" when running compton with "compton --backend glx". Be more conservative for now and only select fbconfigs with 8 bpc red, green, blue components for composite visuals. Fixes: 91c42093b248 ("glx: Duplicate relevant fbconfigs for compositing visuals") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104597 Signed-off-by: Mario Kleiner Reviewed-by: Thomas Hellstrom Reviewed-by: Adam Jackson commit 98edb9a35e2cdd61355656b82975d7f2b6a9f0e6 Author: Lyude Paul Date: Tue Feb 6 12:41:47 2018 -0500 xwayland: Don't process cursor warping without an xwl_seat Unfortunately, on my machine Xwayland immediately crashes when I try to start it. gdb backtrace: #0 0x00007ffff74f0e79 in wl_proxy_marshal () from target:/lib64/libwayland-client.so.0 #1 0x0000000000413172 in zwp_confined_pointer_v1_destroy (zwp_confined_pointer_v1=0x700000000) at hw/xwayland/Xwayland@exe/pointer-constraints-unstable-v1-client-protocol.h:612 #2 0x0000000000418bc0 in xwl_seat_destroy_confined_pointer (xwl_seat=0x8ba2a0) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland-input.c:2839 #3 0x0000000000418c09 in xwl_seat_unconfine_pointer (xwl_seat=0x8ba2a0) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland-input.c:2849 #4 0x0000000000410d97 in xwl_cursor_confined_to (device=0xa5a000, screen=0x8b9d80, window=0x9bdb70) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland.c:328 #5 0x00000000004a8571 in ConfineCursorToWindow (pDev=0xa5a000, pWin=0x9bdb70, generateEvents=1, confineToScreen=0) at /home/lyudess/Projects/xserver/dix/events.c:900 #6 0x00000000004a94b7 in ScreenRestructured (pScreen=0x8b9d80) at /home/lyudess/Projects/xserver/dix/events.c:1387 #7 0x0000000000502386 in RRScreenSizeNotify (pScreen=0x8b9d80) at /home/lyudess/Projects/xserver/randr/rrscreen.c:160 #8 0x000000000041a83c in update_screen_size (xwl_output=0x8e7670, width=3840, height=2160) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland-output.c:203 #9 0x000000000041a9f0 in apply_output_change (xwl_output=0x8e7670) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland-output.c:252 #10 0x000000000041aaeb in xdg_output_handle_done (data=0x8e7670, xdg_output=0x8e7580) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland-output.c:307 #11 0x00007ffff50e9d1e in ffi_call_unix64 () at ../src/x86/unix64.S:76 #12 0x00007ffff50e968f in ffi_call (cif=, fn=, rvalue=, avalue=) at ../src/x86/ffi64.c:525 #13 0x00007ffff74f3d8b in wl_closure_invoke () from target:/lib64/libwayland-client.so.0 #14 0x00007ffff74f0928 in dispatch_event.isra () from target:/lib64/libwayland-client.so.0 #15 0x00007ffff74f1be4 in wl_display_dispatch_queue_pending () from target:/lib64/libwayland-client.so.0 #16 0x00007ffff74f200b in wl_display_roundtrip_queue () from target:/lib64/libwayland-client.so.0 #17 0x0000000000418cad in InitInput (argc=12, argv=0x7fffffffd9c8) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland-input.c:2867 #18 0x00000000004a20e3 in dix_main (argc=12, argv=0x7fffffffd9c8, envp=0x7fffffffda30) at /home/lyudess/Projects/xserver/dix/main.c:250 #19 0x0000000000420cb2 in main (argc=12, argv=0x7fffffffd9c8, envp=0x7fffffffda30) at /home/lyudess/Projects/xserver/dix/stubmain.c:34 This appears to be the result of xwl_cursor_confined_to() and xwl_screen_get_default_seat(). While not against protocol, mutter ends up sending xdg_output before wl_seat. xwl_screen_get_default_seat() makes the naïve assumption that we always have a valid seat, we end up returning a pointer to the empty list itself instead of an actual seat and causing ourselves to segfault. So, actually return NULL in xwl_screen_get_default_seat() if the seat list is empty, and skip any pointer confinement processing in xwl_cursor_confined_to() when we don't have a seat setup yet. Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit fd21b282dc88936043a23baa4ec053a2811319a7 Author: Jeff Smith Date: Sun Feb 4 23:17:54 2018 -0600 xfree86: Only call PreInit handler if it exists for device DoConfigure() attempts to call the PreInit handler on a device without checking that the handler exists. Check that the PreInit handler exists for a device before attempting to call it. Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit e81031f3fda0f8b4237224b13c016759eaa52449 Author: Jeff Smith Date: Sun Feb 4 23:17:53 2018 -0600 xfree86: Allocate sufficienct space for dev2screen array When the dev2screen is sized to xf86NumDrivers in DoConfigure(), subsequent code may attempt to write past the end of the array. Size the dev2screen array to nDevToConfig instead. Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 1a24a0ae7b1a7400735530a21ac8c0247723223d Author: Jeff Smith Date: Sun Feb 4 23:17:52 2018 -0600 xfree86: Do not use uninitialized pointer during probe Commits b5dffbb and d75ffcd introduce code in xf86platformProbe() that references a member of xf86configptr. However, when using the "-configure" option, xf86configptr may not be initialized when xf86platformProbe() is called. Avoid referencing a member of xf86configptr if uninitialized. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100405 Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 1e23f03dd5fb6c981ef6d64c084f72fc6820ed71 Author: Jan Beich Date: Fri Jul 7 16:31:48 2017 +0200 shm, xwayland: prefer atomic close-on-exec without O_TMPFILE Signed-off-by: Jan Beich Reviewed-by: Adam Jackson commit 3e3b8a40fee77d1af6ca0c2946ff276d555ddea8 Author: Michal Srb Date: Mon Mar 27 15:03:38 2017 +0300 modesetting: Check for -1 before converting to unsigned int. dri2.c:516:21: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (front->name < 0) Prevents a failure from being ignored. commit a9f68688f313752b1c6dfcbf6bf54f8c41fd811d Author: Michal Srb Date: Mon Mar 27 15:03:37 2017 +0300 xfree86: Silence always true condition warning. xf86pciBus.c:1464:21: warning: comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true [-Wtautological-constant-out-of-range-compare] if (pVideo->bus < 256) The code used to be in xf86FormatPciBusNumber and compared parameter which was int, but since b967bf2a it was inlined now it works with uint8_t. commit b75835a4358065378142691bf4a20140981a410f Author: Raimonds Cicans Date: Mon Nov 6 15:26:33 2017 +0200 Xdmx: fix input driver initialization code paths Problem: Xdmx exit with error "(Fatal Error) dmx: Unknown input argument: " if local input driver is specified (example: -input local,usb-kbd,usb-mou). Cause: code block for remote input drivers is placed in code path common for all drivers. Fix: affected code block moved to remote input driver code path part. Signed-off-by: Raimonds Cicans Reviewed-by: Adam Jackson commit cbf09619f2355d14c103eff69aaf191cca614c06 Author: Adam Jackson Date: Mon Nov 6 12:56:05 2017 -0500 meson: Get more xkb configuration from xkbcomp.pc Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit 93c16b0524711cd3cd8e32f151c53b5d6522e967 Author: Alexander Volkov Date: Fri Feb 2 15:17:15 2018 +0300 Xephyr: Call forgotten XShmDetach if can't mmap SHM segment Reviewed-by: Adam Jackson commit 6b26a7bda9efa93440734ede0382a3e9a6761365 Author: Alex Goins Date: Mon Jan 8 18:44:25 2018 -0800 randr: Fix rotation check in ProcRRSetScreenSize() ProcRRSetScreenSize() does bounds checking to ensure that none of the CRTCs have a viewport that extends beyond the new screen size. In doing so, it accounts for if the CRTC is rotated 90 or 270 degrees, swapping width and height. However, it does so by testing if crtc->rotation is equal to RR_Rotate_90 or RR_Rotate_270. crtc->rotation is a bit mask, and it includes reflection as well as rotation. If a CRTC is reflected as well as rotated, it will incorrectly fail this test, resulting in incorrect dimensions being used to verify the validity of the new screen size. In some cases, this can cause valid uses of ProcRRSetScreenSize() to fail with BadMatch. This patch fixes the issue by testing that the bits RR_Rotate_90 or RR_Rotate_270 are set, rather than testing for equality. Signed-off-by: Alex Goins Reviewed-by: Michel Dänzer commit 90996f5909aab4bc9aa4011a6a6d0555a7aa3adf Author: Alexander Volkov Date: Wed Jan 31 15:36:36 2018 +0300 Xephyr: Prefer using MIT-SHM FD-passing when possible This makes the shared memory visible only for the Xephyr and the X server to which it is connected. Signed-off-by: Alexander Volkov Reviewed-by: Keith Packard commit 8a220bd83c3e23de7e07d3976bfc1248c38558d4 Author: Alexander Volkov Date: Wed Jan 31 15:36:35 2018 +0300 Xephyr: Extract functions to create/delete shared memory segments Signed-off-by: Alexander Volkov Reviewed-by: Keith Packard commit 510e7d0d869dcc008b1e11e21961f2c1c3cb9cd3 Author: Jeff Smith Date: Tue Dec 26 22:10:52 2017 -0600 os: Always return microseconds from GetTimeInMicros() When a monotonic clock is not available, GetTimeInMicros() returns the time in nanoseconds. Instead, return the time in microseconds, as the name indicates. Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 94e7ca6a5667eeb13c078496a07d3e6cf1ec95cc Author: Giuseppe Bilotta Date: Wed Jan 31 17:33:48 2018 +0100 rrmonitor: allocate using the correct type Monitor outputs are of type RROutput, not RRCrtc. (Which are both XID, so this makes no difference in practice, other than being technically correct.) Signed-off-by: Giuseppe Bilotta Reviewed-by: Adam Jackson commit ff410c56bfd6dcdf5d252ef0ba3f4c6fde91774b Author: Jeff Smith Date: Fri Jan 26 06:25:22 2018 -0600 glamor: tidy up some gradient color formulas - Avoid some needlessly complex equations for calculating the color at a point in a gradient field. - Avoid calculating certain values multiple times. - Use similar variable names across the two versions of the get_color function where practical. Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 3bd17dff1ac5a4685a5da92a9982f621effee658 Author: Jeff Smith Date: Fri Jan 26 06:25:21 2018 -0600 glamor: remove unused variables in linear gradient shader Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 5815c7b5951fd46d69e5c40144b64e516c7afdbf Author: Jeff Smith Date: Fri Jan 26 06:25:20 2018 -0600 glamor: fix no-reflect case for gradients When compositing a no-reflect gradient, 'before' the gradient is empty, but 'after' the gradient is padded with the final color. Both sides are supposed to be empty. This is fixed by moving the virtual stops to match the first and last client-supplied stops for no-reflect gradients, then causing everything 'before' the initial virtual stop and 'after' the final virtual stop to emit rgba(0,0,0,0). This does not impact gradients using the other reflect modes. Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 3e377e238f7257fd01e56a4a25dfd77e033673e4 Author: Jeff Smith Date: Fri Jan 26 06:25:19 2018 -0600 glamor: fix repeat-reflect case in linear gradient shader If _pt_distance is negative, it causes the final distance to be negative in the repeat-reflect case. Moving the scaling by _pt_distance earlier avoids this problem, and simplifies some equations as a bonus. Bugzilla: https://bugs.freedesktop.org/98508 Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 9b7b8720ebc8028b14796a66d0a21b002682a83c Author: Jeff Smith Date: Sat Jan 27 00:14:02 2018 -0600 edid: use value returned from pruning duplicate modes xf86PruneDuplicateModes is passed a linked list of modes, and after pruning the duplicate nodes, the new head of the list is returned. If the first element is removed, the head of the list will change and the returned value needs to be assigned. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103722 Thanks: John Lumby Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit dd00e5466a0e4ea313d1860824da4123692827ed Author: Adam Jackson Date: Wed Jan 24 15:40:22 2018 -0500 xfree86: Remove broken RANDR disabling logic (v4) The only way to get at xf86Info.disableRandR from configuration is Option "RANDR" "foo" in ServerFlags, which probably nobody is using seeing as it's not documented. The other way it could be set is if a screen supports RANDR 1.2, in which case we set it to avoid trying to use the RANDR 1.1 compat code. If the second screen is not 1.2-aware then this would mean we don't do RANDR setup on the second screen at all, which would almost certainly crash the first time you try to do RANDR operations on the second screen. Fix that all by deletion, and just check whether the screen already has RANDR initialized before installing the stub support. If you want to disable RANDR, use the Extensions section of xorg.conf instead. v2: Also remove a now entirely pointless log message, telling you to ignore a line we will no longer print. v3: Explain the fallback path in InitOutput. (Keith Packard) v4: Check whether the RANDR private key is initialized before trying to use it to look up the screen private. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 9a416a478c1a29d1aa12c394acf21fb1b4a3aca9 Author: Hawking Zhang Date: Thu Jan 25 18:03:57 2018 +0100 glamor: Add 30bit RGB color format support Signed-off-by: Hawking Zhang [ Michel Dänzer: Adapt to glamor changes since 1.19 ] Signed-off-by: Michel Dänzer Acked-by: Alex Deucher commit fc8b7d05e74a6351df56ad8b17216aeb0dcc016b Author: Olivier Fourdan Date: Thu Jan 25 13:43:09 2018 +0100 xwayland: place a manual redirect on windows Place a manual redirect on windows on xwl_realize_window() and remove it on xwl_unrealize_window() to avoid the X11 window manager removing its redirect before Xwayland has unrealized the window (e.g. if the X11 window manager has terminated unexpectedly) Suggested by Daniel Stone Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 3362422e8413dd9f231cfac50ce0a0862525b1bf Author: Olivier Fourdan Date: Wed Jan 24 17:45:37 2018 +0100 xwayland: remove dirty window unconditionally on unrealize This is a rare occurrence of a crash in Xwayland for which I don't have the reproducing steps, just a core file. The backtrace looks as follow: #0 raise () from /usr/lib64/libc.so.6 #1 abort () from /usr/lib64/libc.so.6 #2 OsAbort () at utils.c:1361 #3 AbortServer () at log.c:877 #4 FatalError () at log.c:1015 #5 OsSigHandler () at osinit.c:154 #6 #7 xwl_glamor_pixmap_get_wl_buffer () at xwayland-glamor.c:162 #8 xwl_screen_post_damage () at xwayland.c:514 #9 block_handler () at xwayland.c:665 #10 BlockHandler () at dixutils.c:388 #11 WaitForSomething () at WaitFor.c:219 #12 Dispatch () at dispatch.c:422 #13 dix_main () at main.c:287 The crash is caused by dereferencing “xwl_pixmap->buffer” in xwl_glamor_pixmap_get_wl_buffer() because “xwl_pixmap” is NULL. Reason for this is because the corresponding pixmap is from the root window and xwayland is rootless by default. This can happen if the window was mapped, redirected, damaged and unredirected immediately, before the damage is processed by Xwayland. Make sure to remove the dirty window from the damage list on unrealize to prevent this from happening. Credit goes to Adam Jackson and Daniel Stone for finding the root cause the issue. Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 29a5423abd4bc6cb7bb800924a27b5d90951e408 Author: Jason Gerecke Date: Tue Nov 7 11:09:44 2017 -0800 xwayland: Support for BTN_STYLUS3 kernel events BTN_STYLUS3 has been introduced by the Linux 4.15 kernel to report the status of the third button present on Wacom's new "Pro Pen 3D" stylus. Treat this button like xf86-input-wacom and send a button 8 event ("navigate back") when received from Wayland. Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 71348e99a8e6a95542e483b93839168ca8f51f81 Author: Michal Srb Date: Mon Nov 27 09:59:01 2017 +0100 os/inputthread: Force unlock when stopping thread. The inputthread is kept locked all the time while X server's VT is not active. If the X server is terminated while not active, it will be stuck forever in InputThreadFini waiting for the thread to join, but it wouldn't because it is locked. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=103782 Signed-off-by: Michal Srb Reviewed-by: Adam Jackson commit d5c23b29487d5ff440abf5ed0beb22c00f21e387 Author: Peter Harris Date: Thu Dec 14 12:21:19 2017 -0500 composite: Propagate damagedDescendants when reparented If a window that is fully covered by an automatic-redirected descendant (even implicitly, eg. via BackingStores) is reparented, the automatic updates could be broken if the new parent is not marked as having damaged descendants. Fix this issue by propagating the damagedDescendants flag whenever a window is reparented. Reviewed-by: Adam Jackson Signed-off-by: Peter Harris commit ac138f9b31b0fba00742edbc3326afe66e28099a Author: Rinat Ibragimov Date: Tue Oct 24 01:43:43 2017 +0300 modesetting: setup colormap Signed-off-by: Rinat Ibragimov Reviewed-by: Michel Dänzer commit 5cb330cd5d887b20351604ac080e8b71a4e28be7 Author: Adam Jackson Date: Wed Jan 24 15:24:00 2018 -0500 Revert "xfree86: Remove broken RANDR disabling logic (v3)" Tsk. This broke vesa for me, the rrGetScrPriv in InitOutput will crash if randr's screen private key hasn't been initialized yet. That seems dumb, but let's not leave it broken. This reverts commit c08d7c1cdde6a844338ed4c3645b00bf25843a31. commit c08d7c1cdde6a844338ed4c3645b00bf25843a31 Author: Adam Jackson Date: Tue Jan 23 12:10:52 2018 -0500 xfree86: Remove broken RANDR disabling logic (v3) The only way to get at xf86Info.disableRandR from configuration is Option "RANDR" "foo" in ServerFlags, which probably nobody is using seeing as it's not documented. The other way it could be set is if a screen supports RANDR 1.2, in which case we set it to avoid trying to use the RANDR 1.1 compat code. If the second screen is not 1.2-aware then this would mean we don't do RANDR setup on the second screen at all, which would almost certainly crash the first time you try to do RANDR operations on the second screen. Fix that all by deletion, and just check whether the screen already has RANDR initialized before installing the stub support. If you want to disable RANDR, use the Extensions section of xorg.conf instead. v2: Also remove a now entirely pointless log message, telling you to ignore a line we will no longer print. v3: Explain the fallback path in InitOutput. (Keith Packard) Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit da8de2a7f6ab52ef52039b0dc9978260232a34a6 Author: Olivier Fourdan Date: Thu Sep 7 17:43:16 2017 +0200 xwayland: Add optional xdg-output support The xdg-output protocol aims at describing outputs in way which is more in line with the concept of an output on desktop oriented systems. For now it just features the position and logical size which describe the output position and size in the global compositor space. This is however much useful for Xwayland to advertise the output size and position to X11 clients which need this to configure their surfaces in the global compositor space as the compositor may apply a different scale from what is advertised by the output scaling property (to achieve fractional scaling, for example). This was added in wayland-protocols 1.10. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 75408f53d4e203e462b2f13ea4b06264f0e59ad2 Author: Michel Dänzer Date: Wed Jan 24 12:28:38 2018 +0100 xf86XvMCScreenInit: Clear pScreenPriv->dixinfo when freeing pAdapt Fixes double-free later in xf86XvMCCloseScreen, which would generally cause fireworks. Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit 76732f498f1e73fb081841a04faf068660f3d5c7 Author: Michel Dänzer Date: Wed Jan 24 11:40:50 2018 +0100 Revert "present: Only send PresentCompleteNotify events to the presenting client" This reverts commit 5c00e693631475679c1c2504e03177652ec7de28. It broke the Gallium nine state tracker, which makes PresentPixmap requests on one display connection and processes the corresponding events on another one. The issue that motivated this change is prevented on the client side by https://cgit.freedesktop.org/mesa/mesa/commit/?id=7b0e8264dd21ae05521d08d41fecd84139401fef Bugzilla: https://bugs.freedesktop.org/104678 commit f704620e5db8305c54c6b6981657d801dbf6849b Author: Adam Jackson Date: Wed Jan 10 13:05:43 2018 -0500 glx: Move provider setup interface to glx_extinit.h Keeps us from needing to add glx/ to the include path everywhere, since we can't add it to the dix include path because the header file names conflict with glxproxy. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit c2b2f06aa03fe738301ebaa82f220d9cfed5ab1a Author: Adam Jackson Date: Wed Jan 10 13:05:42 2018 -0500 miinitext: General cleanup (v2) This really just wants to be the list of disable booleans and initialization functions, and nothing else. Stop including the protocol headers from extinit.h, remove a stray mention of xgl, and move an XInput declaration to a better place. v2: A bunch of drivers assume they'll get the DPMS tokens implicitly, so add it to globals.h. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 4d5aab66c052795c7f0381a3dfc7293c9a41e441 Author: Keith Packard Date: Thu Dec 21 18:54:39 2017 -0800 xfree86: Disable cursor whenever turning off CRTC during modeset This makes sure the CRTC's cursor is hidden before we hand the CRTC over to some other application. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer Reviewed-by: Alex Deucher commit 29f79bedf2c80241ba4b482db6ead08a5709a982 Author: Keith Packard Date: Thu Dec 21 18:54:37 2017 -0800 randr: Declare incoming property values const RRChangeOutputProperty and RRConfigureOutputProperty should not modify their parameters, and callers may want to pass pointers to fixed data, so declare the value pointers as const in both cases. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit a12485ed846b852ca14d17d1e58c8b0f2399e577 Author: Keith Packard Date: Thu Dec 21 18:54:34 2017 -0800 xf86-video-modesetting: Update property values at detect and uevent time We were updating the link-status property when a uevent came in, but we also want to update the non-desktop property, and potentially others as well. We also want to check at detect time in case we don't get a hotplug event. This patch updates every property provided by the kernel, sending changes to DIX so it can track things as well. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 44d5f2eb8a2f92571698adec39ac569b71da5a1b Author: Keith Packard Date: Thu Dec 21 18:54:33 2017 -0800 xf86-video-modesetting: Support new vblank kernel API [v2] drmCrtcGetSequence returns the current vblank sequence and time. drmCrtcQueueSequence queues an event for delivery at a specified vblank sequence. Use these (when available) in preference to drmWaitVBlank. v2: Remove FIRST_PIXEL_OUT_FLAG. This has been removed from the kernel API. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 627dfc2f836a3a1fc6afbd3f2335f88f5ca55ffd Author: Adam Jackson Date: Mon Jan 22 15:43:05 2018 -0500 automake: Fix 'make distcheck' Add some missing meson.builds to the distball, and update the meson build test to work when the distcheck srcdir != builddir. The test build directory will be $(srcdir)/_distcheck_build so srcdir will need to be writable; this shouldn't be too much to ask I hope. Signed-off-by: Adam Jackson commit 2d29daf4c69385513a322002570ec2c41cfc838f Author: Jon Turney Date: Thu Jan 18 16:18:12 2018 +0000 meson.build: Fix hw/xwin build when dependencies are installed in a non-default location Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit 514d2c243e01b114de304ea72226bbf8772b1b11 Author: Jon Turney Date: Wed Jan 17 13:43:47 2018 +0000 meson: Use and prefer tirpc for Secure RPC authentication Reviewed-by: Adam Jackson commit f72587ecc7e1dedfb20a999a0e600b83c06a1b29 Author: Pekka Paalanen Date: Wed Dec 20 13:18:45 2017 +0200 xwayland: reduce over-damage If an X11 app draws a little here, some there, and a tiny bit in the opposite corner, using RegionExtents for the damage to be sent to the Wayland compositor will cause massive over-damaging. However, we cannot blindly send an arbitrary number of damage rectangles, because there is a risk of overflowing the Wayland connection. If that happens, it triggers an abort in libwayland-client. Try to be more accurate with the damage by sending up to 256 rectangles per window, and fall back to extents otherwise. The number is completely arbitrary. Signed-off-by: Pekka Paalanen Reviewed-by: Daniel Stone commit a5e9bcad7ad0887f804905b482894b85751519fb Author: Martin Wilck Date: Tue Jan 9 20:33:09 2018 +0100 xfree86: add default modes for 16:9 and 16:10 Improve the user experience for users with wide screens by adding standard 16:9 and 16:10 modes to extramodes, as suggested previously (https://lists.x.org/archives/xorg-devel/2016-February/048866.html). Tested successfully on my laptop. Feedback welcome. See also https://bugs.freedesktop.org/show_bug.cgi?id=37858. Signed-off-by: Martin Wilck Reviewed-by: Adam Jackson commit 528cf6fcee1839cb829652a49c1b1bf45d6a37fb Author: David Weinehall Date: Thu Jan 18 15:12:46 2018 +0200 sync: Fix diffgreater comparison xsync: Fix diffgreater comparison While transitioning from CARD64 to int64, the GreaterThan call was mistakenly transformed into ">=". Part of this was fixed already in commit 8060196a3e80a3c0ad2c0abbe459416821cd366c This patch fixes the remaining issue. Signed-off-by: David Weinehall Reviewed-by: Keith Packard commit 32b42627217917337553121191e9bc3b423b8d99 Author: Keith Packard Date: Tue Jan 16 11:44:37 2018 -0800 modesetting: Use seq instead of msc in ms_queue_vblank failure path When the call to queue a vblank event fails, we need to clean up by removing the user-space queue entry. That is indexed by the local sequence number, not by the kernel vblank count. The call in this case was just passing the wrong value. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 15d91df47424127b9e8d0d73692e2196c79dd3fe Author: Adam Jackson Date: Wed Jan 10 12:07:41 2018 -0500 x86emu: Teach the debug code about varargs With -Wformat-nonliteral and a debug build you'd get yelled at here: ../hw/xfree86/x86emu/x86emu/debug.h:188:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] To fix this, rewrite the printf code to actually use varargs and the appropriate format attribute. All callers of DECODE_PRINTF() pass a string with no % specifiers, so we pass that as the argument to printf("%s"). For DECODE_PRINTF2() we just pass the args through. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 1274015186a8457c38c3b5dcc9965c62f1d2a7a6 Author: Adam Jackson Date: Mon Jan 8 15:50:29 2018 -0500 build: Remove <*dbm.h> checks Formerly used by the rgb database code, which hasn't been a thing in over a decade. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c3fbe2bbff19c67179f52b8dcd27b576a958fde7 Author: Adam Jackson Date: Mon Jan 8 15:50:28 2018 -0500 meson: Enable SUN-DES-1 auth code Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 4d82a150b2ee29c1025408cdb9ece255452a81bd Author: Adam Jackson Date: Tue Jan 9 11:48:10 2018 -0500 animcur: Handle allocation failure for the animation timer Signed-off-by: Adam Jackson Reviewed-by: Aaron Plattner Tested-by: Aaron Plattner commit de60245e05c0d2528d4ff42557a044387e53315c Author: Adam Jackson Date: Tue Jan 9 10:54:05 2018 -0500 animcur: Fix transitions between animated cursors We weren't cancelling the old timer when changing cursors, making things go all crashy. Logically we could always cancel the timer first, but then we'd have to call TimerSet to re-arm ourselves, and GetTimeInMillis is potentially expensive. Reported-by: https://devtalk.nvidia.com/default/topic/1028172/linux/titan-v-ubuntu-16-04lts-and-387-34-driver-crashes-badly/post/5230967/#5230967 Signed-off-by: Adam Jackson Reviewed-by: Aaron Plattner Tested-by: Aaron Plattner commit a09fbe6c82efc674fc3790c7ffad7df70866a7df Author: Adam Jackson Date: Wed Dec 13 11:44:38 2017 -0500 glx: Stop printing messages about what GLX extensions we enable glxinfo already exists, use it. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov commit 4ed8d5c9463cbef0693d98eb9faf7f9c2222c383 Author: Adam Jackson Date: Tue Nov 14 15:33:54 2017 -0500 ddc: Port some paranoia from drm_edid.c Avoid adding a "standard" mode timing if we've already got a matching detailed timing. To help with that, parse CEA blocks for detailed timings before doing standard or established timings. Signed-off-by: Adam Jackson commit 652913cd9474946bcb29271602bacfd98f46ad0b Author: Adam Jackson Date: Wed Dec 13 14:53:56 2017 -0500 os: Fix a type error in the IPv6 XDMCP code Building with strict-aliasing rightly chirps here: ../os/xdmcp.c: In function ‘XdmcpRegisterConnection’: ../os/xdmcp.c:489:31: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] &((struct sockaddr_in6 *) &address)->sin6_addr.s6_addr[12]; ^~~~~~~~~~~~ We have "const char *address", so &address here is a char ** (i.e., it points to the slot on the stack containing the pointer to the character array passed in as an argument). Casting that to a struct sockaddr_in6 * is wrong, because it means that area of the stack will be reinterpreted as a struct sockaddr_in6. Instead, cast address, not &address. Signed-off-by: Adam Jackson commit da4ffb2f6a0b5a039ae1362ae71e9b47441f90d2 Author: Jon Turney Date: Fri Dec 22 18:44:01 2017 +0000 meson: Correct the option for disabled int10 from 'disabled' to 'false' Fix meson_option.txt to align with the check of the int10 option against 'disabled', not 'false' in hw/xfree/meson.build, to see if it shouldn't be built at all. This keeps everything consistent that 'false' always turns things off. Not noticed before as options weren't validated against choices until meson 0.43 Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit c601c8faf54ff9e3bcbc653421828d71042deef7 Author: Helmut Grohne Date: Thu Dec 21 11:48:15 2017 +0100 build: guess availability of monotonic clock for cross compilation When cross compiling, the value of MONOTONIC_CLOCK would be "cross compiling", because AC_RUN_IFELSE doesn't work. However when enabling wayland, a monotonic clock is required and configure aborts. We change detection of CLOCK_MONOTONIC to degrade it gracefully from a run check to a declaration check in case of cross compilation based on the assumption that most systems will have a monotonic clock and those that don't won't be able to run Xwayland anyway. The trade-off essentially is either "always fail cross compilation" or "produce an unusable Xwayland for unusual platform" and this commit switches to the latter. Signed-off-by: Helmut Grohne Bug-Debian: https://bugs.debian.org/882531 Reviewed-by: Adam Jackson commit a309323328d9d6e0bf5d9ea1d75920e53b9beef3 Author: Peter Hutterer Date: Fri Jan 5 11:58:42 2018 +1000 config: fix NULL value detection for ID_INPUT being unset Erroneous condition caused us to keep going with all devices that didn't have ID_INPUT set. Fixes: 5aad81445c8c3d6 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104382 Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit dbfbe58b94ec07a45fd6170f96bffec55051724e Author: Corentin Rossignon Date: Thu Jan 4 08:34:01 2018 +0100 glamor: Specify GLSL version for xv shader SAMPLE is a GLSL keyword in newer OpenGL version. This fix issue with gnome-shell and playing video using xv Signed-off-by: Corentin Rossignon Bugzilla: https://bugs.freedesktop.org/104405 Reviewed-by: Adam Jackson commit ab54bc295cd05281e55bd4d9c37216c0a929fc83 Author: Adam Jackson Date: Thu Oct 26 15:33:14 2017 -0400 animcur: Stop tracking the last display time in the SpriteInfoRec Reviewed-by: Robert Morell Tested-by: Robert Morell Signed-off-by: Adam Jackson commit 094a63d56fbfb9e23210cc9ac538fb198af37cee Author: Adam Jackson Date: Thu Oct 26 15:24:39 2017 -0400 animcur: Run the timer from the device, not the screen This is very slightly more efficient since the callback now doesn't need to walk every input device, instead we know exactly which device's cursor is being updated. AnimCurTimerNotify() gets outdented nicely as a result. A more important side effect is that we can stop using the TimerAbsolute mode and just pass in the relative delay. In AnimCurSetCursorPosition, we no longer need to rearm the timer with the new screen; it is enough to update the device's state. In AnimCurDisplayCursor we need to notice when we're switching from animated cursor to regular and cancel the existing timer. Reviewed-by: Robert Morell Tested-by: Robert Morell Signed-off-by: Adam Jackson commit cc3241a712684f8c7147f5688e9ee3ecb5a93b87 Author: Adam Jackson Date: Thu Oct 26 13:53:06 2017 -0400 animcur: Return the next interval directly from the timer callback If the return value is non-zero here, DoTimer() will automatically rearm the timer for the new (relative) delay. 'soonest' is in absolute time, so subtract off 'now' and return that. Reviewed-by: Robert Morell Tested-by: Robert Morell Signed-off-by: Adam Jackson commit 3abbdb7318018584a27220737bd92081ce8ee67c Author: Adam Jackson Date: Thu Oct 26 13:40:57 2017 -0400 animcur: Use fixed-size screen private Reviewed-by: Robert Morell Tested-by: Robert Morell Signed-off-by: Adam Jackson commit f615cb62d47cb24ea31718e8226df53ce6651c91 Author: Lukáš Krejčí Date: Sat Dec 30 23:46:45 2017 +0100 Xorg.wrap: Ensure correct ordering of post-install hook The install rule of Xorg.wrap is currently a dependency of the install-data target instead of the install-exec target. The build also uses install-exec-hook to change the ownership and set the SUID bit on the Xorg.wrap binary. The problem is that install-exec-hook is only ordered respective to the install-exec target, the rules of install-data may or may not have been executed. If install-exec-hook runs before the Xorg.wrap binary is in place, a message similar to the following will be present in the build log: chown: cannot access '/pkgdir/usr/lib/xorg-server/Xorg.wrap': No such file or directory make[6]: [Makefile:1151: install-exec-hook] Error 1 (ignored) All that needs to be done is to change the name of the program variable to contain 'exec' for the install rule to depend on the install-exec target. Excerpt from the Automake manual, chapter 12.2 The Two Parts of Install: "Any variable using a user-defined directory prefix with ‘exec’ in the name (e.g., myexecbin_PROGRAMS) is installed by install-exec. All other user-defined prefixes are installed by install-data." https://bugs.freedesktop.org/show_bug.cgi?id=104419 Signed-off-by: Lukáš Krejčí Acked-by: Hans de Goede Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 170c95978530f6373bdf4488116902b273f3abf4 Author: Olivier Fourdan Date: Fri Dec 15 16:43:47 2017 +0100 xwayland: avoid race condition on new keymap When the Wayland compositor notifies of a new keymap, for the first X11 client using the keyboard, the last slave keyboard used might still not be set (i.e. “lastSlave” is still NULL). As a result, the new keymap is not applied, and the first X11 window will have the wrong keymap set initially. Apply the new keymap to the master keyboard as long as there's one. Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=791383 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c72049530503ebde493cfcd22156105557ea18d3 Author: Konstantin Kharlamov Date: Sun Dec 17 23:23:02 2017 +0300 modesetting: simplify bailing on calloc fail The "done" label restores crtc-> {x,y,rotation,mode}, frees output_id. Doing the calloc() before writing to those values frees us from necessity to restore them if calloc fails, and allows to merge "if (mode)" block. Signed-off-by: Konstantin Kharlamov Signed-off-by: Peter Hutterer commit c2954b16c8730c7ed8441fd8dba25900f3aed265 Author: Tapani Pälli Date: Tue Nov 28 09:23:29 2017 +0200 glx: do not pick sRGB config for 32-bit RGBA visual This fixes blending issues seen with kwin and gnome-shell when 32bit visual has sRGB capability set. Reviewed-by: Adam Jackson Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103699 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103646 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103655 commit cf7517675d988c2d1ff967d6d162a17acbdad466 Author: Keith Packard Date: Wed Aug 2 21:34:52 2017 -0700 xfree86: Hold input_lock across SPRITE functions in VGA arbiter Avoid scrambling the sprite functions wrapper. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101995 Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 3265d0c81f7a501258fa91e49fcc137714b4af5e Author: Jon Turney Date: Tue Oct 10 13:43:40 2017 +0100 meson: Add dependency on generated code fragments in hw/xwin/glx/ Somehow I'd managed to write this with this dependency missing, so this only works correctly when the generated files already exist and the correct automatic dependencies generated, but fails on a clean build. Including generated files with a .c extension into the sources for a target causes meson to want to compile them (and it seems to be hard to say "make the directory containing this generated file available to include"). So, change the extension of included generated C fragments to .ic Update the autotools build to align. Signed-off-by: Jon Turney commit edda951fa5145a50915611ee0e9e459074117700 Author: Peter Harris Date: Thu Oct 12 16:48:37 2017 -0400 os: Add epoll-like port implementation for Solaris x11perf -noop with 200 xlogos connected is slightly faster with ports: before after Operation ---------- ----------------- -------------------- 18400000.0 19200000.0 (1.04) X protocol NoOperation Acked-by: Keith Packard Signed-off-by: Peter Harris commit 83c04ee6eae1edc80528203fb515425108171cd8 Author: Peter Harris Date: Thu Oct 12 16:48:36 2017 -0400 os: Add epoll-like pollset implementation for AIX AIX's poll only allows FD_SETSIZE entries in the fd list, which is insufficient for expanded MaxClients. As a bonus, x11perf -noop with ~250 xlogos connected is slightly faster with pollset: before after Operation --------- ---------------- -------------------- 5750000.0 5990000.0 (1.04) X protocol NoOperation Signed-off-by: Peter Harris Acked-by: Keith Packard commit bed28300999a07514d741abe5c748adf234e18a6 Author: Adam Jackson Date: Mon Nov 20 15:43:07 2017 -0500 kdrive: remove KdSignalWrapper etc. This no longer does anything useful. Signed-off-by: Adam Jackson Reviewed-by: Olivier Fourdan Reviewed-by: Dave Airlie commit 4353d83f60766824a65f183716616eee8e17bb24 Author: Adam Jackson Date: Mon Nov 20 15:43:06 2017 -0500 xfree86: remove xf86CaughtSignal etc. This no longer does anything useful. Signed-off-by: Adam Jackson Reviewed-by: Olivier Fourdan Reviewed-by: Dave Airlie commit 9c72887939f319e185d2726d9d9a4191b9d12efd Author: Adam Jackson Date: Mon Nov 20 15:43:05 2017 -0500 os: Make OsSignalHandler ask for core dumps for signo != SIGQUIT SIGQUIT is a normal termination request, but any other signal we handle here wants a core. This has the effect of making FatalError's call to AbortServer trigger the if (CoreDump) OsAbort(); path. This will allow us to remove some DDX code that has the same net effect. Signed-off-by: Adam Jackson Reviewed-by: Olivier Fourdan Reviewed-by: Dave Airlie commit 0a255dceb79ee28a88667d5bd23cf989dbf9bed8 Author: Adam Jackson Date: Mon Nov 20 15:43:04 2017 -0500 xfree86: Remove xf86InterceptSignals The only consumer of this is the Linux vm86 backend for int10 (which you should not use), and there all it serves to do is make signals generated by the vm86 task non-fatal. In practice this error appears never to happen, and marching ahead with root privileges after arbitrary code has raised a signal seems like a poor plan. Remove the usage in the vm86 code, making this error fatal. Signed-off-by: Adam Jackson Reviewed-by: Olivier Fourdan Reviewed-by: Dave Airlie commit 722c8035dcf3ae0b18841066fe4ee030277274bc Author: Adam Jackson Date: Mon Nov 20 15:43:03 2017 -0500 xfree86: Remove xf86InterceptSigIll This was added in ~2004 for the sis driver, to detect whether it could use SSE for memcpy. Charmingly, the code to check whether that feature exists in the server is: #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,13,0) #define SISCHECKOSSSE /* Automatic check OS for SSE; requires SigIll facility */ #endif Which means it has never worked in any modular server release. A less gross way to do this is to check for SSE support with getauxval() or /proc/cpuinfo or similar. Since no driver is using the existing intercept mechanism, drop it. Signed-off-by: Adam Jackson Reviewed-by: Olivier Fourdan Reviewed-by: Dave Airlie commit fe46cbea0f19959d469ca4d1f09be379dc7b1e45 Author: Olivier Fourdan Date: Tue Nov 21 14:45:13 2017 +0100 xwayland: Give up “cleanly“ on Wayland socket errors Xwayland is a pretty standard Wayland client, we want to be able to capture core dumps on crashes. Yet using "-core" causes any FatalError() to generate a core dump, meaning that we would get a core file for all Wayland server crashes, which would generate a lot of false positives. Instead of using FatalError() on Wayland socket errors, give up cleanly to avoid dumping core files when "-core" is used. See also: https://bugzilla.gnome.org/show_bug.cgi?id=790502 and: https://bugzilla.gnome.org/show_bug.cgi?id=789086 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 6883ae43eb72fe4e2651c1dca209563323fad2db Author: Tomasz Śniatowski Date: Wed Dec 6 12:16:17 2017 +0100 os: Fix strtok/free crash in ComputeLocalClient Don't reuse cmd for strtok output to ensure the proper pointer is freed afterwards. The code incorrectly assumed the pointer returned by strtok(cmd, ":") would always point to cmd. However, strtok(str, sep) != str if str begins with sep. This caused an invalid-free crash when running a program under X with a name beginning with a colon. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=104123 Signed-off-by: Tomasz Śniatowski Reviewed-by: Michel Dänzer commit aa6651f83c698e8cc40de61aad36c73ca7a6adcf Author: Adam Jackson Date: Thu Jun 8 16:23:12 2017 -0400 xfixes: Remove the CursorCurrent array We're not wrapping all the ways a cursor can be destroyed, so this array ends up with stale data. Rather than try harder to wrap more code paths, just look up the cursor when we need it. Signed-off-by: Adam Jackson commit 3db7707df3cfd8ba62c10d08c7c731ec18ea8ddf Author: Adam Jackson Date: Wed Dec 6 15:12:20 2017 -0500 test: Fix build dependency for bigreq test libxcb-xinput isn't a thing in whichever Ubuntu it is that Travis is using. The test is already optional, make it more so. Signed-off-by: Adam Jackson commit 9f7a9be13d6449c00c86d3035374f4f543654b3f Author: Olivier Fourdan Date: Tue Dec 5 09:59:06 2017 +0100 dix: avoid deferencing NULL PtrCtrl PtrCtrl really makes sense for relative pointing device only, absolute devices such as touch devices do not have any PtrCtrl set. In some cases, if the client issues a XGetPointerControl() immediatlely after a ChangeMasterDeviceClasses() copied the touch device to the VCP, a NULL pointer dereference will occur leading to a crash of Xwayland. Check whether the PtrCtrl is not NULL in ProcGetPointerControl() and return the default control values otherwise, to avoid the NULL pointer dereference. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1519533 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 60f4646ae10f0b57790fce46682baa531512b53e Author: Carlos Garnacho Date: Mon Dec 4 16:55:13 2017 +0100 xwayland: Keep separate variables for pointer and tablet foci The tablet/stylus interfaces reused xwl_seat->focus_window, which would leave a somewhat inconsistent state of that variable for wl_pointer purposes (basically, everything) if the pointer happened to lay on the same surface than the stylus while proximity_out happens. We just want the stylus xwl_window to correctly determine we have stylus focus, and to correctly translate surface-local coordinates to root coordinates, this can be done using a different variable. Signed-off-by: Carlos Garnacho Acked-by: Jason Gerecke Tested-by: Olivier Fourdan commit 97ac59b1ed3624f7c04e54dd3e3dadfa46a8f170 Author: Olivier Fourdan Date: Wed Sep 27 18:01:01 2017 +0200 xwayland: Fix non-argb cursor conversion From the bug: "What happens if bits->width is less than 8? :)" Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=103012 Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov Reviewed-by: Daniel Stone commit a4c1e290824d0e40191ad26019b705f61c11e113 Author: Adam Jackson Date: Tue Nov 14 15:15:03 2017 -0500 glx: Implement GLX_EXT_no_config_context (v2) Only enabled for the DRI backends at the moment. In principle WGL/CGL could support this - it's sort of implied by GL 3.0 support - but in practice their implementations back GLX drawables with native drawables (and not anonymous FBOs), so they would need either a corresponding window system binding extension or significant implementation work. v2: Require that the two screen numbers match, per v4 of spec. Khronos: https://github.com/KhronosGroup/OpenGL-Registry/pull/102 Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit f0fffa926a5771e0e604fe9a48178b0514ca5d41 Author: Adam Jackson Date: Tue Nov 14 15:15:02 2017 -0500 glx: Prepare __glXGetDrawable for no-config contexts Any proper (GLX 1.3) drawable will already have a bound config, but if we're doing the GLX 1.2 thing of making a Window current, we need to infer the config from the window's Visual. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 5d667df6ea1634191a26f9a7c26bc883701d62b0 Author: Adam Jackson Date: Tue Nov 14 15:15:01 2017 -0500 glx: Fix glXQueryContext for GLX_FBCONFIG_ID and GLX_RENDER_TYPE (v2) Just never filled in, oops. Seems to have gone unnoticed because normally glXQueryContext simply returns the values filled in by the client library when the context was created. The only path by which you normally get to a GLXQueryContext request is glXImportContext, and then only if the context is already indirect. However, that's a statement about Mesa's libGL (and anything else that inherited that bit of the SGI SI more or less intact). Nothing prevents a mischeivous client from issuing that request of a direct context, and if they did we'd be in trouble because we never bothered to preserve the associated fbconfig in the context state, so we'd crash looking up GLX_VISUAL_ID_EXT. So let's fix that too. v2: Fixed missing preservation of the config in DRI2 (Eric Anholt) Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 78b2ce1410dda758537d52398223ca9b757883bc Author: Daniel Martin Date: Mon Nov 20 10:47:43 2017 +0100 modesetting: Remove #if 0 CMAP_LOAD_EVEN_IF_OFFSCREEN CMAP_LOAD_EVEN_IF_OFFSCREEN has been encapsulated since the import of xf86-video-modesetting into the tree. Reviewed-by: Adam Jackson Signed-off-by: Daniel Martin commit d563443381142fbc0b102422d7e7389bf3621331 Author: Daniel Martin Date: Mon Nov 20 10:47:42 2017 +0100 modesetting: Remove unused define DRV_ERROR Reviewed-by: Adam Jackson Signed-off-by: Daniel Martin commit 6804875662363764683a86c1614e4cf3cc70a20a Author: Daniel Martin Date: Mon Nov 20 10:47:41 2017 +0100 modesetting: Reset output_id if drmModeGetConnector failed If drmModeGetConnector() fails in drmmode_output_detect(), we have to reset the output_id to -1 too. Yet another spot leading to a potential NULL dereference when handling the mode_output member as output_id was != -1. Though, this case should be very hard to hit. Reviewed-by: Adam Jackson Signed-off-by: Daniel Martin commit e20b1016de22e893d5468960988ddd5677c11d98 Author: Daniel Martin Date: Mon Nov 20 10:47:40 2017 +0100 modesetting: Fix log msg if pixmap creation failed Add a missing new-line character and make the message more verbose than "Failed". Reviewed-by: Adam Jackson Signed-off-by: Daniel Martin commit 02981fe1a844e101c81037df79fc147f217f3bf9 Author: Daniel Martin Date: Mon Nov 20 10:47:39 2017 +0100 xfree86: Fix set but not used warnings in lnx_platform Those warnings are generated, when building without systemd support: ../hw/xfree86/os-support/linux/lnx_platform.c: In function ‘get_drm_info’: ../hw/xfree86/os-support/linux/lnx_platform.c:29:16: warning: variable ‘minor’ set but not used [-Wunused-but-set-variable] int major, minor, fd; ^~~~~ ../hw/xfree86/os-support/linux/lnx_platform.c:29:9: warning: variable ‘major’ set but not used [-Wunused-but-set-variable] int major, minor, fd; ^~~~~ In this case the functions are macros, which don't use theese arguments. v2: Add comments, why the warnings appear. Suggested by Emil Velikov Reviewed-by: Emil Velikov Signed-off-by: Daniel Martin commit 918afeecbc63d70413e222efdb2ac4cfb16eae9e Author: Daniel Martin Date: Mon Nov 20 10:47:38 2017 +0100 os/xdmcp: Honour -once when session is dead Terminate a dead session when -once was passed. Don't restart it. Signed-off-by: Daniel Martin Reviewed-by: Walter Harms commit 559954aaa8d811a22cf918cc16a7d618e12201a0 Author: Michel Dänzer Date: Mon Oct 2 11:33:43 2017 +0200 present: Only send PresentCompleteNotify events to the presenting client We were sending the events to all clients listening for them on the window. But clients can get confused by events from another client, and I can't imagine any case where receiving events from other clients would be required. v2: * Also restrict events sent to additional windows to the presenting client * Don't shorten line lengths Reviewed-by: Keith Packard commit fc7fb5bbe1c8f787e53500b9a2ca4af815f310d1 Author: Giuseppe Bilotta Date: Thu Nov 9 10:21:21 2017 +0100 randr: free crtc->outputs on destroy Reviewed-by: Adam Jackson Signed-off-by: Giuseppe Bilotta commit 16381d186e7c791031392ed8afcfd33009854e9e Author: Giuseppe Bilotta Date: Thu Nov 9 10:21:20 2017 +0100 randr: always realloc crtcs and outputs When the last crtc (resp. output) is destroyed, the rrScrPriv crtcs (resp. outputs) fields do not get cleared, which can lead to a situation where the private's numCrtcs (resp. numOutputs) field is zero, but the associated memory is still allocated. Just checking if numCrtcs (resp. numOutputs) is zero is thus not a good criteria to determine whetehr to use a realloc or a malloc. Since crtcs (resp. outputs) are NULL-initialized anyway, relying on numCrtcs (resp. numOutputs) is actually unnecessary, because reallocation of a NULL ptr is equivalent to a malloc anyway. Therefore, just use realloc() unconditionally, and ensure that the fields are properly initialized. Reviewed-by: Adam Jackson Signed-off-by: Giuseppe Bilotta commit fb5ee77b91a93e27801006be8ee34d27984e7fa6 Author: Giuseppe Bilotta Date: Thu Nov 9 10:21:19 2017 +0100 randr: rrGetScreenResources: initialize memory Similarly to bb766ef11227bd8c71ac65845d1930edd0eda40d, ensure that the extra padding is set to 0. Reviewed-by: Adam Jackson Signed-off-by: Giuseppe Bilotta commit 307c124d6bcfe26057767b2c0990dc9ac66b9c93 Author: Adam Jackson Date: Tue Nov 14 15:59:35 2017 -0500 glx: Only flush indirect contexts in MakeCurrent (v2) If the context is direct none of the GL commands were issued by this process, the server couldn't flush them even if it wanted to. v2: Fix embarassingly obvious boolean inversion (Michel Dänzer) Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer commit 66e8eaa456a0f200c0649c56a2e34914daa88065 Author: Adam Jackson Date: Thu Nov 2 16:10:50 2017 -0400 glamor: Drop the non-VAO rendering path GLES spells this extension as GL_OES_vertex_array_object, but it is functionally equivalent to the GL_ARB version. Mesa has supported both since 9.0, let's go ahead and require it. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit dbda03d5d15bec8fdff64bc8545875c39da81777 Author: Adam Jackson Date: Mon Nov 6 16:41:14 2017 -0500 glx: Drop references to This header is a truly ancient remnant of the SGI SI code, which used the same struct for visual/fbconfig state on both sides of the wire. We're not using this struct ourselves so let's stop depending on the header. Signed-off-by: Adam Jackson commit eafcd009f1fe3e554219a428237ef1c71d1ba506 Author: Adam Jackson Date: Tue Oct 24 14:33:19 2017 -0400 xres: Return the atom naming the type, not its internal type number Signed-off-by: Adam Jackson commit 68556d74b49e99d3490166c446079f7d5de26ca4 Author: Hector Martin Date: Wed Nov 15 03:12:31 2017 +0900 edid: fix off-by-one error in CEA mode numbering The CEA extension short video descriptors contain the VIC, which starts at 1, not 0. Reviewed-by: Adam Jackson Signed-off-by: Hector Martin commit 9bd5a198dc5383d0d2a1e28f7aa4270132eca5db Author: Adam Jackson Date: Tue Jul 11 15:37:07 2017 -0400 glamor: Remove unused glamor_create_screen_resources Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 081675f7ffda0cce20b395874d6e5755fb6600a0 Author: Adam Jackson Date: Fri Jul 14 14:52:01 2017 -0400 glamor: Un-inline glamor_[gs]et_screen_private text data bss dec hex filename 2134764 45210 128704 2308678 233a46 build/hw/kdrive/ephyr/Xephyr.before 2129972 45210 128704 2303886 23278e build/hw/kdrive/ephyr/Xephyr.after Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 6dff5e5d49a21bc749e44f0e8cb390690ece750d Author: Adam Jackson Date: Mon Jul 10 10:56:58 2017 -0400 xwayland: Stop printing the EGL version It doesn't matter, none of this matters. Acked-by: Olivier Fourdan Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit c57f63829f0077b5a3e5968f8405e087a4490485 Author: Adam Jackson Date: Wed Sep 13 15:44:15 2017 -0400 dmx: Use noGlxExtension like other DDXes Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit fd0eafb18426da14601d5c0d0a50092c49a7aff8 Author: Adam Jackson Date: Mon Nov 6 16:07:41 2017 -0500 glx: Fix typos that break GLX_ARB_context_flush_control The trailing \n are just wrong here, __glXEnableExtension wants a string without them. Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer Reviewed-by: Emil Velikov commit 2e7f790b5770589ae2f97ee363ecd33fdb362c24 Author: Adam Jackson Date: Mon Nov 6 15:25:34 2017 -0500 dix: Remove ffs.c Your libc has ffs, I promise. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 4d15a2645f00995618d8687edf1fb0f4b2316ace Author: Adam Jackson Date: Mon Nov 6 15:25:33 2017 -0500 os: Remove mffs() This was always wide enough to work on an fd_mask ("mask" ffs presumably). We don't operate on fd_masks anymore, so this can go. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 4b0a3cbab131eb453e2b3fc0337121969258a7be Author: Giuseppe Bilotta Date: Sat Nov 4 23:06:31 2017 +0100 glx: free fbconfigs on destroy Reviewed-by: Eric Engestrom Signed-off-by: Giuseppe Bilotta commit bb766ef11227bd8c71ac65845d1930edd0eda40d Author: Giuseppe Bilotta Date: Sat Nov 4 23:06:29 2017 +0100 randr: ProcRRGetOutputInfo: initialize memory Running Xephyr under valgrind reveals that we're sending some uninitialized memory over the wire (particularly, the leftover padding that comes from rounding extraLen to the next 32-bit multiple). Solve by calloc()ing the memory instead of malloc()ing (the alternative would be to memset just the padding, but I'm not sure it's more convenient.) Signed-off-by: Giuseppe Bilotta Reviewed-by: Adam Jackson commit 6828645916505a5925db5c2c2e816fee4e1050e5 Author: Giuseppe Bilotta Date: Sat Nov 4 23:06:28 2017 +0100 Xephyr: free driverPrivates on Fini Reviewed-by: Eric Engestrom commit b2167015043a458e9cf93b827b43eb5b7c552ce9 Author: Giuseppe Bilotta Date: Sat Nov 4 23:06:27 2017 +0100 xkb: initialize tsyms This fixes some “Conditional jump depends on uninitialized value(s)” errors spotted by valgrind. Reviewed-by: Eric Engestrom Signed-off-by: Giuseppe Bilotta commit 2dafa1bdafe583587431a5f6ebee6ec371c61a8d Author: Giuseppe Bilotta Date: Thu Nov 2 21:27:59 2017 +0100 dix/window: fix typos Reviewed-by: Adam Jackson commit f84e59a4f474d22860bac8aec2947798a86db69b Author: Thomas Hellstrom Date: Tue Sep 26 17:28:12 2017 -0700 glx: Duplicate relevant fbconfigs for compositing visuals Previously, before GLX_OML_swap_method was fixed, both the X server and client ignored the swapMethod fbconfig value, which meant that, if the dri driver thought it exposed more than one swapMethod, it actually just exported a duplicated set of fbconfigs. When fixing GLX_OML_swap_method and restricting the choice for built-in visuals to a single swap method that meant we didn't have that many fbconfigs to choose from when pairing the compositing visual with an fbconfig, resulting in the fbconfig paired with the compositing visual becoming too restrictive for some applications, (at least for kwin). This problem would also happen if the dri driver only exposed a single swap method to begin with. So, to make sure the compositing visual gets a good enough fbconfig, duplicate fbconfigs that are suitable for compositing visuals and make sure these duplicated fbconfigs can be used only by compositing visuals. For duplicated fbconfigs not paired with a compositing visual, construct new compositing visuals, making compositing clients able to choose visuals / fbconfig more adapted to their needs. This is in some sense equivalent to adding a new "TRUECOLOR_COMPOSITING" GLX visualtype. Fixes: 4486d199bd3b ("glx: Fix visual fbconfig matching with respect to swap method") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102806 Signed-off-by: Thomas Hellstrom Tested-By: Nick Sarnie Tested-by: Fredrik Höglund Reviewed-by: Adam Jackson commit 30f4d440ebc3517fdcc1d3c6a422a8fbf3af1f23 Author: Eric Anholt Date: Tue Oct 31 12:22:31 2017 -0700 xkb: Print the xkbcomp path being executed when we fail to compile. I don't know how many times I've had a broken server due to a bad directory to xkbcomp, and only finding the whole path has shown me where I went wrong. Reviewed-by: Peter Hutterer commit 14af8bee242fe40af0e91c61465d6720aaa60e97 Author: Eric Anholt Date: Mon Oct 9 17:14:32 2017 -0700 test: Add a test for the overflow bug in bigreqs. The failing struct comes from the python test written by Michal Srb . v2: Use a drawable (root window) and gc, so that PolyLines hopefully actually tries processing things. However, the request seems to process successfully so the poll() just stalls out. However, this does let us distinguish between detecting the bigrequests error and not, at least. v3: Clean up the description of what we expect the poll() call to do. v4: Use XI2 instead of PolyLine to trigger a predictable error. We know the server replies with BadValue for a zero num_masks argument. So if we send a bigreq with a num_masks 0 and a length 0, we can just check whether we get killed (good) or a BadValue (bad). It doesn't test for specific memory overflows or crashes, but based on the assumption that we shouldn't look at *any* BigReq of size 0, this seems to be sufficient. Signed-off-by: Eric Anholt Signed-off-by: Peter Hutterer commit 5aad81445c8c3d6b7b30d503cfe26027fa482870 Author: Peter Hutterer Date: Tue Sep 26 15:21:59 2017 +1000 config/udev: consider ID_INPUT_FOO=0 as 'unset' Historically we didn't need to care about this case but more devices are having invalid types set and they cannot be unset with a hwdb entry (which doesn't handle the empty string). Allow for "0" to mean "unset" because anything else would be crazy anyway. Signed-off-by: Peter Hutterer commit d5379b350fb63e42e604361c21ad9832b4c791b9 Author: Daniel Martin Date: Fri Oct 27 16:11:56 2017 +0200 Use ARRAY_SIZE all over the tree Roundhouse kick replacing the various (sizeof(foo)/sizeof(foo[0])) with the ARRAY_SIZE macro from dix.h when possible. A semantic patch for coccinelle has been used first. Additionally, a few macros have been inlined as they had only one or two users. Signed-off-by: Daniel Martin Reviewed-by: Adam Jackson commit 15a32ee5d1fffa171bb05af9a0e5b472e4af1488 Author: Daniel Martin Date: Fri Oct 27 16:11:55 2017 +0200 test: signal-logging: Fix looping signed number tests unsigned_tests[] was used to compute the amount of signed numbers to test. Signed-off-by: Daniel Martin Reviewed-by: Eric Engestrom commit 0bcc65f2bf479c6a74ac70bb5b5181d6834dded6 Author: Daniel Martin Date: Fri Oct 27 16:11:54 2017 +0200 test: input: Fix used uninitialized warning in dix_event_to_core input.c: In function ‘dix_event_to_core’: ../include/inputstr.h:61:55: warning: ‘*((void *)&ev+80)’ is used uninitialized in this function [-Wuninitialized] #define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7))) ^~ Signed-off-by: Daniel Martin Reviewed-by: Eric Engestrom commit 04a305121fbc08ecc2ef345ee7155d6087a43fd1 Author: Daniel Martin Date: Fri Oct 27 16:11:53 2017 +0200 modesetting: Fix potential buffer overflow If one misconfigures a ZaphodHeads value (more than 20 characters without a delimiter), we get an overflow of our buffer. Use xstrtokenize() instead of writing/fixing our own tokenizer. Signed-off-by: Daniel Martin Reviewed-by: Eric Engestrom commit 2230e6c8af92b041821eee0ea6210eda82c74106 Author: Adam Jackson Date: Tue Oct 24 14:28:34 2017 -0400 glamor: Unconditionalize GLAMOR_TEXTURED_LARGE_PIXMAP Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 1edac5c1ceb8b21af45b20397ff64177ad22466c Author: Adam Jackson Date: Tue Oct 24 14:28:33 2017 -0400 glamor: Unconditionalize GLAMOR_PIXMAP_DYNAMIC_UPLOAD Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 13409b91b1936330dbf19bacefa4b48d0b6843b8 Author: Adam Jackson Date: Tue Oct 24 14:28:32 2017 -0400 glamor: Unconditionalize GLAMOR_GRADIENT_SHADER Effectively always true anyway. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 266d9868ca1cf77b7d315d607b515f081a9f45c3 Author: Alex Goins Date: Thu Oct 19 20:02:30 2017 -0700 xf86-video-modesetting: Fix ms_queue_vblank(flags = MS_QUEUE_RELATIVE) Change 677c32bc refactored all usages of drmWaitVBlank() into a helper function, ms_queue_vblank(). ms_queue_vblank() takes in an MS_QUEUE_RELATIVE flag to indicate that the sequence number is relative rather than absolute, but still treats the actual sequence number as absolute, passing it through ms_crtc_msc_to_kernel_msc() unconditionally before calling drmWaitVBlank(). ms_crtc_msc_to_kernel_msc() works by subtracting a vblank offset from the provided sequence number, which only makes sense for absolute sequence numbers. In the case of PRIME Sync, drmmode_SharedPixmapPrsentOnVBlank() passes in 1, which results in a large negative vblank offset. After subtracting, we're left with a relative sequence number of 100,000+, i.e. wait for 100,000+ vblanks... In the relative case we want to pass in the sequence number unmodified. Simply add a check to do this. Signed-off-by: Alex Goins Reviewed-by: Keith Packard commit 68d95e759f8b6ebca6bd52e69e6bc34cc174f8ca Author: Alex Goins Date: Tue Oct 24 18:39:13 2017 -0700 ramdac: Check ScreenPriv != NULL in xf86ScreenSetCursor() Similar to change cba5a10f, xf86ScreenSetCursor() would dereference ScreenPriv without NULL checking it. If Option "SWCursor" is specified, ScreenPriv == NULL. Without this fix, it is observed that setting Option "SWCursor" "on" on the modesetting driver in a PRIME configuration will segfault the server. It is important to return success rather than failure in the instance that ScreenPriv == NULL and pCurs == NullCursor, because otherwise xf86SetCursor() can fall into infinite recursion: xf86SetCursor(pCurs) calls xf86ScreenSetCursor(pCurs), and if FALSE, calls xf86SetCursor(NullCursor). If xf86ScreenSetCursor(NullCursor) returns FALSE, it calls xf86SetCursor(NullCursor) again and this repeats forever. Signed-off-by: Alex Goins Reviewed-by: Dave Airlie commit 04163fe8c66ae6683a1384fd1bd91ea85f9892ee Author: Adam Jackson Date: Tue Oct 24 13:03:09 2017 -0400 meson: Use [ true, false, auto ] for tristate values For symmetry with the boolean options. I really do not want to care whether an option is a tristate if I'm trying to set it explicitly. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit c2c6e9e68a8815420233c996acdd29ba572b1f0e Author: Adam Jackson Date: Tue Oct 24 14:38:13 2017 -0400 dix: Don't track the XKB client versions in the ClientRec XKB stores some stuff in the ClientRec that, style-wise, should probably be in a client private. vMinor tracks the client's idea of the XKB minor version, but is never read, we can just nuke it. vMajor is only used for a bug-compat workaround for X11R6.0-vintage clients. We're only using though (1<<4) for xkbClientFlags in the protocol, so we can pack that field down to a u8 and store the bug-compat flag there. Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau commit bc5fb8c0928498c32dc33680d40d50e6db5879b6 Author: Adam Jackson Date: Tue Oct 24 14:38:12 2017 -0400 dix: Don't vary the ClientRec ABI at build time Just no. Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau commit 0c3ad9d1e06294b4f66717798afa4f5dfa505469 Author: Adam Jackson Date: Mon Oct 23 15:34:26 2017 -0400 travis: Bump linux Dockerfile to v7 for new meson Signed-off-by: Adam Jackson commit 4d53e30651c0fe5f7be38ae8529fa49846d39549 Author: Lyude Paul Date: Mon Oct 23 16:21:19 2017 -0400 meson: Don't use '' in link_with, ever String arguments as elements in the array passed to the link_with argument in meson's executable() functions are not valid and will end up causing the build file generation to file. This actually ended up exposing a bug in meson that caused it not to report where in the meson.build file it was failing: https://github.com/mesonbuild/meson/pull/2527 The proper way to have a variable that can contain either an empty link target or an actual link target is: some_target = [] if some_cond some_target = static_library(...) endif This way if some_cond is False, some_target gets set to [], gets passed to executable() in the link_with array, and then gets removed by array flattening. This also unbreaks Xwayland builds with -Dglx=false, the thing that originally made me notice this. Signed-off-by: Lyude Paul Reviewed-by: Jon Turney commit 5893e72a20ffa5cfcd6d0c7c5c934b92546d76c3 Author: Jon Turney Date: Tue Oct 24 12:07:08 2017 +0100 travis: Fix OSX build Turn off homebrew autoupdating before installing ccache, to avoid: /usr/local/Homebrew/Library/Homebrew/brew.rb:12:in `
': Homebrew must be run under Ruby 2.3! You're running 2.0.0. (RuntimeError) Signed-off-by: Jon Turney Reviewed-by: Adam Jackson commit f44935cdb7321af242ce9f242975f096807b97f7 Author: Daniel Martin Date: Mon Oct 23 10:31:21 2017 +0200 modesetting: Use helper to fetch drmModeProperty(Blob)s Replace the various loops to lookup drmModeProperty(Blob)s by introducing helper functions. Signed-off-by: Daniel Martin commit 6abdb54a11dac4e8854ff94ecdcb90a14321ab31 Author: Daniel Martin Date: Mon Oct 23 10:31:20 2017 +0200 modesetting: Fix leak of tile_blob in drmmode_output_destroy And drmModeFreePropertyBlob() can handle NULL pointers, no need to check edid_blob. Signed-off-by: Daniel Martin commit 8d7f7e24261e68459e6f0a865e243473f65fe7ad Author: Daniel Martin Date: Fri Oct 20 10:05:35 2017 +0200 modesetting: Check crtc before searching link-status property No need to lookup the link-status property if we don't have a crtc. Signed-off-by: Daniel Martin Reviewed-by: Adam Jackson commit 8c455db0ebb6e5313ca81428bb6dd75ef12aaa15 Author: Daniel Martin Date: Fri Oct 20 10:05:34 2017 +0200 modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD XF86_PDEV_SERVER_FD is defined since: commit 5fb641a29bfb4a33da964e1e9af523f3472015c6 Author: Hans de Goede Date: Mon Jan 13 12:03:46 2014 +0100 hotplug: Extend OdevAttributes for server-managed fd support ifdef'ing for it is a leftover from the external xf86-video-modesetting. Signed-off-by: Daniel Martin Reviewed-by: Adam Jackson commit 66d8cbf8ce9285a8771118e46daa44faa73ad847 Author: Daniel Martin Date: Fri Oct 20 10:05:33 2017 +0200 modesetting: Fix warning of unused variable if not GLAMOR_HAS_GBM ../hw/xfree86/drivers/modesetting/driver.c: In function ‘redisplay_dirty’: ../hw/xfree86/drivers/modesetting/driver.c:586:20: warning: unused variable ‘ms’ [-Wunused-variable] modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen)); Move the variable ms into #ifdef GLAMOR_HAS_GBM, where it is used. Signed-off-by: Daniel Martin Reviewed-by: Adam Jackson commit 6d7e1d1de06336c9b49a253810afda8ac4e9f7b2 Author: Lyude Paul Date: Fri Oct 13 15:44:32 2017 -0400 meson: Don't forget to define DEBUG! Changes since v2: - Don't enable by default for debugoptimized builds Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit 0debe011901b87f686e2a76ce5edc150b04bf9d1 Author: Lyude Paul Date: Fri Oct 13 15:44:31 2017 -0400 meson: Silence -Wformat-nonliteral for x86emu Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit cbca18c5516084ee540255df52e116209f1c1cbe Author: Lyude Paul Date: Fri Oct 13 15:44:30 2017 -0400 x86emu: Fix type conversion warnings on x86_64 with DEBUG Warnings come from the fact that PRIx32 is not used for printing 32 bit values instead of "%lx", and "%lx" evaluates to a 64 bit long on 64 bit systems while PRIx32 always evaluates to the right type for the respective arch. Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit 01470ce0a9628abc8af4fe7b960f0d1eced8cd46 Author: Lyude Paul Date: Fri Oct 13 15:44:29 2017 -0400 fbdevhw: Fix inconsistent #if DEBUG usage fbdevhw is the only file in X's source that actually uses #if DEBUG to check for debugging instead of #ifdef DEBUG. This is contrary to everything else that checks the DEBUG macro in the source, so let's make it consistent and in turn, make our meson files a little simpler. Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit c66d65a645332bbf055a1c49f092636139eb9285 Author: Eric Anholt Date: Wed Jul 26 16:54:40 2017 -0700 glamor: Use GL_MESA_tile_raster_order for overlapping blits. Improves Raspberry Pi 3 x11perf -copywinwin500 from ~480/sec to ~700/sec. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 885636b7d42b3c7b151fc386d358184db004ce45 Author: Nikolay Martynov Date: Wed Sep 13 23:23:13 2017 -0400 XShmGetImage: fix censoring It looks like offsets calculated during image censoring are wrong. This results in black (empty) images returns. This fix is very similar to 6c6f09aac7f1d1367a042087b7681c7fdf1d1e0f that was applied to XGetImage Visually this fixes chromium/firefox window sharing in multiscreen configurations - without this patch most of the windows on 'secodnary' screens are black. This also should fix https://bugs.freedesktop.org/show_bug.cgi?id=101730. Signed-off-by: Nikolay Martynov Reviewed-by: Adam Jackson commit a10b4fcdc016d7ac56e5bb35f7f844af41016efe Author: Jon Turney Date: Tue Oct 10 14:28:33 2017 +0100 meson: Fix linkage of loadable modules for PE/COFF For the loadable modules it makes sense to build for PE/COFF targets, link those loadable modules with the import library for the Xorg executable, so that symbols provided by the executable can be satisfied at link time (as required by PE/COFF). Since this uses the syntax of using the returned build target object from an executable() with an implib: kwarg to link_with:, introduced in meson 0.42 and a syntax error with older meson, also update the minimum meson version which we require in project() to that. Signed-off-by: Jon Turney commit d43b1ca852562882fc6930afc36a982801e3be87 Author: Jon Turney Date: Tue Oct 10 14:28:32 2017 +0100 meson: Fix underlinkage of shadow loadable module Future work: probably some other modules are underlinked? Signed-off-by: Jon Turney commit 10cba7d54668698741510374ee63dec7a3cc3647 Author: Lyude Paul Date: Wed Oct 11 18:03:45 2017 -0400 meson: Add xkb_bin_dir option Now that we can actually configure all of the directories xkb uses for finding things, we can (finally, but only with meson) finally make it so that with the correct meson configuration the Xserver will "just work" without any additional changes to the installation prefix after building. For the people like me who have since scripted this part out of their build process and forgotten about it, building and installing the X server into a non-standard prefix has always required the following (or something else that makes sure that X has a valid xkbcomp configuration) commands be run right after doing the installation: # start in root of prefix you installed X to mkdir -pv share/X11/xkb/rules ln -s /usr/share/X11/xkb/rules/evdev share/X11/xkb/rules/ rm -f bin/xkbcomp ln -s /usr/bin/xkbcomp bin/ The one last piece of getting rid of this post-install junk is making sure that we can control the directory that X uses for finding the xkbcomp binary from meson so we can point it at the system provided xkbcomp (/usr/bin/xkbcomp or similar). So, this patch adds a configuration option for controlling this called xkb_bin_dir. Signed-off-by: Lyude Paul Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone commit b747da5e25be944337a9cd1415506fc06b70aa81 Author: Nathan Kidd Date: Fri Jan 9 10:15:46 2015 -0500 Unvalidated extra length in ProcEstablishConnection (CVE-2017-12176) Reviewed-by: Julien Cristau Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit 4ca68b878e851e2136c234f40a25008297d8d831 Author: Nathan Kidd Date: Fri Jan 9 10:09:14 2015 -0500 dbe: Unvalidated variable-length request in ProcDbeGetVisualInfo (CVE-2017-12177) v2: Protect against integer overflow (Alan Coopersmith) Reviewed-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit 859b08d523307eebde7724fd1a0789c44813e821 Author: Nathan Kidd Date: Wed Dec 24 16:22:18 2014 -0500 Xi: fix wrong extra length check in ProcXIChangeHierarchy (CVE-2017-12178) Reviewed-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit d088e3c1286b548a58e62afdc70bb40981cdb9e8 Author: Nathan Kidd Date: Fri Jan 9 10:04:41 2015 -0500 Xi: integer overflow and unvalidated length in (S)ProcXIBarrierReleasePointer [jcristau: originally this patch fixed the same issue as commit 211e05ac85 "Xi: Test exact size of XIBarrierReleasePointer", with the addition of these checks] This addresses CVE-2017-12179 Reviewed-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau Signed-off-by: Jeremy Huddleston Sequoia Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit 1b1d4c04695dced2463404174b50b3581dbd857b Author: Nathan Kidd Date: Sun Dec 21 01:10:03 2014 -0500 hw/xfree86: unvalidated lengths This addresses: CVE-2017-12180 in XFree86-VidModeExtension CVE-2017-12181 in XFree86-DGA CVE-2017-12182 in XFree86-DRI Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit 55caa8b08c84af2b50fbc936cf334a5a93dd7db5 Author: Nathan Kidd Date: Fri Jan 9 11:43:05 2015 -0500 xfixes: unvalidated lengths (CVE-2017-12183) v2: Use before swap (Jeremy Huddleston Sequoia) v3: Fix wrong XFixesCopyRegion checks (Alan Coopersmith) Reviewed-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau Signed-off-by: Jeremy Huddleston Sequoia Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit cad5a1050b7184d828aef9c1dd151c3ab649d37e Author: Nathan Kidd Date: Fri Jan 9 09:57:23 2015 -0500 Unvalidated lengths v2: Add overflow check and remove unnecessary check (Julien Cristau) This addresses: CVE-2017-12184 in XINERAMA CVE-2017-12185 in MIT-SCREEN-SAVER CVE-2017-12186 in X-Resource CVE-2017-12187 in RENDER Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit 9c23685009aa96f4b861dcc5d2e01dbee00c4dd9 Author: Michal Srb Date: Fri Jul 7 17:04:03 2017 +0200 os: Make sure big requests have sufficient length. A client can send a big request where the 32B "length" field has value 0. When the big request header is removed and the length corrected, the value will underflow to 0xFFFFFFFF. Functions processing the request later will think that the client sent much more data and may touch memory beyond the receive buffer. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit c2f2b25ab55c67f9f3ad07c02fa746eae7c61196 Author: Louis-Francis Ratté-Boulianne Date: Wed Sep 27 01:19:58 2017 -0400 present: Check the whole exec queue on event Later events are sometimes added in front of the queue (e.g. if page flipping fails) so we need to check the whole queue on event. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Michel Dänzer commit 677c32bcda98a96585bb1f66b57e0755a157b772 Author: Keith Packard Date: Fri Sep 29 08:48:33 2017 -0700 xf86-video-modesetting: Add ms_queue_vblank helper [v3] This provides an API wrapper around the kernel interface for queueing a vblank event, simplifying all of the callers. v2: Fix missing '|' in computing vbl.request.type v3: Remove spurious bit of next patch (thanks, Michel Dänzer) Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 94f11ca5cf011ef123bd222cabeaef6f424d76ac Author: Keith Packard Date: Thu Jul 27 10:08:32 2017 -0700 xkb: Handle xkb formated string output safely (CVE-2017-13723) Generating strings for XKB data used a single shared static buffer, which offered several opportunities for errors. Use a ring of resizable buffers instead, to avoid problems when strings end up longer than anticipated. Reviewed-by: Michal Srb Signed-off-by: Keith Packard Signed-off-by: Julien Cristau commit eaf1f72ed8994b708d94ec2de7b1a99f5c4a39b8 Author: Michal Srb Date: Thu Jul 27 11:54:26 2017 +0200 xkb: Escape non-printable characters correctly. XkbStringText escapes non-printable characters using octal numbers. Such escape sequence would be at most 5 characters long ("\0123"), so it reserves 5 bytes in the buffer. Due to char->unsigned int conversion, it would print much longer string for negative numbers. Reviewed-by: Keith Packard Signed-off-by: Julien Cristau commit b95f25af141d33a65f6f821ea9c003f66a01e1f1 Author: Michal Srb Date: Fri Jul 28 16:27:10 2017 +0200 Xext/shm: Validate shmseg resource id (CVE-2017-13721) Otherwise it can belong to a non-existing client and abort X server with FatalError "client not in use", or overwrite existing segment of another existing client. Signed-off-by: Julien Cristau commit db465bae533f85e7f900deb96efecc831c9d550b Author: Adam Jackson Date: Wed Sep 27 14:31:39 2017 -0400 meson: Port default warning flags from xorg-macros Well, almost all of them. No -Wdeclaration-after-statement because that's legal in C99, and in the limited ways we use it, more readable. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit 40c90ead044aa3fab79280d7a5ca5ad8e390029e Author: Adam Jackson Date: Wed Sep 27 14:31:38 2017 -0400 meson: Check for HAVE_TYPEOF Without this, exa's gc swap macros trigger gcc's -Wdiscarded-qualifiers. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit 712b02ec72b98291b78e17dcb1073a13c4a1086e Author: Adam Jackson Date: Wed Sep 27 14:31:37 2017 -0400 meson: Default to gnu99 We don't really require all of C99, but enough that it's not worth bothering with the distinction, especially if your toolchain is new enough that meson is a thing for you. We could do strict C99 if we really insisted on spelling it __typeof__, but who wants that? Nobody, that's who. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 041f25afa81dfc7e7ef350d5b955d2d5912846c9 Author: Adam Jackson Date: Wed Sep 27 14:31:36 2017 -0400 test: const correctness fix ../test/sync/sync.c: In function ‘main’: ../test/sync/sync.c:288:40: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] xcb_query_extension_reply_t *ext = xcb_get_extension_data(c, &xcb_sync_id); ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 1d1ff1142a5a3904175f45d2f52bbdffb0249e57 Author: Adam Jackson Date: Wed Sep 27 14:31:35 2017 -0400 dmx: More const correctness Fixes several dozen cases like: ../hw/dmx/examples/ev.c: In function ‘main’: ../hw/dmx/examples/ev.c:147:29: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] tmp = "X"; ^ Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit eb25facb37ef74eab83060b75f8205ce1538817f Author: Adam Jackson Date: Wed Sep 27 14:31:34 2017 -0400 dmx: Fix a silly redeclaration bug ../hw/dmx/dmx.c:66:12: warning: redundant redeclaration of ‘PanoramiXNumScreens’ [-Wredundant-decls] extern int PanoramiXNumScreens; ^~~~~~~~~~~~~~~~~~~ In file included from ../hw/dmx/dmx.c:65:0: ../Xext/panoramiXsrv.h:11:22: note: previous declaration of ‘PanoramiXNumScreens’ was here extern _X_EXPORT int PanoramiXNumScreens; ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 8060196a3e80a3c0ad2c0abbe459416821cd366c Author: Louis-Francis Ratté-Boulianne Date: Wed Sep 27 01:24:28 2017 -0400 sync: Fix delta value check While transitionning from CARD64 to int64, the GreaterThan call as mistakenly been transformed into ">=". That was at least causing problems with Mutter. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Adam Jackson commit 37f4e7651a2fd51efa613a08a1e705553be33e76 Author: Keith Packard Date: Mon Sep 25 16:18:22 2017 -0700 modesetting: Skip no-longer-present connectors when resetting BAD links Outputs may have NULL mode_output (connector) pointers if the connector disappears while the server is running. Skip these when resetting outputs with BAD link status. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 147b4602f9c47e8977d13b1cbb6566f86dba8647 Author: Adam Jackson Date: Mon Sep 25 15:06:44 2017 -0400 xfree86: Hush some warnings when Xv is disabled Spotted by Appveyor: xf86Crtc.c:3281:1: warning: ‘xf86_crtc_box_area’ defined but not used [-Wunused-function] xf86_crtc_box_area(BoxPtr box) ^~~~~~~~~~~~~~~~~~ xf86Crtc.c:3268:1: warning: ‘x86_crtc_box’ defined but not used [-Wunused-function] x86_crtc_box(xf86CrtcPtr crtc, BoxPtr crtc_box) ^~~~~~~~~~~~ xf86Crtc.c:3256:1: warning: ‘x86_crtc_box_intersect’ defined but not used [-Wunused-function] x86_crtc_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b) ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 0888b22fea71118b1a9a238134b3b8d1dc659734 Author: Adam Jackson Date: Mon Sep 25 15:01:32 2017 -0400 test: Fix a thinko in simple-xinit Spotted by clang courtesy of the shiny new OSX Travis target: simple-xinit.c:90:65: warning: sizeof on pointer operation will return size of 'char *' instead of 'char [10]' [-Wsizeof-array-decay] ret = read(displayfd, display_string, sizeof(display_string - 1)); Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 84e3b96b531363e47f6789aacfcae4aa60135e2e Author: Nick Sarnie Date: Sat Sep 23 17:35:48 2017 -0400 suid: Include sysmacros.h to fix build after glibc-2.25 [Added HAVE_SYS_SYSMACROS_H guard - ajax] Signed-off-by: Nick Sarnie Reviewed-by: Adam Jackson commit 0b00440678fa22c1c1ca4a292b67db3ab8676969 Author: Jon Turney Date: Fri Sep 22 15:25:05 2017 +0100 travis: Also build on OSX Signed-off-by: Jon Turney Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit c30eca688781deb06b25a6a08297cb855aeb6ed2 Author: Jon Turney Date: Fri Sep 22 13:54:01 2017 +0100 meson: Make it possible to build for 32-bit targets Setting glx_align64 to '' gives a null string in the arguments list passed to the compiler. This is taken as an input filename, leading to: "cc: error: : No such file or directory" Instead, assign an empty list to glx_align64, which gets flattened to nothing in the arguments list. Signed-off-by: Jon Turney Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 2c2e1b6f57753a82c7ca144a57950f9e2d76199e Author: Adam Jackson Date: Wed Aug 30 14:58:24 2017 -0400 glx: Be a bit more paranoid in glx client cleanup This would probably crash (via double-free) if you had multiple GPUs and an indirect context. Signed-off-by: Adam Jackson commit d770f9293296d2d3c4e49e94130ff68c0890f625 Author: Daniel Stone Date: Wed Sep 20 07:22:13 2017 -0700 meson: Use dependency version_compare() We can check the version on an existing dependency, rather than spinning up pkg-config again just to check the right version. Signed-off-by: Daniel Stone commit 86a89dd6020f59964c0e924acbfae9d5a51e3148 Author: Daniel Stone Date: Wed Sep 20 07:22:12 2017 -0700 Build: Use dri3proto/libdrm CFLAGS Make sure we get the CFLAGS required for building DRI3 into the command line. Signed-off-by: Daniel Stone commit 294670682120c65001b36369d6395003704f4ac1 Author: Eric Anholt Date: Mon Sep 18 17:34:33 2017 -0700 sync: Clean up a bit of header formatting. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e0f872207aa203adb85e825c311ed50fe3a3af60 Author: Eric Anholt Date: Mon Sep 18 17:34:32 2017 -0700 sync: Convert from "CARD64" to int64_t. The extension was using the name CARD64 to represent 64-bit values, with a #define from CARD64 to XSyncValue, a struct with a pair of 32-bit values representing a signed 64-bit value. This interfered with protocol headers using CARD64 to try to actually store a uint64_t. Now that stdint.h exists, let's just use that here, instead. v2: Fix alarm delta changes. v3: Do the potentially overflowing math as uint and convert to int afterward, out of C spec paranoia. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 5cbfa276541e6a621cf9c4b44b75323e90a5bd4c Author: Eric Anholt Date: Mon Sep 18 17:34:31 2017 -0700 test: Add basic SYNC tests. I couldn't find any, and I was modifying the implementation, so I had to write some. I would like the test to end with a "make sure there weren't any stray unchecked errors", but I didn't figure out how to do that. v2: Extend sync tests to cover alarm delta and waitvalue changes. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 3336291fc68444ee65b48ba675ec947e505fed57 Author: Eric Anholt Date: Mon Sep 18 17:34:30 2017 -0700 test: Return error from simple-xinit if the client crashes. I want to be able to call client tests with simple-xinit, so assertion failures should be an error. v2: Clean up identical returns. Signed-off-by: Eric Anholt commit a8eeb332ccf4d13b3fdcc382397bd3ea45e76212 Author: Eric Anholt Date: Mon Sep 18 17:34:29 2017 -0700 meson: Add Xvfb and Xephyr-glamor testing. The Xvfb tests are passing and Xephyr-glamor is failing for me, but it fails identically on autotools. It's disabled on Travis for now because the >10 minutes of silence during testing times out the entire build. v2: Fix the disable on travis. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit a09743c9300f805d6527368ddcf44f5dccd4b366 Author: Eric Anholt Date: Mon Sep 18 17:34:28 2017 -0700 meson: Move Xvfb build under an option. Autotools also had it as an option. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit de3b61869140768335daed0e855a5ae4bdb75020 Author: Jon Turney Date: Fri Sep 15 14:36:52 2017 +0100 Add an .appveyor.yml for AppVeyor CI This currently does an autotools build using Cygwin. Signed-off-by: Jon Turney Reviewed-by: Adam Jackson commit 7d0728d6c42f9200b90c58e0357776018de18496 Author: Jon Turney Date: Fri Sep 15 14:36:51 2017 +0100 Revert "dmx: fix linking" Since commit 3ef16dfb9830bd6b41ae428f4f213ae0c35c1056, "dmx: fix linking", linking dmx is broken for me: CCLD Xdmx.exe ../../render/.libs/librender.a(glyph.o): In function `HashGlyph': /wip/xserver/build.x86_64/../render/glyph.c:168: undefined reference to `x_sha1_init' /wip/xserver/build.x86_64/../render/glyph.c:174: undefined reference to `x_sha1_update' /wip/xserver/build.x86_64/../render/glyph.c:177: undefined reference to `x_sha1_update' /wip/xserver/build.x86_64/../render/glyph.c:180: undefined reference to `x_sha1_final' ../../render/.libs/librender.a(mipict.o): In function `miClipPictureReg': /wip/xserver/build.x86_64/../render/mipict.c:233: undefined reference to `pixman_region_n_rects' /wip/xserver/build.x86_64/../render/mipict.c:234: undefined reference to `pixman_region_n_rects' /wip/xserver/build.x86_64/../render/mipict.c:235: undefined reference to `pixman_region_rectangles' /wip/xserver/build.x86_64/../render/mipict.c:236: undefined reference to `pixman_region_rectangles' /wip/xserver/build.x86_64/../render/mipict.c:248: undefined reference to `pixman_region_init' /wip/xserver/build.x86_64/../render/mipict.c:251: undefined reference to `pixman_region_not_empty' /wip/xserver/build.x86_64/../render/mipict.c:261: undefined reference to `pixman_region_not_empty' ../../render/.libs/librender.a(mipict.o): In function `miComputeCompositeRegion': /wip/xserver/build.x86_64/../render/mipict.c:340: undefined reference to `pixman_region_init' The change this was fixing appears to be effectively reverted by 542d9f6807ac06b70f564ccab10af69fa21a1221, so just revert commit 3ef16dfb9830bd6b41ae428f4f213ae0c35c1056. Signed-off-by: Jon Turney Reviewed-by: Adam Jackson commit fbd80b2c8ebe9fd41229dc5438524d107c071ff1 Author: Dawid Kurek Date: Thu Jul 6 14:51:11 2017 +0200 modesetting: Blacklist EVDI devices from PRIME sync UDL (usb) devices are blacklisted because of they weird behaviour when it comes to vblank events. As EVDI uses very similar model of handling vblanks it should be treated similarly. When doing a page flip, EVDI does not wait for real vblank, but simulates it by adding constant delay. It also does not support DRM_IOCTL_WAIT_VBLANK. In contrast to UDL, EVDI uses platform devices, thus instead of 'usb' in path they all have 'platform'. It is possible to blacklist by 'platform', so without explicitly saying 'evdi', but it might be misleading when it comes to real reason for it. Signed-off-by: Dawid Kurek commit eac1a2e37b833c179b587107230805ea1fb3dfda Author: Emil Velikov Date: Thu Aug 3 19:43:28 2017 +0100 dri2: sort DRI2InfoPtr::version checking in ascending order Makes it easer to follow if 8 is between 7 and 9 ;-) Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit 82df2ce38c560915f8c6574052bd56215b649072 Author: Roman Gilg Date: Tue Aug 22 15:38:26 2017 +0200 xwayland: Avoid repeatedly looping through window ancestor chain Calling xwl_window_from_window means looping through the window ancestor chain whenever it is called on a child window or on an automatically redirected window. Since these properties and the potential ancestor's xwl_window are constant between window realization and unrealization, we can omit the looping by always putting the respective xwl_window in the Window's private field on its realization. If the Window doesn't feature an xwl_window on its own, it's the xwl_window of its first ancestor with one. Signed-off-by: Roman Gilg Reviewed-by: Pekka Paalanen commit 1089d5d518a315963a8cda6c7d47a0ce09de0979 Author: Olivier Fourdan Date: Thu Mar 2 11:03:15 2017 +0100 xwayland: add envvar XWAYLAND_NO_GLAMOR Not all compositors allow for customizing the Xwayland command line, gnome-shell/mutter for example have the command line and path to Xwayland binary hardcoded, which makes it harder for users to disable glamor acceleration in Xwayland (glamor being used by default). Add an environment variable XWAYLAND_NO_GLAMOR to disable glamor support in Xwayland. Signed-off-by: Olivier Fourdan Reviewed-by: Eric Engestrom commit 5abaa50b292798370a665ace5eec56fd830be226 Author: Eric Anholt Date: Fri Sep 1 12:22:59 2017 -0700 meson: Move the BUILD_DATE/TIME setup to configure time. By having it as a custom_target with build_always, every "ninja -C build" would rebuild Xorg for the new date/time, even if the rest of Xorg didn't change. We could build the rest of Xorg into a static lib, and regenerate date/time when the static lib changes and link that into a final Xorg, but BUILD_DATE/TIME is such a dubious feature (compared to including a git sha, which is easy with meson) it doesn't seem worth the build time cost. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 05e7e8b587dd9d37e8beadc72ab993f028c47fa1 Author: Eric Anholt Date: Fri Sep 1 12:22:58 2017 -0700 meson: Include BUILD_DATE in the meson xf86Build.h. Due to a typo, I only had BUILD_TIME present. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 2b080a14c87fc9e5f77fc3361297ac332aa04f02 Author: Eric Anholt Date: Fri Sep 1 12:22:57 2017 -0700 meson: Respect SOURCE_DATE_EPOCH for reproducible builds. This just copies over Chris Lamb's code from autotools. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 937ed782ae5e4e0da739f0630d1681b3754f0281 Author: Chris Lamb Date: Fri Sep 1 12:22:56 2017 -0700 configure.ac: Make BUILD_{DATE, TIME} respect SOURCE_DATE_EPOCH if set Whilst working on the Reproducible Builds effort [0], we noticed that xorg-server could not be built reproducibly. One reason is because it embeds a "current" build and date time. This should be compatible with both GNU and BSD date(1). [0] https://reproducible-builds.org/ v2: Fix change in Y-M-D format that broke the build. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit a49379b6045453c7b787cc638db6afd0d14dce9c Author: Adam Jackson Date: Tue Sep 12 16:53:24 2017 -0400 fb: Check whether the window is enabled directly ... instead of its root window. Xwayland's rootless mode empties the root window border clip since its root window has no storage, but redirected windows (the only kind it can show) will have a non-empty border clip anyway, cf. the #ifdef COMPOSITE in miComputeClips. With this change, non-glamor Xwayland's GetImage actually works. Other acceleration layers may need to change to account for this, but this appears to be safe for the existing open source drivers. Only the xfree86 DDX has any problem with losing its framebuffer on VT switch, and even then only for UMS drivers (which excludes glamor, uxa, and sna from consideration). This leaves exa, which already contains code to evict pixmaps to host memory on VT switch. Since the xfree86 core will still empty the root clip on VT switch, while the root window itself may not contain a valid image we won't try to touch it, but GetImage from a redirected window will now work even when switched away. Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 9869dcb349b49f6d4cc2fab5d927cd8b1d1f463c Author: Olivier Fourdan Date: Wed Jul 26 16:00:38 2017 +0200 glamor: Avoid overflow between box32 and box16 box glamor_compute_transform_clipped_regions() uses a temporary box32 internally which is copied back to a box16 to init the regions16, thus causing a potential overflow. If an overflow occurs, the given region is invalid and the pixmap init region will fail. Simply check that the coordinates won't overflow when copying back to the box16, avoiding a crash later down the line in glamor. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=101894 Signed-off-by: Olivier Fourdan Tested-by: Fabrice Bellet Reviewed-by: Adam Jackson commit bd353e9b84e013fc34ed730319d5b63d20977903 Author: Olivier Fourdan Date: Wed Jul 26 16:00:37 2017 +0200 glamor: handle NULL source picture COMPOSITE_REGION() can pass NULL as a source picture, make sure we handle that nicely in both glamor_composite_clipped_region() and glamor_composite_choose_shader(). Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=101894 Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit 4486d199bd3bcb5b2b8ad9bc54eb11604d9bd653 Author: Thomas Hellstrom Date: Wed Sep 6 16:27:54 2017 +0200 glx: Fix visual fbconfig matching with respect to swap method For the built in visuals, we'd typically select the "best" fbconfig without considering the swap method. If the client then requests a specific swap method, say GLX_SWAP_COPY_OML, it may well happen that the first fbconfig matching requirements would have been paired with the 32-bit compositing visual, and the client would render a potentially transparent window. Fix this so that we try to match fbconfigs with the same swap method to all built-in visuals. That would guarantee that selecting a specific swap- method would not influence the chance of getting a compositing visual. Signed-off-by: Thomas Hellstrom Reviewed-by: Adam Jackson commit 0fc26310d5b09213c65f50bde444a1758172b016 Author: Thomas Hellstrom Date: Wed Sep 6 16:27:53 2017 +0200 glx: Work around a GLX_OML swap method in older dri drivers The swapMethod config member would typically contain an arbitrary value on older dri drivers. Fix this so that if we detect an illegal value, return GLX_SWAP_UNDEFINED_OML. Signed-off-by: Thomas Hellstrom Reviewed-by: Adam Jackson commit da29a15874229d78ec61946eacdbbed9871e3664 Author: Emil Velikov Date: Thu Sep 29 18:36:43 2016 +0100 glx: remove unused systemTimeExtension Not even a single DRI2/DRISW driver in mesa ever used this. Appears to be a dri1 artefact copy/pasted in the dri2/drisw codebase. Signed-off-by: Emil Velikov Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit ea82ececbf85a7ac3d0931687f44c57534fde17c Author: Peter Hutterer Date: Wed Sep 6 11:53:02 2017 +1000 test: fix compiler warning signal-logging.c:182:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses] Signed-off-by: Peter Hutterer commit e12e02b2e6ee4582ba902ec1d1e5309abc78e282 Author: Emil Velikov Date: Sun Apr 17 17:24:53 2016 +0100 glamor: use the lowercase xnf.*alloc API Signed-off-by: Emil Velikov Reviewed-by: Olivier Fourdan Signed-off-by: Peter Hutterer commit 17e488570067cdf499c7ad17ab198508c6f1531d Author: Emil Velikov Date: Sun Apr 17 17:24:52 2016 +0100 xwayland: use the lowercase xnf.*alloc API Signed-off-by: Emil Velikov Reviewed-by: Olivier Fourdan Signed-off-by: Peter Hutterer commit cdd0352ba05d4d8482aaca41797e05d40e58da36 Author: Olivier Fourdan Date: Thu Aug 31 10:23:00 2017 +0200 xwayland: Fix a segfault with pointer locking Xwayland would crash in some circumstances while trying to issue a pointer locking when the cursor is hidden when there is no seat focus window set. The crash signature looks like: #0 zwp_pointer_constraints_v1_lock_pointer () #1 xwl_pointer_warp_emulator_lock () at xwayland-input.c:2584 #2 xwl_seat_maybe_lock_on_hidden_cursor () at xwayland-input.c:2756 #3 xwl_seat_maybe_lock_on_hidden_cursor () at xwayland-input.c:2765 #4 xwl_seat_cursor_visibility_changed () at xwayland-input.c:2768 #5 xwl_set_cursor () at xwayland-cursor.c:245 #6 miPointerUpdateSprite () at mipointer.c:468 #7 miPointerDisplayCursor () at mipointer.c:206 #8 CursorDisplayCursor () at cursor.c:150 #9 AnimCurDisplayCursor () at animcur.c:220 #10 ChangeToCursor () at events.c:936 #11 ActivatePointerGrab () at events.c:1542 #12 GrabDevice () at events.c:5120 #13 ProcGrabPointer () at events.c:4908 #14 Dispatch () at dispatch.c:478 #15 dix_main () at main.c:276 xwl_pointer_warp_emulator_lock() tries to use the surface from the xwl_seat->focus_window leading to a NULL pointer dereference when that value is NULL. Check that xwl_seat->focus_window is not NULL earlier in the stack in xwl_seat_maybe_lock_on_hidden_cursor() and return early if not the case to avoid the crash. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=102474 Signed-off-by: Olivier Fourdan Acked-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3fbc3c3eefd3803d0c4e86e42595d8a891aeb5f2 Author: Olivier Fourdan Date: Fri Sep 1 09:35:33 2017 +0200 xwayland: No grab handler without protocol support If the compositor has no support for the Xwayland keyboard grab protocol, there is no need to set-up our keyboard grab handler. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit aabf65d2a0206bd1a9c6e9a9f3153ded873dfd43 Author: Adam Jackson Date: Wed Aug 30 15:11:45 2017 -0400 os: Fix warning in LockServer The meson build gives me: ../os/utils.c: In function ‘LockServer’: ../os/utils.c:310:40: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] snprintf(pid_str, sizeof(pid_str), "%10ld\n", (long) getpid()); ^~~~~~~~~ ../os/utils.c:310:5: note: ‘snprintf’ output between 12 and 13 bytes into a destination of size 12 snprintf(pid_str, sizeof(pid_str), "%10ld\n", (long) getpid()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Which seems to be due to the %d part meaning that a negative number's - sign would be one wider than we're expecting. Fine, just coerce it to unsigned. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 3bc32a7f593cbd2747237621135ef5196bc1e15a Author: Adam Jackson Date: Tue Aug 22 12:19:56 2017 -0400 glx: Fix error generation for non-reply vendor private requests Discarding the return value here is just wrong. Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher commit 591ac95f73b1c1ea681c45e4da9afa2b1d505abe Author: Emil Velikov Date: Tue Aug 22 11:48:31 2017 +0100 xwin: automake: remove unused {SRCS, DEFS}_{NATIVEGDI, PRIMARYFB} Left over from the following commits: 8465ee788fd xwin: Remove native GDI engine (v2) c79f824bf66 xwin: Remove primary DirectDraw engine v2: drop leading - in the makefile Cc: Adam Jackson Signed-off-by: Emil Velikov Reviewed-by: Jon Turney (v1) commit 69fe6156ec6cd37657d4e5af1c6f21ebf72b8fd7 Author: Emil Velikov Date: Tue Aug 22 11:48:30 2017 +0100 xwin: remove always true/set XWIN_RANDR conditional/define Signed-off-by: Emil Velikov Reviewed-by: Jon Turney commit 8f1a200d0be261a60bb9e8e72d8704cef2d91cd4 Author: Emil Velikov Date: Tue Aug 22 11:48:29 2017 +0100 xwin: remove always true/set XWIN_MULTIWINDOW conditional/define v2: drop trailing endif (Jon) Signed-off-by: Emil Velikov Reviewed-by: Jon Turney commit 9d00f6190a8e5cc4ebda9b315d7c0a0782b58501 Author: Emil Velikov Date: Tue Aug 22 11:48:28 2017 +0100 xwin: remove always true/set XWIN_CLIPBOARD conditional/define v2: drop trailing endif (Jon) Signed-off-by: Emil Velikov Reviewed-by: Jon Turney commit 1ef65692258136d6e36d0d9d6c5efad9877c9ceb Author: Emil Velikov Date: Tue Aug 22 11:48:27 2017 +0100 os: make MitGenerateCookie() independent of XCSECURITY Analogous to previous commit. Signed-off-by: Emil Velikov Reviewed-by: Jon Turney commit 292ee7151631cabbd928847a5a2ca47e14a06b75 Author: Emil Velikov Date: Tue Aug 22 11:48:26 2017 +0100 os: make GenerateRandomData() independent of XCSECURITY The function itself does not depend on the macro. Move it outside of the ifdef guard and remove the identical copy in XWIN. This is step 1 towards removing the duplication in winauth.c and moving the OS specifics to os/ Signed-off-by: Emil Velikov Reviewed-by: Jon Turney commit 8aee1f40eaa3527c90698d6826ce8314b8b5a92a Author: Emil Velikov Date: Tue Aug 22 11:48:25 2017 +0100 xwin/glx: remove unused __GLXWinScreen::glx_enable_bits All the relevant code already uses the ::base::glx_enable_bits one. Signed-off-by: Emil Velikov Reviewed-by: Jon Turney commit 43878fa8772d8642f601d65e78d2f702ecc0de41 Author: Adam Jackson Date: Wed Aug 16 14:49:18 2017 -0400 glx: Remove some unused stuff from glxserver.h Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Reviewed-by: Keith Packard commit 3d81abba9ca2f9d57b4c293e3b7fcb32ef853f44 Author: Adam Jackson Date: Wed Aug 16 14:49:17 2017 -0400 glx: Inline some reply swapping code Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher commit 51bab63b7353319c51ec2f1adaed95d86e4f6119 Author: Adam Jackson Date: Wed Aug 16 14:49:16 2017 -0400 glx: Remove True/False defines Those are xlib spellings, we say TRUE/FALSE pretty consistently elsewhere in the server. Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Reviewed-by: Keith Packard commit 8e3b26ceaa86eaf98a78f6b84f46a4a86aed8ef8 Author: Michel Dänzer Date: Fri Apr 14 19:08:41 2017 +0900 Make PixmapDirtyUpdateRec::src a DrawablePtr This allows making the master screen's pixmap_dirty_list entries explicitly reflect that we're now tracking the root window instead of the screen pixmap, in order to allow Present page flipping on master outputs while there are active slave outputs. Define HAS_DIRTYTRACKING_DRAWABLE_SRC for drivers to check, but leave HAS_DIRTYTRACKING_ROTATION defined as well to make things slightly easier for drivers. Reviewed-by: Adam Jackson commit c52f77e4ca2cda878da341a6228e6411eec7b1a0 Author: Peter Harris Date: Mon Aug 14 15:54:36 2017 -0400 meson: Fix epoll detection The epoll code depends on epoll_create1, not epoll_create. Signed-off-by: Peter Harris Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 27500ee82e97ef8a6b3199c2d7b623523c1ee2c1 Author: Eric Anholt Date: Mon Jul 10 12:08:29 2017 -0700 glamor: Scissor Render composite operations to the bounds of the drawing. Unlike the previous two fixes, this one introduces new GL calls and statechanges of the scissor. However, given that our Render drawing already does CPU side transformation and inefficient box upload, this shouldn't be a limiting factor for Render acceleration. Surprisingly, it improves x11perf -comppixwin10 -repeat 1 -reps 10000 on i965 by 3.21191% +/- 1.79977% (n=50). v2: Make the jump to the exit land after scissor disable. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e6ab3b1109e72a1512c6b7b92dd84525ad8c8052 Author: Eric Anholt Date: Thu Jul 6 16:15:17 2017 -0700 glamor: Scissor CopyArea to the bounds of the drawing. Like the previous fix to rectangles, this reduces the area drawn on tiled renderers by letting the CPU-side tile setup know what tiles might be drawn at all. Surprisingly, it improves x11perf -copypixwin1 -repeat 1 -reps 10000 on i965 by 2.93185% +/- 1.5561% (n=90). v2: Drop extra glamor_bounds_union_box() from previous debugging (caught by Mark Marshall). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard (v1) commit 60cc7e367a2a5e6014f193105dafd47a4d598fd9 Author: Eric Anholt Date: Thu Jul 6 15:43:14 2017 -0700 glamor: Scissor rectangle drawing to the bounds of the rects. Scissors provide a critical hint to tiled renderers as to what tiles need to be load/stored because they could be modified by the rendering. The bounds calculation here is limited to when we have a small number of rects (large enough to cover rounded window corners, but probably not xeyes) to avoid overhead on desktop GL. No performance difference on i965 with x11perf -rect1 -repeat 1 -reps 10000 (n=50) v2: Clamp rectangle bounds addition. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f2110157713cf22c8b5c46a0d5416fdb033c27d3 Author: Eric Anholt Date: Tue May 9 15:48:27 2017 -0700 test: Remove unused ddxstubs.c Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f80119120c487581ac050ce741808f7c8f438f35 Author: Adam Jackson Date: Thu Jul 27 16:02:28 2017 -0400 composite: Make compIsAlternateVisual safe even if Composite is off As of ea483af9 we're calling this unconditionally from the GLX code so the synthetic visual is in a lower select group. If Composite has been disabled then GetCompScreen() will return NULL, and this would crash. Rather than force the caller to check first, just always return FALSE if Composite is disabled (which is correct, since none of the visuals will be synthetic in that case). Signed-off-by: Adam Jackson Reviewed-by: Aaron Plattner commit b06a85e7fd6ddac58dd97e5d7ce3b5ea9553c8f6 Author: Emil Velikov Date: Mon Jul 31 14:13:48 2017 +0100 glx: remove unused GlxSetVisualConfigs stub The function was an empty since 2008 at least. Drop it since no drivers use it any more. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit e8f190b445ae10b12896ee396cd8d57f6b6b8cc4 Author: Eric Anholt Date: Fri Aug 4 13:19:01 2017 -0700 travis: Request a new docker image with xkb-data and xkbcomp installed. Xvfb was erroring out with: XKB: Failed to compile keymap Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config. (EE) Fatal server error: (EE) Failed to activate virtual core keyboard: 2(EE) With this change, we can now run my xsync regression test on Travis. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit b62e486c4e3d7411f3e70b610af7f8b9dd5e8a73 Author: Eric Anholt Date: Fri Aug 4 13:19:00 2017 -0700 travis: Set prefix to /usr, so we find xkbcomp. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 2d50e32e0ba1045f8c73a14335743ae98121d102 Author: Eric Anholt Date: Tue Aug 1 13:11:25 2017 -0700 meson: Fix xwayland build since xwayland-keyboard-grab. The version detect was erroring out with 1.9 protos installed, and we weren't building the new code. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0a448d133f4f1c913b1c2cb05accff31c74a3dbf Author: Olivier Fourdan Date: Wed Jul 12 11:51:08 2017 +0200 xwayland: Add grab protocol support The keyboard grabbing protocol for Xwayland is included in wayland-protocol 1.9. Update the wayland-protocol required version in both configure and meson builds and add support for this new protocol in Xwayland. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit abe49b009064c38823fac17c373fd5f1a390b3ab Author: Jan Beich Date: Fri Jul 7 19:59:05 2017 +0200 dix: unbreak --with-dtrace (default) on FreeBSD 11.1+ gmake[2]: Entering directory '/path/to/xserver/dix' /usr/sbin/dtrace -G -C -o dtrace-dix.o -s ../dix/Xserver.d .libs/atom.o ... dtrace: failed to compile script ../dix/Xserver.d: line 26: useless declaration gmake[2]: *** [Makefile:1007: dtrace-dix.o] Error 1 Signed-off-by: Jan Beich Reviewed-by: Alan Coopersmith commit c967e4cd8ba50034b6e02d87df10d04edf15ccf6 Author: Emil Velikov Date: Mon Jul 31 14:06:48 2017 +0100 glx: don't export __glXDRISWRastProvider The symbol is used only internally and is not part of the API/ABI. Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit c09e906d61a0855a8202e58ba72ed6bb3b08f37f Author: Emil Velikov Date: Mon Jul 31 14:06:47 2017 +0100 glx: fix typo becuase -> because Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit db0dd06ddf47d5190f2349ed8b0e71caa9e8e1eb Author: Adam Jackson Date: Thu Jul 27 16:02:33 2017 -0400 glx: Allow arbitrary context attributes for direct contexts For direct contexts, most context attributes don't require any particular awareness on the part of the server. Examples include GLX_ARB_create_context_no_error and GLX_ARB_context_flush_control, where all of the behavior change lives in the renderer; since that's on the client side for a direct context, there's no reason for the X server to validate the attribute. The context attributes will still be validated on the client side, and we still validate attributes for indirect contexts since the server implementation might need to handle them. For example, the indirect code might internally use ARB_context_flush_control for all contexts, in which case it would need to manually emit glFlush when the client switches between two indirect contexts that didn't request the no-flush attribute. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 3050d277616ef472a24d8ccd24afcbf8e31ed80e Author: Adam Jackson Date: Tue Jun 27 11:18:48 2017 -0400 xfree86: Fix X -configure driver sort yet again There were two bugs here: The comparison function was not stable when one or more of the drivers being compared is a fallback, and the last driver in the list would never be moved. Signed-off-by: Adam Jackson commit 6f9939525c31f1f2d8d6c137a46404278384b4bf Author: Adam Jackson Date: Mon Jun 26 12:43:54 2017 -0400 modesetting: Fix PCI initialization on non-zero domains libdrm's busid matching for the legacy three-integer bus string format simply ignores the domain number, rather than what we were doing here of packing the domain into the bus number. Whatever, just use the existing code to build a busid string, since that gets the domain right. Signed-off-by: Adam Jackson commit d16133e3e293fe16b291114d344fbd5a61d5ed65 Author: Jeremy Huddleston Sequoia Date: Thu Jul 20 19:48:26 2017 -0700 glx: Only include compositeext.h if COMPOSITE is supported Regressed-in: ea483af99a6351323afe00a0b630cd63310efdb1 Signed-off-by: Jeremy Huddleston Sequoia commit dd0b721c977e88d7c3830cc2a672c2793bca4fa0 Author: Jeremy Huddleston Sequoia Date: Tue Jul 18 21:35:49 2017 -0700 XQuartz: Hack around an issue that can occur on macOS due to background apps incorrectly stealing focus Works around . Tested-by: Martin Otte Tested-by: Tom Lane Signed-off-by: Jeremy Huddleston Sequoia commit 211e05ac85a294ef361b9f80d689047fa52b9076 Author: Michal Srb Date: Fri Jul 7 17:21:46 2017 +0200 Xi: Test exact size of XIBarrierReleasePointer Otherwise a client can send any value of num_barriers and cause reading or swapping of values on heap behind the receive buffer. Signed-off-by: Peter Hutterer commit abb031e731f5c159add1b3351de9c4bb121bf00a Author: Rodrigo Vivi Date: Thu Jun 29 13:29:58 2017 -0700 dri2: Sync i965_pci_ids.h from Mesa. Copied from Mesa with no modifications. Gives us Coffee Lake and Cannon Lake PCI IDs. Signed-off-by: Rodrigo Vivi Acked-by: Kenneth Graunke commit 05a4396f08c83d9261b8ad16908d9e2730bd4bbf Author: Emil Velikov Date: Thu Jun 29 02:17:06 2017 +0100 glamor: update "required EGL extensions" comment The extensions listed have not been needed in a while. Replace with the only remaining requirement. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 04511a0476b5c860e7d157b01080dff94d935f74 Author: Adam Jackson Date: Thu Jun 29 10:32:00 2017 -0400 wayland: Sync drm.xml with Mesa ... where it is named src/egl/wayland/wayland-drm/wayland-drm.xml and has its requests sorted by protocol version number, avoiding a warning from wayland-scanner. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit ce393de0efb8626d15f3b97c97916971a6aefebd Author: Dave Airlie Date: Fri Jun 23 09:29:13 2017 +1000 modesetting: handle NULL cursor in drmmode_set_cursor. We had a bug reported with a touchscreen where we could end up in here with a NULL cursor, so let's not crash the X server. Signed-off-by: Dave Airlie Reviewed-and-Tested-by: Daniel Martin Signed-off-by: Peter Hutterer commit 43527d31810fe94a5eb4b2543bbc8eb26b1654b7 Author: Peter Hutterer Date: Tue Jul 4 06:51:58 2017 +1000 xfree86: link to libinput(4) from the xorg.conf man page Signed-off-by: Peter Hutterer Reviewed-by: Pekka Paalanen commit edaad0eff48219787d27f7723cd3d4d9b293de96 Author: Adam Jackson Date: Thu Jun 29 13:57:37 2017 -0400 automake: Add hw/xfree86/xkb/meson.build to EXTRA_DIST Signed-off-by: Adam Jackson commit 06419a5b17180126d2507c8699229e07f5b2c434 Author: Emil Velikov Date: Thu Jun 29 01:55:25 2017 +0100 glamor: remove no longer needed KHR_gl_texture_2D_image requirement The code that needed it was introduced with commit 7cfd9cc2327 ("Add DRI3 support to glamor") back in 2013. And was nuked a couple of years ago with commit 51984dddfcc ("glamor: Delay making pixmaps shareable until we need to.") Signed-off-by: Emil Velikov Reviewed-by: Eric Anholt commit 47a7b63f7455eaeacb634fd800e924f2087dacbd Author: Jon TURNEY Date: Mon Jun 26 14:54:06 2017 +0100 meson: Use --export-all-symbols when building PE/COFF objects Reviewed-by: Adam Jackson commit b34abb3d2da46339d59a0feefd2240790a6a6a0e Author: Jon TURNEY Date: Mon Jun 26 14:54:05 2017 +0100 meson: Shuffle around subdirs so we build Xorg loadable modules after Xorg Reviewed-by: Adam Jackson commit fbdd73fac68383c93f6f5c6a7615860503039999 Author: Jon TURNEY Date: Mon Jun 26 14:54:04 2017 +0100 Move statically linked xorgxkb files from dixmods to a separate directory [ajax: Fixed test/Makefile.am as well] Reviewed-by: Adam Jackson commit 5c8fb7d128e312e6c01cd40c7ada072c4b5f3776 Author: Adam Jackson Date: Wed Jun 21 15:58:43 2017 -0400 xfree86: Move DRICreatePCIBusID to xf86Pci.h xf86str.h is parsed into sdksyms unconditionally but the symbol is only defined when building with PCI support. Move the decl to a header that sdksyms only parses when building PCI support. Signed-off-by: Adam Jackson Reviewed-by: Jon Turney commit 525db17e04d5cabaeefd20e38cebe7d606047a76 Author: Adam Jackson Date: Fri Jun 16 15:44:52 2017 -0400 glx/drisw: Use scratch GCs for swrastPutImage The scratch GC defaults to the same state as our persistent GCs. Except for the "draw" GC, which would generate graphics exposures for... well, no reason really, PutImage doesn't generate graphics exposures. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit ecc5e362985d1f649c29ac5f93be19851eaf7d87 Author: Adam Jackson Date: Fri Jun 16 15:44:51 2017 -0400 glx/drisw: Remove unused glx_enable_bits Sloppy of me! Signed-off-by: Adam Jackson Acked-by: Keith Packard commit a6c23ef31a4e5aea19ddabdf4a0760f4c48f1ebe Author: Adam Jackson Date: Fri Jun 16 15:44:50 2017 -0400 glx/dri2: Don't chirp when falling back to software This isn't an error if the screen isn't accelerated in the first place. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 0b1831d043028f7dd6accca19a81e2abd9a145b5 Author: Adam Jackson Date: Fri Jun 16 15:44:49 2017 -0400 glx: Remove some indirection around EXT_texture_from_pixmap Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit c33541e59e338cd53f89d94a6898555d350e84aa Author: Adam Jackson Date: Fri Jun 16 15:44:48 2017 -0400 glx: Remove __glXReply Static data bad, hulk smash. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit d6db66811643d3762716f6b144a7358572216a4f Author: Adam Jackson Date: Fri Jun 16 15:44:47 2017 -0400 dmx: Remove some not-very-interesting debug prints gcc/glibc think the snprintf in dmxExecOS() might truncate. Yes, it might, and we also don't care. Just delete all this. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 17ad6e5d5616039021455bc821d6ee2497f7ebde Author: Adam Jackson Date: Fri Jun 16 15:44:46 2017 -0400 dmx: Silence an unused-result warning Modern glibc is very insistent that you care about whether write() succeeds: ../hw/dmx/input/usb-keyboard.c: In function ‘kbdUSBCtrl’: ../hw/dmx/input/usb-keyboard.c:292:9: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write(priv->fd, &event, sizeof(event)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit fbc4da6fef2a0d2111284a19c26d83686ebcbd1f Author: Adam Jackson Date: Fri Jun 16 15:44:44 2017 -0400 xfree86: Move DRICreatePCIBusID to the PCI code This symbol is used by some DRI2+ drivers and there's nothing DRI1-specific about it. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit b723da8390d2fe1bf048247302416b37972a0cc3 Author: Adam Jackson Date: Fri Jun 16 15:44:43 2017 -0400 xfree86: Remove unused xf86EnableVTSwitch Signed-off-by: Adam Jackson Acked-by: Keith Packard commit f44e0af4daaad5b18d79f2076bc98d6e79f638af Author: Adam Jackson Date: Fri Jun 16 15:44:42 2017 -0400 dix: Remove extension aliases This appears to be essentially unused. The only known client-side library for the SELinux extension is xcb, which does not look for the name "Flask". The "SGI-GLX" alias for GLX appears to be a bit of superstition at this point, NVIDIA's driver does not expose it and Mesa does not check for it. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 88e807d4fa90165868929190f601beef18252f57 Author: Adam Jackson Date: Fri Jun 16 15:44:41 2017 -0400 include: Remove some unused macros Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit d2e57f71ad16f1e677dd542a8bc0db87dfa9791d Author: Michel Dänzer Date: Mon Jun 19 19:05:32 2017 +0900 xfree86: Document BusID PCI domain format in ddxDesign.xml Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit 3b0fd9421add9f0ca8958ced0f39b2da21143c22 Author: Michel Dänzer Date: Mon Jun 19 19:05:31 2017 +0900 xfree86: Document BusID PCI domain format in xorg.conf manpage Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit 8e00dc59b51da7e0d3978c26b1884c4767aa2dc2 Author: Michel Dänzer Date: Mon Jun 19 19:05:30 2017 +0900 xfree86: Fix printing of PCI domain/bus in xf86MatchPciInstances It was attempting to use the @ format accepted by the BusID stanza, but the two values were swapped. Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit e905b19a53f96013c4417bec993a1dea5a3b0a5f Author: Michel Dänzer Date: Mon Jun 19 19:05:29 2017 +0900 xfree86: Print BusID stanza compatible bus IDs for found devices The PCI domain has to be specified like this: "PCI:@::" Example before: (--) PCI:*(0:0:1:0) 1002:130f:1043:85cb [...] (--) PCI: (0:1:0:0) 1002:6939:1458:229d [...] after: (--) PCI:*(0@0:1:0) 1002:130f:1043:85cb [...] (--) PCI: (1@0:0:0) 1002:6939:1458:229d [...] Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit fb212f2c1bcfb015112aa665dd1f25d9b80f86fc Author: Jon Turney Date: Sat Jun 17 14:32:30 2017 +0100 meson: Make VBE and VGAHW modules optional Don't build them on platforms where they aren't meaningful. Note that autoconf defines WITH_VGAHW when building the VGAHW module, but that doesn't seem to be used anywhere, so we just drop that. Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit 6d2b7d33678e7a881ebdb5ceb4a32509ad3ee930 Author: Jon Turney Date: Thu May 4 14:08:48 2017 +0100 meson: Restore stub ossupport Don't build BSD ossupport when there is no specific support, build stubs Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit 4212c884c423e5ce2cd3b4d67c0d656475fddc79 Author: Michel Dänzer Date: Fri Jun 16 11:30:03 2017 +0900 xfree86/modes: Use RRTransformEqual in xf86RandR12CrtcSet The memcmp didn't catch when e.g. only the filter changed. Tested by alternately running xrandr --output DVI-I-0 --scale-from 3840x2160 --filter bilinear xrandr --output DVI-I-0 --scale-from 3840x2160 --filter nearest Reviewed-by: Aaron Plattner commit 091af80be48c37f16c679d35fc12ad33e6b0cd74 Author: Aaron Plattner Date: Thu Jun 15 14:28:27 2017 -0700 randr: Use RRTransformEqual in RRCrtcPendingTransform Currently, RRCrtcPendingTransform returns false unless the transformation matrix itself is changing. This makes RRCrtcSet skip doing anything if the only thing that is changing is the transform filter. There's already a function for comparing RRTransformPtrs, so use that instead. Tested by running xrandr --output DP-1 --mode 1920x1080 --rate 144 --scale 0.5x0.5 --filter nearest follwed by xrandr --output DP-1 --mode 1920x1080 --rate 144 --scale 0.5x0.5 --filter bilinear Signed-off-by: Aaron Plattner Reviewed-and-Tested-by: Michel Dänzer commit ba336b24052122b136486961c82deac76bbde455 Author: Michal Srb Date: Wed May 24 15:54:42 2017 +0300 Xi: Do not try to swap GenericEvent. The SProcXSendExtensionEvent must not attempt to swap GenericEvent because it is assuming that the event has fixed size and gives the swapping function xEvent-sized buffer. A GenericEvent would be later rejected by ProcXSendExtensionEvent anyway. Signed-off-by: Michal Srb Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8caed4df36b1f802b4992edcfd282cbeeec35d9d Author: Michal Srb Date: Wed May 24 15:54:41 2017 +0300 Xi: Verify all events in ProcXSendExtensionEvent. The requirement is that events have type in range EXTENSION_EVENT_BASE..lastEvent, but it was tested only for first event of all. Signed-off-by: Michal Srb Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 215f894965df5fb0bb45b107d84524e700d2073c Author: Michal Srb Date: Wed May 24 15:54:40 2017 +0300 dix: Disallow GenericEvent in SendEvent request. The SendEvent request holds xEvent which is exactly 32 bytes long, no more, no less. Both ProcSendEvent and SProcSendEvent verify that the received data exactly match the request size. However nothing stops the client from passing in event with xEvent::type = GenericEvent and any value of xGenericEvent::length. In the case of ProcSendEvent, the event will be eventually passed to WriteEventsToClient which will see that it is Generic event and copy the arbitrary length from the receive buffer (and possibly past it) and send it to the other client. This allows clients to copy unitialized heap memory out of X server or to crash it. In case of SProcSendEvent, it will attempt to swap the incoming event by calling a swapping function from the EventSwapVector array. The swapped event is written to target buffer, which in this case is local xEvent variable. The xEvent variable is 32 bytes long, but the swapping functions for GenericEvents expect that the target buffer has size matching the size of the source GenericEvent. This allows clients to cause stack buffer overflows. Signed-off-by: Michal Srb Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 05442de962d3dc624f79fc1a00eca3ffc5489ced Author: Michal Srb Date: Wed May 24 15:54:39 2017 +0300 Xi: Zero target buffer in SProcXSendExtensionEvent. Make sure that the xEvent eventT is initialized with zeros, the same way as in SProcSendEvent. Some event swapping functions do not overwrite all 32 bytes of xEvent structure, for example XSecurityAuthorizationRevoked. Two cooperating clients, one swapped and the other not, can send XSecurityAuthorizationRevoked event to each other to retrieve old stack data from X server. This can be potentialy misused to go around ASLR or stack-protector. Signed-off-by: Michal Srb Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d82c3cee02a99cf7861d1effaa5c7d38683a7783 Author: Eric Anholt Date: Thu Jun 1 13:59:54 2017 -0700 travis: Enable ccache. We bind-mount the cache directory into the container. Cuts build time from about 4 minutes to 2. Signed-off-by: Eric Anholt commit 01dfb65ee2e34148718d3f95dfd4629024edba84 Author: Eric Anholt Date: Thu Jun 1 12:29:12 2017 -0700 travis: Add a build script for Travis CI. This currently does a meson build using a docker image I've prepared. The Dockerfile source is at: https://github.com/anholt/xserver-travis Docker proved to be necessary to cut the build time per Travis push. If some day we end up using meson in more of the X stack, we may be able to move more dependencies out of the docker image and into the CI build (putting the I in CI). Until then, we'll have to do docker image rebuilds when dependencies are added/updated. To enable Travis CI on your github repository, see the first two steps of the docs at: https://docs.travis-ci.com/user/getting-started/ Once you do that, pushing branches to your github repo will trigger builds, which will send you email if they fail. Current build status can be veiewed your account on travis-ci.org: https://travis-ci.org/anholt/xserver commit fda2b064a0ebd223e8a39fd19f5c5ad1da0776e8 Author: Eric Anholt Date: Thu Jun 1 12:29:11 2017 -0700 meson: Fix test for whether we've built glamor-EGL. This matches the test we use for going into the glamor_egl subdir in ../../meson.build. commit 75bf302ed20f4b9794f71f84c1da2b9fcd689356 Author: Eric Anholt Date: Fri Jun 2 09:12:41 2017 -0700 dmx: Remove includes of glxtokens.h Our top-level glx.h include already provides all of the tokens we use, and fixes redefinition warnings in the meson build. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit f3689f637f5ac0fb6c231a470e65b39aa5e9ba20 Author: Keith Packard Date: Wed May 17 09:57:29 2017 -0700 os: Set oc->fd to -1 when connection is closed This ensures that we don't use the now-closed file descriptor in the future. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit d05c754e1bde895589fb514d8f518afeccecbc05 Author: Keith Packard Date: Wed May 17 09:57:28 2017 -0700 os: Check oc->trans_conn before using oc->fd in YieldControlNoInput oc->trans_conn is set to NULL when the connection is closed. At this point, oc->fd is no longer valid and shouldn't be used. Move dereference of oc->fd up into YieldControlNoInput where the state of oc->trans_conn can be checked in a single place. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 448a5586e9235bee9648d89e4103ed48e6237c15 Author: Keith Packard Date: Wed May 17 09:57:27 2017 -0700 os: Don't call ospoll_listen/ospoll_mute after connection is closed In set_poll_client, check oc->trans_conn to make sure the connection is still running before changing the ospoll configuration of the file descriptor in case some other bit of the server is now using this file descriptor. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 523d35e3e1c703a655386f6348a4bfb4291c3969 Author: Keith Packard Date: Wed May 17 09:57:26 2017 -0700 os: Use CloseDownFileDescriptor from AbortClient, including ospoll_remove AbortClient performs most of the same operations as CloseDownFileDescriptor except that it doesn't call ospoll_remove, leaving that unaware that the file descriptor has been closed. If the file descriptor is re-used before the server comes back around to clean up, and that new file descriptor is passed to SetNotifyFd, then that function will mistakenly re-interpret the stale ClientPtr returned by ospoll_data as a struct notify * instead and mangle data badly. To fix this, the patch does: 1) Change CloseDownFileDescriptor so that it can be called multiple times on the same OsCommPtr. The calls related to the file descriptor are moved inside the check for trans_conn and oc->trans_conn is set to NULL after cleaning up. 2) Move the XdmcpCloseDisplay call into CloseDownFileDescriptor. I don't think the actually matters as we just need to know at some point that the session client has exited. Moving it avoids the possibility of having this accidentally trigger from another client with the same fd which closes down at around the same time. 3) Change AbortClient to call CloseDownFileDescriptor. This makes sure that all of the fd-related clean up happens in the same way everywhere, in particular ensures that ospoll is notified about the closed file descriptor at the time it is closed and not some time later. Debian-bug: https://bugs.debian.org/862824 Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 5d941ccb0b30399d505b48bff894c95cc3023bbe Author: Keith Packard Date: Wed May 17 09:57:25 2017 -0700 os: Eliminate ConnectionTranslation This infrastructure is no longer read, only written; the mapping from fd to client is now handled by ospoll. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit c86fc56b10b603b41ae37057eedfa9c86b609752 Author: Keith Packard Date: Mon Jun 12 17:46:51 2017 -0700 glamor: Clarify variable names in glamor_copy_cpu_fbo This function creates a temporary pixmap to hold data being moved from the source to the destination. However, it labeled all of the variables associated with this as src_, which makes it confusing to read the code. Rename them tmp_ instead. Also fix the comment describing the function to note that it copies from CPU to GPU, not GPU to GPU. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit ffda82ed04d28feae2e001dbd0c32d6c795d90b1 Author: Michel Dänzer Date: Tue Jun 6 18:42:06 2017 +0900 glamor: Fix temporary pixmap coordinate offsets The previous values happened to work in basic cases, but not in general if the destination is a subwindow or has a border. Fixes crash with xli, which moves a large subwindow inside a smaller parent window for scrolling. No regressions with xterm, x11perf -copyplane or the xscreensaver phosphor hack. Bug: https://bugs.debian.org/857983 Reviewed-by: Keith Packard commit d4995a3936ae283b9080fdaa0905daa669ebacfc Author: Adam Jackson Date: Mon Jun 12 14:43:23 2017 -0400 modesetting: Validate the atom for enum properties The client could have said anything here, and if what they said doesn't actually name an atom NameForAtom() will return NULL, and strcmp() will be unhappy about that. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7c7a540f1e1d6b5466e1c9aa28476a2d7273d5ed Author: Jason Gerecke Date: Fri Jun 9 16:02:07 2017 -0700 xwayland: Implement tablet_tool_wheel for scrolling The 'tablet_tool_wheel' function for tablet scrolling was added back in 8a1defcc634 but left unimplemented. This commit fills in the necessary details, using the "clicks" count as the number of discrete scroll up/down events to send. Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit fbc9814975fe82be25becf1a55d4f8d34298a956 Author: Jason Gerecke Date: Fri Jun 9 16:02:06 2017 -0700 xwayland: Correct off-by-one error in tablet button numbering The 'tablet_tool_frame' function treats the button masks as though they are zero-indexed, but 'tablet_tool_button_state' treats them as one- indexed. The result is that an e.g. middle click event recieved from Wayland will be sent from the X server as a right-click instead. Fixes: 773b04748d0 ("xwayland: handle button events after motion events") Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d5e2f271ad93e50412ff3605fb25cb9622f437e0 Author: Carlos Garnacho Date: Sun May 28 15:56:22 2017 +0200 xwayland: Remove two unused proc pointers. Xwayland doesn't override these, so we don't need defining those in the xwl_screen struct. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 95febc42cadf392a888104ad6d5cf4f34fdde7d5 Author: Carlos Garnacho Date: Sun May 28 15:56:21 2017 +0200 Xi: Use WarpPointerProc hook on XI pointer warping implementation Just like we do with XWarpPointer's. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit ca17f3e9fd3b59fdc5ffd0e5d78e4db6ddc87aa1 Author: Carlos Garnacho Date: Sun May 28 15:56:20 2017 +0200 xwayland: Lock the pointer if it is confined and has no cursor In the typical pattern in games of "hide cursor, grab with a confineTo, warp constantly the pointer to the middle of the window" the last warping step is actually rather optional. Some games may choose to just set up a grab with confineTo argument, and trust that they'll get correct relative X/Y axis values despite the hidden cursor hitting the confinement window edge. To cater for these cases, lock the pointer whenever there is a pointer confinement and the cursor is hidden. This ensures the pointer position is in sync with the compositor's when it's next shown again, and more importantly resorts to the relative pointer for event delivery. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 513e3bd3870fdb8a8e0e2e52c0fa93872300bc8b Author: Carlos Garnacho Date: Sun May 28 15:56:19 2017 +0200 xwayland: Update root window size when desktop size changes This fixes grabs on InputOnly windows whose parent is the root window failing with GrabNotViewable. This is due to window->borderSize/windowSize being computed as clipped by its parent, resulting in a null region. Setting up the right size on the root window makes the InputOnly size correct too, so the GrabNotViewable paths aren't hit anymore. Signed-off-by: Carlos Garnacho Acked-by: Peter Hutterer Signed-off-by: Peter Hutterer commit fafdb0cc9697eb53635ed1e78bec1d4cd87ab3a2 Author: Carlos Garnacho Date: Sun May 28 15:56:18 2017 +0200 xwayland: "Accept" confineTo on InputOnly windows Of sorts, actually make it confine to the pointer focus, as the InputOnly window is entirely invisible to xwayland accounting, we don't have a xwl_window for it. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c217fcb4c4640ffd2fefee63c6fcd7ea5e64b942 Author: Carlos Garnacho Date: Sun May 28 15:56:17 2017 +0200 xwayland: Allow pointer warp on root/None window Of sorts, as we can't honor pointer warping across the whole root window coordinates, peek the pointer focus in these cases. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f065721e6fa6e9057cca4eadaf145a4dc22a08d2 Author: Carlos Garnacho Date: Sun May 28 15:56:16 2017 +0200 dix: assume warping on the RootWindow always happens on visible coords If the root window borderClip region is null, the PointInWindowIsVisible() check fails if pointer warping is attempted on the root window, making the warping operation bail out early. Assume coordinates always lay inside the root window for this case, the actual position will be clamped later within screen coordinates anyway. Signed-off-by: Carlos Garnacho Acked-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7c88977d338a01aca866e52c9e736f8857fb9ae4 Author: Michel Dänzer Date: Fri May 26 12:30:13 2017 +0900 glamor: Store the actual EGL/GLX context pointer in lastGLContext Fixes subtle breakage which could sometimes trigger after a server reset with multiple screens using glamor: Screen A enters glamor_close_screen last and calls various cleanup functions, which at some point call glamor_make_current to make sure screen A's GL context is current. This sets lastGLContext to screen A's &glamor_priv->ctx. Finally, glamor_close_screen calls glamor_release_screen_priv, which calls free(glamor_priv). Later, screen B enters glamor_init, which allocates a new glamor_priv. With bad luck, this can return the same pointer which was previously used for screen A's glamor_priv. So when screen B's glamor_init calls glamor_make_current, lastGLContext == &glamor_priv->ctx, so MakeCurrent isn't called for screen B's GL context, and the following OpenGL API calls triggered by glamor_init mess up screen A's GL context. The observed end result of this was a crash in glamor_get_vbo_space because glamor_priv->vbo didn't match the GL context, though there might be other possible outcomes. Assigning the actual GL context pointer to lastGLContext prevents this by preventing the false negative test in glamor_make_current. Reviewed-by: Keith Packard Reviewed-by: Eric Anholt commit d164c10850609c96fd46c8441efd40940b06dfe0 Author: Michel Dänzer Date: Thu May 25 16:19:35 2017 +0900 xfree86: Add Option "PreferCloneMode" When the default behaviour was changed from clone mode to horizontal extended layout, a boolean ScrnInfoRec member preferClone was introduced to choose the old default behaviour. Option "PreferCloneMode" allows setting this preferClone member. Reviewed-by: Alex Deucher commit 87db150d8a572d8983a234663aaaab9cb8b6c98d Author: Eric Anholt Date: Thu Jun 1 10:07:55 2017 -0700 glamor: Remove the "delayed fallback" code. The usage of this died with the old core rendering code. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 72ddad7a97fa062bf9967d221c9a5520ebe33352 Author: Eric Anholt Date: Wed May 17 11:36:07 2017 -0700 glamor: Drop glamor_set_screen_pixmap(). All that was left here was updating the FBO's size. However, the FBO size was always set correctly already through glamor_set_pixmap_texture() from whoever had attached a new BO to the pixmap. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 49b12cb7360608b14caef5facb12f146d0bd15e6 Author: Eric Anholt Date: Wed May 17 11:33:16 2017 -0700 glamor: Stop tracking the screen_fbo. This means we no longer get "s" for on-screen drawing in glamor_debug, and there's only "m" (CPU memory) or "f" (Any GPU memory, aka FBOs). That seems fine to me. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit fd0d2523a33620b36cd478925ddac5cf70f9c409 Author: Eric Anholt Date: Tue May 9 15:33:21 2017 -0700 glamor_egl: Stop saving the EGL major/minor version. We don't use them for anything. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 1f38a31ed3969471cbed69c61edb971f6cff5287 Author: Jon Turney Date: Sun May 7 20:53:04 2017 +0100 Add meson.build for XWin server (v2) This needs a meson with PRs #1784, #1792 and #1794 Future work: remove conditionals which are always on, and simplify redundant CYGDEBUG conditionals Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit 36b9dac212a0f8a287cdbd35db152a5eb5cbc744 Author: Jon Turney Date: Tue May 9 12:59:19 2017 +0100 hw/xwin: Remove pretense of Xv support Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit 793af4d3f945b1d59eb2f84e625b581ea90b0066 Author: Jon Turney Date: Sun May 7 20:31:55 2017 +0100 hw/xwin: Don't unconditionally include rootless.h Don't unconditionally include rootless.h, and so we don't need to add rootless to the include path unless building MWEXTWM. Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit d8ccfb132602be88e640cc87ea58496e0445aab7 Author: Eric Anholt Date: Thu Jun 1 16:46:02 2017 -0700 meson: Fix enabling of xshmfence. I misspelled the enable flag, so DRI3 would throw BadImplementation when you tried to start any GL app. Same as in c7be7a688a78a34f61b90c0d95914e14b90b0cdc, we also convert it to #ifdef for consistency. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 4f29366f1e5678505fb882143c9b4a892d5b8273 Author: Lyude Date: Tue May 30 16:39:49 2017 -0400 xwayland: Don't load extension list more than once When running an Xwayland server from the command line, we end up resetting the server every time all of the clients connected to the server leave. This would be fine, except that xwayland makes the mistake of unconditionally calling LoadExtensionList(). This causes us to setup the glxExtension twice in a row which means that when we lose our last client on the second server generation, we end up trying to call the glx destructors twice in a row resulting in a segfault: (EE) (EE) Backtrace: (EE) 0: Xwayland (OsSigHandler+0x3b) [0x4982f9] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x70845bf] (EE) 2: /usr/lib64/dri/swrast_dri.so (__driDriverGetExtensions_virtio_gpu+0x32897d) [0x1196e5bd] (EE) 3: /usr/lib64/dri/swrast_dri.so (__driDriverGetExtensions_virtio_gpu+0x328a45) [0x1196e745] (EE) 4: /usr/lib64/dri/swrast_dri.so (__driDriverGetExtensions_virtio_gpu+0x32665f) [0x11969f7f] (EE) 5: Xwayland (__glXDRIscreenDestroy+0x30) [0x54686e] (EE) 6: Xwayland (glxCloseScreen+0x3f) [0x5473db] (EE) 7: Xwayland (glxCloseScreen+0x53) [0x5473ef] (EE) 8: Xwayland (dix_main+0x7b6) [0x44c8c9] (EE) 9: Xwayland (main+0x28) [0x61c503] (EE) 10: /lib64/libc.so.6 (__libc_start_main+0xf1) [0x72b1401] (EE) 11: Xwayland (_start+0x2a) [0x4208fa] (EE) 12: ? (?+0x2a) [0x2a] (EE) (EE) Segmentation fault at address 0x18 (EE) Fatal server error: (EE) Caught signal 11 (Segmentation fault). Server aborting (EE) Easy reproduction recipe: - Start an Xwayland session with the default settings - Open a window - Close that window - Open another window - Close that window - Total annihilation occurs Signed-off-by: Lyude Reviewed-by: Michel Dänzer Signed-off-by: Peter Hutterer commit 2fbf62b2fb3dcb29551251d09aa695715bb754f4 Author: Jason Gerecke Date: Fri May 26 14:27:19 2017 -0700 xfree86: Fix interpretation of xf86WaitForInput timeout Commit aa6717ce2 switched xf86WaitForInput from using select(2) to using poll(2). Before this change, the timeout was interpreted as being in microseconds; afterwards it is fed directly to xorg_poll which interprets it as being in milliseconds. This results in the function potentially blocking 1000x longer than intended. This commit scales down the timeout argument before passing it to xorg_poll, being careful to ensure the result is not rounded down due to integer division. Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 96af794dc648eadcd596893412d7530e92cb5421 Author: Peter Hutterer Date: Fri May 5 09:04:35 2017 +1000 xfree86: up the path name size to 512 in xf86MatchDriverFromFiles ./hw/xfree86/common/xf86pciBus.c: In function ‘xf86MatchDriverFromFiles’: ../hw/xfree86/common/xf86pciBus.c:1330:52: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] snprintf(path_name, sizeof(path_name), "%s/%s", ^~~~~~~ ../hw/xfree86/common/xf86pciBus.c:1330:13: note: ‘snprintf’ output between 2 dirent->d_name is 256, so sprintf("%s/%s") into a 256 buffer gives us: and 257 bytes into a destination of size 256 Signed-off-by: Peter Hutterer commit bf3a591fdc5c98f7cab232bf5ec39902947ae2e5 Author: Peter Hutterer Date: Mon May 8 10:07:51 2017 +1000 fb: remove some superfluous empty lines Signed-off-by: Peter Hutterer commit 933d80ba93cf9b5d32ce8673d60810c128debdab Author: Adam Jackson Date: Thu May 18 11:19:53 2017 -0400 misprite: Clean up some preprocessor abuse Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Reviewed-by: Keith Packard commit 57c223002c61c8ceb84fa7a02a3c1579517996f3 Author: Adam Jackson Date: Thu May 18 11:19:52 2017 -0400 misprite: Remove some dead cache variables Unused since Keith ported misprite to damage in '04. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Reviewed-by: Keith Packard commit d0675e96f1fc8501324c88afa648a9d394f35587 Author: Eric Anholt Date: Tue May 16 11:37:23 2017 -0700 glamor_egl: Drop glamor_egl_create_textured_screen_ext(). The function hasn't been doing anything useful since keithp's resource freeing fixes in 2014. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit c36f56808ffbefc4a3dcf61dfad17f62aeb8e16c Author: Eric Anholt Date: Wed May 17 17:06:44 2017 -0700 glamor_egl: Automatically choose a GLES2 context if desktop GL fails. GLES2 support has been requested multiple times, and we've had this code laying around trying to implement it. The GLES2 implementation is not quite there yet (some pixel transfer failures), but it shouldn't take much fixing at this point. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit f6bf5f1c7475ff1b19b0e8c3e71c1224d5b6bc82 Author: Eric Anholt Date: Wed May 17 17:06:43 2017 -0700 glamor_egl: Remove check for KHR_surfaceless_context_* Those extensions don't exist. There's only surfaceless_context. Signed-off-by: Eric Anholt Reviewed-by: Emil Velikov commit 6e793ae08510639d011f638bcfc5246b9cccd1ae Author: Eric Anholt Date: Tue May 16 11:37:21 2017 -0700 glamor_egl: Drop warning about indirect GLX and GLES2. Indirect GLX uses its own context and doesn't care what glamor is using. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 59de50d6ef3331ee03eb82d4acba45aa75c70d42 Author: Eric Anholt Date: Tue May 16 11:37:20 2017 -0700 glamor_egl: Avoid flink names in glamor_egl_create_textured_pixmap(). Using flink is banned on render nodes, and they needlessly expose our screen pixmap contents to any authenticated client. This also incidentally drops the dependency on EGL_MESA_drm_image. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 5d6f17d913bd4de0b4594585c0a8ba4f717a2a78 Author: Eric Anholt Date: Tue May 16 11:37:19 2017 -0700 glamor_egl: Drop dead "cpp" field It's been unused since the initial import. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 37618e810b70c24bb8a97dce844963ed1a99f897 Author: Eric Anholt Date: Tue May 16 11:37:18 2017 -0700 glamor_egl: Drop dead gl_context_depth. This was replaced in 4afe15d8bfd575c010ed1868697a7922a37ab378, but not deleted. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit a6a751e5d8962b01abc2a92ec35300f68cb38d94 Author: Eric Anholt Date: Tue May 16 11:37:17 2017 -0700 glamor_egl: Drop unnecessary check for KHR_gl_renderbuffer_image. I couldn't find it being used anywhere in the history of the code. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 40a153ee452390f713f7e5638af320a70defe106 Author: Eric Anholt Date: Tue May 16 11:37:16 2017 -0700 glamor_egl: Always require the gbm-based image import path. This has been associated with dri3 for now, but we need to use it elsewhere in order to avoid flink. The extensions have been implemented for long enough that I couldn't find when it was that we turned them on. Oddly, we already required renderbuffer import support, which is basically as hard to implement as texture import. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt Acked-by: Daniel Stone commit b1b71b7a8b2d2c5d8f4afa67b75d10d4e7cbaa20 Author: Eric Anholt Date: Tue May 16 11:37:15 2017 -0700 glamor_egl: Drop the has_gem flag. We're using GBM, so we know we've got GEM. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 32957d9faeb8b0e968a23d91ed7391c0465dd1b9 Author: Eric Anholt Date: Tue May 16 11:37:14 2017 -0700 modesetting: Drop code for GLAMOR && !GLAMOR_HAS_GBM. The glamor_egl module that the GLAMOR paths are using is only built if GLAMOR_HAS_GBM is true, and there's no plan for implementing the module without GBM. Simplify modesetting's code as a result. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 5102ea38eb7331aeb1258cd148fd374cf0cbf8f2 Author: Eric Anholt Date: Tue May 16 11:37:13 2017 -0700 glamor_egl: Unifdef GLAMOR_HAS_GBM. We only build this code with GBM, and supporting non-GBM well would be invasive. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 5064153c79d8b18767c0ade7635680a2f396f296 Author: Eric Anholt Date: Tue May 16 11:37:12 2017 -0700 glamor_egl: Print a useful identifying string on initialization. The EGL version is not used anywhere in the glamor code, so it's not interesting. And when saying that we've started using GL acceleration, it's nice to know what GL we're actually using. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit fd96ff7fb325f54cb06c2bf5b8c37c75457b5c42 Author: Jon Turney Date: Tue Apr 18 10:44:55 2017 +0100 hw/xwin: Fix -Wunused-function warning for MessageName() in non-debug builds ../hw/xwin/winmultiwindowwm.c:188:1: warning: ‘MessageName’ defined but not used [-Wunused-function] Signed-off-by: Jon Turney Reviewed-by: Yaakov Selkowitz commit e49f5947eda578d8b029f42fb4ec9c90f413b4b3 Author: Jon Turney Date: Tue Apr 18 10:45:07 2017 +0100 hw/xwin: Fix -Wmaybe-uninitialized warnings in engine CloseScreen wrappers ../hw/xwin/winshadgdi.c: In function ‘winCloseScreenShadowGDI’: ../hw/xwin/winshadgdi.c:632:12: warning: ‘fReturn’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winshadgdi.c:579:10: note: ‘fReturn’ was declared here ../hw/xwin/winshadddnl.c: In function ‘winCloseScreenShadowDDNL’: ../hw/xwin/winshadddnl.c:711:12: warning: ‘fReturn’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winshadddnl.c:661:10: note: ‘fReturn’ was declared here Signed-off-by: Jon Turney Reviewed-by: Yaakov Selkowitz commit 319daa7a9fa8bcfdefb08d7770912775af22ad99 Author: Jon Turney Date: Wed Apr 19 13:30:27 2017 +0100 hw/xwin: Fix -Wmaybe-uninitialized warning in winWindowProc This is possibly an actual bug in failing to check we successfully retrieved the monitor size before using it to set the X screen size. ../hw/xwin/winwndproc.c: In function ‘winWindowProc’: ../hw/xwin/winwndproc.c:283:55: warning: ‘dwHeight’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winwndproc.c:240:32: note: ‘dwHeight’ was declared here ../hw/xwin/winwndproc.c:281:54: warning: ‘dwWidth’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winwndproc.c:240:23: note: ‘dwWidth’ was declared here Signed-off-by: Jon Turney Reviewed-by: Yaakov Selkowitz commit 7a90c9b24e6776c8f1fa43df4268f79a465c0d4e Author: Jon Turney Date: Tue Apr 18 10:32:31 2017 +0100 xfree86: Hide unused variables when !XSERVER_LIBPCIACCESS ../hw/xfree86/common/xf86Config.c: In function ‘xf86HandleConfigFile’: ../hw/xfree86/common/xf86Config.c:2278:10: warning: unused variable ‘singlecard’ [-Wunused-variable] ../hw/xfree86/common/xf86Config.c:2277:17: warning: unused variable ‘scanptr’ [-Wunused-variable] Signed-off-by: Jon Turney Reviewed-by: Yaakov Selkowitz commit 7a19a3e093a62a779c3cab8c28930adcb1604e0d Author: Peter Hutterer Date: Mon May 8 10:24:34 2017 +1000 xfree86: build a shared lib identical to Xorg Because we can use a shared lib in dlsym() for the symbol loader test, but we can't use the executable. v2: Drop a stray ' ' and rebase on 820a4cbe9fe, by anholt Signed-off-by: Peter Hutterer Reviewed-by: Eric Anholt commit 49c742557457ff9200a10f32daadfcea50d4911c Author: Adam Jackson Date: Thu May 11 17:17:55 2017 -0400 meson: Fix CLOCK_MONOTONIC test C99 isn't enough on its own to get POSIX feature sets defined. Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau Tested-by: Pekka Paalanen commit 152375f4e4f1ee4833129802730b36af8d0f7e1a Author: Adam Jackson Date: Thu May 11 17:17:54 2017 -0400 os, xfree86: Stop being so weird about Whatever problem this is trying to fix, we don't care. Just include the thing and stop worrying about whether _POSIX_SOURCE is defined. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith Reviewed-by: Julien Cristau Tested-by: Pekka Paalanen commit d9e23ea4228575344e3b4c0443cecc5eb75356e4 Author: Keith Packard Date: Wed May 10 21:50:45 2017 -0700 dix: Remove clients from input and output ready queues after closing Delay removing the client from these two queues until all potential I/O has completed in case we mark the client as ready for reading or with pending output during the close operation. Bugzilla: https://bugs.freedesktop.org/100957 Signed-off-by: Keith Packard Tested-by: Nick Sarnie Reviewed-by: Michel Dänzer commit c394f6b27329d212d2a8b9b3c6da1ef7847c46f3 Author: Julien Cristau Date: Thu May 11 08:42:16 2017 +0200 Replace all checks for 'linux' macro with '__linux__' gcc -std=c99 does not define the former, and it's a horrible namespace confusion anyway. Signed-off-by: Julien Cristau Reviewed-by: Adam Jackson Tested-by: Pekka Paalanen commit 6634ffc4d26846dcf892f27682f9021f6d9956a9 Author: Julien Cristau Date: Thu May 11 08:42:15 2017 +0200 Drop workaround for pre-glibc linux It seems unlikely anyone still needs to build against libc4/libc5. Reviewed-by: Adam Jackson Signed-off-by: Julien Cristau commit 318257029578a30e29c191befa94a20ad07f97d4 Author: Frank Binns Date: Thu May 11 14:00:19 2017 +0100 hw/xfree86: fix comment typo Signed-off-by: Frank Binns commit 0848390d51f93ecfb9342cffe1cda46a65cfc07b Author: Adam Jackson Date: Wed May 10 11:14:57 2017 -0400 xephyr: Fix regeneration I had said: commit c42311a9d7d2e5a67bdb7f4fa32032b4feba59b1 Author: Adam Jackson Date: Fri Mar 24 15:58:54 2017 -0400 kdrive: Remove KdOsFuncs Only the Init slot was used, and Xephyr can just as easily do that initialization directly. And I'd've been right, but I forgot to make that initialization only happen on startup (i.e. when serverGeneration == 1). Reviewed-and-Tested-by: Michel Dänzer Signed-off-by: Adam Jackson commit 0ff2fb128bf35dffaa302f15e9ae004b65ee0827 Author: Peter Harris Date: Tue May 9 19:39:47 2017 -0400 meson: Detect strlcat/strlcpy/reallocarray in libbsd If we're linking with libbsd anyway, we might as well use the functions it provides instead of compiling our replacements. Signed-off-by: Peter Harris Reviewed-by: Eric Anholt commit c4c002d1ca80bd69776387dafb9c5bb082c72e48 Author: Peter Harris Date: Tue May 9 19:39:46 2017 -0400 meson: Only detect each function once Use conf_data outside of include/ to avoid re-running detection of the same functions. Reviewed-by: Eric Anholt Signed-off-by: Peter Harris commit 03d6275e6094a5ede5a70f05bbbdde653a9fd9e0 Author: Peter Harris Date: Tue May 9 19:39:45 2017 -0400 meson: Detect more functions Set HAVE_REALLOCARRAY, HAVE_SIGACTION, HAVE_STRCASESTR, HAVE_STRLCAT, HAVE_STRLCPY, HAVE_TIMINGSAFE_MEMCMP, and BUSFAULT. Reviewed-by: Eric Anholt Signed-off-by: Peter Harris commit ba1599610b1889545be8a9314dce8a740a2764d3 Author: Peter Harris Date: Tue May 9 19:39:44 2017 -0400 meson: Detect arc4random_buf Reviewed-by: Eric Anholt Signed-off-by: Peter Harris commit e67ca940473e249c7b9712ce6d515310ed1e4cf9 Author: Jon TURNEY Date: Mon May 8 11:40:22 2017 +0100 meson: An empty array is not a dependency object Using the meson idiom of initializing a variaible to an empty array to represent a null value does not work well for a variable expected to hold a dependency object, as trying to apply found() to it will fail (currently). I think this can be demonstrated by configuing with Dglamor=no, then gbm_dep is set to [] in meson.build, and then tested with found() in include/meson.build. Use dependency('') to create an empty dependency. Future work: In the autotools build GBM is required if build_xorg & build_glamor. I suspect that it was also required for build_xwayland & build_glamor, but that was never checked. That test seems to have gone missing in meson.build, the required:false when checking for gbm should possibly be dropped? Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit 16054647abfc9fe5f71d0098e17415e45fa28199 Author: Jon TURNEY Date: Mon May 8 11:40:21 2017 +0100 meson: Refine build_dbus As in autotools build, only turn on build_dbus (build dbus-core.c) if it's needed by build_hal or build_systemd_logind, not just because dbus is available. Building dbus-core.c without NEED_DBUS defined fails, as the contents of dbus-core.h are turned off. Signed-off-by: Jon Turney Acked-by: Eric Anholt commit 820a4cbe9fef36bc97a7107ccc74a785180e227a Author: Jon TURNEY Date: Tue May 9 12:23:48 2017 +0100 meson: Make driprotos and libdrm optional Add options for DRI{1,2,3} shmfence is required for DRI3 libdrm is required for any DRI{1,2,3} Consolidate calls to dependency('libdrm') Set WITH_LIBDRM when building with libdrm v2: Initialize libxserver_dri3 to [] Manually flatten libxserver, since meson doesn't (currently) Use version_compare rather than circumloctions with dependency() Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit fdb11e2274f1d1069cdc9ff7b3655288c1b42cf4 Author: Jon TURNEY Date: Mon May 8 11:40:18 2017 +0100 meson: Don't require xf86dgaproto This dependency is never used, and build_dga is hardwired to false later on, anyhow. Reviewed-by: Eric Anholt Signed-off-by: Jon Turney commit 5bff2a68560837fc402905fef6244ce794c47843 Author: Jon TURNEY Date: Mon May 8 11:40:17 2017 +0100 meson: Nettle is required if it's the only SHA1 choice Reviewed-by: Eric Anholt Signed-off-by: Jon Turney commit 95e5fa04762fa0f04ac1349708d9e33c30205a96 Author: Jon TURNEY Date: Mon May 8 11:40:16 2017 +0100 meson: Remove stray whitespace Reviewed-by: Eric Anholt Signed-off-by: Jon Turney commit e9dbecf7c259f7e8b610fa93f97ea55f5dafa7af Author: Adam Jackson Date: Wed May 10 10:56:16 2017 -0400 timingsafe_memcmp: Fix meson build Include dix-config.h first to pick up _GNU_SOURCE so we get the definition for sigset_t. Reported-by: Pekka Paalanen Signed-off-by: Adam Jackson commit 5d3b6cc221aff5b9322b31aa6f5ae922271bc7d8 Author: Karol Kosik Date: Wed Jul 22 16:42:07 2015 -0700 xfree86: Improved autoconfig drivers matching Implementation of new drivers matching algorithm. New approach doesn't add duplicate drivers and ease drivers matching phase. v2: Re-commit the patch reverted in 2388f5e583d4ab2ee12f2b087d381b64aed3f7d5, with Aaron Plattner's fix squashed in (by anholt). Signed-off-by: Karol Kosik Signed-off-by: Aaron Plattner Signed-off-by: Eric Anholt Reviewed-by: Aaron Plattner (v1) Reviewed-by: Emil Velikov (v1) Tested-by: Peter Hutterer Tested-by: Eric Anholt commit 2388f5e583d4ab2ee12f2b087d381b64aed3f7d5 Author: Eric Anholt Date: Tue May 9 13:37:59 2017 -0700 Revert "xfree86: Improved autoconfig drivers matching" This reverts commit 112d0d7d01b98fb0d67910281dd1feeec125247b. It broke Xorg for Adam, Peter, and myself, by failing hard when a module load failed. Signed-off-by: Eric Anholt commit 1dd14e7a499428cf7215b49a9319199545bcd6cb Author: Eric Anholt Date: Mon May 8 10:36:30 2017 -0700 meson: Use link_whole() not link_with(), for the Xorg dixmods. I clearly hadn't run ninja test, since fb no longer had any of the fb symbols in it. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit a06bb73053d9df56d9070ce325a43af3a3c7a6a2 Author: Lyude Date: Thu May 4 18:04:31 2017 -0400 xwayland: Unconditionally initialize lists in init_tablet_manager_seat() In the event that xwayland gets launched on a wayland compositor that doesn't yet have support for wp_tablet_manager, we end up skipping the initialization of the lists. This is wrong, because regardless of whether or not a tablet is present we still attempt to traverse these lists later in xwl_set_cursor(), expecting that if the lists are empty from no tablet manager that we simply won't execute any loop iterations. (EE) (EE) Backtrace: (EE) 0: Xwayland (OsSigHandler+0x3b) [0x4982f9] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x7f73722545bf] (EE) 2: Xwayland (xwl_set_cursor+0x9f) [0x429974] (EE) 3: Xwayland (miPointerUpdateSprite+0x261) [0x4fe1ca] (EE) 4: Xwayland (mieqProcessInputEvents+0x239) [0x4f8d33] (EE) 5: Xwayland (ProcessInputEvents+0x9) [0x4282f0] (EE) 6: Xwayland (Dispatch+0x42) [0x43e2d4] (EE) 7: Xwayland (dix_main+0x5c9) [0x44c6dc] (EE) 8: Xwayland (main+0x28) [0x61c523] (EE) 9: /lib64/libc.so.6 (__libc_start_main+0xf1) [0x7f7371e9d401] (EE) 10: Xwayland (_start+0x2a) [0x4208fa] (EE) 11: ? (?+0x2a) [0x2a] (EE) (EE) Segmentation fault at address 0x28 (EE) Fatal server error: (EE) Caught signal 11 (Segmentation fault). Server aborting (EE) Reproduced when trying to run upstream xwayland under fedora 25's weston package. Signed-off-by: Lyude Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5f83b951ac7e0e6bbd766a9bb860283e32808c90 Author: Jon TURNEY Date: Thu May 4 13:46:26 2017 +0100 meson: Fix typo in xephyr option description Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit ce6741f6ac63493d6b903f8f58b83bf571baf4b9 Author: Jon TURNEY Date: Thu May 4 13:46:25 2017 +0100 meson: Fix typoed filename Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit 492534813302ef95538f485401fbcf6eccbd0026 Author: Jon TURNEY Date: Thu May 4 13:46:24 2017 +0100 meson: Make xf86vidmode optional Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit 3b3ce4a55b0c1f83eff37fb8544156e8961f3fa3 Author: Jon TURNEY Date: Thu May 4 13:46:23 2017 +0100 meson: Test to build xserver_poll.c was inverted Test to build xserver_poll.c was inverted compared to autoconf. Build xserver_poll.c if poll is missing. Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit 4b7dd6d1aa53bdeee2e3fd0c0a73f6ce40495682 Author: Adam Jackson Date: Wed May 3 15:40:08 2017 -0400 Makefile.am: make 'make distcheck' verify the meson build Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Signed-off-by: Peter Hutterer commit 111a5615a60565f7b68a7fa69dbac3d289d80c9e Author: Peter Hutterer Date: Wed May 3 15:40:07 2017 -0400 Makefile.am: add the meson files to the tarball While we're shipping both build systems, we'll likely have 'make dist' generated tarballs - those tarballs should be buildable with meson to have more exposure. List them all explicitly since the list isn't likely to change much. Signed-off-by: Peter Hutterer Reviewed-by: Eric Engestrom Reviewed-by: Eric Anholt commit 11c133aafe63c776bde502057243d67fe2c630c8 Author: Eric Anholt Date: Wed May 3 15:33:46 2017 -0700 meson: Fix kdrive build. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit b7376fb933ac1b0c1771535c14cf77029eccb7f5 Author: Adam Jackson Date: Fri Mar 24 15:58:55 2017 -0400 kdrive: Remove dead slots from KdCardFuncs Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit c42311a9d7d2e5a67bdb7f4fa32032b4feba59b1 Author: Adam Jackson Date: Fri Mar 24 15:58:54 2017 -0400 kdrive: Remove KdOsFuncs Only the Init slot was used, and Xephyr can just as easily do that initialization directly. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c0375dced38674ed98562529530d89ff02c48100 Author: Adam Jackson Date: Fri Mar 24 15:58:53 2017 -0400 kdrive: static and dead code cleanup Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d732c36597fab2e9bc4f2aa72cf1110997697557 Author: Adam Jackson Date: Thu Apr 27 14:45:25 2017 -0400 xfree86: Silence a new glibc warning glibc would like to stop declaring major()/minor() macros in because that header gets included absolutely everywhere and unix device major/minor is perhaps usually not what's expected. Fair enough. If one includes as well then glibc knows we meant it and doesn't warn, so do that if it exists. Signed-off-by: Adam Jackson commit c3147a20065b212fac78eb29c9bb9e150f9b22f5 Author: Adam Jackson Date: Thu Apr 27 14:45:24 2017 -0400 dmx: Fix decl mismatch for XRT_WINDOW Building xserver with meson -Db_lto=true found this! Check it: ../hw/dmx/dmx.c:66:22: warning: type of ‘XRT_WINDOW’ does not match original declaration [-Wlto-type-mismatch] extern unsigned long XRT_WINDOW; ^ ../include/resource.h:58:18: note: type ‘RESTYPE’ should match type ‘long unsigned int’ typedef uint32_t RESTYPE; ^ ../Xext/panoramiX.c:85:9: note: ‘XRT_WINDOW’ was previously declared here RESTYPE XRT_WINDOW; ^ ../Xext/panoramiX.c:85:9: note: code may be misoptimized unless -fno-strict-aliasing is used I have never managed successfully to build xserver with LTO with autotools, so, score one for meson. Get the decl from panoramiXsrv.h, which includes panoramiX.h first anyway. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit ea275cd3d5fb561c6aed7876f486e1124082426c Author: Eric Anholt Date: Fri Apr 28 15:09:38 2017 -0700 meson: Fix glx build with DRI2 disabled. A common meson pattern is to use empty arrays for optional sources and dependencies, since it generally iterates over trees of arrays looking for values. A value of '' will actually go looking for ''. Daniel Stone Signed-off-by: Eric Anholt commit 62f727c7ea359b7bdf58d9b827731a082b47553d Author: Eric Anholt Date: Fri Apr 28 15:09:37 2017 -0700 meson: use link_with for Xorg's shared modules as well as Xorg. I converted Xorg when meson 0.40 came out, but fumbled my grep and forgot that I had instances of the .extract_all_objects() workaround in dixmods, too. Signed-off-by: Eric Anholt Reviewed-by: Daniel Stone commit e2f68296ffb8e40035c0ebd949b67d1e2e424e11 Author: Keith Packard Date: Sat Apr 29 00:26:10 2017 -0700 os: Mark client as ready to read when closing due to write failure [100863] This makes sure the server will go look at the client again, notice that the FD is no longer valid and close the client down. Bugzilla: https://bugs.freedesktop.org/100863 Signed-off-by: Keith Packard Reviewed-and-Tested-by: Michel Dänzer commit a82971b07035ee9a4e3ed01326e7c1eab34b5a19 Author: Keith Packard Date: Sat Apr 29 00:21:47 2017 -0700 os: un-duplicate code to close client on write failure There are three copies of the same short sequence of operations to close down a client when a write error occurs. Create a new function, AbortClient, which performs these operations and then call it from the three places. Signed-off-by: Keith Packard Reviewed-and-Tested-by: Michel Dänzer commit 8475e6360ce31551d50fd63a26f7a44d1e8928f2 Author: Peter Hutterer Date: Tue Feb 7 15:04:46 2017 +1000 xwayland: add tablet pad support Hooked up a bit differently to the other tools. Those tools can be static for all and be re-used. The wacom driver initializes the pad with the correct number of buttons though and we can't do this until we have the pad done event. If the tablet is removed and we plug a different one in, we should initialize that correctly, so unlike the other tools the pad is properly removed and re-initialized on plug. Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit f471b5b8eb451b442554517c7cb6f0aa90d218c4 Author: Carlos Garnacho Date: Fri Nov 4 19:58:04 2016 +0100 xwayland: update cursor on tablet tools in proximity Each xwl_tablet_tool gets a xwl_cursor, as on wayland each of those will get an independent cursor that can be set through zwp_tablet_tool.set_cursor. However, all tools (and the pointer) share conceptually the same VCP on Xwayland, so have cursor changes trigger a xwl_cursor update on every tool (and the pointer, again). Maybe Xwayland could keep track of the most recent device and only update that cursor to get better visual results, but this is simpler, and it's going to be odd anyway... Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 6d1ad39fe6c18220dd39b0653fd1e4145140e2dc Author: Carlos Garnacho Date: Fri Nov 4 19:36:10 2016 +0100 xwayland: Refactor cursor management into xwl_cursor This struct takes away the cursor info in xwl_seat, and has an update function so we can share the frame handling code across several xwl_cursors. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 773b04748d0c839bc8b12e33f74bb8d11c447f5b Author: Peter Hutterer Date: Tue Feb 7 12:23:46 2017 +1000 xwayland: handle button events after motion events Make sure the button events are sent after the motion events into the new position. Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 8a1defcc634daddbb3570519d69ec5c9e39a8b56 Author: Jason Gerecke Date: Fri Oct 14 14:31:46 2016 -0700 xwayland: Handle tablet_tool events Translates Wayland tablet events into corresponding X11 tablet events. As with the prior commit, these events are modeled after those created by the xf86-input-wacom driver to maximize compatibility with existing applications. Signed-off-by: Jason Gerecke Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 5812d1c28f4fb7b7de8b96a81415a21425561fd4 Author: Jason Gerecke Date: Fri Jan 15 17:01:38 2016 -0800 xwayland: Handle wp_tablet events Creates and maintains the canonical trio of X devices (stylus, eraser, and cursor) to be shared by all connected tablets. A per-tablet trio could be created instead, but there are very few benefits to such a configuration since all tablets still ultimately share control of a single master pointer. The three X devices are modeled after those created by xf86-input-wacom but use a generic maximum X and Y that should be large enough to accurately represent values from even the largest currently-available tablets. Signed-off-by: Jason Gerecke Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 47c4415912b5b16b115135be365beb370858df76 Author: Jason Gerecke Date: Fri Oct 14 14:50:18 2016 -0700 xwayland: Listen for wp_tablet_seat events The wp_tablet_seat interface provides us with notifications as tablets, tools, and pads are connected to the system. Add listener functions and store references to the obtained devices. Signed-off-by: Jason Gerecke Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 7d48b758a601ce0252ebd21297a7c42263adfaaf Author: Jason Gerecke Date: Fri Jan 15 17:29:37 2016 -0800 xwayland: Bind to wp_tablet_manager if available and get its seats If we're notified about the existence of the wp_tablet_manager interface, we bind to it so that we can make use of any tablets that are (or later become) available. For each seat that exists or comes into existance at a later point, obtain the associated tablet_seat. Signed-off-by: Jason Gerecke Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 89c841915ac4fba6d2a5ad0051c778f1a76ffbf3 Author: Jason Gerecke Date: Thu Oct 13 10:39:46 2016 -0700 xwayland: Depend on wayland-protocols to build tablet protocol headers Signed-off-by: Jason Gerecke Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 59554eaa6c4d3d3c170a4be4fc385a86d05c5558 Author: Adam Jackson Date: Thu Apr 27 13:23:56 2017 -0400 meson: Build libvbe.so Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 2f1a1be46c3366a47657fe7550bc59fb99acf91c Author: Adam Jackson Date: Thu Apr 27 13:19:11 2017 -0400 meson: Build libshadowfb.so Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit bdce17959cd17fa6d46a1df361b53b5855ff62e8 Author: Adam Jackson Date: Thu Apr 27 13:15:55 2017 -0400 meson: Build libvgahw.so Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 5c7d92362b25670856091663e70d3e0dc2350efb Author: Adam Jackson Date: Thu Apr 27 13:10:33 2017 -0400 meson: Build libfbdevhw.so Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 6413a87bcd3bfb91ac1536b41c37af0c6e47a9b6 Author: Adam Jackson Date: Thu Apr 27 12:58:54 2017 -0400 meson: Build libwfb.so Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 1597297067fd14d479a2279ad1ab20082317271a Author: Adam Jackson Date: Thu Apr 27 12:50:13 2017 -0400 meson: Build libglx.so Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 47f047462dcb492203ff569a2b1528bff8cd3ff3 Author: Adam Jackson Date: Thu Apr 27 11:49:11 2017 -0400 meson: Fix linking the dmx utilities Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 5d785693a8843d18be806ea9f8caecc2dcbf1007 Author: Adam Jackson Date: Thu Apr 27 11:47:11 2017 -0400 meson: Factor out the AC_REPLACE_FUNCS stuff to its own library This is all just stuff we wish we had in libc, and some of this gets used in eg. the dmx utilities build, so split it to its own library to avoid pulling in xserver stuff. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 8659aac2ccc6649477f601908e1a4062fad8635e Author: Adam Jackson Date: Thu Apr 27 12:52:29 2017 -0400 meson: Fix a typo "bulid" isn't valid anything, and build_xwayland was already defined above. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 112d0d7d01b98fb0d67910281dd1feeec125247b Author: Karol Kosik Date: Wed Jul 22 16:42:07 2015 -0700 xfree86: Improved autoconfig drivers matching Implementation of new drivers matching algorithm. New approach doesn't add duplicate drivers and ease drivers matching phase. Signed-off-by: Karol Kosik Reviewed-by: Aaron Plattner Reviewed-by: Emil Velikov commit 1549e30372756cfdb85379fd8d93c769297ab6e6 Author: Eric Anholt Date: Sat Mar 11 10:24:04 2017 -0800 Add a Meson build system alongside autotools. This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest, and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but hasn't been built yet. The unit tests are also not done. The intent is to build this as a complete replacement for the autotools system, then eventually replace autotools. meson is faster to generate the build, faster to run the bulid, shorter to write the build files in, and less error-prone than autotools. v2: Fix indentation nits, move version declaration to project(), use existing meson_options for version-config.h's vendor name/web. Signed-off-by: Eric Anholt Acked-by: Keith Packard Reviewed-by: Peter Hutterer commit c7be7a688a78a34f61b90c0d95914e14b90b0cdc Author: Eric Anholt Date: Tue Apr 25 16:03:00 2017 -0700 Use #ifdef instead of #if for features to make Meson easier. We mostly use #ifdef throughout the tree, and this lets the generated config.h files just be #define TOKEN instead of #define TOKEN 1. Reviewed-by: Peter Hutterer Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit ace6bfd5901e19045371f9bd18b997b37f55b589 Author: Eric Anholt Date: Tue Apr 25 16:02:59 2017 -0700 dix: Remove a redundant #define Found when the meson conversion set the symbol to defined, instead of defined to 1. Reviewed-by: Peter Hutterer Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 27a6b9f7c84c914d0f5909ec1069d72f5035bc04 Author: Michel Dänzer Date: Wed Apr 26 18:31:08 2017 +0900 os: Handle SIGABRT Without this, assertion failures can make life hard for users and those trying to help them. v2: * Change commit log wording slightly to "can make life hard", since apparently e.g. logind can alleviate that somewhat. * Set default handler for SIGABRT in hw/xfree86/common/xf86Init.c:InstallSignalHandlers() and hw/xquartz/quartz.c:QuartzInitOutput() (Eric Anholt) Reviewed-by: Eric Anholt Signed-off-by: Michel Dänzer commit 23f2f1932a1d3f36468eaf735ae34934d246567b Author: Eric Anholt Date: Tue Apr 25 11:33:50 2017 -0700 modesetting: Add the "DPI" connector type. The number for it was merged to drm_mode.h in kernel 4.7, and the output_names[] array just requires that we slot in new strings in order. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit fec9607c8e0a84dc86466c638d00b502f21ec622 Author: Eric Anholt Date: Fri Apr 21 12:03:45 2017 -0700 Remove support for unaligned swaps. The previous misc.h code went out of its way to allow swapping of unaligned pointers to values. However, the members of an X request/response are always naturally aligned within the struct, and the buffers containing a request/response will also be aligned to at least 8 bytes, so we can just drop it. text data bss dec hex filename before: 2215167 51552 132016 2398735 249a0f hw/xfree86/Xorg after: 2214919 51552 132016 2398487 249917 hw/xfree86/Xorg Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 4552238960fc05ff885bcabbc24d1489370fbd89 Author: Eric Anholt Date: Tue Mar 28 13:09:30 2017 -0700 Add unit tests for the byte swapping macros. Peter noted a weirdness in my new bswap code, which could use some tests to justify it. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 563b6ee873b898c0f3e3671cf6adaf91def5d92a Author: Eric Anholt Date: Mon Mar 27 14:59:06 2017 -0700 Rewrite the byte swapping macros. The clever pointer tricks were actually not working, and we were doing the byte-by-byte moves in general. By just doing the memcpy and obvious byte swap code, we end up generating actual byte swap instructions, thanks to optimizing compilers. text data bss dec hex filename before: 2240807 51552 132016 2424375 24fe37 hw/xfree86/Xorg after: 2215167 51552 132016 2398735 249a0f hw/xfree86/Xorg Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 5ef4e785131bb30e774a8175099c0432537533fa Author: Eric Anholt Date: Fri Mar 31 17:38:27 2017 -0700 Remove default defines of some directories. The build defines these, so having the defaults is just a way for the build system's configuration to get out of sync with the code. v2: Drop #ifndefs around the other two defines. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit da27ca84b4324b68037d6ec19a73b9e0a5ef10bc Author: Eric Anholt Date: Fri Mar 31 17:33:52 2017 -0700 xorg: Change __XCONFIGFILE__ to XCONFIGFILE (and DIR) to fix scan.c. parser/scan.c was checking for #ifdef XCONFIGFILE and XCONFIGDIR and defaulting to "xorg.conf", and "xorg.conf.d", so if you had changed __XCONFIGFILE__ to anything else, it would have got out of sync. Settle on the name without gratuitous underscores. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f81343dd2fff49c70f53e3efdd40f8f89a38e460 Author: Alan Coopersmith Date: Sat Apr 22 18:10:42 2017 -0700 Mark test_data static in Xinput protocol tests to avoid clashes Fixes warning from Solaris linker: ld: warning: symbol 'test_data' has differing sizes: (file tests-protocol-xigetselectedevents.o value=0x418; file tests-protocol-xigetclientpointer.o value=0x18); tests-protocol-xigetselectedevents.o definition taken Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7bfb87a2137853295ecc9e544a15626cfd773a02 Author: Olivier Fourdan Date: Fri Apr 21 09:05:51 2017 +0200 glamor: an FBO is not needed for Xv pixmaps It appears that on some hardware/diver combo such as nv30/nouveau, using GL_ALPHA as format for 8-bit depth will cause an incomplete attachment error (GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT) when trying to bind the texture. As a result, the FBO is NULL and glamor segfaults when trying to access the FBO width/height in pixmap_priv_get_scale() in glamor_xv_render(). This happens with glamor-xv which uses 8-bit pixmaps, meaning that on such hardware/driver, trying to play a video using Xv will lead to a crash of the Xserver. This affects Xwayland, Xephyr, modesetting driver with glamor accel. But the use of an FBO is not actually needed for glamox-xv, so by disabling FBO at pixmap creation, we can avoid the issue entirely. Fix suggested by Eric Anholt Signed-off-by: Olivier Fourdan Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100710 Fixes: https://bugzilla.redhat.com/1412814 Reviewed-by: Eric Anholt commit be80a3cb48a7860b9ed985b123f4d8a3b4ae3c89 Author: Eric Anholt Date: Mon Mar 27 14:21:43 2017 -0700 glx: Use the same endian swapping as the rest of the server. This dumps a ton of configure-time checks for system endian macros. Given that we're marking the mixed-endian fixup code as cold, getting at the system macros is a waste of code. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit dae97e1bb4d4f86db118c22dfeea0eef0d3f8bdd Author: Eric Anholt Date: Thu Mar 23 17:06:17 2017 -0700 configure: Stop checking for XdmcpWrap As far back as the initial import, it seems to have been exposed, and there's no explanation why the test happened in the initial xserver import. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit cc882af336c8963a2cba0c93e29869ef59b19818 Author: Roman Gilg Date: Tue Apr 11 15:52:58 2017 +0200 xwayland: Small comment edit Be more precise in describing the return value. Signed-off-by: Roman Gilg Reviewed-by: Daniel Stone Signed-off-by: Peter Hutterer commit 41dafcc2a2942fc4c94ce3cbafc4a1b413c460c3 Author: Michel Dänzer Date: Wed Apr 12 17:58:05 2017 +0900 xfree86/modes: Make colormap/gamma glue code work with RandR disabled E.g. because Xinerama is enabled. Fixes crash on startup and wrong colours in that case. Bugzilla: https://bugs.freedesktop.org/100293 Bugzilla: https://bugs.freedesktop.org/100294 Fixes: 62f44052573b ("xfree86/modes: Move gamma initialization to xf86RandR12Init12 v2") Tested-by: Mariusz Bialonczyk Reviewed-by: Alex Deucher commit bcee1b76aa0db8525b491485e90b8740763d7de6 Author: Martin Peres Date: Mon Apr 10 16:48:21 2017 +0300 modesetting: re-set the crtc's mode when link-status goes BAD Despite all the careful planning of the kernel, a link may become insufficient to handle the currently-set mode. At this point, the kernel should mark this particular configuration as being broken and potentially prune the mode before setting the offending connector's link-status to BAD and send the userspace a hotplug event. This may happen right after a modeset or later on. Upon receiving a hot-plug event, we iterate through the connectors to re-apply the currently-set mode on all the connectors that have a link-status property set to BAD. The kernel may be able to get the link to work by dropping to using a lower link bpp (with the same display bpp). However, the modeset may fail if the kernel has pruned the mode, so to make users aware of this problem a warning is outputed in the logs to warn about having a potentially-black display. This patch does not modify the current behaviour of always propagating the events to the randr clients. This allows desktop environments to re-probe the connectors and select a new resolution based on the new (currated) mode list if a mode disapeared. This behaviour is expected in order to pass the Display Port compliance tests. Signed-off-by: Martin Peres Reviewed-by: Eric Anholt commit ea91996a9c2081d0692f5c2f79a9fda9effba358 Author: Daniel Stone Date: Tue Apr 11 07:55:00 2017 +0100 README: Add link to fd.o CoC The Contributor Covenant applies to all fd.o-hosted resources, including lists and Bugzilla. Add a note to the README, reminding people to act like human beings. Reviewed-by: Adam Jackson Signed-off-by: Daniel Stone commit 8bdf340e478524262c85fb81687d7f02b14ad71c Author: Daniel Stone Date: Tue Apr 11 07:54:59 2017 +0100 README: HTTPS everywhere All fd.o HTTP services are now HTTPS-only (with redirects, but still). Reviewed-by: Adam Jackson Signed-off-by: Daniel Stone commit 14d2fe74f4e51c5b37eab4b7475c804a0340b530 Author: Adam Jackson Date: Fri Apr 7 10:24:54 2017 -0400 xephyr: Check for host XVideo support before trying to use it Otherwise xcb will treat our attempt to send xv requests as a connection error (quite reasonably: we're asking it to emit a request for which there is no defined major opcode), and we'll die quietly the first time we hit KdBlockhandler. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 7dfb9608d080b46a7b21b57dc8aa2f52670addce Author: Adam Jackson Date: Wed Apr 5 13:21:10 2017 -0400 glx: Remove enter/leave server API Dead code since: commit 8aacf47e1778d8b72811b025a82452b933d3c1f2 Author: Adam Jackson Date: Fri Oct 4 12:58:19 2013 -0400 glx: Remove DRI1 AIGLX (v2) Signed-off-by: Adam Jackson commit 0c8e6ed85810e96d84173a52d628863802a78d82 Author: Daniel Stone Date: Fri Apr 7 14:27:58 2017 +0100 modesetting: Set correct DRM event context version DRM_EVENT_CONTEXT_VERSION is the latest context version supported by whatever version of libdrm is present. modesetting was blindly asserting it supported whatever version that may be, even if it actually didn't. With libdrm 2.4.78, setting a higher context version than 2 will attempt to call the page_flip_handler2 vfunc if it was non-NULL, which being a random chunk of stack memory, it might well have been. Set the version as 2, which should be bumped only with the appropriate version checks. Reviewed-by: Adam Jackson Signed-off-by: Daniel Stone commit e4d0757fc2620fd3182448c5e4b5a55a509594d3 Author: Adam Jackson Date: Wed Mar 29 11:35:32 2017 -0400 xfree86: Remove driver entity hooks and private No driver is using these, as far as I know. v2: Tripwire the entity hook arguments to xf86Config*Entity, fix documentation (Eric Anholt) Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 33604187674ec78b2c0bf7f67af250acc80cf23a Author: Adam Jackson Date: Fri Mar 24 12:30:58 2017 -0400 dpms: Consolidate a bunch of stuff into Xext/dpms.c Most of this is a legacy of the old "extmod" design where you could load _some_ extensions dynamically but only if the server had been built with support for them in the first place. Note that since we now only initialize the DPMS extension if at least one screen supports it, we no longer need DPMSCapableFlag: if it would be false, we would never read its value. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 7f1ef9289d974fc2bacc968ae0b5d7714382cb9e Author: Adam Jackson Date: Fri Mar 24 12:30:57 2017 -0400 dix: Lift DPMS to a screen hook Following on from the previous change, this adds a DPMS hook to the ScreenRec and uses that to infer DPMS support. As a result we can drop the dpms stub code from Xext. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 8ed0b00fceb34cdb54a0ea113c3cdff3b4c9e7e1 Author: Adam Jackson Date: Fri Mar 24 12:30:56 2017 -0400 xfree86: Clean up DPMS support Rather than setting up a per-screen private, just conditionally initialize ScrnInfoRec::DPMSSet based on the config options, and inspect that to determine whether DPMS is supported. We also move the "turn the screen back on at CloseScreen" logic into the DPMS extension's (new) reset hook. This would be a behavior change for the non-xfree86 servers, if any of them had non-stub DPMS support. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 21eda7464d0e13ac6558edaf6531c3d3251e05df Author: Tobias Stoeckmann Date: Sun Mar 12 14:21:38 2017 +0100 dmx: Fix null pointer dereference A null pointer dereference can occur in dmxSync, because TimerForce does not handle a null pointer. dmxSyncTimer is set to NULL a few lines above on a certain condition, which happened on my machine. The explicit NULL check allowed me to start Xdmx again without a segmentation fault. Reviewed-by: Adam Jackson commit 5cdfcdef819efa6406807254cb3c7aba6ba5475e Author: Matt Turner Date: Thu Mar 23 19:37:46 2017 -0700 xkb: Correct type of XkbDfltAccessXOptions. Declared as unsigned short in xkb/xkbAccessX.c. Signed-off-by: Matt Turner Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f4b78286ea8d4c94a913a02a3579cbe55e8f1f6b Author: Adam Jackson Date: Mon Mar 20 13:08:19 2017 -0400 glx: Fix MakeCurrent with no drawables GLX_ARB_create_context, which we aspire to support, allows making GL 3.0 or newer contexts current with null current drawables. Strictly this might not be legal for pre-3.0 contexts, but there's no harm in allowing it anyway. Signed-off-by: Adam Jackson commit e2e50c509718ea8c7f4684dc18f5ce66e526792b Author: Eric Anholt Date: Wed Mar 22 15:11:35 2017 -0700 xserver: Unifdef HAVE_CONFIG_H The X Server never generates a global config.h, and instead all these paths are including dix-config.h or xorg-config.h. Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Eric Anholt commit 266af991c8e41e62f054ac9870468a9ba2aaa9f2 Author: Eric Anholt Date: Wed Mar 22 15:11:34 2017 -0700 glamor: Fix some formatting that confused the unifdef command. Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Eric Anholt commit 2da405759fbabd4b918838a0de728c1911b4a2fa Author: Eric Anholt Date: Wed Mar 22 15:11:33 2017 -0700 xserver: Check the right HAVE_*_CONFIG_H. Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Eric Anholt commit 190c2adf4a237a4c0dc13d7566ca91662271d3e4 Author: Eric Anholt Date: Wed Mar 22 15:11:32 2017 -0700 kdrive: Drop kdrive-config.h. It had nothing left in it that was used but wasn't in dix-config.h. Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Eric Anholt commit 5c7ed785e3bdb9f0fbf8fbfdc93b5fdd2b2c7dbf Author: Eric Anholt Date: Wed Mar 22 15:11:31 2017 -0700 kdrive: Remove vestiges of TSLIB support. The actual code was gone in 27819950e4158326e0f83a30f2e8968b932625ef, but some checks remained. Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Eric Anholt commit 1b1a8c481773e15142202a7b761d614b33f12577 Author: Eric Anholt Date: Wed Mar 22 15:11:30 2017 -0700 kdrive: Unifdef KDRIVE_EVDEV. ajax deleted the evdev driver in the removal of fbdev and the linux backend. Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Eric Anholt commit ad6689b7db0a4b0d22716acedae98462a68ea1ae Author: Mariusz Bialonczyk Date: Fri Mar 17 11:20:22 2017 +0100 configure.ac: fix checking for libdrm version after 9232835bd No matter what libdrm version was installed, it always set the GLAMOR_HAS_DRM_NAME_FROM_FD_2 conditional to 1. This obviously leads to compilation problems. Fixes: 9232835bd16b ("glamor: use drmGetDeviceNameFromFD2 when available") Signed-off-by: Mariusz Bialonczyk Reviewed-and-Tested-by: Qiang Yu commit eb2cf11724df5cbe0be3cce1ad4c61ba61e8ec6b Author: Michel Dänzer Date: Thu Mar 23 12:42:37 2017 +0900 Xephyr: Handle source-only pictures in ephyrPrepare/DoneComposite There is no pixmap associated with source-only pictures. Fixes Xephyr -fakexa crashing on startup. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Peter Hutterer commit fdc79fe72bc0b97776df2c3a664076c60e08a87c Author: Michel Dänzer Date: Thu Mar 9 17:34:55 2017 +0900 edid: Prune duplicates after adding modes from DDC Multiple calls to xf86EdidMonitorSet (which can be triggered e.g. by running xrandr) would potentially keep adding the same modes, causing the Monitor->Modes list to keep growing larger and using up more memory. Fix this by calling xf86PruneDuplicateModes after adding the modes returned by xf86DDCGetModes. This makes sure there's only one instance of each unique mode in the list. v2: * Replace semicolon with {} for empty for loop (Emil Velikov) * Slightly tweak commit log to avoid minor inaccuracy about what xf86PruneDuplicateModes does Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99521 Signed-off-by: Michel Dänzer Reviewed-by: Emil Velikov commit 4e76c2711740b775242170d8e5ee56c7e6829cce Author: Adam Jackson Date: Mon Mar 20 13:42:12 2017 -0400 dix: Remove PRIVATE_DAMAGE None of this is actually wired up to anything, so we can also remove the devPrivates from the DamageRec. The DamageExtRec is what would need devPrivates for selinux labeling, in principle. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 40c12a76c2ae57adefd3b1d412387ebbfe2fb784 Author: Tobias Stoeckmann Date: Sun Mar 19 17:55:07 2017 +0100 record: Fix OOB access in ProcRecordUnregisterClients If a client sends a RecordUnregisterClients request with an nClients field larger than INT_MAX / 4, an integer overflow leads to an out of boundary access in RecordSanityCheckClientSpecifiers. An example line with libXtst would be: XRecordUnregisterClients(dpy, rc, clients, 0x40000001); Reviewed-by: Adam Jackson commit 1ad230682338a9d2fc6eca6966a5bebb007df32c Author: Adam Jackson Date: Mon Sep 26 13:28:42 2016 -0400 glamor: Avoid software fallback for planemasked ZPixmap GetImage Same trick as in fb: just do a normal GetImage and deal with the planemask on the CPU if you have to. Since the software fallback hit for glamor is pretty brutal, this is a much more impressive win for glamor than it was for fb: 11100.0 87700.0 (7.901) (copy 0xaaaaaaaa) ShmGetImage 10x10 square 9840.0 47800.0 (4.858) (copy 0xaaaaaaaa) ShmGetImage 100x100 square 1550.0 4240.0 (2.735) (copy 0xaaaaaaaa) ShmGetImage 500x500 square 9450.0 78900.0 (8.349) (0xaaaaaaaa) GetImage 10x10 square 6910.0 30900.0 (4.472) (0xaaaaaaaa) GetImage 100x100 square 431.0 2020.0 (4.687) (0xaaaaaaaa) GetImage 500x500 square Measured with Xephyr -glamor on Skylake GT3e. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 4aa35c46dab72bc945981f6fd29e494133bc2b0a Author: Adam Jackson Date: Wed Sep 28 11:18:34 2016 -0400 fb: Handle ZPixmap planemask in GetImage the other way around Formerly we'd zero the image data and then pull out a plane at a time. It's faster to apply the planemask after the fact, since that turns the GetImage into a memcpy: 100000.0 101000.0 (1.010) (copy 0xaaaaaaaa) ShmGetImage 10x10 square 42400.0 59400.0 (1.401) (copy 0xaaaaaaaa) ShmGetImage 100x100 square 3040.0 5280.0 (1.737) (copy 0xaaaaaaaa) ShmGetImage 500x500 square 96100.0 95200.0 (0.991) (0xaaaaaaaa) GetImage 10x10 square 29600.0 36800.0 (1.243) (0xaaaaaaaa) GetImage 100x100 square 1850.0 2620.0 (1.416) (0xaaaaaaaa) GetImage 500x500 square Measured with Xvfb at depth 24 on Skylake i7-6560U. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 368f60d461421fe5e2bbd90652d6ac858dbff8fe Author: Kenneth Graunke Date: Fri Mar 17 13:45:04 2017 -0700 dri2: Sync i965_pci_ids.h from Mesa. Copied from Mesa with no modifications. Gives us Geminilake PCI IDs. Signed-off-by: Kenneth Graunke Acked-by: Eric Anholt commit 8805a48ed35afb2ca66315656c1575ae5a01c639 Author: Olivier Fourdan Date: Fri Mar 17 15:58:26 2017 +0100 glamor: avoid a crash if texture allocation failed Texture creation in _glamor_create_tex() can fail if a GL_OUT_OF_MEMORY is raised, in which case the texture returned is zero. But the texture value is not checked in glamor_create_fbo() and glamor will abort in glamor_pixmap_ensure_fb() because the fbo->tex is 0: Truncated backtrace: Thread no. 1 (10 frames) #4 glamor_pixmap_ensure_fb at glamor_fbo.c:57 #5 glamor_create_fbo_from_tex at glamor_fbo.c:112 #6 glamor_create_fbo at glamor_fbo.c:159 #7 glamor_create_fbo_array at glamor_fbo.c:210 #8 glamor_create_pixmap at glamor.c:226 #9 compNewPixmap at compalloc.c:536 #10 compAllocPixmap at compalloc.c:605 #11 compCheckRedirect at compwindow.c:167 #12 compRealizeWindow at compwindow.c:267 #13 RealizeTree at window.c:2617 Check the value returned by _glamor_create_tex() in glamor_create_fbo() and return NULL in the texture is zero. All callers of glamor_create_fbo() actually check the returned value and will use a fallback code path if it's NULL. Please cherry-pick this to active stable branches. Bugzilla: https://bugzilla.redhat.com/1433305 Signed-off-by: Olivier Fourdan Reviewed-by: Eric Anholt commit 0803918e64262482035f042e5e1f2a571d3dea1b Author: Adam Jackson Date: Sat Sep 24 19:40:52 2016 -0400 fb: Remove 24bpp support (v3) v2: - Require power-of-two bpp in ScreenInit - Eliminate fbCreatePixmapBpp v3 - Squash in the exa and glamor changes so we can remove pRotatedPixmap in the same stroke. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit e33be78e2ab63abc84aa0baddff90bcefa9c183a Author: Adam Jackson Date: Fri Feb 28 13:19:00 2014 -0500 xfree86: Remove 24bpp pixmap format support (v2) There's really no reason to pretend to support this, apps hate it, all we're doing is giving people a way to injure themselves. It doesn't work anyway with any Radeon, any NVIDIA chip, or any Intel chip since i810. Rip out all the logic for handling 24bpp pixmaps and framebuffers, and silently ignore the old options that would ask for it. The cirrus alpine driver has been updated to default to 16bpp, and both it and the i810 driver can now use the 32->24 conversion code in shadow if they want. All other drivers support 32bpp. Configurations that explicitly request 24bpp in order to fit in VRAM will be broken now though. v2: Fix command line options to silently ignore 24bpp rather than fail Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 83c4297d2c4fd501a9d36bc0cb7d357a8d22394c Author: Adam Jackson Date: Fri Mar 17 12:40:03 2017 -0400 ephyr: Don't clobber bitsPerPixel when using glamor This ends up passing 0 as the bpp argument to fb screen setup, which is not really the best plan. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit fe0b297420fc1de8a7fab28457d0864b3182e967 Author: Eric Anholt Date: Wed Mar 15 17:51:46 2017 -0700 glamor: Fix dashed line rendering. We were binding the screen pixmap as the dash and sampling its alpha, which is usually just 1.0 (no dashing at all). Please cherry-pick this to active stable branches. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Michel Dänzer commit 5b5ba7dc3d544868035b7088e9aac62eb2511e10 Author: Adam Jackson Date: Thu Mar 16 14:19:37 2017 -0400 Revert "sdksyms: Tighten up the symbols we add to the magic table" Enough people are reporting build issues pointing at this commit that it's not worth the benefit. This reverts commit 3dad57b121fdf001e75fffa7e3007a9a0a154f67. commit e337de2d488a124e5fee0fdcb882567b68f1767d Author: Adam Jackson Date: Wed Nov 2 12:49:25 2016 -0400 xinerama: Implement graphics exposures for window->pixmap copies (v4) This code is using GetImage to accumulate a logical view of the window image (since the windows will be clipped to their containing screen), and then PutImage to load that back into the pixmap. What it wasn't doing was constructing a region for the obscured areas of the window and emitting graphics exposures for same. v2: Fix coordinate translation when the source is the root window v3: Create sourceBox with the right coordinates initially instead of translating (Keith Packard) v4: Clamp the region to 15 bits to avoid overflow (Keith Packard) Signed-off-by: Adam Jackson commit f1f865e909090406841a9b9416ea6259a75c2086 Author: Adam Jackson Date: Mon Jan 23 11:31:36 2017 -0500 parser: Fix crash when xf86nameCompare(s1 = x, s2 = NULL) Signed-off-by: Adam Jackson commit 455051a0f1d2bc84f605c325f647bd64d414c47d Author: Olivier Fourdan Date: Tue Mar 14 15:06:34 2017 +0100 glamor: Check glamor_set_destination_drawable() return value Check the value returned by glamor_set_destination_drawable() and use the fallback code path where possible. Bugzilla: https://bugzilla.redhat.com/1417575 Signed-off-by: Olivier Fourdan commit 04b4bad7c048fd077fe839f10634c99ef1e488af Author: Olivier Fourdan Date: Tue Mar 14 14:58:26 2017 +0100 glamor: glamor_set_destination_drawable() can fail The fbo_array of a given glamor pixmap can be NULL in some cases, as glamor_create_fbo_array() can fail to allocate the FBO array. If this is the case, glamor_pixmap_fbo_at() will return NULL even though the box index is valid, and glamor_set_destination_drawable() simply assumes glamor_pixmap_fbo_at() will return an FBO prior to pass the value to glamor_set_destination_pixmap_fbo(), which will segfault. We need a way for glamor_set_destination_drawable() to fail safely and let the caller know about the failure. Add a boolean return value to glamor_set_destination_drawable() for that purpose. Bugzilla: https://bugzilla.redhat.com/1417575 Signed-off-by: Olivier Fourdan commit b0ce1d088a863492f5de11e4dbde10af4261d892 Author: Olivier Fourdan Date: Tue Mar 14 15:22:32 2017 +0100 Xephyr: Check screen resources creation success If the screen pixmap or the corresponding texture creation with glamor fails, exit cleanly with an error message instead of segfaulting. Fixes: https://bugzilla.redhat.com/1431633 Reviewed-by: Michel Dänzer Signed-off-by: Olivier Fourdan commit f40ff18c96e02ff18a367bf53feeb4bd8ee952a0 Author: Olivier Fourdan Date: Tue Mar 14 15:22:31 2017 +0100 glamor: Check for NULL pixmap in glamor_get_pixmap_texture() glamor_create_pixmap() would return a NullPixmap if the given size is larger than the maximum size of a pixmap. But glamor_get_pixmap_texture() won't check if the given pixmap is non-null, leading to a segfault if glamor_create_pixmap() failed. This can be reproduced by passing Xephyr a very large screen width, e.g.: $ Xephyr -glamor -screen 32768x1024 :10 (EE) (EE) Backtrace: (EE) 0: Xephyr (OsSigHandler+0x29) (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) (EE) 2: Xephyr (glamor_get_pixmap_texture+0x30) (EE) 3: Xephyr (ephyr_glamor_create_screen_resources+0xc6) (EE) 4: Xephyr (ephyrCreateResources+0x98) (EE) 5: Xephyr (dix_main+0x275) (EE) 6: /lib64/libc.so.6 (__libc_start_main+0xf1) (EE) 7: Xephyr (_start+0x2a) (EE) 8: ? (?+0x2a) [0x2a] (EE) (EE) Segmentation fault at address 0x0 (EE) Fatal server error: (EE) Caught signal 11 (Segmentation fault). Server aborting (EE) Aborted (core dumped) Bugzilla: https://bugzilla.redhat.com/1431633 Reviewed-by: Michel Dänzer Signed-off-by: Olivier Fourdan commit 646bc74cded8b77d57312ae858a2ed01b0d17c21 Author: Adam Jackson Date: Fri Mar 3 14:51:51 2017 -0500 test: Fix distcheck failures Signed-off-by: Adam Jackson commit bca221609004aecbcc8928382ad29ce319d2eb6f Author: Jon TURNEY Date: Mon Mar 6 17:44:19 2017 +0000 xfree86: work around a sdksyms problem with gcc5 on Cygwin The linemarkers in the preprocessor output from gcc5 on Cygwin have canonicalized paths to included files (e.g. xserver/build/../include/misc.h is canonicalized to xserver/build/include/misc.h). (see gcc svn rev 210264, which causes the transformation performed by -fcanonical-system-headers to be applied to all include pathnames) These canonicalized paths won't match $topdir, so sdksyms doesn't look at the contents of those headers for sdk exported symbols. Workaround this by canonicalizing all the paths we consider, using readlink. v2: Keep a cache of readlink results so it isn't quite so dreadfully slow. Reviewed-by: Adam Jackson commit ac15d4cecca377c5c31ab852c39bbd554ca48fe2 Author: Tobias Stoeckmann Date: Mon Mar 13 19:13:14 2017 +0100 render: Fix out of boundary heap access ProcRenderCreateRadialGradient and ProcRenderCreateConicalGradient must be protected against an integer overflow during length check. This is already included in ProcRenderCreateLinearGradient since the fix for CVE-2008-2362. This can only be successfully exploited on a 32 bit system for an out of boundary read later on. Validated by using ASAN. Reviewed-by: Adam Jackson commit 0c1574d9882a91b2c1a046bf4ac5a9b138a37965 Author: Michel Dänzer Date: Thu Mar 9 18:13:31 2017 +0900 glamor: Fix typo: "vec2_pos" -> "vec2 pos" Fixes crash when trying to use dashed lines: Failed to compile VS: 0:8(2): error: `vec2_pos' undeclared Trivial. Fixes: d8161aeb5089 ("glamor: Fix missing declaration in dash vertex shader") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99943 commit 937527f9798d573ec82c2c508821899c229c018f Author: Olivier Fourdan Date: Wed Mar 8 10:32:22 2017 +0100 xwayland: Monitor client states to destroy callbacks Client resources can survive the client itself, in which case we may end up in our sync callback trying to access client's data after it's been freed/reclaimed. Add a ClientStateCallback handler to monitor the client state changes and clear the sync callback set up by the glamor drm code if any. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100040 Tested-by: Mark B Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 669eb0a65430678fe97de9405e4e42dcb4417ed2 Author: Jon Turney Date: Wed Mar 8 23:46:27 2017 +0000 test: Use correct signature for XISetEventMask wrapper This looks like it's always been wrong, but didn't matter before the single test binary changes as the wrapper was only in place for tests which didn't care about it's effects, so didn't forward to the real implementation. (see the changes to protocol-xiselectevents.c in 773fc07e) This fixes the protocol_xigetselectedevents_test for me. I'm a bit surprised that passes for anyone at the moment. Signed-off-by: Jon Turney Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9232835bd16b6948442f7a4588fb9376782cb814 Author: Qiang Yu Date: Tue Mar 7 11:53:23 2017 +0800 glamor: use drmGetDeviceNameFromFD2 when available This is for glamor can support fd from DRM render node which is useful for a render only DDX. Reviewed-by: Adam Jackson Signed-off-by: Qiang Yu commit d4b7e0eaa4b2e97ce1dec653a2ae7d9621fe1431 Author: Olivier Fourdan Date: Tue Mar 7 10:28:35 2017 +0100 xwayland: clear cursor frame callback After an X cursor is unrealized, the seat's corresponding x_cursor is cleared, but if a frame callback was pending at the time, it will remain and thus prevent any further cursor update, leaving the window with no cursor. Make sure to destroy the frame callback, if any, when that occurs, so that next time a cursor needs to be set, it won't be ignored for a frame callback that will never be triggered. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1389327 Signed-off-by: Olivier Fourdan Reviewed-by: Pekka Paalanen Reviewed-by: Rui Matos commit 64ca14b85e45b13628396f21d1903e311f92a9e1 Author: Olivier Fourdan Date: Thu Mar 2 10:19:26 2017 +0100 xwayland: make sure client is not gone in sync callback in XWayland, dri3_send_open_reply() is called from a sync callback, so there is a possibility that the client might be gone when we get to the callback eventually, which leads to a crash in _XSERVTransSendFd() from WriteFdToClient() . Check if clientGone has been set in the sync callback handler to avoid this. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99149 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100040 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1416553 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan Tested-by: Mark B commit 5c44169caed811e59a65ba346de1cadb46d266ec Author: Adam Jackson Date: Thu Mar 2 17:20:30 2017 -0500 os: Squash missing declaration warning for timingsafe_memcmp timingsafe_memcmp.c:21:1: warning: no previous prototype for ‘timingsafe_memcmp’ [-Wmissing-prototypes] timingsafe_memcmp(const void *b1, const void *b2, size_t len) Signed-off-by: Adam Jackson commit 0d7f05ed99b71a4641415c9f26e245c3bb24a9a0 Author: Adam Jackson Date: Wed Mar 1 16:13:59 2017 -0500 miarc: "Cache" arc span data for dashed arcs This avoids recomputing the span data for every dash. x11perf thinks this is a pretty modest speedup: 832919.4 840471.1 ( 1.009) 100-pixel dashed ellipse 672353.1 680652.2 ( 1.012) 100-pixel double-dashed ellipse 13748.9 24287.9 ( 1.767) 100-pixel wide dashed ellipse 9236.3 21298.2 ( 2.306) 100-pixel wide double-dashed ellipse But part of the reason it's so modest there is that the arcs are relatively small (100 pixel diameter at line width 10, so ~6000 pixels) and the dashes relatively large (30 on 20 off so ~6 dashes per quadrant). With larger arcs and finer dashes this is much more impressive. A fairly trivial testcase of a single 15000x13000 arc with the default {2, 2} dash pattern drops from ~3500 milliseconds to 10 milliseconds. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 849c825855b82caf44d25edb8155bc9f17869256 Author: Adam Jackson Date: Wed Mar 1 16:13:58 2017 -0500 miarc: Make the caller free the arc span data drawArc does some fairly expensive computation, but it's only sensitive to arc width/height. Thread the span data up through the call chain so it's at least possible for the caller to cache things. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 9426c5500b72e1fe004fef4c3b259023c4ec49f7 Author: Adam Jackson Date: Wed Mar 1 16:13:57 2017 -0500 miarc: Style cleanup for miWideArc Outdent, normalize comment formatting, and use 'goto out' idiom for error paths. No functional change. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit fe5c340046c8cf755b92763a49b2dc475e856a76 Author: Olivier Fourdan Date: Wed Mar 1 08:51:31 2017 +0100 xwayland: do not set checkRepeat on master kbd keyboard_check_repeat() fetches the XWayland seat from the dev->public.devicePrivate do do its thing. If a key event is sent programmatically through Xtest, our device is the virtual core keyboard and that has a dev->public.devicePrivate of NULL, leading to a segfault in keyboard_check_repeat(). This is the case with "antimicro" which sends key events based on the joystick buttons. Don't set the checkRepeat handler on the VCK since it cannot possibly work anyway and it has no effect on the actual checkRepeat intended functionality. Bugzilla: https://bugzilla.redhat.com/1416244 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 27819950e4158326e0f83a30f2e8968b932625ef Author: Adam Jackson Date: Thu Feb 16 12:46:23 2017 -0500 kdrive: Remove now-unused linux backend With Xfbdev gone this has no consumers. Signed-off-by: Adam Jackson Acked-by: Alex Deucher commit feed7e3f982a7ac14f6fe85ed2e1ec4a83700841 Author: Adam Jackson Date: Thu Feb 16 12:46:22 2017 -0500 xfbdev: Remove With the shadow framebuffer overallocation bug fixed (ref below), Xorg + fbdev has tens to hundreds of kilobytes more baseline memory usage than Xfbdev. That's not nothing, but it's little enough that we should focus our efforts on the server that actually gets development attention. https://cgit.freedesktop.org/xorg/driver/xf86-video-fbdev/commit/?id=2c5eba8 Signed-off-by: Adam Jackson Acked-by: Alex Deucher commit 35fbcb3f9987758bc26a87d5d7c033f4367cbd39 Author: Adam Jackson Date: Thu Feb 16 12:46:21 2017 -0500 xfake: Remove We already have Xvfb for a dummy DDX. Signed-off-by: Adam Jackson Acked-by: Alex Deucher commit 3dad57b121fdf001e75fffa7e3007a9a0a154f67 Author: Adam Jackson Date: Thu Feb 16 14:00:03 2017 -0500 sdksyms: Tighten up the symbols we add to the magic table The code as written would match anything declared extern. _X_EXPORT is what we really mean here. That's a macro, so check for what it expands to and skip if not found. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit 386fbbe410a1168b724136e54cf3bd37fb64ad4e Author: Matthieu Herrb Date: Wed Mar 1 20:28:34 2017 +0100 Brown bag commit to fix 957e8d (arc4random_buf() support) - typo in #ifdef check - also need to add AC_CHECK_FUNCS([arc4random_buf]) Reported-by Eric Engestrom. Thanks Reviewed-by: Adam Jackson Signed-off-by: Matthieu Herrb commit dc7ceda90fdedb2212f105095fe8d449bfdb0eb4 Author: Adam Jackson Date: Thu Feb 16 14:56:45 2017 -0500 dispatch: Mark swapped dispatch as _X_COLD This touches everything that ends up in the Xorg binary; the big missing part is GLX since that's all generated code. Cuts about 14k from the binary on amd64. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 8c9909a99292b2fb4a86de694bb0029f61e35662 Author: Olivier Fourdan Date: Tue Feb 28 14:27:52 2017 +0100 xwayland: Make sure we have a focus window During the InitInput() phase, the wayland events get dequeued so we can possibly end up calling dispatch_pointer_motion_event(). If this occurs before xwl_seat->focus_window is set, it leads to a NULL pointer derefence and a segfault. Check for xwl_seat->focus_window in both pointer_handle_frame() and relative_pointer_handle_relative_motion() prior to calling dispatch_pointer_motion_event() like it's done in pointer_handle_motion(). Bugzilla: https://bugzilla.redhat.com/1410804 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c9cbdada755f1d00d164bef7833f1aef139ffeb0 Author: Adam Jackson Date: Mon Feb 20 10:24:14 2017 -0500 vfb: Bump default depth to 24 Signed-off-by: Adam Jackson Acked-by: Keith Packard Reviewed-by: Eric Anholt commit 2855f759b1e7bf7f5e57cac36c1f0d0e5ac1a683 Author: Matthieu Herrb Date: Tue Feb 28 19:18:56 2017 +0100 auth: remove AuthToIDFunc and associated functions. Not used anymore. And the current code for MitToId has a use-after-free() issue. [Also remove the actual implementations - ajax] Signed-off-by: Matthieu Herrb Reviewed-by: Alan Coopersmith commit 957e8db38f27932d353e86e9aa69cf16778b18f1 Author: Matthieu Herrb Date: Tue Feb 28 19:18:43 2017 +0100 Use arc4random_buf(3) if available to generate cookies. Reviewed-by: Adam Jackson Signed-off-by: Matthieu Herrb commit d7ac755f0b618eb1259d93c8a16ec6e39a18627c Author: Matthieu Herrb Date: Tue Feb 28 19:18:25 2017 +0100 Use timingsafe_memcmp() to compare MIT-MAGIC-COOKIES CVE-2017-2624 Provide the function definition for systems that don't have it. Signed-off-by: Matthieu Herrb Reviewed-by: Alan Coopersmith commit 1b12249fd6d4d3b566043d556503f3f625b9b4ba Author: Peter Hutterer Date: Thu Feb 23 10:21:49 2017 +1000 os: log a bug whenever WriteToClient is called from the input thread The input thread should generate events, not send them. Make it easier to find the instances where it's doing so. Signed-off-by: Peter Hutterer Tested-by: Olivier Fourdan Reviewed-by: Olivier Fourdan commit 7d7788e0f2fbbf5d05cb918df11a5e1b7e047e48 Author: Olivier Fourdan Date: Fri Feb 17 09:16:24 2017 +0100 Revert "xwayland: bump wayland-protocols version to 1.7" This reverts commit 371ff0c969a38a0013688391bbd7375bc7b6f933. Reviewed-by: Adam Jackson commit 9f4d308cdad957a354912f17febe5bcad7f44812 Author: Pekka Paalanen Date: Wed Nov 23 13:30:53 2016 +0200 xwayland: use _XWAYLAND_ALLOW_COMMITS property The X11 window manager (XWM) of a Wayland compositor can use the _XWAYLAND_ALLOW_COMMITS property to control when Xwayland sends wl_surface.commit requests. If the property is not set, the behaviour remains what it was. XWM uses the property to inhibit commits until the window is ready to be shown. This gives XWM time to set up the window decorations and internal state before Xwayland does the first commit. XWM can use this to ensure the first commit carries fully drawn decorations and the window management state is correct when the window becomes visible. Setting the property to zero inhibits further commits, and setting it to non-zero allows commits. Deleting the property allows commits. When the property is changed from zero to non-zero, there will be a commit on next block_handler() call provided that some damage has been recorded. Without this patch (i.e. with the old behaviour) Xwayland can and will commit the surface very soon as the application window has been realized and drawn into. This races with XWM and may cause visible glitches. v3: - introduced a simple setter for xwl_window::allow_commits - split xwl_window_property_allow_commits() out of xwl_property_callback() - check MakeAtom(_XWAYLAND_ALLOW_COMMITS) v2: - use PropertyStateCallback instead of XACE, based on the patch "xwayland: Track per-window support for netwm frame sync" by Adam Jackson - check property type is XA_CARDINAL - drop a useless memcpy() Weston Bug: https://phabricator.freedesktop.org/T7622 Reviewed-by: Adam Jackson Signed-off-by: Pekka Paalanen commit a6308cea602f688ac653e3466cd57767e02093a9 Author: Pekka Paalanen Date: Thu Nov 24 11:54:44 2016 +0200 xwayland: fix 'buffer' may be used uninitialized warning Fix the following warning due to --disable-glamor: CC Xwayland-xwayland.o In file included from /home/pq/local/include/wayland-client.h:40:0, from xwayland.h:35, from xwayland.c:26: xwayland.c: In function ‘block_handler’: /home/pq/local/include/wayland-client-protocol.h:3446:2: warning: ‘buffer’ may be used uninitialized in this function [-Wmaybe-uninitialized] wl_proxy_marshal((struct wl_proxy *) wl_surface, ^ xwayland.c:466:23: note: ‘buffer’ was declared here struct wl_buffer *buffer; ^ Signed-off-by: Pekka Paalanen Reviewed-by: Olivier Fourdan commit f7b8560f23ac5582e2f97dc9f6de32a42e61e520 Author: Pekka Paalanen Date: Thu Nov 24 11:45:25 2016 +0200 xwayland: refactor into xwl_window_post_damage() Refactor xwl_screen_post_damage() and split the window specific code into a new function xwl_window_post_damage(). This is a pure refactoring, there are no behavioral changes. An assert is added to xwl_window_post_damage() to ensure frame callbacks are not leaked if a future patch changes the call. Signed-off-by: Pekka Paalanen Reviewed-by: Olivier Fourdan commit 8e3f9ce6c06e7605832c55dfd180396f66ec8b66 Author: Adam Jackson Date: Sat Jul 12 12:45:23 2014 -0400 dix: Add a callback chain for window property state change This will be used by in-server features that need to react to property changes. The first one will be _XWAYLAND_ALLOW_COMMITS. Signed-off-by: Adam Jackson [Pekka: add commit message body] Signed-off-by: Pekka Paalanen commit 50bcea8be337ea983e464f2b5b8b2dc6d1024532 Author: Adam Jackson Date: Sat Jul 12 12:39:21 2014 -0400 dix: Pass the whole property into deliverPropertyNotifyEvent Instead of just the atom. No functional change. Signed-off-by: Adam Jackson Signed-off-by: Pekka Paalanen commit fde5cd78488f3370c92397868ca78929296f7ad1 Author: Mihail Konev Date: Tue Jan 31 20:16:35 2017 +0500 tests: Fix guards for ld -wrap Fixes XQuartz build. Regressed-in: 23f6dbc96e47be6cbeed78cc9ef303987c3e29a9 Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit d8161aeb50891ae10c5656487ce8f982deed5f9f Author: Dr.-Ing. Dieter Jurzitza Date: Thu Feb 23 12:57:26 2017 -0500 glamor: Fix missing declaration in dash vertex shader Fixes a GLSL compilation error: Failed to compile VS: 0:13(43): error: `pos' undeclared 0:13(14): error: operands to arithmetic operators must be numeric 0:13(13): error: operands to arithmetic operators must be numeric Tested-by: Stefan Dirsch Reviewed-by: Adam Jackson commit acdb5bf2de57c0080d2a6e730c788a0a428e13dc Author: Chris Wilson Date: Fri Feb 17 08:18:52 2017 +0000 os: Fix iteration over busfaults Fixes a regression from commit 41da295eb50fa08eaacd0ecde99f43a716fcb41a Author: Keith Packard Date: Sun Nov 3 13:12:40 2013 -0800 Trap SIGBUS to handle truncated shared memory segments that causes the SIGBUS handler to fail to chain up correctly and corrupts nearby memory instead. Signed-off-by: Chris Wilson Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit dcb63deb1b6337781943a7bea5bb2b04c6d76b55 Author: Chris Wilson Date: Wed Feb 22 14:56:28 2017 +0000 inputthread: Initialise inputThreadInfo->changed before use ==8734== Thread 2 InputThread: ==8734== Conditional jump or move depends on uninitialised value(s) ==8734== at 0x2FDB05: InputThreadDoWork (inputthread.c:333) ==8734== by 0x6924423: start_thread (pthread_create.c:333) ==8734== by 0x6C229BE: clone (clone.S:105) Signed-off-by: Chris Wilson Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 23d85c54421ebdd12460566918fcb7f309d2ee30 Author: Olivier Fourdan Date: Fri Feb 17 14:13:51 2017 +0100 os: remove unused define MAX_TIMES_PER Remove leftover from commit e10ba9e, MAX_TIMES_PER is not used anymore. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8b170c4447868c8d4656cf2143f009db20885f3a Author: Adam Jackson Date: Thu Feb 16 13:00:24 2017 -0500 mi: Add include guards to migc.h Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit e161853f380a0b176c81284024066cb2776136c3 Author: Adam Jackson Date: Thu Feb 16 13:00:24 2017 -0500 fb: Remove stray references to fbHasVisualTypes Removed in 84e8de12. Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 4c7d229582a97e07014091909745ac7dc4d5e93e Author: Adam Jackson Date: Thu Feb 16 13:00:24 2017 -0500 fb: Remove unused fbGetFreeCompClip macro Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 706e6d9cd074da606016ed4ecff51e9c2a822087 Author: Adam Jackson Date: Thu Feb 16 13:00:24 2017 -0500 wfb: Hide init function decls behind FB_ACCESS_WRAPPER Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 790c1c0b10968776440a962e1fc6d1d3157b1559 Author: Adam Jackson Date: Thu Feb 16 13:00:24 2017 -0500 wfb: Add missing rename for fbGlyphs Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit a6566f9e4dbf9ea9568a14e22cb5d004e10dbd4d Author: Michel Dänzer Date: Thu Feb 16 16:13:56 2017 +0900 prime: Clear PixmapDirtyUpdateRec::damage when it's destroyed The root window, and by extension any damage records referencing it, may be destroyed before shared pixmaps referencing it, which resulted in use-after-free / double-free in PixmapStopDirtyTracking. Fixes: b5b292896f64 ("prime: Sync shared pixmap from root window instead of screen pixmap") Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit 371ff0c969a38a0013688391bbd7375bc7b6f933 Author: Olivier Fourdan Date: Thu Feb 16 10:43:06 2017 +0100 xwayland: bump wayland-protocols version to 1.7 Xwayland support for pointer locking in confinement requires wayland-protocols version 1.7 or later. Update the required version in configure.ac to match the minimal required version of wayland-protocols. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 5d29b493666f728eccd8dd91992ea020bd4be9f9 Author: Adam Jackson Date: Tue Feb 14 15:30:56 2017 -0500 xfree86: Reorganize the reserved ScrnInfoRec slots First, move them to the end of the struct, for marginally better cache locality for the struct members that actually have meaning; move the existing slots at the end of the struct up near some others with similar meanings. Second, only keep four slots each of integer, data pointer, and function pointer; we've rarely used this escape hatch so this is still plenty. Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 47db92473f7da2b7d6775ff681ec747009f8cf3f Author: Adam Jackson Date: Tue Feb 14 15:30:55 2017 -0500 xfree86: Remove unused chipID/Rev from ScrnInfoRec Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 4dcf68e41857cdf78387a6232160cba5cb467fb0 Author: Adam Jackson Date: Tue Feb 14 15:30:54 2017 -0500 xfree86: Remove memClk from ScrnInfoRec Never set by the core, not used in any modern driver. Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 0b6f2806029493afa246b4472ee88fc173976c5a Author: Adam Jackson Date: Tue Feb 14 15:30:53 2017 -0500 xfree86: Remove Option "BiosBase" (v2) Just no. The ddxDesign chunk removes the whole para about xf86FixPciResource, since it turns out that function doesn't exist at all anymore. The only drivers that reference this at all are i128 and mga, and even then only in the non-pciaccess path. v2: - Update commentary about i128/mga - Don't remove the BiosBase keyword from the config parser since that would turn a no-op into a fatal error (Aaron Plattner) Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 76ef102be3b47d23ebfaaaa04fb5cfc0511d43f1 Author: Adam Jackson Date: Tue Feb 14 15:30:52 2017 -0500 xfree86: Drop virtualFrom from ScrnInfoRec Seriously not worth the effort of tracking this, especially now that competent drivers don't have a limit. The sis driver does inspect this member, but hilariously does so only so it can print the same information as the core does. Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 5a945f54e738f6e9c5a489febdd8b87cd8a41210 Author: Adam Jackson Date: Tue Feb 14 15:30:51 2017 -0500 xfree86: Remove max[HV]Value from ScrnInfoRec Only mach64 and rendition actually use this feature. Everyone else just checks it in their ValidMode hook, they can too. Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 3e1a23281dd64ee7457f36208cac77c01846a28f Author: Adam Jackson Date: Tue Feb 14 15:30:50 2017 -0500 xfree86: Fix a comment about ScrnInfoRec We don't actually need (or intend) to keep this struct the same across revisions. Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 4c00609c370dab130b69207cb2684c2b92bd3084 Author: Alan Coopersmith Date: Sun Feb 12 09:35:21 2017 -0800 DetermineClientCmd: try using /proc/pid/cmdline on Solaris too Solaris 11.3.5 introduced support for /proc/pid/cmdline, so try it first, and if we can't open it, then fallback to /proc/pid/psinfo as we did before. Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 3f9507ed2f7246b2c8cf2bbc430cc99c5f35c92a Author: Adam Jackson Date: Thu Feb 9 13:53:41 2017 -0500 xfree86: Bump video ABI to 24.0 c02f6a68 changed the layout of xf86CrtcFuncs. Signed-off-by: Adam Jackson commit 058809c43ec578a407cf40d4c3e54a42503e3562 Author: Olivier Fourdan Date: Wed Feb 8 09:23:20 2017 +0100 xwayland: Apply output rotation for screen size Previously, we would swap the width/height of the Xwayland output based on the output rotation, so that the overall screen size would match the actual rotation of each output. Problem is the RandR's ConstrainCursorHarder() handler will also apply the output rotation, meaning that when the output is rotated, the pointer will be constrained within the wrong dimension. Moreover, XRandR assumes the original output width/height are unchanged when the output is rotated, so by changing the Xwayland output width and height based on rotation, Xwayland causes XRandr to report the wrong output sizes (an output of size 1024x768 rotated left or right should remain 1024x768, not 768x1024). So to avoid this issue and keep things consistent between Wayland and Xwayland outputs, leave the actual width/height unchanged but apply the rotation when computing the screen size. This fixes both the output size being wrong in "xrandr -q" and the pointer being constrained in the wrong dimension with rotated with weston. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99663 Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit afeace27d3818274b75d59375771dc964d2f56bb Author: Olivier Fourdan Date: Tue Feb 7 15:31:22 2017 +0100 xwayland: CRTC should support all rotations If the Wayland compositor sets a rotation on the output, Xwayland translates the transformation as an xrandr rotation for the given output. However, if the rotation is not supported by the CRTC, this is not a valid setup and xrandr queries will fail. Pretend we support all rotations and reflections so that the configuration remains a valid xrandr setup. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99663 Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit 38696ea56854e055c31bd2730adfc7c39aa115b0 Author: Michel Dänzer Date: Tue Feb 7 17:38:23 2017 +0900 damage: Validate source pictures bound to windows before unwrapping The lower layers also do this, but no damage may be reported there, since we unwrap before calling down. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99220 Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 1c78bec9ca3cd1975a38bf5ebdba7dea65b309ab Author: Svitozar Cherepii Date: Fri Feb 3 01:49:04 2017 +0200 xwayland: Add hack for FWXGA resolution #99574 For some applications (like fullscreen games) it matters for XRandr resolution to be correctly set and equal to root window resolution. In XServer there is already hack for this, adapted it for XWayland. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99574 Signed-off-by: Svitozar Cherepii Tested-by: Svitozar Cherepii Acked-by: Olivier Fourdan commit 542d9f6807ac06b70f564ccab10af69fa21a1221 Author: Michel Dänzer Date: Wed Feb 1 18:35:57 2017 +0900 present: Allow flipping with PRIME slave outputs Works fine now. Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit b5b292896f647c85f03f53b20b2f03c0e94de428 Author: Michel Dänzer Date: Wed Feb 1 18:35:56 2017 +0900 prime: Sync shared pixmap from root window instead of screen pixmap The screen pixmap doesn't receive updates while there's a Present flip window. Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit eb04b20160d706d4e0e67122d0adb1e723c0da92 Author: Michael Thayer Date: Fri Sep 30 15:18:45 2016 +0200 modesetting: allow switching from software to hardware cursors (v5). Currently if modesetting ever fails to set a hardware cursor it will switch to using a software cursor and never go back. Change this to only permanently switch to a software cursor if -ENXIO is returned (which means hardware cursors not supported), and to otherwise still try a hardware cursor first every time a new one is set. This is needed because hardware may be able to handle some cursors in hardware and others not, or virtual hardware may be able to handle hardware cursors at some times and not others. Changes since v1, v2 and v3: * take into account the switch to load_cursor_argb_check * keep the permanent software cursor fall-back if -ENXIO is returned * move parts of v3 into separate patches Reviewed-by: Adam Jackson Signed-off-by: Michael Thayer commit ecd0a62323f26b333c49bddd7237dd5118482a35 Author: Michael Thayer Date: Fri Sep 30 08:02:09 2016 +0200 modesetting: Immediately handle failure to set HW cursor, v5 Based on v4 by Alexandre Courbot There is currently no reliable way to report failure to set a HW cursor. Still such failures can happen if e.g. the MODE_CURSOR DRM ioctl fails (which currently happens at least with modesetting on Tegra for format incompatibility reasons). As failures are currently handled by setting the HW cursor size to (0,0), the fallback to SW cursor will not happen until the next time the cursor changes and xf86CursorSetCursor() is called again. In the meantime, the cursor will be invisible to the user. This patch addresses that by adding _xf86CrtcFuncs::set_cursor_check and _xf86CursorInfoRec::ShowCursorCheck hook variants that return booleans. This allows to propagate errors up to xf86CursorSetCursor(), which can then fall back to using the SW cursor immediately. v5: - Removed parts of patch already committed as part of 14c21ea1. - Adjusted code slightly to match surrounding code. - Effectively reverted af916477 which is made unnecessary by this patch. Reviewed-by: Adam Jackson Signed-off-by: Michael Thayer commit c02f6a687c3d6bd0727322b055ee788f8fefa005 Author: Michael Thayer Date: Thu Sep 29 20:23:12 2016 +0200 xfree86: Immediately handle failure to set HW cursor, v5 Based on v4 by Alexandre Courbot There is currently no reliable way to report failure to set a HW cursor. Still such failures can happen if e.g. the MODE_CURSOR DRM ioctl fails (which currently happens at least with modesetting on Tegra for format incompatibility reasons). As failures are currently handled by setting the HW cursor size to (0,0), the fallback to SW cursor will not happen until the next time the cursor changes and xf86CursorSetCursor() is called again. In the meantime, the cursor will be invisible to the user. This patch addresses that by adding _xf86CrtcFuncs::set_cursor_check and _xf86CursorInfoRec::ShowCursorCheck hook variants that return booleans. This allows to propagate errors up to xf86CursorSetCursor(), which can then fall back to using the SW cursor immediately. v5: Updated the patch to apply to current git HEAD, split up into two patches (server and modesetting driver) and adjusted the code slightly to match surrounding code. I also removed the new exported function ShowCursorCheck(), as instead just changing ShowCursor() to return Bool should not affect its current callers. Reviewed-by: Adam Jackson Signed-off-by: Michael Thayer commit 3ef16dfb9830bd6b41ae428f4f213ae0c35c1056 Author: Mihail Konev Date: Sat Feb 4 00:03:24 2017 +0500 dmx: fix linking Reviewed-by: Adam Jackson commit e50da50118408a195d4d2e1b39817fe7c4447c56 Author: Adam Jackson Date: Wed Jan 25 15:08:25 2017 -0500 dri1: Remove some dead event code Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer commit 0702f2e840370be53d129fc5e3c243dac47ee720 Author: Peter Hutterer Date: Tue Feb 7 11:44:51 2017 +1000 xwayland: replace hardcoded function name with __func__ in error msg Signed-off-by: Peter Hutterer Reviewed-by: Pekka Paalanen Reviewed-by: Olivier Fourdan commit 3eb964e25243056dd998f52d3b00171b71c89189 Author: Chris Wilson Date: Fri Jan 20 09:49:19 2017 +0000 xfree86: Take input_lock() for xf86ScreenCheckHWCursor commit cfddd919cce4178baba07959e5e862d02e166522 Author: Chris Wilson Date: Mon Jan 16 22:36:34 2017 +0000 xfree86: Take input lock for xf86TransparentCursor commit 7198a6d4e74f684cb383b3e0f70dd2bae405e6e7 Author: Chris Wilson Date: Mon Jan 16 22:17:36 2017 +0000 xfree86: Take the input lock for xf86RecolorCursor xf86RecolorCursor() may be called directly from XRecolorCursor as well as from xf86ScreenSetCursor(). In the latter case, the input lock is already held, but not for the former and so we need to add a wrapper function that acquires the input lock before performing xf86RecolorCursor() References: https://bugs.freedesktop.org/show_bug.cgi?id=99358 commit bb9128fdc86decd6f6e3b0e145011a8c08b1d2b5 Author: Qiang Yu Date: Thu Jan 26 18:13:53 2017 +0800 present: disable page flip only when a slave crtc is active This prevents the tearing of moving window in a composite WM desktop when output slave is attached but none of its crtc is really active. Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer commit 45e0eb4b156f2155687cce268b07f10540fc507b Author: Michel Dänzer Date: Thu Jan 26 16:24:03 2017 +0900 loader: Handle mod->VersionInfo == NULL This can happen when a module fails to load: Program received signal SIGSEGV, Segmentation fault. UnloadModule (_mod=0x5555559d9280) at ../../../../hw/xfree86/loader/loadmod.c:848 848 name = mod->VersionInfo->modname; (gdb) bt #0 UnloadModule (_mod=0x5555559d9280) at ../../../../hw/xfree86/loader/loadmod.c:848 #1 0x00005555555ddd1b in LoadModule (module=module@entry=0x5555559c7ce0 "fbdev", options=0x0, modreq=modreq@entry=0x0, errmaj=errmaj@entry=0x7fffffffe8ec) at ../../../../hw/xfree86/loader/loadmod.c:824 #2 0x00005555555edfe9 in xf86LoadModules (list=list@entry=0x5555559dcf50, optlist=optlist@entry=0x0) at ../../../../hw/xfree86/common/xf86Init.c:1506 #3 0x00005555555ee7bc in InitOutput (pScreenInfo=pScreenInfo@entry=0x5555559abf80 , argc=argc@entry=4, argv=argv@entry=0x7fffffffeb18) at ../../../../hw/xfree86/common/xf86Init.c:484 #4 0x00005555555a885c in dix_main (argc=4, argv=0x7fffffffeb18, envp=) at ../../dix/main.c:197 #5 0x00007ffff5d582b1 in __libc_start_main (main=0x555555593130
, argc=4, argv=0x7fffffffeb18, init=, fini=, rtld_fini=, stack_end=0x7fffffffeb08) at ../csu/libc-start.c:291 #6 0x000055555559316a in _start () Fixes: 8e83eacb9e2d ("loader: Remove unused path and name from ModuleDescPtr") Signed-off-by: Michel Dänzer Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7617a0a180a2cd3427a8ffa9534152df6a8fecbf Author: Qiang Yu Date: Wed Jan 11 13:59:22 2017 +0800 dri2: refine dri2_probe_driver_name (v2) V2: 1. update comment 2. check bustype if PCI 3. configure add libdrm version check for drmGetDevice Get PCI information from info->fd with drmGetDevice instead of assuming the info->fd is the first entity of scrn which is not true for multi entities scrn. Signed-off-by: Qiang Yu Reviewed-by: Emil Velikov commit b1a6986395f85b0194646a34b49367086dc9239d Author: Martin Peres Date: Wed Jan 25 17:29:15 2017 +0200 tests: shuffle around the linking order to please GNU ld Classic GNU ld resolves symbol dependencies only forward, while GOLD seems to work regardless of the specified library order. Suggested-by: Eero Tamminen Reviewed-by: Mihail Konev Signed-off-by: Martin Peres commit cc0f173ea2936d1405e382329c1bd58c7af67ea7 Author: Adam Jackson Date: Thu Apr 14 15:56:46 2016 -0400 loader: Learn about the joy of snprintf Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 8e83eacb9e2d2c6c2b9f8cdb9e82c976a0237f24 Author: Adam Jackson Date: Thu Apr 14 15:30:35 2016 -0400 loader: Remove unused path and name from ModuleDescPtr Just a waste of memory. Path was never referenced at all, and name was only used when unloading the module; we can just as well get the module's internal idea of its name from VersionInfo. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 8920dca0091675f1202c1198336cd4d8e0259100 Author: Adam Jackson Date: Thu Apr 14 11:45:58 2016 -0400 loader: Remove unused arguments from LoadModule Nobody was ever calling this with a non-null argument for subdir list or pattern list. Having done this, InitSubdirs is only ever called with a NULL argument, so it's really just a complicated way of duplicating the default list; we can remove that and just walk the list directly. The minor error code was only ever used to distinguish among two cases of LDR_BADUSAGE. Whatever. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit ba726ba6a73efe1bd19708b058f481f28068a85b Author: Adam Jackson Date: Thu Apr 14 11:30:02 2016 -0400 loader: Turn LoaderListDirs into LoaderListDir Callers only ever use this for a single directory anyway. While we're at it, also move xf86DriverListFromCompile near its only user in the X -configure code (and inline it out of existence), and remove LoaderFreeDirList as it's unused (since X -configure is just going to exit anyway, none of that code cares about cleanup). Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit c54a9ca152898ec2ffe50f6d5b70d483b85c1c34 Author: Adam Jackson Date: Thu Apr 14 11:17:22 2016 -0400 loader: Move loader list details to internal header There's no reason a driver should ever care about this. Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit d55284e8638ede15be851aa8a19a98dbbff0ce20 Author: Adam Jackson Date: Wed Apr 13 16:06:50 2016 -0400 xfree86: Remove a stray reference to font modules Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit d7879c46724a36bfd9a3a08e49903d001ffbf93e Author: Adam Jackson Date: Wed Apr 13 15:58:33 2016 -0400 xfree86: Fix up some bad indentation indent(1) gets confused by function-like macros with no trailing semicolon, which is fair enough really. Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 5c577da5f3a65c68d2ee12e4afca8f20c3e8ccf4 Author: Adam Jackson Date: Thu Jul 14 15:42:18 2016 -0400 xfree86: Remove DriverRec1 compat struct The idea here is that the driver might have once been old enough to not have the driverFunc slot in DriverRec, with the module ABI not having changed when it was added. That was ages ago, and drivers always declare themselves with DriverRec not DriverRec1, so uninitialized slots will simply be zero. Reviewed-by: Emil Velikov Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 2e3ad7e2506d9eb6667a5f229b5213d215451a5a Author: Adam Jackson Date: Wed Apr 13 15:50:39 2016 -0400 loader: Remove silly "unspecified" version handling Everybody using this functionality specifies a major version, which makes sense. If you don't care about a minor version, that's equivalent to saying you require minor >= 0, so just say so; likewise patch level. Likewise ABI class is always specified. Reviewed-by: Emil Velikov Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit ef533a912d18db31456b29a18c8bced649309565 Author: Adam Jackson Date: Tue Mar 1 08:29:06 2016 -0500 loader: Remove unused loader error codes and dead enum The enum has been unused since at least the removal of elfloader. Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 7e3cccf8e4426a4b25a7a94d52775d334693572f Author: Adam Jackson Date: Wed Apr 13 14:59:27 2016 -0400 loader: Include fewer headers from xf86Module.h This looks like more, but only if you don't compare it to the number pulled in by misc.h. Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 49fa76801348f6d044128f7ec743693d0759d683 Author: Adam Jackson Date: Fri Jun 5 11:01:30 2015 -0400 loader: Don't add internal/ to the search path Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 97bd6e453676516891250389ec0fd695c110087c Author: Adam Jackson Date: Fri Jun 5 10:58:20 2015 -0400 loader: Remove *GetOS This API is dumb. uname(3) exists, feel free to use it, but ideally write to the interface not to the OS. There are a couple of drivers using this API, they could all reasonably just not. This also removes the OS name from the loader subdirectory path search. Having /usr/lib/xorg shared across OSes is a non-goal here. Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit a6fcb15472bb7663ae917f5913bf07b6d3c7f186 Author: Adam Jackson Date: Mon Jun 16 11:30:18 2014 -0400 loader: Port from xfree86 to dix API Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 778cfc59762cdf528cf8672bfb5696844e91ebc3 Author: Emil Velikov Date: Sun Apr 17 21:07:30 2016 +0100 xfree86: flatten pathlist management in the loader Now that users can set the path only via LoaderSetPath(), we can simplify things. Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Emil Velikov commit 7b71055fc65242a9c4b651e72bb07dbb3f00c4e6 Author: Emil Velikov Date: Sun Apr 17 21:07:29 2016 +0100 xfree86: remove dummy/dead function prototype for LoadDriver Reviewed-by: Julien Cristau Signed-off-by: Emil Velikov commit 57eec704c3ddea0fecea2d8fbd1c3547f0b8fccf Author: Emil Velikov Date: Sun Apr 17 21:07:27 2016 +0100 xfree86: remove references to LoadSubModule's path from the doc Afaics the argument hasn't been part of the API since the documentation has been converted to xml with commit fc6ebe1e1d3 "Convert LinuxDoc documents to DocBook/XML" Reviewed-by: Julien Cristau Signed-off-by: Emil Velikov commit 2196bb50383bd96d364f799018c0693c9309ed7f Author: Emil Velikov Date: Sun Apr 17 21:07:28 2016 +0100 xfree86: remove unused path from the LoadModule API Similar to its little brother - LoadSubModule. Currently all call sites provide NULL anyway ;-) Reviewed-by: Aaron Plattner Reviewed-by: Julien Cristau Signed-off-by: Emil Velikov commit ea483af99a6351323afe00a0b630cd63310efdb1 Author: Adam Jackson Date: Thu Jan 19 17:20:49 2017 -0500 glx: Move Composite's synthetic visuals to a different select group Should you find yourself using a 16bpp display while also using a compositor, you poor soul, you may find that your GLX applications behave strangely; in particular, glxgears will be transparent. This is because it clears to (0,0,0,0) which is transparent if you honor alpha, and it will choose the synthetic visual because it has the most available r/g/b bits. To avoid this, bump synthetic visuals to a higher (less-preferred) select group. Unless the client explicitly asks for non-zero alpha bits, this will prefer any rgb565 visual ahead of the argb8888 visual. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 43efaa6e4fd903229dc9c508da4177ad4bbdd4d8 Author: Adam Jackson Date: Thu Jan 19 17:20:49 2017 -0500 glx: Send GLX_VISUAL_SELECT_GROUP_SGIX attribute for visuals We already send this for fbconfigs. Mesa happens to implement glXChooseVisual relative to the fbconfig data, but that might not be true of NVIDIA's libGL. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit ef2345aaa28461a76f77c65240ce5facc180f98e Author: Adam Jackson Date: Thu Jan 19 17:20:49 2017 -0500 composite: Export compIsAlternateVisual Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit bccbaf7c113b1300071601879002682ebbe8b1c1 Author: Adam Jackson Date: Thu Jan 19 17:20:49 2017 -0500 composite: Remove a misleading comment This comment is above compIsAlternateVisual, which used to be the only thing determining whether implicit redirect was needed. It's not anymore due to the redirection exception list. That job is now performed by compImplicitRedirect, whose code is self-explanitory. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 86463981361064dd0352ec215abf1696ce7fc5ea Author: Olivier Fourdan Date: Tue Jan 24 18:08:30 2017 +0100 glamor: Two pass won't work on memory pixmaps When selecting "CA_TWO_PASS" in glamor_composite_clipped_region() when the hardware does not support "GL_ARB_blend_func_extended", we call glamor_composite_choose_shader() twice in a row, which in turn calls glamor_pixmap_ensure_fbo(). On memory pixmaps, the first call will set the FBO and the second one will fail an assertion in glamor_upload_picture_to_texture() because the FBO is already set. Bail out earlier when the mask pixmap is in memory and the hardware capabilities would require to use two pass, so that the assertion is not failed and the rendering is correct. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99346 Signed-off-by: Olivier Fourdan Reviewed-by: Eric Anholt commit e7b8b7b131d8283c96ed0aff4593ab41441b5d3b Author: Adam Jackson Date: Thu Jan 19 17:30:40 2017 -0500 kdrive: Remove non-evdev input drivers Use evdev. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit d740e1830a7ef32433fdf338c1e04dc6c9a927cb Author: Adam Jackson Date: Thu Jan 19 17:30:39 2017 -0500 dmx: Remove non-evdev hardware input drivers Use evdev. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 6f531b0cdf8c9d7f711dd46071a26c50db3f1a16 Author: Mihail Konev Date: Sat Jan 14 12:51:45 2017 +0500 tests: Fix typo Remove redundrant/incorrect automake assignment. Buglink: https://lists.x.org/archives/xorg-devel/2017-January/052320.html Reported-by: Michel Dänzer Signed-off-by: Mihail Konev Reviewed-by: Jon Turney commit 3f8c2f94483bf0b96e129c97ef4950170a3f05b4 Author: Giuseppe Bilotta Date: Fri Jan 13 18:44:01 2017 +0100 tests: Fix without-dtrace build Signed-off-by: Giuseppe Bilotta Reviewed-by: Mihail Konev Signed-off-by: Mihail Konev commit b44bef513bd83249036cb5a237dc20eb6088c17c Author: Adam Jackson Date: Mon Jan 16 14:59:40 2017 -0500 Revert "tests: fix --disable-xorg build" Pushed the wrong thing. This reverts commit 730fd8c05f56da21894691bbd2e7ff37f67b45f4. commit 730fd8c05f56da21894691bbd2e7ff37f67b45f4 Author: Mihail Konev Date: Sat Jan 14 15:19:30 2017 +0500 tests: fix --disable-xorg build commit 704a867f8fb7652a8b7d5569bbe44e188457db4e Author: Mihail Konev Date: Thu Jan 12 13:21:12 2017 +0500 tests: Remove obsolete libxservertest.la Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit 23f6dbc96e47be6cbeed78cc9ef303987c3e29a9 Author: Mihail Konev Date: Thu Jan 12 13:21:11 2017 +0500 tests: Move test/{xi1,xi2}/tests to test/ Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit ead5064581665ff40c177dd1b447949f1420e209 Author: Mihail Konev Date: Thu Jan 12 13:21:10 2017 +0500 tests: Convert test/ to single binary Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit 773fc07e4c2f816966809492a924a9bd1a15d059 Author: Mihail Konev Date: Thu Jan 12 13:21:09 2017 +0500 tests: Convert test/xi2/ to single binary Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit 371576f64baa99c4ab1e736fbae7975a32577275 Author: Mihail Konev Date: Thu Jan 12 13:21:08 2017 +0500 tests: Convert test/xi1/ to single binary Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit ff66bca3e8797db709e03572d296358dc4b95653 Author: Mihail Konev Date: Thu Jan 12 13:21:07 2017 +0500 tests: Refactor wraps into protocol-common.c Part of refactoring the tests into a single binary, to make partial rebuild slightly faster and less verbose. Prepares for joining test/xi2/protocol-* into a single binary. Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit 45546219e117c1b6129fd9f9be2ce5b592486feb Author: Mihail Konev Date: Tue Jan 3 23:40:18 2017 +0500 tests: Avoid libtool message The "copying selected object files" message appears as some source files have the same name, and some objects are included twice. Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit 785053d033e73d2deb0ded4b97eabfd881991978 Author: Keith Packard Date: Mon Jan 9 18:10:21 2017 -0800 AttendClient of grab-pervious client must queue to saved_ready_clients [v2] A client which is attended while a grab is blocking execution of its requests needs to be placed in the saved_ready_clients list so that it will get scheduled once the grab terminates. Otherwise, if the client never sends another request, there is no way for it to be placed in the ready_clients list. v2: Wrap comment above mark_client_saved_ready. Remove test for OS_COMM_IGNORED which will always be true. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99333 Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 436da935bde43076f3052a758a463ed080e8a747 Author: Qiang Yu Date: Tue Jan 10 18:51:57 2017 +0800 modesetting: cleanup pci device open Signed-off-by: Qiang Yu Reviewed-by: Hans de Goede Signed-off-by: Peter Hutterer commit 555e0a42d138ac8d83af62638752a1bebad602d6 Author: Qiang Yu Date: Tue Jan 10 18:51:55 2017 +0800 randr: fix xserver crash when xrandr setprovideroutputsource xrandr --setprovideroutputsource Xorg: ../../../xserver/dix/dispatch.c:4018: AttachOutputGPU: Assertion `new->isGPU' failed. GPUScreen is not allowed to be sink output. Signed-off-by: Qiang Yu Reviewed-by: Hans de Goede Signed-off-by: Peter Hutterer commit 1012510620de7dadd0ab18b19a8e11facd884601 Author: Qiang Yu Date: Tue Jan 10 18:51:54 2017 +0800 xfree86: fix wrong usage of xf86optionListMerge Signed-off-by: Qiang Yu Reviewed-by: Hans de Goede Signed-off-by: Peter Hutterer commit e473b2bc016adacfe3fa47fdf6a8ce9f8cddff62 Author: Michel Dänzer Date: Fri Nov 25 17:34:05 2016 +0900 present: Only call present_flip_notify if vblank->queued == FALSE We are no longer using the present_flip_queue list only for presents which have already been submitted to the driver for page flipping, but also for those which we are queueing up to be flipped later, marked with vblank->queued == TRUE. We were incorrectly calling present_flip_notify for such entries, failing the assertion in present_flip_notify (or presumably resulting in other undesirable behaviour with assertions disabled). Reproduction recipe: Run the JavaFX test case referenced by https://bugs.freedesktop.org/show_bug.cgi?id=98831#c6 and alt-tab out of it while it's fullscreen. May take a few attempts to hit the assertion failure. Fixes: bab0f450a719 ("present: Fix presentation of flips out of order") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98854 Reviewed-by: Alex Deucher commit 9d32b71c93cf6187e9320c99ae857e34a51b7102 Author: Mihail Konev Date: Wed Jan 4 07:08:51 2017 +0500 xkb: Match key releases with an overlaid press Testcase: In ~/.xbindkeysrc: "xterm &" XF86LaunchA In ~/ov.xkb: xkb_keymap { xkb_keycodes { include "evdev" }; xkb_types { include "complete" }; xkb_compat { include "complete" interpret Overlay1_Enable+AnyOfOrNone(all) { action= SetControls(controls=Overlay1); }; }; xkb_symbols { include "pc+inet(evdev)+us" key { [ Overlay1_Enable ] }; key { overlay1 = }; // Insert+1 => 2 key { overlay1 = }; // Insert+~ => XF86LaunchA }; xkb_geometry { include "pc(pc104)" }; }; Apply this layout: 'xkbcomp ~/ov.xkb $DISPLAY'. Run "xbindkeys -n -v" In the exact order: - press Insert - press Tilde - release Insert - wait - release Tilde Keyboard input in the new terminal window(s) would be locked until another Insert+Tilde . Reported-by: Mariusz Mazur Signed-off-by: Mihail Konev Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 29a4f3db60fdeaef7bca3aa2746bb43a1850fddd Author: Adam Jackson Date: Mon Jan 2 15:38:08 2017 -0500 glamor: Squash unused variable warning Accidentally introduced in 05e19644. Signed-off-by: Adam Jackson commit 9874f73e88678c9eacbcba05e52336fc63a32712 Author: Kai-Heng Feng Date: Thu Dec 15 13:56:38 2016 +0800 edid: Add quirk for ADA 1024x600 7" display. Detailed mode reports 108 mm x 68 mm which is for smaller display. Maximum image size reports 15 cm x 10 cm which aligns with its physical size, use this size instead. Signed-off-by: Kai-Heng Feng Acked-by: Alex Deucher commit 1b42f9505ff3a39b441464f553442079b750fe88 Author: Peter Hutterer Date: Thu Dec 8 14:32:06 2016 +1000 os: return 0 from check_timers if we touched any of them Fixes a regression introduced in 0b2f30834b1a9f. If a driver posts input events during a timer function (wacom and synaptics do this during tap timeouts), ProcessInputEvents() is not called for these events. There are no new events on any fds, so the events just sit in the queue waiting for something else to happen. Fix this by simply returning 0 from check_timers if we ran at least one of them or reset them all. This way the callers ospoll_wait will exit and continue with normal processing. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit c96c860b6420adf0d004707a323af30491a1d7d3 Author: Michal Srb Date: Mon Dec 12 17:45:22 2016 +0200 xinerama: Swap the response in RRXineramaWriteMonitor Reviewed-by: Adam Jackson commit 05e19644250698aa126a60bc671e85425df784d1 Author: Hans De Goede Date: Tue Dec 20 13:00:43 2016 +0100 glamor: Trust eglGetPlatformDisplayEXT if it exists If the libEGL we are using has eglGetPlatformDisplayEXT, yet it still returns NULL, then this very likely means that it does not support the type (e.g. EGL_PLATFORM_GBM_MESA) passed in, and then returning NULL is the right thing to do. This avoids falling back to an eglGetDisplay() implementation which does not understands the passed in gbm handle, treats it as a pointer to something else completely, followed by a crash sooner or later. Specifically this fixes using the nvidia binary driver, with nvidia's libEGL + the modesetting driver on a secondary GPU crashing inside glamor_egl_init() sometimes. Cc: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 5b74e260e009d8bdf26433724495802b85cce7c3 Author: Mihail Konev Date: Thu Dec 29 12:37:18 2016 +0500 os,dix: Depend custom libs on libs, not objects The custom os/os.O library reuses *.o files of os/libos.la. The current rule assumes automake puts all the objects into per-target am__*_la_OBJECTS variable. At least with AC_REPLACE_FUNCS, this no longer holds (as wanted objects are put into LTLIBOBJS instead). Depend on automake's result, the *.la library instead, to express demand of any its dependencies being built. Should be fixing randomly occuring "undefined reference to `strlcpy'" errors when linking Xvfb and other DDX-es that could use os.O. Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit b5dffbbac193aa640ffcfa0a431c21b862854e53 Author: Hans De Goede Date: Mon Dec 12 17:03:17 2016 +0100 xfree86: Add ModulePath support for OutputClass config Sections Allow OutputClass config snippets to modify the module-path. Note that any specified ModulePaths will be pre-pended to the normal ModulePath. The idea behind this is that any output hardware specific modules should have preference over the normal modules. One use-case for this is the nvidia binary driver, this allows a config snippet like this: Section "OutputClass" MatchDriver "nvidia" Modulepath "/usr/lib64/nvidia/modules" EndSection To get the nvidia glx specific glx module loaded, but only when the nvidia kernel driver is loaded. Together with the glvnd work done recently, this allows the nouveau + mesa and nvidia-binary userspace stacks to co-exist on the same system without any ldconfig / xorg.conf tweaking and the xserver will automatically do the right thing depending on which kernel driver (nouveau or nvidia) is loaded. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit d75ffcdbf8c1e3c8e0d46debcd533a9f2560f0a8 Author: Hans De Goede Date: Mon Dec 12 17:03:16 2016 +0100 xfree86: Allow overriding primary GPU detection from an OutputClass section Allow using: Option "PrimaryGPU" "yes" In an OutputClass section to override the default primary GPU device selection which selects the GPU used as output by the firmware. If multiple output devices match an OutputClass section with the PrimaryGPU option set, the first one enumerated becomes the primary GPU. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit ab1a65b7755d081b41188104b21f4d21eaa3187b Author: Hans De Goede Date: Mon Dec 12 17:03:15 2016 +0100 xfree86: xf86platformProbe: split finding pci-info and setting primary GPU This is a preparation patch for allowing an OutputClass section to override the default primary GPU device selection. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 9cd3cc75269d9196898487b5712ee47b8291e077 Author: Hans De Goede Date: Mon Dec 12 17:03:14 2016 +0100 xfree86: Add options support for OutputClass Options Add support for setting options in OutputClass Sections and having these applied to any matching output devices. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 08b84d72878e43401e99059c3c926dfa42a360c3 Author: Hans De Goede Date: Mon Dec 12 17:03:13 2016 +0100 xfree86: Make OutputClassMatches take a xf86_platform_device Make OutputClassMatches directly take a xf86_platform_device as argument, rather then an index into xf86_platform_devices. This makes things easier for callers which already have a xf86_platform_device pointer. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit c57c1e53ea3d76ebba5b2a23b7260817d3e6b921 Author: Hans De Goede Date: Mon Dec 12 17:03:12 2016 +0100 xfree86: Free devlist returned by xf86MatchDevice xf86MatchDevice returns a dynamically allocated list of GDevPtr-s, free this when we're done with it. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 32e632e85894eddc3ace83f16f1e973b1be478fe Author: Adam Jackson Date: Mon Dec 12 13:08:17 2016 -0500 Revert "damage: Make damageRegionProcessPending take a damage not a drawable" The commit message makes the assertion that the code below damage is not allowed to change whether there's a damage monitor for the drawable. That turns out not to be the case! exa's mixed code, at least, will create and destroy a damage in PrepareAccess. The destroy path can then be catastrophic, as damageRegionProcessPending will attempt to RegionEmpty memory from the middle of a freed block. I'd wanted that invariant for performance, but faster isn't worth broken, so revert it. I think what exa's doing is reasonable, so the better way to improve performance for the unmonitored case is to either revisit dynamically wrapping into the GC, or inline damage into dix. This reverts commit 4e124203f2260daaf54155f4a05fe469733e0b97. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1389886 Signed-off-by: Adam Jackson commit 6dd65a6e9bd41237afe7615bea1cc9510e82781a Author: Adam Jackson Date: Fri Dec 9 14:52:38 2016 -0500 shadow: Remove unused shadowAlloc Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 8d985c1e696bf46edaea0021f03f6f613ce37860 Author: Adam Jackson Date: Fri Dec 9 14:52:37 2016 -0500 shadow: Macro cleanup shadowDamage is just obfuscation. The other two macros won't work outside shadow.c since the private key is in fact static there (meaning the extern decl is a lie). Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit a530dc2a62349d922de77a75786a3795102aec11 Author: Adam Jackson Date: Fri Dec 9 14:52:36 2016 -0500 shadow: Remove indirection stubs These are no longer used in the drivers. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 1ae09800863992cfb1d5d21c600e2bc29e3b6ab2 Author: Adam Jackson Date: Fri Dec 9 14:52:35 2016 -0500 shadow: Lift 32->24 conversion from modesetting to dix Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 2b486f052d8a7d3bada9eb2615aa19d79e999cbe Author: Adam Jackson Date: Fri Dec 9 14:52:34 2016 -0500 shadowfb: Rename this particular shadow.c to shadowfb.c So as not to conflict with the one in miext/shadow. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 98caba9f5669291e84f8610cc3071a9ac2df205f Author: Adam Jackson Date: Fri Dec 9 14:52:29 2016 -0500 dix: Clear graphicsExposures for scratch GCs in one place ... instead of in all the CreateScratchGC callers. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit e900a00f8dc5a1db63bafddd4ad1cde744975db1 Author: Adam Jackson Date: Fri Dec 9 14:52:28 2016 -0500 dix: Rename (and retype) PixmapPerDepth[1] to defaultStipple Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 8b335d9068fe4e1f1423a4d86c22b69ffcb819a5 Author: Ben Crocker Date: Tue Nov 15 16:34:38 2016 -0500 Fix a segfault that occurs if xorg.conf.d is absent: In InitOutput, if xf86HandleConfigFile returns CONFIG_NOFILE (which it does if no config file or directory is present), the autoconfig flag is set, causing xf86AutoConfig to be called later on. xf86AutoConfig calls xf86OutputClassDriverList via the call tree: xf86AutoConfig => listPossibleVideoDrivers => xf86PlatformMatchDriver => xf86OutputClassDriverList and xf86OutputClassDriverList attempts to traverse a linked list that is a member of the XF86ConfigRec struct pointed to by the global xf86configptr, which is NULL at this point because the XF86ConfigRec struct is only allocated (by xf86readConfigFile) AFTER the config file and directory have been successfully opened; the CONFIG_NOFILE return from xf86HandleConfigFile occurs BEFORE the call to xf86readConfigFile which allocates the XF86ConfigRec struct. Rx: In read.c (for symmetry with xf86freeConfig, which already appears in this file), add a new function xf86allocateConfig which tests the value of xf86configptr and, if it's NULL, allocates the XF86ConfigRec struct and deposits the pointer in xf86configptr. In xf86Parser.h, add a prototype for the new xf86allocateConfig function. Back in read.c, #include "xf86Config.h". In xf86readConfigFile, change the open-code call to calloc to a call to the new xf86allocateConfig function. In xf86AutoConfig.c, add a call to the new xf86allocateConfig function to the beginning of xf86AutoConfig to make sure the XF86ConfigRec struct is allocated. Reviewed-by: Adam Jackson Signed-off-by: Ben Crocker commit b365c5d16894a259dbf29db4ca2640d8ed768063 Author: Pekka Paalanen Date: Wed Dec 7 15:43:06 2016 +0200 test: fix distributing scripts Fix the following error on 'make distcheck': make[6]: *** No rule to make target 'scripts/xvfb-piglit.sh', needed by 'scripts/xvfb-piglit.sh.log'. Stop. make[6]: Leaving directory '/home/pq/git/xserver/xorg-server-1.19.99.1/_build/sub/test' Makefile:1367: recipe for target 'check-TESTS' failed The setup to trigger this is: $ ./configure --prefix=/home/pq/local --disable-docs --disable-devel-docs --enable-xwayland --disable-xorg --disable-xvfb --disable-xnest --disable-xquartz --disable-xwin --enable-debug SCRIPT_TESTS is populated conditionally, but we should distribute the scripts in any case. Reviewed-by: Adam Jackson Signed-off-by: Pekka Paalanen commit f31875510d818ba517f082e124adb294db906e51 Author: Adam Jackson Date: Tue Dec 6 14:11:11 2016 -0500 composite: Fix repaint of borders (v2) When going from border width zero to a non-zero border width, the Composite extension is informed via the ConfigNotify callback. The call-chain looks like this: compConfigNotify -> compReallocPixmap -> compSetPixmap -> TraverseTree -> compSetPixmapVisitWindow. However, at this time, pWindow->borderWidth was not yet updated. Thus, HasBorder() is false and the window border will not be repainted. To fix this, thread the new bw through to the window visitor, and inspect that rather than HasBorder(). For the other callers of compSetPixmap the border does not change size, so we can pass pWin->borderWidth instead. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98499 Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 75c4f6e412e07c5d416fa9ad8d7defd972d2baa9 Author: Hans de Goede Date: Fri Sep 30 12:29:09 2016 +0200 xfree86: Try harder to find atleast 1 non GPU Screen If we did not find any non GPU Screens, try again ignoring the notion of any video devices being the primary device. This fixes Xorg exiting with a "no screens found" error when using virtio-vga in a virtual-machine and when using a device driven by simpledrm. This is a somewhat ugly solution, but it is the best I can come up with without major surgery to the bus and probe code. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 7121b03d324fccf687d49b63c53da7c8d93038c9 Author: Hans de Goede Date: Fri Sep 30 11:59:04 2016 +0200 xfree86: Make adding unclaimed devices as GPU devices a separate step This is primarily a preparation patch for fixing the xserver exiting with a "no screens found" error even though there are supported video cards, due to the server not recognizing any card as the primary card. This also fixes the (mostly theoretical) case of a platformBus capable driver adding a device as GPUscreen before a driver which only supports the old PCI probe method gets a chance to claim it as a normal screen. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit b72d161cad15bec9dd082d30521c5383be526c56 Author: Hans de Goede Date: Tue Sep 27 14:30:10 2016 +0200 xfree86: Remove redundant ServerIsNotSeat0 check from xf86CallDriverProbe If foundScreen is TRUE, then all the code below the removed if will not execute until we reach the return foundScreen; at the end, so this entire if block is redundant. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit a46afee84d45fbff4e4dad9376afc95bbcc31d7c Author: Hans de Goede Date: Tue Nov 22 14:53:20 2016 +0100 randr: rrCheckPixmapBounding: do not shrink the screen_pixmap The purpose of rrCheckPixmapBounding is to make sure that the screen_pixmap is *large* enough for the slave-output which crtc is being configured. However until now rrCheckPixmapBounding would also shrink the screen_pixmap in certain scenarios leading to various problems. For example: Take a laptop with its internalscreen on a slave-output and currently disabled and an external monitor at 1920x1080+0+0. Now lets say that we want to drive the external monitor at its native resolution of 2560x1440 and have the internal screen mirror the top left part of the external monitor, so we run: $ xrandr --output eDP --mode 1920x1080 --pos 0x0 --output HDMI \ --mode 2560x1440 --pos 0x0 Here xrandr utility first calls RRSetScreenSize to 2560x1440, then it calls RRSetCrtc 1920x1080+0+0 on the eDP, since this is a slave output, rrCheckPixmapBounding gets called and resizes the screen_pixmap to 1920x1080, undoing the RRSetScreenSize. Then RRSetCrtc 2560x1440+0+0 gets called on the HDMI, depending on crtc->transforms this will either result in a BadValue error from ProcRRSetCrtcConfig; or it will succeed, but the monitor ends up running at 2560x1440 while showing a 1920x1080 screen_pixmap + black borders on the right and bottom. Neither of which is what we want. This commit removes the troublesome shrinking behavior, fixing this. Note: 1) One could argue that this will leave us with a too large screen_pixmap in some cases, but rrCheckPixmapBounding only gets called for slave outputs, so xrandr clients already must manually shrink the screen_pixmap after disabling crtcs in normal setups. 2) An alternative approach would be to also call rrCheckPixmapBounding on RRSetCrtc on normal (non-slave) outputs, but that would result in 2 unnecessary resizes of the screen_pixmap in the above example, which seems undesirable. Cc: Nikhil Mahale Cc: Dave Airlie Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit 3b624aa9a9df86dc7d48149e0f18ca223b4355f1 Author: Hans de Goede Date: Tue Nov 22 14:48:14 2016 +0100 randr: rrCheckPixmapBounding: Do not substract crtc non 0 x,y from screen size The purpose of rrCheckPixmapBounding is to make sure that the screen_pixmap is large enough for the slave-output which crtc is being configured. This should include crtc->x and crtc->y, otherwise the crtc might still end up scanning out an area outside of the screen-pixmap. For example: Take a laptop with an external monitor on a slave-output at 1920x1080+0+0 and its internal-screen at 3840x2160+1920+0 and in gnome-settings-daemon move the external monitor to be on the ri ght of the internal screen rather then on the left. First g-s-d will do a RRSetScreenSize to 5760*2160 (which is a nop), then it calls RRSetCrtc to move the slave output to 1920x1080+3840+0, since this is a slave output, rrCheckPixmapBounding gets called, since the 2 crtcs now overlap the code before this commit would shrinks the screen_pixmap to 3180*2160. Then g-s-d calls RRSetCrtc to move the internal screen to 3180*2160+0+0. And we end up with the slave-output configured to scan-out an area which completely falls outside of the screen-pixmap (and end up with a black display on the external monitor). This commit fixes this by not substracting the x1 and y1 coordinates of the union-ed region when determining the new screen_pixmap size. Cc: Nikhil Mahale Cc: Dave Airlie Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit e1d30075c923f96a375895d74ea12a3c92a640c6 Author: Adam Jackson Date: Tue Nov 22 10:51:24 2016 -0500 configure: Enable glamor when building just Xwayland Signed-off-by: Adam Jackson Acked-by: Daniel Stone Reviewed-by: Pekka Paalanen Tested-by: Pekka Paalanen Reviewed-by: Eric Anholt commit 59ad0e6a416d8e23f9d962af67a16ee28ec7867b Author: Olivier Fourdan Date: Wed Nov 30 09:42:43 2016 +0100 xwayland: Fix use after free of cursors Sometimes, Xwayland will try to use a cursor that has just been freed, leading to a crash when trying to access that cursor data either in miPointerUpdateSprite() or AnimCurTimerNotify(). CheckMotion() updates the pointer's cursor based on which xwindow XYToWindow() returns, and Xwayland implements its own xwl_xy_to_window() to fake a crossing to the root window when the pointer has left the Wayland surface but is still within the xwindow. But after an xwindow is unrealized, the last xwindow used to match the xwindows is cleared so two consecutive calls to xwl_xy_to_window() may not return the same xwindow. To avoid this issue, update the last_xwindow based on enter and leave notifications instead of xwl_xy_to_window(), and check if the xwindow found by the regular miXYToWindow() is a child of the known last xwindow, so that multiple consecutive calls to xwl_xy_to_window() return the same xwindow, being either the one found by miXYToWindow() or the root window. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1385258 Signed-off-by: Olivier Fourdan Tested-by: Vít Ondruch Tested-by: Satish Balay Reviewed-by: Jonas Ådahl commit f43207c1c4a8487600cf3ea116c10437417c861b Author: Olivier Fourdan Date: Thu Nov 3 09:59:30 2016 +0100 glamor: restore vfunc handlers on init failure In glamor_init(), if the minimum requirements are not met, glamor may fail after setting up its own CloseScreen() and DestroyPixmap() routines, leading to a crash when either of the two routines is called if glamor failed to complete its initialization, e.g: (EE) Backtrace: (EE) 0: Xwayland (OsSigHandler+0x29) (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) (EE) 2: Xwayland (glamor_sync_close+0x2a) (EE) 3: Xwayland (glamor_close_screen+0x52) (EE) 4: Xwayland (CursorCloseScreen+0x88) (EE) 5: Xwayland (AnimCurCloseScreen+0xa4) (EE) 6: Xwayland (present_close_screen+0x42) (EE) 7: Xwayland (dix_main+0x4f9) (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf1) (EE) 9: Xwayland (_start+0x2a) Restore the previous CloseScreen() and DestroyPixmap() vfunc handlers in case of failure when checking for the minimum requirements, so that if any of the requirement is not met we don't leave the CloseScreen() and DestroyPixmap() from glamor handlers in place. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1390018 Signed-off-by: Olivier Fourdan Reviewed-by: Hans de Goede Reviewed-by: Eric Anholt commit d6a6e1d6abb110ff00ad31b94cd29d92ca7c71a5 Author: Peter Hutterer Date: Fri Nov 11 15:28:50 2016 +1000 Xi: when creating a new master device, update barries for all clients The previous code only worked when the barrier was created by the same client as the one calling XIChangeDeviceHierarchy. http://bugzilla.redhat.com/show_bug.cgi?id=1384432 Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 5611585b87ce48428a66f98ece319a083f55d205 Author: Rui Matos Date: Thu Nov 24 19:56:18 2016 +0100 xwayland: Don't send KeyRelease events on wl_keyboard::leave Commits 816015648ffe660ddaa0f7d4d192e555b723c372 and fee0827a9a695600765f3d04376fc9babe497401 made it so that wl_keyboard::enter doesn't result in X clients getting KeyPress events while still updating our internal xkb state to be in sync with the host compositor. wl_keyboard::leave needs to be handled in the same way as its semantics from an X client POV should be the same as an X grab getting triggered, i.e. X clients shouldn't get KeyRelease events for keys that are still down at that point. This patch uses LeaveNotify for these events on wl_keyboard::leave and changes the current use of KeymapNotify to EnterNotify instead just to keep some symmetry between both cases. On ProcessDeviceEvent() we still need to deactivate X grabs if needed for KeyReleases. Signed-off-by: Rui Matos Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 2de37eb71b928f6f50c109536c2f7b77293ad8e3 Author: Pekka Paalanen Date: Wed Nov 23 09:54:27 2016 +0200 xwayland: fix order of calloc() args The definition by the manual is: calloc(size_t nmemb, size_t size) Swap the arguments of calloc() calls to be the right way around. Presumably this makes no functional difference, but better follow the spec. Signed-off-by: Pekka Paalanen Signed-off-by: Peter Hutterer commit cf8860786c3e301486cd2853bc82977ba75e6b17 Author: Rhys Kidd Date: Fri Oct 28 22:44:30 2016 -0400 test: Fix stray Makefile reference to removed os test Fixes the following warning: test/Makefile.am:69: warning: variable 'os_LDADD' is defined but no program or test/Makefile.am:69: library has 'os' as canonical name (possible typo) Introduced upon the removal of test/os in: commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 Author: Keith Packard Date: Tue Dec 8 14:39:46 2015 -0800 Remove SIGIO support for input [v5] This removes all of the SIGIO handling support used for input throughout the X server, preparing the way for using threads for input handling instead. Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls to stub functions input_lock/input_unlock so that we don't lose this information. xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO and OsReleaseSIGIO. v2: Don't change locking order (Peter Hutterer) v3: Comment weird && FALSE in xf86Helper.c Leave errno save/restore in xf86ReadInput Squash with stub adding patch (Peter Hutterer) v4: Leave UseSIGIO config parameter so that existing config files don't break (Peter Hutterer) v5: Split a couple of independent patch bits out of kinput.c (Peter Hutterer) Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Rhys Kidd Reviewed-by: Keith Packard Signed-off-by: Peter Hutterer commit f0f8d5bb535814d5803df541b0ef4cb0354fabbe Author: Keith Packard Date: Fri Nov 18 09:48:28 2016 -0800 Bump to post-1.19 development version Signed-off-by: Keith Packard commit 45af7fcb522464922831005d63cc362dc09f19a9 Author: Olivier Fourdan Date: Thu Nov 10 09:36:40 2016 +0100 xwayland: Remove MIPOINTER() definition Not needed anymore now that mipointer exposes an API for that, miPointerInvalidateSprite() Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7e5c9bdf73e4185ac4cf7f044da0793a5cc3e62c Author: Keith Packard Date: Tue Nov 15 08:12:05 2016 -0800 Bump version to 1.19.0 Signed-off-by: Keith Packard commit ea8efb3a997e15d27d362762e6c85d59487f9864 Author: Keith Packard Date: Wed Nov 2 13:25:33 2016 -0700 dix: Make sure client is not in output_pending chain after closed (RH 1382444) I think it is possible that output could get queued to a client during CloseDownClient. After it is removed from the pending queue, active grabs are released, the client is awoken if sleeping and any work queue entries related to the client are processed. To fix this, move the call removing it from the output_pending chain until after clientGone has been set and then check clientGone in output_pending_mark. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1382444 Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 7513da40a656317ad3aa101651d29373de99c798 Author: Timo Aaltonen Date: Wed Nov 2 17:18:11 2016 +0200 dri2: Sync i965_pci_ids.h from mesa Import changes from these mesa commits: 85ea8deb26da420 i965: Removing PCI IDs that are no longer listed as Kabylake. bdff2e554735ed9 i956: Add more Kabylake PCI IDs. f1fa8b4a1ca73fa i965/bxt: Add 2x6 variant d1ab544bb883d04 i965/chv: Display proper branding 20e8ee36627f874 i965/skl: Update Skylake renderer strings 644c8a515192d28 i965/skl: Add two missing device IDs Reviewed-by: Adam Jackson Signed-off-by: Timo Aaltonen commit 4cfee398726adf89db4b632ade7d6cab8b78282e Author: Ian Ray Date: Wed May 25 10:41:53 2016 +0300 xwayland-shm: block signals during fallocate posix_fallocate() does an explicit rollback if it gets EINTR, and this is a problem on slow systems because when the allocation size is sufficiently large posix_fallocate() will always be interrupted by the smart scheduler's SIGALRM. Changes since v1 - big comment in the code to explain what is going on Reviewed-by: Adam Jackson Signed-off-by: Ian Ray Acked-by: Pekka Paalanen Acked-by: Daniel Stone commit 512e75a23b7f6339593c3ae6942f0c420a975fd3 Author: Keith Packard Date: Fri Oct 28 09:32:42 2016 -0700 Bump to 1.18.99.902 (1.19 RC2) Signed-off-by: Keith Packard commit c85f81825e196e96337347e0ce3a538fb2e38f16 Author: Keith Packard Date: Fri Oct 28 09:28:32 2016 -0700 dix: Bump MAXHASHSIZE for the resource db [v2] [This was originally a workaround for a client-side resource leak: http://lists.freedesktop.org/archives/xorg-devel/2012-November/034555.html Obviously that's a broken app, but the performance problem it illustrates - that walking the linked list ends up burning all your CPU time - is real enough. - ajax] v2: Replace with a shorter code sequence which computes the same results for all but numBits == 7 Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 356db2340f5b473a7191c7969586ca5b0396c48f Merge: 9ed5b2635 03d99ef72 Author: Keith Packard Date: Fri Oct 28 09:05:54 2016 -0700 Merge remote-tracking branch 'jturney/master' commit 9ed5b263542e5245317927828f0515db6c0a54c8 Author: Keith Packard Date: Fri Oct 28 08:04:43 2016 -0700 os: Recompute whether any clients are ready after ProcessWorkQueue() (bug 98030) If a work proc wakes up a sleeping client and it is ready to execute, we need to re-compute the local 'are_ready' value before deciding what timeout value to use in WaitForSomething. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98030 Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 2c91f3235a4e1655e18cb014922529161051ffbb Author: Keith Packard Date: Wed Oct 5 09:41:44 2016 -0700 ephyr: Leave window unmapped for -glamor-skip-present [v2] If we're never painting anything in the window, we probably don't need to map it. v2: Drop ephyr_glamor_gles2 from hostx.c Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit cba5a10fd93310702cad9dbe1e6d48da99f5552f Author: Alex Goins Date: Wed Oct 26 11:03:49 2016 -0700 ramdac: Check sPriv != NULL in xf86CheckHWCursor() xf86CheckHWCursor() would dereference sPriv without NULL checking it. If Option "SWCursor" is specified, sPriv == NULL. In this case we should assume that HW cursors are not supported. Signed-off-by: Alex Goins Reviewed-by: Andy Ritger Signed-off-by: Keith Packard commit 03d99ef729178dd99268f185fb45320a29382091 Author: Jon Turney Date: Thu Oct 6 22:13:07 2016 +0100 glx/dri2: Don't build DRI loader if DRI2 isn't enabled This partially reverts 501d8e2b. Signed-off-by: Jon Turney Reviewed-by: Emil Velikov commit 5cb328338684d8e5b03913c47475bfcd7acffec4 Author: Peter Hutterer Date: Wed Oct 26 12:21:16 2016 +0200 inputthread: On Linux leave the main thread's name as-is On Linux, setting the main thread's name changes the program name (/proc/self/comm). Setting it to MainThread breaks scripts that rely on the command name, e.g. ps -C Xorg. Signed-off-by: Peter Hutterer Signed-off-by: Hans de Goede commit 007f8ee61a35ceda36b43e772a9a1074b8e27a06 Author: Olivier Fourdan Date: Fri Oct 21 10:11:45 2016 +0200 xwayland: Activate and enable touch devices On some random condition, a touch event may trigger a crash in Xwayland in GetTouchEvents(). The (simplified) backtrace goes as follow: (gdb) bt #0 GetTouchEvents() at getevents.c:1892 #1 QueueTouchEvents() at getevents.c:1866 #2 xwl_touch_send_event() at xwayland-input.c:652 #5 wl_closure_invoke() from libwayland-client.so.0 #6 dispatch_event() from libwayland-client.so.0 #7 wl_display_dispatch_queue_pending() from libwayland-client.so.0 #8 xwl_read_events() at xwayland.c:483 #9 ospoll_wait() at ospoll.c:412 #10 WaitForSomething() at WaitFor.c:222 #11 Dispatch() at dispatch.c:412 #12 dix_main() at main.c:287 #13 __libc_start_main() at libc-start.c:289 #14 _start () The crash occurs when trying to access the sprite associated with the touch device, which appears to be NULL. Reason being the device itself is more a keyboard device than a touch device. Moreover, it appears the device is neither enabled nor activated (inited=0, enabled=0) which doesn't seem right, but matches the code in init_touch() from xwayland-input.c which would enable the device if it was previously existing and otherwise would create the device but not activate it. Make sure we do activate and enable touch devices just like we do for other input devices such as keyboard and pointer. Signed-off-by: Olivier Fourdan Reviewed-by: Hans de Goede commit f68ba7b81ffe765380664fccc92f3e689c6c48c2 Author: Rui Matos Date: Tue Oct 25 19:24:49 2016 +0200 xwayland: Transform pointer enter event coordinates Pointer enter event coordinates are surface relative and we need them to be screen relative for pScreen->SetCursorPosition(). https://bugzilla.gnome.org/show_bug.cgi?id=758283 Signed-off-by: Rui Matos Reviewed-by: Eric Engestrom Reviewed-by: Jonas Ådahl Signed-off-by: Hans de Goede commit f5c6d751d08c6de77c2ca49ba2a48f8023758cef Author: Nikhil Mahale Date: Sat Oct 22 17:40:51 2016 +0530 modesetting: unifdef MODESETTING_OUTPUT_SLAVE_SUPPORT Commit c7e8d4a6ee9542f56cd241cf7a960fb8223a6b22 had already unifdef MODESETTING_OUTPUT_SLAVE_SUPPORT but commit 9257b1252da9092ddc676fec9aabe2b33dfad272 didn't notice that. Signed-off-by: Nikhil Mahale Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 4aaeeda4774397dd6d80aa240ca623ae795ec5dc Author: Hans de Goede Date: Tue Oct 18 16:10:19 2016 +0200 xfree86: Xorg.wrap: Do not require root rights for cards with 0 outputs Prior to this commit the Xorg.wrap code to detect if root rights are necessary checked for DRM_IOCTL_MODE_GETRESOURCES succeeding *and* reporting more then 0 output connectors. DRM_IOCTL_MODE_GETRESOURCES succeeding alone is enough to differentiate between old drm only cards (which need ums and thus root) and kms capable cards. Some hybrid gfx laptops have 0 output connectors on one of their 2 GPUs, resulting in Xorg needlessly running as root. This commits removes the res.count_connectors > 0 check, fixing this. Signed-off-by: Hans de Goede Reviewed-by: Eric Engestrom commit 7d91063aca4e4d326c294e246bc2dc36cb05318e Author: Michel Dänzer Date: Mon Oct 17 18:48:44 2016 +0900 DRI2: Sync radeonsi_pci_ids.h from Mesa Fixes DRI2 client driver name mapping for newer AMD GPUs with the modesetting driver, allowing the DRI2 extension to initialize. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Hans de Goede commit f6ff2e974c5de3071c899eba828789f1d4d8645a Author: Mihail Konev Date: Sat Oct 15 04:13:43 2016 +0000 modesetting: fix glamor ifdef Add a missing ifdef needed for --disable-glamor. Signed-off-by: Mihail Konev Reviewed-by: Jon Turney Signed-off-by: Hans de Goede commit 8fee6a917b6468e1b116d922f86484498874fb5c Author: Mihail Konev Date: Fri Oct 14 02:40:59 2016 +0000 xwin: make glx optional again Commit 501d8e2b removed --enable-aiglx, but made xwin always be --enable-glx. Signed-off-by: Mihail Konev Reviewed-by: Emil Velikov Reviewed-by: Jon Turney Signed-off-by: Hans de Goede commit d13cb974426f7f1110b0bdb08c4ebb46ff8975f7 Author: Peter Hutterer Date: Fri Oct 21 06:27:57 2016 +1000 ddx: add new call to purge input devices that weren't added Special case for the systemd-logind case in xfree86: when we're vt-switched away and a device is plugged in, we get a paused fd from logind. Since we can't probe the device or do anything with it, we store that device in the xfree86 and handle it later when we vt-switch back. The device is not added to inputInfo.devices until that time. When the device is removed while still vt-switched away, the the config system never notifies the DDX. It only runs through inputInfo.devices and our device was never added to that. When a device is plugged in, removed, and plugged in again while vt-switched away, we have two entries in the xfree86-specific list that refer to the same device node, both pending for addition later. On VT switch back, the first one (the already removed one) will be added successfully, the second one (the still plugged-in one) fails. Since the fd is correct, the device works until it is removed again. The removed devices' config_info (i.e. the syspath) doesn't match the actual device we addded tough (the input number increases with each plug), it doesn't get removed, the fd remains open and we lose track of the fd count. Plugging the device in again leads to a dead device. Fix this by adding a call to notify the DDX to purge any remainders of devices with the given config_info, that's the only identifiable bit we have at this point. https://bugs.freedesktop.org/show_bug.cgi?id=97928 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 8fcf2fa78f09257933b17e7dc9a03a2034e3076f Author: Peter Hutterer Date: Thu Oct 20 15:45:46 2016 +1000 xfree86: swap the list of paused devices to an xorg_list No functional changes but it makes it easier to remove elements from the middle of the list (future patch). We don't have an init call into this file, so the list is manually initialized. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 28d8855cd4e3be8831fb1c17bf1d205bd8465d1e Author: Peter Hutterer Date: Thu Oct 20 15:25:51 2016 +1000 xfree86: use the right option traversal list to search for an option They're identically laid-out structs but let's use the right type to search for our desired value. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 7fc96fb02dade4a86f2fc038f3cf5f2d9c0cda00 Author: Emil Velikov Date: Fri Oct 21 19:06:00 2016 +0100 glamor: don't look for non-existing EGL_KHR_platform_base The extension does not exist in the registry, thus needs to know they're using EGL 1.5 in order to determine the eglGetPlatformDisplay function pointer is valid. Thus brings us into some lovely circular dependency. Since mesa won't be able (in the foreseeable future) to export the KHR flavour of extension (another way one could assume that EGL 1.5 is available) just drop all the heuristics and use the EGL_EXT_platform_base extension. In practise (checked with the Mali driver) any EGL 1.5 driver will advertise support for EGL_EXT_platform_base. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 5dcb0666b82f5ab00f3d22e86f05ac14b0d5341e Author: Mihail Konev Date: Sat Oct 15 17:59:05 2016 +0000 os/inputthread: Ensure pollfd refreshing When putting a device node into a poll-request list, do not overwrite a "please-remove" element with the same fd, so that a closed device file is ospoll_remove'd prior to being ospoll_add'ed. Before, the opposite order was possible, resulting in ospoll_add considering the newly opened file being already polled, should it have a fd for which the "please-remove" has not been procesed yet. In this case, no further events would be seen from the device. Signed-off-by: Mihail Konev Regressed-in: 52d6a1e832a5e62289dd4f32824ae16a78dfd7e8 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97880 Patchwork: https://patchwork.freedesktop.org/patch/113763/ Hit-and-Reduced-by: Hans de Goede Reviewed-and-Reduced-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 9cf0bd4d4507dca6234024605b14724713f2109e Author: Michel Dänzer Date: Wed Oct 5 18:28:45 2016 +0900 xf86Cursor: Take the input lock in xf86Set/MoveCursor Prevents the HW cursor from intermittently jumping around when the cursor image is changed while the cursor is being moved. This is hardly noticeable in normal operation but can be quite confusing when stepping through these codepaths in a debugger. Reviewed-by: Hans de Goede commit 011ce3297d924e78ef0254b0451561946bd8be8d Author: Michel Dänzer Date: Wed Oct 5 18:01:29 2016 +0900 xf86Cursor: Use PRIME master xf86CursorScreenRec::HotX/Y for slaves xf86CursorScreenRec::HotX/Y contain 0 for PRIME slave screens. Fixes incorrect HW cursor position on PRIME slave screens. Also hoist the hotspot translation out from xf86ScreenSet/MoveCursor to xf86Set/MoveCursor, since the hotspot position is a property of the cursor, not the screen. v2: * Squash patches 1 & 2 of the v1 series, since it's basically the same problem * Use the master screen's xf86CursorScreenRec::HotX/Y instead of CursorRec::bits->x/yhot, since CursorRec::bits can be NULL (Hans de Goede) Reviewed-by: Hans de Goede commit e3f53aa3a8dfc323c75837cd41e35b8e895d547e Author: Adam Jackson Date: Thu Oct 6 14:42:34 2016 -0400 glx/dri2: Don't include drm headers They're not needed, and they won't be present on win32. Signed-off-by: Adam Jackson Reviewed-by: Emil Velikov commit 97a8353ec1192d8d3bd2ebb99e5687cb91427e09 Author: Peter Harris Date: Thu Sep 29 11:17:48 2016 -0400 Fix id in error when resource does not exist Always set client->errorValue before returning an error. Test program: int main(int argc, char *argv[]) { int screen = 0; xcb_connection_t *c = xcb_connect(NULL, &screen); if (!c) { printf("Cannot connect\n"); return 1; } xcb_void_cookie_t tok = xcb_free_gc_checked(c, BAD_VALUE); xcb_g_context_error_t *err = (xcb_g_context_error_t *)xcb_request_check(c, tok); if (!err) { printf("Unexpected request success\n"); return 1; } if (err->bad_value != BAD_VALUE) { printf("Error: Got 0x%X, expected 0x%X\n", err->bad_value, BAD_VALUE); return 1; } printf("Success! Got expected bad value of 0x%X\n", BAD_VALUE); return 0; } Reviewed-by: Adam Jackson Signed-off-by: Peter Harris commit f4a41155479e68bf55740c1dfffafc78e4c02087 Author: Adam Jackson Date: Wed Oct 5 12:34:34 2016 -0400 glamor: Use eglGetPlatformDisplay{,EXT} if we can eglGetDisplay forces the implementation to guess which kind of display it's been handed. glvnd does something different from Mesa, and in general it's impossible for the library to get this right. Add a new inline that gets the logic right, and works around a quirk in epoxy. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 95d3980c7c991b2cc8dcadac173635641ae15865 Author: Michel Dänzer Date: Wed Oct 5 17:29:36 2016 +0900 test: Use $XSERVER_BUILDDIR for Xvfb executable path Fixes make check with out-of-tree builds. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Reviewed-by: Eric Anholt commit cc69d4f110bd8a87b9e6c238ebebf8d85cbd93ec Author: Emil Velikov Date: Thu Sep 29 18:35:04 2016 +0100 xfree86/dri: remove libdrm runtime checks As of last commit all the places in our configure.ac require version 2.3.1 (released back in 2007) or later. With the latter introducing the 1.3.0 version, as returned by drmGetLibVersion. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 962962e978e5cededc20e577a36f77eb24d14bda Author: Emil Velikov Date: Thu Sep 29 18:35:03 2016 +0100 configure.ac: bump the required libdrm version to 2.3.1 It fixes a bug where the version reported by drmGetLibVersion() was 'wrong'. See libdrm commit 79038751ffe("libdrm: add support for server side functionality in libdrm") for details. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 74a8b320fa5068cd86d8b8b8e73fa92caae9a8a6 Author: Emil Velikov Date: Thu Sep 29 18:35:02 2016 +0100 configure.ac: use $LIBDRM over libdrm when using pkg-config The former contains the minimum required version which is required. Strictly speaking Xephyr/Xwayland may require version greater than the current 2.3.0, although I've personally haven't checked the specifics. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 45e1220486139c483a69366323f8f590beffa19d Author: Emil Velikov Date: Thu Sep 29 18:35:01 2016 +0100 configure.ac: default to DRI=yes on solaris platforms Afaict there's little-to-no reason/way one would want xserver without DRI support on Solaris platforms. This will allow us to simplify/fix all the libdrm detection in the next commit. Cc: Alan Coopersmith Signed-off-by: Emil Velikov Reviewed-by: Alan Coopersmith Reviewed-by: Adam Jackson commit 501d8e2beb337e072c93c9310fcd927a099b9c3b Author: Emil Velikov Date: Thu Sep 29 18:41:19 2016 +0100 configure.ac: remove --enable-aiglx option Presently the option guards both direct and accelerated indirect GLX. As such when one toggles it off they end up without any acceleration. Remove the option all together until we have the time to split/rework things. Cc: Jon Turney Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 7ec350ddd42479595f0ea88f86085af941913617 Author: Emil Velikov Date: Thu Sep 29 18:41:18 2016 +0100 xfree86: remove aiglx cmd/xorg.conf option The option is misleading and using it leads to disabling both direct and accelerated indirect GLX. In such cases the xserver GLX attempts to match DRISW (IGLX) configs with the DRI2/3 ones (direct GLX) leading to all sorts of fun experience. Remove the option until we get a clear split and control over direct vs indirect GLX. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 04ef8558a731bf070abf1b40c7e6b54aad8f5f31 Author: Emil Velikov Date: Thu Sep 29 18:41:17 2016 +0100 glx: drisw is not accelerated IGLX, reflect that in log messages The messages from glxdricommon.c (used by drisw) still have the A, but at least we're don't have it locally. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 1c2fcb95484777ca9aa80b3f814ad64e81f825f1 Author: Olivier Fourdan Date: Wed Oct 5 08:36:21 2016 +0200 glamor: Fix pixmap offset for bitplane in glamor_copy_fbo_cpu Commit cba28d5 - "glamor: Handle bitplane in glamor_copy_fbo_cpu" introduced a regression as the computed pixmap offset would not match the actual coordinates and write data elsewhere in memory causing a segfault in fbBltOne(). Translate the pixmap coordinates so that the data is read and written at the correct location. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97974 Signed-off-by: Olivier Fourdan Reviewed-and-Tested-by: Michel Dänzer commit a6e85e6330adcdcbcd939c0963daaecc96d41a2a Author: Jonas Ådahl Date: Tue Sep 13 15:17:08 2016 +0800 xwayland: Add pointer warp emulator Emulate pointer warps by locking the pointer and sending relative motion events instead of absolute. X will keep track of the "fake" pointer cursor position given the relative motion events, and the client warping the cursor will warp the faked cursor position. Various requirements need to be met for the pointer warp emulator to enable: The cursor must be invisible: since it would not be acceptable that a fake cursor position would be different from the visual representation of the cursor, emulation can only be done when there is no visual representation done by the Wayland compositor. Thus, for the emulator to enable, the cursor must be hidden, and would the cursor be displayed while the emulator is active, the emulator would be destroyed. The window that is warped within must be likely to have pointer focus. For example, warping outside of the window region will be ignored. The pointer warp emulator will disable itself once the fake cursor position leaves the window region, or the cursor is made visible. This makes various games depending on pointer warping (such as 3D first-person shooters and stategy games using click-to-drag-map like things) work. Signed-off-by: Jonas Ådahl commit 467ab142fff926e1475440dd5f649a49f45808fa Author: Jonas Ådahl Date: Tue Sep 13 15:17:07 2016 +0800 xwayland: Translate a pointer grab with confineTo to pointer confinement Translate grabbing a pointer device with confineTo set to a window into confining the Wayland pointer using the pointer constraints protocol. This makes clients that depend on the pointer not going outside of the window region, such as certain games and virtual machines viewers, to function more properly. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit ca7b593fbe54bc9a0b44037e62e4b4401cbd375e Author: Jonas Ådahl Date: Thu Sep 29 10:42:13 2016 +0800 xwayland: Bind pointer constraints global Will be used by the pointer warp emulator. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit c14a8c6cc0fcd56c380d1220c2a8f04b74edee93 Author: Jonas Ådahl Date: Tue Sep 13 15:17:05 2016 +0800 xwayland: Put getting a xwl_window from a Window in a helper Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit b4644ce8d3420447a8e5a2339238968da0a59de7 Author: Jonas Ådahl Date: Tue Sep 13 15:17:04 2016 +0800 xwayland: Set unaccelerated pointer motion delta if available If there was an relative pointer motion within the same frame as an absolute pointer motion, provide both the absolute coordinate and the unaccelerated delta when setting the valuator mask. If a frame contained only a relative motion, queue an absolute motion with an unchanged position, but still pass the unaccelerated motion event. If the wl_seat advertised by the compositor is not new enough, assume each relative and absolute pointer motion arrives within their own separate frames. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit aa9634d03bc2434dfd25476529eccb14e46fcfdc Author: Jonas Ådahl Date: Tue Sep 13 15:17:03 2016 +0800 xwayland: Dispatch pointer motion events on wl_pointer.frame if possible Wait until wl_pointer.frame with dispatching the pointer motion event, if wl_pointer.frame is supported by the compositor. This will later be used to combine unaccelerated motion deltas with the absolute motion delta. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit 42e8902395cb27af5c28306abd577a92c467a62d Author: Krzysztof Sobiecki Date: Tue Sep 13 22:23:49 2016 +0800 xwayland: Add a new input device used for pointer warping/locking Generating relative and absolute movement events from the same input device is problematic, because an absolute pointer device doesn't expect to see any relative motion events. To be able to generate relative pointer motion events including unaccelerated deltas, create a secondary pointer device 'xwayland-relative-pointer', and use that for emitting relative motion events. Signed-off-by: Krzysztof Sobiecki Signed-off-by: Jonas Ådahl commit 011ada724afdba8955f1d4844b306e61390eead8 Author: Jonas Ådahl Date: Tue Sep 13 15:17:01 2016 +0800 xwayland: Move pointer button initialization into helper We'll later use this for initializing buttons for the relative pointer since they need to be the same. Signed-off-by: Jonas Ådahl commit a77d0715c6272cc1778a54dccd8cb68dc28cd761 Author: Jonas Ådahl Date: Tue Sep 13 15:17:00 2016 +0800 xwayland: Split up device class init/release into functions Put device class initialization in init_[device_class](xwl_seat) and releasing in release_[device class](xwl_seat). The purpose is to make it easier to add more type of initialization here later, without making the function too large. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit 9037ba736a0424feee2fb6ac20cf7687613dc452 Author: Jonas Ådahl Date: Thu Sep 29 10:40:01 2016 +0800 xwayland: Bind the relative pointer manager Will be used for getting unaccelerated motion events and later for relative motions used by a pointer warp emulator. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit 0fae3be0686cae746e03d6e4592f97278cc2275d Author: Jonas Ådahl Date: Tue Sep 13 15:16:57 2016 +0800 dix: Add valuator_mask_set_absolute_unaccelerated Add a valuator mask setter for setting absolute coordinate combined with unaccelerated motion deltas. This will later be used by Xwayland to combine a wl_pointer.motion() event with the unaccelerated delta of a wp_relative_pointer.relative_motion() event. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit bbd4854f81ebba1119202c5f6ff4679c62afec1f Author: Carlos Garnacho Date: Tue Sep 27 19:03:26 2016 +0200 xwayland: Apply touch abs axes transformation before posting events The way we map the touch absolute device to screen coordinates can't work across wl_output mode and geometry events. Instead, set up a fixed coordinate space, and transform touch events according to the screen coordinate space as they happen. Reviewed-by: Adam Jackson Signed-off-by: Carlos Garnacho commit ee526285882995289846648f3122c4295e3e8284 Author: Carlos Garnacho Date: Wed Sep 28 12:35:36 2016 +0200 xwayland: Apply "last pointer window" check only to the pointer device The checks in xwayland's XYToWindow handler pretty much assumes that the sprite is managed by the wl_pointer, which is not entirely right, given 1) The Virtual Core Pointer may be controlled from other interfaces, and 2) there may be other SpriteRecs than the VCP's. This makes XYToWindow calls return a sprite trace with just the root window if any of those two assumptions are broken, eg. on touch events. So turn the check upside down, first assume that the default XYToWindow proc behavior is right, and later cut down the spriteTrace if the current device happens to be the pointer and is out of focus. We work our way to the device's lastSlave here so as not to break assumption #1 above. Reviewed-by: Adam Jackson Signed-off-by: Carlos Garnacho Acked-by: Olivier Fourdan commit 2b6a068d21997ca812e665ed058e72eb4626c129 Author: Keith Packard Date: Mon Oct 3 15:37:03 2016 -0700 fb: XYPixmap format PutImage includes all planes in depth Unlike GetImage, for which the provided planemask restricts the data delivered, for PutImage in XYPixmap format, all of the planes in the drawable depth are sent and those outside the plane mask are simply ignored. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit c9b8ce73927a43ed82b267d1c1985445f24827cc Author: Mark Yao Date: Fri Sep 30 16:42:35 2016 +0800 glamor: spans: fixup wrong count on glDrawArrays In commit 9e9fcf5 (glamor: Add a helper function for the common GL_QUADS fallback pattern.), the glDrawArrays count change was accidentally changed to nbox. Fixes xlogo with MESA_GL_VERSION_OVERRIDE=2.1 and MESA_GLSL_VERSION_OVERRIDE=120 Signed-off-by: Mark Yao Reviewed-by: Eric Anholt commit 2aca2dadda4cc9c378049457885d33a4eede9768 Author: Eric Anholt Date: Sat Sep 24 14:42:28 2016 -0700 glamor: Fix link failure on GLES2. Current Mesa requires that the precision qualifier on uniforms matches between stages, even if (as in this case) the uniform isn't used in one of the stages. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 20fcdfcf39497fe44d2a3200338523effb8e2bc6 Author: Eric Anholt Date: Sat Sep 24 14:30:27 2016 -0700 glamor: Remove #if 0-ed picture dumping code. I don't think anybody has run this code since it was pulled into the server. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 4b5326aeba539249fcded91bf7806a708eeca651 Author: Eric Anholt Date: Sat Sep 24 14:04:14 2016 -0700 glamor: Remove many unused glamor util functions. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 117d614d1ba324bdb02c50a430c2e0d22a384f03 Author: Eric Anholt Date: Sat Sep 24 22:26:17 2016 +0300 glamor: Require GL_OES_texture_border_clamp for GLES2. The extension came out in 2000, and all Mesa-supported hardware that can do glamor supports it. We were already relying on the ARB version being present on desktop. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 7a5ddf8da5ed817aa2dd6f7af1b9197a5ceec60b Author: Adam Jackson Date: Wed Sep 28 15:27:20 2016 -0400 test: Re-enable a couple of GetImage tests Fixed in 6c6f09aac. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit c7a9161da5eb80ef0444601621b52314255b0ce5 Author: Francois Tigeot Date: Fri Sep 23 11:36:49 2016 +0200 Enable XTRANS_SEND_FDS on FreeBSD, DragonFly and OpenBSD This code is based on local patches which had been sitting in FreeBSD and OpenBSD ports. Reviewed-by: Matthieu Herrb Signed-off-by: François Tigeot commit 6c6f09aac7f1d1367a042087b7681c7fdf1d1e0f Author: Keith Packard Date: Sun Sep 25 14:19:08 2016 +0300 xace: Don't censor window borders GetImage is allowed to return window border contents, so don't remove that from the returned image. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 380c2ca25ec4dd330f938e382ff4af60bc253785 Author: Hans de Goede Date: Fri Sep 23 14:11:52 2016 +0300 XF86VidMode: Fix free() on walked pointer Based on: https://patchwork.freedesktop.org/patch/85636/ Rewritten to just not walk the pointer. Signed-off-by: Hans de Goede Reviewed-by: Emi Velikov commit 220d327ee00ec1278d50d4ba8cd20612e8b77c8f Author: Hans de Goede Date: Fri Sep 23 14:06:52 2016 +0300 Xext: Fix a memory leak Based on: https://patchwork.freedesktop.org/patch/85636/ Rewritten to also free the resources allocated by panoramix_setup_ids(). Signed-off-by: Hans de Goede Reviewed-by: Emi Velikov commit 3abf791ab82cb3dc7eacd0317fe0262a71340753 Author: Michael Thayer Date: Fri Sep 16 17:51:25 2016 +0200 modesetting: only fall back to drmModeSetCursor() on -EINVAL This change effectively reverts commit 074cf58. We were falling back from drmModeSetCursor2() to drmModeSetCursor() whenever the first failed. This fall-back only makes sense on pre-mid-2013 kernels which implemented the cursor_set hook but not cursor_set2, and in this case the call to drmModeSetCursor2() will always return -EINVAL. Specifically, a return value of -ENXIO usually means that neither are supported. Signed-off-by: Michael Thayer [hdegoede@redhat.com: initialize ret to -EINVAL] Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 363f4273dd4aec3e26cc57ecb6c20f27e6c813d8 Author: Daniel Martin Date: Fri Dec 11 12:05:22 2015 +0100 modesetting: Consume all available udev events at once We get multiple udev events for actions like docking a laptop into its station or plugging a monitor to the station. By consuming as much events as we can, we reduce the number of output re-evalutions. I.e. having a Lenovo X250 in a ThinkPad Ultra Dock and plugging a monitor to the station generates 5 udev events. Or having 2 monitors attached to the station and docking the laptop generates 7 events. It depends on the timing how many events can consumed at once. Signed-off-by: Daniel Martin [hdegoede@redhat.com: Keep goto out so that we always call RRGetInfo()] Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit ea91db4b83312e791dcae935b8720f49a3861d72 Author: Qiang Yu Date: Thu Sep 8 21:24:58 2016 +0800 config: fix GPUDevice fail when AutoAddGPU off + BusID This fix is for the following xorg.conf can work: Section "ServerFlags" Option "AutoAddGPU" "off" EndSection Section "Device" Identifier "Amd" Driver "ati" BusID "PCI:1:0:0" EndSection Section "Device" Identifier "Intel" Driver "modesetting" BusID "pci:0:2:0" EndSection Section "Screen" Identifier "Screen0" Device "Intel" GPUDevice "Amd" EndSection Without AutoAddGPU off, modesetting DDX will also be loaded for GPUDevice. Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit ca8d88e50310a0d440a127c22a0a383cc149f408 Author: Laszlo Ersek Date: Wed Sep 7 15:08:06 2016 +0200 xfree86: recognize primary BUS_PCI device in xf86IsPrimaryPlatform() The new platform bus code and the old PCI bus code overlap. Platform bus can handle any type of device, including PCI devices, whereas the PCI code can only handle PCI devices. Some drivers only support the old style PCI-probe methods, but the primary device detection code is server based, not driver based; so we might end up with a primary device which only has a PCI bus-capable driver, but was detected as primary by the platform code, or the other way around. (The above paragraph was shamelessly stolen from Hans de Goede, and customized.) The latter case applies to QEMU's virtio-gpu-pci device: it is detected as a BUS_PCI primary device, but we actually probe it first (with the modesetting driver) through xf86platformProbeDev(). The xf86IsPrimaryPlatform() function doesn't recognize the device as primary (it bails out as soon as it sees BUS_PCI); instead, we add the device as a secondary graphics card under "autoAddGPU". In turn, the success of this automatic probing-as-GPU prevents xf86CallDriverProbe() from proceeding to the PCI probing. The result is that the server exits with no primary devices detected. Commit cf66471353ac ("xfree86: use udev to provide device enumeration for kms devices (v10)") added "cross-bus" matching to xf86IsPrimaryPci(). Port that now to xf86IsPrimaryPlatform(), so that we can probe virtio-gpu-pci as a primary card in platform bus code. Cc: Adam Jackson Cc: Dave Airlie Cc: Hans de Goede Cc: Keith Packard Cc: Marcin Juszkiewicz Signed-off-by: Laszlo Ersek Tested-By: Marcin Juszkiewicz Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 44968da376c880e096225f149f78673aa4c6e5e0 Author: Kyle Guinn Date: Fri Sep 23 15:03:34 2016 +0300 xfree86: Fix null pointer dereference Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93675 Signed-off-by: Kyle Guinn [hdegoede@redhat.com: Simplify by adding 2 if conds together with &&] Signed-off-by: Hans de Goede commit 127e0569ca8dbf774df8f83d4c59bbbbf2e25a20 Author: David CARLIER Date: Fri Sep 23 14:17:12 2016 +0300 xfree86: small memory leaks fixes A couple of memory leaks fixes and avoiding bit shifting on an unitialized value. [hdegoede@redhat.com: Split out some non free fixes in separate patches] [hdegoede@redhat.com: Don't touch ancient (and weird) os/rpcauth.c code] Signed-off-by: Hans de Goede commit d51cce7992508f366758fa13dd93be24df0947ed Author: Adam Jackson Date: Tue Jul 5 13:07:09 2016 -0400 xephyr: Don't crash if the server advertises zero xv adaptors Useless as an XVideo implementation with zero adaptors might be, it's apparently a thing in the wild. Catch this case and bail out of xv init if it happens. Signed-off-by: Adam Jackson Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 445271ec00f25405fa5ed0e149dd4a9d9f6098d4 Author: Hans de Goede Date: Fri Jul 1 17:36:02 2016 +0200 glx: Always enable EXT_texture_from_pixmap for DRI swrast glx Prior to commit f95645c6f700 ("glx: Don't enable EXT_texture_from_pixmap unconditionally") DRI glx would always advertise EXT_texture_from_pixmap. That commit moved the setting of the extension in the extension bits from __glXInitExtensionEnableBits to its callers so that __glXInitExtensionEnableBits can be used more generally, but at the same time made the setting of EXT_texture_from_pixmap conditionally on __DRI_TEX_BUFFER being present. This has result in an unintended behavior change which breaks e.g. compositors running on llvmpipe. This commit makes the DRI swrast glx code advertise EXT_texture_from_pixmap unconditionally again fixing this. Fixes: f95645c6f700 ("glx: Don't enable EXT_texture_from_pixmap unconditionally") Signed-off-by: Hans de Goede --- Changes in v2: -Only add unconditional advertising of GLX_EXT_texture_from_pixmap to glxdriswrast.c, do not also add it to glxdri2.c commit 02ff0a5d7e32ce8460d6d0669f532d65ad212fcd Author: Hans de Goede Date: Sat Sep 17 11:33:13 2016 +0200 xf86RandR12: Fix XF86VidModeSetGamma triggering a BadImplementation error Commit b4e46c0444bb ("xfree86: Hook up colormaps and RandR 1.2 gamma code") dropped the providing of a pScrn->ChangeGamma callback from the xf86RandR12 code. Leaving pScrn->ChangeGamma NULL in most cases. This triggers the BadImplementation error in xf86ChangeGamma() : if (pScrn->ChangeGamma) return (*pScrn->ChangeGamma) (pScrn, gamma); return BadImplementation; Which causes X-apps using XF86VidModeSetGamma to crash with a X protocol error. This commit fixes this by re-introducing the xf86RandR12ChangeGamma helper removed by the commit and adjusting it to work with the new combined palette / gamma code. Fixes: b4e46c0444bb ("xfree86: Hook up colormaps and RandR 1.2 gamma code") Signed-off-by: Hans de Goede Reviewed-by: Alex Deucher commit a58dd678bf952560e5422845e186d80a189953fe Author: Hans de Goede Date: Sat Sep 17 11:42:09 2016 +0200 xf86RandR12: Move calculating of shift inside init_one_component This is a preparation patch to allow easier usage of init_one_component outside of xf86RandR12CrtcInitGamma. Signed-off-by: Hans de Goede Reviewed-by: Alex Deucher commit 299cbb92670fdb83c24c3ef6327eb9d66b8be92a Author: Hans de Goede Date: Thu Sep 15 14:35:52 2016 +0200 modesetting: Fix reverse prime update lagging on secondary GPU outputs When using secondary GPU outputs the primary GPU's blockhandler will copy changes from its framebuffer to a pixmap shared with the secondary GPU. In reverse prime setups the secondary GPU's blockhandler will do another copy from the shared pixmap to its own framebuffer. Before this commit, if the primary GPU's blockhandler would run after the secondary GPU's blockhandler and no events were pending, then the secondary GPU's blockhandler would not run until some events came in (WaitForSomething() would block in the poll call), resulting in the secondary GPU output sometimes showing stale contents (e.g. a just closed window) for easily up to 10 seconds. This commit fixes this by setting the timeout passed into the blockhandler to 0 if any shared pixmaps were updated by the primary GPU, forcing an immediate re-run of all blockhandlers. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit e8695100b17b758359fc4897dbe995231ed224fc Author: Hans de Goede Date: Thu Sep 15 14:28:35 2016 +0200 modesetting: Fix reverse prime partial update issues on secondary GPU outputs When using reverse prime we do 2 copies, 1 from the primary GPU's framebuffer to a shared pixmap and 1 from the shared pixmap to the secondary GPU's framebuffer. This means that on the primary GPU side the copy MUST be finished, before we start the second copy (before the secondary GPU's driver starts processing the damage on the shared pixmap). This fixes secondary outputs sometimes showning (some) old fb contents, because of the 2 copies racing with each other, for an example of what this looks like see: https://fedorapeople.org/~jwrdegoede/IMG_20160915_130555.jpg Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie Reviewed-by: Eric Anholt commit 862a3dab287b5186a958d0131d70779468348e3e Author: Olivier Fourdan Date: Thu Sep 22 09:38:50 2016 +0200 xwayland: Clear up x_cursor on UnrealizeCursor() In Xwayland's xwl_unrealize_cursor(), the x_cursor is cleared up only when a device value is provided to the UnrealizeCursor() routine, but if the device is NULL as called from FreeCursor(), the corresponding x_cursor for the xwl_seat is left untouched. This might cause a segfault when trying to access the unrealized cursor's devPrivates in xwl_seat_set_cursor(). A possible occurrence of this is the client changing the cursor, the Xserver calling FreeCursor() which does UnrealizeCursor() and then the Wayland server sending a pointer enter event, which invokes xwl_seat_set_cursor() while the seat's x_cursor has just been unrealized. To avoid this, walk through all the xwl_seats and clear up all x_cursor matching the cursor being unrealized. Signed-off-by: Olivier Fourdan Reviewed-by: Jonas Ådahl Reviewed-by: Hans de Goede commit b79eaf1184f6514ede9dcd9baaa24a40ef724a15 Author: Olivier Fourdan Date: Thu Sep 15 15:59:07 2016 +0200 xwayland: handle EAGAIN on Wayland fd wl_display_flush() can fail with EAGAIN and Xwayland would make this a fatal error. When this happens, it means that Xwayland has flooded the Wayland file descriptor, either because the Wayland compositor cannot cope or more likely because of a deadlock situation where the Wayland compositor is blocking, waiting for an X reply while Xwayland tries to write data to the Wayland file descriptor. The general consensus to avoid the deadlock is for the Wayland compositor to never issue blocking X11 roundtrips, but in practice blocking rountrips can occur in various places, including Xlib calls themselves so this is not always achievable without major surgery in the Wayland compositor/Window manager. What this patch does is to avoid dispatching to the Wayland file descriptor until it becomes available for writing again, while at the same time continue processing X11 requests to release the deadlock. This is not perfect, as there is still the possibility of another X client hammering the connection and we'll still fail writing to the Wayland connection eventually, but this improves things enough to avoid a 100% repeatable crash with vlc and gtkperf. Also, it is worth considering that window managers and Wayland compositors such as mutter already have a higher priority than other regular X clients thanks to XSyncSetPriority(), mitigating the risk. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1278159 Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=763400 Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 36e1a058c5826398ceea9dba6c166ae40c75646e Author: Rui Matos Date: Fri Feb 5 14:44:29 2016 +0100 xwayland: Close the shm fd as early as possible Keeping the shm fd open beyond pixmap creation means we can easily reach the open file descriptor limit if an X client asks us to create that many pixmaps. Instead, let's get the wl_buffer immediatly so that we can destroy the shm pool and close the fd before being asked to create more. Tested-by: Olivier Fourdan Reviewed-by: Olivier Fourdan commit fd4a6dc06fcf8671d616af52025e19200c79e404 Author: Adam Jackson Date: Tue Sep 27 17:15:12 2016 -0400 glamor: Fall back to software for CopyPlane if we need to glUniform4ui is available starting in GL{,ES} 3.0. Technically it's also in EXT_gpu_shader4, but that's not worth supporting. There was also a MESA_shading_language_130 spec proposed at one point; if that ever gets finished, we can update epoxy to know about it and fix up the feature check. Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer commit c49e820f796c27cbd2907709576a3fb672acd453 Author: Eric Anholt Date: Sun Sep 25 13:30:22 2016 -0700 test: Run xts against Xephyr -glamor when present v2: Drop x8r8g8b8 skip, now that it's fixed. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 5392ea5525082ceeb3aad50d9168baee2abc860e Author: Eric Anholt Date: Sun Sep 25 13:30:21 2016 -0700 test: Switch our testing X server to being spawned with simple-xinit Once I introduced a second X server being tested, I found that startx hit races in choosing a display. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 283840c295c69aa3729f3f0aa2bf3ef83b1c220f Author: Eric Anholt Date: Sun Sep 25 13:30:20 2016 -0700 test: Update piglit HTML even when tests all pass I was confused by the behavior I'd written before. keithp and mattst88 responded with shock that I would have made it so surprising, as well. v2: Point to index.html instead of problems.html, which won't exist if we had no problems. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 022fea767cd29d256fb99159df89cc25d339e787 Author: Eric Anholt Date: Sun Sep 25 13:30:19 2016 -0700 test: Fix parsing of piglit results The "dmesg-fail" line was matching our "fail" regex, so if you didn't have those we would ignore fails. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 7fe5b9c02cf90b81532cb6dee3ec75c90c72c27c Author: Eric Anholt Date: Sun Sep 25 13:30:18 2016 -0700 test: Make the piglit-running script callable with an arbitrary server v2: Check that SERVER_COMMAND is set. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 7ac130a0664b43b6ba5324548c8f7ab8230f7199 Author: Eric Anholt Date: Sun Sep 25 13:30:17 2016 -0700 test: Add a little xinit-like program for starting servers for testing The normal xinit is racy because it doesn't use -displayfd. This implements the bare minimum for testing purposes, using -displayfd to sequence starting the client, and avoids adding yet another dependency to the server. v2: Fix asprintf error checks. v3: Add error checking for fork(), clarify calloc() arg. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 8d5e0c07b965d545c925c34be95d41c29135a63a Author: Eric Anholt Date: Sun Sep 25 13:30:16 2016 -0700 test: Handle srcdir != builddir in Xvfb testing Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit add49792608171feef8090f7520cfa02d2daae9c Author: Eric Anholt Date: Sun Sep 25 13:30:15 2016 -0700 ephyr: Add a mode for skipping redisplay in glamor This speeds up headless testing of Xephyr -glamor with softpipe from "a test per minute or so" to "a test every few seconds". Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 453f813bb4afd39eb5b6b3c4a822894e04b6b11b Author: Eric Anholt Date: Sat Sep 24 14:37:28 2016 +0300 glamor: Properly handle mask formats without alpha. Even if the pixmap's storage has alpha, it may have been uploaded with garbage in the alpha channel, so we need to force the shader to set alpha to 1. This was broken way back in 355334fcd99e4dce62e2be1e27290c9a74ea944f. Fixes rendercheck -t composite -f x8r8g8b8. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 905c877f094eb6cfe905d64e34fdd01a72dd8103 Author: Eric Anholt Date: Tue Sep 20 12:24:38 2016 +0100 glamor: Require that pixmap depths match for Render copies. The copy optimization in d37329cba42fa8e72fe4be8a7be18e512268b5bd replicated a bug from last time we did a copy optimization: CopyArea is only defined for matching depths. This is only a problem at 15 vs 16 depth right now (24 vs 32 would also have matching Render formats, but they should work) but be strict in case we store other depths differently in the future. Fixes rendercheck -t blend -o src -f x4r4g4b4,x3r4g4b4 v2: Drop excessive src->depth == dst->depth check that snuck in. v3: Switch back to src->depth == dst->depth v4: Touch up commit message (s/bpp/depth). Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit b87a07567421af05622197eec91a71e4fca4f79e Author: Eric Anholt Date: Tue Sep 20 12:14:36 2016 +0100 glamor: Fix some awful formatting of some fallback debug code. This was clearly x-indent.sh damage. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit ba199cb90157cefab01183f2e2c909895df73321 Author: Mark Kettenis Date: Tue Nov 17 22:31:21 2015 +0100 glamor: Make glamor_sync_init work with --disable-xshmfence Signed-off-by: Mark Kettenis Signed-off-by: Eric Anholt Reviewed-by: Hans de Goede commit 8bb4b11298c285d2cd1eb28e65729933ec386829 Author: Matthieu Herrb Date: Fri Sep 23 16:56:06 2016 +0300 glamor: Make glamor_name_from_pixmap work without DRI3 This function is used by the modesetting driver to implement DRI2 and shouldn't fail on systems that don't support DRI3. v2: Drop stale commit message wording, fix compiler warning (by anholt) Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 128d40b2dd0a26a075a67854455d4208afaa01ca Author: Eric Engestrom Date: Sat Apr 2 19:53:18 2016 +0100 glamor: fix spelling mistakes v2: Fix "orignal" too (review feedback by ajax, change by anholt)_ Signed-off-by: Eric Engestrom Reviewed-by: Eric Anholt commit ade315386cee9a65a3885c65e96256880ac6f00a Author: Keith Packard Date: Fri Sep 23 09:52:21 2016 +0300 Require xproto 7.0.31 xproto 7.0.30 had a typo which caused compiles to fail on anything other than clang Signed-off-by: Keith Packard commit f72ff1f7ac784f3911fe2f8d746f62f7709f0edc Author: Jeremy Huddleston Sequoia Date: Mon Sep 19 09:34:50 2016 -0700 XQuartz: Silence an expected TSan warning This code is safe. If the data race fails, the result is that we take the lock and recheck. ================== WARNING: ThreadSanitizer: data race (pid=31401) Read of size 1 at 0x00010f5d2500 by thread T11: #0 wait_for_mieq_init darwinEvents.c:102 (X11.bin+0x00010003155a) #1 -[X11Application(Private) sendX11NSEvent:] X11Application.m:1330 (X11.bin+0x00010001d652) #2 __28-[X11Application sendEvent:]_block_invoke X11Application.m:476 (X11.bin+0x00010001887f) #3 __tsan::invoke_and_release_block(void*) :144 (libclang_rt.tsan_osx_dynamic.dylib+0x00000005d97b) #4 _dispatch_client_callout :33 (libdispatch.dylib+0x0000000020ef) Previous write of size 1 at 0x00010f5d2500 by thread T8: [failed to restore the stack] Location is global 'mieqInitialized' at 0x00010f5d2500 (X11.bin+0x000100599500) Thread T11 (tid=4367138, running) created by thread T-1 [failed to restore the stack] Thread T8 (tid=4367130, running) created by main thread at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490) #1 create_thread quartzStartup.c:78 (X11.bin+0x000100039d2d) #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039b96) #3 X11ApplicationMain X11Application.m:1238 (X11.bin+0x00010001cd54) #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a5b2) #5 server_main quartzStartup.c:136 (X11.bin+0x000100039fbb) #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x000100002e25) #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x000100004e09) #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x0001000056a4) #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #10 start :29 (libdyld.dylib+0x000000005254) SUMMARY: ThreadSanitizer: data race darwinEvents.c:102 in wait_for_mieq_init ================== Signed-off-by: Jeremy Huddleston Sequoia commit 7d6ebf3f4e4d517bb846d15a5deb131da19a267c Author: Jeremy Huddleston Sequoia Date: Mon Sep 19 00:21:44 2016 -0700 XQuartz: Adopt input_lock() and input_unlock() This allows us to remove darwinEvents_lock() and darwinEvents_unlock() and remove the serverRunning hack from dix Signed-off-by: Jeremy Huddleston Sequoia commit 8bc4727f475321a8adcbbd859f3f8dd9eeb64aa4 Author: Jeremy Huddleston Sequoia Date: Sun Sep 18 23:17:19 2016 -0700 XQuartz: pbproxy shouldn't need to wait for server initialization. Just block on the socket like every other client does. Signed-off-by: Jeremy Huddleston Sequoia commit 81493d30981d7deb38f57bca2a35487add5ea509 Author: Jeremy Huddleston Sequoia Date: Sun Sep 18 23:13:20 2016 -0700 XQuartz: Remove X11ApplicationFatalError AppKit handles crashes on app launch with their own dialog now, so we shouldn't need to do this ourselves. Signed-off-by: Jeremy Huddleston Sequoia commit 9153ec8464336c280f2a6e79ffa443104bbeb98c Author: Jeremy Huddleston Sequoia Date: Sun Sep 18 22:45:16 2016 -0700 XQuartz: Don't respond to SIGALRM on the AppKit thread ================== WARNING: ThreadSanitizer: data race (pid=69627) Write of size 8 at 0x00010dae73f8 by main thread (mutexes: write M262): #0 SmartScheduleTimer utils.c:1245 (X11.bin+0x0001004b21f9) #1 __tsan::CallUserSignalHandler(__tsan::ThreadState*, bool, bool, bool, int, my_siginfo_t*, void*) :144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000279f6) #2 __CFRunLoopRun :77 (CoreFoundation+0x000000087e17) #3 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062) #4 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b) #5 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5) #6 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9) #7 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44) #8 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #9 start :29 (libdyld.dylib+0x000000005254) Previous read of size 8 at 0x00010dae73f8 by thread T7: [failed to restore the stack] Location is global 'SmartScheduleTime' at 0x00010dae73f8 (X11.bin+0x0001005b03f8) Mutex M262 (0x7d300000bd10) created at: #0 pthread_mutex_init :144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000253c3) #1 __CFRunLoopCreate :77 (CoreFoundation+0x000000054e63) #2 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062) #3 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b) #4 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5) #5 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9) #6 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44) #7 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #8 start :29 (libdyld.dylib+0x000000005254) Thread T7 (tid=4051693, running) created by main thread at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490) #1 create_thread quartzStartup.c:78 (X11.bin+0x0001000398dd) #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039813) #3 X11ApplicationMain X11Application.m:1286 (X11.bin+0x00010001c804) #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062) #5 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b) #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5) #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9) #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44) #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #10 start :29 (libdyld.dylib+0x000000005254) SUMMARY: ThreadSanitizer: data race utils.c:1245 in SmartScheduleTimer ================== ================== WARNING: ThreadSanitizer: signal handler spoils errno (pid=69627) #0 SmartScheduleTimer utils.c:1244 (X11.bin+0x0001004b21a0) #1 __CFRunLoopRun :77 (CoreFoundation+0x000000087e17) #2 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062) #3 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b) #4 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5) #5 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9) #6 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44) #7 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #8 start :29 (libdyld.dylib+0x000000005254) SUMMARY: ThreadSanitizer: signal handler spoils errno utils.c:1244 in SmartScheduleTimer ================== Signed-off-by: Jeremy Huddleston Sequoia commit 2740dc1937e8ab32b4930f4086c302e6602a7bad Author: Jeremy Huddleston Sequoia Date: Mon Sep 19 01:25:13 2016 -0700 dix: Silence TSan warnings when checking for pending input V2: Moves InputCheckPending() into dix.h Bumps required version of xproto to 7.0.30 ================== WARNING: ThreadSanitizer: data race (pid=4943) Read of size 4 at 0x00010c4e3854 by thread T8: #0 WaitForSomething WaitFor.c:237 (X11.bin+0x00010049216c) #1 Dispatch dispatch.c:413 (X11.bin+0x000100352ed9) #2 dix_main main.c:287 (X11.bin+0x00010036e894) #3 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63) Previous write of size 4 at 0x00010c4e3854 by thread T12 (mutexes: write M856, write M1976): #0 mieqEnqueue mieq.c:263 (X11.bin+0x000100448d14) #1 DarwinSendDDXEvent darwinEvents.c:641 (X11.bin+0x000100033613) #2 DarwinProcessFDAdditionQueue_thread darwinEvents.c:338 (X11.bin+0x000100032039) Location is global 'miEventQueue' at 0x00010c4e3850 (X11.bin+0x0001005ab854) Mutex M856 (0x00010c4c8c80) created at: #0 pthread_mutex_lock :144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000321fe) #1 DarwinListenOnOpenFD darwinEvents.c:300 (X11.bin+0x000100031607) #2 socket_handoff bundle-main.c:288 (X11.bin+0x000100002b40) #3 __do_request_fd_handoff_socket_block_invoke bundle-main.c:379 (X11.bin+0x0001000029ba) #4 __tsan::invoke_and_release_block(void*) :144 (libclang_rt.tsan_osx_dynamic.dylib+0x00000005d97b) #5 _dispatch_client_callout :33 (libdispatch.dylib+0x0000000020ef) Mutex M1976 (0x00010c4e3d68) created at: #0 pthread_mutex_init :144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000253c3) #1 input_lock inputthread.c:103 (X11.bin+0x00010049fd10) #2 TimerSet WaitFor.c:343 (X11.bin+0x0001004926c2) #3 RootlessQueueRedisplay rootlessScreen.c:594 (X11.bin+0x000100065d7f) #4 RootlessInstallColormap rootlessScreen.c:514 (X11.bin+0x000100069f1a) #5 miSpriteInstallColormap misprite.c:562 (X11.bin+0x000100467095) #6 miCreateDefColormap micmap.c:270 (X11.bin+0x000100440399) #7 DarwinScreenInit darwin.c:285 (X11.bin+0x0001000303bb) #8 AddScreen dispatch.c:3908 (X11.bin+0x00010036c417) #9 InitOutput darwin.c:671 (X11.bin+0x00010002fdeb) #10 dix_main main.c:197 (X11.bin+0x00010036e228) #11 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63) Thread T8 (tid=4198779, running) created by main thread at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490) #1 create_thread quartzStartup.c:78 (X11.bin+0x000100039dad) #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039c16) #3 X11ApplicationMain X11Application.m:1238 (X11.bin+0x00010001cde4) #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a642) #5 server_main quartzStartup.c:136 (X11.bin+0x00010003a03b) #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x000100002eb5) #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x000100004e99) #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100005734) #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #10 start :29 (libdyld.dylib+0x000000005254) Thread T12 (tid=4198797, running) created by thread T8 at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490) #1 create_thread darwinEvents.c:121 (X11.bin+0x000100031ecf) #2 DarwinEQInit darwinEvents.c:365 (X11.bin+0x000100031860) #3 InitInput darwin.c:571 (X11.bin+0x00010002ea09) #4 dix_main main.c:261 (X11.bin+0x00010036e7ce) #5 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63) SUMMARY: ThreadSanitizer: data race WaitFor.c:237 in WaitForSomething ================== ================== WARNING: ThreadSanitizer: data race (pid=22841) Write of size 4 at 0x000105bbd864 by main thread (mutexes: write M1945): #0 mieqEnqueue mieq.c:263 (X11.bin+0x000100448cf4) #1 DarwinSendDDXEvent darwinEvents.c:642 (X11.bin+0x000100033693) #2 -[X11Controller set_window_menu:] X11Controller.m:275 (X11.bin+0x0001000222fd) #3 -[X11Application set_window_menu:] X11Application.m:486 (X11.bin+0x000100018b44) #4 -[X11Application handleMachMessage:] X11Application.m:177 (X11.bin+0x000100016678) #5 __NSFireMachPort :69 (Foundation+0x00000009b62b) #6 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a5f2) #7 server_main quartzStartup.c:136 (X11.bin+0x000100039ffb) #8 do_start_x11_server bundle-main.c:436 (X11.bin+0x000100002e65) #9 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x000100004e49) #10 mach_startup_server mach_startupServer.c:399 (X11.bin+0x0001000056e4) #11 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #12 start :29 (libdyld.dylib+0x000000005254) Previous read of size 4 at 0x000105bbd864 by thread T7: #0 Dispatch dispatch.c:434 (X11.bin+0x000100352fc8) #1 dix_main main.c:287 (X11.bin+0x00010036e874) #2 server_thread quartzStartup.c:66 (X11.bin+0x000100039e23) Location is global 'miEventQueue' at 0x000105bbd860 (X11.bin+0x0001005ab864) Mutex M1945 (0x000105bbdd78) created at: #0 pthread_mutex_init :144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000253c3) #1 input_lock inputthread.c:103 (X11.bin+0x00010049fd10) #2 TimerSet WaitFor.c:348 (X11.bin+0x0001004926c2) #3 RootlessQueueRedisplay rootlessScreen.c:594 (X11.bin+0x000100065d3f) #4 RootlessInstallColormap rootlessScreen.c:514 (X11.bin+0x000100069eda) #5 miSpriteInstallColormap misprite.c:562 (X11.bin+0x000100467075) #6 miCreateDefColormap micmap.c:270 (X11.bin+0x000100440379) #7 DarwinScreenInit darwin.c:285 (X11.bin+0x00010003036b) #8 AddScreen dispatch.c:3914 (X11.bin+0x00010036c3f7) #9 InitOutput darwin.c:671 (X11.bin+0x00010002fd9b) #10 dix_main main.c:197 (X11.bin+0x00010036e208) #11 server_thread quartzStartup.c:66 (X11.bin+0x000100039e23) Thread T7 (tid=4257217, running) created by main thread at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490) #1 create_thread quartzStartup.c:78 (X11.bin+0x000100039d6d) #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039bd6) #3 X11ApplicationMain X11Application.m:1238 (X11.bin+0x00010001cd94) #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a5f2) #5 server_main quartzStartup.c:136 (X11.bin+0x000100039ffb) #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x000100002e65) #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x000100004e49) #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x0001000056e4) #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #10 start :29 (libdyld.dylib+0x000000005254) SUMMARY: ThreadSanitizer: data race mieq.c:263 in mieqEnqueue ================== Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Keith Packard commit 7ff8a74945c0cb525a2d197e28426fd098a407cf Author: Keith Packard Date: Thu Sep 22 02:53:46 2016 +0300 os: Clear saved poll events in listen so that edge triggering works When a client is marked as write blocked, clear any old 'write ready' bit in the osfds structure so that a new indication of write ready (which is marked as edge trigggered) will trigger the callback. Signed-off-by: Keith Packard Reviewed-by: Jeremy Huddleston Sequoia Tested-by: Jeremy Huddleston Sequoia Tested-by: Matthieu Herrb commit 1d365f1ffe0362732b64e565db6ae8af718758f2 Author: Keith Packard Date: Thu Sep 22 02:53:45 2016 +0300 os: Ready clients with pending output aren't flushed, so set NewOutputPending When a client with pending output is ready (has request data pending), FlushAllOutput will skip it to get all of the requests processed before sending any queued output. That means FlushAllOutput is going to return with some output pending to a client which isn't known to be write blocked. And that means NewOutputPending needs to be set so that FlushAllOutput will get called again to actually go flush this client. It might be interesting to try just flushing the client to send any queued data along the way. This patch just restores the server behavior to what it was before the ospoll changes. Signed-off-by: Keith Packard Reviewed-by: Jeremy Huddleston Sequoia Tested-by: Jeremy Huddleston Sequoia Tested-by: Matthieu Herrb commit d0c5d205a919fc1d2eb599356090b58b1bf0176d Author: Jeremy Huddleston Sequoia Date: Mon Sep 19 01:13:02 2016 -0700 dix: Make InitCoreDevices() failures more verbose. Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5794bdd52821463acf691c4230741f6b4289669b Author: Mihail Konev Date: Wed Sep 14 11:47:15 2016 +0100 xkb: fix turbo-repeat of RedirectKey-ed keysyms RedirectKey() action had been broken by commit 2e6190. A dropped check caused over-intense autorepeat of keysyms enriched with the action. Previous to this commit, the check wrapped the entire switch() block, which was dropped with the move to a separate function. Restore the checking. Signed-off-by: Mihail Konev Reviewed-by: Daniel Stone Signed-off-by: Peter Hutterer commit fc1c358b955258ce675e49490de7c3b8ddee2b76 Author: Keith Packard Date: Mon Sep 19 09:02:57 2016 -0700 Bump to 1.18.99.901 (1.19 RC1) Signed-off-by: Keith Packard commit 5998da7855750dd947288349a0b14e65db1e3c8c Author: Jonas Ådahl Date: Tue Sep 13 15:16:56 2016 +0800 dix: Incroduce CursorConfinedTo vfunc in Screen This function will be called when a pointer is grabbed non-root window set as the 'confineTo'. This will enable the ddx to handle the confinement their own way. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit daf48a3aba7d5c42d7156f0d0e2b1d8aae423303 Author: Jonas Ådahl Date: Tue Sep 13 15:16:55 2016 +0800 dix: Introduce CursorWarpedTo vfunc in Screen This new vfunc will be called, if set, after a client has issued a WarpPointer request. This is necessary for implementing pointer warp emulation in Xwayland. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 3ef51c5c74297937002668b0c507fa88550db67e Author: Keith Packard Date: Fri Sep 16 10:03:49 2016 -0700 Bump version to 1.18.99.2 Prepare for 1.19 RC1 Signed-off-by: Keith Packard commit 86038dfd42d6f6da9646ef2f87b2ab8ccba98e02 Author: Keith Packard Date: Fri Sep 16 10:56:15 2016 -0700 os: Add 'ospoll.h' to Makefile.am Distribute this source file. Signed-off-by: Keith Packard commit 56972d007dcde93693cb9e39931978b744942e5b Author: Keith Packard Date: Fri Sep 16 10:55:27 2016 -0700 include: Add 'xserver_poll.h' to Makefile.am Make sure this file is included in the tarball. Signed-off-by: Keith Packard commit 61b159f5a79130a9661064d3f0143e5d6107985a Author: Keith Packard Date: Fri Sep 16 10:54:37 2016 -0700 hw/xwin: Add 'dri' to DIST_SUBDIRS This creates the needed Makefile.in files during 'make dist' or 'make distcheck' Signed-off-by: Keith Packard commit 93f474e49b24abc673cb9cf5ea16fac296dce312 Author: Keith Packard Date: Fri Sep 16 10:43:09 2016 -0700 Remove 'dixfontstubs.h' from include EXTRA_DIST This file was removed when moving to the new libXfont API, but accidentally left in EXTRA_DIST. Signed-off-by: Keith Packard commit 5b9f3ea2501a886fb74e5248e82a95e76443f1e8 Author: Michel Dänzer Date: Thu Jan 14 18:09:44 2016 +0900 xfree86/modes: Set RandR primary output from CreateScreenResources Fixes XRRGetOutputPrimary and xrandr not reporting a primary output after startup. This was especially confusing when an output was explicitly marked as primary using Option "Primary" in Section "Monitor". Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit bd8ecd9be1568b59258b6d2f78530ede345b7c7a Author: Michel Dänzer Date: Fri Sep 16 09:51:31 2016 -0700 Add SyncSharedPixmap ScreenRec hook Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 7f6fa4e449f5a7215bbf60ce8c874e163a7453a9 Author: Qiang Yu Date: Mon Sep 5 18:05:42 2016 +0800 modesetting: fix compile error when --disable-glamor Move ms_flush_drm_events out of GLAMOR ifdef. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97586 Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer Signed-off-by: Keith Packard commit d81f9ce12aa4ac54b9c2b8c74c2f827c1f3e739a Author: Jeremy Huddleston Sequoia Date: Sun Sep 11 03:07:44 2016 -0700 dix/dispatch: Fix SmartScheduleClient interval adjustment to use best rather than pClient pClient does not contain a live value after the transition to lists https://bugs.freedesktop.org/show_bug.cgi?id=97765 Application Specific Information: X.Org X Server 1.18.99.1 Build Date: 20160910 ================================================================= ==16921==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000108ce3834 at pc 0x000108880766 bp 0x7000045f76c0 sp 0x7000045f76b8 READ of size 4 at 0x000108ce3834 thread T6 #0 0x108880765 in SmartScheduleClient dispatch.c:365 #1 0x10887ecc5 in Dispatch dispatch.c:422 #2 0x1088c05f1 in dix_main main.c:301 #3 0x1082aabba in server_thread quartzStartup.c:66 #4 0x7fffc5f16aaa in _pthread_body (libsystem_pthread.dylib+0x3aaa) #5 0x7fffc5f169f6 in _pthread_start (libsystem_pthread.dylib+0x39f6) #6 0x7fffc5f161fc in thread_start (libsystem_pthread.dylib+0x31fc) Regressed-in: 8f1edf4bd3a1f050ce9eeb5eac45dd1a8f7a6d5e Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 265c4e66533243b60d92cffc7769ecadb0292c8d Merge: 3caf671ed f5f4d32ac Author: Keith Packard Date: Thu Sep 15 21:32:46 2016 -0700 Merge remote-tracking branch 'jturney/master' commit 3caf671ed2a8a79856409a109355fc0f393d7aed Author: Keith Packard Date: Wed Sep 14 22:40:32 2016 -0700 config/dbus: Initialize dbus fd to -1 so teardown doesn't use fd 0 The dbus teardown code is called when the server fatal errors even if that is before dbus has ever been initialized. By statically initializing the value of bus_info.fd, we avoid calling RemoveNotifyFd on stdin. Signed-off-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Peter Hutterer commit f5f4d32ac7c250cfbfb94883ce7d7e46151e89f0 Author: Jon Turney Date: Thu Jul 24 12:29:41 2014 +0100 Add Windows-DRI extension If windowsdriproto headers are available, build a Windows-DRI extension, which supports requests to enable local clients to directly render GL to a Windows drawable: - a query to check if WGL is being used on a screen - a query to map a fbconfigID to a native pixelformatindex - a query to map a drawable to a native handle Windows-DRI can only be useful if we are using WGL, so make an note if WGL is active on a screen. Make validGlxDrawable() public Adjust glxWinSetPixelFormat() so it doesn't require a context, just a screen and config. That enables factoring out the deferred drawable creation code as glxWinDeferredCreateDrawable() Enhance glxWinDeferredCreateDrawable(), so that pixmaps are placed into a file mapping, so they exist in memory which can be shared with the direct rendering process. Currently, this file mapping is accessed by a name generated from the XID. This will not be unique across multiple server instances. It would perhaps be better, although more complicated, to use an anonymous file mapping, and then duplicate the handle for the direct rendering process. Use glxWinDeferredCreateDrawable() to ensure the native handle exists for the Windows-DRI query to map a drawable to native handle. v2: Various printf format warning fixes v3: Fix format warnings on x86 Move some uninteresting windows-dri output to debug log level v4: check for windowsdriproto when --enable-windowsdri use windowsdriproto_CFLAGS Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 52d6a1e832a5e62289dd4f32824ae16a78dfd7e8 Author: Keith Packard Date: Thu Sep 8 11:02:30 2016 -0600 Hold input lock for deviceProc This ensures that the deviceProc is never called while the input thread is processing data from the device. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit dfc91f0f630f9e0500fc28b18e3f2851024d719f Author: Keith Packard Date: Thu Sep 8 11:02:31 2016 -0600 Hold input lock while calling input device SetProperty callback This keeps the input driver SetProperty function from being called while input events are being processed. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c4799f186b31e579721f5874c897f3f46db6ad0a Author: Alan Coopersmith Date: Sat Sep 10 21:14:19 2016 -0700 os: Use pthread_setname_np to set thread names if available Autoconf logic borrowed from glib Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia Tested-by: Jeremy Huddleston Sequoia commit 75c1d04650f63464263c159d2e95364482be724f Author: Alan Coopersmith Date: Sat Sep 10 21:08:01 2016 -0700 os: OsSigHandler should not show rtld errors for unrelated signals If RTLD_DI_SETSIGNAL is set to let us turn runtime linker/loader errors into catchable signals, then we should only show the errors when catching that signal, instead of tossing out red herrings to distract people with unrelated crashes long after their last failed symbol lookup (especially when using drivers built to support multiple API's by checking which symbols are available before calling them). Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Reviewed-by: Aaron Plattner commit 065eb6612492bacf4d7caaad90e35dafc2cbf7ea Author: Jeremy Huddleston Sequoia Date: Sun Sep 11 19:56:52 2016 -0700 os/inputthread: Fix setting of cloexec on file descriptors O_CLOEXEC is not a file bit. It is not setable with F_SETFL. One must use it when calling open(2). To set it cloexec on an existing fd, F_SETFD and FD_CLOEXEC must be used. This also fixes a build failure regression on configurations that don't have O_CLOEXEC defined. cf: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html Regressed-in: 30ac7567980a1eb79d084a63e0e74e1d9a3af673 Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau commit a5769de0f5399053e9864b753fa9755220d65ae0 Author: Jeremy Huddleston Sequoia Date: Sun Sep 11 19:47:47 2016 -0700 Xext/shm: Fix usage of F_GETFD to match standard flags = fcntl(fd, F_GETFD) is compliant. fcntl(fd, F_GETFD, &flags) is non-compliant (Linux extension?) cf: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau commit 7def2fea30060d47780dc1eedc91fada5ae1934f Author: Jeremy Huddleston Sequoia Date: Sat Sep 10 23:37:46 2016 -0700 Xquartz: Update for removal of AddEnabledDevice and RemoveEnabledDevice Regressed-in: be5a513fee6cbf29ef7570e57eb0436d70fbd88c Signed-off-by: Jeremy Huddleston Sequoia commit 4f4ecd0f41cf1c710d3ef1626b747847e6184f4c Author: Jeremy Huddleston Sequoia Date: Sat Sep 10 22:16:11 2016 -0700 XQuartz: Cleanup CPPFLAGS that are no longer necessary on darwin Signed-off-by: Jeremy Huddleston Sequoia commit 33d595255d4206df0d136014de33100817cbe344 Author: Jeremy Huddleston Sequoia Date: Sun May 29 14:01:38 2016 -0700 XQuartz: Fix the issue where the h key could be come "stuck" after hiding XQuartz with cmd-h The issue was that we set a flag to ignore the k key's up event when sent the cmd-h down event, but because the cmd-h keycode hides XQuartz, we became !_x_active by the time the event is delivered which caused us to go down a differnet codepath rather than getting a chance to ignore it. We then incorrectly ignored the next h up key. https://bugs.freedesktop.org/show_bug.cgi?id=92648 Signed-off-by: Jeremy Huddleston Sequoia commit d8e05c04758cbcd7b5c11362cb28ce017d50098b Author: Hans de Goede Date: Wed Aug 24 15:00:13 2016 +0200 modesetting: Fall back to primary crtc for vblank for drawables on slave outputs This fixes glxgears running at 1 fps when fully covering a slave-output and the modesetting driver is used for the master gpu. Reported-by: Peter Wu Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 7ade8ba10e1e767bb510343c86573bc5d4804b92 Author: Hans de Goede Date: Wed Aug 24 14:55:27 2016 +0200 modesetting: ms_covering_crtc: Allow calling on non modesetting Screens 99% of the code in ms_covering_crtc is video-driver agnostic. Add a screen_is_ms parameter when when FALSE skips the one ms specific check, this will allow calling ms_covering_crtc on slave GPUs. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 238248d67e6a422f31e8864c0b15d693a658cdac Author: Hans de Goede Date: Mon Aug 15 12:02:54 2016 +0200 modesetting: Implement DRI2InfoRec version 9 callbacks Implement the CreateBuffer2 / DestroyBuffer2 / CopyRegion2 DRI2InfoRec version 9 callbacks, this is necessary for being an offload source provider with DRI2. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 03a7c50202f61030830ff639fccf52091e02156c Author: Hans de Goede Date: Mon Aug 15 10:44:57 2016 +0200 modesetting: ms_dri2_create_buffer: check screen of existing front buffers If a frontbuffer drawable already has a pixmap, make sure it was created on the right screen. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 35c4e96ed1d372dd161480be8cddcd2d4549e449 Author: Hans de Goede Date: Mon Sep 12 12:47:59 2016 +0200 randr: Fix crtc_bounds when using rotation combined with reflection Before this commit crtc_bounds() did not take reflection into account, when using reflection with 0 / 180 degree rotation this was not an issue because of the default in the switch-case doing the right thing. But when using 90 / 270 degree rotation we would also end up in the default which is wrong in this case. This would lead to the cursor being constrained to a height x height area of the monitor. This commit masks out the reflection bits for the switch-case, making crtc_bounds return the correct bounds and fixing the problematic cursor constraining. Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer commit 7b634067c13045671685a9f00bfbac626ed68f94 Author: Dave Airlie Date: Wed Jul 15 10:15:51 2015 +1000 xf86Cursor: Add hw cursor support for prime Currently with PRIME if we detect a secondary GPU, we switch to using SW cursors, this isn't optimal, esp for the intel/nvidia combinations, we have no choice for the USB offload devices. This patch checks on each slave screen if hw cursors are enabled, and also calls set cursor and move cursor on all screens. Cc: Aaron Plattner Signed-off-by: Dave Airlie Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer Reviewed-by: Keith Packard commit df88008f92f85ef96d9fe48ac509d027570424eb Author: Hans de Goede Date: Tue Sep 6 11:48:31 2016 +0200 xf86Cursor: Deal with rotation on GPU screens using a hw-cursor When a slave-output is rotated the transformation is done on the blit from master to slave GPU, so crtc->transform_in_use is not set, but we still need to adjust the mouse position for things to work. This commit modifies xf86_crtc_transform_cursor_position to not rely on crtc->f_framebuffer_to_crtc, so that it can be used with GPU screens too and always calls it for crtcs with any form of rotation. Note not using crtc->f_framebuffer_to_crtc means that crtc->transform will not be taken into account, that is ok, because when we've a transform active hw-cursors are not used and xf86_crtc_transform_cursor_position will never get called. Signed-off-by: Hans de Goede Reviewed-and-Tested-by: Michel Dänzer commit f82fd47016628e8bcdcba3aab506a919fe8c49d8 Author: Hans de Goede Date: Tue Sep 6 11:50:50 2016 +0200 xf86Cursor: Fix xf86_crtc_rotate_coord using width/height wrongly xf86_crtc_rotate_coord should be the exact inverse operation of xf86_crtc_rotate_coord_back, but when calculating x / y for 90 / 270 degrees rotation it was using height to calculate x / width to calculate y, instead of the otherway around. This was likely not noticed before since xf86_crtc_rotate_coord until now was only used with cursor_info->MaxWidth and cursor_info->MaxHeight, which are usally the same. Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer commit b0b04cb266a62675dd7cde97111ebe7c1552db9a Author: Hans de Goede Date: Tue Sep 6 13:14:35 2016 +0200 xf86Cursor: Fix xf86CurrentCursor to work on slave GPU Screens The CurrentCursor is always attached to the master GPU. Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer commit 71fecc84e9ceb11ff61c912bdaa3fc959ec36bef Author: Dave Airlie Date: Tue Sep 6 13:02:32 2016 +0200 xf86Cursor: Add xf86CheckHWCursor() helper function This is a preparation patch for adding prime hw-cursor support. Signed-off-by: Dave Airlie Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer commit 2eefb53f58854ef9d34859583207ec37d3c3047a Author: Hans de Goede Date: Tue Sep 6 13:15:36 2016 +0200 randr: Add RRHasScanoutPixmap helper function This is a preparation patch for adding prime hw-cursor support. Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer commit a52530a655438f03919d47f6edd11287efff47bb Author: Dave Airlie Date: Tue Sep 6 12:50:14 2016 +0200 dix: Add dixPrivatesCreated helper function This is a preparation patch for adding prime hw-cursor support. Signed-off-by: Dave Airlie Signed-off-by: Hans de Goede Reviewed-by: Keith Packard Reviewed-by: Michel Dänzer commit 3fe4107643ba029dd48e3d12ec9bc97d07112300 Author: Hans de Goede Date: Thu Sep 8 09:30:31 2016 +0200 glamor: Fix crash when master gpu is using glamor and another gpu is hotplugged When a GPU gets hotplugged while X is already running, glamor_egl_init() gets called and changes the current egl context, without updating lastGLContext, potentially causing the next glamor call on another GPU to run in the wrong context. This causes glamor to e.g. crash in the next glamor_create_pixmap() call (called through the master's screen->CreatePixmap), note this is not the only troublesome entry point I've seen other backtraces when using a compositing window manager. Set lastGLContext to NULL to force the next glamor_make_current() call to set the right context. Note that we cannot use glamor_make_current() here to replace the eglMakeCurrent() call and update lastGLContext for us because glamor_make_current takes a glamor_priv struct as argument and that has not been created yet when glamor_egl_init() gets called. Signed-off-by: Hans de Goede Reviewed-by: Keith Packard commit 1075af8a6c26009c04db30a6d6d1f10070568ab1 Author: Hans de Goede Date: Mon Aug 15 11:10:15 2016 +0200 modesetting: Remove some dead code The "if (pixmap) ..." block this commit removes is inside an "if (pixmap == NULL) ..." block, so it will never execute. Signed-off-by: Hans de Goede Reviewed-by: Aaron Plattner commit dfa295b29c20b174f80ab823eef41e5211a6a921 Author: Hans de Goede Date: Wed Aug 24 14:13:19 2016 +0200 modesetting: ms_covering_crtc: Remove unused arguments, make static Remove unused arguments from ms_covering_crtc, make it static as it is only used in vblank.c. While at it also change its first argument from a ScrnInfoPtr to a ScreenPtr, this makes the next patch in this patch-set cleaner. Signed-off-by: Hans de Goede Reviewed-by: Keith Packard commit cb7b145a25452de8b549e8c8e9ec3bcc752e55dc Author: Hans de Goede Date: Wed Aug 17 12:03:41 2016 +0200 modesetting: Fix msSharePixmapBacking returning a non-linear bo glamor_fd_from_pixmap() may return a tiled bo, which is not suitable for sharing with another GPU as tiling usually is GPU specific. Switch to glamor_shareable_fd_from_pixmap(), which always returns a linear bo. This fixes mis-rendering when running the mode setting driver on the master gpu in a dual-gpu setup and running an opengl app with DRI_PRIME=1. Signed-off-by: Hans de Goede Reviewed-by: Keith Packard commit a74d553cb97d545148bd2f81b7bd021cca94e076 Author: Hans de Goede Date: Tue Aug 23 12:18:56 2016 +0200 glamor: Add glamor_shareable_fd_from_pixmap() Add glamor_shareable_fd_from_pixmap function to get dma-buf fds suitable for sharing across GPUs (not using GPU specific tiling). This is necessary for the modesetting driver to correctly implement the DRI2 SharePixmapBacking callback. Signed-off-by: Hans de Goede Reviewed-by: Keith Packard commit 527c6baa294d17c5eca1d87ac941844872e90dac Author: Ran Benita Date: Wed Aug 29 12:33:34 2012 +0300 xkb: fix check for appending '|' character when applying rules There are two ways to separate multiple files in XKB include statements: '+' will cause the later file to override the first in case of conflict, while '|' will cause it augment it (this is done by xkbcomp). '!' is unrelated here. Currently, if someone tries to use '|' in a rule instead of '+', it won't have any effect. Since '|' is practically never used, this wasn't noticed. Signed-off-by: Ran Benita Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 392da389d7b0e9dd970741dcd5321a4e0fd3aef5 Author: Adam Jackson Date: Wed Mar 30 14:04:04 2016 -0400 glx: Fix computation of GLX_X_RENDERABLE fbconfig attribute >From the GLX spec: "GLX_X_RENDERABLE is a boolean indicating whether X can be used to render into a drawable created with the GLXFBConfig. This attribute is True if the GLXFBConfig supports GLX windows and/or pixmaps." Every backend was setting this to true unconditionally, and then the core ignored that value and sent true unconditionally on its own. This is broken for ARB_fbconfig_float and EXT_fbconfig_packed_float, which only apply to pbuffers, which are not renderable from non-GLX APIs. Instead compute GLX_X_RENDERABLE from the supported drawable types. The dri backends were getting _that_ wrong too, so fix that as well. This is not a functional change, as there are no mesa drivers that claim to support __DRI_ATTRIB_{UNSIGNED_,}FLOAT_BIT yet. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 589f42e9830e66a7e26475fc9a8b91034b5aad86 Author: Rui Matos Date: Sun Jun 26 19:48:23 2016 +0200 xwayland: Process queued events before making wayland mods effective Since xwayland's initial commit we have had a check to not process wayland modifier events while one of our surfaces has keyboard focus since the normal xkb event processing keeps our internal modifier state up to date and if we use the modifiers we get from the compositor we mess up that state. This was slightly changed in commit 10e9116b3f709bec6d6a50446c1341441a0564e4 to allow the xkb group to be set from the wayland event while we have focus in case the compositor triggers a group switch. There's a better solution to the original problem though. Processing queued events before overriding the xkb state with the compositor's allows those events to be sent properly modified to X clients while any further events will be modified with the wayland modifiers as intended. This allows us to fully take in the wayland modifiers, including depressed ones, which fixes an issue where we wouldn't be aware of already pressed modifiers on enter. Signed-off-by: Rui Matos Tested-by: Olivier Fourdan Reviewed-by: Daniel Stone Signed-off-by: Peter Hutterer commit deae9c7e846e244e5d62b2dcfb6663fde0e12cbb Author: Eric Anholt Date: Wed Aug 31 17:00:00 2016 -0700 test: Run some XTS5 integration tests against Xvfb if possible. By default the tests will be skipped. However, if you set XTEST_DIR to the repo of a built X Test Suite and PIGLIT_DIR to a piglit repo (no build necessary), make check will run piglit's xts-render tests against Xvfb. We could run more of XTS5, but I haven't spent the time identifying what additional subset would be worth running, since much of it is only really testing the client libraries. We want to make sure that we keep the runtime down, and this subset of the test suite took 92 seconds according to piglit. Reviewed-by: Adam Jackson commit f06aef31c0b2ab62d915a469a399d82a1a73ac28 Author: Qiang Yu Date: Mon Aug 22 18:14:18 2016 +0800 modesetting: add DRI2 page flip support Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer commit 4a839da6274b76424ee7cbc2deba2693e97e8186 Author: Qiang Yu Date: Mon Aug 22 18:14:17 2016 +0800 modesetting: move common page flip handle to pageflip.c The common page flip handle framework can be shared with DRI2 page flip. Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer commit 4f1eb7864b61d0c992c5eff3339085e887792048 Author: Qiang Yu Date: Mon Aug 22 18:14:16 2016 +0800 modesetting: move ms_do_pageflip to pageflip.c Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer commit a586bf9ccf60b2cc66953555e82eeb6a8e0b4ca9 Author: Qiang Yu Date: Mon Aug 22 18:14:15 2016 +0800 modesetting: make ms_do_pageflip generic for share with DRI2 Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer commit 7d33ab0f8c7958b205076f71e4b47c24aace77fd Author: Adam Jackson Date: Tue Jun 28 15:54:44 2016 -0400 dri2: Don't make reference to noClientException noClientException is now never filled in with a meaningful value, it's always -1. The sole caller of this function disregards the error value in any case. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit dff435568b40286df2bf7a66e870f9ae5f4eb9bd Author: Adam Jackson Date: Tue Jun 28 15:54:43 2016 -0400 dri3: Don't do return client->noClientException Hasn't been necessary since: commit 92ed75ac59e2d3af149cddb962efd05fc8487750 Author: Jamey Sharp Date: Mon May 10 20:22:05 2010 -0700 Eliminate boilerplate around client->noClientException. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 65493c0b73f6ee65b2a8fcaa4a15b0c453ff72b1 Author: Adam Jackson Date: Tue Jun 28 15:54:42 2016 -0400 sync: Don't do return client->noClientException Hasn't been necessary since: commit 92ed75ac59e2d3af149cddb962efd05fc8487750 Author: Jamey Sharp Date: Mon May 10 20:22:05 2010 -0700 Eliminate boilerplate around client->noClientException. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit bc3eed379ee5b4176db848708799fb2d5db16531 Author: Hans De Goede Date: Wed Aug 31 15:37:20 2016 +0200 modesetting: Hide cursor when initializing crtc When Xorg gets started directly from a wayland-gdm the crtc still has the wayland hw cursor set. Combine this with Xorg immediately falling back to a sw cursor because a slave-output has a monitor attached at startup; and we end up with the wayland hardware cursor overlay fixed in its last position + the Xorg sw cursor resulting in 2 cursors. This commit fixes this by hiding any left-over cursors when initializing the crtc. Signed-off-by: Hans de Goede Reviewed-by: Eric Engestrom commit 6c984ac9a737304ab5e26de90c76a79d970b6e33 Author: Hans De Goede Date: Wed Aug 31 16:11:11 2016 +0200 modesetting: Do not use function local static variables The modesetting driver may be driving 2 screens (slave and master gpu), which may have different behavior wrt hardware cursor support. So stop using static variables and instead store the hw-cursor support related data in a per screen struct. While at it actually make it per crtc data as in theory different crtc's could have different hw-cursor support. Signed-off-by: Hans de Goede Reviewed-by: Keith Packard commit d8c288ec371a853bcd023217f34893a0efae65ea Author: Michael Thayer Date: Wed Aug 24 08:48:13 2016 +1000 xi2: fix FocusIn grabs Fix a couple of copy-and-paste errors preventing FocusIn grabs from working. Perhaps the extension version should be bumped though to distinguish between working and non-working extension versions. Signed-off-by: Michael Thayer Reviewed-by: Peter Hutterer commit 25e4f9ee68b99c2810efdb6cd8c56affa45e1fea Author: Peter Hutterer Date: Tue Aug 23 13:43:42 2016 +1000 xfree86: print the module name together with the load failure message We're happily printing the error to stdout but not which module caused it... That's in the Xorg.log but that's at least one click away. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit be334f42a198a25e817e6dab43dd0e30aa1cd4f8 Author: Michel Dänzer Date: Thu Aug 18 09:40:34 2016 +0900 glamor: Declare "pos" in the composite glyph GLSL 1.20 vertex shader Fixes shader compile failure: Failed to compile VS: 0:13(43): error: `pos' undeclared 0:13(14): error: operands to arithmetic operators must be numeric 0:13(13): error: operands to arithmetic operators must be numeric Program source: #define ATLAS_DIM_INV 0.000976562500000000 attribute vec2 primitive; attribute vec2 source; varying vec2 glyph_pos; uniform vec2 fill_offset; uniform vec2 fill_size_inv; varying vec2 fill_pos; uniform vec4 v_matrix; void main() { gl_Position.xy = primitive.xy * v_matrix.xz + v_matrix.yw; gl_Position.zw = vec2(0.0,1.0); glyph_pos = source.xy * ATLAS_DIM_INV; fill_pos = (fill_offset + primitive.xy + pos) * fill_size_inv; } (EE) Fatal server error: (EE) GLSL compile failure Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97300 Reviewed-by: Keith Packard commit cba28d572ac799391beacd89d57e69d0d7ed70e7 Author: Michel Dänzer Date: Tue Jul 12 12:25:13 2016 +0900 glamor: Handle bitplane in glamor_copy_fbo_cpu This can significantly speed up at least some CopyPlane cases, e.g. indirectly for stippled fills. v2: * Make temporary pixmap the same size as the destination pixmap (instead of the destination drawable size), and fix coordinate parameters passed to fbCopyXtoX and glamor_upload_boxes. Fixes incorrect rendering with x11perf -copyplane* and crashes with the xscreensaver phosphor hack. v3: * Make the change a bit more compact and hopefully more readable by re-using the existing src_* locals in the bitplane case as well. Reported-by: Keith Raghubar Reviewed-by: Alex Deucher Acked-by: Eric Anholt commit 6e5bec261c3f7af069b57618d6c82b070dc4579d Author: Olivier Fourdan Date: Thu Jun 23 15:31:30 2016 +0200 wayland: Emulate crossing for native window Emitting a LeaveNotify event every time the pointer leaves an X11 window may confuse focus follow mouse mode in window managers such as mutter/gnome-shell. Keep the previously found X window and compare against the new one, and if they match then it means the pointer has left an Xwayland window for a native Wayland surface, only in this case fake the crossing to the root window. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 48c5c23a1b250c7f9d7a1747c76e4669ebf752cf Author: Hans De Goede Date: Mon Aug 8 14:53:59 2016 +0200 Fix Xorg -configure not working anymore Xorg -configure relies on the bus implementation, e.g. xf86pciBus.c to call xf86AddBusDeviceToConfigure(). The new xf86platformBus code does not have support for this. Almost all drivers support both the xf86platformBus and xf86pciBus nowadays, and the generic xf86Bus xf86CallDriverProbe() function prefers the new xf86platformBus probe method when available. Since the platformBus paths do not call xf86AddBusDeviceToConfigure() this results in Xorg -configure failing with the following error: "No devices to configure. Configuration failed.". Adding support for the xf86Configure code to xf86platformBus.c is non trivial and since we advise users to normally run without any Xorg.conf at all not worth the trouble. However some users still want to use Xorg -configure to generate a template config file, this commit implements a minimal fix to make things work again for PCI devices by skipping the platform probe method when xf86DoConfigure is set. This has been tested on a system with integrated intel graphics, with both the intel and modesetting drivers and restores Xorg -configure functionality on both cases. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 6acd0d098add5a14f23d326ac6ee8cebab14b86a Author: Adam Jackson Date: Wed Aug 17 10:32:28 2016 -0400 test: Remember to swap the window argument to XIQueryPointer Before 5c69cb60 this wouldn't matter, because ProcXIQueryPointer manually emitted its own error before (bogusly) returning Success to the main loop. Since these tests only look at the return value of the dispatch function we'd think things succeeded even when we'd generated an error. With that fixed, the test code's failure to swap the window id would make dixLookupWindow (rightly) throw BadWindow. Reviewed-and-Tested-by: Michel Dänzer Signed-off-by: Adam Jackson commit 5c69cb604a144bdced7d066eaca574aa44e8cb36 Author: Adam Jackson Date: Mon Jun 20 12:57:12 2016 -0400 xinput: Let top-level dispatch generate the error ... instead of calling SendErrorToClient ourselves. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit 2f981c06a5b9b9eab5e8a9b1d0a18281c0d1033f Author: Adam Jackson Date: Mon Jun 20 12:57:11 2016 -0400 xv: Remove some dumb calls SendErrorToClient We already generate errors from the top level when non-Success is returned from a dispatch function, so really we were emitting errors twice. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit 0bfa6bf9def43fd14bc79a302b912454e82999b1 Author: Adam Jackson Date: Mon Jun 20 12:57:10 2016 -0400 xwayland: Fix relinking when dix changes Without this a change in eg Xext/ wouldn't relink Xwayland, making you wonder why your changes didn't have any effect. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit bf2ca502b9cd07044cba56499d5c092deb9d73f5 Author: Keith Packard Date: Mon Aug 15 22:25:56 2016 -0700 config: Hold input lock across udev socket handling This avoids having the server running inside libudev from two threads at once, which it appears to not like. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit de5291c04b05772e6da599a475baa1b19dcae07a Author: Olivier Fourdan Date: Mon Aug 8 17:25:35 2016 +0200 present: Free the fake_present OsTimerPtr Plug a leak in present_fake_queue_vblank() where the OsTimer would not be freed. 492,608 (482,816 direct, 9,792 indirect) bytes in 15,088 blocks are definitely lost in loss record 3,954 of 3,954 at 0x4C2ABDE: malloc (in vgpreload_memcheck-amd64-linux.so) by 0x586B19: TimerSet (WaitFor.c:433) by 0x4F1AA9: present_fake_queue_vblank (present_fake.c:108) by 0x4F15E0: present_pixmap (present.c:954) by 0x4F23B4: proc_present_pixmap (present_request.c:138) by 0x552BCE: Dispatch (dispatch.c:430) by 0x556C22: dix_main (main.c:300) by 0x6F0D290: (below main) (in /usr/lib/libc-2.24.so) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97065 Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit d21b53673b9de052004e761fd1299d2e788b44b8 Author: Michel Dänzer Date: Wed Aug 3 10:19:20 2016 +0900 present: Call set_abort_flip / restore_screen_pixmap in clear_window_flip We were asserting that these were called before from other places, but that isn't always the case, e.g. during server shutdown. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96951 Reported-and-Tested-by: Tod Jackson Reviewed-by: Hans de Goede Signed-off-by: Michel Dänzer commit 9f04fa3babaaabe0ed5bf4aa2563755bc6c45723 Author: Michel Dänzer Date: Wed Aug 3 10:19:19 2016 +0900 present: Make present_restore_screen_pixmap handle screen->root == NULL Easier than dealing with it in all paths that can end up here during server shutdown. Signed-off-by: Michel Dänzer Reviewed-by: Hans de Goede commit 4cbf1fb1f978ecd975770cebbb330dc10f712b77 Author: Olivier Fourdan Date: Mon Aug 8 17:57:57 2016 +0200 xwayland: Avoid double free of RRCrtc and RROutput At shutdown, the Xserver will free all its resources which includes the RRCrtc and RROutput created. Xwayland would do the same in its xwl_output_destroy() called from xwl_close_screen(), leading to a double free of existing RRCrtc RROutput: Invalid read of size 4 at 0x4CDA10: RRCrtcDestroy (rrcrtc.c:689) by 0x426E75: xwl_output_destroy (xwayland-output.c:301) by 0x424144: xwl_close_screen (xwayland.c:117) by 0x460E17: CursorCloseScreen (cursor.c:187) by 0x4EB5A3: AnimCurCloseScreen (animcur.c:106) by 0x4EF431: present_close_screen (present_screen.c:64) by 0x556D40: dix_main (main.c:354) by 0x6F0D290: (below main) (in /usr/lib/libc-2.24.so) Address 0xbb1fc30 is 0 bytes inside a block of size 728 free'd at 0x4C2BDB0: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4CCE5F: RRCrtcDestroyResource (rrcrtc.c:719) by 0x577541: doFreeResource (resource.c:895) by 0x5787B5: FreeClientResources (resource.c:1161) by 0x578862: FreeAllResources (resource.c:1176) by 0x556C54: dix_main (main.c:323) by 0x6F0D290: (below main) (in /usr/lib/libc-2.24.so) Block was alloc'd at at 0x4C2CA6A: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4CC6DB: RRCrtcCreate (rrcrtc.c:76) by 0x426D1C: xwl_output_create (xwayland-output.c:264) by 0x4232EC: registry_global (xwayland.c:431) by 0x76CB1C7: ffi_call_unix64 (in /usr/lib/libffi.so.6.0.4) by 0x76CAC29: ffi_call (in /usr/lib/libffi.so.6.0.4) by 0x556CEFD: wl_closure_invoke (connection.c:935) by 0x5569CBF: dispatch_event.isra.4 (wayland-client.c:1310) by 0x556AF13: dispatch_queue (wayland-client.c:1456) by 0x556AF13: wl_display_dispatch_queue_pending (wayland-client.c:1698) by 0x556B33A: wl_display_roundtrip_queue (wayland-client.c:1121) by 0x42371C: xwl_screen_init (xwayland.c:631) by 0x552F60: AddScreen (dispatch.c:3864) And: Invalid read of size 4 at 0x522890: RROutputDestroy (rroutput.c:348) by 0x42684E: xwl_output_destroy (xwayland-output.c:302) by 0x423CF4: xwl_close_screen (xwayland.c:118) by 0x4B6377: CursorCloseScreen (cursor.c:187) by 0x539503: AnimCurCloseScreen (animcur.c:106) by 0x53D081: present_close_screen (present_screen.c:64) by 0x43DBF0: dix_main (main.c:354) by 0x7068730: (below main) (libc-start.c:289) Address 0xc403190 is 0 bytes inside a block of size 154 free'd at 0x4C2CD5A: free (vg_replace_malloc.c:530) by 0x521DF3: RROutputDestroyResource (rroutput.c:389) by 0x45DA61: doFreeResource (resource.c:895) by 0x45ECFD: FreeClientResources (resource.c:1161) by 0x45EDC2: FreeAllResources (resource.c:1176) by 0x43DB04: dix_main (main.c:323) by 0x7068730: (below main) (libc-start.c:289) Block was alloc'd at at 0x4C2BBAD: malloc (vg_replace_malloc.c:299) by 0x52206B: RROutputCreate (rroutput.c:84) by 0x426763: xwl_output_create (xwayland-output.c:270) by 0x422EDC: registry_global (xwayland.c:432) by 0x740FC57: ffi_call_unix64 (unix64.S:76) by 0x740F6B9: ffi_call (ffi64.c:525) by 0x5495A9D: wl_closure_invoke (connection.c:949) by 0x549283F: dispatch_event.isra.4 (wayland-client.c:1274) by 0x5493A13: dispatch_queue (wayland-client.c:1420) by 0x5493A13: wl_display_dispatch_queue_pending (wayland-client.c:1662) by 0x5493D2E: wl_display_roundtrip_queue (wayland-client.c:1085) by 0x4232EC: xwl_screen_init (xwayland.c:632) by 0x439F50: AddScreen (dispatch.c:3864) Split xwl_output_destroy() into xwl_output_destroy() which frees the wl_output and the xwl_output structure, and xwl_output_remove() which does the RRCrtcDestroy() and RROutputDestroy() and call the latter only when an output is effectively removed. An additional benefit, on top of avoiding a double free, is to avoid updating the screen size at shutdown. Signed-off-by: Olivier Fourdan Reviewed-by: Hans de Goede commit b380f3ac51f40ffefcde7d3db5c4c149f274246d Author: Michel Dänzer Date: Tue Aug 2 17:53:01 2016 +0900 dix: Pass ClientPtr to FlushCallback This change has two effects: 1. Only calls FlushCallbacks when we're actually flushing data to a client. The unnecessary FlushCallback calls could cause significant performance degradation with compositing, which is significantly reduced even without any driver changes. 2. By passing the ClientPtr to FlushCallbacks, drivers can completely eliminate unnecessary flushing of GPU commands by keeping track of whether we're flushing any XDamageNotify events to the client for which the corresponding rendering commands haven't been flushed to the GPU yet. Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit 92b3cd32066aa5befa67a408cc079cd2ce4c077e Author: Aaron Plattner Date: Tue Aug 2 10:34:07 2016 -0700 xace: Fix XaceCensorImage to actually censor the right part of the image The caller passes arguments into XaceCensorImage that are in window-relative coordinates. However, the pBuf that it uses to construct a temporary pixmap has its origin at (x, y) relative to the window in question. The code to convert the censor region into boxes adjusts for the Y coordinate, but leaves the X coordinate alone. The result is that if x is not zero, it censors the wrong part of the image. Fix this by just translating censorRegion into pixmap-relative coordinates and using the resulting boxes as-is. Reported-by: Fabien Lelaquais Link: https://lists.x.org/archives/xorg/2016-August/058165.html Reviewed-by: Adam Jackson Signed-off-by: Aaron Plattner commit 4d586118c113f3c0a6e95ed2d3fc7f9d03a4e362 Author: Olivier Fourdan Date: Tue Aug 2 11:24:41 2016 +0200 xwayland: Plug memleak in frame callbacks The frame callback set up via wl_surface_frame() needs to be freed with wl_callback_destroy() or we'll leak memory. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97065 Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 611b3b1d40f58035582480a3d7cfa77cb288cbc6 Author: Matthieu Herrb Date: Sun Jul 31 12:13:03 2016 +0200 Autoconfig: Fix the loop adding dectected drivers to the list of screens This loop was written in a buggy style, causing a NULL driver ptr to be passed to copyScreen(). copyScreen() only uses that to generate an identifier string, so this is mostly harmless on systems that accept NULL for asprintf() "%s" format. (the generated identifiers are off by one wrt the driver names and the last one contains NULL. For systems that don't accept NULL for '%s' this would cause a segmentation fault when this code is used (no xorg.conf, but partial config in xorg.conf.d for instance). Signed-off-by: Matthieu Herrb Reviewed-by: Keith Packard commit 88820f1c7b66cbc98d3f19efca24c9f52410d9f9 Author: Emily Deng Date: Mon Jul 25 16:12:53 2016 +0800 xfree86: vgaarb: Initialize local variable rsrc_decodes In function xf86VGAarbiterScrnInit when the "pEnt->bus.type" is BUS_PLATFORM, the "pScrn->vgaDev" won't be set, so the "pScrn->vgaDev" is equal to zero. The variable "rsrc_decodes" in function "xf86VGAarbiterAllowDRI" is not initialized. So it will occur error when "pScrn->vgaDev == 0", and "vga_count > 1". For this case, as "pScrn->vgaDev == 0", the function "pci_device_vgaarb_get_info" will only set the value of "vga_count", but won't set the value of "rsrc_decodes", so it will has two different return values for function "xf86VGAarbiterAllowDRI" in different platforms. One platform will return TRUE, as the "rsrc_decodes" 's default value is 0, but another platform will return FALSE, as the "rsrc_decodes" 's default value is "32767", this will cause disable direct rendering. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96937 Signed-off-by: Emily Deng Reviewed-by: Michel Dänzer commit fa2bc06407665ee074f5914d0f83d4114b20fc8e Author: Keith Packard Date: Fri Aug 12 17:40:55 2016 -0700 dix: Avoid writing uninitialized bytes in deliverPropertyNotifyEvent Make sure the whole event is initialized, instead of leaving the pad bytes unset. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 67fc5d68f967d19236221b2c0c2e0fe45acf560f Author: Keith Packard Date: Sat Aug 13 09:02:15 2016 -0700 os: Abandon loop after poll call when array of fds has changed If a file descriptor is added or removed from an ospoll callback, then the arrays containing file descriptor information will have all of their indices changed, so the loop state is no longer consistent. Just bail out and let the caller come back around to try again. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 7d6fffb6013cfc718d884cc549d7a8fef37240cf Author: Keith Packard Date: Fri Aug 12 15:23:55 2016 -0700 os: Delay freeing of epoll_wait return pointers until epoll is idle. Instead of freeing the struct ospollfd elements when the fd is removed by the user, delay that until epoll is idle so that we are sure no epoll_event structures could contain the stale pointer. This handles cases where an fd is removed from the ospoll callback interface, and also in case the OS keeps stale pointers around after the call to epoll_ctl with EPOLL_CTL_DEL. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 69b782aa75bc06f11b8f9b532d5213f252c4c6c4 Author: Keith Packard Date: Fri Jul 29 17:45:45 2016 -0700 xfree86: Set pScrn->pScreen before driver ScreenInit is called Any code called from the driver ScreenInit may want to refer to pScrn->pScreen. As the function passed to AddScreen is the first place the DDX sees a new screen, the generic code needs to make sure that value is set before passing control to the video driver's initialization code. This was found by running a driver which didn't bother to set this value when the initial colormap was installed; xf86RandR12LoadPalette tried to use pScrn->pScreen and crashed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97124 Signed-off-by: Keith Packard Reviewed-and-Tested-by: Michel Dänzer commit 387d6b5df3e11de5cb88db8a559128fcb62e4e5a Merge: d2558f063 8bb9d460f Author: Keith Packard Date: Sat Aug 13 09:12:19 2016 -0700 Merge remote-tracking branch 'daenzer/for-master' commit d2558f063a034a827247b66b4c5adbffe79dc0e7 Author: Keith Packard Date: Thu Aug 11 17:28:38 2016 -0700 Build glamor when Xorg or Xephyr are built. Requires gbm when building Xorg so that xf86-video-modesetting will work. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede Reviewed-by: Eric Anholt commit 2b9f8ae98602d2abda7c363900f39a5bd3768a4c Author: Keith Packard Date: Thu Aug 11 21:32:59 2016 -0700 mi: Remove spurious call to OsReleaseSignals from mieqGrowQueue This call wasn't converted to 'input_unlock()' when the SIGIO code was removed from the server, and so when the queue growing was reworked to be done from the input thread, it got left sitting here. As the caller now manages the lock, we don't need to switch this to input_unlock at this point. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit f399919e13c994452f7219163b2a4b1fa015242e Author: Peter Hutterer Date: Fri Aug 12 13:59:56 2016 +1000 xfree86: lock input during PreInit This is a problem for the libinput driver that uses the same context across multiple devices. The driver may be halfway through setting up an input device (and the only way to do so is to add it to libinput) when the input thread comes in an reads events. This then causes mayhem when data is dereferenced that hasn't been set up yet. In my case the cause was the call to libinput_path_remove_device() inside preinit racing with evdev_dispatch_device() handling of ENODEV. The sequence was: - thread 2 gets an event and calls evdev_dispatch_device() - thread 1 calls libinput_path_remove_device() which sets the device->source to NULL - thread 2 reads from the fd, gets ENODEV and now removes the device->source, dereferencing the null-pointer This is the one I could reproduce the most, but there are other potential pitfalls that affect any driver that uses the same fd for multiple devices. Avoid all this and wrap PreInit into the lock. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit dd4e21cb3a6e692e834ec34bec42944202b3e085 Author: Peter Hutterer Date: Fri Aug 12 12:06:18 2016 +1000 xfree86: fix unbalanced input_lock/unlock in xf86NewInputDevice() If a device couldn't be enabled we left the lock hanging. This patch also removes the leftover OsReleaseSignals() call, now unnecessary. Note that input_unlock() is later than previously OsReleaseSignals(). RemoveDevice() manipulates the input device and its file descriptors, it's safer to put the input_unlock() call after RemoveDevice() to avoid events coming in while the device is being removed. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit bf31d6f43e5ce04891a96b226a975379e2e2ba71 Author: Keith Packard Date: Thu Aug 11 12:34:54 2016 -0700 os: Allow re-registering fd with InputThreadRegisterDev Calling InputThreadRegisterDev twice with the same fd should replace the existing function and args instead of creating a new entry with the same fd. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 2df2815d6ae0c2ffb9e0a084d61ee3585f5116df Author: Peter Hutterer Date: Tue Aug 9 17:35:58 2016 +1000 os: append, rather than prepend, any new input thread fds xf86AddEnabledDevice() prepends the new fd to the list, xf86RemoveEnabledDevice() then searches for a matching fd and removes that entry. If this is done for the same fd (and since we lose all information but the actual fd) we usually unregister virtual devices in reverse order, causing a dereference of already released memory. Case in point: - the wacom driver calls xf86AddEnabledDevice() once for the physical device, then multiple times for the virtual subdevices - when the physical device is unplugged, the driver calls xf86RemoveEnabledDevice() for the physical device - all we have is the fd, so we end up removing the last virtual device from the fd set - xf86DeleteInput() frees the physical device's pInfo - the fd goes crazy with ENODEV, but a read_input() now passes the already freed pInfo for the physical device - boom Fix this by appending to the fd list to provide bug-for-bug compatibility with the old SIGIO code. This needs to be fixed in the driver, but meanwhile not crashing the server provides for better user experience. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit a446ff84de2dd29439521f6e87d75bde3bbf002c Author: Michel Dänzer Date: Fri Jul 29 17:38:21 2016 +0900 xfree86/modes: Handle no palette case better in xf86RandR12CrtcSetGamma Just use the RandR gamma ramp directly. Fixes random on-monitor colours with drivers which don't call xf86HandleColormaps, e.g. modesetting. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97154 Reviewed-by: Alex Deucher commit d3d4ff0ed4d4679b7983b1a3ea267ff945f7643c Author: Kenneth Graunke Date: Thu Jul 28 07:28:51 2016 -0700 modesetting: Delete dead drmmode_bo_for_pixmap function. Embarassingly, it looks like I introduced this dead function in commit 13c7d53df8dac45ea2a685826cd45a39bcb51657 a year ago. Nothing ever used it, not even then. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt commit 8bb9d460fbc82ee5d6f87e1d11cfa52f4f3072ee Author: Michel Dänzer Date: Fri Jul 29 17:38:21 2016 +0900 xfree86/modes: Handle no palette case better in xf86RandR12CrtcSetGamma Just use the RandR gamma ramp directly. Fixes random on-monitor colours with drivers which don't call xf86HandleColormaps, e.g. modesetting. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97154 Reviewed-by: Alex Deucher commit c833c0866f2f8f829185667efe3d6dfa5979a9e8 Author: Michel Dänzer Date: Fri Jul 29 18:41:06 2016 +0900 present: Handle event mask updates as specified v2 From the Present extension specification: An event context is associated with a specific window; using an existing event context with a different window generates a Match error. If eventContext specifies an existing event context, then if eventMask is empty, PresentSelectInput deletes the specified context, otherwise the specified event context is changed to select a different set of events. If eventContext is an unused XID, then if eventMask is empty no operation is performed. Otherwise, a new event context is created selecting the specified events. Without this change, there's no way for a client to explicitly change or destroy an existing event mask entry. Trying to do so as specified above would just result in a protocol error. v2: (Keith Packard) * Use dixLookupResourceByType instead of walking window_priv->events * Return BadMatch if the existing event context is associated with a different window or client * Call LEGAL_NEW_RESOURCE again when creating a new event context * Drop invalid "leak fix" Signed-off-by: Michel Dänzer Signed-off-by: Keith Packard Reviewed-by: Keith Packard Reviewed-by: Kenneth Graunke commit 0924ac014d7caadab0b15ba69cd0a09cfe8a01da Author: Michel Dänzer Date: Tue Jul 26 17:28:33 2016 +0900 present: Only call restore_screen_pixmap once from set_abort_flip present_restore_screen_pixmap's work doesn't need to be done several times for the same pending flip. Fixes a crash if the X server quits while a flip is pending, in which case present_set_abort_flip may be called several times, including when screen->root is already cleared to NULL. Reviewed-by: Hans de Goede commit b4e46c0444bb09f4af59d9d13acc939a0fbbc6d6 Author: Michel Dänzer Date: Sat Nov 28 16:50:47 2015 +0900 xfree86: Hook up colormaps and RandR 1.2 gamma code v6 Instead of breaking the former when the driver supports the latter, hook them up so that the hardware LUTs reflect the combination of the current colourmap and gamma states. I.e. combine the colourmap, the global gamma value/ramp and the RandR 1.2 per-CRTC gamma ramps into one combined LUT per CRTC. Fixes e.g. gamma sliders not working in games. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27222 v2: * Initialize palette_size and palette struct members, fixes crash on server startup. v3: * Free randrp->palette in xf86RandR12CloseScreen, fixes memory leak. v4: * Call CMapUnwrapScreen if xf86RandR12InitGamma fails (Emil Velikov). * Still allow xf86HandleColormaps to be called with a NULL loadPalette parameter in the xf86_crtc_supports_gamma case. v5: * Clean up inner loops in xf86RandR12CrtcComputeGamma (Keith Packard) * Move palette update out of per-CRTC loop in xf86RandR12LoadPalette (Keith Packard) v6: * Handle reallocarray failure in xf86RandR12LoadPalette (Keith Packard) Reviewed-by: Keith Packard commit 17213b74fd7fc4c4e2fe7a3781e7422dd482a0ab Author: Michel Dänzer Date: Tue Jun 21 16:44:20 2016 +0900 xfree86/modes: Remove xf86RandR12CrtcGetGamma This would normally return the same values the core RandR code passed to xf86RandR12CrtcSetGamma before, which is rather pointless. The only possible exception would be if a driver tried initializing crtc->gamma_red/green/blue to reflect the hardware LUT state on startup, but that can't work correctly if whatever set the LUT before the server started was running at a different depth. Even the pointless round-trip case will no longer work with the following change. Reviewed-by: Keith Packard commit 62f44052573b475a7b4c24f8e2da9bd6a8f1bd70 Author: Michel Dänzer Date: Tue Jun 21 15:41:45 2016 +0900 xfree86/modes: Move gamma initialization to xf86RandR12Init12 v2 RRCrtcGammaSetSize cannot be used yet in xf86InitialConfiguration, because randr_crtc isn't allocated yet at that point, but a following change will require RRCrtcGammaSetSize to be called from xf86RandR12CrtcInitGamma. v2: * Bail from xf86RandR12CrtcInitGamma if !crtc->funcs->gamma_set (Keith Packard) Reviewed-by: Keith Packard commit 0b2f30834b1a9f4a03542e25c5f54ae800df57e2 Author: Keith Packard Date: Sun May 29 17:47:29 2016 -0700 os: Clean up WaitFor.c Do all timer stuff before blocking, avoiding a bunch of duplicate code and merge common code in WaitForSomething. The WaitForSomething changes need a bit of explanation to show that the new code is effectively equivalent to the old. Eliding error checking and trivial bits we've got: Before: if (ready clients) timeout = 0 else compute timeout i = poll if (i <= 0) { if (ready clients) return TRUE; if (input) return FALSE; if (any ready timers) { run timers return FALSE; } } else { if (input) return FALSE; if (any ready timers) { run timers return FALSE; } if (ready clients) return TRUE; } After: if (ready clients) timeout = 0; else compute timeout run_timers poll if (input) return FALSE; if (ready clients) return TRUE; The old code would return TRUE if there were ready clients and input pending. Dispatch would then schedule that ready client, but before processing any requests, it would notice that there was input pending and go process it. The new code just checks for input first, which is effectively the same. If the poll timed out and there weren't clients ready, then timers would get run. If the poll didn't time out, then timers would get run, even if there were clients now ready. Now, if the timeout interval was zero, that means that the timers must have been ready *before* poll was invoked. In this case, we should simply run the timers before calling poll -- no sense calling poll just to discard any data that it generates. If the timeout interval was non-zero, and poll didn't timeout, then either there aren't any timers to run, or we got a surprise and hit a timer exactly as a client became ready to run. This is the one case where the new code is different from the old; the new code delays the timer call until the next time WaitForSomething is called. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 2ab8b1dcd37900e5e2f11007d7c0cd0545209482 Author: Keith Packard Date: Sun May 29 19:48:25 2016 -0700 os: Use xorg_list for struct _OsTimerRec No sense having an open-coded linked list here, plus the doubly linked list is more efficient Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 50779c494d4682103b96db440021e56e44311b6b Author: Keith Packard Date: Sun May 29 12:45:53 2016 -0700 os: Remove CheckConnections poll provides per-fd notification of failure, so we don't need CheckConnections anymore. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit f0275b1e5a4787da1f4d5507165315a000c22b33 Author: Keith Packard Date: Thu May 26 00:19:55 2016 -0700 os: Leave stdin and stdout open There's no reason to close these now that we don't care what file descriptors we use. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 8217c29d2d8b29bd66bc54fee3fe5cb3385a05c7 Author: Keith Packard Date: Wed May 25 23:43:49 2016 -0700 Allow 1024 and 2048 for LimitClients There's no reason not to offer ridiculous numbers of clients; only a few static data structures are arrays of this length. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit e0edb963fe09582f23a4b55da4f8840173e7a1ee Author: Keith Packard Date: Tue May 24 21:04:14 2016 -0700 os: eliminate fd value limits for clients With no code depending on the range of file descriptors, checking for that can be eliminated. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 30bc0732f959bbc63f318c06d48de080d495da32 Author: Keith Packard Date: Tue May 24 21:12:33 2016 -0700 os: Use ospoll for input thread [v2] Replace use of select(2) to avoid fd limits. Note that InputThreadFillPipe used select as well, but none of the files passed were non-blocking, so there was no need for that code at all. v2: Keep ospoll API usage single threaded to avoid re-entrancy issues Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit f993091e7db81b0420e23c485378cba112278839 Author: Keith Packard Date: Thu May 26 10:40:44 2016 -0700 os: Switch server to poll(2) [v3] Eliminates all of the fd_set mangling in the server main thread v2: Listen for POLLOUT while writes are blocked. v3: Only mark client not ready on EAGAIN return from read Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 8f1edf4bd3a1f050ce9eeb5eac45dd1a8f7a6d5e Author: Keith Packard Date: Thu May 19 13:59:54 2016 -0700 dix: Use list for ready clients This converts the dispatch loop into using a list of ready clients instead of an array. This changes the WaitForSomething API so that it notifies DIX when a client becomes ready to read, instead of returning the set of ready clients. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit d6eff3c31e8289881a3aa9b858e5710d0f741db0 Author: Keith Packard Date: Thu May 26 10:20:45 2016 -0700 os: Add ospoll interface [v2] This provides a wrapper around poll or epoll providing a callback-based interface for monitoring activity on a large set of file descriptors. v2: use xserver_poll API instead of poll. Don't use WSAPoll as that is broken. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit d403aca70a07e1401cb93738f1af5961582a2e47 Author: Keith Packard Date: Mon Jul 18 15:58:42 2016 -0700 Switch poll() users to xserver_poll() This uses the wrapper in case we need to emulate poll with select as we do on Windows. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 711c36558f50943c8342f25ad210281134887a3d Author: Brian M. Clapper Date: Mon Jul 11 18:30:05 2016 -0400 os: Add poll emulation for mingw [v2] v2: rename as 'xserver_poll' to avoid potential library name collisions. Provide 'xserver_poll.h' which uses the system poll where available and falls back to this emulation otherwise. Autodetects when this is required, building the emulation only then Source: https://github.com/bmc/poll Signed-off-by: Adam Jackson commit 2a79be9e4dd1b6ba00b69ff40bc5257ec84d34da Author: Jon Turney Date: Tue Jul 19 13:35:37 2016 +0100 hw/xwin: Update BlockHandler function signature Update for removal of fdset from Block/Wakeup handler API in 9d15912a Signed-off-by: Jon Turney Reviewed-by: Keith Packard commit 60a91031d13e4d29c383087120e318f6b528b6e5 Author: Jon Turney Date: Tue Jul 19 13:35:36 2016 +0100 hw/xwin: Update for removal of AddEnabledDevice Update for removal of AddEnabledDevice in be5a513f. Use SetNotifyFd instead. Signed-off-by: Jon Turney Reviewed-by: Keith Packard commit 7f2d690725292e7b5a44c813c9456da426256873 Author: Peter Hutterer Date: Mon Jun 27 10:17:14 2016 +1000 xfree86: if ATTR_KEYBOARD is set, match for keyboards ATTR_KEY maps to ID_INPUT_KEY which is set for any device with keys. ID_INPUT_KEYBOARD and thus ATTR_KEYBOARD is set for devices that are actual keyboards (and have a set of expected keys). Hand-written match rules may only apply ID_INPUT_KEYBOARD, so make sure we match on that too. Arguably we should've been matching on ATTR_KEYBOARD only all along but changing that likely introduces regressions. Reported-by: Marty Plummer Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit 4b311d23e84356bd0e9e736aeed7448dd6382118 Author: Adam Jackson Date: Mon Jul 18 12:46:51 2016 -0400 modesetting: resubmit dirty rects on EINVAL (v2) This error code can mean we're submitting more rects at once than the driver can handle. If that happens, resubmit one at a time. v2: Make the rect submit loop more error-proof (Walter Harms) Signed-off-by: Adam Jackson Reviewed-by: Michael Thayer commit 8d3a368d8980e37e7e8c57065dc901ce809887c6 Author: Keith Packard Date: Wed Jun 1 22:47:29 2016 -0700 os: InputThreadFillPipe doesn't need select or poll The file descriptors passed to InputThreadFillPipe are always blocking, so there's no need to use Select (or poll). Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit ef7ddbe242ed4c461f816663fb88646e41f1c21b Author: Keith Packard Date: Wed Jun 1 22:35:09 2016 -0700 os: Move ETEST macro from io.c to osdep.h This lets other code share this functionality Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 0d294462a5af08ada654c588fad921ed7a22749b Author: Keith Packard Date: Sun May 29 15:06:36 2016 -0700 os: Add X_NOTIFY_ERROR value This provides a way to report errors on file descriptors that is better defined than "any bits which are not READ or WRITE". Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit e6636b438322a9a2f2270ad9d60bf3dfc72be0b3 Author: Keith Packard Date: Thu May 26 10:30:56 2016 -0700 os: Compute timeout in milliseconds instead of struct timeval The timeout resolution offered in the AdjustWaitForDelay call is only milliseconds, so passing around the timeout as a pointer to a struct timeval is not helpful. Doing everything in milliseconds up to the point of the select call simplifies the code without affecting functionality at all. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit a414db021575accff64abad6f1047245e81c7476 Author: Keith Packard Date: Thu May 19 15:08:05 2016 -0700 dix: Intermediate GrabServer state 'GrabKickout' not needed The intermediate grabState, "GrabKickout", was used to trigger dispatch into going back to WaitForSomething after doing a GrabServer so that the set of ready clients would be recomputed to match what the server should be processing. As we only process one client per WaitForSomething call, we will always hit WaitForSomething after finishing the current client, and so don't need any special case here. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 7762a602c1dfdd8cfcf2b8c2281cf4d683d05216 Author: Keith Packard Date: Thu May 19 15:05:55 2016 -0700 dix/os: Merge priority computation into SmartScheduleClient Instead of having scheduling done in two places (one in WaitForSomething, and the other in SmartScheduleClient), just stick all of the scheduling in SmartScheduleClient. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 4af00242ef1e39499b932d12423fdf449296090a Author: Keith Packard Date: Mon May 30 01:49:46 2016 -0700 Bump ABI versions to reflect block/wakeup handler API changes Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit be5a513fee6cbf29ef7570e57eb0436d70fbd88c Author: Keith Packard Date: Mon Dec 7 15:12:14 2015 -0800 Remove AddEnabledDevice and AddGeneralSocket APIs All uses of these interfaces should instead be using the NotifyFd API instead. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 9d15912aa475b733bbb20efc367a67dacad63bf1 Author: Keith Packard Date: Tue Sep 1 18:51:14 2015 -0700 Remove fd_set from Block/Wakeup handler API This removes the last uses of fd_set from the server interfaces outside of the OS layer itself. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit fb0802113b4c57819cba15d64baf79bf4148607e Author: Keith Packard Date: Tue Sep 1 11:20:04 2015 -0700 Remove readmask from screen block/wakeup handler With no users of the interface needing the readmask anymore, we can remove it from the argument passed to these functions. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 410bc047480a9f98df678dc850bc6b99c3cfb5bf Author: Keith Packard Date: Mon Dec 7 15:03:10 2015 -0800 dmx: Eliminate use of AddEnabledDevice [v2] Use SetNotifyFd instead, with the hope that someday someone will come fix this to be more efficient -- right now, the wakeup handler is doing the event reading, instead of the notify callback. v2: no need to patch dmxsigio.c as it has been removed. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 6299ef3d749d6f978d3d38d42f711ac56bf382eb Author: Keith Packard Date: Thu Aug 27 11:49:35 2015 -0700 modesetting: Use passed-in fd for drm event monitoring NotifyFd callback This is a cleanup, proposed by Adam Jackson, but wasn't merged with the original NotifyFD changes. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 6bf7b49f6711c7ed1837283dc04f93f4c1b77ecc Author: Keith Packard Date: Thu Aug 27 11:47:26 2015 -0700 hw/kdrive: Use passed-in fd for kdrive/linux APM monitoring [v2] This is a cleanup, proposed by Adam Jackson, but wasn't merged with the original NotifyFD changes. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 55c2e1a3aa587c58a74066724e11e30b3df267b8 Author: Keith Packard Date: Mon Dec 7 15:11:33 2015 -0800 xnest: Use SetNotifyFd to receive events Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 24e65bf0db57bf4ac70386c0a0e8275b73edd2fb Author: Keith Packard Date: Thu Dec 3 01:02:02 2015 -0600 hw/xfree86: Use NotifyFd for other input fd wakeups Remove code in xf86Wakeup for dealing with other input and switch to using the new NotifyFd interface. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit c3fea428aed919826130ef8ebdb2cceb445a845b Author: Keith Packard Date: Tue May 24 20:51:31 2016 -0700 os: Use NotifyFd for ErrorConnMax Instead of open-coding a single FD wait, use NotifyFd to wait for the FD to become readable before returning the error message. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 559aac2d71250e3137aaa582e2a59a918ddf21b7 Author: Keith Packard Date: Tue May 24 21:59:38 2016 -0700 dmx: Switch from select(2) to poll(2) for input Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit aa6717ce213e79735c72afc5ec9cc1f9c0297e09 Author: Keith Packard Date: Tue May 24 21:36:18 2016 -0700 xfree86: Switch from select(2) to poll(2) xf86WaitForInput and the xf86 SIGIO handling code. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 81135991a583b3b30a90e82ddc1d5c86d57bf00b Author: Keith Packard Date: Tue May 24 21:19:13 2016 -0700 kdrive: switch from select(2) to poll(2) This avoids fd limits Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 05a793f5b3c40747d5a92a076def7f4fb673c7e7 Author: Keith Packard Date: Tue Sep 1 18:50:55 2015 -0700 dix: Switch to the libXfont2 API (v2) This new libXfont API eliminates exposing internal X server symbols to the font library, replacing those with a struct full of the entire API needed to use that library. v2: Use libXfont2 instead of libXfont_2 Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 950ffb8d6fd1480f305e38c571bda44f247f1de2 Author: Eric Anholt Date: Fri Nov 6 12:27:42 2015 -0800 glamor: Remove the FBO cache. It is a modest performance improvement (2.7% on Intel), with the significant downside that it keeps extra pixmap contents laying around for 1000 BlockHandlers without the ability for the system to purge them when under memory pressure, and tiled renderers don't know that we could avoid reading their current contents when beginning to render again. We could use the FB invalidate functions, but they aren't always available, aren't hooked up well in Mesa, and would eat into the performance gains of having the cache. [ajax: rebased to master] Reviewed-by: Adam Jackson commit e8e36755abb17872d669b88d33ca9adc511029a0 Author: Michel Dänzer Date: Fri Jul 1 12:34:20 2016 +0900 glamor: Translate solid text background region after clipping Fixes incorrect clipping for redirected windows which don't happen to be located at the top left corner of the screen. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96742 Signed-off-by: Michel Dänzer Reviewed-by: Adam Jackson commit 32a9504c69183485b0b796fa3966cd1e39992365 Author: Adam Jackson Date: Tue Jul 12 10:04:18 2016 -0400 xfree86: Fix fallback driver sort order for Xorg -configure (v2) The intent here was that fallback drivers would be at the end of the list in order, but if a fallback driver happened to be at the end of the list already that's not what would happen. Rather than open-code something smarter, just use qsort. Note that qsort puts things in ascending order, so somewhat backwardsly fallbacks are greater than native drivers, and vesa is greater than modesetting. v2: Use strcmp to compare non-fallback drivers so we get a predictable result if your libc's qsort isn't stable (Keith Packard) Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 4926845a57fa8b53e18ea7d3434bf5539e9b7782 Author: Andrew Eikum Date: Wed Jul 6 14:13:09 2016 -0500 shm: Also censor images returned by ShmGetImage We currently censor images from dix's GetImage, but not from ShmGetImage. This is a method to bypass XACE, creating a potential leak. We should censor in both methods. Reviewed-by: Adam Jackson Signed-off-by: Andrew Eikum commit 9fcb554e9bfdf3eed2c2250d89150e3e7b907f01 Author: Adam Jackson Date: Fri Jul 8 15:17:05 2016 -0400 xwayland: Only force monotonic clock once Otherwise on regeneration we get: (EE) BUG: triggered 'if (clockid)' (EE) BUG: utils.c:440 in ForceClockId() (EE) (EE) Backtrace: (EE) 0: ./hw/xwayland/Xwayland (ForceClockId+0x5c) [0x47713c] (EE) 1: ./hw/xwayland/Xwayland (OsInit+0x25) [0x4763d5] (EE) 2: ./hw/xwayland/Xwayland (dix_main+0x11c) [0x43e60c] (EE) 3: /lib64/libc.so.6 (__libc_start_main+0xf1) [0x7f627b2f9731] (EE) 4: ./hw/xwayland/Xwayland (_start+0x29) [0x4238e9] (EE) 5: ? (?+0x29) [0x29] Signed-off-by: Adam Jackson Reviewed-by: Jonas Ådahl commit cf6730c503f8090a5d1b80918fe253fc2c5bc090 Author: Rui Matos Date: Wed Jul 13 19:19:09 2016 +0200 xwayland: Update RR state on wl_output.done instead of wl_output.mode Otherwise if the geometry changes but the mode doesn't we end up with the previous geometry from RR's point of view. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=768710 Reviewed-by: Jonas Ådahl Signed-off-by: Rui Matos commit 401a8d6e1379133863e3271374dc21850d0d3cab Author: Michel Dänzer Date: Tue Jun 28 17:22:47 2016 +0900 dix: Work around non-premultiplied ARGB cursor data Some games incorrectly use non-premultiplied ARGB cursor data, presumably because that's what Windows uses. On some hardware (and with SWcursor), this breaks areas of the cursor which are supposed to be transparent (and presumably also translucent areas, but that's less noticeable). This change checks for pixels with alpha == 0 and any non-alpha component != 0. If any such pixel is found, the data is assumed to be non-premultiplied and fixed up by multiplying the RGB components with the alpha component. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92309 Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 033888e7766d226a179357d970223428c19c4b53 Author: Hans De Goede Date: Thu Jul 7 10:55:04 2016 +0200 linux: Do not try to open /dev/vc/0, fix error msg when /dev/tty0 open fails /dev/vc/0 is a devfs thing which is long dead, so stop trying to open /dev/vc/0, besides being a (small) code cleanup this will also fix the "parse_vt_settings: Cannot open /dev/tty0 (%s)\n" error message to display the actual error, rather then the -ENOENT from also trying /dev/vc/0. BugLink: https://patchwork.freedesktop.org/patch/8768/ Reported-by: Chad Versace Suggested-by: Julien Cristau Signed-off-by: Hans de Goede Reviewed-by: Julien Cristau Reviewed-by: Chad Versace commit ce24f3aa5815e03c2d501d1504f6c0162b219801 Author: Alex Goins Date: Thu Jul 7 14:50:03 2016 -0700 modesetting: NULL assignment for drmmode_set_target_scanout_target_cpu Commit 80e64dae: "modesetting: Implement PRIME syncing as a sink" originally was supposed to have this line, but it was dropped as part of the merge process. Foregoing the NULL assignment causes a ton of problems with dereferencing uninitialized memory. Signed-off-by: Alex Goins Reviewed-by: Dave Airlie commit df8e86931eb19c196ed2afc85d89525ef8cb711b Author: agoins Date: Thu Jun 16 20:06:48 2016 -0700 randr: Add ability to turn PRIME sync off Adds an output parameter to disable PRIME synchronization. Output parameter is created when the user calls 'xrandr --setprovideroutputsource ' to prevent polluting output parameters of non-PRIME configurations. Defaults to on, so if the user wants PRIME synchronization they don't need to do anything. If the user wishes to disable PRIME synchronization when they first set up PRIME, they can run 'xrandr --output --set "PRIME Synchronization" 0' after running 'xrandr --setprovideroutputsource ', but before 'xrandr --auto'. If the user wishes to enable or disable PRIME synchronization after PRIME has already been set up, they can run 'xrandr --output --set "PRIME Synchronization" <0 or 1>' at any time, xrandr will trigger a modeset, which will tear down and setup PRIME in the configuration they requested on CRTCs associated with that output. randrstr.h: Add central definition of the output property name. rrcrtc.c: Add function rrGetPixmapSharingSyncProp() to query the status of the output property. Add function rrSetPixmapSharingSyncProp() to set the output property. Add 'sync' parameter to rrSetupPixmapSharing(), which when false will use single buffering even if the required ABI functions are supported. Changes rrSetupPixmapSharing() to only report an error if falling back to single buffering when the user requested synchronization. Change RRCrtcSet() to use rrPixmapSharingSyncProp() to query the status of the output property and feed it into rrSetupPixmapSharing() using the 'sync' parameter. rrprovider.c: Add RR(Init/Fini)PrimeSyncProps(), functions to create and destroy the PRIME synchronization output property. Add a call to RRInitPrimeSyncProps() in ProcRRSetProviderOutputSource(), such that the output property is created when the user requests PRIME. Add a call to RRFiniPrimeSyncProps() in RRProviderDestroy(). v1: Initial commit v2: Unchanged v3: Add /* TODO */ for handling different sources with different outputs Make rrSetupPixmapSharing() set the output property to 0 if it has to fall back, to avoid user confusion. Make rr(Get)PixmapSharingSyncProp() check the current value if there isn't a pending value v4: Unchanged v5: Unchanged v6: Rebase onto ToT v7: Unchanged Signed-off-by: Alex Goins commit 60ad701a6a8cb9f1eacb72acfe2cb8d3b7a865dc Author: Hans de Goede Date: Tue Jun 14 11:58:01 2016 +0200 modesetting: Load on GPU-s with 0 outputs In newer laptops with switchable graphics, the GPU may have 0 outputs, in this case the modesetting driver should still load if the GPU is SourceOffload capable, so that it can be used as an offload source provider. Signed-off-by: Hans de Goede Reviewed-by: Eric Engestrom commit 94a1c77259ce39ba59ad87615df39b570ffab435 Author: Hans de Goede Date: Thu Jun 16 15:21:03 2016 +0200 modesetting: Fix swapping of provider sink / source capabilities When a card has import capability it can be an offload _sink_, not a source and vice versa for export capability. This commit fixes the modesetting driver to properly set these capabilities, this went unnoticed sofar because most gpus have both import and export capability. Signed-off-by: Hans de Goede Reviewed-by: Eric Engestrom commit fcbafdfd79fd03205bc324e23b6d4e4d4f7180e1 Author: Adam Jackson Date: Wed Jul 22 12:14:08 2015 -0400 modesetting: Implement a double-buffered shadow mode Server GPUs often have a VNC feature attached to allow remote console. The controller implementing this feature is usually not very powerful, and we can easily swamp it with work. This is made somewhat worse by damage over-reporting the size of the dirty region, and a whole lot worse by applications (or shells) that update the screen with identical pixel content as was already there. Fix this by double-buffering the shadow fb, using memcmp to identify dirty tiles on each update pass. Since both shadows are in host memory the memcmp is cheap, and worth it given the win in network bandwidth. The tile size is somewhat arbitrarily chosen to be one cacheline wide at 32bpp on Intel Core. By default we enable this behaviour for (a subset of) known server GPUs; the heuristic could use work. Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Signed-off-by: Hans de Goede commit 75e660e379d921a53eb7c3bc9c2e412fa58aec02 Author: Adam Jackson Date: Wed Jul 22 12:14:07 2015 -0400 modesetting: Drop some non-functional triple-buffering variables Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Signed-off-by: Hans de Goede commit 21217d02168d1883b2d1f64399aec494f96a8b9d Author: Dave Airlie Date: Wed Jul 22 12:14:06 2015 -0400 modesetting: Implement 32->24 bpp conversion in shadow update 24bpp front buffers tend to be the least well tested path for client rendering. On the qemu cirrus emulation, and on some Matrox G200 server chips, the hardware can't do 32bpp at all. It's better to just allocate a 32bpp shadow and downconvert in the upload hook than expose a funky pixmap format to clients. [ajax: Ported from RHEL and separate modesetting driver, lifted kbpp into the drmmode struct, cleaned up commit message, fixed 16bpp] Reviewed-by: Adam Jackson Signed-off-by: Dave Airlied Reviewed-by: Alex Deucher [hdegoede@redhat.com: rebase, also use kbpp for rotate shadow fb] Signed-off-by: Hans de Goede commit af916477c65a083ec496ac3f088d766b410e8b6e Author: Takashi Iwai Date: Mon Feb 16 17:00:55 2015 +0100 modesetting: Fix hw cursor check at the first call With the previous patch, the modesetting driver can now return whether the driver supports hw cursor. However, it alone doesn't suffice, unfortunately. drmmode_load_cursor_argb_check() is called in the following chain: xf86CursorSetCursor() -> xf86SetCursor() -> xf86DriverLoadCursorARGB() -> xf86_load_cursor_argb() -> xf86_crtc_load_cursor_argb() -> drmmode_load_cursor_argb_check() *but* at first with drmmode_crtc->cursor_up = FALSE. Then the function doesn't actually set the cursor but returns TRUE unconditionally. The actual call of drmmode_set_cursor() is done at first via the show_cursor callback, and there is no check of sw cursor fallback any longer at this place. Since it's called only once per cursor setup, so the xserver still thinks as if the hw cursor is supported. This patch is an ad hoc fix to correct the behavior somehow: it does call drmmode_set_cursor() at the very first time even if cursor_up is FALSE, then quickly hides again. In that way, whether the hw cursor is supported is evaluated in the right place at the right time. Of course, it might be more elegant if we have a more proper mechanism to fall back to sw cursor at any call path. But it'd need more rework, so I leave this workaround as is for now. Signed-off-by: Takashi Iwai Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 14c21ea1c9496638b1feb8e6145c440fb4f1d14b Author: Takashi Iwai Date: Mon Feb 16 17:00:54 2015 +0100 modesetting: Use load_cursor_argb_check for sw cursor fallback The modesetting driver still has an everlasting bug of invisible cursor on cirrus and other KMS drivers where no hardware cursor is supported. This patch is a part of an attempt to address it. This patch particularly converts the current load_cursor_argb callback of modesetting driver to load_cursor_argb_check so that it can return whether the driver handles the hw cursor or falls back to the sw cursor. Signed-off-by: Takashi Iwai Reviewed-by: Kenneth Graunke [hdegoede@redhat.com: Add extra comment suggested by Kenneth] Signed-off-by: Hans de Goede commit 074cf58769b38550a3f35d5ecb73333330cb2aed Author: Takashi Iwai Date: Mon Feb 16 17:00:53 2015 +0100 modesetting: Fix the error check from DRM_IOCTL_MODE_CURSOR2 The error value isn't always -EINVAL, e.g. the kernel drm core returns -ENXIO when the corresponding ops doesn't exist. Without this fix, DRM_IOCTL_MODE_CURSOR2 would be dealt as success even if it shouldn't. Signed-off-by: Takashi Iwai Reviewed-by: Michel Dänzer Reviewed-by: Kenneth Graunke Signed-off-by: Hans de Goede commit 3762edded8e6e973f71419937e16bea262a266b8 Author: Adam Jackson Date: Wed Jun 29 14:07:32 2016 -0400 configure: Tell AC_REPLACE_FUNCS where to find replacements Fixes weird link errors of the form: CCLD Xvfb ../../Xext/.libs/libXext.a(xvmc.o): In function `xf86XvMCRegisterDRInfo': /home/ajax/git/xserver/Xext/xvmc.c:828: undefined reference to `strlcpy' /home/ajax/git/xserver/Xext/xvmc.c:829: undefined reference to `strlcpy' ../../os/os.O: In function `siHostnameAddrMatch': /home/ajax/git/xserver/os/access.c:1821: undefined reference to `strlcpy' ../../os/os.O: In function `AuthAudit': /home/ajax/git/xserver/os/connection.c:555: undefined reference to `strlcpy' /home/ajax/git/xserver/os/connection.c:574: undefined reference to `strlcpy' ../../os/os.O:/home/ajax/git/xserver/os/log.c:972: more undefined references to `strlcpy' follow collect2: error: ld returned 1 exit status Makefile:688: recipe for target 'Xvfb' failed make[3]: *** [Xvfb] Error 1 Makefile:749: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 Makefile:608: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 Makefile:776: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1 Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit d135100d6b17e54262a12aeaebe0fe2fe48da3bb Author: Peter Hutterer Date: Tue Jun 28 11:42:41 2016 +1000 xkb: add a cause to the xkb indicator update after a keymap change Regression introduce by ac164e58870d which calls XkbUpdateAllDeviceIndicators() with two NULL arguments. A few layers down into the stack and we triggered a NULL-pointer dereference. In theory a NULL cause is acceptable since we don't actually change modifier state here. Instead of updating all places to check for NULL just set the cause to the client request and go to the pub. https://bugs.freedesktop.org/show_bug.cgi?id=96384 Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau Reviewed-by: Daniel Stone commit b83dede9cb930cf55249ad8e935f3c4d4328e2d9 Author: Alex Goins Date: Thu Jun 16 20:06:56 2016 -0700 modesetting: Implement PRIME syncing as a source Implements (Start/Stop)FlippingPixmapTracking, PresentSharedPixmap, and RequestSharedPixmapNotifyDamage, the source functions for PRIME synchronization and double buffering. Allows modesetting driver to be used as a source with PRIME synchronization. v1: N/A v2: N/A v3: N/A v4: Initial commit v5: Move disabling of reverse PRIME on sink to sink commit v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit 44cb9578c0e5e10568826bc3ecbed97d358bba3c Author: Alex Goins Date: Thu Jun 16 20:06:55 2016 -0700 modesetting: Disable Reverse PRIME for i915 Reverse PRIME seems to be designed with discrete graphics as a sink in mind, designed to do an extra copy from sysmem to vidmem to prevent a discrete chip from needing to scan out from sysmem. The criteria it used to detect this case is if we are a GPU screen and Glamor accelerated. It's possible for i915 to fulfill these conditions, despite the fact that the additional copy doesn't make sense for i915. Normally, you could just set AccelMethod = none as an option for the device and call it a day. However, when running with modesetting as both the sink and the source, Glamor must be enabled. Ideally, you would be able to set AccelMethod individually for devices using the same driver, but there seems to be a bug in X option parsing that makes all devices on a driver inherit the options from the first detected device. Thus, glamor needs to be enabled for all or for none until that bug (if it's even a bug) is fixed. Nonetheless, it probably doesn't make sense to do the extra copy on i915 even if Glamor is enabled for the device, so this is more user friendly by not requiring users to disable acceleration for i915. v1: N/A v2: N/A v3: N/A v4: Initial commit v5: Unchanged v6: Rebase onto ToT v7: NULL check and free drmVersionPtr Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit f6fef2a171366156c4c6807de7fe086f04f41b7b Author: Alex Goins Date: Thu Jun 16 20:06:54 2016 -0700 modesetting: Blacklist USB transport devices from PRIME sync UDL (USB 2.0 DisplayLink DRM driver) and other drivers for USB transport devices have strange semantics when it comes to vblank events, due to their inability to get the actual vblank info. When doing a page flip, UDL instantly raises a vblank event without waiting for vblank. It also has no support for DRM_IOCTL_WAIT_VBLANK, and has some strange behavior with how it handles damage when page flipping. It's possible to get something semi-working by hacking around these issues, but even then there isn't much value-add vs single buffered PRIME, and it reduces maintainability and adds additional risks to the modesetting driver when running with more well-behaved DRM drivers. Work needs to be done on UDL in order to properly support synchronized PRIME. For now, just blacklist it, causing RandR to fall back to unsynchronized PRIME. This patch originally blacklisted UDL by name, but it was pointed out that there are other USB transport device drivers with similar limitations, so it was expanded to blacklist all USB transport devices. v1: N/A v2: N/A v3: Initial commit v4: Move check to driver.c for consistency/visibility v5: Refactor to accomodate earlier changes v6: Rebase onto ToT v7: Expand to blacklist all USB transport devices, not just UDL Signed-off-by: Alex Goins Reviewed-by: Hans de Goede Reviewed-by: Dave Airlie commit 500853086dd5fbfe6d2b3e30923fdc4d8c262cf0 Author: Alex Goins Date: Thu Jun 16 20:06:53 2016 -0700 modesetting: Suspend and resume flipping with DPMS DPMS would prevent page flip / vblank events from being raised, freezing the screen until PRIME flipping was reinitialized. To handle DPMS cleanly, suspend PRIME page flipping when DPMS mode is not on, and resume it when DPMS mode is on. v1: Initial commit v2: Moved flipping_active check from previous commit to here v3: Unchanged v4: Unchanged v5: Move flipping_active check to sink support commit v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit 80e64dae8af1eb3bb225b00fd800c6924883cf46 Author: Alex Goins Date: Thu Jun 16 20:06:52 2016 -0700 modesetting: Implement PRIME syncing as a sink Implements (Enable/Disable)SharedPixmapFlipping and SharedPixmapNotifyDamage, the sink functions for PRIME synchronization and double buffering. Allows modesetting driver to be used as a sink with PRIME synchronization. Changes dispatch_slave_dirty to flush damage from both scanout pixmaps. Changes drmmode_set_scanout_pixmap*() functions to drmmode_set_target_scanout_pixmap*() that take an additional parameter PixmapPtr *target. Then, treat *target as it did prime_pixmap. This allows me to use it to explicitly set both prime_pixmap and prime_pixmap_back individually. drmmode_set_scanout_pixmap() without the extra parameter remains to cover the single-buffered case, but only works if we aren't already double buffered. driver.c: Add plumbing for rr(Enable/Disable)SharedPixmapFlipping and SharedPixmapNotifyDamage. Change dispatch_dirty_crtc to dispatch_dirty_pixmap, which functions the same but flushes damage associated with a ppriv instead of the crtc, and chanage dispatch_slave_dirty to use it on both scanout pixmaps if applicable. drmmode_display.h: Add flip_seq field to msPixmapPrivRec to keep track of the event handler associated with a given pixmap, if any. Add wait_for_damage field to msPixmapPrivRec to keep track if we have requested a damage notification from the source. Add enable_flipping field to drmmode_crtc_private_rec to keep track if flipping is enabled or disabled. Add prime_pixmap_back to drmmode_crtc_private_rec to keep track of back buffer internally. Add declarations for drmmode_SetupPageFlipFence(), drmmode_EnableSharedPixmapFlipping(), drmmode_DisableSharedPixmapFlipping, drmmode_SharedPixmapFlip(), and drmmode_SharedPixmapPresentOnVBlank(). Move slave damage from crtc to ppriv. drmmode_display.c: Change drmmode_set_scanout_pixmap*() functions to drmmode_set_target_scanout_pixmap*() that take an additional parameter PixmapPtr *target for explicitly setting different scanout pixmaps. Add definitions for functions drmmode_SharedPixmapFlip(), drmmode_SharedPixmapPresentOnVBlank(), drmmode_SharedPixmapPresent(), drmmode_SharedPixmapVBlankEventHandler(), drmmode_SharedPixmapVBlankEventAbort(), drmmode_EnableSharedPixmapFlipping(), and drmmode_DisableSharedPixmapFlipping, drmmode_InitSharedPixmapFlipping(), and drmmode_FiniSharedPixmapFlipping, along with struct vblank_event_args. The control flow is as follows: pScrPriv->rrEnableSharedPixmapFlipping() makes its way to drmmode_EnableSharedPixmapFlipping(), which sets enable_flipping to TRUE and sets both scanout pixmaps prime_pixmap and prime_pixmap_back. When setting a mode, if prime_pixmap is defined, modesetting driver will call drmmode_InitSharedPixmapFlipping(), which if flipping is enabled will call drmmode_SharedPixmapPresent() on scanout_pixmap_back. drmmode_SharedPixmapPresent() requests that for the source to present on the given buffer using master->PresentSharedPixmap(). If it succeeds, it will then attempt to flip to that buffer using drmmode_SharedPixmapFlip(). Flipping shouldn't fail, but if it does, it will raise a warning and try drmmode_SharedPixmapPresent() again on the next vblank using drmmode_SharedPixmapPresentOnVBlank(). master->PresentSharedPixmap() could fail, in most cases because there is no outstanding damage on the mscreenpix tracked by the shared pixmap. In this case, drmmode_SharedPixmapPresent() will attempt to use master->RequestSharedPixmapNotifyDamage() to request for the source driver to call slave->SharedPixmapNotifyDamage() in response to damage on mscreenpix. This will ultimately call into drmmode_SharedPixmapPresentOnVBlank() to retry drmmode_SharedPixmapPresent() on the next vblank after accumulating damage. drmmode_SharedPixmapFlip() sets up page flip event handler by packing struct vblank_event_args with the necessary parameters, and registering drmmode_SharedPixmapVBlankEventHandler() and drmmode_SharedPixmapVBlankEventAbort() with the modesetting DRM event handler queue. Then, it uses the drmModePageFlip() to flip on the next vblank and raise an event. drmmode_SharedPixmapPresentOnVBlank() operates similarly to drmmode_SharedPixmapFlip(), but uses drmWaitVBlank() instead of drmModePageFlip() to raise the event without flipping. On the next vblank, DRM will raise an event that will ultimately be handled by drmmode_SharedPixmapVBlankEventHandler(). If we flipped, it will update prime_pixmap and prime_pixmap_back to reflect that frontTarget is now being displayed, and use drmmode_SharedPixmapPresent(backTarget) to start the process again on the now-hidden shared pixmap. If we didn't flip, it will just use drmmode_SharedPixmapPresent(frontTarget) to start the process again on the still-hidden shared pixmap. Note that presentation generally happens asynchronously, so with these changes alone tearing is reduced, but we can't always guarantee that the present will finish before the flip. These changes are meant to be paired with changes to the sink DRM driver that makes flips wait on fences attached to dmabuf backed buffers. The source driver is responsible for attaching the fences and signaling them when presentation is finished. Note that because presentation is requested in response to a vblank, PRIME sources will now conform to the sink's refresh rate. At teardown, pScrPriv->rrDisableSharedPixmapFlipping() will be called, making its way to drmmode_FiniSharedPixmapFlipping(). There, the event handlers for prime_pixmap and prime_pixmap_back are aborted, freeing the left over parameter structure. Then, prime_pixmap and prime_pixmap back are unset as scanout pixmaps. Register and tear down slave damage per-scanout pixmap instead of per-crtc. v1: Initial commit v2: Renamed PresentTrackedFlippingPixmap to PresentSharedPixmap Renamed flipSeq to flip_seq Warn if flip failed Use SharedPixmapNotifyDamage to retry on next vblank after damage v3: Refactor to accomodate moving (rr)StartFlippingPixmapTracking and (rr)(Enable/Disable)SharedPixmapFlipping to rrScrPrivRec from ScreenRec Do damage tracking on both scanout pixmaps v4: Tweaks to commit message v5: Revise for internal storage of prime pixmap ptrs Move disabling for reverse PRIME from source commit to here Use drmmode_set_target_scanout_pixmap*() to set scanout pixmaps internally to EnableSharedPixmapFlipping(). Don't support flipping if ms->drmmode.pageflip == FALSE. Move flipping_active check to this commit v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit 378c85a8848679eaa3c2881f3ba8b686e59df25e Author: Alex Goins Date: Thu Jun 16 20:06:51 2016 -0700 modesetting: Always load ms->drmmode.pageflip ms->drmmode.pageflip was only loaded from options if ms->drmmode.glamor was defined, otherwise it would always assume FALSE. PRIME Synchronization requires ms->drmmode.pageflip even if we aren't using glamor, so load it unconditionally. v1: N/A v2: N/A v3: N/A v4: N/A v5: Initial commit v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit b773a9c8126222e5fed2904d012fbf917a9f22fd Author: Alex Goins Date: Thu Jun 16 20:06:50 2016 -0700 modesetting: Always tear down scanout pixmap drmmode_set_scanout_pixmap_(cpu/gpu) would only do teardown if ppix == NULL. This meant that if there were consecutive calls to SetScanoutPixmap(ppix != NULL) without calls to SetScanoutPixmap(ppix == NULL) in between, earlier calls would be leaked. RRReplaceScanoutPixmap() does this today. Instead, when setting a scanout pixmap, always do teardown of the existing scanout pixmap before setting up the new one. Then, if there is no new one to set up, stop there. This maintains the previous behavior in all cases except those with multiple consecutive calls to SetScanoutPixmap(ppix != NULL). v1: N/A v2: N/A v3: N/A v4: N/A v5: Initial commit v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit f4c37eeee7953df1fe0e3196eda452acf0078e61 Author: Alex Goins Date: Thu Jun 16 20:06:49 2016 -0700 modesetting: Internal storage of scanout pixmaps modesetting relied on randr_crtc->scanout_pixmap being consistent with calls to SetScanoutPixmap, which is very fragile and makes a lot of assumptions about the caller's behavior. For example, RRReplaceScanoutPixmap(), when dropping off with !size_fits, will set randr_crtc->scanout_pixmap = NULL and then call SetScanoutPixmap. Without this patch, drmmode_set_scanout_pixmap_(cpu/gpu) will think that there is no scanout pixmap to tear down, because it's already been set to NULL. By keeping track of the scanout pixmap in its internal state, modesetting can avoid these types of bugs and reduce constraints on calling conventions. v1: N/A v2: N/A v3: N/A v4: N/A v5: Initial commit v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit 1bdbc7e764ed7bf7c1ae46287dec368aa7c7e80d Author: Alex Goins Date: Thu Jun 16 20:06:47 2016 -0700 randr/xf86: Add PRIME Synchronization / Double Buffer Changes PRIME to use double buffering and synchronization if all required driver functions are available. rrcrtc.c: Changes rrSetupPixmapSharing() to use double buffering and synchronization in the case that all required driver functions are available. Otherwise, falls back to unsynchronized single buffer. Changes RRCrtcDetachScanoutPixmap() to properly clean up in the case of double buffering. Moves StopPixmapTracking() from rrDestroySharedPixmap() to RRCrtcDetachScanoutPixmap(). Changes RRReplaceScanoutPixmap() to fail if we are using double buffering, as it would need a second ppix parameter to function with double buffering, and AFAICT no driver I've implemented double buffered source support in uses RRReplaceScanoutPixmap(). randrstr.h: Adds scanout_pixmap_back to struct _rrCrtc to facilitate PRIME double buffering. xf86Crtc.h: Adds current_scanout_back to _xf86Crtc to facilitate detection of changes to it in xf86RandR12CrtcSet(). xf86RandR12.c: Changes xf86RandR12CrtcSet() to detect changes in scanout_pixmap_back. Adds scanout_pixmap_back to struct _rrCrtc to facilitate PRIME double buffering. v1: Initial commit v2: Rename PresentTrackedFlippingPixmap to PresentSharedPixmap v3: Refactor to accomodate moving (rr)StartFlippingPixmapTracking and (rr)(Enable/Disable)SharedPixmapFlipping to rrScrPrivRec from ScreenRec Add fallback if flipping funcs fail v4: Detach scanout pixmap when destroying scanout_pixmap_back, to avoid dangling pointers in some drivers v5: Disable RRReplaceScanoutPixmap for double-buffered PRIME, it would need an ABI change with support for 2 pixmaps if it were to be supported, but AFAICT no driver that actually supports double-buffered PRIME uses it. Refactor to use rrEnableSharedPixmapFlipping() as a substitute for rrCrtcSetScanoutPixmap() in the flipping case. Remove extraneous pSlaveScrPriv from DetachScanoutPixmap() Remove extraneous protopix and pScrPriv from rrSetupPixmapSharing() v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit b601f96a5915a2c486b389483b291797e6fdf617 Author: Alex Goins Date: Thu Jun 16 20:06:46 2016 -0700 xf86: Add PRIME flipping functions to Screen Adds typedefs for (*RRStartFlippingPixmapTrackingProcPtr), (*RREnableSharedPixmapFlippingProcPtr), and (*RRDisableSharedPixmapFlippingProcPtr) in randrstr.h. Adds typedefs for (*PresentSharedPixmapProcPtr), (*SharedPixmapNotifyDamageProcPtr), (*RequestSharedPixmapNotifyDamageProcPtr), and (*StopFlippingPixmapTrackingProcPtr) in scrnintstr.h. Adds RR(Enable/Disable)SharedPixmapFlipping, and RRStartFlippingPixmapTracking to rrScrnPrivRec. Adds StopFlippingPixmapTracking, PresentSharedPixmap, SharedPixmapNotifyDamage, and RequestSharedPixmapNotifyDamage to ScreenRec. rrScrnPrivRec used for functions that use RandR-private data types, and ScreenRec used for the rest. RREnableSharedPixmapFlipping will allow the sink driver to setup for flipping between two shared pixmaps. RRDisableSharedPixmapFlipping will allow the sink driver to do teardown associated with flipping between two shared pixmaps. (RRStart/Stop)FlippingPixmapTracking are merely the double-buffered equivalents of (Start/Stop)PixmapTracking, allowing the source driver to do whatever setup and teardown necessary for presenting on the two shared pixmaps. PresentSharedPixmap is a function exposed by the source driver for the X server or sink driver to call to request a present on a given shared pixmap. This way, presents can be driven by the sink's vblank instead of a timer or similar mechanism. SharedPixmapNotifyDamage and RequestSharedPixmapNotifyDamage are OPTIONAL (even for double-buffered PRIME) functions exposed by the sink driver and the source driver, respectively. By calling master->RequestSharedPixmapNotifyDamage(ppix), the sink driver can request for the source driver to call slave->SharedPixmapNotifyDamage(ppix) in response to damage on the master screen pixmap tracked by ppix. v1: Initial commit v2: Rename PresentTrackedFlippingPixmap to PresentSharedPixmap Add SharedPixmapNotifyDamage / RequestSharedPixmapNotifyDamage v3: Add RRCrtcPtr as a parameter to StartFlippingPixmapTracking Move functions that use RandR-private data types to rrScrnPrivRec. v4: Unchanged v5: Add front and back parameters to RREnableSharedPixmapFlippingProcPtr v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit ef1578e736887aadf209172f48daa9eaec25b3db Author: Jon Turney Date: Sun Feb 28 00:53:24 2016 +0000 hw/xwin: Fix a typo in "Remove Shadow DirectDraw engine" Commit 7a22912e "Remove Shadow DirectDraw engine" contained a typo, changing the fullscreen && DirectDraw check in WM_DISPLAYCHANGE to fullscreen || DirectDraw This causes disruptive depth changes to be improperly handled Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 0a0c1bd93259c208184d6ad974ba55658191af0c Author: Jon Turney Date: Fri Feb 26 18:03:04 2016 +0000 hw/xwin: Fix a crash trying to reload window icons when not in multiwindow mode ReloadEnumWindowsProc() accesses window privates, which are only valid in multiwindow mode, but is called in all modes. Fix this potential crash by not doing this unless in multiwindow mode. Reproduction steps: 1/ XWin -mwextwm 2/ Run a client which creates an X window e.g. xterm 3/ Right click on notification area icon, and choose 'Reload .XWinrc' from the menu Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 91ae2571458c50d9f782190d9f80815b770aefac Author: Colin Harrison Date: Fri Feb 26 16:46:15 2016 +0000 hw/xwin: Fix a crash which occurs if focus returns to XWin after xkbcomp has failed If WM_FOCUS is received while the "core devices failed" fatal error (due to xkbcomp failing) is displayed, winRestoreModeKeyState() attempts to dereference a NULL InputInfo.keyboard->key pointer. Signed-off-by: Colin Harrison Reviewed-by: Jon Turney commit 4b123e0f61eb55e59d30bf442499cf3b3f621c3b Author: Jon Turney Date: Tue Aug 4 16:05:05 2015 +0100 hw/xwin: Make window maximizable if a maximium size larger than virtual desktop size is specified Firefox 38 has a WM_NORMAL_HINTS with a maximum size of 32767x32767. Don't remove the maximize control from the window frame if the maximum size is bigger than the virtual desktop size, as maximizing the window will not exceed the maximium size. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 504bf495f9b3adea1ba650469223511f81709714 Author: Jon Turney Date: Wed Jul 8 19:12:22 2015 +0100 hw/xwin: Detect invalid options in combination with -nodecoration Detect invalid options in combination with -nodecoration These are particularly problematic as -nodecoration implies a default of -nomultimonitors, for some reason, which will gives rendering issues with -multiwindow. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit e1b983b55e4cefcf976c8f92d608af8216a56927 Author: Jon Turney Date: Tue Nov 11 11:46:25 2014 +0000 hw/xwin: Default to -noresize when -fullscreen is used Currently, just using -fullscreen fails in winValidateArgs(), as the default -resize=randr is incompatible with -fullscreen. Set the default resize mode to -noresize if -fullscreen is used. Also, rename enum value notAllowed -> resizeNotAllowed for clarity. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 42f7cd5d92f2046e1b5c264b3d76c3afda624a55 Author: Jon Turney Date: Sat Oct 11 14:49:16 2014 +0100 hw/xwin: Tell LogInit() to backup previous logfile as .old Future work: Do we really need to call LogInit() in so many different places? Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 197419838273eddbd0bd34890771799f4bebbc07 Author: Jon Turney Date: Fri Sep 26 13:18:33 2014 +0100 hw/xwin: Downgrade some uninformative, always-emitted log output to debug Downgrade from error to debug some uninformative, always-emitted log output about thread synchronization during initialization Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 17c8bf348eea4f12ce7cb4ca7db0d0576e28c982 Author: Jon Turney Date: Tue Apr 28 16:04:40 2015 +0100 hw/xwin: Check for just the hostname in window title When -hostintitle is enabled, only use the hostname, not a FQDN from WM_CLIENT_MACHINE, when checking if the window title already contains it Also restructure GetWindowName() to fix a potential memory leak. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit c05c4360eea245b3ef5f3a355b95dcd63244ef70 Author: Jon Turney Date: Mon Sep 22 14:40:41 2014 +0100 hw/xwin: Use _NET_WM_NAME for window titles in multiwindow mode Use _NET_WM_NAME in preference to WM_NAME for window title Update window title when _NET_WM_NAME property changes We should always have been doing this, but some qt5 examples only set _NET_WM_NAME, so now it's become more important... Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 866d8299abc4315d4836292aeac4abe0b686fc10 Author: Jon Turney Date: Thu Mar 13 17:53:44 2014 +0000 hw/xwin: Remove decorations from _NET_WM_WINDOW_TYPE_SPLASH type windows In multiwindow mode, remove decorations from _NET_WM_WINDOW_TYPE_SPLASH type windows. Some programs use _NET_WM_WINDOW_TYPE_SPLASH_SCREEN in error, so also accept that as equivalent. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 356b9129067dd0e1dc62e893d47a1e9b033885bd Author: Jon Turney Date: Thu Apr 7 17:40:56 2016 +0100 hw/xwin: Use Bool type in winShowWindowOnTaskbar() prototype Use the Bool type from X11/Xdefs.h for winShowWindowOnTaskbar(). This is the boolean type we should be using inside the X server, rather than BOOL, which evaluates to either the Win32 API type, or the Xlib API type, depending on the context... Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 7397a2191f333a8632109873cc60d13ca4d550b0 Author: Olivier Fourdan Date: Tue Jun 21 13:54:35 2016 +0200 xwayland-input: Fake crossing to rootwin This partially reverts commit c1565f3. When the pointer moves from an X11 window to a Wayland native window, no LeaveNotify event is emitted which can lead to various unexpected behaviors like tooltips remaining visible after the pointer has left the window. Yet the pointer_handle_leave() is called and so is the DIX CheckMotion() but since the pointer enters a Wayland native window with no other Xwayland window matching, DoEnterLeaveEvents() does not get invoked and therefore no LeaveNotify event is sent to the X11 client at the time the pointer leaves the window for a Wayland native surface. Restore the XYToWindow() handler in xwayland-input that was previously removed with commit c1565f3 and use that handler to pretend that the pointer entered the root window in this case so that the LeaveNotify event is emitted. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96437 Signed-off-by: Olivier Fourdan Acked-by: Daniel Stone Acked-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 111a045dcf0912dc5b178c18acda479b3972876b Author: Adam Jackson Date: Tue Jun 21 11:45:17 2016 -0400 Revert "XDMCP: For IPv6 add link local addresses to the end of the list" This reverts commit fdd448cd39b4ca84a28d73fc628911070437b703. commit fdd448cd39b4ca84a28d73fc628911070437b703 Author: Reinhard Max Date: Thu Apr 28 15:21:15 2016 +0200 XDMCP: For IPv6 add link local addresses to the end of the list For link local addresses the XDMCP server would need to either know the interface thru a scope identifier or try all available interfaces. If they don't this address will fail in which case the XDMCP server could still try the other addresses passed - however some only try the first address and then give up. Even if this seems to be the wrong place to fix this it seems to be easier than fixing all display servers. [ajax: Cleaned up commit message] Reviewed-by: Adam Jackson commit ce82ae1964b2115a780786676c614546297a79c9 Author: Adam Jackson Date: Tue Feb 2 14:10:49 2016 -0500 res: Account for GLXPixmap references too GLX_EXT_tetxure_from_pixmap operates on a GLXPixmap, which takes a reference on the backing pixmap; that GLXPixmap might be long-lived, so we should account for it in ResQueryClientPixmapBytes. Acked-by: Michel Dänzer Signed-off-by: Adam Jackson commit 5d6ad0d3a7611c4dff2d79b6af9eb5c0885656ef Author: Adam Jackson Date: Tue Feb 2 13:49:37 2016 -0500 res: Fix accounting of redirected window pixmaps for Composite The previous change removed the special case that matched resources of CompositeClientWindowType and walked back from that to the window pixmap. That was intentional, since that logic was broken anyway. CCWTs don't map 1:1 to references on the backing pixmap; a window redirected by multiple clients (say, by the server since it's on the synthetic visual, and then manually by a compositor) would have a window pixmap refcount of 1, but would have those bytes accounted twice. The right thing is to have Composite wrap window accounting, and add the pixmap bytes once and only once for the redirection reference. Note that the view from the client can still be non-intuitive in the face of Composite. xcompmgr, for example, holds _two_ references to each window pixmap (one each from CompositeNameWindowPixmap and RenderCreatePicture), so a synthetic-visual window will have its bytes split 2/3 to xcompmgr and 1/3 to the server-client. Nothing to be done about that, and at least this way we're not over-accounting. Acked-by: Michel Dänzer Signed-off-by: Adam Jackson commit 4f8a72034c4a2654bfc16d929e09a69d1cc138ef Author: Adam Jackson Date: Tue Feb 2 13:46:42 2016 -0500 res: Simplify QueryClientPixmapBytes I suspect this code predates the common resource hooks for computing sizes. It's ugly in any case since the Resource extension shouldn't need to know which extensions can take a reference on pixmaps. Instead, let's just walk every resource for the client and sum up all the pixmap bytes that way. This might be slightly slower since we're calling the size func once for every resource. On the other hand, it might be slightly faster since we only walk the resource table once instead of 3-5 times. Probably a wash, and not really a performance path in any case. Acked-by: Michel Dänzer Signed-off-by: Adam Jackson commit 263c5333a54107efac702a54d7e6329ae25ff4e0 Author: Michel Dänzer Date: Fri Dec 25 18:32:46 2015 +0900 xfree86/modes: Simplify in_range logic in xf86_crtc_set_cursor_position Consolidate to a single if/else statement and eliminate the redundant local variable in_range and assignments to x/y. Reviewed-by: Adam Jackson commit a991b1ec30344c16d318d2c0640f9e5d380193e0 Author: Michel Dänzer Date: Mon Feb 1 16:07:22 2016 +0900 xfree86/modes: Disambiguate driverIsPerformingTransform The driver can now specify exactly which aspects of the transform it wants to handle via XF86DriverTransform* flags. Since the driver can now choose whether it wants to receive transformed or untransformed cursor coordinates, xf86CrtcTransformCursorPos no longer needs to be available to drivers, so make it static. Reviewed-by: Adam Jackson commit aad96f85005f8eab27df62049d619092865a9b16 Author: Michel Dänzer Date: Fri Dec 25 18:28:47 2015 +0900 xfree86/modes: Fix HW cursor clipping for driverIsPerformingTransform (v2) Even if the driver is handling the transform, we still need to transform the cursor position for clipping, otherwise we may hide the HW cursor when the cursor is actually inside the area covered by the CRTC. v2: Use crtc_x/y local variables for clarity Reviewed-by: Adam Jackson commit 828887b6f4a997b6468da565a88b6fe9afcda191 Author: Keith Packard Date: Tue Jun 14 13:45:27 2016 -0700 ephyr: Process only the last expose or configure available from the server Delay expose or configure processing until the event queue is empty so that we don't end up processing a long series of events one at a time. Expose events already have a check waiting for the last in a series, this further improves that by discarding multiple series of events. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit c17a41794507d6d04c850e9e1bc04fc60c31de18 Author: Keith Packard Date: Sat Jun 4 19:55:07 2016 -0700 ephyr: Process queued X events before blocking [v2] If we end up reading all pending X events in the course of other server execution, then our notify FD callback won't get invoked and we won't process them. Fix this by noting that there are queued events in the block handler, setting the poll timeout to zero and queuing a work proc to clear the event queue. v2: use a work proc to clear the event queue rather than doing it in the block handler directly. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit f3248eba6e2d0c099025f8e9a4874b431246eac7 Author: Keith Packard Date: Tue Jun 14 13:19:49 2016 -0700 ephyr: Handle window resize when using glamor Under glamor, we need to re-create the screen pixmap at the new size so that we can ask glamor for the associated texture. Fortunately, we can simply use ephyr_glamor_create_screen_resources to create the new pixmap. Because this is being done after the server has started, we need to walk the window heirarchy and reset any windows pointing at the old pixmap. I could easily be convinced that this TraverseTree should be moved to miSetScreenPixmap. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 235d21670dcff224807ff719c7fa86212058ec46 Author: Keith Packard Date: Tue Jun 14 13:16:03 2016 -0700 ephyr: Don't configure window while responding to configure events This leads to and endless sequence of window resizes. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit fb1edccf3c90c626f120b3c399657f24d3f7901e Author: Keith Packard Date: Thu May 26 12:11:46 2016 -0700 dix: Call screen block/wakeup handlers closest to blocking [v3] The screen block and wakeup handlers are the only ones which provide a well known ordering between the wrapping layers; placing these as close as possible to the server blocking provides a way for the driver to control the flow of execution correctly. Switch the shadow code to run in the screen block handler so that it now occurrs just before the server goes to sleep. Switch glamor to call down to the driver after it has executed its own block handler piece, in case the driver needs to perform additional flushing work after glamor has called glFlush. These changes ensure that the following modules update the screen in the correct order: animated cursors (uses RegisterBlockAndWakeupHandlers dynamically) composite (dynamic wrapping) misprite (dynamic wrapping) shadow (static wrapping) glamor (static wrapping) driver (static wrapping) It looks like there's still a bit of confusion between composite and misprite; if composite updates after misprite, then it's possible you'd exit the block handler chain with the cursor left hidden. To fix that, misprite should be wrapping during ScreenInit time and not unwrapping. And composite might as well join in that fun, just to make things consistent. [v2] Unwrap BlockHandler in shadowCloseScreen (ajax) [v3] ephyr: Use screen block handler for flushing changes ephyr needs to make sure it calls glXSwapBuffers after glamor finishes its rendering. As the screen block handler is now called last, we have to use that instead of a registered block/wakeup handler to make sure the GL rendering is done before we copy it to the front buffer. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit a134d1e7eada0ac90fb622f45833c87b72c9aa06 Author: Guilherme Quentel Melo Date: Tue May 10 00:29:58 2016 +0000 glx: avoid memory leak when using indirect rendering When multiple processes are using GL with indirect rendering a race condition can make drawables refcount never drop to zero. This situation could happen when there are many X clients using indirect GLX: 1 - client1: calls glXMakeCurrent 2 - client2: calls glXMakeCurrent This is the first context switch for this client. So old_context_tag=0 3 - client1: calls glXRender For the client, its context is already current. For the server side lastGLContext points to client2's context. Reviewed-by: Adam Jackson Signed-off-by: Guilherme Quentel Melo commit 266cf39a8f108e2f365a9772f4ee4d9fca88eb36 Merge: fa7b70a9b 848089e0d Author: Adam Jackson Date: Mon Jun 20 11:21:40 2016 -0400 Merge remote-tracking branch 'hans/for-master' commit fa7b70a9b895789ec57562bbba0bc052fc91d134 Author: Keith Packard Date: Tue Jun 14 17:36:16 2016 -0700 kdrive: Only enable threaded input if we have input devices When there aren't any devices, the input thread is going to be pretty lonely, so don't bother to even start it. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 6f2a5b8cdf7b1e913a1e0581e65195dd10f04ca3 Author: Jason Gerecke Date: Fri Jun 17 08:44:41 2016 -0700 xwayland: Expose all NBUTTONS buttons on the pointer The call to 'InitButtonClassDeviceStruct' which initializes the pointer buttons only results in the first three buttons being created due to a hardcoded '3'. In order to expose all the buttons defined in the btn_labels array, we subtitute 'NBUTTONS' in its place. Signed-off-by: Jason Gerecke Reviewed-by: Olivier Fourdan Signed-off-by: Peter Hutterer commit 72df6e2a3a5020696902b70fe940934ef0a681c4 Author: Jason Gerecke Date: Fri Jun 17 08:44:40 2016 -0700 xwayland: Use correct labels when initializing pointer valuators Signed-off-by: Jason Gerecke Reviewed-by: Olivier Fourdan Signed-off-by: Peter Hutterer commit dab5b3922c50f73712a8ea0cb9742c4bc7d7ab1d Author: Jason Gerecke Date: Fri Jun 17 08:44:39 2016 -0700 xwayland: Fix whitespace errors Substitute a few errant tab characters with eight spaces to conform to the prevailing style. Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 848089e0dde38f043c85332785520946103e77c1 Author: Lyude Paul Date: Mon Jun 13 15:31:02 2016 -0400 modesetting: Clear drmmode->fb_id before unflipping [fix copied from 40191d82370e in xf86-video-ati] Without this, we end up setting rotated CRTCs back to their previous framebuffer right after we perform a rotation. Reproducer: - Have two monitors connected at the same resolution - Rotate one monitor from normal straight to inverted - Watch as the monitor you didn't rotate either freezes or shows intense flickering Signed-off-by: Lyude Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 4313122dea0df9affc280ee698e929489061ccc6 Author: Hans de Goede Date: Wed Jun 1 15:14:32 2016 +0200 modesetting: Only add main fb if necessary If we're doing reverse-prime; or doing rotation the main fb is not used, and there is no reason to add it in this case. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit 877453212166fdc912e0d687cdecee11aba563b5 Author: Hans de Goede Date: Wed Jun 1 15:11:05 2016 +0200 modesetting: Remove unnecessary fb addition from drmmode_xf86crtc_resize drmmode_set_mode_major() is the only user of drmmode->fb_id and will create it if necessary. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit 210d83ad492f0e91889472eaae549106d9b4ebf5 Author: Hans de Goede Date: Wed Jun 1 15:07:22 2016 +0200 modesetting: Set ppix->fb_id to 0 after removing the fb This ensures the fb gets re-added when a shared pixmap is re-used for a second drmmode_set_scanout_pixmap_cpu call. Note currently the xserver never re-uses a shared pixmap in this way, so this is mostly a sanity fix. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit b8ef71fb07a8ba9587aeaca942b4de20b59266ca Author: Hans de Goede Date: Wed Jun 1 14:59:38 2016 +0200 modesetting: Properly cleanup fb for reverse-prime-offload drmmode_set_scanout_pixmap_gpu(pix) adds drmmod->fb_id through a call to drmmode_xf86crtc_resize(), but on a subsequent drmmode_set_scanout_pixmap_gpu(NULL) it would not remove the fb. This keeps the crtc marked as busy, which causes the dgpu to not being able to runtime suspend, after an output attached to the dgpu has been used once. Which causes burning through an additional 10W of power and the laptop to run quite hot. This commit adds the missing remove fb call, allowing the dgpu to runtime suspend after an external monitor has been plugged into the laptop. Note this also makes drmmode_set_scanout_pixmap_gpu(NULL) match the behavior of drmmode_set_scanout_pixmap_cpu(NULL) which was already removing the fb. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit 15595d29c2c3992f260a3314f26fa691f1e5cec8 Author: Nikhil Mahale Date: Thu May 26 21:50:16 2016 +0530 randr: Adjust master's last set time with slaves In prime configurations master's last set time may not be latest and greatest, adjust it with slaves last set time, pick up greatest one. Otherwise xserver may end with events which has lastSetTime < lastConfigTime even if that's not the case and confuse xrandr client. [hdegoede: rebase on "xrandrprovider: Do not use separate lists for unbound / source / offload slaves"] Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 5c7af02b103790ac1fb6a71822788892c70290b6 Author: Hans de Goede Date: Fri May 13 15:58:10 2016 +0200 xrandrprovider: Do not use separate lists for unbound / source / offload slaves A single provider can be both a offload and source slave at the same time, the use of seperate lists breaks in this case e.g. : xrandr --listproviders Providers: number : 2 Provider 0: id: 0x7b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 0 name:modesetting Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 0 name:modesetting xrandr --setprovideroutputsource 1 0x7b xrandr --listproviders Providers: number : 2 Provider 0: id: 0x7b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 1 name:modesetting Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 1 name:modesetting xrandr --setprovideroffloadsink 1 0x7b xrandr --listproviders Providers: number : 3 Provider 0: id: 0x7b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 2 name:modesetting Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 2 name:modesetting Provider 2: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 2 name:modesetting Not good. The problem is that the provider with id 0x46 now is on both the output_slave_list and the offload_slave_list of the master screen. This commit fixes this by unifying all 3 lists into a single slaves list. Note that this does change the struct _Screen definition, so this is an ABI break. I do not expect any of the drivers to actually use the removed / changed fields so a recompile should suffice. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit bab0f450a719a11799491043b82c2f293fed27fe Author: Chris Wilson Date: Sat Feb 14 09:58:44 2015 +0000 present: Fix presentation of flips out of order The flip queue currently only holds events submitted to the driver for flipping, awaiting the completion notifier. It is short. We therefore can speed up interrupt processing by keeping the small number of events ready to be flipped on the end of the flip queue. By appending the events to the flip_queue in the order that they become ready, we also resolve one issue causing Present to display frames out of order. Signed-off-by: Chris Wilson Reviewed-and-tested-by: Mario Kleiner Signed-off-by: Hans de Goede commit fbe660b7652b945bdd8e3eb0780179d83cc7de96 Author: Chris Wilson Date: Sat Feb 14 09:58:43 2015 +0000 present: Improve scaling of vblank handler With large numbers of queued vblank, the list iteration on every interupt dominates processing time. If we reorder the list to be in ascending event order, then not only is also likely to be in order for notification queries (i.e. the notification will be near the start of the list), we can also stop iterating when past the target event_id. Signed-off-by: Chris Wilson Reviewed-and-tested-by: Mario Kleiner Signed-off-by: Hans de Goede commit c6511d0142040654140bdedd6f03d43af0abba21 Author: Maarten Lankhorst Date: Wed Oct 2 15:47:54 2013 +0200 exa: only draw valid trapezoids Fixes freedesktop.org bug https://bugs.freedesktop.org/show_bug.cgi?id=67484 If t->bottom is close to MIN_INT, removing top can wraparound, so do the check properly. A similar fix should also be applied to pixman. Signed-off-by: Maarten Lankhorst Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 2d6230e77348e550c90e00c007b113ce38c81d12 Author: Keith Packard Date: Tue Jun 14 17:09:07 2016 -0700 glamor: Use DestroyPixmap instead of FreePicture for glyph atlas pixmap Nice of FreePicture to take a void * instead of a PicturPtr so that this error wasn't caught by the compiler. Noticed when resetting the X server left a dangling pixmap around. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit edd24aa50b17849b904a3ac5429e333bac9bac9c Author: Olivier Fourdan Date: Mon Jun 6 09:22:28 2016 +0200 wayland: clear resource for pixmap on unrealize On cursor unrealize, the associated pixmap is destroyed, make sure we clear the pointer from the private resource and check for the value being non-null when setting or destroying the cursor. Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96246 commit 941aeb3b92e644923bd112eef8023f033a140ee6 Author: Olivier Fourdan Date: Fri May 13 08:58:58 2016 +0200 randr: Do not update ConnectionInfo if NULL RRScreenSizeNotify() will update the connection information block, but if this occurs during initialization before ConnectionInfo is even initialized, this will lead to a crash. Simply check for ConnectionInfo prior to update it to avoid the crash. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95337 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 6a6bbc3b756706bdade01434f1ee8d8cbe7dd854 Author: Olivier Fourdan Date: Thu May 12 14:51:51 2016 +0200 xwayland: Restore wl_display_roundtrip() in InitInput This partially revert commit 984be78 The rountrip in Xwayland's InitInput() is unlikely the culprit for the crash reported in bug 95337, even though it's triggered from InitInput(). Startup goes like this: xwl_screen_init() xwl_output_create() wl_display_roundtrip() InitInput() wl_display_roundtrip() ConnectionInfo initialized What happens in bug 95337 is that some output data is already available when we reach InitInput()'s wl_display_roundtrip() and therefore we end up trying to update the ConnectionInfo's data from RR routines before ConnectionInfo is actually initialized. Removing the wl_display_roundtrip() from InitInput() will not fix the issue (although it would make it less lileky to happen), because xwl_screen_init() also does a wl_display_roundtrip() after creating the output, so the race that led to bug 95337 remains. However, re-setting the xwl_screen->expecting_event to 0 again in InitInput() still doesn't seem right. so this part is not restored (thus a partial revert). Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95337 commit 6cb34816afa95d9214199c363f9b4bb5ecbae77b Author: Adam Jackson Date: Fri Apr 29 14:22:52 2016 -0400 xace: Remove the audit hooks and tune dispatch There are no in-tree consumers of the audit hooks, and they are in any case redundant with the dtrace dispatch hooks. Neither is there any in-tree user of the core request dispatch hook. The extension hook is only used for non-default security cases, but in the absence of LTO we always have to take the function call into XaceHookDispatch to find out that there's no callback registered. Cc: Eamon Walsh Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit da9fec4eddd554b4b709ba58b4436aef5a76cd51 Author: Eric Biggers Date: Thu Jun 9 19:45:15 2016 -0500 Allow ConstantDeceleration < 1.0 As documented in xorg.conf(5), a value of ConstantDeceleration between 0 and 1 will speed up the pointer. However, values less than 1 actually had no effect. Fix this. Note that this bug only affected "ConstantDeceleration" as configured through xorg.conf, not "Device Accel Constant Deceleration" as configured through xinput. The property handler AccelSetDecelProperty() also did not need to be changed, as it did not limit the values of the property. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=92766 Signed-off-by: Eric Biggers Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7cf80b9714864c3c4eb9898ff1b7d657ecd16df7 Author: Adam Jackson Date: Wed Jun 1 14:27:23 2016 -0400 xfree86: Don't swallow ±iglx command line flag We want to notice that it's set, but still pass it through to dix. Return 0 to indicate this. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit 4653793de3860f2d83a39919af348527bc719794 Author: Olivier Fourdan Date: Wed Jun 8 17:10:11 2016 +0200 wayland: Remove unused field in xwl_screen Can't find any reference of pointer_limbo_window in the code, let's remove it. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit c69bd15e00aea2610834d05f63777f9bf20eca34 Author: Peter Hutterer Date: Wed Jun 1 14:38:54 2016 +1000 Allow compile-time selection of a fallback input driver A new --with-fallback-input-driver=foo option allows selecting a fallback driver for the server if the driver configured for the device is not found. Note that this only applies when the device has a driver assigned and that module fails to load, devices without a driver are ignored as usual. This avoids the situation where a configuration assigns e.g. the synaptics driver but that driver is not available on the system, resulting in a dead device. A fallback driver can at least provides some functionality. This becomes more important as we move towards making other driver true leaf nodes that can be installed/uninstalled as requested. Specifically, wacom and synaptics, a config that assigns either driver should be viable even when the driver itself is not (yet) installed on the system. It is up to the distributions to make sure that the fallback driver is always installed. The fallback driver can be disabled with --without-fallback-input-driver and is disabled by default on non-Linux systems because we don't have generic drivers on those platforms. Default driver on Linux is libinput, evdev is the only other serious candidate here. Sample log output: [ 3274.421] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event4) [ 3274.421] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad weird driver" [ 3274.421] (II) LoadModule: "banana" [ 3274.422] (WW) Warning, couldn't open module banana [ 3274.422] (II) UnloadModule: "banana" [ 3274.422] (II) Unloading banana [ 3274.422] (EE) Failed to load module "banana" (module does not exist, 0) [ 3274.422] (EE) No input driver matching `banana' [ 3274.422] (II) Falling back to input driver `libinput' .. server proceeds to assign libinput, init the device, world peace and rainbows everywhere, truly what a sight. Shame about the banana though. Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit a6b6e8ba026acedef6336b17adf06aebddd5f22f Author: Dave Airlie Date: Fri May 6 10:46:14 2016 +1000 prime: clean up slave bo properly. (v3) This is an ABI break, in that we now pass NULL to a function that hasn't accepted it before. Alex Goins had a different patch for this but it wasn't symmetrical, it freed something in a very different place than it allocated it, this attempts to retain symmetry in the releasing of the backing bo. v2: use a new toplevel API, though it still passes NULL to something that wasn't expecting it. v3: pass -1 instead of 0. Signed-off-by: Dave Airlie Tested-by: Hans de Goede Reviewed-by: Hans de Goede Reviewed-by: Alex Goins commit aa5390aa83be55f887e3b4f78681b4f3d3386eb5 Author: Adam Jackson Date: Mon May 9 14:18:32 2016 -0400 xfree86: Remove redundant parse of AIGLX server flag Not visible in the patch, but the same stanza is repeated below inside the #ifdef GLXEXT. There's no reason to bother with checking it if we built without GLXEXT so remove the unconditional one. Reviewed-by: Alan Coopersmith Signed-off-by: Adam Jackson commit 166d4c817897f5aa197f639bf06b5b3e04994496 Author: Michel Dänzer Date: Fri Jun 3 10:25:20 2016 +0900 xwayland: Call eglBindAPI after eglInitialize Current Mesa Git master checks that the EGL display actually supports the API passed to eglBindAPI, which can only succeed after eglInitialize. Signed-off-by: Michel Dänzer Reviewed-by: Pekka Paalanen commit d798b8318adf298bc23166e74f31e49805f0d881 Author: Michel Dänzer Date: Fri Jun 3 10:25:19 2016 +0900 glamor: Call eglBindAPI after eglInitialize Current Mesa Git master checks that the EGL display actually supports the API passed to eglBindAPI, which can only succeed after eglInitialize. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96344 Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit 5bcdd1cc753d8e60c249eeacba695653af1a39d8 Author: Adam Jackson Date: Tue Jun 7 15:52:15 2016 -0400 dix: Update some comments to reflect the new non-SIGIO input model Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 48a9b29b0a09b865492d60e8a7cd2a94864fbb3f Author: Adam Jackson Date: Tue Jun 7 15:52:14 2016 -0400 xfree86: Undocument UseSIGIO in xorg.conf The doc text is wrong at this point, input processing isn't going to vary based on this, so we shouldn't say it does. The only thing this _does_ get used for is DRI1 SwapBuffers (on everything but savage), and if you disable it you're not going to get DRI1 at all, so we really shouldn't even mention it. Still, leave the option wired up to the parser so we don't break any DRI1-driver-using setup relying on it being disabled, and so we don't complain about unused options elsewhere. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 2725dd024de33e96555cbf6ff28184a64d515c3c Author: Adam Jackson Date: Tue Jun 7 15:52:13 2016 -0400 dri1: Hide the SIGIO details from drivers Not being used, and not likely to be useful. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 95ce2bccdcdc88355262674a636c342c946914da Author: Adam Jackson Date: Tue Jun 7 15:52:12 2016 -0400 dmx: Remove SIGIO input support here too This code was broken anyway. Note that DEVICE_OFF would make dmx think _no_ devices were using SIGIO anymore, which means 'xinput disable' on your mouse would probably do weird things to your keyboard too. Rather than try to repair that and keep SIGIO working on this one niche DDX, just rip it out and use the thread model like everyone else. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 6178b1c91cfc9e860914acc6f0be2f2d2e07a124 Author: Adam Jackson Date: Tue Jun 7 15:52:11 2016 -0400 dix: Use OsSignal() not signal() As the man page for the latter states: The effects of signal() in a multithreaded process are unspecified. We already have an interface to call sigaction() instead, use it. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 8174daa6bd3f0c792425a5ebef63a6a9ce7d00a4 Author: Keith Packard Date: Sun Jun 5 12:32:19 2016 -0700 os: Do timers under input lock, not blocked signals Timer processing can happen on either the main thread or the input thread. As a result, it must be done under the input lock. Signals are unrelated to timers now that SIGIO isn't used for input processing, so stop blocking signals while processing timers. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 88e981e7088198fabea6c322c58f371d91578b6a Author: Olivier Fourdan Date: Wed Mar 9 10:33:50 2016 +0100 xwayland: sync event queue to check compositor reply Read and dispatch pending Wayland events to make sure we do not miss a possible reply from the compositor prior to discard a key repeat. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit 26ad25a0ed1d99f3cacb711793c830cb5249580e Author: Olivier Fourdan Date: Wed Mar 9 11:17:27 2016 +0100 xwayland: refactor Wayland event handling To be able to reuse some code. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit 239705a6feefaddf90be9541a054ebd8c8c10d81 Author: Olivier Fourdan Date: Wed Mar 9 10:31:58 2016 +0100 xwayland: add a server sync before repeating keys Key repeat is handled by the X server, but input events need to be processed and forwarded by the Wayland compositor first. Make sure the Wayland compositor is actually processing events, to avoid repeating keys in Xwayland while the Wayland compositor cannot deal with input events for whatever reason, thus not dispatching key release events, leading to repeated keys while the user has already released the key. Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=762618 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit fda5675f9d257d583ea0683adf863c5e1e51e30c Author: Olivier Fourdan Date: Wed Mar 9 10:31:13 2016 +0100 xkb: add hook to allow/deny AccessX key repeat The xserver generates the key repeat by itself. But when used with another server processing inputs first (e.g. a Wayland compositor), the other server may be busy dealing with some other things and not queue up key release events in time. Add a vfunc in XkbSrvInfo to possibly add a check before re-emitting a keypress event in the AccessX timer handler, so that the key repeat has a chance to be denied if the server processing the input is not ready. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit 3735ab965a4642273d070840bda4e827991e5219 Merge: 7c77c42fe 43dbc556f Author: Keith Packard Date: Thu Jun 2 07:47:16 2016 -0700 Merge remote-tracking branch 'daenzer/for-master' commit 7c77c42fe87316e5c68611f03b0bda96656c4a4c Author: Keith Packard Date: Fri May 27 17:36:57 2016 -0700 dix: Don't update current time in the middle of input event processing In patch 137ac094e7ab8c871f3b36e40ad826ac797f0e26, Adam moved an expensive call to UpdateCurrentTime out of the main dispatch loop. That's a good change as the original fix from Chase was a bit expensive. However, it breaks grab processing and so a couple of the calls to UpdateCurrenTime need to be removed. Input event processing can generate a stream of events; a button press that activates a grab will send a press followed by a sequence of enter/leave events. All of these should have the same time stamp on the wire as they occur at the 'same' time. More importantly, the grab time recorded in the device is pulled from currentTime after all of the events are delivered, so if currentTime doesn't match the time in the device event, then future grab modifications will fail as the time marked in the device will be 'later' than the grab time known to the client (which is defined as the timestamp from the activating input event). A bit of history here -- it used to be that currentTime was driven *entirely* by input events; those timestamps didn't even have to be related to the system time in any way. Then we started doing ICCCM stuff and people got confused when PropertyNotify events would have the same timestamp even when delivered minutes apart because no input events were delivered. We added code in the server to go update the time, but only if no input events were pending (so that the clock "wouldn't" go backwards). The only places where this is necessary is in request processing which may generate an event with a timestamp, and there only at the very top of the request processing code so that the whole request would be processed at the 'same time', just like events. cc: Chase Douglas cc: Peter Hutterer cc: Adam Jackson Signed-off-by: Keith Packard Tested-by: Michel Dänzer Acked-by: Peter Hutterer commit ce6546337487c052b5dd3c04d3d8d4b09d691c3d Author: Keith Packard Date: Tue May 31 09:38:17 2016 -0700 os: Initialize NotifyFds earlier in startup If the server calls AbortServer during the first-time initialization (which can happen if you start the server on an already using DISPLAY), then the dbus code will shut down and call the notify fd interface. If the notify fd list hasn't been initialized, the server will crash. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit f0756793e4c30278164d7a5cc483ce6a311c58dc Author: Keith Packard Date: Tue May 31 09:14:17 2016 -0700 os: Lock input while messing with input device list The list of input devices may be changed by hotplugging while the server is active, and those changes may come from either the main thread or the input thread. That means the list of input devices needs to be protected by a mutex. This prevents input drivers from receiving I/O ready callbacks after removing a device. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit a779fda224bee0c4d27636503367e55ae93b33c2 Author: Jonas Ådahl Date: Tue May 24 18:46:42 2016 +0800 xwayland: Use the CLOCK_MONOTONIC clock By default the X server will try CLOCK_MONOTONIC_COARSE before CLOCK_MONOTONIC, while A Wayland compositor may only support getting their timestamps from the CLOCK_MONOTONIC clock. This causes various issues since it may happen that a timestamp from CLOCK_MONOTONIC retrieved before a sending an X request will still be "later" than the timestamp the X server than gets after receiving the request, due to the fact that CLOCK_MONOTONIC_COARSE has a lower resolution. To avoid these issues, make Xwayland always use CLOCK_MONOTONIC, so that it becomes possible for Wayland compositor only supporting CLOCK_MONOTONIC and X server to use the same clock. Signed-off-by: Jonas Ådahl Acked-by: Daniel Stone Tested-by: Olivier Fourdan Signed-off-by: Peter Hutterer commit 43dbc556f3a4d743b9121d6cfc21961be4a9da56 Author: Michel Dänzer Date: Thu Dec 24 16:43:44 2015 +0900 xfree86/modes: Remove xf86_reload_cursors v2 No longer needed now that xf86CursorResetCursor is getting called for each CRTC configuration change. v2: Keep xf86_reload_cursors as a deprecated empty inline function until all drivers stop calling it. (Adam Jackson) Reviewed-by: Adam Jackson commit e156c0ccb530897d3a428255bd5585f7ea7b9b41 Author: Michel Dänzer Date: Wed Mar 30 18:23:04 2016 +0900 os: Use strtok instead of xstrtokenize in ComputeLocalClient Fixes leaking the memory pointed to by the members of the array returned by xstrtokenize. Reviewed-by: Adam Jackson commit 5ff75da317539e87cca429185d710d0eeb9d9222 Author: Michel Dänzer Date: Thu May 26 19:01:59 2016 +0900 glamor: Cannot use copies when accessing outside of composite source Commit b64108fa ("glamor: Check for composite operations which are equivalent to copies") failed to copy conditions from exaComposite which ensure that the composite operation doesn't access outside of the source picture. This fixes rendercheck regressions from the commit above. Reviewed-by: Keith Packard commit 84e0d5d63c393fc36e91433cd7897e776e82528c Author: Michel Dänzer Date: Fri May 27 16:58:19 2016 +0900 xfree86/modes: Assign xf86_config->cursor in xf86_load_cursor_image v2 Fixes a crash on startup in the radeon driver's drmmode_show_cursor() due to xf86_config->cursor == NULL, because no CRTC was enabled yet, so xf86_crtc_load_cursor_image was never called. (Also use scrn->pScreen instead of xf86ScrnToScreen(scrn)) v2: Set xf86_config->cursor at the beginning of xf86_load_cursor_image instead of at the end. Reviewed-by: Keith Packard commit 28b2c880a9dbfd91e82397a0f22482d258a8b670 Author: Keith Packard Date: Sun May 29 19:11:50 2016 -0700 xfree86: Provide xf86BlockSIGIO and xf86ReleaseSIGIO as wrappers for input mutex Threaded input doesn't use SIGIO anymore, but existing drivers using xf86BlockSIGIO and xf86ReleaseSIGIO probably want to lock the input mutex during those operations. Provide inline functions to do this which are marked as 'deprecated' so that drivers will get warnings until they are changed. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 2bed654be7001407ae65f7128440340fd3c1f083 Author: Keith Packard Date: Sun May 29 19:05:13 2016 -0700 dix: Remove bogus input_mutex and input_mutex_count definitions from globals.c These are local to inputthread.c; the ones in globals.c aren't declared in any header file. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 06bdc3bc1aeca2635d0f711ac7eef34796e28339 Author: Keith Packard Date: Sun May 29 01:14:59 2016 -0700 os: fix input_mutex_count off-by-one in input_force_unlock input_force_unlock was mis-using input_mutex_lock and leaving it set to -1. As this is executed from OsInit at each server generation, on the second time through, the mutex would be left locked (!) due to the trylock call. This caused input to fail after the first server reset. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit de3620065945f199a203afb831cac99bb8bff75b Author: Keith Packard Date: Fri May 27 17:51:01 2016 -0700 xfree86: Remove event reading code from xf86Wakeup Oops. This didn't get removed when xfree86 was converted over to use the input thread. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit c9703007ea77a8aa5aba4e7bc7367814526056fe Author: Keith Packard Date: Sat May 28 10:34:07 2016 -0700 Add ax_pthread.m4 to m4/ Threaded input requires AX_PTHREAD, which is provided by this file. Signed-off-by: Keith Packard Acked-by: Peter Hutterer commit c07b796b47ae7f5a616d5e8e02ab0f84dc438a93 Author: Keith Packard Date: Sun May 29 18:38:18 2016 -0700 xfree86: Bump ABI versions threaded input can affect drivers that use OsBlockSIGIO when dealing with cursors. Signed-off-by: Keith Packard Requested-by: Peter Hutterer commit 24e4c6db25aef7a057f3f384f1e2ce67e66fa40e Author: Keith Packard Date: Sun May 29 18:43:00 2016 -0700 test: Actually verify that two equivalent touch points are the same I typo'd when fixing this at Peter's request and left off the '2' from the second variable name. Signed-off-by: Keith Packard commit 1338bfa81c6eddc66f07c15225c3feff062182ce Author: Keith Packard Date: Fri May 27 01:56:39 2016 -0700 test: Make touch test reflect new ability to realloc touch array [v2] Threaded input allows the input code to call malloc while processing events. In this case, that's in the middle of processing touch events and needing to resize the touch buffer. This test was expecting the old behaviour where touch points would get dropped if the buffer was full. The fix is to check for the new behaviour instead. [v2] * make sure two finding two equivalent touches return the same touch object * check to make sure the queue resizes by the expected amount Changes provided by Peter Hutterer Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 8b9b4387e8473810f6174519ee76818fcaae725d Author: Keith Packard Date: Fri May 27 10:55:02 2016 -0700 glamor: Adjust for drawable x/y in composite's copy optimization Patch b64108fa305e956e4edaae9d53071ff0abee268e added a short cut that identifies composite operations that can be performed with a simple copy instead. glamor_copy works in absolute coordinates, so the dx and dy values passed in need to be converted from drawable-relative to absolute by adding the drawable x/y values. Signed-off-by: Keith Packard Reviewed-by: Alex Deucher commit 0d16a0c3b95d4ac446a07d8b95e634de5cb8055f Author: Keith Packard Date: Thu May 26 10:22:17 2016 -0700 os: Increase default client buffer to 16kB This matches a change made in xcb and improves performance for a small increase in memory usage. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 714736124f2bfba9ede076eff3bf017f986ce6c4 Author: Keith Packard Date: Fri May 27 02:02:48 2016 -0700 modesetting: Use new xf86CurrentCursor API Use this instead of the (now deprecated) cursor pointer in the xf86CrtcConfigRec. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit e69061e605c66084056cf2064dcc5d4c6c8aa0cf Author: Keith Packard Date: Tue Dec 8 14:26:50 2015 -0800 kdrive: Use threaded input Signed-off-by: Keith Packard Acked-by: Peter Hutterer commit a977c9c4d07a04c0c7b3713a21eefb92a8d3005b Author: Keith Packard Date: Tue Dec 8 14:53:08 2015 -0800 xfree86: Use threaded input mechanism [v2] Switch the XFree86 DDX over to threaded input v2: Rewrite comment in xf86Helper about silken mouse Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit f84703b50cc908a127f4ad923ebbf56f8f244c0d Author: Keith Packard Date: Tue Dec 8 14:20:21 2015 -0800 dix: Reallocate touchpoint buffer at input event time [v2] Now that input is threaded, malloc can be used at event time to resize the touchpoint buffer as needed.x v2: Remove "Need to grow the queue means dropping events." from comment as it no longer applies. (Peter Hutterer) Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit e2df803fcabd7c2d2fc7991c794856378dcb5489 Author: Keith Packard Date: Tue Dec 8 19:53:36 2015 -0800 mi: Grow event queue while reading events Now that events are read at normal process time, we can use malloc to grow the event queue instead of discarding events. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 30ac7567980a1eb79d084a63e0e74e1d9a3af673 Author: Keith Packard Date: Tue Dec 8 11:37:51 2015 -0800 Create a threaded mechanism for input [v7] The current SIGIO signal handler method, used at generation of input events, has a bunch of oddities. This patch introduces an alternative way using a thread, which is used to select() all input device file descriptors. A mutex was used to control the access to input structures by the main and input threads. Two pipes to emit alert events (such hotplug ones) and guarantee the proper communication between them was also used. Co-authored-by: Fernando Carrijo Signed-off-by: Tiago Vignatti v2: Fix non-Xorg link. Enable where supported by default. This also splits out the actual enabling of input threads to DDX-specific patches which follow v3: Make the input lock recursive v4: Use regular RECURSIVE_MUTEXes instead of rolling our own Respect the --disable-input-thread configuration option by providing stubs that expose the same API/ABI. Respond to style comments from Peter Hutterer. v5: use __func__ in inputthread debug and error mesages. Respond to style comments from Peter Hutterer. v6: use AX_PTHREAD instead of inlining pthread tests. Suggested by Emil Velikov v7: Use pthread_sigmask instead of sigprocmask when using threads Suggested by Adam Jackson Signed-off-by: Adam Jackson Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 728c9570a05f03bd90343ff6f5b1a8fd3988864c Author: Keith Packard Date: Wed Dec 9 14:27:05 2015 -0800 xkb: Hold input lock across injected key event processing This makes the code more consistent with other versions of out-of-queue event processing Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 05d549d60440126105d5a70272e72ea2319724bd Author: Keith Packard Date: Thu Dec 17 22:21:46 2015 -0800 xfree86: Remove unnecessary errno save/restore in xf86ReadInput When this code was called from SIGIO, saving and restoring errno could possibly have made sense in some strange environment. Now that this will not be called from a signal handler, there is no reason to do that. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 0bbb5aabf794720fa99ae5ea3f55138ded159705 Author: Keith Packard Date: Mon May 16 21:33:41 2016 -0500 kdrive: Don't lock input across read in KdNotifyFd We won't need these locks with the new threaded input code as it holds the input lock across all of the input device I/O operations. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 Author: Keith Packard Date: Tue Dec 8 14:39:46 2015 -0800 Remove SIGIO support for input [v5] This removes all of the SIGIO handling support used for input throughout the X server, preparing the way for using threads for input handling instead. Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls to stub functions input_lock/input_unlock so that we don't lose this information. xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO and OsReleaseSIGIO. v2: Don't change locking order (Peter Hutterer) v3: Comment weird && FALSE in xf86Helper.c Leave errno save/restore in xf86ReadInput Squash with stub adding patch (Peter Hutterer) v4: Leave UseSIGIO config parameter so that existing config files don't break (Peter Hutterer) v5: Split a couple of independent patch bits out of kinput.c (Peter Hutterer) Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 8cf832c288dec13cbf3c25478a8ccef52d61f3db Author: Keith Packard Date: Mon May 16 21:28:48 2016 -0500 kdrive: Remove unneeded AddEnabledDevice/RemoveEnabledDevice calls kdrive uses the NotifyFd interface, which handles all of the necessary fd configuration in the OS layer. Having it also use the old EnableDevice interfaces is incorrect. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 4fca18dc03669bada75175df289fbee41275208e Author: Adam Jackson Date: Mon May 9 13:28:08 2016 -0400 xfree86: Add IndirectGLX server flag (v2) Not all display managers make it easy (or possible) to modify the command line flags passed to the server, so add a way to get to it from xorg.conf. v2: Fix the FlagOptions list to not have IGLX after the terminator (Alan Coopersmith) Reviewed-by: Alan Coopersmith Signed-off-by: Adam Jackson commit 181a4bd0cc436f89582408196038ff37032f9bac Author: Keith Packard Date: Fri May 13 16:19:38 2016 -0700 glamor: Preserve GL_RED bits in R channel when destination is GL_RED [v2] A1 and A8 pixmaps are usually stored in the Red channel to conform with more recent GL versions. When using these pixmaps as mask values, that works great. When using these pixmaps as source values, then the value we want depends on what the destination looks like. For RGBA or RGB destinations, then we want to use the Red channel for A values and leave RGB all set to zero. For A destinations, then we want to leave the R values in the Red channel so that they end up in the Red channel of the output. This patch adds a helper function, glamor_bind_texture, which performs the glBindTexture call along with setting the swizzle parameter correctly for the Red channel. The swizzle parameter for the Alpha channel doesn't depend on the destination as it's safe to leave it always swizzled from the Red channel. This fixes incorrect rendering in firefox for this page: https://gfycat.com/HoarseCheapAmericankestrel while not breaking rendering for this page: https://feedly.com v2: Add change accidentally left in patch for missing glDisable(GL_COLOR_LOGIC_OP). Found by Emil Velikov Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63397 Signed-off-by: Keith Packard Tested-by: Michel Dänzer commit b07bc700b3cf2f5c8912fc5b9e0dad2baf395525 Author: Keith Packard Date: Sat May 14 08:22:17 2016 -0700 glamor: glamor_make_current sooner in glamor_composite_with_shader glamor_make_current is supposed to be called before any GL APIs. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit 743b6f231e999d8b2909228412266dc13cc433c5 Author: Keith Packard Date: Fri May 13 04:25:43 2016 -0700 glamor: Disable logic ops when doing compositing [v4] If the logic op gets left enabled, it overrides the blending operation, causing incorrect contents on the display. v2: Disable only on non-ES2, but disable even for PictOpSrc v3: Found another place this is needed in glamor_composite_set_shader_blend v4: Remove change dependent on new glamor_set_composite_texture API. This belongs in a different patch. Found by Emil Velikov Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit f5670b4a7eb3b43fa20017f89192394930eae6f4 Author: Keith Packard Date: Wed Mar 9 11:13:14 2016 -0800 xfree86: Set xf86CrtcConfigRec cursor pointer to NULL in HideCursor This makes the cursor pointer held by xf86Cursors.c get reset to NULL whenever the cursor isn't displayed, and means that the reference count held in xf86Cursor.c is sufficient to cover the reference in xf86Cursors.c. As HideCursor may be called in the cursor loading path after UseHWCursor or UseHWCursorARGB when HARDWARE_CURSOR_UPDATE_UNHIDDEN isn't set in the Flags field, the setting of the cursor pointer had to be moved to the LoadCursor paths. LoadCursorARGBCheck gets the cursor pointer, but LoadCursorImageCheck does not. For LoadCursorImageCheck, I added a new function, xf86CurrentCursor, which returns the current cursor. With this new function, we can eliminate the cursor pointer from the xf86CrtcConfigRec, once drivers are converted over to use it. Signed-off-by: Keith Packard Acked-by: Peter Hutterer commit b64108fa305e956e4edaae9d53071ff0abee268e Author: Michel Dänzer Date: Wed May 25 19:09:23 2016 +0900 glamor: Check for composite operations which are equivalent to copies Increases x11perf -compwinwin500 numbers by a factor of 10 for me with radeonsi. Conditions copied from exaComposite(). Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 4711ebc174206b5a50e6ae8a7f974cd835e4ebd3 Author: Michel Dänzer Date: Tue May 24 18:12:42 2016 +0900 glamor: Fix sampling outside of RGBx source/mask pictures RENDER requires that sampling outside of any source/mask picture results in alpha == 0.0. The OpenGL border colour cannot set alpha = 0.0 if the texture format doesn't have an alpha channel, so we have to use the RepeatFix handling in that case. Also, only force alpha = 1.0 when sampling inside of RGBx source/mask pictures. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94514 Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 4d649d51770cace4d7c1e51d9a199ac7a056c30a Author: Keith Packard Date: Wed May 18 16:03:48 2016 -0500 mi: Remove miPointerRec from API This moves the definition of miPointerRec from mipointrst.h to mipointer.c so that it is no longer visible in the API, allowing it to be changed while the API/ABI is frozen. Reviewed-by: Pekka Paalanen Signed-off-by: Keith Packard commit 3f9015b6dc9e7e9c97f8717dea6af9f4d8523f2e Author: Keith Packard Date: Wed May 18 16:03:47 2016 -0500 xwayland: Move sprite invalidation logic into mipointer This creates a function that invalidates the current sprite and forces a sprite image reload the next time the sprite is checked, moving that logic out of the xwayland sources and allowing the miPointerRec structure to be removed from the server API. Signed-off-by: Keith Packard Reviewed-by: Pekka Paalanen commit 4e124203f2260daaf54155f4a05fe469733e0b97 Author: Adam Jackson Date: Tue May 3 11:24:58 2016 -0400 damage: Make damageRegionProcessPending take a damage not a drawable In the case where there's no damage monitor on the drawable, we look that fact up twice: once before rendering to decide whether to compute damage, and again after to decide whether to append it. This is wasted effort, as the layer below us is effectively not allowed to change whether there's a damage monitor for the drawable, but there's no way the compiler can know that. Instead, look it up once up front, and change the check macros and damageRegionProcessPending to take a damage not a drawable. v2: Explicitly pass pDamage to the macros as well (Michel Dänzer) Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer commit 1bb932bf1417ff319a594d7e40f6813a26936784 Author: Jeremy Huddleston Sequoia Date: Sat May 7 00:43:33 2016 -0700 XQuartz: Fix default CFBundleVersion m4/shell variable name collision broke the case when the configure option was not used Signed-off-by: Jeremy Huddleston Sequoia commit 2fbf5c2f91d33efbda573c4be036248b1d8ed7f1 Author: Andrew Comminos Date: Tue Dec 29 23:41:27 2015 -0800 Input: Send XI2 FocusOut NotifyPointer events to the pointer window. This changes XInput 2's propagation of NotifyPointer focus out events to include the pointer window as well, similar to core events. This fixes a potential permanent focus in GDK when the focus moves to PointerRoot. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93539 Signed-off-by: Andrew Comminos Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 984be789d5935bc7f695dc61234ef0251ed33679 Author: Olivier Fourdan Date: Wed May 11 09:15:19 2016 +0200 xwayland: don't check events as early as InitInput If data is received during XWayland startup, it will be read early in InitInput() before the connection data is initialized, causing a crash. Remove the wayland rountrips from InitInput() as this is done again in xwl_screen_init() where it seems more appropriate. Signed-off-by: Olivier Fourdan Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95337 Reviewed-by: Adam Jackson commit 3f569435e10df515c6f86289dc986bfc59c6bc18 Author: Adam Jackson Date: Thu Mar 31 16:56:44 2016 -0400 glx: Stop tracking hasUnflushedCommands This is only meaningful for indirect contexts, and all it does is (maybe) prevent a flush when switching away from an indirect context. Indirect contexts aren't worth optimizing for, and Mesa tracks whether a flush is needed anyway. Careful readers will note that ReadPixels would reset the flag even though it doesn't imply a flush! Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 0ebb58f6b6f66afbc3a48bd10693fe190aed8694 Author: Adam Jackson Date: Thu Mar 31 16:20:40 2016 -0400 glx: Remove some redundant zero-init of GLX context state The context is already calloc'd. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d5ba09598210063926aeff55ac58d2b7020d9a03 Author: Adam Jackson Date: Thu Mar 31 15:51:39 2016 -0400 glx/dri2: Implement dri2FlushFrontBuffer explicitly No functional change. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 0ba4e251a1012bd5a2eab83e2c51006ec3805394 Author: Adam Jackson Date: Thu Mar 31 15:50:34 2016 -0400 glx: Code motion No functional change, just rearranging some code to make later commits more obvious. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit f523ebb5492a2e12b76a8b5b7f1b0e5efd4a8040 Author: Adam Jackson Date: Mon Apr 18 12:56:17 2016 -0400 dix: Remove pointless client-state callbacks Private storage is pre-zeroed by the private system itself. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 140c2f1a54dbc2503311e9a011e841aa1f277cbd Author: Michel Dänzer Date: Fri Apr 1 18:24:00 2016 +0900 EXA: Honour op parameter to exaGlyphs even if maskFormat == NULL Reported-by: Uli Schlachter Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94775 Signed-off-by: Michel Dänzer Reviewed-by: Uli Schlachter commit 7f0494671f95cfa33f6f2c7c74b20a21f239f8c5 Author: Dave Airlie Date: Fri May 6 05:41:58 2016 +1000 modesetting: fix build with glamor disabled. Fix build without --enable-glamor. Caught by the arm tinderbox. Signed-off-by: Dave Airlie Reviewed-by: Mark Kettenis Tested-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 66fdeb880aac0966be9aa41219047ade0148c35f Author: Emil Velikov Date: Mon May 2 23:47:22 2016 +0100 xfree86: drop unneeded strdup for modulepath/logfile The destination variable is never freed, thus we even plug some memory leaks. v2: Rebase against updated xf86CheckPrivs() helper. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 032b1d79b7d04d47814a5b3a9fdd162249fea74c Author: Emil Velikov Date: Mon May 2 23:47:21 2016 +0100 xfree86: use the xf86CheckPrivs() helper for modulepath/logfile v2: Rebase against updated xf86CheckPrivs() helper. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 0fdd47560468e7b6147c666cc6b9eebcecb68572 Author: Emil Velikov Date: Mon May 2 23:47:20 2016 +0100 xfree86: factor out the check priviliges and print a big warning Current message was quite off "file specified must be a relative path" and alike. Just factor it out and use "path/file" as needed. v2: Rework error message, drop "Using default", print actual arg value. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 2378adde6770385c06f7efcd32f270d00d49ce3f Author: Dave Airlie Date: Fri Apr 29 14:01:33 2016 +1000 modesetting: set capabilities up after glamor and enable offload caps. This moves the capabilites setting to after glamor is initialised, and enables the offload caps in cases where they work. This enables DRI2 PRIME support with modesetting. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 258588224d6b35de12f97d9092efa5cb3e426550 Author: Dave Airlie Date: Fri Apr 29 14:01:32 2016 +1000 xf86Crtc: don't set the root window property on slave GPUs. Slave GPUs don't have a root window to set this on, so don't. This fixes some crashes I saw just playing around. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit a41a171bcbae9aeafac2865faa904f15d9b59925 Author: Dave Airlie Date: Fri Apr 29 14:01:31 2016 +1000 modesetting: set driverPrivate to NULL after closing fd. Otherwise ms_ent_priv will return NULL and things will fall apart. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit fc1f61b75c9712e24ff665f95d62771f39eba1c7 Author: Dave Airlie Date: Fri Apr 29 14:01:30 2016 +1000 randr/provider: only allow slave gpu to be offload sources. The other way around makes no sense. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 2d0f151c6195ba94d0320b55227a108e6301a74c Author: Alex Goins Date: Fri Apr 29 14:01:29 2016 +1000 modesetting: Consistent whitespace in driver.c For some reason a couple of the dirty functions in driver.c used 8 spaces per tab instead of 4 like the rest of the file. Fix this to make it more consistent and give me more room to work in ms_dirty_update in subsequent commits. v1: N/A v2: N/A v3: N/A v4: Initial commit Signed-off-by: Alex Goins Reviewed-by: Dave Airlie Reviewed-by: Alex Deucher commit 137ac094e7ab8c871f3b36e40ad826ac797f0e26 Author: Adam Jackson Date: Fri Apr 1 22:44:26 2016 -0400 dix: Push UpdateCurrentTimeIf down out of the main loop This was added in: commit 312910b4e34215aaa50fc0c6092684d5878dc32f Author: Chase Douglas Date: Wed Apr 18 11:15:40 2012 -0700 Update currentTime in dispatch loop Unfortunately this is equivalent to calling GetTimeInMillis() once per request. In the absolute best case (as on Linux) you're only hitting the vDSO; on other platforms that's a syscall. Either way it puts a pretty hard ceiling on request throughput. Instead, push the call down to the requests that need it; basically, grab processing and event generation. Cc: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit ac164e58870d70640381e68b776eb95578c7fbd3 Author: Peter Hutterer Date: Wed May 4 20:36:18 2016 +1000 xkb: after changing the keymap, force an indicator update When NumLock is on and a new keymap is applied, the next modifier state change will turn off that LED (but leave the state enabled). The cause for this is a bit convoluted: * the SLI explicitState is copied from the current state in ProcXkbGetKbdByName. Thus, if NumLock is on, that state is 0x2. * on the next modifier key press (e.g. Shift), XkbApplyState() calls into XkbUpdateIndicators() -> XkbUpdateLedAutoState() to update SLIs (if any) for the currently changed modifier. But it does so with a mask only for the changed modifier (i.e. for Shift). * XkbUpdateLedAutoState() calculates the state based on this mask and ends up with 0 because we don't have a Shift LED and we masked out the others. * XkbUpdateLedAutoState() compares that state with the previous state (which is still 0x2) and then proceeds to turn the LED off This doesn't happen in the normal case because either the mask encompasses all modifiers or the state matches of the masked-out modifiers matches the old state. Avoid this issue by forcing an SLI update after changing the keymap. This updates the sli->effectiveState and thus restores everything to happy working order. https://bugzilla.redhat.com/show_bug.cgi?id=1047151 Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 059d5ef30490233f410ca87084c7697b87e5b05e Author: Jeremy Huddleston Sequoia Date: Tue May 3 23:43:06 2016 -0700 XQuartz: Update copyright years Signed-off-by: Jeremy Huddleston Sequoia commit d6ba4f2c52da150a9a92bdb00efe7902d17033bd Author: Jeremy Huddleston Sequoia Date: Tue May 3 23:42:34 2016 -0700 XQuartz: Add --with-bundle-version and --with-bundle-version-string configure options Signed-off-by: Jeremy Huddleston Sequoia commit c1614928c10a8f8400f99acfd1b7f96d503af7ec Author: Jeremy Huddleston Sequoia Date: Tue May 3 23:21:38 2016 -0700 XQuartz: Add --with-sparkle-feed-url configure option Signed-off-by: Jeremy Huddleston Sequoia commit 299b01eabf827a7435b5d6004d50637ac710bbc7 Author: Jeremy Huddleston Sequoia Date: Tue May 3 23:14:24 2016 -0700 XQuartz: Update release feed URL to use new https URL Signed-off-by: Jeremy Huddleston Sequoia commit 16d6733c63727d910eb516d7f6950f4675281f2d Author: Jeremy Huddleston Sequoia Date: Tue May 3 23:24:44 2016 -0700 XQuartz: Fix the help text for --with-bundle-id-prefix Signed-off-by: Jeremy Huddleston Sequoia commit 214a66b661dcb56ebb9776e34049753f65c7510a Author: Jeremy Huddleston Sequoia Date: Tue May 3 23:16:46 2016 -0700 XQuartz: Remove --with-launchd-id-prefix It's been deprecated for years. Signed-off-by: Jeremy Huddleston Sequoia commit 2285fe78c04714561a0d1a164a41a38c48263f89 Author: Peter Hutterer Date: Fri Apr 22 15:04:37 2016 +1000 xfree86: add support for MatchIsTabletPad The tablet pads have been separate kernel devices for a while now and libwacom has labelled them with the udev ID_INPUT_TABLET_PAD for over a year now. Add a new MatchIsTabletPad directive to apply configuration options specifically to the Pad part of a tablet. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson commit fa02b05645080c285da5972262a8d37403e39d7e Author: Dave Airlie Date: Tue May 3 06:54:57 2016 +1000 modesetting: port clean start code from amdgpu. (v2) Both radeon and amdgpu don't set the mode until the first blockhandler, this means everything should be rendered on the screen correctly by then. This ports this code, it also removes the tail call of EnterVT from ScreenInit, it really isn't necessary and causes us to set a dirty mode with -modesetting always anyways. v2: reorder set desired modes vs block handler as done for amdgpu. Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher commit caabc4e85540dcd4225f2780b5616f7d870fbb06 Author: Dave Airlie Date: Tue May 3 06:54:56 2016 +1000 modesetting: add support for background none. This adds support using glamor for background None. loosely based off the amdgpu code. relies on the glamor_finish code. Acked-by: Eric Anholt Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit c33250945b45adc447154239f0cf48fb9b2d7335 Author: Adam Jackson Date: Fri Apr 8 11:26:36 2016 -0400 kdrive: Nuke a bunch of dead code gcc6 says: keyboard.c:46:21: warning: ‘linux_to_x’ defined but not used Only referenced by a bunch of long if-0'd code, so chuck it all out. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit a5dd7b890f4f3a5245639591c73303c5a087b38a Author: Adam Jackson Date: Fri Apr 8 11:24:50 2016 -0400 dix: Squash some new gcc6 warnings -Wlogical-op now tells us: devices.c:1685:23: warning: logical ‘and’ of equal expressions Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 23dfa017298ceceac818f83779858e490c7757b6 Author: Andreas Schwab Date: Thu Apr 28 14:47:33 2016 +0200 x86emu: Change include order to avoid conflict with system header R_SP is also defined in on m68k. Also remove duplicate definitions. Reviewed-by: Adam Jackson Signed-off-by: Andreas Schwab commit aa4e757130010dd3202f10ec6cb0c306c1dbcfbc Author: Dave Airlie Date: Fri Mar 11 09:22:00 2016 +1000 glamor: add glamor_finish API Some drivers are calling glFinish, they really should be doing this. This also is needed for some reverse prime scenarios. Signed-off-by: Dave Airlie Reviewed-by: Michel Dänzer Reviewed-by: Eric Anholt commit f48b0534f110397246809d279225afedb28aa233 Author: Marek Chalupa Date: Mon Apr 25 11:33:00 2016 +0200 xwayland-shm: fortify fallocate against EINTR If posix_fallocate or ftruncate is interrupted by signal while working, we return -1 as fd and the allocation process returns BadAlloc error. That causes xwayland clients to abort with 'BadAlloc (insufficient resources for operation)' even when there's a lot of resources available. Fix it by trying again when we get EINTR. Signed-off-by: Marek Chalupa Reviewed-by: Pekka Paalanen commit 4cc32880737c2d3e568fdb4867b2dba10fb3998a Author: Alexandre Courbot Date: Wed Mar 23 13:47:37 2016 +0900 configure.ac: Keep environment CFLAGS when testing DRI2 detection could fail if configure is invoked with a sysroot passed as CFLAGS. Ideally configure should invoke gcc with the sysroot argument passed to the configure script, but for some reason this is not done by AC_COMPILE_IFELSE. Fix this by ensuring CFLAGS are preserved when checking for stuff. Signed-off-by: Alexandre Courbot Reviewed-by: Emil Velikov commit 16e4bce9e5257c50c80c66efee0d07c2483619e1 Author: Simon Thum Date: Fri Apr 8 13:24:39 2016 +0200 dix/ptraccel: Remove float literals This was fine back when valuators were integer. Device properties are float (not double), so some instances remain. Signed-off-by: Simon Thum Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c8e5fc30575a309c25970fc68b9184c07bb74df4 Author: Simon Thum Date: Tue Apr 5 14:29:47 2016 +0200 dix/ptraccel: Fix memory leak in InitPredictableAccelerationScheme This was quite unlikely except in situations where a proper startup would have been impossible anyway, but since automated checks don't grade likelyhood just fix it. Detected by Jeremy Huddleston's clang checks. Signed-off-by: Simon Thum Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f641ae412287ecb7a3437987e2ba1646a8443aa4 Author: Peter Hutterer Date: Wed Mar 9 10:45:48 2016 +1000 Xi: don't deliver emulated motion events for non-emulating touches The touchpoint knows whether it should be emulating or not and we have a check for that later. Check for this before we generate the event and try to deliver it, lest we trigger a bug warning. https://bugzilla.redhat.com/show_bug.cgi?id=1282252 Signed-off-by: Peter Hutterer commit 577bebe2067293bb154068e99a2ef085b066cb67 Author: Emil Velikov Date: Sun Apr 17 20:30:46 2016 +0100 xfree86/parser: simplify #ifdef ladder Rather than 'hacking' around symbol names and providing macros such as 'Local' just fold things and make the code more readable. Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit 537276a5b86b7341169ea4eb36d479a503ba5d84 Author: Emil Velikov Date: Sun Apr 17 20:30:45 2016 +0100 xfree86/parser: reuse StringToToken() in xf86getToken() Reviewed-by: Alex Deucher Signed-off-by: Emil Velikov commit 944ea03d5be2ffe22a3f1c4c287760261c31235f Author: Emil Velikov Date: Sun Apr 17 20:30:44 2016 +0100 xfree86/parser: move StringToToken() definition further up ... so that we can use it without the forward declaration. Plus we're doing to reuse it in the next commit ;-) Reviewed-by: Alex Deucher Signed-off-by: Emil Velikov commit b93be14b7d339e4e46d941729dad853452fae8c0 Author: Emil Velikov Date: Sun Apr 17 20:30:43 2016 +0100 xfree86/parser: annotate xf86ConfigSymTabRec as constant data Add the const notation to all the static storage as well as the functions that use it - xf86getToken(), xf86getSubTokenWithTab(), StringToToken() and xf86getStringToken(). Reviewed-by: Alex Deucher Signed-off-by: Emil Velikov commit 3981dcdd489b60fbf356534a509ca93dcbedf769 Author: Emil Velikov Date: Sun Apr 17 20:34:43 2016 +0100 dri3: remove unused file dri3int.h Copied during the prototyping stage and never used. Cc: Keith Packard Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit a1b13cda6169a98d694451fec75e63352e9d90bd Author: Adam Jackson Date: Wed Jan 6 09:09:21 2016 -0500 xfree86: Remove xf86RegisterRootWindowProperty All consumers have been ported to the root window callback, so this can all be nuked. Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit e89c7f1c2a0ea3480b21446e413073c1427285ae Author: Adam Jackson Date: Wed Jan 6 09:04:15 2016 -0500 xfree86: Create EDID atom from the root window callback (v2) v2: Fix swapped callback args Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 8e3010d7d8e8c49c8859b576de1808ae7b2859be Author: Adam Jackson Date: Wed Jan 6 08:54:47 2016 -0500 xfree86: Remove a never-hit diagnostic message Practically speaking, the EDID major version is never not 1. Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 7961377567f15dfad9d96c5c0a0992b38013d973 Author: Adam Jackson Date: Wed Jan 6 08:47:37 2016 -0500 xfree86: Make xf86SetDDCproperties work more than once (v2) We can call this more than once via xf86OutputSetEDID since hotplug is actually a thing in RANDR 1.2, but xf86RegisterRootWindowProperty merely adds the data to a list to be applied to the root at CreateWindow time, so calls past the first (for a given screen) would have no effect until server regen. Once we've initialised pScrn->pScreen is filled in, so we can just set the property directly. v2: Removed pointless version check, deobfuscate math (Walter Harms) Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 8be83fff04a009109a956837ca983a96fd279711 Author: Adam Jackson Date: Wed Jan 6 08:35:43 2016 -0500 xfree86: Remove some leftovers from DisplayID support Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 0cd2a24b61ef1583fc6b3fec7d01c7481cc97d52 Author: Adam Jackson Date: Wed Jan 6 08:30:07 2016 -0500 xfree86: Unexport xf86Initialising, remove xf86ServerIsInitialising Neither of these are used from outside the server. Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit e70ee11a39b957141fbc565d79d128a46fac5f34 Author: Adam Jackson Date: Tue Jan 5 16:27:41 2016 -0500 xfree86: Create VT atoms from the root window callback (v2) v2: Fix swapped callback args Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit da9ee1eddd65d00788cef8a3becfad948c0a2168 Author: Adam Jackson Date: Tue Jan 5 16:11:42 2016 -0500 xfree86: Create seat atom from the root window callback (v2) v2: Fix swapped callback args Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 2c3a3afb5104714b637c1c4aea195df73e0fa918 Author: Adam Jackson Date: Tue Jan 5 15:56:42 2016 -0500 dix: Add RootWindowFinalizeCallback Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 8437955515ad59b0bfcd6598248e7f0ffc706370 Author: Olivier Fourdan Date: Thu Mar 17 09:53:58 2016 +0100 glamor: fix wrong offset on composite rectangles When using PictOpSrc, the destination is wrongly shifted back to (0, 0). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94568 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit e8e5d839968e22cf42a6e1982a07b02c6f4a4562 Author: Olivier Fourdan Date: Fri Apr 1 13:38:11 2016 +0200 xwayland: Fix compiler warning in GLAMOR Xv XvWindowMask is defined as 0x00020000 and cannot fit in the XvAdaptor type which is defined as an unsigned char, thus causing a compiler warning: xwayland-glamor-xv.c: In function ‘xwl_glamor_xv_add_adaptors’: xwayland-glamor-xv.c:339:16: warning: large integer implicitly truncated to unsigned type [-Woverflow] This XvWindowMask value is actually not used for XvAdaptor itself but by the server in its xf86xv implementation, so we don't even need that mask in our xwayland-glamor-xv implementation. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit f9b5bbaa3a7fce1a4efb2084b8d9d82b98d4ee83 Author: Peter Hutterer Date: Tue Mar 8 15:42:42 2016 +1000 xkb: fix SlowKeys release/reject beeps Wrong use of the mask here caused a beep whenever a key was rejected but also when it was released after being accepted. Fix the mask to check for the correct enabled controls. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit a6288f0954cf97499e78849a87847062ee962c17 Author: Jon Turney Date: Tue Nov 3 19:07:43 2015 +0000 hw/xwin: xcbify internal window manager Convert the code for the multiwindow mode internal window manager to xcb xcb conversion avoids xlib/xserver namespace collision and _XSERVER64 type sizing issues v2: Various fixes v3: Don't include X11/extensions/windowswmstr.h, which uses the Display type and thus depends on Xlib.h, just for _WINDOWSWM_NATIVE_HWND v4: Fix indentation, add some error handling. Fix a bug with ConfigureNotify handling v5: Fix a bug which prevented WM_NORMAL_HINTS from being checked Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 8114b8127f01fc81390fc13e3d09bcc50e41a66f Author: Jon Turney Date: Wed Jul 1 16:30:36 2015 +0100 hw/xwin: In multiwindow mode, do window minimization entirely in the WM Remove winMinimizeWindow(), implement as UpdateState() in the WM instead, which uses getHwnd() to map a Window XID to a HWND (like everything else in the WM), rather than peering into the servers internal data structures. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 6a64b9d7af70dc7ff2cac8b35a1f7b0797823733 Author: Jon Turney Date: Mon Nov 2 17:55:19 2015 +0000 hw/xwin: xcbify code for converting X11 icon to Win32 icon Convert the code for converting an X11 icon to Win32 icon from Xlib to xcb. v2: some warning fixes in winXIconToHICON() v3: declaration-after-statement warning fixes v4: printf format fixes v5: convert in place rather than in a library This also avoids the xlib/xserver namespace collision issues, so winmultiwindowicons.h can be included everywhere it should be, which fixes compilation with -Werror=implicit-function-declaration Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 0a69c1e2fa0ea63b02fff98e68d9f56a369e882b Author: Jon Turney Date: Wed Mar 30 18:31:38 2016 +0100 xwin/glx: Build fix for warnings about missing WGL extensioons Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit b08526eecf1e165ed9ec2e6b571a5a616a9b696e Author: Adam Jackson Date: Wed Mar 16 11:38:13 2016 -0400 glx: Implement GLX_EXT_libglvnd (v2) For the dri2 backend, we depend on xfree86 already, so we can walk the options for the screen looking for a vendor string from xorg.conf. For the swrast backend we don't have that luxury, so just say mesa. This extension isn't really meaningful on Windows or OSX yet (since libglvnd isn't really functional there yet), so on those platforms we don't say anything and return BadValue for the token from QueryServerString. v2: Use xnf* allocators when parsing options (Eric and Emil) Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 2e8781ead3067b195baec2e76a28091575679383 Author: Adam Jackson Date: Wed Mar 23 15:41:24 2016 -0400 glx: Compute the GLX extension string from __glXScreenInit Now that the enable bits are in the screen base class we can compute this in one place, rather than making every backend do it. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit e21de4bf3c5ff8cbb9c5ea023d04162e5e56b3df Author: Adam Jackson Date: Wed Mar 23 15:36:52 2016 -0400 glx: Move glx_enable_bits up to the GLX screen base class Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 23cce73221c0b96e7778da34616f8c3f4d6aa819 Author: Adam Jackson Date: Wed Mar 23 15:13:51 2016 -0400 xquartz/glx: Remove unused fields from the glx screen subclass dmt:~/git/xserver% git grep -E '\<(index|num_vis)\>' hw/xquartz/GL hw/xquartz/GL/indirect.c: int index; hw/xquartz/GL/indirect.c: int num_vis; Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 36bcbf76dcc7e88cac093f8fb656c525bfeaf65d Author: Adam Jackson Date: Wed Mar 23 15:26:23 2016 -0400 glx: Enable GLX 1.4 unconditionally Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 2a72789ee8e88f612dff48ebe2ebe9fecda7a95d Author: Adam Jackson Date: Wed Mar 16 16:28:13 2016 -0400 xwin/glx: Drop GLWIN_NO_WGL_EXTENSIONS hack This doesn't seem very useful, and we're about to implement 1.4 across the board, so some WGL extensions will become required. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 77bdaa1313aa55191b49ec73c1e377928ca294fe Author: Adam Jackson Date: Tue Mar 22 14:40:37 2016 -0400 glx: Use __glXInitExtensionEnableBits in all backends (v2) On xquartz this enables SGI_make_current_read, which is a mostly harmless lie as CGL doesn't implement it, as well as SGIX_pbuffer, which is fine because no pbuffer-enabled configs are created. On xwin this enables SGIX_pbuffer and ARB_multisample in all cases. Again this is harmless if the backend doesn't support the features, since no fbconfigs will be created to expose them. It also adds SGIX_visual_select_group to both xquartz and xwin. Amusingly, both were filling in the appropriate field in the fbconfig already. v2: Warn about missing WGL extensions (Emil) Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 15af78fc56569dc3b6a7f2c5a6a49edb602111b7 Author: Adam Jackson Date: Wed Mar 23 15:19:15 2016 -0400 glx: Enable GLX_SGI_make_current_read in the core GLX 1.3 implies equivalent functionality, so this is safe to enable unconditionally, and bindContext always takes both drawable and readable arguments in any case. Mesa stopped exporting the __DRI_READ_DRAWABLE extension in 8.0 (when the DRI1 drivers were removed) so this will restore the extension string. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 9b2fc6d98691966f1c9186edad956f78c31f3698 Author: Adam Jackson Date: Wed Mar 23 14:57:25 2016 -0400 xwin/glx: Enable GLX_SGI_make_current_read unconditionally (v2) This seems to be fairly universal these days, and if it doesn't exist the only thing you break is separate drawable and readable, which is a rare feature to use. So pretend it's always there and just throw an error on MakeCurrent if it isn't, and don't consider it when computing the GLX version number. v2: Fix type-o for glxWinScreen (Jon Turney) Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit b2ef7df476af619903ef7f6b6962b371ae14306c Author: Adam Jackson Date: Sat Mar 19 13:44:10 2016 -0400 xquartz/glx: Error out for MakeContextCurrent(draw != read) CGL doesn't have a way to express this directly, unlike EGL WGL and GLX. It might be implementable, but it's never actually worked, and it's a fairly niche feature so we're better off throwing an error if someone attempts it. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Reviewed-by: Jeremy Huddleston Sequoia Signed-off-by: Adam Jackson commit f95645c6f70019316f8ad77b7beb84530fc0505f Author: Adam Jackson Date: Tue Mar 22 14:37:19 2016 -0400 glx: Don't enable EXT_texture_from_pixmap unconditionally Not all backend servers implement this. Those that don't happen to not use __glXInitExtensionEnableBits, but we'd like that to change, so fix it up before we switch them over. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 410aec82556def5395f51299bcefbeb7d0bda604 Author: Adam Jackson Date: Tue Mar 22 14:29:06 2016 -0400 glx: Remove server-side mention of GLX_MESA_swap_control This extension is direct-only and has no GLX protocol. We don't even track an enable bit for it, trying to turn it on is pointless. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 3a21da59e59cf11a9113d71e3431c4bd394ff1e8 Author: Adam Jackson Date: Wed Mar 16 19:05:17 2016 -0400 glx: Remove default server glx extension string This existed only to be strdup'd and then immediately freed. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 44e1c97ca6fe992bbb6ef9ecb0b82a113adfa57e Author: Olivier Fourdan Date: Mon Mar 21 09:53:17 2016 +0100 xwayland: Pretend we support viewport in vidmode Some games (namely openttd) will raise an XError and fail with a BadValue if their request to XF86VidModeSetViewPort fails. Support only the default zoom and viewport, fail for everything else. Signed-off-by: Olivier Fourdan Reviewed-by: Hans de Goede commit 6e3a6e30a6ac66942a0756a5d079993181f02e34 Author: Olivier Fourdan Date: Thu Mar 17 14:39:45 2016 +0100 xwayland: do not include frequency in mode name Some applications (e.g. using lwjgl) try to parse the output of the xrandr command and get confused with the mode name returned by Xwayland, because it contains "@[frequency]" (e.g. "1024x640@60.0Hz"). Remove the @[frequency] part of the mode name to match what is found in usual mode names on regular X servers to please those applications. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94589 Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 418fe365b45a143680d3b4143dc60f7cdc5a3507 Author: Michel Dänzer Date: Thu Mar 24 17:34:23 2016 +0900 xfree86/modes: Make sure the HW cursor is hidden when it should be When the HW cursor is hidden (e.g. because xf86CursorResetCursor triggers a switch from HW cursor to SW cursor), the driver isn't notified of this for disabled CRTCs. If the HW cursor was shown when the CRTC was disabled, it may still be displayed when the CRTC is enabled again. Prevent this by explicitly hiding the HW cursor again after setting a mode if it's currently supposed to be hidden. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94560 Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit adefbaee499b9679c6cac21f52ec6545af2b36b5 Author: Adam Jackson Date: Mon Mar 28 18:11:09 2016 +0900 os: Treat ssh as a non-local client (v4) By the time we get to ComputeLocalClient, we've already done NextAvailableClient → ReserveClientIds → DetermineClientCmd (assuming we're built with #define CLIENTIDS), so we can look up the name of the client process and refuse to treat ssh's X forwarding as if it were local. v2: (Michel Dänzer) * Only match "ssh" itself, not other executable names starting with that prefix. * Ignore executable path for the match. v3: (Michel Dänzer) * Use GetClientCmdName (Mark Kettenis) * Perform check on Windows as well, but only ignore path on Cygwin (Martin Peres, Emil Velikov, Jon Turney) v4: (Michel Dänzer) * Cut of any colon and whatever comes after it. (Adam Jackson) * Add bugzilla reference. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93261 Signed-off-by: Adam Jackson Signed-off-by: Michel Dänzer commit 1c90797565385426ad63bd2108085c8466695c0b Author: Sonny Jiang Date: Mon Mar 28 16:36:50 2016 +0900 DRI2: add Polaris PCI IDs Signed-off-by: Sonny Jiang Reviewed-by: Alex Deucher (Polaris10) Reviewed-by: Michel Dänzer (Polaris11) (Ported from Mesa commit f00c840578a70e479ffb99f6b64c73dc420179fa) Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 3b385105b2d19a1c55e9779ae88d775185eea231 Author: Michel Dänzer Date: Thu Mar 24 17:42:47 2016 +0900 present: Only requeue for next MSC after flip failure This code was added to deal with the driver present hook failing, in which case we need to wait for the next MSC before executing the presentation. However, it could also take effect in cases where the driver incorrectly thinks the current MSC matches the target one (e.g. due to the kernel interface only supporting 32-bit MSC values), in which case it could result in the presentation getting requeued over and over. To prevent such issues, check specifically for the target MSC immediately following the current MSC. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94596 Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard commit 8ac0e05cc6c6e87b223ba7cb31d8856771c5d41a Author: Adam Jackson Date: Wed Mar 23 14:42:08 2016 -0400 vfb: Re-add LD_EXPORT_SYMBOLS_FLAG to LDFLAGS Accidentally removed, breaks Xvfb on cygwin. Reviewed-by: Yaakov Selkowitz Signed-off-by: Adam Jackson commit a288cf58a0dc0f965a6f964c76bb86bb1989d797 Author: Dave Airlie Date: Wed Mar 16 10:45:54 2016 +1000 glamor: swizzle RED to 0 for alpha textures I'm pretty sure Eric suspected this could cause a problem, and we couldn't find a test. Well loading feedly in firefox seems to trigger badness that this solves. bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94554 Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie Tested-by: Timo Aaltonen commit 4583fa9a6cd3095d7497c075d68e7430ea3c5cb0 Author: Ángel González Date: Mon Oct 15 22:04:22 2012 +0200 security: Fix reversed comment Commit 6045506be0cebca4ebbe943ae77f020aafa703d4 changed back the behavior to only allow the trusted extensions to the untrusted clients, but left the 8b5d21cc1d1f4e9d20e5d5eca44cb1e60a419763 comment intended for Security*Un*trustedExtensions saying that "untrusted clients shouldn't have access to these". Reviewed-by: Adam Jackson Signed-off-by: Ángel González commit b78897d0a04a833720698901fbac9535570875e4 Author: Evgeny M. Zubok Date: Thu Apr 8 03:58:21 2010 -0700 xfree86: Change VBE version early-out to 1.2. (#22672) Reporter has an S3 Trio with DDC and VESA 1.2. Signed-off-by: Corbin Simpson Reviewed-by: Matt Turner commit 184fbf7541012090b8716c7eaf00895efd16d0ac Author: Adam Jackson Date: Mon Mar 14 11:37:32 2016 -0400 xfree86: Finish removing font modules Signed-off-by: Adam Jackson commit 69d1528bc35073331e281448dfb04eb4240ff472 Author: Adam Jackson Date: Thu Apr 26 16:42:20 2012 -0400 xfree86: Font modules aren't a real thing There are no longer any loadable font modules (not that they ever did much in the first place), so stop pretending they're a defined ABI surface. Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau commit 4f8151c7a4bcf2d55848e70c83b2f9ce458cf316 Author: Adam Jackson Date: Mon Mar 14 11:20:39 2016 -0400 Fix the typo from the previous patch, d'oh Signed-off-by: Adam Jackson commit 75eecf28ae3709181a51571132b0accd9cae316e Author: Chris Wilson Date: Sun Mar 13 13:54:01 2016 +0000 Xext/vidmode: Reduce verbosity of GetModeLine debug messages In commit f175cf45aebcdda53f3ae49c0eaf27da1f194e92 Author: Olivier Fourdan Date: Wed Feb 10 09:34:34 2016 +0100 vidmode: move to a separate library of its own the verbosity of some old debug messages (which print the reply to every GetModeLine client request and others) was increased leading to lots of log spam. Downgrade the logging back to DebugF. [ajax: Fix a typo so it compiles.] Reviewed-by: Adam Jackson References: https://bugs.freedesktop.org/show_bug.cgi?id=94515 Signed-off-by: Chris Wilson Cc: Olivier Fourdan commit 744c292ae49dd1f9d33b860d2b4f0ae27023809b Author: Adam Jackson Date: Fri Mar 11 13:50:32 2016 -0500 vidmode: Remove stray vidmodeproc.h from EXTRA_DIST Was removed from the tree in: commit f175cf45aebcdda53f3ae49c0eaf27da1f194e92 Author: Olivier Fourdan Date: Wed Feb 10 09:34:34 2016 +0100 vidmode: move to a separate library of its own but not removed from the Makefile, which broke 'make dist'. Signed-off-by: Adam Jackson commit 47bc7fcaa567b0d9e2627b4a21b112e96f81725b Author: Dave Airlie Date: Tue Feb 9 16:54:22 2016 +1000 present: fail flipping if we have any slave outputs Due to the way present currently works, we don't ever check with the secondary adapters if we can flip at all. We shouldn't flip if the secondary adapters are attached to the pixmap currently, however using the current check_flip callback isn't possible as it passes the Window to the driver (something we shouldn't be doing), so the slave driver can never get it's own screen ptr back. For now to fix the problem just block flips if we have any slaves configured. We can fix the ABI up later, but this fix can be backported to stable. Signed-off-by: Dave Airlie Reviewed-by: Keith Packard commit 316948734c2bba72d42c4cf4530932b5862c109f Author: Michel Dänzer Date: Fri Mar 11 12:21:06 2016 +0900 glamor: Make context current in glamor_pixmap_fbo_cache_put Without this, we may be manipulating the context of another screen. In a system with two GPUs using glamor, this fixes lots of (EE) glamor256: GL error: GL_INVALID_OPERATION in glBindTexture(non-gen name) spew since 0b4c0c75 ('glamor: Replace "finish access" shader with texture swizzling'). Signed-off-by: Michel Dänzer Reviewed-by: Dave Airlie commit ef3005da3d5dc92b3ee5a0ee78164e739a3216dc Author: Adam Jackson Date: Thu Jan 21 12:47:57 2016 -0500 glx: Implement GLX_EXT_fbconfig_packed_float The tokens for this are already defined by GLX_ARB_fbconfig_float, which we already support, so just add the extension to the list and let the driver provide those configs if it wants. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d15cb654b6ba365dac9a62064e277adebde2fdab Author: Adam Jackson Date: Mon May 18 13:00:02 2015 -0400 glx: Implement GLX_EXT_stereo_tree This is correct as it is, but only because we know no DRI drivers implement stereo. v2: Use new ATTRIB macro Reviewed-by: James Jones Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit a18238877bbf9aab95843d849a6f434275e9cd6c Author: Adam Jackson Date: Thu Mar 3 16:50:02 2016 -0500 glx: Add GLX_SCREEN to the GetDrawableAttributes response libglvnd would like to use this to map from drawable to screen, so it can know which driver to dispatch to. Refer to the spec proposal here: https://lists.freedesktop.org/archives/mesa-dev/2016-March/109543.html Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 47c1d6b7abcfb1c6b478367bbc2e869c91485bc0 Author: Adam Jackson Date: Thu Mar 10 12:29:34 2016 -0500 glx: Macroize building the attribute list in DoGetDrawableAttributes No functional change, just a little easier to read and harder to get wrong. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c01094c5312fbd84146dd83122e5256a8e57d092 Author: Eric Anholt Date: Mon Feb 1 13:58:15 2016 -0800 ephyr: Fix redisplay with glamor on GLES. glamor_transfer.c is still totally broken, though. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 0b4c0c75d06f3dbe92be1a26a637e9f05529cb3d Author: Eric Anholt Date: Mon Feb 1 13:58:14 2016 -0800 glamor: Replace "finish access" shader with texture swizzling. For pictures without alpha, and for most other formats for GLES2, we would make a temporary FBO, make another temporary texture, upload our GLAMOR_MEMORY pixmap to the texture, then run the "finish access" shader across it to swizzle its values around into the temporary FBO (which we would use for a single Render operation and then throw away). We can simplify everything by using GL_ARB_texture_swizzle (or its GLES3 counterpart). It's just not worth the complexity to try to improve the performance of this already low-performance path (SHM pixmaps + Render) on GLES2. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit b0cc04992ced5d96bb5c52fc1e5c868797cc0a17 Author: Eric Anholt Date: Mon Feb 1 13:58:13 2016 -0800 glamor: Drop dead large-pixmap handling code in temp picture uploads. The glamor_pixmap_ensure_fbo() in glamor_pixmap_upload_prepare() will always fail on a large pixmap, so we can just be explicit about bailing out here and then dump the rest of this garbage. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 094b1bea8bd08eec029e4d61ba40d81441c37905 Author: Eric Anholt Date: Mon Feb 1 13:58:12 2016 -0800 glamor: Drop unused PBO code in temporary picture uploading. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 6112fecc3a4fd7dfb0ef77a98cfd1f7c91ccea0c Author: Eric Anholt Date: Mon Feb 1 13:58:11 2016 -0800 glamor: Generalize the a1-to-a8 conversion path. Pixman is quite qualified to allocate our temporary memory, and all we need to do is decide what formats to convert from and to. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 8f1411c3847a742f84ff07c4a0bb610801f5bfee Author: Eric Anholt Date: Mon Feb 1 13:58:10 2016 -0800 glamor: Drop the REVERT_UPLOADING_1_5_5_5 path. There was only a pretty special case that could have even worked -- you've got a GLES2 renderer, you've got a SHM pixmap, it's 1555 (not the usual 565 for 16-bit), and you're little endian (BE was broken, since GL's 5_5_5_1 picks the 1 bit from the lowest bit of the short, and on BE we weren't doing the conversion path that swaps around the channels). This is just not worth the complexity. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 2cc7a0815e5e2c2b1b1267cae9c348a8e95b1082 Author: Eric Anholt Date: Mon Feb 1 13:58:09 2016 -0800 glamor: Drop the GLES2 REVERT_UPLOADING_2_10_10_10 paths. These just smash your 2_10_10_10 data into 8888, despite what the comments said. That's not valid rendering, so just ditch this path and fall back to software. One might also note in the code being removed here that the REVERT_UPLOADING_10_10_10_2 path wasn't even connected. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit f667d5177024d3fdfb1b51694bdaeba6cee67962 Author: Eric Anholt Date: Mon Feb 1 13:58:08 2016 -0800 glamor: Merge the two GL-type-from-pictformat paths. It clarifies what the difference is between the two paths, and would potentially encourage us to handle GLES extensions that expose additional types. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit c7574c63c618d3a017105c380542eb04341b04a2 Author: Eric Anholt Date: Mon Feb 1 13:58:07 2016 -0800 glamor: Propagate that is_upload is always true. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 1bed5ef2b80c77c1bb9b62971367bea864fd8f66 Author: Eric Anholt Date: Mon Feb 1 13:58:06 2016 -0800 glamor: Drop dead fbo handling from GLAMOR_MEMORY pict uploads. The previous commit asserts that we don't have one. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit ee7ca670b1695d64bc12cb37302913acc066a569 Author: Eric Anholt Date: Mon Feb 1 13:58:05 2016 -0800 glamor: Make sure that GLAMOR_MEMORY pixmaps don't retain an FBO. glamor_composite_choose_shader() may upload our scratch pixmaps to get a Render operation completed. We don't want to hang onto GL memory for our scratch pixmaps, since we'll just have to reallocate them at a new w/h next time around, and the contents will be updated as well. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit a96c6d4658e3f386002f96eede660af3b01e5209 Author: Eric Anholt Date: Mon Feb 1 13:58:04 2016 -0800 glamor: Simplify temporary picture uploading call stack. glamor_upload_sub_pixmap_to_texture() only had the one caller, so we can merge it in, fix its silly return value, and propagate a bunch of constants. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 25ce263fd88684be9370025f93ba3a2bfc72ff1a Author: Olivier Fourdan Date: Wed Mar 9 16:45:18 2016 +0100 glamor: do not build Xv support when --disable-xv Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit da7724d3d277c6c8a814881785b716896802629a Author: Olivier Fourdan Date: Wed Mar 9 16:21:18 2016 +0100 xwayland: add glamor Xv adaptor This adds an Xv adaptor using glamor. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit d11fdff50c91575e977a63617806a61bca98cd35 Author: Jon Turney Date: Fri Jan 3 13:21:40 2014 +0000 hw/xwin: Tidy-up of winmsg.h - winVMsg() has no uses, so remove - winMsgVerb() has only one use, with default verbosity, so remove - winMsg() is identical to LogMessage() - Put winDrvMsg() and winDrvMsgVerb() under XWIN_XF86CONFIG - Include what you use Xfuncproto.h for _X_ATTRIBUTE_PRINTF Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 519b98765f0c7d083a744ae7beb641753e4eb751 Author: Jon Turney Date: Thu Mar 3 22:32:28 2016 +0000 hw/xwin: Remove GC privates, unused since native GDI engine removal Unused since native GDI engine removal in commit 8465ee78 Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 9d28ff2a9be86662f56463aa1fd46d12988e30fa Author: Jon Turney Date: Fri Jul 31 20:23:59 2015 +0100 hw/xwin: Use NULL rather than NoopDDA for unimplemented engine functions Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit a309085a56de4d30dfbc44d9ff5302c7d9fdbf73 Author: Jon Turney Date: Fri Jul 31 20:20:00 2015 +0100 hw/xwin: Remove unused FinishCreateWindowsWindow engine function This only ever had an (unused) implementation in the DDNL engine, which was removed in commit 57bbf6e2. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit fa6f9d06a3d1a90134d9349f5ce4ec5b4eeff5e3 Author: Jon Turney Date: Fri Jul 31 20:12:37 2015 +0100 hw/xwin: Remove unused HotKeyAltTab engine function This was only ever used by the primaryfb engine, removed in commit c79f824b Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 7bd25aa8437ec410e7a7de1b0636ba33298fc8d6 Author: Jon Turney Date: Fri Jul 31 19:44:34 2015 +0100 hw/xwin: Return FALSE to indicate failure in winSetEngine() Return FALSE to indicate failure in winSetEngine(), if it couldn't find a drawing engine to use Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 52e05b9282f0f220d7c762793ce0b8f606a45deb Author: Jon Turney Date: Tue Feb 23 23:09:43 2016 +0000 hw/xwin: Remove WM_WM_MAP message, which is now unused Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit c42217aa3d372acaa5ca7c64895edbfbd20c8475 Author: Jon Turney Date: Mon Nov 2 20:24:33 2015 +0000 hw/xwin: Remove WM_(UN|)MANAGE messages, which are now never sent Remove fAnotherWMRunning which tracks this message (although since it was never initialized, I doubt this worked reliably), and the only use of that, which was to prevent winMWExtWMRestackWindows() from being used when the internalwm is running Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit b6bdf368420355332e41c604c523584bd39933f9 Author: Jon Turney Date: Mon Nov 2 20:51:51 2015 +0000 hw/xwin: Remove allowOtherWM, which is now always FALSE Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 8407d3096287868b5c5e50ca5a98d470918c85a9 Author: Jon Turney Date: Mon Nov 2 20:34:09 2015 +0000 hw/xwin: Remove winIsInternalWMRunning(), which now always returns FALSE Also remove then unused variables and IsRaiseonClick() v2: Also remove unused pScreenInfo variable in winMWEXtWMRestackFrame() Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 2779a28a86a13831b334e8678cd4e838b3b38472 Author: Jon Turney Date: Mon Nov 2 20:07:04 2015 +0000 hw/xwin: Remove fInternalWM flag Remove the fInternalWM flag as it is now always FALSE after removing the -internalwm option v2: Also remove then unused pRLWinPriv local from pRLWinPriv() Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 98238ece5756801a8a67b9235e42cb9ab2318633 Author: Jon Turney Date: Mon Nov 2 19:37:40 2015 +0000 hw/xwin: Ignore the obsolete, undocumented -internalwm option Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit cdeaebad9889d81d2698b8a10fec5e55d8dec7a1 Author: Jon Turney Date: Tue Mar 1 21:37:05 2016 +0000 hw/xwin: Remove the long-broken -silent-dup-error option Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 24042b4e367803dd64f3fcdc1bef7b2bf36c4145 Author: Michel Dänzer Date: Mon Dec 21 17:54:08 2015 +0900 modesetting: Allow CRTC transforms to actually take effect Setting crtc->transformPresent to FALSE was preventing the transform from actually taking effect and putting RandR into a confused state. Now that the RandR 1.2 cursor code handles transforms correctly, we can allow them to properly take effect. Reviewed-by: Keith Packard commit b04767c84deafc44993723add4b1c5163fc11711 Author: Michel Dänzer Date: Wed Oct 21 18:33:46 2015 +0900 xfree86: Re-set current cursor after RandR 1.2 CRTC configuration change Add xf86CursorResetCursor, which allows switching between HW and SW cursor depending on the current state. Call it from xf86DisableUnusedFunctions, which is called after any CRTC configuration change such as setting a mode or disabling a CRTC. This makes sure that SW cursor is used e.g. while a transform is in use on any CRTC or while there are active PRIME output slaves, and enables HW cursor again once none of those conditions are true anymore. Reviewed-by: Keith Packard commit a4ffa8721debb34bd36fd4624890d9c26886c618 Author: Michel Dänzer Date: Thu Dec 24 12:56:03 2015 +0900 xfree86/modes: Check for CRTC transforms in xf86_use_hw_cursor(_argb) (v2) We currently don't handle transforms for the HW cursor image, so return FALSE to signal a software cursor must be used if a transform is in use on any CRTC. v2: Check crtc->transformPresent instead of crtc->transform_in_use. The latter is TRUE for rotation as well, which we handle correctly. Reviewed-by: Keith Packard commit c3e4e9fc5d84bfc17b3ed63f67488ea25ba150ce Author: Michel Dänzer Date: Thu Dec 24 16:20:49 2015 +0900 xfree86/modes: Refactor xf86_use_hw_cursor_argb to use xf86_use_hw_cursor (v2) This reduces code duplication. v2: No functional change this time. Reviewed-by: Keith Packard commit a3e681eafa5355b8bb3b099d47983f14f0d5e197 Author: Michel Dänzer Date: Tue Feb 23 17:19:03 2016 +0900 glamor: Source pictures are always depth 32 We were using the destination pixmap depth to determine the source picture format. Fixes incorrect text rendering with some MATE desktop GTK3 themes. Reviewed-by: Adam Jackson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94246 Signed-off-by: Michel Dänzer commit b05ae79ee3bebef9790c97eedc033d1ffb3ec39a Author: Michel Dänzer Date: Tue Feb 23 17:19:02 2016 +0900 glamor: Factor out glamor_set_color_depth from glamor_set_color The former takes explicit screen and depth parameters instead of deriving them from a pixmap. Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit 947e94a341fa153258e9e86060b83af95934672b Author: Hans de Goede Date: Wed Feb 10 16:40:43 2016 +0100 glamor: Fix XvPutImage when src_y != 0 We already take src_y into account when uploading the src data by starting at the top line of the src data when uploading. Adjust src_y accordingly when rendering. Signed-off-by: Hans de Goede commit 40a164b8f4e720b0d6ebf228ee175eb397ffeec2 Author: Rui Matos Date: Fri Mar 4 16:24:48 2016 +0100 build: Enable vidmode independently from Xorg This allows building Xwayland without Xorg and still include the vidmode extension. v2: Use PKG_CHECK_EXISTS instead of PKG_CHECK_MODULES Signed-off-by: Rui Matos Reviewed-by: Emil Velikov commit 2be527b1d4ce2b0412c4484539a8c9607645ec6d Author: Julien Cristau Date: Mon Mar 7 23:20:34 2016 +0100 xfixes: avoid double free if AddResource fails pChc is already freed through CursorFreeHideCount → deleteCursorHideCount. Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit 4217db89ecd480fda2ee74fecba06c6713c2a0f0 Author: Julien Cristau Date: Mon Mar 7 23:20:33 2016 +0100 render: free already allocated formats in PictureInit failure case Probably pointless, if this fails you're not likely to get far... Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit 054f80717812d4781741cd05393623fe6f6c627f Author: Julien Cristau Date: Mon Mar 7 23:20:32 2016 +0100 record: don't call RecordDeleteContext when AddResource fails Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit d0c1a5bc61a3d151f2234aa3820862f16c0f00c7 Author: Julien Cristau Date: Mon Mar 7 23:20:31 2016 +0100 xwin: no need to free auth data if AddResource fails This is taken care of by SecurityDeleteAuthorization Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit acf263df81ad6813e0233033610fb44521cab1b4 Author: Julien Cristau Date: Mon Mar 7 23:20:30 2016 +0100 modesetting: avoid double free if AddResource fails ms_dri2_frame_event_client_gone or ms_dri2_frame_event_drawable_gone already free the resource. Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit 164753f158e78f615f903467bfd234d7c58244ef Author: Julien Cristau Date: Mon Mar 7 23:20:29 2016 +0100 dmx/glxProxy: don't free the glx pixmap twice if AddResource fails Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit 59b9c3d5e4bf05aeaaac2ee4ea12c301a67aae2c Author: Julien Cristau Date: Mon Mar 7 23:20:28 2016 +0100 glx: don't call pGlxDraw->destroy() if AddResource fails AddResource will have called DrawableGone, which takes care of the destruction. Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit ac97fb2b804809c39b12fe0032d96fb076657258 Author: Julien Cristau Date: Mon Mar 7 23:20:27 2016 +0100 dri3: return an error if AddResource fails Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit 119d5c0e2f800737c949ef760c5fe25d963200bf Author: Julien Cristau Date: Mon Mar 7 23:20:26 2016 +0100 xvmc: Fix unchecked AddResource Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit a2c3c34b44b866440a152511e682c98879ee13b7 Author: Jonas Ådahl Date: Tue Mar 8 20:05:33 2016 +0800 xwayland: Correctly detect whether posix_fallocate exists We had HAVE_POSIX_FALLOCATE checks, but no such macros were ever defined anywhere. This commit makes it so that this macro is defined if the posix_fallocate is detected during configure. Signed-off-by: Jonas Ådahl Reviewed-by: Julien Cristau commit 939ce0bae68b682b57675f65c901653c1a094ebb Author: Julien Cristau Date: Tue Mar 1 21:39:01 2016 +0100 xv: fix double free in AddResource failure case XvdiDestroyVideoNotifyList already frees the list if AddResource fails, so don't do it twice. And set tpn->client to NULL explicitly to avoid confusing uninitialized memory with a valid value. Reviewed-by: Adam Jackson Signed-off-by: Julien Cristau commit 05e1bcf56e1c511a1ef539acfe11e37727e1179e Author: Adam Jackson Date: Tue Mar 1 14:09:30 2016 -0500 dri1: Fix unchecked AddResource Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau commit 093f9505c12565cc19bdf6e33b263f31d104c3ef Author: Adam Jackson Date: Tue Mar 1 14:09:29 2016 -0500 xv: Fix unchecked AddResource Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit ac4d8c7cee13947b688ebb26035f06f7744db201 Author: Olivier Fourdan Date: Tue Mar 1 17:03:44 2016 +0100 vidmode: build without xf86vidmodeproto git commit f175cf45: vidmode: move to a separate library of its own introduced a regression where the xserver would not build when xf86vidmodeproto is not installed even if the configure option "--disable-xf86vidmode" is specified. Fix build failure when xf86vidmodeproto is not installed. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 9c88cb9b059111e0531852f3fa8fa571c0306f57 Author: Laércio de Sousa Date: Thu Feb 25 16:37:57 2016 -0300 kdrive/ephyr: map host X server's keymap into Xephyr, if supported Currently Xephyr doesn't inherit host X server's keymap, which may lead to keymap mismatches when using a non-US keyboard in a window inside Xephyr. This patch makes Xephyr change its keymap to match host X server's one (unless XKB support is disabled), using xcb-xkb to retrieve the needed XKB controls. This implementation is analogous to Xnest one at commit 83fef4235. Supersedes: https://patchwork.freedesktop.org/patch/67504 Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit daa6d2d58f65b9301b1b1f3c6df07719ecb5c03d Author: Laércio de Sousa Date: Fri Feb 12 14:18:02 2016 -0200 config/udev: distinguish between real keyboards and other key devices This patch introduces a new flag ATTR_KEY for hotplugged input devices, so we can better distinguish between real keyboards (i.e. devices with udev property ID_INPUT_KEYBOARD="1") and other key input devices like lid switches, power buttons, etc. All supported hotplug backends (udev, hal, and wscons) will set both flags ATTR_KEY and ATTR_KEYBOARD for real keyboards, but udev backend will set ATTR_KEY, but not ATTR_KEYBOARD, for non-keyboard key input devices (hal and wscons will set both flags in any case). With this distinction, kdrive input hotplugging mechanism will be allowed to only grab real keyboards, as other key input devices are currently not supported. In order to don't break current behaviour, this patch will replace all ATTR_KEYBOARD occurrences with ATTR_KEY in hw/xfree86/common/xf86Xinput.c. [ajax: Just add ATTR_KEY, don't re-number the other attributes] Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 851ff9ec04b73412c7dbad7b4911a1feac21f354 Author: Laércio de Sousa Date: Fri Feb 12 14:18:01 2016 -0200 ephyr: enable option -sw-cursor by default in multi-seat mode Option -seat passed to Xephyr requires -sw-cursor to be passed as well, otherwise the mouse cursor will remain invisible for the given seat. This patch takes care of enabling -sw-cursor if -seat is passed. Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 40e32e9fc9f3a1bd8287ee03dd399d8161cb98dd Author: Laércio de Sousa Date: Fri Feb 12 14:18:00 2016 -0200 kdrive: add options to set default XKB properties This patch introduces convenient command-line options -xkb-rules, -xkb-model, -xkb-layout, -xkb-variant, and -xkb-options, to set default values for these properties. These options can be handful for cases in which compile-time default values don't match user locale, since kdrive doesn't support InputClass matching rules yet and not all Linux distros provide default rules to store these values in udev properties (which by the way is a discouraged practice). Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 0cf3d72be6bd99cd2c66b7885339322c7e5bf73d Author: Laércio de Sousa Date: Fri Feb 12 14:17:59 2016 -0200 kdrive: introduce input hot-plugging support for udev and hal backends (#33140) This patch introduces input hot-plugging support for kdrive-based applications in multi-seat context. This feature is enabled by passing -seat option with desired seat name. All keyboard/mouse devices assigned to that seat will be automatically grabbed by kdrive. It supports udev and hal backends for input hot-plugging support. Another patches may be required for wscons backend. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=33140 Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 2116f03be04240e961649ca750a7aa5438b8446c Author: Olivier Fourdan Date: Mon Feb 8 17:48:26 2016 +0100 xwayland: fix a crash on output removal On output removal, the CRTC that was added in xwl_output_create() is not removed in xwl_output_destroy() and would cause a segmentation fault later on in ProcRRGetMonitors(): (EE) Segmentation fault at address 0x100000001 (EE) (EE) 10: ? (?+0x29) [0x29] (EE) 9: /usr/bin/Xwayland (_start+0x29) [0x423299] (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7fdd80e7f580] (EE) 7: /usr/bin/Xwayland (dix_main+0x3b3) [0x544ef3] (EE) 6: /usr/bin/Xwayland (Dispatch+0x31e) [0x54109e] (EE) 5: /usr/bin/Xwayland (ProcRRGetMonitors+0x9b) [0x4ca18b] (EE) 4: /usr/bin/Xwayland (RRMonitorMakeList+0x269) [0x4c9ba9] (EE) 3: /usr/bin/Xwayland (RRMonitorSetFromServer+0x118) [0x4c9198] (EE) 2: /usr/bin/Xwayland (MakeAtom+0x30) [0x530710] (EE) 1: /lib64/libc.so.6 (__restore_rt+0x0) [0x7fdd80e93b1f] (EE) 0: /usr/bin/Xwayland (OsSigHandler+0x29) [0x5792d9] Remove the output CRTC in xwl_output_destroy() to avoid the crash. Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 1bee4e254ca0305cb23e574b4c8b250d276ee998 Author: Michel Dänzer Date: Thu Feb 18 17:33:19 2016 +0900 present: Call present_restore_screen_pixmap from present_set_abort_flip After present_set_abort_flip, the screen pixmap will be used for all screen drawing, so we need to restore the current flip pixmap contents to the screen pixmap here as well. Improves flashing / stutter e.g. when something like a popup menu appears on top of a flipping fullscreen window or when switching out of fullscreen. Note that this means present_set_abort_flip now relies on screen->root being non-NULL, but that's already the case in other present code. Reviewed-by: Keith Packard Reviewed-by: Chris Wilson commit 4611e902c291b8a789f374cff3300f74645bc2b2 Author: Michel Dänzer Date: Thu Feb 18 17:20:45 2016 +0900 present: Factor code for restoring screen pixmap out of present_unflip (v2) The following fix will use the refactored function. The logic in the refactored function is slightly simplified, exploiting the fact that this function is only ever called with a valid flip pixmap. v2: Assert that flip_pixmap is non-NULL instead of testing and bailing on NULL, preserve test for flip_window being non-NULL before calling present_set_tree_pixmap for it (Keith Packard) Reviewed-by: Chris Wilson (v1) Reviewed-by: Keith Packard commit 72328e5eb98a3f27e1f0a0e17beae6db447bd87c Author: Michel Dänzer Date: Thu Feb 18 18:23:47 2016 +0900 present: Only update screen pixmap from flip pixmap once per unflip present_unflip may be called several times from present_check_flip_window during the same unflip. We can only copy to the screen pixmap the first time, otherwise we may scribble over other windows. The flip pixmap contents don't get updated after the first time anyway. Fixes at least the following problems, which were introduced by commit 806470b9 ("present: Copy unflip contents back to the Screen Pixmap"): On xfwm4 without compositing, run glxgears and put its window into fullscreen mode to start flipping. While in fullscreen, open the xfwm4 window menu by pressing Alt-Space. The window menu was invisible most of the time because it was getting scribbled over by a repeated unflip copy. When switching a flipping window out of fullscreen, a repeated unflip copy could leave artifacts of the flip pixmap on the desktop. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94325 Reviewed-by: Keith Packard Reviewed-by: Chris Wilson commit 43eb5b6047c9b35c337e553ec054f08bdc835abb Author: Michel Dänzer Date: Tue Dec 8 12:52:17 2015 +0900 dri3: Refuse to work for remote clients (v2) Prevents clients forwarded via SSH from hanging while waiting for the reply from the DRI3Open request. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93261 v2: Return BadMatch instead of BadRequest (Keith Packard) Reviewed-by: Keith Packard commit 6070a749d953951bacbfb149c5c36451293aad35 Author: Olivier Fourdan Date: Wed Feb 10 09:35:39 2016 +0100 xwayland: add partial xvidmode extension support Older games (mostly those based on SDL 1.x) rely on the XVidMode extension and would refuse to run without. Add a simple, limited and read-only xvidmode support that reports the current mode used so that games that rely on xvidmode extension can run on XWayland. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87806 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit b430f53bb753f9b064ab62d014820c1c3c76a841 Author: Olivier Fourdan Date: Fri Feb 5 09:48:25 2016 +0100 vidmode: remove redundant DIX function The API signature of the DIX xf86VidModeGetGammaRampSize() is now identical to the xf86cmap's xf86GetGammaRampSize() and all it does is actually call xf86GetGammaRampSize() so we can save one vfunc. Remove uneeded xf86VidModeGetGammaRampSize() function. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 48fccde2bfb60efdbf45a96fa53bcd9a6570bf89 Author: Olivier Fourdan Date: Fri Feb 5 09:48:24 2016 +0100 vidmode: remove redundant check The DIX already checks for VidModePrivateKey to get the vfunc, so checking for this again in the DDX is redundant. Remove the redundant function xf86VidModeAvailable() from the DDX. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit f175cf45aebcdda53f3ae49c0eaf27da1f194e92 Author: Olivier Fourdan Date: Wed Feb 10 09:34:34 2016 +0100 vidmode: move to a separate library of its own XVidMode extension might be useful to non hardware servers as well (e.g. Xwayand) so that applications that rely on it (e.g. lot of older games) can at least have read access to XVidMode. But the implementation is very XFree86 centric, so the idea is to add a bunch of vfunc that other non-XFree86 servers can hook up into to provide a similar functionality. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87806 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 17097e083b2392c8989474f6e0da8cc234329e9c Author: Olivier Fourdan Date: Fri Feb 5 09:48:22 2016 +0100 vidmode: rename DDX functions To avoid confusion as to what belongs on the DDX and what not. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit ddfb8c009ac651209eb0087aaf86b54e1446e8b2 Author: Olivier Fourdan Date: Fri Feb 5 09:48:21 2016 +0100 vidmode: move display mode definitions To be able to reuse the VidMode extension in a non-hardware server, the display mode definitions need to be accessible from DIX. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit e29a64de662112b8ebcd3f20c89df0e8c51890ef Author: Olivier Fourdan Date: Fri Feb 5 09:48:20 2016 +0100 vidmode: remove mode access from public API The mode access functions (namely VidModeCreateMode(), VidModeCopyMode(), VidModeGetModeValue() and VidModeSetModeValue()) are used only in xf86VidMode code and do not need to be available anywhere else. Remove these functions from the public VidMode API and move them as static where they are used. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit b7962ade5265a21ac7c60da6cc07ece15ef7e648 Author: Olivier Fourdan Date: Fri Feb 5 09:48:19 2016 +0100 vidmode: use appropriate DisplayModePtr type The API uses an untyped pointer (void *) where a DisplayModePtr is expected. Clean up the API to use the appropriate type, as DisplayModePtr is really all that will be passed there. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 12f714fd95dc9d912c0bf2524005a73ec6e8ee4f Author: Olivier Fourdan Date: Fri Feb 5 09:48:18 2016 +0100 vidmode: remove VidModeGetMonitor() VidModeGetMonitor() is used solely in ProcXF86VidModeGetMonitor() to get a untyped monitor pointer that is passed back straight again to VidModeGetMonitorValue(). This is actually useless as VidModeGetMonitorValue() could as well get the monitor from the ScreenPtr just like VidModeGetMonitor() does. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit f6f7e21133c13c34f306a191137d566e83b40929 Author: Olivier Fourdan Date: Fri Feb 5 09:48:17 2016 +0100 vidmode: use ScreenPtr instead of screen index New code passes ScreenPtr instead of the screen index. Change the VidMode functions to take a ScreenPtr. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 6e898ef080df93e885ead9d6fee8854b34e0216f Author: Olivier Fourdan Date: Fri Feb 5 09:48:16 2016 +0100 vidmode: get rid of the CloseScreen wrapper As we rely on dixRegisterPrivateKey() to allocate the memory for us that will be free automatically, we do not need the CloseScreen wrapper anymore. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 341f3bccafde71754a9ed2303df9908e509c6d31 Author: Olivier Fourdan Date: Fri Feb 5 09:48:15 2016 +0100 vidmode: use appropriate API dixRegisterPrivateKey() can allocate memory that will be freed when the screen is teared down. No need to calloc() and free the memory ourself using a broken ref counting method. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit d8882954570aba656d5a7be7d357feaba21cb099 Author: Chris Wilson Date: Fri Feb 12 11:59:53 2016 +0000 dri2: Allow many blocked clients per-drawable This patch was motivated by the need to fix the use-after-free in dri2ClientWake, but in doing so removes an arbitrary restriction that limits DRI2 to only blocking the first client on each drawable. In order to fix the use-after-free, we need to avoid touching our privates in the ClientSleep callback and so we want to only use that external list as our means of controlling sleeps and wakeups. We thus have a list of sleeping clients at our disposal and can manage multiple events and sources. Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit bc3634010c096dffd1935c0c6cf8ba37534ae3d8 Author: Chris Wilson Date: Fri Feb 12 11:59:52 2016 +0000 dix: Add ClientSignalAll() This is a variant of ClientSignal() that signals all clients with an optional matching sleeping client, function and closure. Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit 9fecc4cd571641f8920f25473ce5abb3fdca8b40 Author: Jon Turney Date: Tue Jan 12 16:18:35 2016 +0000 xwin: Remove unhelpful debug about WM message queue size Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit f7d1e5acdf5ed4ab4ed5c18727aa6f3d379ef560 Author: Jon Turney Date: Tue Aug 11 15:45:57 2015 +0100 xwin: Add SKIPTASKBAR hint to _NET_WM_WINDOW_TYPE_DOCK type windows Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit e7f87f8f76e5ac9479a71e3daf2cfdefd4b5f684 Author: Jon Turney Date: Thu Jul 2 19:21:11 2015 +0100 xwin: In multiwindow mode, look up the HWND for the parent window Rather than only looking at the foreground window to see if it matches the WM_TRANSIENT_FOR window XID, lookup that XID and fetch the HWND from the window privates. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 856a28f63739bffe32f5a8156fd2680e5c5259a1 Author: Jon Turney Date: Thu Jul 2 13:32:40 2015 +0100 xwin: Factor out MessageName() debug helper Factor out the MessageName() debug helper for message id -> text, and use it on message queue and dequeue. Reorder in numerical order to match winwindow.h Add missing WM_WM_ICON_EVENT Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 8c2006ddc5abbd4ac374dabf1cfdd3df8fc88779 Author: Jon Turney Date: Mon Feb 22 17:41:14 2016 +0000 xwin: Keyboard layout updates layout zh_TW doesn't exist (anymore), try something else for that. layout it variant mac doesn't seem to exist anymore, try to handle Macintosh keyboards (running under Parallels on Mac) and other oddities in a more generic way, by falling back to matching only on the language identifer part of the input locale identifer. v2: Fix typo of 0xa0000 for 0xa000 Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 8c97a0078e7fe22e6159fa53490dfca2f4d267a9 Author: Colin Harrison Date: Wed Nov 19 22:33:39 2014 +0000 xwin: Add a tentative entry for the Korean keyboard to the list of known keyboard layouts Signed-off-by: Colin Harrison Reviewed-by: Jon Turney commit a4d8a64c4ba467964476c4a1486da698bd6aed9e Author: Jon Turney Date: Tue Feb 10 14:36:37 2015 +0000 xwin: Update to XRANDR 1.2 internal interface to ensure an output is reported by XRANDR If using the X server internal XRANDR 1.0 interface, it seems we must register a display size with RRRegisterSize() in order to make RRGetInfo() call RRScanOldConfig() to generate an output and crtc for us. Without this, the following GDM bug means that an XDMCP session to GDM cannot be started. https://bugzilla.gnome.org/show_bug.cgi?id=736054 Instead, use the more recent XRANDR 1.2 internal interface to explicitly create the output and crtc, and maintain a single mode which represents the current display size. Also don't emit a RRScreenSizeNotify when a RRScreenSizeSize is done which has no effect, this seems to throw the GDM greeter into a loop... v2: Maintain reference count for the mode we maintain more correctly, to avoid double free causing a crash on shutdown Connect crtc to output, so a subsequent RRSetCrtcConfig request doesn't change anything, so we don't fail due to our lack of rrSetConfig or rrCrtcSet hooks. See https://cygwin.com/ml/cygwin-xfree/2015-02/msg00032.html v3: Raise limit on X display size from 4Kx4K to 32Kx32K Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 008efebda801b9b80e2ab3f2c95aeef8c82102ee Author: Jon Turney Date: Sat Oct 18 17:31:57 2014 +0100 xwin: Use WM_CLIPBOARDUPDATE clipboard API Windows Vista and later have a saner clipboard API where the clipboard viewer linked list is no longer maintained by applications. Use it where available. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit de7f1fd6f8f10f07b366ae5428a8c65a224bda98 Author: Jon Turney Date: Wed Jul 9 14:26:54 2014 +0100 xwin: Check that window position is visible on non-rectangular virtual desktops Improve the check that window position is visible to work correctly for non-rectangular virtual desktops Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit a9e73131b6453e0fa2da5360e84af7a2eae3b205 Author: Jon Turney Date: Thu May 8 11:40:39 2014 +0100 xwin: Correctly interpret WM_HINTS, WM_NORMAL_HINTS properties on x86_64 Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit d7cef6fbe23381b31c163468f349feee2f1b1eba Author: Jon Turney Date: Thu Mar 13 18:04:17 2014 +0000 xwin: Improve handling of no-decoration motif hint When motif decoration hint asks for no decoration, don't add sysmenu, mimimize or maximimize controls. (This fixes a problem with e.g. fbpanel having a minimize control, but gtk's panel_configure_event() doesn't like the state we put the window into when we minimize it, causing it to spin) Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit f75404be3ad94c8da493688397712c65ea66cb90 Author: Jon Turney Date: Fri Mar 28 16:57:48 2014 +0000 xwin: XGetWMNormalHints() returns non-zero on success XGetWMNormalHints() doesn't actually return a Status value. On success it returns a non-zero value, not Success. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 9dc32746f2cd161b512cce8f39c95287bdf1a3a3 Author: Jon Turney Date: Tue Nov 10 10:27:07 2015 +0000 xwin: Fix format warnings when ./configured --enable-debug --enable-windowswm Fix format warnings (mainly pointer format fixes) which show up when ./configured --enable-debug --enable-windowswm Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit b4ac7b142fa3c536e9b283cfd34b94d82c03aac6 Author: Michel Dänzer Date: Wed Feb 24 16:52:59 2016 +0900 present: Only requeue if target MSC is not reached after an unflip While present_pixmap decrements target_msc by 1 for present_queue_vblank, it leaves the original vblank->target_msc intact. So incrementing the latter for requeueing resulted in the requeued presentation being executed too late. Also, no need to requeue if the target MSC is already reached. This further reduces stutter when a popup menu appears on top of a flipping fullscreen window. Reviewed-by: Chris Wilson Signed-off-by: Michel Dänzer commit e7a35b9e16aa12970908f5d55371bb1b862f8f24 Author: Michel Dänzer Date: Wed Feb 24 16:52:58 2016 +0900 present: Requeue if flip driver hook fails and target MSC not reached For flipping, we wait for the MSC before the target MSC and then call the driver flip hook. If the latter fails, we have to wait for the target MSC before falling back to a copy, or else it's executed too early. Fixes glxgears running at unbounded framerate (not synchronized to the refresh rate) in fullscreen if the driver flip hook fails. Reviewed-by: Chris Wilson Signed-off-by: Michel Dänzer commit 1a9f8c4623c4e6b6955cb6d5f44d29c244dfd32a Author: Michel Dänzer Date: Wed Feb 24 16:52:57 2016 +0900 present: Move msc_is_(equal_or_)after to the top of present.c To make them usable from any other function in the file. No functional change. Reviewed-by: Chris Wilson Signed-off-by: Michel Dänzer commit 0461bca0cb2f7918c77ed45d2cbc756cf65021be Author: Laércio de Sousa Date: Mon Feb 22 16:04:12 2016 -0300 kdrive/evdev: update keyboard LEDs (#22302) Implement missing parts in kdrive evdev driver for correct update of evdev keyboard LEDs. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=22302 [ajax: Fixed deref-before-null-check bug] Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 30b7d7995ef70b7473e0fb170eb8ae23b8d1f4a7 Author: Jon TURNEY Date: Mon Feb 22 16:20:00 2016 +0000 Fix build on Cygwin by ensuring WIN32 check triggers only on MinGW The type of fd_mask was changed in Cygwin 2.4.0 headers from 'long' to 'unsigned long'. This exposes an existing problem with winauth.c, which includes Xwindows.h (which includes windows.h, which defines WIN32), before including osdep.h, which causes the now conflicting definition of fd_mask in osdep.h to be exposed: In file included from ../os/osdep.h:198:18: error: conflicting types for ‘fd_mask’ typedef long int fd_mask; /usr/include/sys/select.h:46:23: note: previous declaration of ‘fd_mask’ was here typedef unsigned long fd_mask; Adjust the include guards in osdep.h to make sure we only use WIN32 guarded code when not compiling for Cygwin (i.e. WIN32 && !__CYGWIN__) This isn't a very elegant, but unfortunately appears to be the best solution, since it doesn't seem to be possible to write the test in a positive form. Future work: Should also audit of all the other uses of WIN32 in xserver, and make sure they are correct. Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit 544b4149268561d3d794aa540172831fa7550a20 Author: Jonas Ådahl Date: Fri Feb 19 15:08:12 2016 +0800 xwayland: Prefix shm tmp file names with xwayland Prefix the temporary file names used for allocating pixmaps with "xwayland-" instead of "weston-". This makes it less confusing while looking at the file names of the currently open fds of the Xwayland process. Reviewed-by: Adam Jackson Signed-off-by: Jonas Ådahl commit 5627708e5f447d0e360bbc9eb8d1c4e58c5046d0 Author: Marc-Andre Lureau Date: Fri Feb 12 22:52:07 2016 +0100 dri2: add virtio-gpu pci ids Add virtio-gpu legacy + 1.0 pci ids, allowing them to use modesetting + glamor with dri2. Signed-off-by: Marc-André Lureau Reviewed-by: Dave Airlie commit e957a2e5dd288f515f3e93724823542c20333f6a Author: Daniel Stone Date: Fri Feb 12 16:36:59 2016 +0000 dix: Add hybrid full-size/empty-clip mode to SetRootClip 216bdbc735 removed the SetRootClip call in the XWayland output-hotplug handler when running rootless (e.g. as a part of Weston/Mutter), since the root window has no storage, so generating exposures will result in writes to invalid memory. Unfortunately, preventing the segfault also breaks sprite confinement. SetRootClip updates winSize and borderSize for the root window, which when combined with RRScreenSizeChanged calling ScreenRestructured, generates a new sprite-confinment area to update it to the whole screen. Removing this call results in the window geometry being reported correctly, but winSize/borderSize never changing from their values at startup, i.e. out of sync with the root window geometry / screen information in the connection info / XRandR. This patch introduces a hybrid mode, where we update winSize and borderSize for the root window, enabling sprite confinement to work correctly, but keep the clip emptied so exposures are never generated. Signed-off-by: Daniel Stone Tested-by: Olivier Fourdan Reviewed-by: Adam Jackson commit dbe8d03c42f01332b3dc41fe9290aed142f1436f Author: Keith Packard Date: Tue Feb 16 20:03:57 2016 -0800 randr: Send ConfigNotify when manual monitor list changes This lets clients know that the layout of the monitors on the screen has changed so they can adapt appropriately. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit eddf848c44349c7ebc7da9957bffb3630f3faaa9 Author: Adam Jackson Date: Wed Feb 10 11:13:04 2016 -0500 dri2: Use the work queue to manage client sleeps In commit e43abdce964f5ed9689cf908af8c305b39a5dd36 Author: Chris Wilson Date: Wed Feb 3 09:54:46 2016 +0000 dri2: Unblock Clients on Drawable release we try to wake up any blocked clients at drawable destruction. But by the time we get there, CloseDownConnection has already torn down state that AttendClient wants to modify. Using ClientSleep instead of IgnoreClient puts a wakeup function on a workqueue, and the queue will be cleared for us in CloseDownClient before (non-neverretain) resource teardown. Tested-by: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Adam Jackson commit b3e9c534e2b0dc2c9acd2fe9b942e1fc5227339b Author: Adam Jackson Date: Mon Feb 8 17:36:03 2016 -0500 os: unifdef STREAMSCONN Removed from xtrans in 2012, and never wired up in the modular build anyway. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit e43abdce964f5ed9689cf908af8c305b39a5dd36 Author: Chris Wilson Date: Wed Feb 3 09:54:46 2016 +0000 dri2: Unblock Clients on Drawable release If the Window is destroyed by another client, such as the window manager, the original client may be blocked by DRI2 awaiting a vblank event. When this happens, DRI2DrawableGone forgets to unblock that client and so the wait never completes. Note Present/xshmfence is also suspectible to this race. Testcase: dri2-race/manager Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä commit a722d617a092f08f69086630f5cfb598d4a21cc7 Author: Adam Jackson Date: Wed Dec 9 09:10:13 2015 -0500 autogen: Set a default subject prefix for patches Per discussion at XDC2015, we want this so we can easily distinguish which module a patch is for. There's no way to set this in the server-side config, so setting a default at autogen time is about the best we can do. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 7bb64d8c1de9659f11da7917772919b071e9db82 Author: Jan Burgmeier Date: Thu Feb 4 14:06:43 2016 +0100 Fix XineramaQueryScreens for reverse prime Make sure we account for slave CRTCs when building the monitor list, since that's what rrxinerama uses to fake Xinerama geometry. [ajax: Slightly more informative commit message.] Bugzilla: https://bugs.freedesktop.org/92313 Reviewed-by: Dave Airlie commit 87d5534f701242d7c23aa20545a6292a0779c89c Author: Rui Matos Date: Wed Feb 3 16:14:09 2016 +0100 xwayland: Clear pending cursor frame callbacks on pointer enter The last cursor frame we commited before the pointer left one of our surfaces might not have been shown. In that case we'll have a cursor surface frame callback pending which we need to clear so that we can continue submitting new cursor frames. Signed-off-by: Rui Matos Reviewed-by: Bryce Harrington Acked-by: Pekka Paalanen Reviewed-by: Daniel Stone Reviewed-by: Jonas Ådahl commit b7d392931a309d0fe754869efb456ccd0385f3aa Author: Chris Wilson Date: Wed Feb 3 09:54:43 2016 +0000 dri2: Only invalidate the immediate Window upon SetWindowPixmap All callers of SetWindowPixmap will themselves be traversing the Window heirarchy updating the backing Pixmap of each child and so we can forgo doing the identical traversal inside the DRI2SetWindowPixmap handler. Reported-by: Loïc Yhuel Link: http://lists.x.org/archives/xorg-devel/2015-February/045638.html Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä commit da69f2f15a9917c3ed04e305061683c41338126e Author: Laércio de Sousa Date: Fri Dec 11 11:43:14 2015 -0200 ephyr: don't load ephyr input driver if -seat option is passed When used for single-GPU multi-seat purposes, there's no need to enable ephyr virtual input devices, since Xephyr is supposed to handle its own hardware devices. Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 7213e99cbc38a60f0076bc2115b144798ea4c3ba Author: Laércio de Sousa Date: Fri Dec 11 11:43:13 2015 -0200 ephyr: ignore Xorg multiseat command line options Multi-seat-capable display managers commonly pass command-line options like "-novtswitch", "-sharevts", or "-layout seatXXXX" to Xorg server, but Xephyr currently refuses to start if these options are passed to it, which may break Xephyr-based single-GPU multiseat setups. [ajax: shortened summary] Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit edd443f69ea385a957b8eae0b066ad8e77fb947b Author: Laércio de Sousa Date: Fri Dec 11 11:43:11 2015 -0200 kdrive: don't let evdev driver overwrite existing device names KDrive evdev driver deliberately name grabbed devices as "Evdev mouse" or "Evdev keyboard". This patch will make it skip this step if grabbed devices are already named (i.e. from udev). Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 0b80da0d18713df4712c05973388b6226bb0227f Author: Laércio de Sousa Date: Fri Dec 11 11:43:07 2015 -0200 kdrive: set "evdev" driver for input devices automatically, if available. If kdrive input driver "evdev" is available, no other driver was explicitly set for a given input device, and its kernel device node is /dev/input/event*, this patch will make kdrive set "evdev" driver automatically for such device. Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 6d6fd688ecf95f2e84f2af276d681ff42f9d5610 Author: Laércio de Sousa Date: Fri Dec 11 11:43:06 2015 -0200 kdrive: fix up NewInputDeviceRequest() implementation This patch simplifies NewInputDeviceRequest() implementation in kinput.c, making use of improved KdParseKbdOptions() / KdParsePointerOptions() and merging several "if (ki)"/"if (pi)" clauses. Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 2c3e8768443caa66d78775ea79bb16a5faae3a3c Author: Eric Anholt Date: Wed Jan 27 11:26:16 2016 -0800 glamor: Flip around conditionals in RepeatNone fixups. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit e82c8c81df80de487aa795d69e874a0811c537ea Author: Eric Anholt Date: Wed Jan 27 11:21:05 2016 -0800 glamor: Cut down a bunch of conditional handling for RepeatFix. For hardware that doesn't do actual jumps for conditionals (i915, current vc4 driver), this reduces the number of texture fetches performed (assuming the driver isn't really smart about noticing that the same sampler is used on each side of an if just with different coordinates). No performance difference on i965 with x11perf -magpixwin100 (n=40). Improves -magpixwin100 by 12.9174% +/- 0.405272% (n=5) on vc4. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 2c3273861cdf874b165ce5a1953102187f71b48e Author: Eric Anholt Date: Wed Jan 27 11:15:27 2016 -0800 glamor: Clarify how the repeat values being passed around work. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 990a8ee01324332ee9b4a4bb124ce8f73be24349 Author: Eric Anholt Date: Wed Jan 27 11:10:14 2016 -0800 glamor: Clean up formatting of RepeatFix shader code. All sorts of weird indentation, and some cuddled conditional statements deep in the if tree. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 20cb5b2d65ce63ea7934b77f1520387550c778a8 Author: Eric Anholt Date: Wed Jan 27 10:24:17 2016 -0800 glamor: Clarify some logic in RepeatFix handling. wh ratios are != 1.0 only when large, so with that we can simplify down how we end up with RepeatFix being used. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 07f0d90e4a8b05ef968b1ef47acda7c9f4580340 Author: Eric Anholt Date: Tue Jan 26 17:29:48 2016 -0800 glamor: Simplify the pixmap box looping. We had a double loop across h and w, and passed the current x and y out to callers who then used w to multiply/add to an index. Instead, just single loop across w * h. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 0dbce65b08f4812dcaa4b77cd37aebac334c47a2 Author: Eric Anholt Date: Tue Jan 26 15:56:27 2016 -0800 glamor: Reuse the glamor_program_alpha_* enums for Render. This is a step toward using glamor_program.c for Render acceleration. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 9b676786de32f06aedf9d4c9535c10fda247335a Author: Eric Anholt Date: Tue Jan 26 15:47:01 2016 -0800 glamor: Drop extra SHADER_IN type for no mask present. We can just hand in a constant mask and the driver will optimize away the multiplication for us. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 03f34f85563c81e1655626e10f75fd7e21393c92 Author: Eric Anholt Date: Tue Jan 26 15:19:50 2016 -0800 glamor: Convert XV to using glamor_program.c. One less custom path! By following the common glamor_program.c use pattern, we get the ability to handle large pixmaps as the destination. It's also one less place where glamor_utils.h coordinate transformation happens. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit f368a0ba3aa58e5260d839d11d2f3aef75feaeaf Author: Eric Anholt Date: Tue Jan 26 14:52:08 2016 -0800 glamor: Simplify XV vertex setup. We were clipping the drawn rectangle to each clip box, then expanding the box to a big triangle to avoid tearing, then drawing each triangle to the destination through a scissor. If we're using a scissor for clipping, though, then we don't need to clip the drawn primitive on the CPU in the first place. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 294e45b60d99cf7d11c657288bbe2670b56775f3 Author: Eric Anholt Date: Tue Jan 26 14:18:48 2016 -0800 glamor: Set up XV sampler uniforms once at program build time. No sense doing it on every draw. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 5d7bef2eedfd965359dd4eebb6ab806cdad5b83f Author: Eric Anholt Date: Tue Jan 26 13:39:18 2016 -0800 glamor: Drop dead glamor_pict_format_is_compatible(). This hasn't been used since 2f80c7791bb0b11f261cb1e3e0d89163dcdd0342 (GLAMOR_SEPARATE_TEXTURE removal). Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 4494a450405cf539743cbcfe6907bf5bdd2d80cb Author: Eric Anholt Date: Tue Jan 26 15:08:17 2016 -0800 glamor: Drop comment about dead yInverted flag. Wait long enough, and you don't need to think about it at all. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit f7c24e6ac345aab91df5fc959f239a33f37113b1 Author: Eric Anholt Date: Tue Jan 26 13:34:00 2016 -0800 glamor: Rename the *y_inverted helpers to not say "inverted". Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 1fcb6f4cbf3d6514716435a0e79c0e6d53c31a3a Author: Eric Anholt Date: Tue Jan 26 13:31:59 2016 -0800 glamor: Drop dead *_from_x_coord_y() functions. They've been dead since the yInverted removal (e310387f443b6333edf02c8980daa303505382b4). Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 9ef11f13af7f552dadb4a90c248e525a257e0a2c Author: Eric Anholt Date: Thu Jan 21 16:01:14 2016 -0800 glamor: Clarify when Render fallbacks happen due to an unsupported op. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit b8229cc5f5298a37a4735dd002b0e0ebfc8bc75a Author: Eric Anholt Date: Wed Jan 27 11:35:03 2016 -0800 glamor: Label programs before linking them. i965 does most of its compiling at link time, so our debug output for its shaders didn't have the name on. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 68f236ebd4b268a9e525d623986999d230feb453 Author: Eric Anholt Date: Wed Jan 27 16:11:17 2016 -0800 ephyr: Make sure we have GLX_ARB_create_context before calling it. This should fix aborts()s from epoxy on old software stacks. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 623ff251dd025929f5bb6174ca86580c5e707261 Author: Adam Jackson Date: Tue Dec 8 17:41:38 2015 -0500 xephyr: Remove DRI1 This only worked if the backend server supported DRI1, which is stunningly unlikely these days. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 953b71270cf12c59c8a836c9be403d07fb01fa22 Author: Adam Jackson Date: Tue Dec 8 17:41:37 2015 -0500 xfree86: Build parser for DRI config file subsection unconditionally This applies regardless of which DRI you're asking for. Worse, leaving it out means breaking the config file syntax in a pointless way, since non-DRI servers can safely just parse it and ignore it. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 1a48a5863e4bceee6b99c1feda1b2c584ff3657c Author: Adam Jackson Date: Tue Dec 8 17:41:36 2015 -0500 xfree86: Remove ancient DRI build instructions Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d8ecbe563991cc689e95a8cb9d510e920eaceea0 Author: Dave Airlie Date: Wed Jan 27 16:46:06 2016 -0800 ephyr: catch X errors if we try to create a core context and fail. This stops Xephyr failing on GLXBadFBConfig. Signed-off-by: Dave Airlie Reviewed-by: Dave Airlie commit 50ca286d79f6304b972ea74487308e7794a170fb Author: Timo Aaltonen Date: Wed Jan 27 14:18:50 2016 +0200 dri2: Sync i915_pci_ids.h and i965_pci_ids.h from mesa Adds Skylake, Kabylake and Broxton allowing them to use modesetting + glamor with dri2. Signed-off-by: Timo Aaltonen Reviewed-by: Andreas Boll commit bf23db42a4e5943129501223a47b48884cdeb62f Author: Adam Jackson Date: Wed Jan 27 11:50:13 2016 -0500 modesetting: Require sufficiently new libdrm Bugzilla: https://bugs.freedesktop.org/93883 Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Reviewed-by: Julien Cristau commit 6978c8ee666a9224213173e7680e2d71b1094bab Author: Dave Airlie Date: Tue Jan 19 08:06:25 2016 +1000 xwayland: add support for use core profile for glamor. (v2) This adds support to Xwayland to try and use OpenGL core profile for glamor first. v1.1: use version defines. v2: let glamor work out core profile itself. Signed-off-by: Dave Airlie Reviewed-by: Eric Anholt commit 79c3925532bc0d098c9a4da6d5117bdada56e0af Author: Dave Airlie Date: Tue Jan 19 07:59:59 2016 +1000 glamor: add core profile support to EGL glamor. (v2) v1.1: use version defines. v2: let glamor work it out itself Signed-off-by: Dave Airlie Reviewed-by: Eric Anholt commit 98c3504dcfcec227b9c7798a0bd287941cec0691 Author: Keith Packard Date: Wed Sep 10 19:05:08 2014 -0700 ephyr: Create 3.1 core profile context if possible (v3) On desktop GL, ask for a 3.1 core profile context if that's available, otherwise create a generic context. v2: tell glamor the profile is a core one. v2.1: add/use GL version defines v3: let glamor work out core itself Signed-off-by: Keith Packard Signed-off-by: Dave Airlie Reviewed-by: Eric Anholt commit 564d9f0f8c17bb3c13aa3ca36da7825454dc5de3 Author: Dave Airlie Date: Mon Jan 11 14:00:35 2016 +1000 glamor: add core profile support. (v2) Glamor works out from the profile if it is core. This flag is used to disable quads for rendering. v1.1: split long line + make whitespace conform (Michel) v1.2: add GL 3.1 version defines v2: move to having glamor work out the profile. Signed-off-by: Dave Airlie Reviewed-by: Eric Anholt commit e6754dcb59ee21abb42421a28f4e467295584f67 Author: Keith Packard Date: Wed Sep 10 19:02:55 2014 -0700 glamor: Use GL_RED instead of GL_ALPHA if we have texture_swizzle (v3) GL_RED is supported by core profiles while GL_ALPHA is not; use GL_RED for one channel objects (depth 1 to 8), and then swizzle them into the alpha channel when used as a mask. [airlied: updated to master, add swizzle to composited glyphs and xv paths] v2: consolidate setting swizzle into the texture creation code, it should work fine there. Handle swizzle when setting color as well. v3: Fix drawing to a8 with Render (changes by anholt, reviewed by airlied). Signed-off-by: Keith Packard Signed-off-by: Dave Airlie Reviewed-by: Eric Anholt commit 5042b0652b9fe5fed57a233880c3429ba390d86d Author: Eric Anholt Date: Wed Jan 20 12:33:25 2016 -0800 glamor: Drop duplicated GLAMOR_DEFAULT_PRECISIONs in render accel. We only need it once at the top of the shader, so just put it there. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit 1fd82c764d5b24107e60f2173e30e5d24a2f2667 Author: Dave Airlie Date: Tue Jan 19 02:01:09 2016 +0000 glamor: don't do copy if we have 0 boxes to copy. This happens if you run twm + mplayer + xclock and drag the clock over the mplayer. If we don't catch it, we cause an illegal draw elements command to be passed to GL. Signed-off-by: Dave Airlie Reviewed-by: Eric Anholt commit e7308b6c77561df44c04f81509f8ada678705d94 Author: Dave Airlie Date: Tue Jan 12 18:13:46 2016 +1000 glamor: Add support for CA rendering in a single pass. It's been on the list to add dual source blending support to avoid the two pass componentAlpha code. Radeon has done this for a while in EXA, so let's add support to bring glamor up to using it. This adds dual blend to both render and composite glyphs paths. Initial results show close to doubling of speed of x11perf -rgb10text. v2: Fix breakage of all of CA acceleration for systems without GL_ARB_blend_func_extended. Add CA support for all the ops we support in non-CA mode when blend_func_extended is present. Clean up some comments and formatting. (changes by anholt) Signed-off-by: Dave Airlie Signed-off-by: Eric Anholt commit cab14a9a08ff06bc4cbef79c7be8f1d07c07ebf9 Author: Eric Anholt Date: Thu Jan 21 12:01:02 2016 -0800 glamor: Drop the composite_with_copy path entirely. I originally inherited this from the EXA code, without determining whether it was really needed. Regular composite should end up doing the same thing, since it's all just shaders anyway. To the extent that it doesn't, we should fix composite. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit 510c8605641803f1f5b5d2de6d3bb422b148e0e7 Author: Eric Anholt Date: Thu Jan 21 11:30:15 2016 -0800 glamor: Fix copy-like Render operations between 15 and 16 depth. Reading and writing to 16-depth pixmaps using PICT_x1r5g5b5 ends up failing, unless you're doing a straight copy at the same bpp where the misinterpretation matches on both sides. Fixes rendercheck/blend/over and renderhceck/blend/src in piglit. Please cherry-pick this to active stable branches. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit bc415fb1e0031ad23bda6e9c3f4664532876a0e5 Author: Adam Jackson Date: Wed Jan 20 15:43:10 2016 -0500 glx: Fix GLX_EXT_create_context_es2_profile support As of v4 of this extension, any GLES version number may be requested (to enable GLES3 and later). To comply with this, simply remove the API version checks and leave it to the DRI driver to validate. This happens to also enable using GLES1 in direct contexts, so if that's the dire situation you find yourself in, your client driver at least stands a chance of working. v4 also specifies that both extension strings should be advertised for compatibility with clients written against v1 of the extension spec, so add the es_profile bit to the extension list and enable it whenever we would enable es2_profile. Reviewed-by: Ilia Mirkin Signed-off-by: Adam Jackson commit 49aa5e3ea4eecea0562c05a4e52962985a56e510 Author: Keith Packard Date: Wed Sep 10 16:17:52 2014 -0700 glamor: Use vertex array objects Core contexts require the use of vertex array objects, so switch both glamor and ephyr/glamor over. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit d99204fb5e09ce7be36485d4226f7ad6d6eb24cc Author: Dave Airlie Date: Tue Jan 19 10:34:14 2016 +1000 glamor/xv: add vbo support (v2.1) This converts the Xv code to using VBOs instead of client ptrs. This is necessary to move towards using the core profile later. v2: put all boxes into single vbo, use draw arrays to offset things. (Eric) v2.1: brown paper bag with releasing vbo. Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit 5582ad1b9b29934498cf3fef305d3a988130cd52 Author: Dave Airlie Date: Mon Jan 11 14:00:04 2016 +1000 glamor: use vbos in gradient/picture code. This converts two client arrays users to using vbos, this is necessary to move to using core profile later. Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit 25eca80265654cfbf8768024e027426fedeb0918 Author: Michel Dänzer Date: Fri Jan 15 18:22:21 2016 +0900 present: Handle wraparound when comparing MSC values When a window moves from one CRTC to another, present_window_to_crtc_msc updates window_priv->msc_offset according to the delta between the current MSC values of the old and new CRTC: window_priv->msc_offset += new_msc - old_msc; window_priv->msc_offset is initially 0, so if new_msc < old_msc, window_priv->msc_offset wraps around and becomes a large number. If the window_msc parameter passed in is small (in particular if it's 0, such as is the case when the client just wants to know the current window MSC value), the returned CRTC MSC value may still be a large number. In that case, the existing MSC comparisons in pixmap_present weren't working as intended, resulting in scheduling a wait far into the future when the target MSC had actually already passed. This would result in the client (e.g. the Chromium browser) hanging when moving its window between CRTCs. In order to fix this, introduce msc_is_(equal_or_)after helper functions which take the wraparound into account for comparing two MSC values. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Reviewed-by: Martin Peres Signed-off-by: Keith Packard commit 1db6de7b6a6ee240eb50a13fe1fa1e135d7cb93b Author: Michel Dänzer Date: Tue Jan 12 15:42:47 2016 +0900 glamor: Disable debugging messages other than GL API errors According to Nicolai Hähnle, the relevant specification says "All messages are initially enabled unless their assigned severity is DEBUG_SEVERITY_LOW", so we need to explicitly disable the messages we don't want to get. Failing that, we were accidentally logging e.g. shader stats intended for shader-db. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93659 Tested-by: Laurent Carlier Reviewed-by: Emil Velikov Signed-off-by: Michel Dänzer Reviewed-by: Eric Anholt commit 8116fd8a760b5935645def1b2c3b155c05927850 Author: Dave Airlie Date: Tue Jan 12 14:19:24 2016 +1000 glamor: store old fonts in double width textures. There is a problem with some fonts that the height necessary to store the font is greater than the max texture size, which causes a fallback to occur. We can avoid this by storing two macro columns side-by-side in the texture and adjusting the calculations to suit. This fixes xfd -fn -*-*-*-*-*-*-*-*-*-*-*-*-*-* falling back here, when it picks -arabic-newspaper-medium-r-normal--32-246-100-100-p-137-iso10646-1 Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 64081d0eacf3e53a029b8e8b63096cc153e98549 Author: Dave Airlie Date: Mon Jan 11 17:02:57 2016 +1000 glamor: fallback if font is too large for FBO size. running xfontsel on haswell here, with a max texture size of 8kx8k, one font wants 9711 height. This fallsback to sw in this case. A proper solution probably involves using an array texture. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 6dcb73375e0ce389315d55587623eb84e9d13543 Author: Adam Jackson Date: Wed Jan 6 10:03:23 2016 -0500 os: Failure to remove a non-existent log file is not an error Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 862cbf4c870c9ed913206c6ef4988bdb470e1c39 Author: Thomas Klausner Date: Wed Nov 11 13:32:05 2015 +0100 Fix build when XSERVER_PLATFORM_BUS is not defined. Reviewed-by: Adam Jackson Signed-off-by: Thomas Klausner commit 63f83d1b7f496d05b409352749cdb6674d71cf80 Author: Thomas Klausner Date: Tue Jan 5 12:51:41 2016 -0500 Fix uninitialized variable warnings reported by clang v2: Move initializing pos into the first clause of the for statement. We have to keep this macro equivalent to a plain for statement from the user's perspective, otherwise callers need to {} things to keep control flow correct. [ajax] Signed-off-by: Thomas Klausner Acked-by: Michel Dänzer commit ba71b69f94f00a6f6910597185610668e79c10be Author: Alan Coopersmith Date: Fri Jan 1 17:34:41 2016 -0800 Avoid segfault in CloseWellKnownConnections when using -displayfd When -displayfd is looping through the possible display ids to use, if it can't open all the listening sockets for one (say when :0 is already in use), it calls CloseWellKnownConnections to close all the ListenTransConns entries before the point that ListenTransFds was allocated & initialized, so CloseWellKnownConnections would segfault trying to read entries from a NULL ListenTransFds pointer. Introduced by commit 7b02f0b8 Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit edcb6426f20c3be5dd5f50b76a686754aef2f64e Author: Alan Coopersmith Date: Fri Jan 1 18:11:14 2016 -0800 Use unique logfile names when starting server with -displayfd Fixes https://bugs.freedesktop.org/show_bug.cgi?id=93212 Previously all X servers started with -displayfd would overwrite Xorg.0.log - now a temporary name of Xorg.pid-.log is used until after -displayfd finds an open display - then it is renamed to the traditional Xorg..log name. Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit fe8562f5316d8c74ca074ad145295c65ddff5fc2 Author: Alan Coopersmith Date: Fri Jan 1 18:10:08 2016 -0800 modesetting should not reference gbm when it's not defined Fixes build errors of: present.c: In function 'ms_do_pageflip': present.c:410:17: error: 'drmmode_bo' has no member named 'gbm' new_front_bo.gbm = glamor_gbm_bo_from_pixmap(screen, new_front); ^ present.c:412:22: error: 'drmmode_bo' has no member named 'gbm' if (!new_front_bo.gbm) { ^ present.c: In function 'ms_present_check_flip': present.c:536:36: error: 'drmmode_bo' has no member named 'gbm' if (drmmode_crtc->rotate_bo.gbm) ^ Introduced by commit 13c7d53d Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 792176417f7e62a99c4f07801f74f804d6080de2 Author: Adam Jackson Date: Tue Jan 5 12:03:54 2016 -0500 Revert "Fix uninitialized variable warnings reported by clang" Crashes at startup: dmt:~/git/xserver% ./hw/kdrive/ephyr/Xephyr :1 (EE) Backtrace: (EE) 0: ./hw/kdrive/ephyr/Xephyr (OsSigHandler+0x29) [0x47c8f9] (EE) 1: /lib64/libc.so.6 (__restore_rt+0x0) [0x7f38d4de6b1f] (EE) 2: ./hw/kdrive/ephyr/Xephyr (InitNotifyFds+0x17) [0x478697] (EE) 3: ./hw/kdrive/ephyr/Xephyr (OsInit+0x1e) [0x47c99e] (EE) 4: ./hw/kdrive/ephyr/Xephyr (dix_main+0x11c) [0x446efc] (EE) 5: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7f38d4dd2580] (EE) 6: ./hw/kdrive/ephyr/Xephyr (_start+0x29) [0x427099] (EE) 7: ? (?+0x29) [0x29] (EE) (EE) Segmentation fault at address 0x0 This reverts commit a221d4737c167589da44595c795d54f2c36b439a. commit a221d4737c167589da44595c795d54f2c36b439a Author: Thomas Klausner Date: Wed Dec 16 08:36:24 2015 +0100 Fix uninitialized variable warnings reported by clang Signed-off-by: Thomas Klausner Acked-by: Michel Dänzer commit f3593918a0507cc080875788b2776ebe4f57c694 Author: Peter Hutterer Date: Wed Dec 16 09:21:39 2015 +1000 xfree86: move check for driver->PreInit up No real change, but if the driver is broken and doesn't provide a PreInit function, then we don't need to worry about logind. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit fc4fbe8224fdc8d7774120b6e978c652a70a50ee Author: Peter Hutterer Date: Fri Dec 11 09:31:30 2015 +1000 xfree86: add NoMatchFoo directives for InputClass sections InputClass sections use various MatchFoo directives to decide which device to apply to. This usually works fine for specific snippets but has drawbacks for snippets that apply more generally to a multitude of devices. This patch adds a NoMatchFoo directive to negate a match, thus allowing snippets that only apply if a given condition is not set. Specifically, this allows for more flexible fallback driver matching, it is now possible to use a snippet that says "assign driver foo, but only if driver bar wasn't already assigned to it". For example: Section "InputClass" Identifier "libinput for tablets" MatchIsTablet "true" NoMatchDriver "wacom" Driver "libinput" EndSection The above only assigns libinput to tablet devices if wacom isn't already assigned to this device, making it possible to select a specific driver by installing/uninstalling it. Signed-off-by: Peter Hutterer Reviewed-by: Benjamin Tissoires commit eb671b804e902011ba901d0833a215799177bad0 Author: Peter Hutterer Date: Fri Dec 11 07:26:02 2015 +1000 xfree86: whitespace fix Signed-off-by: Peter Hutterer commit 3d68d1f26709ecb5ce22a9baa0d3d8162574ed6a Author: Siim Põder Date: Mon Jun 8 22:14:12 2015 +0000 vfb: add randr support (v2) The motivation for getting this is chrome remote desktop that runs under Xvfb and wants to use RANDR to adjust screen size according to the remote desktop client screen size. Apparently there are other use cases as well, the bug mentions gnome-settings-daemon testing. [ajax: massaged commit message] Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=26391 Reviewed-by: Adam Jackson Signed-off-by: Lambros Lambrou Signed-off-by: Mike Frysinger Signed-off-by: Michal Srb Signed-off-by: Siim Põder commit e98b36bc69d805ab52aba95b070a614427d46e05 Author: Adam Jackson Date: Tue Dec 8 16:22:16 2015 -0500 randr: Silence unused variable warning Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer commit 8c49c883dc196ea57e3f64425c2a5b0a8ce3ba75 Author: Adam Jackson Date: Tue Dec 8 15:08:34 2015 -0500 sync: Don't allow creating a system counter before sync is initialized It probably doesn't work very well since there's other extension setup we're not doing on this path, and in any event it's not a thing that happens currently. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit b5f04a79df8b5aab8b558461261d14721f0b3e41 Author: Adam Jackson Date: Tue Dec 8 15:56:17 2015 -0500 glxproxy: Silence shadowed-variable warnings Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 18729a211a5fdd4f733e44eded754a0e6210b687 Author: Adam Jackson Date: Tue Dec 8 15:53:35 2015 -0500 glxproxy: Silence set-but-unused-variable warnings Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit bc996fa4e3c06f65eafe0a88ef491dbf01f31422 Author: Adam Jackson Date: Tue Dec 8 16:04:44 2015 -0500 dmx: Run 'doxygen -u' to upgrade the doxygen config file Also change the dot font setting back to the default of Helvetica as doxygen no longer ships FreeSans. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit a55e0bc56fd8f9da8f066dc344af19535dd092ca Author: Adam Jackson Date: Tue Dec 8 16:00:19 2015 -0500 dmx: Silence unused variable warning in dmxcompat Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 2730ccb803c55af74dbdd1bfd982fc23e643554d Author: Adam Jackson Date: Tue Dec 8 15:37:12 2015 -0500 dmx: Silence lex/yacc-related config parser warnings Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 718223d27452862eedcf1bee6278eae6040d45ea Author: Laércio de Sousa Date: Thu Dec 3 08:05:59 2015 -0200 systemd-logind.c: don't parse VT settings for non-seat0 X servers Since non-seat0 X servers no longer touch VTs, I believe these settings are unnecessary. Signed-off-by: Laércio de Sousa Reviewed-by: Hans de Goede commit 7c0ba32ddd5f1d5c65279365fa307dec3433caf3 Author: Bob Ham Date: Fri Dec 4 12:30:47 2015 +0000 xserver: Fix configure.ac check for libsystemd/-daemon The configure script looks for the libsystemd-daemon pkg-config module. If the configure script finds it, the script will add libsystemd-daemon to a list of modules which are used to consolidate CFLAGS and LIBS. The check for libsystemd-daemon was altered to fallback to libsystemd if libsystemd-daemon was not found (libsystemd-daemon was brought into libsystemd). Unfortunately, the configure script still adds "libsystemd-daemon" to the list of modules to consolidate, instead of "libsystemd". With this patch, we set a variable depending on which pkg-config module is found and add that to the module list instead. Changes since v1: - Rearranged logic so that we do a versioned check for libsystemd first, then look for libsystemd-daemon. - Cleaned up the check a bit, only performing the module checks if we don't have --with-systemd-daemon=no, in a similar style to --with-dtrace. - Changed the variable name to LIBSYSTEMD_DAEMON as per feedback. Reviewed-by: Adam Jackson Signed-off-by: Bob Ham commit 530d3e5ca0a02039b04ec6a677bbb4e05b78e5f4 Author: Michel Dänzer Date: Thu Dec 3 17:04:09 2015 +0900 prime: Damage full destination rectangle when we start dirty tracking This makes sure that the destination pixmap contents will be fully initialized. Without this, a PRIME output starts out with garbage. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 2a52c06e235bd79f91851121f53f7c1808fde321 Author: Adam Jackson Date: Mon Dec 7 17:03:02 2015 -0500 x86emu: Squash a warning Apologies, should have caught this one when applying the previous x86emu patch. Signed-off-by: Adam Jackson commit 59b618227ebd024e57720aaaea17596953f5b80e Author: Julian Pidancet Date: Sun Jul 1 18:49:25 2012 +0100 x86emu: Correctly handle 0x66 prefix for some instructions (Sorry for double posting) I repost this patch because I havn't got any replies from maintainers since I posted the initial patch back in March. Some instructions are not emulated correctly by x86emu when they are prefixed by the 0x66 opcode. I've identified problems in the emulation of these intructions: ret, enter, leave, iret and some forms of call. Most of the time, the problem is that these instructions should push or pop 32-bit values to/from the stack, instead of 16bit, when they are prefixed by the 0x66 special opcode. The SeaBIOS project aims to produce a complete legacy BIOS implementation as well as a VGA option ROM, entirely written in C and using the GCC compiler. In 16bit code produced by the GCC compiler, the 0x66 prefix is used almost everywhere. This patch is necessary to allow the SeaBIOS VGA option ROM to function with Xorg when using the vesa driver. SeaBIOS currently use postprocessing on the ROM assembly output to replace the affected instruction with alternative unaffected instructions. This is obviously not very elegant, and this fix in x86emu would be more appropriate. v2: - Decrement BP instead of EBP in accordance with the Intel Manual - Assign EIP instead of IP when poping the return address from the stack in 32-bit operand size mode in ret_far_IMM, ret_far, and iret - When poping EFLAGS from the stack in iret in 32-bit operand size mode, apply some mask to preserve Read-only flags. v3: - Rebase Reviewed-by: Adam Jackson Signed-off-by: Julian Pidancet commit 72f0724cdc65dc9abbbf70b9feb6cce7c2b9f8a0 Author: Chris Wilson Date: Sun Feb 8 09:47:42 2015 +0000 present: Do not replace Pixmaps on redirected Window on unflip When unflipping, we may find that our flip window has been redirected. If we replace the redirected Window with the Screen Pixmap we then have mutliple fullscreen Windows believing that their own the Screen Pixmap - multiple fullscreen Windows that are being flipped by Clients, and so continue to flip causing popping between e.g. the compositor and the game. [ajax: Fix up present_execute() hunk to account for changes introduced in fe07ec19e212a68076560d243a2a935c54589068] Signed-off-by: Chris Wilson Reviewed-by: Michel Dänzer commit 180b09912c0d2c4a43b5a08678bcad4b818924c7 Author: Chris Wilson Date: Sun Feb 8 09:47:41 2015 +0000 present: When cancelling a pending synchronous flip, requeue it The vblank event request for a synchronous flip is scheduled for the vblank before the target flip msc (so that the flip itself appears at the right frame). If we cancel that flip and so wish to schedule a copy instead, that copy needs to be postponed by a frame in order for it be performed at the requested time. Signed-off-by: Chris Wilson Reviewed-by: Michel Dänzer commit b2d55338f6b8f43ebcb49994abad123a797248cf Author: Chris Wilson Date: Sun Feb 8 09:47:40 2015 +0000 present: Requery pending flips with the right sync_flip mode When verifying whether a pending flip is still valid, we need to pass down the orignal sync_flip mode (e.g. if the driver only supports sync flips, verifying a async flip will falsely fail). Signed-off-by: Chris Wilson Reviewed-by: Michel Dänzer commit 548a3d5fd69bb059bbaf26ededdc94c212712cd7 Author: Dave Airlie Date: Mon Nov 16 09:05:27 2015 +1000 modesetting: create entities for pci and old probe. (v2) This moves the code from the platform case into a common function, and calls that from the other two. v2: Emil convinced me we don't need to lookup pEnt here, so let's not bother. Reported-by: Mark Kettenis Reviewed-by: Mark Kettenis Signed-off-by: Dave Airlie commit 771016f0705909c908917b4ccaeafc950ba93c05 Author: Dave Airlie Date: Mon Nov 16 09:05:26 2015 +1000 modesetting: drop platform_dev pointer. This isn't used anywhere, so no point storing it until we need it. Reviewed-by: Mark Kettenis Signed-off-by: Dave Airlie commit 19b0249a5e07b9fc008e5d8709d7e489874415de Author: Arkadiusz Miśkiewicz Date: Mon Nov 16 11:06:57 2015 +0100 Xorg.wrap: activate libdrm based detection for KMS drivers Xorg.wrap includes code guarded with WITH_LIBDRM for detecting KMS drivers. Unfortunately it is never activated since code missed to include file which defines WITH_LIBDRM. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92894 Signed-off-by: Arkadiusz Miśkiewicz Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit 5bccde749db93296b7784e4cdc5e54c4443656c1 Author: Michel Dänzer Date: Wed Dec 2 18:21:12 2015 +0900 randr: Stop dirty tracking for shared pixmap being destroyed Otherwise, we leave a dangling reference to the destroyed pixmap in the master screen's pixmap_dirty_list. Fixes regression from commit cf5d6414 ("randr: Factor out shared pixmap destruction"). Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit 2e3d9623ae3f562f81e513cb183ca1b1b68f279c Author: Adam Jackson Date: Wed Dec 2 10:42:36 2015 -0500 Revert "hw/xfree86: Use NotifyFd for device and other input fd wakeups" Reported to break libinput: http://lists.freedesktop.org/archives/xorg-devel/2015-December/048091.html This reverts commit 1df07dc36ca145c59f51176d9ab2651112506d75. commit 7b02f0b87ec2fa0cc5a65307a1fd55c671cec884 Author: Keith Packard Date: Wed Nov 11 22:02:17 2015 -0800 os: Use NotifyFd interface for listen descriptors Replace the custom path for dealing with new incoming connections with the general-purpose NotifyFd API. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 1df07dc36ca145c59f51176d9ab2651112506d75 Author: Keith Packard Date: Wed Nov 11 22:02:16 2015 -0800 hw/xfree86: Use NotifyFd for device and other input fd wakeups Remove code in xf86Wakeup for dealing with device and other input and switch to using the new NotifyFd interface. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit e51ea53b26bd9ec05b9209825960af28d0b6bbe1 Author: Keith Packard Date: Wed Nov 11 22:02:15 2015 -0800 render: Use OsTimer for animated cursor timing This replaces the block/wakeup handlers with an OsTimer. This also avoids problems with performing rendering during the wakeup handler. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 49c0f2413d32fdfe36e45861fcb32aaeab633094 Author: Keith Packard Date: Wed Nov 11 22:02:14 2015 -0800 os/xdmcp: Replace xdmcp block/wakeup handlers with timer and NotifyFd This removes the block and wakeup handlers and replaces them with a combination of a NotifyFd callback and timers. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 6a121f55381ecbb9cdaaef36ba6135890f3e006f Author: Keith Packard Date: Wed Nov 11 22:02:13 2015 -0800 Xext/xselinux: Use NotifyFd interface Replace block/wakeup handlers with SetNotifyFd. Much nicer now. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit f933a1b38ed1c65cc39fce1ee37aa18e3022c3f0 Author: Keith Packard Date: Mon Nov 23 17:36:53 2015 -0800 hw/xwayland: Use NotifyFd handler to monitor wayland socket Replace the block/wakeup handler with a NotifyFd callback instead. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 8543d4d8bc0526d1c910913b76259e5dee108e74 Author: Keith Packard Date: Wed Nov 11 22:02:11 2015 -0800 modesetting: Use NotifyFd for drm event monitoring Replace the block/wakeup handlers with a NotifyFd callback. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 58354fcf472cefc35b9c19cf84bf079cadfa2e1d Author: Keith Packard Date: Wed Nov 11 22:02:10 2015 -0800 kdrive/ephyr: Use NotifyFd for XCB connection input [v2] Eliminates polling every 20ms for device input. v2: rename ephyrPoll to ephyrXcbNotify and fix the API so it can be used directly for SetNotifyFd. Thanks to Daniel Martin Reviewed-by: Adam Jackson Signed-off-by: Keith Packard Cc: Daniel Martin commit 483c2a1adf044ba1da844687b908c1c802060d2d Author: Keith Packard Date: Wed Nov 11 22:02:09 2015 -0800 hw/kdrive: Use NotifyFd for kdrive input devices This switches the kdrive code to use FD notification for input devices, rather than the block and wakeup handlers. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 21c1680e83865a52d88cf8c80fb236d212931e5c Author: Keith Packard Date: Wed Nov 11 22:02:08 2015 -0800 hw/kdrive: Use NotifyFd interface for kdrive/linux APM monitoring Replace the block/wakeup handlers with a NotifyFd callback Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 8c8f3567fe4b4e372e22420810443c43e008da2c Author: Keith Packard Date: Wed Nov 11 22:02:07 2015 -0800 config: Use NotifyFd interface for udev This uses the NotifyFd interface to monitor the udev file descriptor rather than adding another block/wakeup handler Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit bf920b2390dc27947f87dd0b228518290a5ed85d Author: Keith Packard Date: Wed Nov 11 22:02:06 2015 -0800 config: Use NotifyFd for dbus interface This uses the NotifyFd interface to monitor the dbus socket rather than a block/wakeup handler. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 91ea0965dd4dfeba0a914c47ad4a64768e983b1b Author: Keith Packard Date: Wed Nov 11 22:02:04 2015 -0800 dix: Move InitFonts up above screen initialization Font initialization was split into two stages, the first was to set up font privates with a call to ResetFontPrivateIndex, then much later the call to InitFonts to set up all of the FPEs. Doing the full font initialization before initializing the video drivers means that we can move the call to ResetFontPrivateIndex inside InitFonts. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 4020aacd1fc5b9c63369f011aeb9120af9c55218 Author: Keith Packard Date: Wed Nov 11 22:02:03 2015 -0800 os: Implement support for NotifyFd X_NOTIFY_WRITE This adds the ability to be notified when a file descriptor is available for writing. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 0c41b7af4ab0c8d22b88f201293f59524d1e7317 Author: Keith Packard Date: Wed Nov 11 22:02:02 2015 -0800 os: Add NotifyFd interfaces This provides a callback-based interface to monitor file descriptors beyond the usual client and device interfaces. Modules within the server using file descriptors for reading and/or writing can call Bool SetNotifyFd(int fd, NotifyFdProcPtr notify_fd, int mask, void *data); mask can be any combination of X_NOTIFY_READ and X_NOTIFY_WRITE. When 'fd' becomes readable or writable, the notify_fd function will be called with the 'fd', the ready conditions and 'data' values as arguments, When the module no longer needs to monitor the fd, it will call void RemoveNotifyFd(int fd); RemoveNotifyFd may be called from the notify function. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit e10ba9e4b52269b2ac75c4802dce4ca47d169657 Author: Keith Packard Date: Wed Nov 11 22:02:01 2015 -0800 Remove non-smart scheduler. Don't require setitimer. This allows the server to call GetTimeInMillis() after each request is processed to avoid needing setitimer. -dumbSched now turns off the setitimer. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit c7f4aef8f45e500c900d59f68c653477148907ea Author: agoins Date: Wed Nov 25 18:39:31 2015 -0800 randr: Cleanup rrSetupPixmapSharing() protopix is completely redundant with mscreenpix. Get rid of it. We don't need rrScrPriv, so remove it. [ajax: also squash an unused variable in RRCrtcDetachScanoutPixmap, though it'll come back when the rest of this series lands] Reviewed-by: Adam Jackson Signed-off-by: Alex Goins commit 8d3f0e964e399dcfa8eb5e85d405217fdc5dbcd4 Author: agoins Date: Wed Nov 25 18:39:27 2015 -0800 xf86: Bump ABI version to 21 Reviewed-by: Adam Jackson Signed-off-by: Alex Goins commit 7006b4e7ff759c899d5391b7d12db889cbc0b535 Author: agoins Date: Wed Nov 25 18:39:26 2015 -0800 randr: Factor out shared pixmap creation The old version of rrCreateSharedPixmap(), in addition to actually creating a shared pixmap with scanout, also set up pixmap tracking on the source driver. I will be needing to create multiple shared pixmaps for PRIME double buffering, so factor the part that does shared pixmap creation into its own function, the new rrCreateSharedPixmap(). Rename the old rrCreateSharedPixmap() to rrSetupPixmapSharing(), a function that replicates the old functionality of rrCreateSharedPixmap() using the new rrCreateSharedPixmap(). Reviewed-by: Adam Jackson Signed-off-by: Alex Goins commit cf5d6414e0c21140f763d618bde1e91ad2b1cb49 Author: agoins Date: Wed Nov 25 18:39:25 2015 -0800 randr: Factor out shared pixmap destruction Shared pixmap destruction is done by unrefing the master pixmap twice: once for the original reference, and once for the reference implicitly added by PixmapShareToSlave. Then, unrefing the slave pixmap once. When I add PRIME double buffering and synchronization, I will need to do this in multiple places. To avoid duplication of code and comments explaining it everywhere, factor it out into its own function and use that in place of where it was before. Reviewed-by: Adam Jackson Signed-off-by: Alex Goins commit ab9837cc6a11f46b9df780f131b69de3822c3dd9 Author: Olivier Fourdan Date: Tue Dec 1 17:16:03 2015 +0100 xwayland: Update screen size on output removal When unplugging an output, it's still listed in xrandr and the size of the root window still includes the removed output. The RR output should be destroyed when its Wayland counterpart is destroyed and the screen dimensions must be updated in both the done and the destroy handlers. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92914 Signed-off-by: Olivier Fourdan Reviewed-by: Marek Chalupa commit 07941a50a547f2ca094e242588298695f48903ed Author: Jonas Ådahl Date: Wed Oct 7 12:01:53 2015 +0800 xwayland: Always update the wl_pointer cursor on pointer focus In Wayland, a client (in this case XWayland) should set the cursor surface when it receives pointer focus. Not doing this will leave the curser at whatever it was previously. When running on XWayland, the X server will not be the entity that controls what actual pointer cursor is displayed, and it wont be notified about the pointer cursor changes done by the Wayland compositor. This causes X11 clients running via XWayland to end up with incorrect pointer cursors because the X server believes that, if the cursor was previously set to the cursor C, if we receive Wayland pointer focus over window W which also has the pointer cursor C, we do not need to update it. This will cause us to end up with the wrong cursor if cursor C was not the same one that was already set by the Wayland compositor. This patch works around this by, when receiving pointer focus, getting the private mipointer struct changing the "current sprite" pointer to an invalid cursor in order to trigger the update path next time a cursor is displayed by dix. Reviewed-by: Adam Jackson Signed-off-by: Jonas Ådahl commit 51a4399b94f9adfac5f7718d4cbf73f793dcca56 Author: Olivier Fourdan Date: Mon Nov 23 08:51:48 2015 +0100 xwayland: Do not set root clip when rootless Otherwise the server may try to draw onto the root window when closing down, but when running rootless the root window has no storage thus causing a memory corruption. Thanks to Adam Jackson for helping tracking this down! Reviewed-by: Adam Jackson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93045 Signed-off-by: Olivier Fourdan Tested-by: Marek Chalupa commit 5b2ca3413203210d112a08a4e20d14382abae437 Author: Marek Chalupa Date: Fri Nov 27 14:27:46 2015 +0100 xwayland: check if creating xwl_output succeeded check return values of RR.*Create calls v2. do not bail out if we don't have any output Signed-off-by: Marek Chalupa Reviewed-by: Olivier Fourdan commit 646ebea456b4c5251ae997eab8d9b971f97de836 Author: Marek Chalupa Date: Fri Nov 27 14:59:27 2015 +0100 xwayland: fix memory leaks on error paths in xwl_realize_window don't leak memory when realizing window fails v2. take care of all memory allocation and return values, not just one leak Signed-off-by: Marek Chalupa Reviewed-by: Olivier Fourdan commit e6b106715f24112d1dc7a84c6e37df4b5debb2d0 Author: Richard PALO Date: Tue Nov 17 07:02:07 2015 +0100 Replace 'sun' with '__sun' Globally replace #ifdef and #if defined usage of 'sun' with '__sun' such that strict ISO compiler modes such as -ansi or -std=c99 can be used. Signed-off-by: Richard PALO Reviewed-by: Alan Coopersmith commit 44d0fd435a4eaf45e252b4f00409152a6d599dfc Author: Egbert Eich Date: Tue Nov 24 17:37:36 2015 +0100 kdrive/UnregisterFd: Fix off by one The number of FDs has been decremented already, therefore the number contained the index of the top one that is to me moved down. This problem was introduced by: commit 1110b71e360195aab040d835b54540ab558638c5 Author: Chris Clayton kdrive: fix build error on gcc 4.8 for out-of-bounds array access The reason for the warning was likely a confused compiler. Hoping to reduce the confusion by moving the decrement behind the end if the copy loop. Signed-off-by: Egbert Eich Reviewed-by: Peter Hutterer commit eb36924ead40564325aa56d54a973dc8fb4eae83 Author: Adam Jackson Date: Tue Nov 24 08:31:21 2015 -0500 dix: Remove redundant ChangeWindowProperty Use dixChangeWindowProperty(serverClient, ...) instead. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 4affa75a90d2455c81087b930126ad7adfd019f0 Author: Adam Jackson Date: Thu Nov 19 12:21:08 2015 -0500 xnest: Fix needless build dependency on xcb-util-keysyms This was added in: commit 43014795087a0a8774dd9687f5967329b15f06a2 Author: Olivier Fourdan Date: Mon Jan 5 16:44:22 2015 +0100 Synchronize capslock in Xnest and Xephyr Which is fine if you're building both, but if you don't happen to have xcb-util-keysyms' headers installed Xnest will configure as enabled but fail to build. Fortunately has a corresponding #define, so use that instead. Signed-off-by: Adam Jackson Reviewed-by: Olivier Fourdan commit fee0827a9a695600765f3d04376fc9babe497401 Author: Daniel Stone Date: Fri Nov 20 15:37:31 2015 +0000 XWayland: Use FocusIn events for keyboard enter wl_keyboard::enter is the equivalent of FocusIn + KeymapNotify: it notifies us that the surface/window has now received the focus, and provides us a set of keys which are currently down. We should use these keys to update the current state, but not to send any events to clients. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 816015648ffe660ddaa0f7d4d192e555b723c372 Author: Daniel Stone Date: Fri Nov 20 15:37:30 2015 +0000 Input: Add focus-in event source Add a new event source type for keypress events synthesised from focus notifications (e.g. KeymapNotify from the parent server, when running nested). This is used to keep the keys-down array in sync with the host server's, without sending actual keypress events to clients. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c3788394e9190130a8eed44c5c93eeb93c2a9893 Author: Daniel Stone Date: Fri Nov 20 15:37:29 2015 +0000 Input: Add DeviceEventSource enum Add a flag to DeviceEvents, giving the source of the event. Currently this only supports a 'normal' flag, but will be used later to add a 'focus-in' flag, noting events synthesised from key/button arrays on focus-in notifications. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 2e61901e46d28ce2f436219ad1a495aa0dcd0fba Author: Daniel Stone Date: Fri Nov 20 15:37:28 2015 +0000 XKB: Split filter execution into a separate function Move the giant state machine which maps from a key action to actually running the filters into a separate function, to be used when adding KeyFocusIn. Signed-off-by: Daniel Stone Tested-by: Giulio Camuffo Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 71ba82690158f46d50a455e69a83ee0d685bb274 Author: Peter Hutterer Date: Mon Nov 23 07:59:24 2015 +1000 xfree86: fix minor memory leak xf86*StrOption returns a strdup Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 51984dddfcc7133ed3c1f20d03514aa98c9a7831 Author: Eric Anholt Date: Thu Jun 18 11:14:41 2015 -0700 glamor: Delay making pixmaps shareable until we need to. If a pixmap isn't getting exported as a dmabuf, then we don't need to make an EGLImage/GBM bo for it. This should reduce normal pixmap allocation overhead, and also lets the driver choose non-scanout formats which may be much higher performance. On Raspberry Pi, where scanout isn't usable as a texture source, this improves x11perf -copypixwin100 from about 4300/sec to 5780/sec under xcompmgr -a, because we no longer need to upload our x11perf window to a tiled temporary in order to render it to the screen. v2: Just use pixmap->usage_hint instead of a new field. Drop the changes that started storing gbm_bos in the pixmap priv due to lifetime issues. v3: Fix a missing gbm_bo_destroy() on the pixmap-from-fd success path. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 7cd495a88807698b4ebaf9c1fb3db6edf31dd7e6 Author: Eric Anholt Date: Thu Oct 15 13:25:12 2015 -0700 glamor: Make glamor_get_name_from_bo static. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 6be33fd044949330e0b2b4185882c9664d2f90b4 Author: Eric Anholt Date: Thu Jun 18 11:26:46 2015 -0700 glamor: Simplify DRI3 pixmap-from-fd, using GBM. This GBM import path was introduced in 10.2, which we already require. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 1b8f16d8e659fb483453e1123a9fa876adb758ff Author: Eric Anholt Date: Thu Jun 18 11:21:10 2015 -0700 glamor: Use real types for glamor_egl's public gbm functions. I think void * was just used to avoid needing to #include gbm.h, but we can just forward-declare the structs and be fine. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit f80758f32a7b922baf8fbf3ac6d8c9aae5fea1c4 Author: Eric Anholt Date: Thu Jun 18 11:15:40 2015 -0700 glamor: Use the GBM function for getting an FD from a GBM BO. We were rolling ioctl calls ourselves, when there's a nice interface for it. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit ff2850424c99652506d0d6bc43506b4c16bf2ad5 Author: Eric Anholt Date: Sun Oct 18 19:26:14 2015 -0700 glamor: Hook up EGL DestroyPixmap through the normal wrap chain. One less layering violation (EGL should call glamor, if anything, not the other way around). v2: Move glamor.c's DestroyPixmap wrapping up above the glamor_egl_screen_init() call, since glamor.c's DestroyPixmap needs to be the bottom of the stack (it calls fb directly and doesn't wrap). Caught by Michel. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit e91fd30049ba9ebfb6ee8aded74eebe006af3f57 Author: Eric Anholt Date: Sun Oct 18 21:34:45 2015 -0700 glamor: Unexport glamor_destroy_textured_pixmap(). This is just a bit of the DestroyPixmap chain. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 3dd202933fd94615aeeaec7e4cfd05a68954a3f3 Author: Eric Anholt Date: Sun Oct 18 21:28:19 2015 -0700 glamor: Remove glamor_egl_destroy_textured_pixmap(). The DestroyPixmap chain and CloseScreen chain all do pixmap teardown already, and calling it manually would be redundant. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 9d2b76652f0bca5680b9e3ae2aacd508d5525684 Author: Eric Anholt Date: Fri Jun 19 15:56:13 2015 -0700 modesetting: No need to free the EGLImage just before freeing the pixmap. DestroyPixmap handles that just fine. This also lets us drop our use of the manual image destruction function (Note that the radeon driver still uses it in a similar fashion, though). Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 98a1993536add730b7ec29a9e37f62b1cd70ad31 Author: Eric Anholt Date: Sun Oct 18 19:16:20 2015 -0700 glamor: No need to glFlush before destroying a pixmap. I assume this was a workaround for an old, broken, closed driver. The driver doesn't get to throw away rendering just because the rendering context's shared-across-processes render target is getting freed from the local address space. If the rendering isn't to a shared render target, then we *do* want to throw away the rendering to it. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 9a5972801f7789833062e5711e77483b643eef92 Author: Eric Anholt Date: Thu Nov 5 16:35:56 2015 -0800 glamor: Fix segfault in fallback picture uploading. If the source/mask pixmap is a pixmap that doesn't have an FBO attached, and it doesn't match the Render operation's size, then we'll composite it to a CPU temporary (not sure why). We would take the PictFormatShort from the source Picture, make a pixmap of that depth, and try to look up the PictFormat description from the depth and the PictFormatShort. However, the screen's PictFormats are only attached to the screen's visuals' depths. So, with an x2r10g10b10 short format (depth 30), we wouldn't find the screen's PictFormat for it (associated with depth 32). Instead of trying to look up from the screen, just use the pFormat that came from our source picture. The only time we need to look up a PictFormat when we're doing non-shader gradients, which we put in a8r8g8b8. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit e7aa4d3c7420d45cca2b7e1e69e22cebc64d5b74 Author: Eric Anholt Date: Thu Nov 5 16:03:14 2015 -0800 glamor: Fix assert failures when fallback picture upload alloc fails. If the glTexImage (or glTexSubImage) out-of-memories, error out cleanly so that we can fall back to software. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit ff8ef975df9cd99ec6f0b8b8047445091bf35ef0 Author: Eric Anholt Date: Thu Nov 5 15:13:55 2015 -0800 glamor: Fix rendering when core font texture allocation fails. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit a6b05d10da2fe476f46e6dc4ad8a603964735905 Author: Eric Anholt Date: Thu Nov 5 15:05:11 2015 -0800 glamor: Fix crashes when the glyph atlas allocation fails. We already have a fallback path, so we just need to jump to it when we hit the failure. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit de959ec939b262cb1cb4c0b6146826e3092843f9 Author: Eric Anholt Date: Thu Nov 5 14:47:42 2015 -0800 glamor: Handle GL_OUT_OF_MEMORY when allocating texture images. The spec allows general undefined behavior when GL_OOM is thrown. But if the driver happens to throw the error at this point, it probably means the pixmap was just too big, so we should delete that texture and have this pixmap fall back to software. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 74be466d40080545117628c376cb59b696db33bc Author: Eric Anholt Date: Mon Nov 9 15:47:05 2015 -0800 glamor: Avoid GL errors from mapping with size == 0. GL 4.5 / GLES 3.0 require throwing GL errors at map time, and Mesa before that might throw errors accidentally if a malloc(0) call was made to return the mapping. Signed-off-by: Eric Anholt Reviewed-by: Rob Clark commit a6cddb8c04ddc3c48aae3f3611ad9f336fecb09d Author: Michael Stapelberg Date: Tue Nov 3 03:51:48 2015 -0800 Also dump passive grabs on XF86LogGrabInfo Signed-off-by: Michael Stapelberg Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f2ceb683c2da1ec08c8e07d7ec146f14864f2386 Author: Adam Jackson Date: Mon Nov 9 16:22:12 2015 -0500 Post-release version bump for 1.19 Signed-off-by: Adam Jackson commit 43fb888bd01cf9d3d277e77a52a3d0c93ccff8bd Author: Adam Jackson Date: Mon Nov 9 16:00:26 2015 -0500 xserver 1.18.0 Signed-off-by: Adam Jackson commit 2203735887ab548b3ee004400d1b89149aae412c Author: Axel Davy Date: Wed Nov 4 18:42:42 2015 +0100 present: Fix Async swap logic According to the spec, PresentOptionAsync should only trigger a different behaviour when the target msc has been reached. In this case if the driver is able to do async swaps, we use them to avoid a screen copy. When the target msc hasn't been reached yet, we want to use sync swaps. v2: Fix indentation and simplify checks for Async flips Signed-off-by: Axel Davy Reviewed-by: Michel Dänzer commit 3f35909acba117dc8934920d788c7ce612bce444 Author: Jammy Zhou Date: Wed Oct 28 18:39:10 2015 +0800 present: Execute right away if target_msc equals current_msc It is according to the protocol: "If 'options' contains PresentOptionAsync, and the 'target-msc' is less than or equal to the current msc for 'window', then the operation will be performed as soon as possible, not necessarily waiting for the next vertical blank interval." Signed-off-by: Jammy Zhou Reviewed-by: Michel Dänzer Reviewed-by: Axel Davy commit 7d1e4783853f9830344d101ceab087feb19995be Author: Daniel Martin Date: Thu Oct 29 14:58:11 2015 +0100 modesetting: Remove XF86_CRTC_VERSION checks The ifdef checks for XF86_CRTC_VERSION >= 3/5 are remnants from the out-of-tree driver. Within the tree, we can rely on: xf86Crtc.h:#define XF86_CRTC_VERSION 6 Signed-off-by: Daniel Martin Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher commit 45c83a266d18eb515313aa3f1a4d7ff6af53be5d Author: Daniel Martin Date: Thu Oct 29 14:58:10 2015 +0100 modesetting: Free output_ids in drmmode_set_mode_major() We calloc() output_ids. Let's free() it, too. Signed-off-by: Daniel Martin Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher commit 2674d424020bd71d4f99b8d8de8b0b21aa490d54 Author: Daniel Martin Date: Thu Oct 29 14:58:09 2015 +0100 modesetting: Handle failures in setting a CRTC to a DRM mode properly This fixes a bug where running the card out of PPLL's when hotplugging another monitor would result in all of the displays going blank and failing to work properly until X was restarted or the user switched to another VT. [Michel Dänzer: Pass errno instead of -ret to strerror()] [Daniel Martin: Add \n to log message] Picked from xf86-video-ati 7186a87 Handle failures in setting a CRTC to a DRM mode properly Signed-off-by: Daniel Martin Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher commit 250666586e2b6f3ed1371340452dc2be2d094d40 Author: Adam Jackson Date: Thu Oct 29 10:08:17 2015 -0400 vidmode: Drop the unused event code As the code says, this is "far from complete". So far, in fact, that it's been basically untouched for twenty years (XFree86 3.1!). As far as I can tell it was never enabled in any XFree86 build, and certainly has never been enabled since Xorg 7.0. Also, K&R. Signed-off-by: Adam Jackson Reviewed-by: Emil Velikov commit 478efe285a440c33b053bdf0bfbfdd482f429f01 Author: Alan Coopersmith Date: Tue Oct 27 19:44:28 2015 -0700 Xserver.man: document more transports for -nolisten & -listen options Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia commit 8fc295bde9a736f3c8c047031a6698d140d5266f Author: Alan Coopersmith Date: Tue Oct 27 19:44:27 2015 -0700 Xorg.man: update to reflect -nolisten tcp becoming default Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia commit 75157b7dbf4ed4db0492328a44e4e67dda83f769 Author: Alan Coopersmith Date: Tue Oct 27 19:44:26 2015 -0700 Xorg.man: move XLOCAL details to X(7) man page instead These settings affect clients, not server, so belong there, next to the information about how to set $DISPLAY. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia commit 50c167164700e8ead9b7ccf9f9eafc7541baac75 Author: Martin Peres Date: Mon Jul 20 10:37:30 2015 +0300 os: make sure the clientsWritable fd_set is initialized before use In WaitForSomething(), the fd_set clientsWritable may be used unitialized when the boolean AnyClientsWriteBlocked is set in the WakeupHandler(). This leads to a crash in FlushAllOutput() after x11proto's commit 2c94cdb453bc641246cc8b9a876da9799bee1ce7. The problem did not manifest before because both the XFD_SIZE and the maximum number of clients were set to 256. As the connectionTranslation table was initalized for the 256 clients to 0, the test on the index not being 0 was aborting before dereferencing the client #0. As of commit 2c94cdb453bc641246cc8b9a876da9799bee1ce7 in x11proto, the XFD_SIZE got bumped to 512. This lead the OutputPending fd_set to have any fd above 256 to be uninitialized which in turns lead to reading an index after the end of the ConnectionTranslation table. This index would then be used to find the client corresponding to the fd marked as pending writes and would also result to an out-of-bound access which would usually be the fatal one. Fix this by zeroing the clientsWritable fd_set at the beginning of WaitForSomething(). In this case, the bottom part of the loop, which would indirectly call FlushAllOutput, will not do any work but the next call to select will result in the execution of the right codepath. This is exactly what we want because we need to know the writable clients before handling them. In the end, it also makes sure that the fds above MaxClient are initialized, preventing the crash in FlushAllOutput(). Thanks to everyone involved in tracking this one down! Reported-by: Karol Herbst Reported-by: Tobias Klausmann Signed-off-by: Martin Peres Tested-by: Tobias Klausmann Tested-by: Martin Peres Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91316 Cc: Ilia Mirkin Cc: Olivier Fourdan Cc: Alan Coopersmith Reviewed-by: Alan Coopersmith commit bb78c464f09f515db557182a458b12b63c3b52d7 Author: Adam Jackson Date: Tue Oct 27 13:28:37 2015 -0400 build: Remove stale miext/cw include paths Signed-off-by: Adam Jackson Reviewed-by: Emil Velikov commit 524844c8c18e226aad30feb371b19ef491d83449 Author: Julien Cristau Date: Tue Oct 27 13:23:13 2015 +0100 Xext: fix build with --disable-xace Regression from 990cf5b2828f73dc7a07f1e38f608af39acfd81d Signed-off-by: Julien Cristau Cc: Andrew Eikum Cc: Peter Hutterer Signed-off-by: Andrew Eikum commit ac2f27f1a9fa8cd88c5dbe7ec0f96238eecf2c3e Author: Michel Dänzer Date: Tue Oct 27 11:51:49 2015 +0900 DRI2: Sync radeonsi_pci_ids.h from Mesa Fixes DRI2 client driver name mapping for newer AMD GPUs with the modesetting driver, allowing the DRI2 extension to initialize. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit d8b7a900cf912cadb5915b3924dd6ce5a74505e7 Author: Adam Jackson Date: Mon Oct 26 13:47:04 2015 -0400 xserver 1.17.99.902 (1.18 RC2) Signed-off-by: Adam Jackson commit 47b00fa4bf3b67736957296492310f7fdd6c0a25 Author: Adam Jackson Date: Wed Oct 21 12:15:34 2015 -0400 xfree86: Use same inb/outb asm code for i386 amd64 and ia64 This matches the GCCUSESGAS path from the old monolith build (where that macro was actually set), and fixes the build on modern OSX. Reviewed-by: Jeremy Huddleston Sequoia Signed-off-by: Adam Jackson commit c99fb550e06207e83ec89463fe32bd6bceca45f8 Author: Dave Airlie Date: Sun Sep 13 07:45:15 2015 +1000 xf86: don't add gpus from udev if autoAddGPU is set At startup the server wasn't adding devices, but nothing was blocking hotplug devices by the look of it. bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91388 Signed-off-by: Dave Airlie Reviewed-by: Hans de Goede commit 912f1fe2bb1b640d55fc44fcf636b6ca40d7f40b Author: Chris Wilson Date: Sun Apr 5 10:32:03 2015 +0100 Xv: Only stop the adaptors when the Pixmap is finally destroyed Pixmaps are reference counted and DestroyPixmap is called for the removal of every reference. However, we only want to stop the adaptors writing into the Pixmap just before the Pixmap is finally destroyed, similar to how Windows are handled. Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä commit 413cb2ff1d754b5f19d77ff19cddf40793989c03 Author: Chris Wilson Date: Mon Feb 16 09:49:18 2015 +0000 present: Fix missed notify MSC computation Only treat divisor==0 as async to immediately report the actual vblank. If the user species a non-zero divisor, we should compute the missed vblank properly or else we report too early. Signed-off-by: Chris Wilson Reviewed-by: Mario Kleiner commit 702c0a247f5523b43652befaf6be548ddbbe9dee Author: Alberto Milone Date: Thu Dec 12 10:00:09 2013 +0100 randr: make RROutputChanged change the main protocol screen not the gpu screen We only set changes on the main protocol screen as, for example in RRSetChanged() and RRTellChanged(), therefore we should follow the same logic when reporting that an output changed in RROutputChanged(). This means that RRTellChanged() will then update the relevant timestamps also when events come from gpu screens. [ajax: Fix mixed code and decls] Reviewed-by: Dave Airlie Signed-off-by: Alberto Milone commit 2092f12a243b9f7682f542b593b77c96d455ec89 Author: Hans de Goede Date: Wed Oct 21 11:36:06 2015 +0200 linux: Do not call FatalError from xf86CloseConsole FatalError ends up calling xf86CloseConsole itself, so calling FatalError from within xf86CloseConsole is not a good idea. Make switch_to log errors using xf86Msg(X_WARNING, ...) and return success (or failure). This makes switch_to match the other error checking done in xf86CloseConsole which all logs warnings and continues. Add checking of the return value in xf86OpenConsole and call FatalError there when switch_to fails, to preserve the error-handling behavior of xf86OpenConsole. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1269210 Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit ee06f674bbcd796324d6daf69bfb5d8856e94008 Author: Jeremy Huddleston Sequoia Date: Thu Oct 15 22:28:49 2015 -0700 Xi: Silence some tautological warnings xichangehierarchy.c:424:23: warning: comparison of constant 536870911 with expression of type 'uint16_t' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare,Semantic Issue] if (stuff->length > (INT_MAX >> 2)) ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ xichangehierarchy.c:438:26: warning: comparison of constant 536870911 with expression of type 'uint16_t' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare,Semantic Issue] if ((any->length > (INT_MAX >> 2)) || (len < (any->length << 2))) ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 113c0bb4fd764da8c08d8f30abe350c7650c9fc2 Author: Samuel Thibault Date: Mon Oct 19 23:15:36 2015 +0200 hurd: fix xorg-wrapper build hurd does not have any PATH_MAX limitation. misc.h provides a default value which is fine here. Reviewed-by: Adam Jackson Signed-off-by: Samuel Thibault commit f9a04d19aef77bf787b8d322305a6971d24a6ba1 Author: Keith Packard Date: Mon Sep 21 07:16:12 2015 +0100 fonts: Continue when font calls return Suspended more than once Patch 3ab6cd31cbdf8095b2948034fce5fb645422d8da fixed Xinerama interactions with font servers by not putting clients to sleep multiple times. However, it introduced additional changes dealing with libXfont routine returning Suspended more than once for the same request. This additional change was to abandon processing of the current request and free the closure data by jumping to 'xinerama_sleep' in each of the functions. Font library functions shouldn't return Suspended more than once, except for ListFontsWithInfo, which produces multiple replies, and thus ends up returning Suspended many times during processing. With the jump to xinerama_sleep occurring after the first reply was processed, the closure for the request was freed and future calls into the ListFontsWithInfo callback resulted in dereferencing freed memory. This patch removes the added branches, reverting the code to its previous behaviour, which permitted multiple Suspended returns and simply waited for the client to be signaled again so that the callback could continue processing the request. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 5b582a4a0350c253d729efb31b710851ae9a958e Merge: 1d4aa6724 27ad21254 Author: Adam Jackson Date: Mon Oct 19 12:23:22 2015 -0400 Merge remote-tracking branch 'jeremyhu/master' commit 1d4aa672424d8b1629fda11400b88607b5066965 Author: Julien Cristau Date: Mon Oct 19 15:42:30 2015 +0200 xorg-wrapper: when starting the server as root, reset its environment When the server is privileged, we shouldn't be passing the user's environment directly. Clearing the environment is recommended by the libdbus maintainers, see https://bugs.freedesktop.org/show_bug.cgi?id=52202 v2: rename envp to empty_envp (Jeremy) Reviewed-by: Hans de Goede Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83849 Signed-off-by: Julien Cristau commit 08c4912406b965bbac0a3a52413c374a073c051b Author: Samuel Thibault Date: Mon Oct 19 14:47:43 2015 +0200 xorg-wrapper: fix build without libdrm Signed-off-by: Samuel Thibault Reviewed-by: Hans de Goede commit a4cd8ee5f8e8de776c7f764656770311cdbde0d2 Author: Samuel Thibault Date: Mon Oct 19 14:47:42 2015 +0200 hurd: disable detecting drm Signed-off-by: Samuel Thibault Reviewed-by: Hans de Goede commit 27ad21254f257bac6c647315d749ee69f20c24e0 Author: Jeremy Huddleston Sequoia Date: Sun Oct 18 23:01:53 2015 -0700 XQuartz: Cleanup formatting of DarwinEQInit that was butchered by automation a few years ago Signed-off-by: Jeremy Huddleston Sequoia commit 3db7e332d374bf8cee581c31b7d50d7ac0509187 Author: Jeremy Huddleston Sequoia Date: Sun Oct 18 23:03:23 2015 -0700 XQuartz: Make sure that darwin_all_modifier_mask_additions is 0-terminated Found by ASan X.Org X Server 1.17.99.901 Build Date: 20151018 ================================================================ ==40471==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000101fed7a4 at pc 0x000101584030 bp 0x70000029f920 sp 0x70000029f918 READ of size 4 at 0x000101fed7a4 thread T7 #0 0x10158402f in DarwinEQInit darwinEvents.c:377 #1 0x10157f3bc in InitInput darwin.c:566 #2 0x101be87ad in dix_main main.c:268 #3 0x10159131b in server_thread quartzStartup.c:66 #4 0x7fff8a535c12 in _pthread_body (/usr/lib/system/libsystem_pthread.dylib+0x3c12) #5 0x7fff8a535b8f in _pthread_start (/usr/lib/system/libsystem_pthread.dylib+0x3b8f) #6 0x7fff8a533374 in thread_start (/usr/lib/system/libsystem_pthread.dylib+0x1374) 0x000101fed7a4 is located 0 bytes to the right of global variable 'darwin_all_modifier_mask_additions' defined in 'darwinEvents.c:181:12' (0x101fed7a0) of size 4 SUMMARY: AddressSanitizer: global-buffer-overflow darwinEvents.c:377 DarwinEQInit Shadow bytes around the buggy address: 0x1000203fdaa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000203fdab0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000203fdac0: f9 f9 f9 f9 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 0x1000203fdad0: 00 00 00 00 00 00 00 00 f9 f9 f9 f9 00 00 00 00 0x1000203fdae0: 00 00 f9 f9 f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9 =>0x1000203fdaf0: f9 f9 f9 f9[04]f9 f9 f9 f9 f9 f9 f9 00 00 00 00 0x1000203fdb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000203fdb10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000203fdb20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000203fdb30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000203fdb40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Thread T7 created by T0 here: #0 0x10242ee99 in wrap_pthread_create (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/7.0.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib+0x37e99) #1 0x101591089 in create_thread quartzStartup.c:78 #2 0x101590ed9 in QuartzInitServer quartzStartup.c:95 #3 0x1015697eb in X11ApplicationMain X11Application.m:1277 #4 0x101575dc0 in X11ControllerMain X11Controller.m:984 #5 0x10159171a in server_main quartzStartup.c:127 #6 0x101540fc0 in do_start_x11_server bundle-main.c:436 #7 0x101544869 in _Xstart_x11_server mach_startupServer.c:189 #8 0x101545c96 in mach_startup_server mach_startupServer.c:398 #9 0x7fff8d1b70f3 in mach_msg_server (/usr/lib/system/libsystem_kernel.dylib+0x110f3) #10 0x1015416e7 in main bundle-main.c:774 #11 0x7fff8bd975ac in start (/usr/lib/system/libdyld.dylib+0x35ac) #12 0x0 () Signed-off-by: Jeremy Huddleston Sequoia commit ec6294116cc41ff1c3be081b626952fb7e614244 Author: Jeremy Huddleston Date: Sun Oct 18 23:12:52 2015 -0700 osinit: Silence -Wunused-variable warnings osinit.c:161:24: warning: unused variable 'devnull' [-Wunused-variable,Unused Entity Issue] static const char *devnull = "/dev/null"; ^ osinit.c:162:10: warning: unused variable 'fname' [-Wunused-variable,Unused Entity Issue] char fname[PATH_MAX]; ^ Reviewed-by: Adam Jackson Signed-off-by: Jeremy Huddleston Sequoia commit 0a5d54f721de7e3ab3b6f4b080190a92bbe3429b Author: Jeremy Huddleston Date: Sun Oct 18 23:12:51 2015 -0700 dix: Silence -Wunused-variable warning by moving window.c off of legacy region defines window.c:223:15: warning: unused variable 'pScreen' [-Wunused-variable,Unused Entity Issue] ScreenPtr pScreen = pWin->drawable.pScreen; ^ Reviewed-by: Adam Jackson Signed-off-by: Jeremy Huddleston Sequoia commit e09875701b980b8c4578fb310a922c9934c34eef Author: Jeremy Huddleston Date: Sun Oct 18 23:12:50 2015 -0700 glx: Fix header length error checking in __glXDisp_RenderLarge glxcmds.c:2206:46: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare,Semantic Issue] if ((cmdlen = safe_pad(hdr->length)) < 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ Reviewed-by: Adam Jackson Signed-off-by: Jeremy Huddleston Sequoia commit 5dc415048e4091b18cd7d123ebeae8f95ed5a4f5 Author: Jeremy Huddleston Date: Sun Oct 18 23:12:49 2015 -0700 randr: Silence -Wshift-negative-value warnings rrtransform.c:199:23: warning: shifting a negative signed value is undefined [-Wshift-negative-value,Semantic Issue] rot_cos = F(-1); ^~~~~ rrtransform.c:114:14: note: expanded from macro 'F' ^~~~~~~~~~~~~~ ../render/picture.h:200:24: note: expanded from macro 'IntToxFixed' ^~~~~~~~~~~~~~~~~~~~~~ /opt/X11/include/pixman-1/pixman.h:130:56: note: expanded from macro 'pixman_int_to_fixed' ~~~ ^ Reviewed-by: Adam Jackson Signed-off-by: Jeremy Huddleston Sequoia commit 9a2a05a9a7ba02921fa29844c4cad41243c41326 Author: Jeremy Huddleston Date: Wed Oct 14 15:13:42 2015 -0700 xdmcp: Declare XdmcpFatal _X_NORETURN xdmcp.c:1404:1: warning: function 'XdmcpFatal' could be declared with attribute 'noreturn' [-Wmissing-noreturn,Semantic Issue] Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit a7a00e4bd8153e0386c7e58d6b30a7a96f15fdb0 Author: Jeremy Huddleston Date: Wed Oct 14 15:13:39 2015 -0700 security: Silence some benign -Wformat warnings XID may be either 'unsigned long' or 'unsigned int' depending on: typedef unsigned long CARD64; typedef unsigned int CARD32; typedef unsigned long long CARD64; typedef unsigned long CARD32; typedef unsigned long XID; typedef CARD32 XID; so when building with -Wformat, we get some warnings that are benign. This silences them. security.c:215:52: warning: format specifies type 'int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] SecurityAudit("revoked authorization ID %d\n", pAuth->id); ~~ ^~~~~~~~~ %lu CC dpmsstubs.lo security.c:553:25: warning: format specifies type 'int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] client->index, pAuth->id, pAuth->trustLevel, pAuth->timeout, ^~~~~~~~~ security.c:553:55: warning: format specifies type 'int' but the argument has type 'CARD32' (aka 'unsigned long') [-Wformat,Format String Issue] client->index, pAuth->id, pAuth->trustLevel, pAuth->timeout, ^~~~~~~~~~~~~~ security.c:554:10: warning: format specifies type 'int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] pAuth->group, eventMask); ^~~~~~~~~~~~ security.c:554:24: warning: format specifies type 'int' but the argument has type 'Mask' (aka 'unsigned long') [-Wformat,Format String Issue] pAuth->group, eventMask); ^~~~~~~~~ security.c:781:19: warning: format specifies type 'unsigned int' but the argument has type 'Mask' (aka 'unsigned long') [-Wformat,Format String Issue] requested, rec->id, cid, ^~~~~~~~~ security.c:781:30: warning: format specifies type 'unsigned int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] requested, rec->id, cid, ^~~~~~~ security.c:863:23: warning: format specifies type 'unsigned int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] rec->pWin->drawable.id, wClient(rec->pWin)->index, ^~~~~~~~~~~~~~~~~~~~~~ security.c:893:31: warning: format specifies type 'unsigned int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] rec->pWin->drawable.id, ^~~~~~~~~~~~~~~~~~~~~~ security.c:915:39: warning: format specifies type 'unsigned int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] rec->client->index, rec->pWin->drawable.id, ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit aa73d587fece225753d8e6b8773a9c8b85823bd9 Author: Jeremy Huddleston Date: Wed Oct 14 15:13:38 2015 -0700 xres: Silence -Wunused-function warnings when building !COMPOSITE or !RENDER xres.c:422:1: warning: unused function 'ResFindCompositeClientWindowPixmaps' [-Wunused-function,Unused Entity Issue] ResFindCompositeClientWindowPixmaps (void *value, XID id, void *cdata) ^ Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit 85eb90ea45e89033b97bf71a13c5c70fec8f6871 Author: Jeremy Huddleston Date: Wed Oct 14 15:13:36 2015 -0700 xdmauth: Correct miscall of abs() to instrad call labs() xdmauth.c:230:13: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value,Semantic Issue] if (abs(now - client->time) > TwentyFiveMinutes) { ^ xdmauth.c:230:13: note: use function 'labs' instead [Semantic Issue] if (abs(now - client->time) > TwentyFiveMinutes) { ^~~ labs xdmauth.c:302:9: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value,Semantic Issue] if (abs(client->time - now) > TwentyMinutes) { ^ xdmauth.c:302:9: note: use function 'labs' instead [Semantic Issue] if (abs(client->time - now) > TwentyMinutes) { ^~~ labs Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit 9f0fcd14b52f8481cbb3b3b9c6e06f64ff003cc8 Author: Jeremy Huddleston Date: Wed Oct 14 15:13:35 2015 -0700 randr: Correct a miscall of abs() to instead call fabs() rrtransform.c:124:22: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value,Semantic Issue] if ((v = abs(f_transform->m[j][i])) > max) ^ rrtransform.c:124:22: note: use function 'fabs' instead [Semantic Issue] if ((v = abs(f_transform->m[j][i])) > max) ^~~ fabs Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit 610dd8a58a75bb6a5b7d7abbae476d1cc4be519e Author: Jeremy Huddleston Date: Wed Oct 14 15:13:34 2015 -0700 mi: Correct a miscall of abs() to instead call fabs() miarc.c:1714:9: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value,Semantic Issue] if (abs(parc->angle2) >= 360.0) ^ miarc.c:1714:9: note: use function 'fabs' instead [Semantic Issue] if (abs(parc->angle2) >= 360.0) ^~~ fabs Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit 4513f924a7065edbd267cf96837af94ce5a58a6f Author: Ken Thomases Date: Mon Oct 12 16:45:41 2015 -0700 XQuartz: Fix how we calculate the height of the OSX menu bar +[NSScreen mainScreen] does not mean the primary display. It used to mean the one with the key window. When "Displays have separate spaces" is enabled, it means the active screen, the one whose menu bar is mostly opaque. As such, it may not be the screen whose lower-left corner is located at (0, 0). That's why its max-Y is not necessarily comparable to its height. That only works for the primary display. This code could use [[NSScreen screens] firstObject]. This is always the primary display, the one whose lower-left corner is at (0, 0). Once that's done, the above change should be reverted. The height of the visible frame would be the full height of the screen minus the menu bar _and the Dock_ if the Dock is along the bottom of the screen. Actually, there's a theoretically-simpler approach: use -[NSMenu menuBarHeight]. That replaces a long-deprecated method +[NSMenuView menuBarHeight]. However, there was a bug in Tiger that led to the former not working while the latter still worked. I haven't actually checked recently. CrossOver's still-kicking X server code uses this code, which tries all of the above: NSScreen* primaryScreen = [[NSScreen screens] objectAtIndex:0]; aquaMenuBarHeight = [[NSApp mainMenu] menuBarHeight]; if (!aquaMenuBarHeight) aquaMenuBarHeight = [NSMenuView menuBarHeight]; if (!aquaMenuBarHeight) aquaMenuBarHeight = NSHeight([primaryScreen frame]) - NSMaxY([primaryScreen visibleFrame]); Reviewed-by: Jeremy Huddleston Sequoia Signed-off-by: Ken Thomases commit 6e6827aac33eddeacfb37ef3d7b0397b1446bf66 Author: Jeremy Huddleston Sequoia Date: Mon Oct 12 02:06:10 2015 -0700 XQuartz: Remove InfoPlist.strings Signed-off-by: Jeremy Huddleston Sequoia commit df80e2649aa47957986554928e6bf41b86c15240 Author: Jeremy Huddleston Sequoia Date: Mon Oct 12 02:04:11 2015 -0700 XQuartz: Relax App Transport Security for communicating with the update server Signed-off-by: Jeremy Huddleston Sequoia commit 880d4e78b1823bcc0e66e68270af1a475f097bb5 Author: Jonas Ådahl Date: Wed Oct 7 12:02:39 2015 +0800 xwayland: Set physical screen size to something When we have a single output, just set it to the physical size of that output. Otherwise try to approximate it calculating a mean m.m. per dot. Last fallback is to default to 96 DPI. Signed-off-by: Jonas Ådahl Reviewed-by: Daniel Stone commit 216bdbc7351e2078d94857a3323f6cd8f0d2f191 Author: Jonas Ådahl Date: Wed Oct 7 12:02:38 2015 +0800 xwayland: Update actual screen and root window size on output hot plug When a new output is hot-plugged we need to not only update our internal screen dimensions, but also the dix screen dimensions, screenInfo dimensions and the root window dimensions. https://bugs.freedesktop.org/show_bug.cgi?id=92273 Signed-off-by: Jonas Ådahl Reviewed-by: Daniel Stone commit 211d4c2d353b5e379716484055a3f58235ea65f4 Author: Chris Wilson Date: Wed Dec 14 15:55:22 2011 +0000 render: Propagate allocation failure from createSourcePicture() All the callers were already checking for failure, except that createSourcePicture() itself was failing to check whether it successfully allocated the Picture. [ajax: Rebase, fix line wrap of preceding line] Signed-off-by: Chris Wilson Reviewed-by: Jeremy Huddleston commit 8a26a4aff570744347a8bed19f693bf631be464e Author: Alexandr Shadchin Date: Sun Nov 27 02:49:02 2011 +0600 bsd: Remove LINKKIT Reviewed-by: Adam Jackson Signed-off-by: Alexandr Shadchin commit ab3e34bf9ddff90261fbbe0e2604887459cd70ad Author: Alexandr Shadchin Date: Sun Nov 27 02:49:01 2011 +0600 xfree86: Remove 386BSD Reviewed-by: Adam Jackson Signed-off-by: Alexandr Shadchin commit c877048c8509a03f6aa69e533ab86c1039cfb6df Author: Jon TURNEY Date: Thu Jun 30 15:30:40 2011 +0100 glx: Synchronize Xserver glx/rensize.c with mesa src/glx/compsize.c Noticed while investigating https://bugs.freedesktop.org/show_bug.cgi?id=30102 Reviewed-by: Adam Jackson Signed-off-by: Jon TURNEY commit d08ac3660651c8614a1780750b76c48eeb0870b7 Author: Jamey Sharp Date: Thu May 12 15:21:52 2011 -0700 kdrive: Delete unused TOUCHSCREEN define. There's nothing in configure to enable this, and KdTsPhyScreen isn't defined anywhere. [ajax: Rebase, also clean up Xfbdev] Reviewed-by: Adam Jackson Signed-off-by: Jamey Sharp commit e31fe8115ee080b58b2e96a5106f38e64944ce5e Author: Olivier Fourdan Date: Wed Sep 23 15:35:58 2015 +0200 xwayland: Adjust screen size with rotation bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92076 Signed-off-by: Olivier Fourdan Tested-by: Artem Chudinov Reviewed-by: Dave Airlie commit f6ce23fbfc8804204fa103f98b94478387b94040 Author: Fredrik Höglund Date: Thu Sep 10 23:33:20 2015 +0200 present: Don't stash the MSC value when present_get_ust_msc fails Otherwise we stash an uninitalized value, and later use it to compute the msc_offset for the window. Also initialize ust and crtc_msc so we never use uninitalized values when present_get_ust_msc fails. This fixes clients getting stuck waiting indefinitely for an idle event when a CRTC is turned off. Signed-off-by: Fredrik Höglund Reviewed-by: Michel Dänzer commit c1f5f9022f31ca4d662cc125fa80cb25386da6d1 Author: Alan Coopersmith Date: Sun Sep 27 18:41:35 2015 -0700 glamor: Get rid of an extraneous ; at the end of a C source line Signed-off-by: Alan Coopersmith Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 10e9116b3f709bec6d6a50446c1341441a0564e4 Author: Rui Matos Date: Tue Jul 15 15:57:20 2014 +0200 xwayland-input: Always set the xkb group index on modifiers events While we have keyboard focus, the server's xkb code is already locking and latching modifiers appropriately while processing keyboard events. Since there is no guaranteed order between wl_keyboard key and modifiers events, if we got the modifiers event with a locked or latched modifier and then process the key press event for that modifier we would wrongly unlock/unlatch. To prevent this, we ignore locked and latched modifiers while any of our surfaces has keyboard focus. But we always need to set the xkb group index since this might be triggered programatically by the wayland compositor at any time. Reviewed-by: Daniel Stone commit f937032ee6526af3c9206a2d8c6eacdeeb490d3b Author: Andreas Wettstein Date: Sat Feb 15 17:37:24 2014 +0100 xkb: Keyboard mouse button emulation should not suppress other keyboard events With this change, when a key mapped to an action to emulate mouse button presses and releases is held down, other keys pressed during that time are still processed normally. This is a prerequisite for proper support of ISOLock. Signed-off-by: Andreas Wettstein Reviewed-by: Daniel Stone commit 5447ac45bc090e8f3269979af4db55f619c5f278 Author: Andreas Wettstein Date: Sat Feb 15 17:36:51 2014 +0100 xkb: Suppress autorepeat for Set and Lock of Mods, Groups, and Controls The autorepeat for these actions was not correctly implemented, as the key repeat would be mistakenly interpreted as key releases. Rather than fixing this, this change simply disables autorepeat for Set/Lock actions, for two reasons: - Autorepeating Set/Lock keys make complicate the interactions of actions. - Autorepeating Set/Lock keys have no apparent benefit, but hurt in the real world for layouts such as de(neo): Neo has a Level5 shift on the LSGT key, and a Level5 lock on Level5 of the same key. This is unusable if LSGT autorepeats. However, disabling autorepeat for key LSGT completely is not ideal for users that have a "usual" layout besides Neo, where LSGT carries symbols. Signed-off-by: Andreas Wettstein Reviewed-by: Daniel Stone commit fbac451724f7e1b8ce6b6e0505cc33ccd41c5158 Author: Arcady Goldmints-Orlov Date: Thu Oct 4 14:22:13 2012 -0700 Fix alphamap interactions with wfb Set a destructor function on pixman images and call fbFinishAccess() from there, rather than directly from free_pixman_pict(). This ensures that fbFinishAccess() gets called even if pixman still has a reference to the image after free_pixman_pict(), as is the case for alphamaps. [ajax: Squash an unused variable warning in the non-wfb build] Reviewed-by: Aaron Plattner Signed-off-by: Arcady Goldmints-Orlov Reviewed-by: Søren Sandmann commit 19a87257f92e7f57a167fc03fba014ee22d8e1ab Author: Emil Velikov Date: Fri Sep 25 14:04:34 2015 +0100 glamor: move 'dri3_capable' extension checks after eglMakeCurrent Otherwise we'll fail and/or crash as no context is bound. Fixes: 64e6124f27e (glamor: move GL_OES_EGL_image check next to EGL_EXT_image_dma_buf_import) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92105 Cc: Michel Dänzer Cc: Nick Sarnie Reported-by: Nick Sarnie Signed-off-by: Emil Velikov Tested-by: Nick Sarnie Reviewed-by: Michel Dänzer commit dca5770af9e20bb1148374ebfd60931a81b148a2 Merge: a31bbc450 21f384b7b Author: Adam Jackson Date: Fri Sep 25 10:23:28 2015 -0400 Merge remote-tracking branch 'mchalupa/output-bugs' commit a31bbc450a08622aadafc264b3efe57e465eaecb Author: Alan Coopersmith Date: Tue Sep 22 19:25:43 2015 -0700 protocol.txt: Add MIT-SHM 1.2 requests Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 424ba5de56e2ddf173bb0d26daa821f12897f18f Author: Alan Coopersmith Date: Tue Sep 22 19:25:42 2015 -0700 protocol.txt: Add DRI3 1.0 requests Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 7e6b7c799455fdeac082cf2a064fe1ba432e92ca Author: Alan Coopersmith Date: Tue Sep 22 19:25:41 2015 -0700 protocol.txt: Add Present 1.0 requests Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit fd653194be731e4e32f95f38446e0dcbf56d04c9 Author: Alan Coopersmith Date: Tue Sep 22 19:25:40 2015 -0700 protocol.txt: Add RANDR 1.5 requests Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 1ea8fb96bc6a95d98dd67fc9d4c4e4b858383d34 Author: Alan Coopersmith Date: Tue Sep 22 19:25:39 2015 -0700 protocol.txt: Remove extensions that died before Xorg was born Adobe-DPS-Extension, DEC-XTRAP, X3D-PEX, XIE Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 21f384b7b8b571151805674c9d384e2ad7f8b7ea Author: Marek Chalupa Date: Thu May 21 15:43:43 2015 +0200 xwayland: do not add output into output_list multiple times output.done event can be sent even on some property change, not only when announcing the output. Therefore we must check if we already have it otherwise we may corrupt the list by adding it multiple times. This fixes bug when xwayland looped indefinitely in output.done handler and that can be reproduced following these steps (under X without multi-monitor setup): 1) run weston --output-count=2 2) run xterm, move it so that half is on one output and half on the other 3) close second output, try run weston-terminal weston sends updated outputs which trigger this bug. v2. factor out common code into function move expecting_events into right branch Signed-off-by: Marek Chalupa commit 95014ad2a7815282efdecc895bf14742b4b3ccb3 Author: Dima Ryazanov Date: Tue May 12 10:21:18 2015 -0700 xwayland: Remove the output from the list after destroying it [Marek Chalupa]: rebased to master Signed-off-by: Dima Ryazanov commit 550984c95ef0bee1886dbb54e35edc0852772e2f Author: Dima Ryazanov Date: Fri May 15 22:38:28 2015 -0700 xwayland: Destroy xwl_output when wl_output gets removed This makes Xwayland correctly handle a monitor getting unplugged. [Marek]: use xorg_list_for_each_entry_safe Signed-off-by: Dima Ryazanov Signed-off-by: Marek Chalupa commit 6ca496b7c3ccfd677c8c1bee88cc509a5e3c9e04 Author: Alan Coopersmith Date: Mon Sep 21 22:36:41 2015 -0700 dri2: better checks for integer overflow in GetBuffers* Check for integer overflow before using stuff->count in a multiplication, to avoid compiler optimizing out due to undefined behaviour, but only after we've checked to make sure stuff->count is in the range of the request we're parsing. Reported-by: jes@posteo.de Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 6c2c6fb5a7b44f50811722eb8621afb272aff2e8 Author: Keith Packard Date: Mon Sep 21 07:16:14 2015 +0100 Xext, os: Remove OS-internal usages within XACE and XSELinux These extensions were accessing internal OS functions and structures. Expose the necessary functionality to them and remove their use of osdep.h Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 9af111fe045d82192bacc722940e1d92a8ba4cbd Author: Keith Packard Date: Mon Sep 21 07:16:13 2015 +0100 Xext/xselinux: Warning fixes There's a 'const char *' adventure here that I'm mostly ignoring; some client information gets const poisoned. Worked around by adding a couple of casts. Ick. Added an _X_ATTRIBUTE_PRINTF to SELinuxLog. Ignore a couple of unused return values. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 9ee05c8987245350976ebc0df4953c60da6bcc70 Author: Jon TURNEY Date: Thu Aug 13 13:11:31 2015 +0100 debug output format fix in RRMonitorCrtcName() xorg/xserver/randr/rrmonitor.c:35:5: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘RRCrtc’ [-Werror=format=] RRCrtc is XID is CARD32, which inside the server is unsigned long or int depending on architecture, so a cast is required. Reviewed-by: Adam Jackson Signed-off-by: Jon TURNEY commit fe253296035277f7a3adfad6eb239fee41714d22 Author: Jon TURNEY Date: Thu Aug 13 13:11:37 2015 +0100 debug output format fix in xf86Helper.c xserver/hw/xfree86/common/xf86Helper.c:1834:12: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘Atom’ [-Werror=format=] xserver/hw/xfree86/common/xf86Helper.c:1834:12: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘Atom’ [-Werror=format=] Atom is unfortunately unsigned long or unsigned int depending on the architecture, so a cast is required. Reviewed-by: Adam Jackson Signed-off-by: Jon TURNEY commit dc2998bf060957b1fdd6bd2ea4f76c5154233a1b Author: Dima Ryazanov Date: Tue May 12 10:21:19 2015 -0700 xwayland: Remove a useless out-of-memory check snprintf does not allocate memory, so we can never get an out-of-memory error. (Also, the error handler would free xwl_output after it was already registered as an event listener.) Signed-off-by: Dima Ryazanov Reviewed-by: Marek Chalupa commit b469fc72d2dd0cf60760fa0828ed73771c2a0512 Author: Adam Jackson Date: Wed Feb 25 16:03:13 2015 -0500 composite: Factor out backing store transition No functional change. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 6da3f5d04f6a1cda0c858280f9561f9fbc323275 Author: Dave Airlie Date: Wed Sep 23 11:19:00 2015 +1000 glx: fix regression with copy sub buffer disappearing So copy sub buffer isn't a core extensions it's a driver extension which means we are using totally the wrong interface to query for it here, which means bad things happen when you roll out this code, for instance MESA_copy_sub_buffer stops working. This is just the hack I'm sticking in Fedora to avoid the regression for now, but hopefully will inspire us. Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 5e9457c41c05b65da7e39bd8944ec761479f19dd Author: Eric Anholt Date: Mon May 5 11:10:07 2014 -0700 fbdevhw: Fix a const qualifier warning We're passing string literals to these functions. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 88355cedfc9b3940b9fe1599fbf6e0272c57f8a9 Author: Eric Anholt Date: Mon May 5 11:10:08 2014 -0700 kdrive: Remove dead debug arrays. These have never been used in the history of the tree, and were producing string literal const loss warnings. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit e6f8a0340b72113474ccfbf1ea447558b705995a Author: Eric Anholt Date: Mon May 5 11:10:06 2014 -0700 x86emu: Fix some set-but-not-used warnings. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit fca98ce5e7d6424265c35a1219c2240d3342f627 Author: Egbert Eich Date: Fri Feb 7 16:21:48 2014 +0100 libxf86config: libxf86config_internal -> libxf86config Now since the installable libxf86config is gone, rename libxf86config_internal to libxf86config. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard commit dabf7c3590b427c185089128ecfd967f188f2658 Author: Egbert Eich Date: Fri Feb 7 16:21:47 2014 +0100 libxf86config: Remove The library used by the Xserver to read and parse the configuration file could be built so that it culd be installed as a separate lib and used by external programs. Apparently there has not been any interest in this for quite a while as this library has been broken for a long time now in the sense that it was calling functions provided by the Xserver which were not implemented for the external library. Since this library is useless as it is anyway when built let's drop support for it. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard commit c7f84c880bbbb508016ad80390a11961b1c4214d Author: Chris Wilson Date: Mon Jan 27 09:44:48 2014 +0000 render: Fix leak of filter params ==11097== 2,048 (+1,640) bytes in 32 (+26) blocks are definitely lost in loss record 1,570 of 1,719 ==11097== at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==11097== by 0x225EF3: SetPicturePictFilter (filter.c:339) ==11097== by 0x22DF4F: ProcRenderSetPictureFilter (render.c:1773) ==11097== by 0x15D25D: Dispatch (dispatch.c:432) ==11097== by 0x14C7B9: main (main.c:298) [ajax: Fixed whitespace] Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit 98e170971c6b06d64a5bc7418bf6ae6ae985a3ae Author: Ville Syrjälä Date: Mon Oct 14 17:07:29 2013 +0300 xfree86: Fix the 1792x1344-75 EST III mode The correct refresh rate for this mode is 75, not 85. Reviewed-by: Adam Jackson Signed-off-by: Ville Syrjälä commit 91c7acfc3447a0073dd1db260cf05115d94ce7e8 Author: Michal Srb Date: Mon Oct 7 17:57:14 2013 +0300 randr: Allow RRSelectInput for ProviderChange and ResourceChange events [ajax: To be clear, we already have code to emit these events, and it looks like it works, but to get them you'd have had to also ask for one of the other notify types. This makes it possible to listen for e.g. ProviderChange alone.] Reviewed-by: Adam Jackson Signed-off-by: Michal Srb commit 5437949a51fa6d9c9c83336d46ae57398f390ee3 Author: Egbert Eich Date: Sat Oct 5 13:57:13 2013 +0200 fbdevhw: Disable FBIOBLANK ioctl if not supported Some ioctls may not be supported by the kernel however their failure is non-fatal to the driver. Unfortunately we only know once we try to execute the ioctl however the sematics of the fbdev driver API doesn't allow upper layers to disable the call. Instead of changing the fbdevHW driver API just disable the call to this ioctl on the module level when detecting such a case. Reviewed-by: Adam Jackson Signed-off-by: Egbert Eich commit 49fe4ee7b7085b616028d6afe67767a60a8adf82 Author: Matt Turner Date: Thu Feb 7 17:29:00 2013 -0800 compiler.h: Remove dead STANDALONE_MMIO The only drivers I can find that used this are the r128 and radeon DRI drivers. r128 is dead and the radeon driver wasn't including Xorg's compiler.h and still worked. Reviewed-by: Adam Jackson Signed-off-by: Matt Turner commit d2a6962474978437545120ebc1fcfb909d901d55 Author: Andy Ritger Date: Wed Jun 20 11:52:34 2012 -0700 mi: Log an error if mieqProcessInputEvents() recurses. v2: Uses BUG_WARN_MSG to also provide a stack trace. (Peter Hutterer) Signed-off-by: Keith Packard Signed-off-by: Andy Ritger commit cc57ab4fc8b9dc15531f0dd9f5b352fa99a80cd0 Author: Andy Ritger Date: Wed Jun 20 11:52:33 2012 -0700 Remove static qualifier on mieqProcessInputEvents()'s 'event' This isn't necessary. Signed-off-by: Andy Ritger Signed-off-by: Keith Packard commit 44ea291b78b39ed5fd03f9693ac9525b866e183b Author: Tomas Carnecky Date: Mon May 21 19:47:01 2012 +0000 Remove NO_LIBCWRAPPER define I'll just refer to 1faba79 (Death to libcwrapper., 2007-12-03). Reviewed-by: Adam Jackson Signed-off-by: Tomas Carnecky commit 1e95a7df5f2e919ce59c5188d2ad1b30c3ac8595 Author: Peter Hutterer Date: Thu Mar 15 13:46:56 2012 +1000 dix: put warning in for scroll increments of 0 If the increment is 0 but this is a scroll axis, it's definitely a bug. Nonetheless, it has happened, so put a warning in and a return statement that we avoid the infinite loop and hopefully be able to reproduce later. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 63efa2e7e91349dfecc849d30c5de84b3c911fe9 Author: Bryce Harrington Date: Wed Nov 30 12:54:29 2011 -0800 test: Fix typo and drop documentation references to glib. The X server doesn't use glib for the tests any more. Signed-off-by: Bryce Harrington Reviewed-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit 4c7cefe24001279a558dd875949d40ede49ef702 Author: Dave Airlie Date: Thu Oct 20 11:44:28 2011 +0100 exa: initialise mask_off_x and mask_off_y These get used at the end of the function in a calculation, even though the result isn't used its not pretty. Pointed out by coverity. Signed-off-by: Dave Airlie Reviewed-by: Alan Coopersmith commit 668cce3f5a175109442f0ef9b50354db95e66b44 Author: Gaetan Nadon Date: Fri Sep 23 14:11:17 2011 -0400 dmx: fix typo in the title [ajax: fix typo in the commit message] Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith commit 7ed0c3912e1cbab960df308b9d4ea618be757fd2 Author: Andrea Canciani Date: Wed Jul 27 10:52:31 2011 +0200 render: Allow single-stop gradients The Render specification allows single-stop gradients and pixman 0.22 (X server requires >= 0.27.2 now) can rasterize them correctly. [ajax: update commit message] Signed-off-by: Andrea Canciani Reviewed-by: Soren Sandmann commit 3d9f578e6f0d13ecada7dc677fe61a4dd3d05e18 Author: Cyril Brulebois Date: Mon Jun 6 02:25:11 2011 +0200 doc: Convert an \fP pair into appropriate tags. Reviewed-by: Adam Jackson Signed-off-by: Cyril Brulebois commit d97ffef1ab95546634a74618ed2661cfd6d980b1 Author: Cyril Brulebois Date: Mon Jun 6 02:25:10 2011 +0200 doc: Try to avoid repetitions. Reviewed-by: Adam Jackson Signed-off-by: Cyril Brulebois commit 2cce6ffc350d3840337a4d045d5cf14bb7bf2b32 Author: Cyril Brulebois Date: Mon Jun 6 02:25:08 2011 +0200 doc: Fix punctuation. [ajax: s/ponct/punct/] Signed-off-by: Cyril Brulebois Reviewed-by: Jamey Sharp commit e7e3320098cad585d46f74d8a0c6946a080b0263 Author: Cyril Brulebois Date: Mon Jun 6 02:25:07 2011 +0200 doc: Fix extraneous > It looks like it serves no special purpose. Reviewed-by: Jamey Sharp Reviewed-by: Alan Coopersmith Signed-off-by: Cyril Brulebois commit 9b4f10d7490f6610a65d401958296c95ce891c8b Author: Cyril Brulebois Date: Mon Jun 6 02:25:06 2011 +0200 doc: Fix grammar and typos. Reviewed-by: Jamey Sharp Reviewed-by: Alan Coopersmith Signed-off-by: Cyril Brulebois commit 5b92a0a84a067b653cc457d8ec0fe25f36a9d207 Author: Cyril Brulebois Date: Mon Jun 6 02:25:05 2011 +0200 doc: Fix alignment. Reviewed-by: Jamey Sharp Reviewed-by: Alan Coopersmith Signed-off-by: Cyril Brulebois commit 0b8fca667b45f00249a3dd9ee79d2a77a4177b24 Author: Cyril Brulebois Date: Mon Jun 6 02:24:59 2011 +0200 doc: Fix typo. Signed-off-by: Cyril Brulebois Reviewed-by: Jamey Sharp Reviewed-by: Alan Coopersmith commit 1226f7ddd78da5dc8b6f6442600ac2deb3986e8d Author: Cyril Brulebois Date: Mon Jun 6 02:25:01 2011 +0200 doc: Get rid of RCS tags. Reviewed-by: Adam Jackson Signed-off-by: Cyril Brulebois commit 4803f7139131cee7bbf50b32d667d6e60302df09 Author: Cyril Brulebois Date: Sun Jun 5 23:32:26 2011 +0200 man: Fix case for MIT-unspecified. include/site.h says that COMPILEDDISPLAYCLASS is MIT-unspecified, rather than MIT-Unspecified. Fix the manpage accordingly. Signed-off-by: Cyril Brulebois Reviewed-by: Alan Coopersmith commit 593270038d8983b99aa0aaa24509da3cb944be5c Author: Tiago Vignatti Date: Tue Sep 7 15:50:26 2010 +0300 dix: remove dead extensions to protocol.txt lbx and mbe. Reviewed-by: Adam Jackson Signed-off-by: Tiago Vignatti commit 3cd56dd2cfbfcce6ba68c22450d51139208993ab Author: Robert Hooker Date: Fri Dec 3 23:42:27 2010 -0500 Add new GLX events errors and requests to protocol.txt Based off of glproto 1.4.11. Reviewed-by: Adam Jackson Signed-off-by: Robert Hooker commit 272ba9f021c6d08ebd6a2d96da3737f5630bcbd5 Author: Robert Hooker Date: Fri Dec 3 23:39:51 2010 -0500 Add DRI2 2.2/2.3 events and requests to protocol.txt Reviewed-by: Adam Jackson Signed-off-by: Robert Hooker commit 64e6124f27e9900809d0009b95c7c0b5b8788e6b Author: Emil Velikov Date: Tue Sep 22 15:35:40 2015 +0100 glamor: move GL_OES_EGL_image check next to EGL_EXT_image_dma_buf_import We're using the former only as the latter is present. Thus in some cases we might incorrectly error out if it's missing. Namely - glamor_glx, glamor_egl without gbm, EGL_KHR_gl_texture_2D_image or EGL_EXT_image_dma_buf_import. Fixes 58d54ee82df(glamor: explicitly check for GL_OES_EGL_image) Cc: Eric Anholt Reviewed-by: Adam Jackson Suggested-by: Eric Anholt Signed-off-by: Emil Velikov commit aa5606be1c0ea72b38de48ca333c7da5436368ef Author: Alan Coopersmith Date: Fri May 15 10:25:46 2015 -0700 Make configure test for LD_NO_UNDEFINED_FLAG on Solaris work w/autoconf 2.69 After upgrading from autoconf 2.68 to 2.69, this test started failing with "conftest.c", line 149: undefined symbol: NULL so use a raw 0 pointer to avoid header dependencies in the autoconf generated test case. Signed-off-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit fa0bb01899d586e02cf51892c17edd22e462a46c Author: Adam Jackson Date: Mon Sep 21 15:23:23 2015 -0400 rootless: Fix bogus handling of broken root clip gcc quite correctly complains about this: In file included from ../../include/scrnintstr.h:51:0, from rootlessValTree.c:98: In function 'RegionUninit.isra.1', inlined from 'RegionEmpty' at ../../include/regionstr.h:194:5, inlined from 'RootlessMiValidateTree' at rootlessValTree.c:490:9: ../../include/regionstr.h:166:9: warning: attempt to free a non-heap object 'RegionBrokenData' [-Wfree-nonheap-object] free((_pReg)->data); So that'd crash if you ever got there. RegionNull will do almost the same thing only without the free(), so let's do that instead; it might still not be an entirely sane way to recover, but it at least won't crash. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit b25f7d0c165c4d32c73fbdf9080012503d319ba1 Merge: db1089eaf 1ba4fde10 Author: Adam Jackson Date: Mon Sep 21 17:34:48 2015 -0400 Merge commit '1ba4fde1015fc6da19dfbfdf0f77f1071416e215' This is ofourdan/xwayland, minus: xwayland: Always update the wl_pointer cursor on pointer focus which was rejected for ABI and design issues. commit db1089eafc1c5371fa0030202de588d2e2b4f8e5 Author: Keith Packard Date: Mon Sep 21 07:16:17 2015 +0100 os/xdmcp: Just send XDMCP keepalive packets once every three minutes There was a complicated scheme to increase the time between keepalives from 3 minutes up to as much as 24 hours in an attempt to reduce network traffic from idle X terminals. X terminals receiving X traffic, or receiving user input would use the 3 minute value; X terminals without any network traffic would use a longer value. However, this was actually broken -- any activity in the X server, either client requests or user input, would end up resetting the keepalive timeout, so a user mashing on the keyboard would never discover that the XDMCP master had disappeared and have the session terminated, which was precisely the design goal of the XDMCP keepalive mechanism. Instead of attempting to fix this, accept the cost of a pair of XDMCP packets once every three minutes and just perform keepalives regularly. This will also make reworking the block and wakeup handler APIs to eliminate select masks easier. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit a3a40291330bad10401fe2bcdbc097ce742b026a Author: Keith Packard Date: Mon Sep 21 07:16:16 2015 +0100 os/xdmcp: Remove dead 'restart' code The X server used to wait for the user to hit a key or move the mouse before restarting the session after a keepalive failure. This, presumably, was to avoid having the X server continuously spew XDMCP protocol on the network while the XDM server was dead. Switching into this state was removed from the server some time before XFree86 4.3.99.16, so the remaining bits of code have been dead for over a decade, and no-one ever noticed. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 3cd7d33380953f2a315dd79ab74d7340c83fd80a Author: Egbert Eich Date: Tue Mar 31 09:06:46 2015 +0200 randr: Remove senseless checks for xf86RandR12Key When xf86RandR12Key is not set we will not get to the places where these tests are done as the functions in question are not called. In most cases we would have crashed before these checks anyway. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard commit 245040f0d0b937efe14d947468a641a95398776a Author: Chris Wilson Date: Mon Oct 6 10:02:22 2014 +0100 randr/prime: Don't stop on the first pipe when disabling ReplaceScanoutPixmap As we define sizeFits based on whether a CRTC is active, and skip trying to redirect the scanout on a disable pipe, we then attempt to undo it later and fail because crtc->scanout_pixmap != DRI2_Pixmap and !sizeFits. Paper over this failure by skipping unredirected CRTC when disabling. v2: Unwind upon failure Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84653 Signed-off-by: Chris Wilson Cc: Dave Airlie Reported-by: Christoph Haag Tested-by: Christoph Haag Reviewed-by: Alex Deucher commit 9d65a0de95a20632f2a6a04ba596dcdd76d9f5e2 Author: Alan Coopersmith Date: Fri Sep 18 08:44:07 2015 -0700 Remove DECnet from Xserver.man DECnet support died in modularization (X11R7.0) Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 82eb490b0a341729f25d0c42a937fe29d99da521 Author: Aaron Plattner Date: Thu Sep 17 16:04:33 2015 -0700 privates: Clear screen-specific keys during CloseScreen The modesetting driver corrupts memory when used after a server regeneration because not enough memory is allocated for its pixmap privates. This happens because its call to dixRegisterScreenSpecificPrivateKey() does nothing because key->initialized is still TRUE from the first server generation. However, the key is not in the screen's linked list of screen-specific privates because that's freed and reallocated during the server generation loop in dix_main(). Fix this by clearing key->initialized before CloseScreen and add a call to dixFreeScreenSpecificPrivates() for GPU screens. v2: Just set key->initialized to FALSE and move dixFreeScreenSpecificPrivates() calls to after CloseScreen. v3: Move dixFreeScreenSpecificPrivates() calls back to just before CloseScreen. Signed-off-by: Aaron Plattner Reviewed-by: Keith Packard commit 18a93da9b1f429bc54a8b236fcdd38dab58375cd Author: Jasper St. Pierre Date: Wed Feb 18 12:41:25 2015 -0800 test/xi1: Update .gitignore Reviewed-by: Adam Jackson commit cdd1d58159140759052ec043bc9828d94ba97bc7 Author: Jon TURNEY Date: Mon Jul 6 17:15:44 2015 +0100 mingw: Fix NO_LOCAL_CLIENT_CRED build Commit 4b4b9086 "os: support new implicit local user access mode [CVE-2015-3164 2/3]" carefully places the relevant code it adds under !NO_LOCAL_CLIENT_CRED, but unfortunately doesn't notice that NO_LOCAL_CLIENT_CRED is defined as a side-effect in the middle of GetLocalClientCreds(), so many of these checks precede its definition. Move the check if NO_LOCAL_CLIENT_CRED should be defined to configure.ac, so it always occurs before it's first use. v2: Move check to configure.ac v3: Use AC_CACHE_CHECK and name cache varaible appropriately [ajax: Massaged commit message] Signed-off-by: Jon TURNEY Reviewed-by: Ray Strode commit f8a2c087c89ed5b638a2e62987f255d3f04f914e Author: Javier Jardón Date: Sun Mar 22 03:52:03 2015 +0000 configure.ac: Add support for new versions of systemd ... that only provide a unique libsystemd.pc file Reviewed-by: Peter Hutterer Signed-off-by: Javier Jardón commit 67dd34fa734085ed67ba7790820fe4743d48b60f Author: Adam Jackson Date: Wed Jun 10 13:20:59 2015 -0400 render: Simplify SProcRenderScale Since ProcRenderScale throws BadImplementation anyway it's pointless to waste time carefully swapping the request. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit a579e6ba7763749d51d16e3a54941e06939df07a Author: Ian Scott Date: Thu May 21 16:13:12 2015 -0700 Xephyr: Paint with subimage for non-Glamor & non-XSHM case This improves the case for when we paint an area without SHM. xcb_image_subimage() is used to create a subimage for the damaged area, which is converted to native format if necessary. Signed-off-by: Ian Scott Reviewed-by: Chris Wilson commit a6c0564f7f00aa66fd19180f75b6b09904444f06 Author: Laércio de Sousa Date: Mon Mar 23 10:58:03 2015 -0300 ephyr: move host_has_extension() implementation to hostx.c This is a trivial patch that moves host_has_extension() implementation from ephyr.c to hostx.c so that it can be called by hostx.c internal functions. Also rename function to hostx_has_extension() for consistency. Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 9414ba3683231afe9bee0f941c53998dea218615 Author: Jürg Billeter Date: Sun Feb 8 11:34:18 2015 +0100 ephyr: fix -no-host-grab argument processing Signed-off-by: Jürg Billeter Reviewed-by: Alan Coopersmith commit 1f915e8b524dd02011158aa038935970684c7630 Author: Daniel Drake Date: Wed May 20 13:16:12 2015 -0600 Keep SIGALRM restart flag after Popen Commit 94ab7455 added SA_RESTART to the SIGALRM handler. However, the Popen code tears down and recreates the SIGALRM handler via OsSignal(), and this flag is dropped at this time. Clean the code to use just a single codepath for creating this signal handler, always applying SA_RESTART. [ajax: Fixed commit id] Reviewed-by: Adam Jackson Signed-off-by: Daniel Drake commit 94ab7455abc213fc96760e29ab2e943ec682fb22 Author: Daniel Drake Date: Tue May 12 16:39:22 2015 -0600 Allow system call restarts upon signal interruption The X server frequently deals with SIGIO and SIGALRM interruptions. If process execution is inside certain blocking system calls when these signals arrive, e.g. with the kernel blocked on a contended semaphore, the system calls will be interrupted. Some system calls are automatically restartable (the kernel re-executes them with the same parameters once the signal handler returns) but only if the signal handler allows it. Set SA_RESTART on the signal handlers to enable this convenient behaviour. Reviewed-by: Adam Jackson Signed-off-by: Daniel Drake commit 1ba4fde1015fc6da19dfbfdf0f77f1071416e215 Author: Boyan Ding Date: Mon Aug 4 21:16:34 2014 +0800 xwayland: Activate and enable device on first capability reporting Commit 2172714c changed behavior of capability handling, but it only solved part of the problem. If Xwayland is launched without a capability (e.g. no pointer device is connected when Xwayland was spinned up), and later that capability comes, the device added will not be automatically initialized. This patch initializes the device when the capability is reported for the first time, thus avoiding the problem. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=81819 Signed-off-by: Boyan Ding Reviewed-by: Daniel Stone commit f1995de1c43733a9e586605674c4071357a58e78 Author: Peter Hutterer Date: Fri Aug 28 14:28:11 2015 +1000 xwayland: call through to miPointerWarpCursor on warp_cursor This is (eventually) called during InitializeSprite() → *pScreen->SetCursorPosition → miPointerSetCursorPosition when a device is set to floating. We don't do anything special outselves, but we need to pass on to the next layer to make sure the device is initialized properly. Otherwise, pScreen stays NULL and eventually crashes the server when we try to clean up behind us. Test case: grab a device → floats it, ungrab again → crash Reported-by: Jason Gerecke Signed-off-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit 373599ab008f0ecf8f3fb62455a5474f5ec8f499 Author: Peter Hutterer Date: Fri Aug 28 14:28:10 2015 +1000 xwayland: fix crash on enter/leave for a grabbed slave device When grabbed, the slave device is floating, i.e. the master device is NULL. CheckMotion() isn't happy with NULL. Make sure we pass the right device in, either the master device when the device is attached, or the device itself when it is floating. Reported-by: Jason Gerecke Signed-off-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit f1ba8858d5baa63cde6361492e6d349ce1b38d21 Author: Peter Hutterer Date: Fri Aug 28 14:28:09 2015 +1000 xwayland: use the device pointer we already have No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit 44f250a7e8eb86d3f41da5d186d839e7a14648a3 Author: Carlos Garnacho Date: Wed May 27 18:42:00 2015 +0200 xwayland: Remove related touchpoints when unrealizing windows These sequences are forgotten to all purposes. Signed-off-by: Carlos Garnacho Reviewed-by: Olivier Fourdan commit b7cd48f71d269101e28ae6855b895057378715f9 Author: Carlos Garnacho Date: Wed May 27 18:41:59 2015 +0200 xwayland: Implement the wl_touch interface A DeviceIntPtr with touch valuators is also created in order to deliver the translated touch events. The lifetime of xwl_touch structs is tied to the wayland ones, finishing in either wl_touch.up() or wl_touch.cancel() Signed-off-by: Carlos Garnacho Reviewed-by: Olivier Fourdan commit d96eccc057094be31c1ee4e3b3246675934cb19d Author: Carlos Garnacho Date: Wed May 27 18:41:58 2015 +0200 xwayland: Add xwl_touch struct This struct holds information about each individual, ongoing touchpoint. A list of these is held by the xwl_seat. Signed-off-by: Carlos Garnacho Reviewed-by: Olivier Fourdan commit c1565f3ca663aa4ba4316d7248737ab817116fbd Author: Jasper St. Pierre Date: Sat Feb 21 11:53:59 2015 -0800 xwayland-input: Remove our XYToWindow handler This was built as a hack for simple Wayland compositors like Weston which were lazy and didn't want to configure windows server-side when moved. Since comboboxes and menus are separate toplevel O-R windows, this hack breaks input as it needs to be traced normally, not simply sent to the focused window. X11 toolkits really do need their windows to be configured correctly for their O-R windows comboboxes or menus other things, so let's fix the lazy compositors and remove this. I have tested this patch with both Weston and Mutter and neither of them require any changes, and it fixes comboboxes and menus. If somebody then wants to revert 73698d4, that's fine by me, so we reduce the amount of API that DDXen have. Signed-off-by: Jasper St. Pierre Reviewed-by: Daniel Stone commit 58d54ee82dfae5486bc09d04d2760c922d54d631 Author: Emil Velikov Date: Wed Sep 16 22:10:22 2015 +0100 glamor: explicitly check for GL_OES_EGL_image Otherwise we'll fail miserably later on as we try to use glEGLImageTargetTexture2DOES. Signed-off-by: Emil Velikov Reviewed-by: Michel Dänzer commit 139e36dd5cbab80a9296129f3d25379dc01442b3 Author: Ilia Mirkin Date: Fri Sep 4 18:56:19 2015 -0400 modesetting: fix up output naming convention A user on a nouveau-driven card ran into a problem where DVI-D-1 and DVI-I-1 were aliasing. The simplest fix is to provide the full connector names. While we're at it, rename the output names to match what is in the kernel, and start counting the connectors from 1 rather than 0. The only deviation is HDMI vs HDMI-A, which kept its original name. This will break backwards compatibility with existing xorg.conf's that reference output names, but the alternative is to create a separate counting system, further disconnecting from the kernel names. Signed-off-by: Ilia Mirkin Reviewed-by: Dave Airlie commit a907ead7864ac5720854fa3333b66fd5187d5eaf Author: Marek Chalupa Date: Thu Aug 20 07:43:51 2015 +0200 xwayland: implement repeat_info event xwayland windows ignored any key repeating settings advertised by a compositor v2. don't hardcode version 4 of seat use AutoRepeatModeOn/Off v3. use min(version, 4) when binding seat Reviewed-by: Adam Jackson Signed-off-by: Marek Chalupa commit e8e3368298c98a1292bb1c727e2f3d56539e2eac Author: Felix Janda Date: Mon Aug 17 20:25:53 2015 +0200 On linux use instead of is obsolete. Using instead fixes building with musl libc. Reviewed-by: Adam Jackson Signed-off-by: Felix Janda commit dfa8b37cfb2589f2474f6fcc755dde77bfdd6fed Author: Adam Jackson Date: Wed Jul 29 11:30:15 2015 -0400 glxproxy: Fix an obvious thinko in QueryExtensionsString gcc 5.1 throws a rather amusing warning here: glxcmdsswap.c: In function ‘__glXSwapQueryExtensionsString’: glxcmdsswap.c:439:1: warning: function might be candidate for attribute ‘noreturn’ [-Wsuggest-attribute=noreturn] __glXSwapQueryExtensionsString(__GLXclientState * cl, GLbyte * pc) This is entirely accurate, albeit curiously phrased: swapping some bits hanging off the end of a null pointer will make Xdmx crash, so from the perspective of code generation the function will indeed not return. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 75ee874e432d959a70fbc2c9208d20dbfa5cbc5f Author: Jon TURNEY Date: Fri May 1 17:06:47 2015 +0100 Build fix for DMX ./../dix/.libs/libdix.a(pixmap.o): In function `PixmapStartDirtyTracking': xorg/xserver/dix/pixmap.c:194: undefined reference to `RRTransformCompute' I'm not quite sure how 0db457b fixes this Move RANDR_LIB to after DIX_LIB, so the reference to RRTransformCompute in DIX_LIB is satisfied. Signed-off-by: Jon TURNEY Tested-by: Olivier Fourdan Signed-off-by: Keith Packard commit 634e357be2ec400f63bd5c42f706b709b6ddabc3 Author: Ingo Schwarze Date: Sun Aug 30 15:26:40 2015 +0200 remove bogus \/ escapes some X manuals use then escape sequence \/ when they want to render a slash. That's bad because \/ is not a slash but an italic correction, never producing any output, having no effect at all in terminal output, and only changing spacing in a minor way in typeset output. Signed-off-by: Matthieu Herrb Reviewed-by: Mark Kettenis Signed-off-by: Keith Packard commit c74c074d8e4981eb4509e120e14d15387bdc94ef Author: Olivier Fourdan Date: Mon Aug 31 08:18:59 2015 +0200 dix: export ResourceClientBits() ResourceClientBits() might be used by the modules as well, need to mark the symbol as visible to that the linker can resolve it at run time. /usr/bin/X: symbol lookup error: /usr/lib64/xorg/modules/extensions/libglx.so: undefined symbol: ResourceClientBits bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91763 Signed-off-by: Olivier Fourdan Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit dbfed3a291619c2530f314394bd73d71e2567e78 Author: Keith Packard Date: Tue Sep 1 19:03:33 2015 -0700 Bump version to 1.17.99.901 (1.18 RC1) Signed-off-by: Keith Packard commit bcb60a49c5e74aa11d0256874659afddea91e53d Author: Jon TURNEY Date: Tue Jul 7 23:11:07 2015 +0100 debug output format fix in TouchEventHistoryPush() xserver/build.x86_64/../dix/touch.c:468:16: error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Werror=format=] %zu is C99, but is already used in a few places. Perhaps doc/c-extensions needs to mention it. Signed-off-by: Jon TURNEY Reviewed-by: Peter Hutterer commit 1f96a0d273e56d01cd240e6a4ef8765e0ffe058c Author: Jon TURNEY Date: Fri May 1 17:40:06 2015 +0100 debug output format fix in ephyrProcessMouseMotion() xorg/xserver/hw/kdrive/ephyr/ephyr.c:979:9: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘ScreenPtr’ [-Werror=format=] This looks like a genuine bug, and ephyrCursorScreen->myNum was meant here rather than ephyrCursorScreen v2: Insert a ":" as well Signed-off-by: Jon TURNEY Reviewed-by: Peter Hutterer commit 8cc88fbe9e4699cd2570641eb2752977b5505d16 Author: Jon TURNEY Date: Fri May 1 17:33:35 2015 +0100 debug output format fix in DRISwapContext() xorg/xserver/hw/xfree86/dri/dri.c:1695:19: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘DRIContextPrivPtr’ [-Werror=format=] ^ xorg/xserver/hw/xfree86/dri/dri.c:1695:19: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘DRIContextPrivPtr’ [-Werror=format=] Signed-off-by: Jon TURNEY Reviewed-by: Peter Hutterer commit 27cf5840272810ae20fdae550db71ec48cf1b02d Author: Jon TURNEY Date: Tue Jul 7 23:29:51 2015 +0100 debug output format fix in TI.c xserver/hw/xfree86/ramdac/TI.c:118:12: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Werror=format=] xserver/hw/xfree86/ramdac/TI.c:118:12: error: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Werror=format=] xserver/hw/xfree86/ramdac/TI.c:118:12: error: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘long unsigned int’ [-Werror=format=] Use %lu for an unsigned long Signed-off-by: Jon TURNEY Reviewed-by: Peter Hutterer commit 6cc0f3d95d62e33a5d86f865159cc3526d3a9dc5 Author: Jon TURNEY Date: Tue Jul 7 23:20:29 2015 +0100 debug output format fix in xf86Events.c xserver/hw/xfree86/common/xf86Events.c:183:5: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘void *’ [-Werror=format=] Signed-off-by: Jon TURNEY Reviewed-by: Peter Hutterer commit d206c240c0b85c4da44f073d6e9a692afb6b96d2 Author: Olivier Fourdan Date: Tue Jul 7 18:19:50 2015 +0200 configurable maximum number of clients Make the maximum number of clients user configurable, either from the command line or from xorg.conf This patch works by using the MAXCLIENTS (raised to 512) as the maximum allowed number of clients, but allowing the actual limit to be set by the user to a lower value (keeping the default of 256). There is a limit size of 29 bits to be used to store both the client ID and the X resources ID, so by reducing the number of clients allowed to connect to the X server, the user can increase the number of X resources per client or vice-versa. Parts of this patch are based on a similar patch from Adam Jackson This now requires at least xproto 7.0.28 Signed-off-by: Adam Jackson Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 7ecdfbf0af3547295b245efa754123db65cabb43 Merge: bca4f4b56 a0b4f30b1 Author: Keith Packard Date: Mon Aug 17 18:53:25 2015 -0700 Merge remote-tracking branch 'airlied/modesetting-zaphod' commit bca4f4b56c7619d17f9df46f7aac392ea01a9429 Author: Keith Packard Date: Mon Aug 17 18:37:10 2015 -0700 mi: Always initialize edge1 and edge2 in miLineArc This eliminates a warning generated when miLineArcD is inlined and the compiler can't figure out that edge1 and edge2 are always initialized before being used. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 5daf1295cb4f71510da595721d10f7ea3b74d1b9 Author: Keith Packard Date: Mon Aug 17 18:35:20 2015 -0700 dixfont.h: Include fontutil.h before GetGlyphs is #defined This eliminates the duplicate declaration of dixGetGlyphs when fontutil.h gets included after dixfont.h has defined GetGlyphs as dixGetGlyphs. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit d4710004367ab8eab794a12385ca7ed3acc9a0e0 Author: Dave Airlie Date: Thu Aug 13 09:25:37 2015 +1000 rootless: rename w->_w to avoid shadow warnings fixes: In file included from rootlessWindow.c:51:0: rootlessWindow.c: In function 'RootlessResizeWindow': rootlessCommon.h:198:19: warning: declaration of 'w' shadows a parameter [-Wshadow] WindowPtr w = pWin; \ ^ rootlessWindow.c:1292:9: note: in expansion of macro 'HUGE_ROOT' HUGE_ROOT(pWin); ^ rootlessWindow.c:1262:35: note: shadowed declaration is here unsigned int w, unsigned int h, WindowPtr pSib) ^ In file included from rootlessWindow.c:51:0: rootlessCommon.h:207:19: warning: declaration of 'w' shadows a parameter [-Wshadow] WindowPtr w = pWin; \ ^ rootlessWindow.c:1296:9: note: in expansion of macro 'NORMAL_ROOT' NORMAL_ROOT(pWin); ^ rootlessWindow.c:1262:35: note: shadowed declaration is here unsigned int w, unsigned int h, WindowPtr pSib) ^ Signed-off-by: Dave Airlie Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 7f506b8099d23c2f045ad26cc5cff00109b69d7b Author: Dave Airlie Date: Thu Aug 13 09:25:36 2015 +1000 rootless: fix warnings due to lack of const keeping. Signed-off-by: Dave Airlie Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b923443816320d0636d6fd40c3c1125b93332907 Author: Dave Airlie Date: Thu Aug 13 09:25:35 2015 +1000 mioverlay.c: remove shadowed pScreen. This is already defined at the function entry. fixes warning: CC mivaltree.lo mioverlay.c: In function 'miOverlayWindowExposures': mioverlay.c:993:23: warning: declaration of 'pScreen' shadows a previous local [-Wshadow] ScreenPtr pScreen = pWin->drawable.pScreen; ^ mioverlay.c:986:15: note: shadowed declaration is here ScreenPtr pScreen = pWin->drawable.pScreen; Signed-off-by: Dave Airlie > Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit a0b4f30b1f584d2957c9c99e430da5740d2d4ab2 Author: Mario Kleiner Date: Wed Aug 5 00:08:40 2015 +0200 modesetting: Add more missing options to man page. Descriptions for Options PageFlip and SWCursor. Signed-off-by: Mario Kleiner Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 19e1dc8f6ea6d7ff5ba4a5caa0e2f40a47879408 Author: Dave Airlie Date: Wed Jul 22 03:56:13 2015 +0100 modesetting: add zaphod support (v3) This adds zaphod and ZaphodHeads support to the the in-server modesetting driver. this is based on a request from Mario, and on the current radeon driver, along with some patches from Mario to bring things up to the state of the art in Zaphod. v2: fixup vblank fd registring. v3: squash Mario's fixes. modesetting: Allow/Fix use of multiple ZaphodHead outputs per x-screen. modesetting: Take shift in crtc positions for ZaphodHeads configs into account. modesetting: Add ZaphodHeads description to man page. small cleanups (airlied). Reviewed-and-tested-by: Mario Kleiner Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 533fb627398e20f863234d780f4463e37007515b Author: Adam Jackson Date: Tue Aug 4 13:17:02 2015 -0400 xwayland: Don't (double) destroy input resources in CloseScreen By the time we get here we've already done CloseDownDevices, so on the second regeneration you get: Invalid read of size 4 at 0x43402A: RemoveDevice (devices.c:1125) by 0x427902: xwl_seat_destroy (xwayland-input.c:568) by 0x42649C: xwl_close_screen (xwayland.c:116) by 0x4B7F67: CursorCloseScreen (cursor.c:187) by 0x536003: AnimCurCloseScreen (animcur.c:106) by 0x539831: present_close_screen (present_screen.c:64) by 0x43E486: dix_main (main.c:351) by 0x30D70206FF: (below main) (libc-start.c:289) Address 0x980e1a0 is 64 bytes inside a block of size 904 at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x434158: RemoveDevice (devices.c:1157) by 0x42F77B: CloseDeviceList (devices.c:1017) by 0x430246: CloseDownDevices (devices.c:1047) by 0x43E3EB: dix_main (main.c:333) by 0x30D70206FF: (below main) (libc-start.c:289) Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 11f4cc47a815c5d6284b1338e748e2605b2dd779 Author: Adam Jackson Date: Tue Aug 4 13:17:01 2015 -0400 xwayland: Don't (double) destroy RANDR resources in CloseScreen By the time we get here we've already been through FreeAllResources, which has already torn down the RANDR objects, so on the second regeneration you get: Invalid read of size 4 at 0x51C6F0: RRCrtcDestroy (rrcrtc.c:659) by 0x4285F5: xwl_output_destroy (xwayland-output.c:191) by 0x426464: xwl_close_screen (xwayland.c:112) by 0x4B7F77: CursorCloseScreen (cursor.c:187) by 0x536013: AnimCurCloseScreen (animcur.c:106) by 0x539841: present_close_screen (present_screen.c:64) by 0x43E496: dix_main (main.c:351) by 0x30D70206FF: (below main) (libc-start.c:289) Address 0x4cc6640 is 0 bytes inside a block of size 728 free'd at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x51BCCF: RRCrtcDestroyResource (rrcrtc.c:689) by 0x45CD91: doFreeResource (resource.c:872) by 0x45DE56: FreeClientResources (resource.c:1138) by 0x45DF06: FreeAllResources (resource.c:1153) by 0x43E3BD: dix_main (main.c:321) by 0x30D70206FF: (below main) (libc-start.c:289) Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit ea03e314f98e5d8ed7bf7a508006a3d84014bde5 Author: Eric Anholt Date: Mon Jul 27 13:54:00 2015 -0700 glamor: Don't try to free the pixmap priv if we fail to allocate FBO. Fixes a regression since a2a2f6e34bd49e7ae31779274d52e800595660bc. I missed this in testing on x86, because we never fail to allocate an FBO. We do hit this path on VC4, though. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit 6916d32ab3ec1aa922094abce7fac22884ee4e83 Author: Alan Coopersmith Date: Sun Jul 19 08:24:39 2015 -0700 Xserver.man: -retro is used when starting the server, not the stipple Signed-off-by: Alan Coopersmith Reviewed-by: Michel Dänzer Signed-off-by: Eric Anholt commit 0a458a908ec071a4da5d22c760581e0c5ec885ce Author: Michel Dänzer Date: Wed Jul 22 15:37:23 2015 +0900 glamor: Make our EGL context current before calling into GL in glamor_init Without this, the context of another screen may be current, or no context at all if glamor_egl_init failed for another screen. Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Eric Anholt commit a8a0f6464a33c12c1de495d74fd478c0d952643e Author: Aaron Plattner Date: Thu Jul 16 15:12:52 2015 -0700 xfree86: Bump video driver ABI version to 20 Commit 90db5edf119187f8b1b9207c8c384d6cd7ef9edc modified the signature of StartPixmapTrackingProcPtr, so drivers implementing that need to use the updated definition. Signed-off-by: Aaron Plattner Signed-off-by: Eric Anholt commit 2fcfa532532fbe4a7f668556808e6245ff4e36bc Merge: cb695b0f3 7b0f94062 Author: Eric Anholt Date: Fri Jul 17 10:15:01 2015 -0700 Merge remote-tracking branch 'ajax/xserver-next' into master commit cb695b0f3b8def4d1ac02458fe630b65f6a5a3e6 Author: Armin K Date: Thu Jul 16 14:54:48 2015 +0200 xfree86/os-support/linux: Fix make distcheck Header was added in 1dba5a0b194653b0effb01a918bd7338b0c6bcb9 but not in Makefile.am, resulting in missing header in the distribution tarball. Signed-off-by: Eric Anholt commit 29efa905ec1e22d66b517378c6e5ad47a09d6977 Author: Robert Ancell Date: Thu Jul 16 12:26:05 2015 +1200 modesetting: Use correct types for return values of glamor BO exports. glamor_name_from_pixmap and glamor_fd_from_pixmap return CARD16 and CARD32 values via pointers. The current code uses uint16_t and uint32_t which will probably be the same but it's safer to use the datatypes as specified by the function. Signed-off-by: Robert Ancell Signed-off-by: Eric Anholt commit db5337afb248edf81087cf8d74006fc496d70589 Author: Dave Airlie Date: Wed Jul 15 17:56:11 2015 +1000 glamor: make current in prepare paths Lots of the accel paths only make current once they start doing someting, so a lot of them call the bail paths without make current, which means on PRIME systems for example we end up in the wrong context. Add a prepare pixmap in the prepare fallback path. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90667 Signed-off-by: Dave Airlie Signed-off-by: Eric Anholt Reviewed-and-Tested-by: Michel Dänzer Reviewed-by: Eric Anholt commit 1a18513a4eb3fa22459dd9f7d8f0e275aff679ec Author: Michel Dänzer Date: Fri Jul 10 15:28:52 2015 +0900 glamor: Use glamor_prepare_access_box() for PutImage/GetImage fallback Fixes slow text display in xdvi. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91260 Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Eric Anholt commit fde13565c1b2462ee38f2a446ad3c9157261afa2 Author: Eric Anholt Date: Thu Jul 2 13:57:05 2015 -0700 glamor: Drop unused box translation/bounds code. These are dead since the glamor_copy.c replacement. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit ab5aa270c79d70f095bc7abadeef227b4062027c Author: Eric Anholt Date: Thu Jul 2 13:52:05 2015 -0700 glamor: Move cache_format to glamor_fbo.c, where it's used. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit 0ca783e8ee5dfb086fbfa64d26173bcca78b4010 Author: Eric Anholt Date: Thu Jul 2 13:50:42 2015 -0700 glamor: Drop another dead function. This hasn't been used since the format swap/revert stuff for pictures was added back in 2012. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit c1111710628cc2a9dfaee0d74ea9fceee990095b Author: Eric Anholt Date: Thu Jul 2 13:33:01 2015 -0700 glamor: Take transforms into account when preparing for a fallback. This function takes the start x/y and the destination's width/height, so it only works if there's no transform. We could potentially transform this box and take its bounds with some rounding, but this at least gets us to read out enough data. Note that this does the same overshoot on destination pictures with a transform attached, but that seems unlikely to be used anyway. v2: Add XXX comment for the commit message note (Suggested by Michel). Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer (v1) Reviewed-by: Dave Airlie (v1) commit c16e086dace81151f399485e5c686617a43d5b94 Author: Eric Anholt Date: Thu Jul 2 13:25:40 2015 -0700 glamor: Drop dead drm_stride field. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit 8097c887023b72744cb2cb943c2deca7ca0c404a Author: Eric Anholt Date: Thu Jul 2 13:11:20 2015 -0700 glamor: Drop tracking of the last picture attached to pixmaps. Signed-off-by: Eric Anholt Acked-by: Michel Dänzer Reviewed-by: Dave Airlie commit 0dbdb83b0d0254ac67fb33da8bf9ebc0ef4e8081 Author: Eric Anholt Date: Thu Jul 2 12:55:27 2015 -0700 glamor: Use the actual picture's format when uploading memory pixmaps. The pixmap->picture is just the *last* picture attached to the pixmap, so you'd potentially be looking at the wrong one when trying to temporarily upload to avoid a composite fallback. There's some trickiness in glamor_render.c when we're dealing with the upload of a GLAMOR_MEMORY pixmap as both the source and mask using different formats, where we smash the source's format to a new value so that the mask can use the same uploaded bits. Dropping most of that should be safe, since it will be uploaded as the source first, so the smashed format will still be used. Signed-off-by: Eric Anholt Acked-by: Michel Dänzer Reviewed-by: Dave Airlie commit 1fd11c46aa086e4b80cb1bafa87c6b19a8014fd1 Author: Eric Anholt Date: Thu Jul 2 12:49:36 2015 -0700 glamor: Move glamor_render.c pict handling to glamor_picture.c These functions aren't used by anything else, and are specific to the temporary-upload-as-a-weird-format path of glamor_render.c, called through glamor_upload_picture_to_texture(). Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit 53aed06fb45aed4145754cd622508563ad262c4a Author: Eric Anholt Date: Thu Jul 2 12:48:01 2015 -0700 glamor: Drop dead glamor_upload_bits_to_pixmap_texture() proto. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit b51e079e1877411fde72372c3953d71e42ac1d6e Author: Eric Anholt Date: Thu Jul 2 12:40:05 2015 -0700 glamor: Use the new upload/download interface for XV uploads. We don't need any of its weird handling of picture formats, since our XV pixmaps don't have any pictures attached. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit 1bd966d16d87ed908547144c68850f2cdee05469 Author: Eric Anholt Date: Thu Jul 2 12:21:41 2015 -0700 glamor: Ignore picture formats when choosing color for core rendering. Attaching a picture to a pixmap doesn't change its GL format, so it doesn't change how core rendering should be assigning colors to it. (Imagine XCreatePixmap(), optional XCreatePicture(pixmap) with various formats, XFillRectangle, XGetImage(). If the XGetImage results changed, this would be wrong). Fixes all failures in "rendercheck -t fill" and, as a result, the remaining failures in "rendercheck -t blend -o src -f a8r8g8b8,x2r10g10b10" Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit 5a81de8284f851751a8943aa6a905377be315c7b Author: Eric Anholt Date: Wed Jul 8 12:18:28 2015 -0700 glamor: Don't try to do rendering with unsupported formats. I'm amazed we've made it as far as we have without these checks: if you made an unusual format picture that wasn't the normal a8r8g8b8 or x8r8g8b8 or a8, we'd go ahead and try to render with it, ignoring that the sampler would fetch totally wrong bits. Fixes 260 tests in rendercheck -t blend -o src -f a8r8g8b8,x2r10g10b10 Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit 0d7cbd6f5a2b5c9c690979da9c1483e8f6133903 Author: Hans de Goede Date: Fri Jul 3 20:42:48 2015 +0200 glamor_egl: Properly free resources on init-error and exit glamor_egl_init() was not undoing any of the init steps on init error, add an glamor_egl_cleanup() function and use this both on error and on exit to cleanup the various resources. Even on a clean exit eglTerminate() was not being called, causing the fd dup()-ed by eglInitialize() to stay open, call eglTerminate() from the new glamor_egl_cleanup() to fix this. Signed-off-by: Hans de Goede Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 80b6652c9fb9cdff91e92fa16c07e2cc63b06f44 Author: Eric Anholt Date: Tue Jul 7 17:21:55 2015 -0700 glamor: Drop a bunch of glamor_priv == NULL checks. Now that it's always non-null when the pixmap is non-null, we don't need so much of this. glamor_get_pixmap_private() itself still accepts a NULL pixmap and returns NULL, because of glamor_render.c Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Keith Packard commit a2a2f6e34bd49e7ae31779274d52e800595660bc Author: Eric Anholt Date: Tue Jun 30 16:20:18 2015 -0700 glamor: Ask the server to always allocate our private. This avoids a lot of screwing around to attach our privates later. It means that non-glamor pixmaps now gain 120 bytes of glamor privates on 64-bit (which has quite a bit of fixable bloat), and glamor pixmaps take one less pointer of storage (not counting malloc overhead). Note that privates start out zero-filled, which matches the callocs we were doing when making our own privates, and in the case of an fb pixmap that has a priv where it didn't before, the type ends up being GLAMOR_MEMORY as we would want. v2: Clarify that the GLAMOR_MEMORY enum must be 0 (as it was previosuly), so that the new pixmap private behavior is as expected. Suggested by keithp. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer (v1) Reviewed-by: Keith Packard commit d278c30e68d79e86a3e2207b629d1e461856f907 Author: Eric Anholt Date: Tue Jun 30 20:35:59 2015 -0700 glamor: Drop dead glamor_is_large_picture(). It died as of keithp's new glyphs code. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Keith Packard commit cd608a516d2c59ebfb95fadfecf68227888c0e4e Author: Eric Anholt Date: Tue Jun 30 20:25:06 2015 -0700 glamor: Reuse the glamor_is_memory helper. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Keith Packard commit 7b0f940625a0f6eee2ef91dfbfa4a206246940f5 Author: Adam Jackson Date: Fri Dec 19 13:46:37 2014 -0500 atom: make FreeAtom static Reviewed-by: Chris Wilson Signed-off-by: Adam Jackson commit 2d2cf9e322a5ec3ead175edc136cdaeea00ec1b1 Author: Adam Jackson Date: Fri Dec 19 12:57:41 2014 -0500 atom: Bump initial table size We're always creating ~230 atoms at startup, might as well tune it so we don't hit the realloc path before Dispatch. Reviewed-by: Chris Wilson Signed-off-by: Adam Jackson commit 995ff11422eb49160abfe276f471e412b16cab9d Author: Adam Jackson Date: Tue May 19 11:31:25 2015 -0400 glx: Implement GLX_ARB_context_flush_control This extension allows clients to opt out of the implicit glFlush on context release, which is quite nice for performance for clients using multiple contexts. The server doesn't really need to be aware of the client's decision, at least for direct contexts, but it does need to not reject the context attribute out of hand. This patch won't do anything unless built against a Mesa that defines the __DRI2_FLUSH_CONTROL extension (and a new enough glxext.h, but that's been there since 10.3 at least). Reviewed-by: James Jones Signed-off-by: Adam Jackson commit 2d7194334a9f84e417ec90e220b2fe476f704612 Author: Adam Jackson Date: Fri May 15 11:27:31 2015 -0400 glx/swrast: Do more GLX extension setup This gets you nice things like core contexts when using Xvfb. Also, no, MESA_copy_sub_buffer is not enabled automatically. Reviewed-by: James Jones Reviewed-by: Jon Turney Signed-off-by: Adam Jackson commit cbd3cfbad3f07b20e90ea9498110f255813eb441 Author: Adam Jackson Date: Tue Jun 2 13:58:30 2015 -0400 dix: Restore PaintWindow screen hook Removes the last cpp conditional on ROOTLESS from dix code. Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit 74d64ceea02bffad1caf3d1a727edbd38d968059 Author: Adam Jackson Date: Tue Jun 2 13:58:30 2015 -0400 mi: Remove questionable optimization from the rootless path This is effectively a revert of 7b506fdc840aebed6b5acb91437a2cb620b5bddc except the coding style reindent broke that. The code makes no sense in any case. drawable can never be null since it's the first member of WindowRec, and we're never called with a null window. Neither can it be an UNDRAWABLE_WINDOW since those are InputOnly windows; the rootless code does not set the root window to either UNDRAWABLE or InputOnly, so. Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit 315661a425018a546f7bcc18ad3e5f4578473ca6 Author: Adam Jackson Date: Tue Jun 2 13:58:30 2015 -0400 fb: Make rootless-agnostic Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit 1594fb912996e9776d9e36383bd1d9f5dd2877eb Author: Adam Jackson Date: Tue Jun 2 13:58:30 2015 -0400 rootless: Build unconditionally It's not a lot of code, and if you're doing things to the core that affect rootless you should be alerted early. Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit bdc917a41691250701ccc9a0b087448b50892fa9 Author: Adam Jackson Date: Tue Jun 2 13:58:30 2015 -0400 rootless: Genericize the config header a bit ROOTLESS_RESIZE_GRAVITY is an optimization, so let's default it to off unless the backing window system is known to support it. ROOTLESS_PROTECT_ALPHA looks like it has different values for xquartz and win32, but hilariously rootlessGC.c merely checks if it is defined, not what the value is. It's effectively the more conservative path anyway, so let's just turn it on. Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit 6f3332b9f411fd7ac9cab0085faa56f6c2ff3323 Author: Adam Jackson Date: Tue Jun 2 13:58:30 2015 -0400 dix: unifdef pWin->rootlessUnhittable No reason to vary the dix ABI over this. Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit 36fac0dd1a9a9cf41b631cf7e1ea015bcf920db7 Author: Adam Jackson Date: Fri May 23 13:23:20 2014 -0400 xfixes: Unexport xfixes.h There's nothing a driver could want to use this for. Acked-by: Chris Wilson Signed-off-by: Adam Jackson commit 4da66d9e0399141feffd5f002e4195a438fe5020 Author: Adam Jackson Date: Tue Jul 8 14:27:02 2014 -0400 vidmode: Hide implementation details Also remove vidmodeproc.h from the SDK since no drivers are using it. Acked-by: Chris Wilson Signed-off-by: Adam Jackson commit 49d7bae7f4c6a93f92df828440e3478513f930f4 Author: Adam Jackson Date: Tue Jul 8 14:18:07 2014 -0400 xge: Hide some implementation details Acked-by: Chris Wilson Signed-off-by: Adam Jackson commit 2377690709de11087edc9d1116c9feaeb8f118ed Author: Adam Jackson Date: Tue Jul 8 14:03:13 2014 -0400 dga: Hide a bunch of implementation details Acked-by: Chris Wilson Reviewed-by: Aaron Plattner Signed-off-by: Adam Jackson commit b5fbe9c6327fac88c09afce598238a7534521b69 Author: Adam Jackson Date: Tue Jul 8 13:37:34 2014 -0400 xfree86: Hide some pre-randr mode validation details Acked-by: Chris Wilson Reviewed-by: Aaron Plattner Signed-off-by: Adam Jackson commit 70b402be2626d4f4afb02b6f5baa543262548bd7 Author: Adam Jackson Date: Fri May 30 16:19:08 2014 -0400 render: Hide/unexport some implementation details Acked-by: Chris Wilson Reviewed-by: Aaron Plattner Signed-off-by: Adam Jackson commit a1c80bb7d5871e1c5ee21fc650834858054103bf Author: Adam Jackson Date: Fri May 30 15:49:38 2014 -0400 randr: Unexport some implementation details Acked-by: Chris Wilson Signed-off-by: Adam Jackson commit b51f7f8582ab6c3cc9fa56c8d9721d0f240915e7 Author: Adam Jackson Date: Fri May 23 13:37:41 2014 -0400 dix: Unexport various implementation details Acked-by: Chris Wilson Signed-off-by: Adam Jackson commit c4a0d6c9139d2c0107b80420cc2342614bbe95ef Author: Adam Jackson Date: Wed Oct 22 10:47:03 2014 -0400 dri3: static cleanup Also remove unused window private key. Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit a69e9027e167a83281b96e13f3a77100876b72ae Author: Adam Jackson Date: Wed Oct 22 10:44:36 2014 -0400 dri3: Remove unbuilt dri3_event.c The config notifies live in present, not dri3. Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 91f0d71c18254746e1d519f0d19d11f756a9588c Author: Adam Jackson Date: Wed Oct 22 10:38:11 2014 -0400 parser: static cleanup Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit c732bb2799ad7ff6b0cdd9c65487466e6a9b76e7 Author: Adam Jackson Date: Wed Oct 22 10:31:29 2014 -0400 present: static cleanup Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 0db457b2b5b6e314e912efc62f158f8f0b8d48af Author: Adam Jackson Date: Wed Jul 8 15:56:55 2015 -0400 dmx: Fix the build Broken since: commit 4fd81823fafcd103e8d890f4c0f7c2f90e822336 Author: Dave Airlie Date: Tue Jun 30 14:54:42 2015 +1000 prime: add rotation support for offloaded outputs (v2) Signed-off-by: Adam Jackson commit 90db5edf119187f8b1b9207c8c384d6cd7ef9edc Author: Dave Airlie Date: Tue Jun 30 14:54:42 2015 +1000 prime: add rotation support for offloaded outputs (v2) One of the lacking features with output offloading was that screen rotation didn't work at all. This patch makes 0/90/180/270 rotation work with USB output and GPU outputs. When it allocates the shared pixmap it allocates it rotated, and any updates to the shared pixmap are done using a composite path that does the rotation. The slave GPU then doesn't need to know about the rotation and just displays the pixmap. v2: rewrite the sync dirty helper to use the dst pixmap, and avoid any strange hobbits and rotations. This breaks ABI in two places. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 991712f1e8deeb6289ee0abd9910e279d6396246 Merge: 0cd228073 3c859112d Author: Keith Packard Date: Wed Jul 8 10:43:31 2015 -0700 Merge remote-tracking branch 'ofourdan/for-keith' commit 0cd228073ad3b7eb72cef8b61128324895ee6cd4 Author: Jon TURNEY Date: Mon Jun 29 15:08:51 2015 +0100 hw/xwin: printf format fixes for Pixel type Pixel is CARD32, so inside the server has type unsigned int (x86_64) or unsigned long (x86) Cast to unsigned int and use a %u format Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e3cfeb949a9c9363beacdb00acdd9723ed54fac2 Author: Jon TURNEY Date: Fri Feb 6 20:22:11 2015 +0000 hw/xwin: printf format fixes for WPARAM and LPARAM types Some Win32 API types are different fundamental types in the 32-bit and 64-bit This problem is then further compounded by the fact that whilst both 32-bit Cygwin and 32-bit MinGW use the ILP32 data model, 64-bit MinGW uses the LLP64 data model, but 64-bit Cygwin uses the LP64 data model. This makes it impossible to write printf format specifiers which are correct for all those targets, so we use some macros to provide the correct specifier for the target. LPARAM and WPARAM are integer types which can contain a pointer LPARAM is long in ILP32 and long long in LLP64 WPARAM is unsigned int in ILP32 and unsigned long long in LLP64 Generally, these are just used to passs integer parameters, so for simplicity, cast to int and use an int-compatible format In the specific case of WM_CHANGECBCHAIN, they are used to pass HWND, so cast to that type and print using an appropriate format. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 4f8661fac985306c56330cae69ffc19e5dd0af61 Author: Jon TURNEY Date: Fri Feb 6 19:19:41 2015 +0000 hw/xwin: printf format fixes for LONG type Some Win32 API types are different fundamental types in the 32-bit and 64-bit versions. This problem is then further compounded by the fact that whilst both 32-bit Cygwin and 32-bit MinGW use the ILP32 data model, 64-bit MinGW uses the LLP64 data model, but 64-bit Cygwin uses the LP64 data model. This makes it impossible to write printf format specifiers which are correct for all those targets In the Win32 API, DWORD is an signed, 32-bit type. It is defined in terms of a long, except in the LP64 data model, where it is an int. It should always be safe to cast it to int and use %d. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit aa83c61f510121da20b56e8f7de700193f7d16b5 Author: Jon TURNEY Date: Fri Feb 6 19:46:45 2015 +0000 hw/xwin: printf format fixes for DWORD type Some Win32 API types are different fundamental types in the 32-bit and 64-bit versions. This problem is then further compounded by the fact that whilst both 32-bit Cygwin and 32-bit MinGW use the ILP32 data model, 64-bit MinGW uses the LLP64 data model, but 64-bit Cygwin uses the LP64 data model. This makes it impossible to write printf format specifiers which are correct for all those targets In the Win32 API, DWORD is an unsigned, 32-bit type. It is defined in terms of an unsigned long, except in the LP64 data model, where it is an unsigned int. It should always be safe to cast it to unsigned int and use %u or %x. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 487f2595c9dd9a5c3c600168a108963e87602561 Author: Jon TURNEY Date: Fri Feb 6 20:48:26 2015 +0000 hw/xwin: printf format fixes in xevents.c Window and Atom types derive from XID, which is always unsigned long in client code, so use %ld format specifier XTextProperty.nitems is of type unsigned long, so use %lu format specifier ulReturnBytesLeft is of type unsigned long, so use %lu format specifier Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 98798fcf0d1dc66c539abb2ecec0acc676d0b574 Author: Jon TURNEY Date: Fri Feb 6 20:42:54 2015 +0000 hw/xwin: printf format fix in winProcessXEventsTimeout() remainingTime is computed as a long int, so use %ld format specifier Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5b6f511c2fcad4edaccedbeb9842680cf3aeffb1 Author: Jon TURNEY Date: Fri Feb 6 20:40:46 2015 +0000 hw/xwin: printf format fix in winCreateDefColormap() Use %lu for unsigned long Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit eb679671560b21206a47476dfbc23518d8d46588 Author: Jon TURNEY Date: Fri Feb 6 20:38:26 2015 +0000 hw/xwin: printf format fixes in winAllocatePrivates() serverGeneration is of type unsigned long, so use %lu format specifier Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0d6c499b9976d305e13685eb79b4bb7cd4250f58 Author: Jon TURNEY Date: Fri Feb 6 20:27:11 2015 +0000 hw/xwin: printf format fixes in winConfigKeyboard() struct winInfoRec.keyboard members are of type long, not type int Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit ba468e003e32c406f4885c8cb3deeb1c8175cd45 Author: Jon TURNEY Date: Mon Jun 29 14:25:49 2015 +0100 hw/xwin: printf format fixes for XID type XID inside the server has type unsigned int (x86_64) or unsigned long (x86) Follow the example of the rest of the server and cast to unsigned int and use a %u or %x format. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit dcb797b31f0affdc4b08b000dd92ec38fa261953 Author: Jon TURNEY Date: Thu Oct 2 14:28:46 2014 +0100 hw/xwin: printf format fixes for HWND type HWND derives from HANDLE, a pointer type, so we should use the %p format Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit f1d14266672c8130e992dd9d0c08fd1cef0f08cb Author: Jon TURNEY Date: Wed Oct 1 22:12:26 2014 +0100 hw/xwin: Ensure format warnings in winclipboard/ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 38f340b13e693a0d456a9ab22a6474c8f55375fa Author: Jon TURNEY Date: Mon Jun 29 15:30:36 2015 +0100 hw/xwin: Remove GetTickCount() from various pieces of debugging output The use of %d format for the DWORD return value of GetTickCount() isn't portable, but it doesn't seem to be worth fixing it when this information isn't very useful (and is redundant to the timestamping of log messages we now have) Instead just remove these uses of GetTickCount() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 732e3b9c08532f40656010eac9d128601cc88c3f Author: Michel Dänzer Date: Mon Jul 6 18:45:51 2015 -0700 Instead of one glTexSubImage2D call for each glyph. This significantly reduces the amount of time it takes for xterm to start up on a fresh X server with the radeonsi driver. v2: Use GLYPHWIDTHBYTESPADDED instead of hardcoding 4 bytes glyph alignment (Keith Packard) Reviewed-by: Keith Packard Signed-off-by: Michel Dänzer Signed-off-by: Keith Packard commit ac94cdb9df94dd26688de6d3d9143ac48f7b3c7b Author: Julien Cristau Date: Thu Jul 2 20:16:21 2015 +0200 mi: fix typo in warning about overflowing queue Debian bug#726041 Reported-by: Vincent Hobeïka Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit e3624aa5fde658c44724a7ea21f5df9e3c586923 Author: Dave Airlie Date: Wed Jul 1 20:41:15 2015 +1000 xserver: fix build with glamor disabled. This fixes modesetting when glamor is disabled. Signed-off-by: Dave Airlie Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Adam Jackson commit 3703c88ac18063a35fd8c0fc52fee52d8c669638 Author: Eric Anholt Date: Wed Jul 1 16:23:45 2015 -0700 glamor: Use GL_ARB_debug_output to log GL errors. This should help people debugging when glamor does something stupid on their driver. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit f4dfd282d311e5f23631d33e0251bad1854b1ab9 Author: Eric Anholt Date: Wed Jul 1 14:46:55 2015 -0700 glamor: Add an assert to catch the previous bug. Signed-off-by: Eric Anholt Acked-by: Michel Dänzer commit c268d2fc33318f9ea0019053fa5de18f193e704e Author: Keith Packard Date: Thu Jul 2 17:06:27 2015 -0600 glamor: Fix bad rendering of glyphs after an a1 glyph upload. (v3) Fixes regressions since Eric's "don't make an FBO for the glyph atlas" change. The a1 upload was a fallback, as expected. However, fallback reads use glReadPixels() because there's no glGetTexSubImage2D() to match glTexSubImage2D(). We were just binding the 0 FBO value, so the glReadPixels() would throw a GL error instead of getting any data. After the fallback was done we'd write back the undefined data to the atlas, blowing away the entire rest of the atlas because we didn't specify any bounds on our prepare. To fix the fallbacks to actually work, we'd need a prepare path that allocates some memory memory do a full glGetTexImage() into, then memcpy out of that. Instead, just dodge the general fallback by implementing the specific upload we need to do here, which should also be *much* faster at uploading a1 glyphs since it's not readpixels/texsubimaging back and forth. v3: Use CopyPlane to a temp pixmap for the upload v4: Rewrite anholt's commit message to be from keithp's perspective (changes by anholt) Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 5c440817f7c128c9a9d78ef9672f22641dbeeaa1 Author: Eric Anholt Date: Tue Jun 30 15:01:53 2015 -0700 glamor: Use ARRAY_SIZE in a couple more places for consistency. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit 7b6edb52435f474c43130f6ac4c6b2d2b28814f5 Author: Eric Anholt Date: Tue Jun 30 14:59:55 2015 -0700 glamor: Mark a bunch of single-file data static. This gives the compiler a chance to optimize when the data is never changed -- for example, with pict_format_combine_tab, the compiler ends up inlining the 24 bytes of data into just 10 more bytes of code. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit 3fe6731b17ae953d49db4c1bf95e0022244513e1 Author: Eric Anholt Date: Tue Jun 30 14:50:43 2015 -0700 glamor: Make a bunch of single-file glamor functions static. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit a8e84e8c3b2047775fe2da9371329290eee23655 Author: Eric Anholt Date: Tue Jun 30 14:45:43 2015 -0700 glamor: Drop dead glamor_es2_pixmap_read_prepare(). It's been unused since I killed glamor_download_pixmap_to_cpu(). Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit cad56dc62dbf2ba097cc0fa61217897ba40d8d66 Author: Eric Anholt Date: Tue Jun 30 14:41:27 2015 -0700 glamor: Restore the hook to glamor_composite_rectangles(). It was apparently accidentally dropped in keithp's removal of _nf functions in 90d326fcc687e6d6d4b308f6272ededcf8145a17. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit 7adb38a0d18de2e8b0762d9dd82b851883ad75fe Author: Eric Anholt Date: Tue Jun 30 14:25:16 2015 -0700 glamor: Fix up some weird formatting in _glamor_create_fbo_array(). Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit 835067a4095e5e48703aa6561fea3ee95923e832 Author: Eric Anholt Date: Tue Jun 30 14:14:50 2015 -0700 glamor: Drop a redundant check. Above, we've already checked for ->fbo && ->fbo->fb and returned. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit 47b868492c7ff0909ff71e3ee1aaa79daaade513 Author: Eric Anholt Date: Thu Feb 5 12:34:41 2015 -0800 glamor: Simplify some temp pixmap extents calculations. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke commit bfb6a290afabe492d93ec8024fac6b28f672d7d0 Author: Eric Anholt Date: Thu Feb 5 11:46:32 2015 -0800 glamor: Drop a dead flag to glamor_create_fbo_array(). v2: Don't forget to set priv->block_w/block_h like the wrapper used to. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke (v1) commit fe3fedf280596c2c2e69dddd30bb9ff17dbe611e Author: Eric Anholt Date: Thu Feb 5 11:33:54 2015 -0800 glamor: Drop dead GLAMOR_FBO_DOWNLOADED flag. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke commit 447274094147f31025700a2ff6f94e3b0c96fa17 Author: Eric Anholt Date: Thu Feb 5 11:20:50 2015 -0800 glamor: Move doxygen for private structs into the structs. This should hopefully keep the comments more up to date with the structure comments. While I'm here, I've reworded a few of them to be more accurate, and dropped a bunch of stale comments. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke commit 33d6384b29db1b28a9d1a035dc7cc82da8f33c99 Author: Eric Anholt Date: Thu Feb 5 11:18:24 2015 -0800 glamor: Drop the dead "PBO" field in an FBO cache struct. PBOs are only used at the whole pixmap level. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke commit 1734aa285663d83070e6313bb976f976aa2bea4c Author: Eric Anholt Date: Wed Feb 4 18:07:06 2015 -0800 glamor: Remove dead gl_tex flag in the fbo struct. This used to be used in the old copy_area path. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke commit 82d23fc7290a2986efbc2982eeaa0de0ad5ad0d1 Author: Eric Anholt Date: Wed Feb 4 18:02:34 2015 -0800 glamor: Propagate the fact that pbo_valid is never set. The code to set it was deleted in keithp's big rewrite. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke commit 0e3f1252dacdc3194a99a2d090b5c13f070f8799 Author: Eric Anholt Date: Fri Jun 19 18:40:47 2015 -0700 glamor: Avoid using GL_QUADS on VC4. Improves text rendering from about 284k glyphs per second to 320k glyphs per second. There's no GL extension for probing this, because of the philosophy of "Don't expose whether things are really in hardware or not." Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit f47e3f539568d19e22d10d7dd4ec09c7d570e716 Author: Eric Anholt Date: Fri Jun 19 18:36:28 2015 -0700 glamor: Use proper Bools for some boolean values. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit 4001a7465e6fb27fc82fa20ea5a65283d33a5e2e Author: Eric Anholt Date: Fri Jun 19 16:56:35 2015 -0700 glamor: Provide a fallback path for using an index buffer to do quads. Improves x11perf -aa10text performance by 1377.59% +/- 23.8198% (n=93) on Intel with GLES2. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit e8fc929d4a140666420a64d592371f5d3eb10cca Author: Eric Anholt Date: Fri Jun 19 17:26:46 2015 -0700 glamor: Use GL_EXT_map_buffer_range if present. We were only looking for the desktop GL version of the extension, so GLES2 missed out. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit 4fc4cde0ce7d1a35bab3b3bbd787d688cd415d78 Author: Eric Anholt Date: Fri Jun 19 16:34:55 2015 -0700 glamor: Use the normal GL_QUADS drawing helper in the render code. We use this for all of our other performance-sensitive rendering, too. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit c5e6fffbdd88ad714454b9de1ac1c3eb9f6bf196 Author: Eric Anholt Date: Fri Jun 19 17:05:28 2015 -0700 glamor: Drop CloseScreen-time GL resource cleanup code. These will all be freed when the context is freed. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit 3d6dcad00d67bff407385ad37c7efde7b73ba719 Author: Eric Anholt Date: Fri Jun 19 19:04:16 2015 -0700 glamor: Fix text rendering on GLES2. The GL_QUADS helper takes a number of quads, not a number of vertices. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit b4061cf5f76241157b2dc81dec053012075311c0 Author: Peter Harris Date: Tue May 12 14:19:15 2015 -0400 Fix border tile origin when background is ParentRelative According to http://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html#requests:CreateWindow "The border tile origin is always the same as the background tile origin." ChangeWindowAttributes goes to some effort to make sure it repaints the border tile whenever the background origin may have changed, but miPaintWindow was ignoring the background origin. Found by xts XChangeWindowAttributes-3 Signed-off-by: Peter Harris Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 8a8d51358cea782147bb9b5b2e0902b1e47fcf4a Merge: b22534d8e 13c7d53df Author: Keith Packard Date: Mon Jun 29 21:04:53 2015 -0700 Merge remote-tracking branch 'airlied/for-keithp' commit b22534d8e653575196180970292eaade33c090a8 Merge: 0a625adee 780a69aff Author: Keith Packard Date: Mon Jun 29 21:04:11 2015 -0700 Merge remote-tracking branch 'jwrdecoede/for-keith' commit 0a625adeec465d6c7dcdb8622c53157b4e932bb0 Merge: 84128c10b 790311cec Author: Keith Packard Date: Mon Jun 29 21:01:34 2015 -0700 Merge remote-tracking branch 'anholt/glamor-next' commit 84128c10bb6d34f78f7a4148b3c640748efe58e1 Merge: 9003a3e5c 8c86dd516 Author: Keith Packard Date: Mon Jun 29 20:59:31 2015 -0700 Merge remote-tracking branch 'whot/for-keith' commit 13c7d53df8dac45ea2a685826cd45a39bcb51657 Author: Kenneth Graunke Date: Mon Jan 26 21:29:23 2015 -0800 modesetting: Implement page flipping support for Present. Based on code by Keith Packard, Eric Anholt, and Jason Ekstrand. v2: - Fix double free and flip_count underrun (caught by Mario Kleiner). - Don't leak flip_vblank_event on the error_out path (Mario). - Use the updated ms_flush_drm_events API (Mario, Ken). v3: Hack around DPMS shenanigans. If all monitors are DPMS off, then there is no active framebuffer; attempting to pageflip will hit the error_undo paths, causing us to drmModeRmFB with no framebuffer, which confuses the kernel into doing full modesets and generally breaks things. To avoid this, make ms_present_check_flip check that some CRTCs are enabled and DPMS on. This is an ugly hack that would get better with atomic modesetting, or some core Present work. v4: - Don't do pageflipping if CRTCs are rotated (caught by Jason Ekstrand). - Make pageflipping optional (Option "PageFlip" in xorg.conf.d), but enabled by default. v5: Initialize num_crtcs_on to 0 (caught by Michel Dänzer). [airlied: took over] v6: merge async flip support from Mario Kleiner free sequence after failed vblank queue handle unflip while DPMS'ed off (Michel) move flip tracking into its own structure, and fix up reference counting issues, and add comments. Signed-off-by: Dave Airlie Acked-by: Eric Anholt Signed-off-by: Kenneth Graunke commit 4342369e843ca2c6ca0a8c42475893cffb077a54 Author: Dave Airlie Date: Fri Jun 26 09:20:13 2015 +1000 modesetting: don't try and load dri2 Since we are shipped with the server and the server has it built-in, don't bother trying to load it. Don't remove or invert the if statement on purpose as a later patch adds stuff in here. Reviewed-by: Michel Dänzer Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit edec6394a47be590f3133f6a90186356afd00829 Author: Dave Airlie Date: Fri Jun 26 09:19:37 2015 +1000 modesetting: drop unused struct in vblank.c this isn't used anywhere here. Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit bf262b43007050180d336defd48251de80894801 Author: Kenneth Graunke Date: Mon Jan 26 21:25:58 2015 -0800 modesetting: Implement an ms_drm_abort_seq() function. This is a specialization of ms_drm_abort that matches based on the drm event queue's sequence number. Based on code by Keith Packard. Reviewed-by: Eric Anholt Reviewed-by: Dave Airlie Signed-off-by: Kenneth Graunke commit b8ccc5d36b0436bac57f07969ff3eb8d479a8511 Author: Jason Ekstrand Date: Tue Jan 13 17:00:28 2015 -0800 glamor: Add a new glamor_gbm_bo_from_pixmap() function. v2: Rebase on commit e0788a03144 (drop "base"). Reviewed-by: Eric Anholt Reviewed-by: Dave Airlie commit f2171d0a20d3b3858a282c51c1561432de1b29ef Author: Kenneth Graunke Date: Tue Jan 6 21:02:44 2015 -0800 modesetting: Make ms_crtc_on non-static. I want to use this in present.c. Reviewed-by: Dave Airlie Reviewed-by: Eric Anholt Signed-off-by: Kenneth Graunke commit f6853baebaec6a68078fa7f90486e9547d59dcbd Author: Kenneth Graunke Date: Sun Feb 8 17:21:58 2015 -0800 modesetting: Improve the ms_flush_drm_events() API. Previously, ms_flush_drm_events() returned a boolean value, and it was very easy to interpret the meaning incorrectly. Now, we return an integer value. The possible outcomes of this call are: - poll() raised an error (formerly TRUE, now -1 - poll's return value) - poll() said there are no events (formerly TRUE, now 0). - drmHandleEvent() raised an error (formerly FALSE, now the negative value returned by drmHandleEvent). - An event was successfully handled (formerly TRUE, now 1). The nice part is that this allows you to distinguish errors (< 0), nothing to do (= 0), and success (1). We no longer conflate errors with success. v2: Change ms_present_queue_vblank to < 0 instead of <= 0, fixing an unintentional behavior change. libdrm may return EBUSY if it's received EINTR for more than a second straight; just keep retrying in that case. Suggested by Jasper St. Pierre. Reviewed-by: Dave Airlie Signed-off-by: Kenneth Graunke commit 7328fb3f2b468048faf4ed4c29db720b5bf00b05 Author: Dave Airlie Date: Wed Jun 10 13:41:02 2015 +1000 modesetting: reverse prime support (v1.1) This adds support for reverse prime to the modesetting driver. Reverse prime is where we have two GPUs in the display chain, but the second GPU can't scanout from the shared pixmap, so needs an extra copy to the on screen pixmap. This allows modesetting to support this scenario while still supporting the USB offload one. v1.1: fix comment + ret = bits (Eric) Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit 1f10ee221edb87561900f5d2b1336db1c4a9f05c Author: Dave Airlie Date: Wed Jun 10 13:38:39 2015 +1000 glamor: egl: add function to back a pixmap with a dma-buf. (v1.1) Rather than create the pixmap, this uses the file descriptor to change an existing pixmaps backing store. This is required for reverse prime slaves, where we create the slave pixmap, then set the backing store. v1.1: use local pScreen (Eric) Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit a79fbfd707e1d745b670def08287241c87e11c28 Author: Dave Airlie Date: Tue Jun 9 17:15:44 2015 +1000 modesetting: add output master support This allows a glamor enabled master device to have slave USB devices attached. Tested with modesetting on SNB + USB. It relies on the previous patch to export linear buffers from glamor. Acked-by: Eric Anholt Signed-off-by: Dave Airlie commit ea0e4d752b778c1f2132f8d29542f7dabc296415 Author: Dave Airlie Date: Wed Jun 10 14:46:22 2015 +1000 glamor: add support for allocating linear buffers (v2) We need this for doing USB offload scenarios using glamor and modesetting driver. unfortunately only gbm in mesa 10.6 has support for the linear API. v1.1: fix bad define v2: update the configure.ac test as per amdgpu. (Michel) set linear bos to external to avoid cache. (Eric) Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit 5c555605386c76be2f02193d434a4617218b67be Author: Dave Airlie Date: Thu Jun 11 14:29:48 2015 +1000 xf86: restrict when we auto add devices as gpu devices. Michel pointed out I broke Zaphod with the initial auto add gpu devices change, Fix this, by only auto adding GPU devices if we are screen 0 and there are no other screens in the layout. Anyone who wants to assign GPU devices can specify it in the xorg.conf for this use case. Signed-off-by: Dave Airlie Tested-by: Michel Dänzer commit 5064ee276fe0f6cebc33ea08e57f1de91f092d88 Author: Dave Airlie Date: Fri Jun 12 15:13:47 2015 +1000 xf86Rotate: remove unused macros. These macros aren't used anywhere. v1.1: drop comment (Aaron) Signed-off-by: Dave Airlie commit 8218dadd30eb0c87efbac6db5d8e3862a236b6a4 Author: Dave Airlie Date: Tue Jun 9 15:30:22 2015 +1000 cursor: drop ARGB_CURSOR I doubt anyone builds with this turned off or has done for a long time. It helps my eyes bleed slightly less when reading the code, I've left the define in place as some drivers use it. Reviewed-by: Aaron Plattner Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 3c859112d38860764bcdb205ab461d00db502f45 Author: Chris Wilson Date: Tue Jun 23 15:05:31 2015 +0200 xwayland: keep temp files out of the client mask Xwayland opens anonymous files for its sharing buffers, move these file descriptors out of the range of the client select mask to avoid reaching the maximum number of clients prematurely. https://bugs.freedesktop.org/show_bug.cgi?id=91072 Tested-by: Olivier Fourdan Reviewed-by: Michel Dänzer Signed-off-by: Chris Wilson commit 8c86dd51606486f4794c503b9c05c6875bdc693a Author: Laércio de Sousa Date: Tue Jun 23 08:41:57 2015 -0300 configure.ac: fix code misplacing for KDRIVE_{KBD, MOUSE, EVDEV} auto-detection KDrive input drivers "kbd", "mouse", and "evdev" should be automatically built for linux systems. However, due to a code misplacing in configure.ac, the auto-detection test is being performed AFTER the corresponding AC_DEFINEs' calls, so that the drivers are NOT being built, regardless the test result. This bug should be affecting previous xorg-server releases. Please consider backporting this patch to all maintained ones! Signed-off-by: Laércio de Sousa Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 780a69aff0ff57ef813179a2f09556eaf488cdfc Author: David Herrmann Date: Mon Jun 22 21:13:05 2015 +0200 systemd-logind: do not rely on directed signals Right now, Xorg does not install DBus matches for "PauseDevice" / "ResumeDevice". Therefore, it should usually not receive those DBus signals from logind. It is just a coincidence that systemd-logind sends those signals in a directed manner right now. Therefore, dbus-daemon bypasses the broadcast matches. However, this is not ABI and Xorg should not rely on this. systemd-logind is free to send those signals as broadcasts, in which case Xorg will freeze the VT. Fix this by always installing those matches. Cc: Hans de Goede Cc: Keith Packard Reported-by: Jan Alexander Steffens Signed-off-by: David Herrmann Reviewed-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Hans de Goede commit d3352d098724e96be8fb8538a3640ce271d8f8b9 Author: Hans de Goede Date: Mon Jun 22 13:51:21 2015 +0200 Xorg.wrap.man: Fix spelling mistake in Xorg.wrap.1 This commit fixes a small mistake in Xorg.wrap.1 . Signed-off-by: Hans de Goede Reviewed-by: Alan Coopersmith commit 790311cec30ac3d35e580b9f1266236f558033d4 Author: Eric Anholt Date: Sun May 31 16:08:10 2015 -0700 glamor: Don't try to disable attrib divisors without the extension. Fixes epoxy assertion failures on vc4. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 9c679d06055cc62aa9209318705e87dc33fba4c8 Author: Eric Anholt Date: Sun May 31 16:07:01 2015 -0700 glamor: Skip actual FBO setup in our glyph atlas. VC4 (and many GLES2 renderers) can't render to GL_ALPHA, so our pixmap would end up as GLAMOR_MEMORY and our dereference of the FBO would setfault. Instead, tell the pixmap creation that we don't need an FBO at all. Our glyph upload path was already glTexImage for non-a1, and a more general software fallback for a1 (since the glyph is also in system memory). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 077bb1bdea0fa9af846c02896df680293cf9e25c Author: Eric Anholt Date: Sun May 31 15:46:55 2015 -0700 glamor: Clean up some declarations in glyph rendering. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit bf7a3bcb00d0dce22ff3fe42fe6236beeab4403b Author: Eric Anholt Date: Sun May 31 15:28:39 2015 -0700 glamor: Actually allow glyphs of dimension 65 to 128 in the cache. The cache was trying to allow glyph_max_dim in, but since we were putting over 64x64 into HW memory, it would end up in the single-glyph-per-render bail_one path. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f4c3cac010cff0980905eeedd8e8d7baf0aff91b Author: Alexander Volkov Date: Wed Jun 17 12:41:35 2015 +0300 Xi: call UpdateDeviceState() even when the client is missing The client window can be closed in the middle of a touch sequence, e.g. Qt 4 closes popup windows on MousePress and Qt 5.5 will do it on TouchBegin. In this case the state of mouse buttons will not be updated on TouchEnd because ProcessTouchEvent() calls UpdateDeviceState() only when the event has been sent to the client. It results in a stuck left mouse button. This patch leads to calling UpdateDeviceState() in case the client can't be found. Signed-off-by: Alexander Volkov Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9003a3e5c55903ce4e371b2d5cb5030b5f97ae0e Author: Jeremy Huddleston Sequoia Date: Tue Jun 9 23:41:12 2015 -0700 XQuartz: Silence -Wformat-security for NSRunAlertPanel Signed-off-by: Jeremy Huddleston Sequoia commit 3a6fa115759c787ec34483437021ad1e55c52423 Author: Jeremy Huddleston Sequoia Date: Tue Jun 9 23:34:50 2015 -0700 XQuartz: Silence -Wunused-function quartzKeyboard.c:741:1: warning: unused function 'macroman2ucs' [-Wunused-function,Unused Entity Issue] macroman2ucs(unsigned char c) ^ 1 warning generated. Signed-off-by: Jeremy Huddleston Sequoia commit 9fe7f5ccada37e2d2a2fa92064b92a0334a3fcdd Author: Jeremy Huddleston Sequoia Date: Tue Jun 9 23:30:50 2015 -0700 XQuartz: Silence -Wunused-variable X11Controller.m:939:9: warning: unused variable 'remain' [-Wunused-variable,Unused Entity Issue] int remain; ^ Signed-off-by: Jeremy Huddleston Sequoia commit 0b9c32489131a5723bd78decf5d2557b94207cf4 Author: Jeremy Huddleston Sequoia Date: Tue Jun 9 23:29:40 2015 -0700 XQuartz: Silence -Wpointer-bool-conversion X11Controller.m:417:17: error: address of function 'asl_log_descriptor' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion,Value Conversion Issue] if (asl_log_descriptor) { ~~ ^~~~~~~~~~~~~~~~~~ X11Controller.m:417:17: note: prefix with the address-of operator to silence this warning [Semantic Issue] if (asl_log_descriptor) { ^ & Signed-off-by: Jeremy Huddleston Sequoia commit 77611066397747411f348e4a77871da5cff3b71e Author: Jeremy Huddleston Sequoia Date: Sun Jun 1 04:29:19 2014 -0700 XQuartz: GLX: Use __glXEnableExtension to build extensions list Signed-off-by: Jeremy Huddleston Sequoia commit 990cf5b2828f73dc7a07f1e38f608af39acfd81d Author: Andrew Eikum Date: Thu Jun 4 13:24:53 2015 -0500 dix: Send KeyPress and KeyRelease events to the XACE_KEY_AVAIL hook While it's documented in the XACE spec, the XACE_KEY_AVAIL hook is currently never actually invoked by the xserver. This hook was added in 13c6713c82 (25 Aug 2006), but as the keyboard processing was moved into XKB, the hook was forgotten and silently dropped. The code calling this hook was removed by 7af53799c (4 Jan 2009), but it was probably already unused before that. This patch re-adds support for this hook. The "count" hook parameter is unused. Signed-off-by: Andrew Eikum Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5dc2a9aae46352f1f35d3ba122da04727789a15d Author: Andrew Eikum Date: Thu Jun 4 13:23:19 2015 -0500 xace: Add XaceHookIsSet helper function Signed-off-by: Andrew Eikum Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c88a325899381d1133e63e6c33c29db079e20a87 Author: Hans de Goede Date: Wed Jan 21 10:13:20 2015 +0100 systemd-logind: Only use systemd-logind integration together with keeptty systemd-logind integration does not work when starting X on a new tty, as that detaches X from the current session and after hat systemd-logind revokes all rights any already open fds and refuses to open new fds for X. This means that currently e.g. "startx -- vt7" breaks, and breaks badly, requiring ssh access to the system to kill X. The fix for this is easy, we must not use systemd-logind integration when not using KeepTty, or iow we may only use systemd-logind integration together with KeepTty. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer Tested-by: Aaron Plattner commit 81bcada14e339fe2a2fb3f3a040566d94dc20bad Author: Hans de Goede Date: Wed May 13 13:17:09 2015 +0200 linux: Add a may_fail paramter to linux_parse_vt_settings linux_parse_vt_settings() was split out of xf86OpenConsole so that it can be called earlier during systemd-logind init, but it is possible to run the xserver in such a way that xf86OpenConsole() is never used. The FatalError calls in linux_parse_vt_settings() may stop the Xorg xserver from working when e.g. no /dev/tty0 is present in such a setup. This commit adds a may_fail parameter to linux_parse_vt_settings() which can be used to make linux_parse_vt_settings() fail silenty with an error return in this case, rather then calling FatalError(). Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 1dba5a0b194653b0effb01a918bd7338b0c6bcb9 Author: Hans de Goede Date: Wed Jan 21 09:31:39 2015 +0100 linux: Add linux_parse_vt_settings and linux_get_keeptty helpers systemd-logind integration does not work when starting X on a new tty, as that detaches X from the current session and after hat systemd-logind revokes all rights on any already open fds and refuses to open new fds for X. This means that currently e.g. "startx -- vt7" breaks, and breaks badly, requiring ssh access to the system to kill X. The fix for this is easy, we must not use systemd-logind integration when not using KeepTty, or iow we may only use systemd-logind integration together with KeepTty. But the final KeepTty value is not known until the code to chose which vtno to run on has been called, which currently happens after intializing systemd-logind. This commit is step 1 in fixing the "startx -- vt7" breakage, it factors out the linux xf86OpenConsole bits which set xf86Info.vtno and keepTty so that these can be called earlier. Calling this earlier is safe as this code has no side effects other than setting xf86Info.vtno and keepTty. Note this basically only moves a large chunk of xf86OpenConsole() into linux_parse_vt_settings() without changing a single line of it, this is hard to see in the diff because the identation level has changed. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit fa12f2c150b2f50de9dac4a2b09265f13af353af Author: Dave Airlie Date: Thu May 28 16:21:37 2015 +1000 glamor: don't do render ops with matching source/dest (v3) XRender defines this, GL really doesn't like it. kwin 4.x and qt 4.x seem to make this happen for the gradient in the titlebar, and on radeonsi/r600 hw this draws all kinds of wrong. v2: bump this up a level, and check it earlier. (I assume the XXXX was for this case.) v3: add same code to largepixmap paths (Keith) Reviewed-by: Eric Anholt Reviewed-by: Jasper St. Pierre Signed-off-by: Dave Airlie commit cbb7eb73b5399e31a7afb800363504d539df0ecf Author: Rui Matos Date: Wed May 27 12:08:45 2015 +0200 xwayland: Throttle our cursor surface updates with a frame callback In some extreme cases with animated cursors at a high frame rate we could end up filling the wl_display outgoing buffer and end up with wl_display_flush() failing. In any case, using the frame callback to throttle ourselves is the right thing to do. Signed-off-by: Rui Matos Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 806470b9f623089dc81b985f250f0c3a4e8edbe8 Author: Chris Wilson Date: Fri Feb 6 08:25:42 2015 +0000 present: Copy unflip contents back to the Screen Pixmap As we unflip after the flip Window no longer passes the pixel ownership test for the full Screen Pixmap, we can no longer utilize that Window to copy the contents back to the backing pixmap. To first flip means that the Window was originally backed by the Screen Pixmap and wholly covered the Pixmap, thus we need to copy the last frame contents to the Screen Pixmap when the flip chain is complete. Signed-off-by: Chris Wilson Reviewed-and-Tested-by: Michel Dänzer commit baa50f60acd9e9f4293107435645ab072b6110e1 Author: Vicente Olivert Riera Date: Mon Jan 12 17:10:02 2015 +0000 backtrace.c: Fix word cast to a pointer backtrace.c uses a word size provided by libunwind. In some architectures like MIPS, libunwind makes that word size 64-bit for all variants of the architecture. In the lines #90 and #98, backtrace.c tries to do a cast to a pointer, which fails in all MIPS variants with 32-bit pointers, like MIPS32 or MIPS64 n32, because it's trying to do a cast from a 64-bit wide variable to a 32-bit pointer: Making all in os make[2]: Entering directory `/home/test/test/1/output/build/xserver_xorg-server-1.15.1/os' CC WaitFor.lo CC access.lo CC auth.lo CC backtrace.lo backtrace.c: In function 'xorg_backtrace': backtrace.c:90:20: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] if (dladdr((void *)(pip.start_ip + off), &dlinfo) && dlinfo.dli_fname && ^ backtrace.c:98:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] (void *)(pip.start_ip + off)); ^ cc1: some warnings being treated as errors make[2]: *** [backtrace.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... Making the cast to a pointer-sized integer, and then to a pointer fixes the problem. Related: https://bugs.freedesktop.org/show_bug.cgi?id=79939 Signed-off-by: Vicente Olivert Riera Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 76636ac12f2d1dbdf7be08222f80e7505d53c451 Author: Ray Strode Date: Tue May 5 16:43:44 2015 -0400 xwayland: default to local user if no xauth file given. [CVE-2015-3164 3/3] Right now if "-auth" isn't passed on the command line, we let any user on the system connect to the Xwayland server. That's clearly suboptimal, given Xwayland is generally designed to be used by one user at a time. This commit changes the behavior, so only the user who started the X server can connect clients to it. Signed-off-by: Ray Strode Reviewed-by: Daniel Stone Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 4b4b9086d02b80549981d205fb1f495edc373538 Author: Ray Strode Date: Tue May 5 16:43:43 2015 -0400 os: support new implicit local user access mode [CVE-2015-3164 2/3] If the X server is started without a '-auth' argument, then it gets started wide open to all local users on the system. This isn't a great default access model, but changing it in Xorg at this point would break backward compatibility. Xwayland, on the other hand is new, and much more targeted in scope. It could, in theory, be changed to allow the much more secure default of a "user who started X server can connect clients to that server." This commit paves the way for that change, by adding a mechanism for DDXs to opt-in to that behavior. They merely need to call LocalAccessScopeUser() in their init functions. A subsequent commit will add that call for Xwayland. Signed-off-by: Ray Strode Reviewed-by: Daniel Stone Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit c4534a38b68aa07fb82318040dc8154fb48a9588 Author: Ray Strode Date: Tue May 5 16:43:42 2015 -0400 xwayland: Enable access control on open sockets [CVE-2015-3164 1/3] Xwayland currently allows wide-open access to the X sockets it listens on, ignoring Xauth access control. This commit makes sure to enable access control on the sockets, so one user can't snoop on another user's X-over-wayland applications. Signed-off-by: Ray Strode Reviewed-by: Daniel Stone Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit ad02d0df75318660c3f7cd6063eac409327fe560 Author: Peter Hutterer Date: Wed May 6 15:25:28 2015 +1000 test: add tests for new valuator mask features Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit da10d0cb4283ad5a9c4290555751f61795d11b49 Author: Peter Hutterer Date: Tue May 5 14:48:41 2015 +1000 dix: hook up the unaccelerated valuator masks If present, access the unaccelerated valuator mask values for DGA and XI2 raw events. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 4c2f2cb4c8ca1ab894a65828fdd39aea9b014f69 Author: Peter Hutterer Date: Tue May 5 14:18:54 2015 +1000 dix: Add unaccelerated valuators to the ValuatorMask Allows a mask to carry both accelerated and unaccelerated motion at the same time. This is required for xf86-input-libinput where the pointer acceleration happens in libinput already, but parts of the server, specifically raw events and DGA rely on device-specific unaccelerated data. To ease integration add this as a second set to the ValuatorMask rather than extending all APIs to carry a second, possibly NULL set of valuators. Note that a valuator mask should only be used in either accel/unaccel or standard mode at any time. Switching requires either a valuator_mask_zero() call or unsetting all valuators one-by-one. Trying to mix the two will produce a warning. The server has a shortcut for changing a mask with the valuator_mask_drop_unaccelerated() call. This saves us from having to loop through all valuators on every event, we can just drop the bits we know we don't want. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 3f0d3201f38ef9d1651fcaf94e45c640786edcc0 Author: Peter Hutterer Date: Mon Apr 13 13:52:28 2015 -0700 dix: fix indentation from 9ff89a2e469ab0ac5af57d0fc115127feb1c0d99 Signed-off-by: Peter Hutterer commit f82dc6bd91a545a844fb688ba3552e4f5df8a0d2 Author: Peter Hutterer Date: Tue Mar 24 09:43:17 2015 +1000 xfree86: drop if 0 hunk Disabled in 2005. bye bye. Signed-off-by: Peter Hutterer commit fc59c8fe8d941b0ec1e98c59bc57b1f97dba149d Author: Peter Hutterer Date: Tue May 5 15:54:20 2015 +1000 config: remove 10-evdev.conf, let the evdev driver install that file Now that we have two likely drivers that fight for control over the input devices (evdev and libinput) let's move the respective driver assignment to each package. So you get what you install. https://bugs.freedesktop.org/show_bug.cgi?id=89023 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit bf6344e1913a5d24c2d68eaca999ea3d71e1b707 Author: Keith Packard Date: Thu May 14 14:58:29 2015 -0700 Revert "glx/dri2: Disable AIGLX if indirect GLX is disabled" This reverts commit d61ae18074e53c2cdfb13cc37693b526160d6ca7. If the DRI2 provider is disabled, then we don't advertise the correct GLX extensions to clients, and things like GLES fail. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90442 Reviewed-by: Eric Anholt Reviewed-by: Michel Dänzer commit b0d2e010316d710eb4052963de3a1e2dc7ba356e Author: Keith Packard Date: Fri Oct 10 09:25:51 2014 +0200 glamor: Replace CompositeGlyphs code [v2] New composite glyphs code uses the updated glamor program infrastructure to create efficient shaders for drawing render text. Glyphs are cached in two atlases (one 8-bit, one 32-bit) in a simple linear fashion. When the atlas fills, it is discarded and a new one constructed. v2: Eric Anholt changed the non-GLSL 130 path to use quads instead of two triangles for a significant performance improvement on hardware with quads. Someone can fix the GLES quads emulation if they want to make it faster there. v3: Eric found more dead code to delete Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 1b745e0c1ff45e014aa21c3d8edf93227bec99bf Author: Keith Packard Date: Mon Oct 13 11:40:06 2014 -0700 glamor: Adapt glamor_program API to handle render acceleration This extends the existing API to support options needed for render accleration, including an additional fragment, 'combine', (which provides a place to perform the source IN mask operation before the final OP dest state) and an additional 'defines' parameter which provides a way to add target-dependent values without using a uniform. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit ff3195aadde95c8e89f77f389a7dfb418dd2426c Author: Keith Packard Date: Mon Oct 20 21:31:56 2014 -0700 glamor: Compute GLSL version from GL_SHADING_LANGUAGE_VERSION (v3) Use code from Piglit project to compute GLSL version for either GL or GLES. The Piglit code was originally written by Chad Versace. v2: bail if the parse fails (requested by Eric Anholt) v3: Use version 1.20 for GLES until we fix our programs (Eric Anholt) Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit dcb3d74ba8861e7b0a592e92b5b2247b84e843f3 Author: Keith Packard Date: Mon Oct 13 12:35:40 2014 -0700 glamor: Remove destination drawable argument from glamor_set_texture This argument wasn't used at all. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 2bf34fe8d9b7628d164392c2d11ace78f7cf17b9 Author: Keith Packard Date: Mon Oct 13 12:32:27 2014 -0700 glamor: Pass depth to glamor_pm_is_solid and glamor_set_planemask Instead of passing the destination drawable, just pass the depth, as the underlying functions need only that to check whether the planemask is going to work. This API change will allow higher level functions to not need the destination pixmap. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 910ddf85219f114744e8996a4ac044c4eafc62ac Author: Egbert Eich Date: Tue May 12 09:52:48 2015 -0700 Xephyr: Fix broken image when endianess of client machine and host-Xserver differ The image is created in the native byte order of the machine Xephyr is rendered on however drawn in the image byte order of the Xephyr server. Correct byte order in the xcb_image_t structure and convert to native before updating the window. If depths of Xephyr and host server differ this is already taken care of by the depth conversion routine. It is a terrible wase to always convert and transmit the entire image no matter of the size of the damaged area. One should probably use sub-images here. For now we leave this as an exercise. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit c65eda5e6676d942e80eaf2650a670174c8bd84a Author: Egbert Eich Date: Tue Mar 31 09:14:28 2015 +0200 Xephyr: Fix screen image draw for the non-Glamor & non-XHSM case xcb_image_put() prints the entire image, therefore don't use an offset. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 66212ca0d2f194fd16db65e863f0a2d613e180ea Author: Egbert Eich Date: Tue Mar 31 09:14:27 2015 +0200 Xephyr: Fix compile when debugging is enabled Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b536d56aef21739b6da44693bbf19d0e7541392d Author: Egbert Eich Date: Tue Mar 31 09:14:26 2015 +0200 Xephyr: Print default server display number if none is specified Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 5af73f490870da9265eeb9b3ce59a2be026be0c8 Author: Egbert Eich Date: Tue Mar 31 09:14:25 2015 +0200 Xephyr: Don't crash when no command line argument is specified The DDX specific command line parsing function only gets called if command line arguments are present. Therefore this function is not suitable to initialize mandatory global variables. Replace main() instead. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 00f79416b19f0cde68291aced44ab07b9b76f7b8 Author: Jonathan Gray Date: Wed Apr 15 21:29:58 2015 +1000 glamor: fix build when DRI3 is not defined Signed-off-by: Jonathan Gray Reviewed-by: Kenneth Graunke Signed-off-by: Keith Packard commit 7c609c911a3a33b7e4ddad46b8fc42878a073ee7 Author: Jonathan Gray Date: Wed Apr 15 21:29:07 2015 +1000 glamor: remove const from the return type of glamor_get_drawable_location() Fixes a build error with gcc 4.2.1 on OpenBSD due to -Werror=return-type from xorg-macros. error: type qualifiers ignored on function return type Signed-off-by: Jonathan Gray Reviewed-by: Kenneth Graunke Signed-off-by: Keith Packard commit 145ae03814cb3b700b6fe1fd19f8fb15da84d1c8 Author: Michel Dänzer Date: Tue Mar 17 10:21:13 2015 +0900 modesetting: Include dix-config.h from dumb_bo.c Fixes mmap failures with 32-bit builds. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 4962c8c08842d9d3ca66d254b1ce4cacc4fb3756 Author: Michel Dänzer Date: Tue Mar 17 10:21:12 2015 +0900 Add AC_SYS_LARGEFILE defines to dix-config.h Without this, AC_SYS_LARGEFILE doesn't actually have any effect. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 0409b6e6d63e9cfb5dc71bb27de4b1ed0152dd9b Merge: c39c3a975 23702dd26 Author: Keith Packard Date: Mon May 11 16:50:43 2015 -0700 Merge remote-tracking branch 'evelikov/master' commit c39c3a97508dc384c0757a0990c07b5d7b2fe97a Merge: 6b65e9618 747057852 Author: Keith Packard Date: Mon May 11 16:34:48 2015 -0700 Merge remote-tracking branch 'ajax/xserver-next' commit 6b65e961894b9ed53066d22cfd218b12c3f361ca Author: Robert Ancell Date: Wed May 6 15:07:21 2015 +1200 xwayland: Fix error strings Fix missing newlines from error string and fix grammar. Signed-off-by: Robert Ancell Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit d7091a21d90cf463ae39ec5e8741123218ec5686 Merge: c3ce9d8fd 8fb8bbb30 Author: Keith Packard Date: Mon May 11 15:49:34 2015 -0700 Merge remote-tracking branch 'airlied/for-keithp' commit c3ce9d8fd404ca1d4697a104ce4899525dd43c51 Author: Adel Gadllah Date: Fri May 1 17:43:41 2015 +0200 modesetting: Fix software cursor fallback The code in drmmode_set_cursor does not properly handle the case where drmModeSetCursor2 returns any other error than EINVAL and silently fails to set a cursor. So only return when the drmModeSetCursor2 succeeds (i.e returns 0) and disable the cursor2 usage on EINVAL. References: https://bugzilla.redhat.com/show_bug.cgi?id=1205725 Signed-off-by: Adel Gadllah Reviewed-by: Michel Dänzer Reviewed-by: Rob Clark Signed-off-by: Keith Packard commit 81a51a6cace6fdb54999ccdf1533dc28a2222bb9 Author: Dima Ryazanov Date: Wed Apr 29 22:39:18 2015 -0700 xwayland: Implement smooth scrolling We don't even need to simulate button clicks; it's done automatically. This also fixes scrolling in Qt5 apps. Signed-off-by: Dima Ryazanov Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 9ff89a2e469ab0ac5af57d0fc115127feb1c0d99 Author: Jason Gerecke Date: Wed Apr 29 15:08:58 2015 +1000 dix: Do not allow device transform to be set on valuatorless devices If a device does not have any valuators, it makes no sense to set the device transformation. Return a BadMatch error to let the caller know that they're trying something stupid. Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit fa62ca68ef8be7f63cd0b899dfae3366ca9350cf Author: Rui Matos Date: Sat Apr 25 21:19:25 2015 +0200 dix/events: Set currentTime to the given time stamp in NoticeTime The refactoring in commit efc1035ca958f2c9d266338a308518a0834b1773 removed the actual update of currentTime. Signed-off-by: Rui Matos Acked-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 26e50e8b2cbd01d050b5ecc02d47488b53ecc08b Merge: 28ff661e7 c7b49bdbb Author: Keith Packard Date: Mon May 11 15:36:53 2015 -0700 Merge remote-tracking branch 'jturney/mingw-build-fixes' commit 7470578520e90b6402b2509cd0c51fd4fd84849f Author: Brent Collins Date: Thu May 7 15:10:19 2015 -0400 shm: Fix xselinux resource initialization for xinerama pixmaps This is necessary to avoid a NULL pointer deference when the pixmap is used later. [ajax: massaged commit message, fixed it to compile] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89748 Reviewed-by: Adam Jackson Signed-off-by: Brent Collins commit bcec9f867d19e954a46c2654a79782bff6c65fce Author: Chris Wilson Date: Sat Feb 14 10:36:44 2015 +0000 shm: Fix use-after-free in ShmDestroyPixmap We pass the pPixmap->drawable.id to the ShmDetachSegment function after the pPixmap is freed. Fortunately, we don't use the value inside ShmDetachSegment and can simply pass zero instead. Signed-off-by: Chris Wilson Reviewed-by: Michel Dänzer commit d61ae18074e53c2cdfb13cc37693b526160d6ca7 Author: Chris Wilson Date: Wed Mar 4 12:16:29 2015 +0000 glx/dri2: Disable AIGLX if indirect GLX is disabled There is no point in setting up the acceleration for indirect GLX if indirect GLX is itself disabled. Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit 1af15aaf278edcf6f6de94774350e34a80883c24 Author: Olivier Fourdan Date: Fri Apr 10 10:07:38 2015 +0200 dix: Fix image byte order on big endian hardware Make sure X_BIG_ENDIAN/X_LITTLE_ENDIAN are defined before actually using them. Otherwise, image byte order could be wrong on big endian hardware even though endianess detection is correct. Reported-by: Tim Waugh Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit 28159eff6badf6181b255f26d1f444abe81c05b7 Author: Jason Gerecke Date: Thu Apr 30 18:06:14 2015 -0700 xfree86: Return NULL from xf86CompatOutput if no compat_output is defined If no compat_output is defined, we inadvertently (attempt to) return whatever data is at index -1. Instead, return NULL since that's what callers are expecting. Reviewed-by: Adam Jackson Signed-off-by: Jason Gerecke commit cad831f39861435cb94f4c90a73f7f0b62d1a4a1 Author: Robert Ancell Date: Wed May 6 15:07:21 2015 +1200 xwayland: Fix error strings Fix missing newlines from error string and fix grammar. Signed-off-by: Robert Ancell Reviewed-by: Daniel Stone commit 8fb8bbb3062f1a06621ab7030a9e89d5e8367b35 Author: Dave Airlie Date: Mon Mar 23 11:33:23 2015 +1000 modesetting: add tile property support (v2.1) This adds tiling support to the server modesetting driver, it retrieves the tile info from the kernel and translates it into the server format and exposes the property. v2.1: fix resetting tile property (Chris) Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie commit 9257b1252da9092ddc676fec9aabe2b33dfad272 Author: Dave Airlie Date: Wed Jan 28 17:35:21 2015 +1000 modesetting: add dynamic connector hotplug support (MST) (v3) This is ported from the same code in the ati and intel drivers, It uses the same option name as nvidia and the other DDXes to disable tearing down outputs as it is hard to avoid racing with clients. v2: address two issues with DeleteUnusedDP12 enabled, reported by Daniel Martin, a) check we have a mode_output before destroying it b) only delete *unused* displays (thanks Aaron for clarifying) so we check if the output has a crtc and if it does we don't delete it. v3: drop the option to delete unused displays, just encode behaviour into the randr spec. Signed-off-by: Dave Airlie commit 33422d160bff3117b413a62d82b168e84f1aa8f6 Author: Dave Airlie Date: Wed Jan 28 17:25:00 2015 +1000 modesetting: stop caching mode resources There is no need to cache the mode resources and with dynamic connectors for mst support we don't want to. So first clean that up before adding dynamic connector support. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit a9ac02f6949357619684dd98ff6cf05489e62e55 Author: Dave Airlie Date: Wed Apr 1 12:13:51 2015 +1000 xf86Crtc/monitors: create initial monitors for tiled outputs This creates an automatic monitor for a tiled monitor at startup. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit afd18bce6a81106a12fd750d5fa09d05c09d37a8 Author: Dave Airlie Date: Wed Apr 1 14:32:00 2015 +1000 xf86Crtc: setup tiled monitors correctly in right of This puts the tiles of the monitor in the right place at X server startup. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit e472dd89420f671685c11b06d376ff146d54c3b8 Author: Adam Jackson Date: Tue Jul 28 11:07:13 2009 -0400 xf86Crtc: right-of placement by default. Change the X server default to do right-of placement at startup. This gives an option to allow drivers to override this placement, which has been used for server drivers where both heads are not in the same physical place. Been in Fedora for a few years, but for tiled monitors we really want something along these lines. This is an ABI break. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 69e4b8e602ecc7b69c75988a447ec5b509b22402 Author: Dave Airlie Date: Tue Mar 31 16:56:42 2015 +1000 xfree86: attempt to autoconfig gpu slave devices (v3) This allows us to skip the screen section, the first Device section will get assigned to the screen, any remaining ones will get assigned to the GPUDevice sections for the screen. v2: fix the skipping unsuitable screen logic (Aaron) v3: fix segfault if not conf file (me, 5s after sending v2) Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 3b6930c5d02d8fc0d22fe7955e1ef2af61727705 Author: Dave Airlie Date: Tue Mar 31 16:42:36 2015 +1000 xserver: add xorg.conf support for gpu devices. (v2.1) This allows gpu devices to be specified in xorg.conf Screen sections. Section "Device" Driver "intel" Identifier "intel0" Option "AccelMethod" "uxa" EndSection Section "Device" Driver "modesetting" Identifier "usb0" EndSection Section "Screen" Identifier "screen" Device "intel0" GPUDevice "usb0" EndSection This should allow for easier tweaking of driver options which currently mess up the GPU device discovery process. v2: add error handling for more than 4 devices, (Emil) fixup CONF_ defines to consistency add MAX_GPUDEVICES define (yes there is two defines, this is consistent with everywhere else). remove braces around slp (Mark Kettenis) man page fixups (Aaron) v2.1: fixup whitespace (Aaron) Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit c7b49bdbb9321fe9a7dc35f47b91cac85516988f Author: Colin Harrison Date: Fri Mar 20 14:25:17 2015 +0000 os/utils.c: Fix prototype for Win32TempDir() xorg/xserver/os/utils.c: In function ‘Win32TempDir’: xorg/xserver/os/utils.c:1643:1: warning: old-style function definition [-Wold-style-definition] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit a9b4b7b79682dd367ce26c29aa5dc85807201851 Author: Colin Harrison Date: Fri Mar 20 14:25:53 2015 +0000 os/utils.c: Don't try to build os_move_fd() for WIN32 Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 2b114d6a516ee584ff89b96b12acf91799b6d677 Author: Jon TURNEY Date: Fri Mar 20 14:29:58 2015 +0000 hw/xnest: Fix build for MinGW Include the wrapped windows.h via X11/Xwindows.h before xcb_keysyms.h to avoid type clashes caused by the unwrapped windows.h that includes. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5bf3e5c8326fb81655827dbd4c527f1a2ba09511 Author: Jon TURNEY Date: Wed Mar 18 13:29:22 2015 +0000 hw/xwin/winclipboard: Link xwinclip with -lpthread Link xwinclip with -lpthread to fix build for MinGW Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 8363ef2764fe9c6877d1cb21d3ce7b6cf869f00d Author: Colin Harrison Date: Fri Mar 20 14:06:49 2015 +0000 os/xdmcp.c: Include Xtrans.h when building for WIN32 Xtrans.h must be included on WIN32 to prototype _XSERVTransWSAStartup() xserver/os/xdmcp.c: In function ‘get_addr_by_name’: xserver/os/xdmcp.c:1483:5: error: implicit declaration of function ‘_XSERVTransWSAStartup’ [-Werror=implicit-function-declaration] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 28ff661e73f4bdf0a9b7c84e70fa0a08fd30e482 Author: Alan Coopersmith Date: Fri Apr 3 19:06:21 2015 -0700 Remove empty stub of $host_cpu case statement in configure.ac Left behind when commit 5c12399b6c3a8d moved the xorg_bus_* settings elsewhere. Signed-off-by: Alan Coopersmith Reviewed-by: Thomas Klausner commit d4e85afac6578d5babc8bf97e00e85b00746fca9 Author: Alan Coopersmith Date: Fri Apr 3 19:01:40 2015 -0700 Accept x86_64 as well as i*86 for $host_cpu in Solaris on x86 Needed when using a compiler that defaults to 64-bit output when configure is checking for $host_cpu. Signed-off-by: Alan Coopersmith Reviewed-by: Thomas Klausner commit 0018784cdde19444a8f970bc414796fc2a523a51 Author: Alan Coopersmith Date: Sat Mar 21 17:59:13 2015 -0700 Convert hw/dmx to new *allocarray functions Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit dc5acaa28ab9ed091f087e56046400d63f1f192a Author: Alan Coopersmith Date: Sat Mar 21 17:30:05 2015 -0700 Convert hw/kdrive to new *allocarray functions Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit ae2dc01cf1a371db69d5deb987f4185e7c3ccedd Author: Alan Coopersmith Date: Sat Mar 21 17:23:33 2015 -0700 Convert hw/xnest & hw/vfb to new *allocarray functions Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit 4cb1034906eeec8c8442d70918bea0f4eb1f6e44 Author: Alan Coopersmith Date: Sat Mar 21 17:12:06 2015 -0700 Convert hw/xfree86 to new *allocarray functions Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit f59236c2865d22c6f0b2d1ba303213afd10cd02e Author: Alan Coopersmith Date: Sat Mar 21 15:05:30 2015 -0700 Convert glamor & glx to new *allocarray functions v2: fixup whitespace Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner Reviewed-by: Michel Dänzer commit 7ac280287491fe06127d9fefc504217e21c780e6 Author: Alan Coopersmith Date: Sat Mar 21 14:58:50 2015 -0700 Convert mi & miext to new *allocarray functions v2: remove now useless parentheses Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit 70f4a0e6bd18055cc9cb6685253bf5e07b125657 Author: Alan Coopersmith Date: Sat Mar 21 14:40:39 2015 -0700 Convert exa & fb to new *allocarray functions v2: fixup whitespace Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner Reviewed-by: Michel Dänzer commit 4fe6b03b97ab8dbb32e4908e46be350d7f7d336f Author: Alan Coopersmith Date: Sat Mar 21 14:36:07 2015 -0700 Convert XKB to new *allocarray functions Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner Acked-by: Daniel Stone commit 1c56ac63c040280498c4a9d67b48c35b60070821 Author: Alan Coopersmith Date: Sat Mar 21 13:42:12 2015 -0700 Convert top level extensions to new *allocarray functions v2: remove now useless parentheses Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit b9e665c8b2f048feb3064ce412e0b3e9eb6797b0 Author: Alan Coopersmith Date: Sat Mar 21 10:52:29 2015 -0700 Convert dix/* to new *allocarray functions v2: remove now useless parentheses Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit df4e41fdb47cdeab5155224557ed8ab4ec4dc659 Author: Alan Coopersmith Date: Sat Mar 21 10:08:25 2015 -0700 Convert os/* to new *allocarray functions v2: remove now useless parentheses Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit ae75d50395fdd7a6bc382ba73e923c460764c702 Author: Alan Coopersmith Date: Sat Mar 21 09:28:07 2015 -0700 Add no-fail equivalents of allocarray & reallocarray v2: Remove extra 's' from comment Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit c213b29d14aaf2f4523d638abc762eaaa873cf83 Author: Alan Coopersmith Date: Sat Mar 21 08:58:04 2015 -0700 Add xallocarray() helper macro Uses reallocarray to perform integer overflow detection when allocating an array, using NULL as the previous pointer to force a new allocation. Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit 0887c9463fc7d36d7874e7f978df4109542f7307 Author: Alan Coopersmith Date: Sat Mar 21 08:42:19 2015 -0700 Import reallocarray() from OpenBSD Wrapper for realloc() that checks for overflow when multiplying arguments together, so we don't have to add overflow checks to every single call. For documentation on usage, see: http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/calloc.3 Signed-off-by: Alan Coopersmith Acked-by: Matt Turner commit b96dc999968320ad6322b50c79d847efcfcd02b2 Author: Alan Coopersmith Date: Sat Mar 21 15:21:14 2015 -0700 Add XNFcallocarray() to allow xnfcalloc() to check for overflow The xnfcalloc() macro took two arguments but simply multiplied them together without checking for overflow and defeating any overflow checking that calloc() might have done. Let's not do that. The original XNFcalloc() function is left for now to preserve driver ABI, but is marked as deprecated so it can be removed in a future round of ABI break/cleanup. Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit f3ba909753cd216fc9eca4618a76cc283ccbf51e Author: Alan Coopersmith Date: Sat Mar 21 11:07:24 2015 -0700 Let calloc handle multiplication It's going to multiply anyway, so if we have non-constant values, might as well let it do the multiplication instead of adding another multiply, and good versions of calloc will check for & avoid overflow in the process. Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit a28202a148508837911c5932a0d14af4b145bece Author: Alan Coopersmith Date: Sat Mar 21 08:19:30 2015 -0700 Remove remaining doc references to Xalloc, Xrealloc, and Xfree Functions were removed in commit cad9b053d52f62432 Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit 2a6d253b3f2ec4775412b4ae96a96b0b668ec827 Author: Alan Coopersmith Date: Sat Feb 28 10:04:09 2015 -0800 Remove apSolaris.shar (old "aperture" kernel driver for Solaris) Modern Solaris releases provide this functionality in the OS via the xsvc driver. Since the move to libpciaccess, nothing in Xorg uses this aperture driver any more. Signed-off-by: Alan Coopersmith commit b1029716e41e252f149b82124a149da180607c96 Author: Ray Strode Date: Thu Apr 16 11:28:16 2015 -0400 systemd-logind: don't second guess D-Bus default timeout At the moment, the X server uses a non-default timeout for D-Bus messages to systemd-logind. The only timeouts normally used with D-Bus are: 1) Infinite 2) Default Anything else is just as arbitrary as Default, and so rarely makes sense to use instead of Default. Put another way, there's little reason to be fault tolerant against a local root running daemon (logind), that in some configurations, the X server already depends on for proper functionality. This commit changes systemd-logind to just use the default timeouts. Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347 Signed-off-by: Ray Strode Reviewed-by: Hans de Goede Signed-off-by: Keith Packard commit 792e9251670ce94210df5c6d354059bbb97f4478 Author: Ray Strode Date: Thu Apr 16 11:28:15 2015 -0400 systemd-logind: filter out non-signal messages from message filter It's possible to receive a message reply in the message filter if a previous message call timed out locally before the reply arrived. The message_filter function only handles signals, at the moment, and does not properly handle message replies. This commit changes the message_filter function to filter out all non-signal messages, including spurious message replies. Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347 Signed-off-by: Ray Strode Reviewed-by: Hans de Goede Signed-off-by: Keith Packard commit 41932dfbc841a1adc6512d41085ea3f8ebecb42c Author: Keith Packard Date: Wed Apr 8 07:45:28 2015 -0700 mi: Partial pie-slice filled arcs may need more space for spans The mi filled arc code estimates that a filled arc will produce no more spans than the arc is tall. This is true for most arcs except for pie-slice arcs strictly between 180 and 360 degrees where the missing portion of the arc faces up or down such that we get two spans on some scanlines. For those, we need to reserve room for another height/2 spans. This patch just does it for all partial pie-sliced arcs to make the test easier to understand; it's just over-allocating a bit of memory, so that's safe. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 21e7d2bb5cd810688bb905b6ed092497ca8a2c59 Author: Hans de Goede Date: Wed Apr 8 14:07:52 2015 +0200 Re-enable non serverfd input devices immediately on vtenter Non serverfd input devices will never get a systemd-logind dbus resume signal, causing them to never get re-enabled. This commit changes xf86VTEnter() to enable them immediately, fixing this. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=89756 Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit f1da6bf5d94911e78d2e27e6accf0c6e3aefb331 Author: Keith Packard Date: Tue Mar 31 17:07:43 2015 -0700 Require randrproto version 1.5.0 or newer Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit e36236eade412dd3894f75f78a7b3d7c1037e6c3 Author: Aaron Plattner Date: Tue Dec 30 09:13:16 2014 -0800 xfree86: Add GPU screens even if there are no active GDevs xf86platformProbeDev creates GPU screens for any platform devices that were not matched by a GDev in the loop above, but only if there was at least one device. This means that it's impossible to configure a device as a GPU screen if there is only one platform device that matches that driver. Instead, create a GPU screen (if possible) for any platform device that was not claimed by the GDev loop. Signed-off-by: Aaron Plattner Reviewed-by: Maarten Lankhorst Acked-by: Alex Deucher commit 4ecda362594d771f401de467c2d58c0f552227a8 Author: Aaron Plattner Date: Tue Dec 30 09:13:15 2014 -0800 xfree86: Fix xf86_check_platform_slot's handling of PCI If a PCI entity is found, xf86_check_platform_slot performs a device ID check against the xf86_platform_device passed in. However, it just returns immediately without checking the rest of the entities first. This leads to this situation happening: 1. The nvidia driver creates an entity 0 with bus.type == BUS_PCI 2. The intel driver creates entity 1 for its platform device, opening /dev/dri/card0 3. xf86platformProbeDev calls probeSingleDevice on the Intel platform device, which calls doPlatformProbe, which calls xf86_check_platform_slot. 4. xf86_check_platform_slot compares the Intel platform device against the NVIDIA PCI entity. Since they don't have the same device ID, it returns TRUE. 5. doPlatformProbe calls xf86ClaimPlatformSlot, which creates a duplicate entity for the Intel one. Fix this by only returning FALSE if the PCI ID matches, and continuing the loop otherwise. In the scenario above, this allows it to continue on to find the Intel platform device that matches the second entity. Signed-off-by: Aaron Plattner Reviewed-by: Maarten Lankhorst Acked-by: Alex Deucher commit e608f3521eaaab972a3eea62aa04a65958351c1c Merge: d3b9c47c8 5de138307 Author: Keith Packard Date: Tue Mar 31 09:06:08 2015 -0700 Merge remote-tracking branch 'airlied/for-keithp' commit d3b9c47c849d039493c5e0ca5c3af8affe738746 Author: Jon Turney Date: Sun Mar 29 23:18:49 2015 +0100 Fix XQuartz build Fix XQuartz build since commit e036cbfc "Make PseudoramiXExtensionInit() prototype more generally available" Add #include "nonsdk_extinit.h" to xprScreen.c Add #include "nonsdk_extinit.h" to miinitext.c under INXQUARTZ to provide declarations used under INXQUARTZ Signed-off-by: Jon Turney Reviewed-by: Jeremy Huddleston Sequoia Tested-by: Jeremy Huddleston Sequoia Signed-off-by: Keith Packard commit 5de13830709a7f2d4d112d71e062f710ef466ab6 Author: Keith Packard Date: Tue Dec 16 09:56:50 2014 -0800 randr: Use Monitor list for Xinerama This replaces the CRTC-based Xinerama implementation with one which uses Monitors instead, allowing clients to manipulate the Xinerama configuration through the RandR Monitor list. Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 7e1f86d42b54fb7f6492875e47a718eaeca3069b Author: Keith Packard Date: Tue Dec 16 01:59:03 2014 -0800 randr: Add Monitor support (v1.1) Store the user-defined monitors in the RandR screen private. Generate a list of monitors from both the user-defined ones and from any outputs not mentioned in one of the user-defined monitors. This list covers both the outputs in the main screen as well as any slaves. v1.1: airlied: fix up primary skipping bug, fix wrong height initialiser add get_active flag from updated protocol. Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 9c2b4f8e0e2b5d4b5e1102d6eea7bdb4211baa68 Author: Dave Airlie Date: Tue Mar 31 11:18:44 2015 +1000 xf86Crtc: add tile prop setting Add support for drivers to set the tiling property. This is used by clients to work out the monitor tiles for DisplayID monitors. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 7088816fee0ca7d609c7bca41ef8c3fc938556f5 Merge: 95e83ff87 e977b404d Author: Keith Packard Date: Fri Mar 27 06:45:56 2015 -0700 Merge remote-tracking branch 'anholt/glamor-next' commit e977b404d7d1c6cd2be2168f4fdce0ae31cd1f9f Author: Keith Packard Date: Sat Jan 17 07:44:27 2015 +1300 glamor: * 1/size is faster than / size in VS Pass the inverse of the texture size to glamor vertex shaders so that we multiply by that instead of dividing by the size as multiplication is generally faster than division. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Matt Turner commit 82634d2b69950e7e9a066c8c96bf2624ac26193a Author: Jon TURNEY Date: Mon Feb 9 13:45:44 2015 +0000 ephyr: Avoid a segfault with 'DISPLAY= Xephyr -glamor' ephyr_glamor_connect() returns NULL if we failed, but applying xcb_connection_has_error() to NULL is not permitted. Signed-off-by: Jon TURNEY Signed-off-by: Eric Anholt Reviewed-by: Daniel Martin commit 391bcf77db96ff227e504c213aa5d5db09b6a050 Author: Adam Jackson Date: Mon Feb 23 11:58:59 2015 -0500 glamor: Fix up indentation Signed-off-by: Adam Jackson Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Alex Deucher commit 0669babf2b5b50cbc185b0f714671b2c2b368778 Author: Matt Turner Date: Wed Mar 4 13:42:48 2015 -0800 glamor: Perform texture2D() separately from swizzle. The texture2D() happens in each branch, so we may as well do it as early as possible and hide some of its latency in the branching instructions. Moving it outside the (uniform) control flow reduces the number of instructions in the fs_source shader from 64 to 46 and in the set_alpha_source shader from 69 to 47 on Haswell. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 9e9fcf578063b4155aab4adab83f8d956bde5d1a Author: Eric Anholt Date: Wed Feb 4 14:38:15 2015 -0800 glamor: Add a helper function for the common GL_QUADS fallback pattern. We should do better than this with an index buffer, but for now at least make it so that we don't have to copy the same code to new places. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 909a406aa239b8d231d6f63ce05a3e4a2bc3cb07 Author: Eric Anholt Date: Sun Dec 28 19:39:45 2014 -1000 glamor: Don't optimize out scissor updates in CopyArea. This possibly is a minor hit for immediate mode renderers (no difference on copypixin100 on my hsw, n=12), but it gives important information about drawing bounds to a deferred renderer (3.1x improvement in copypixwin100 on vc4). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 6ba6cc57e17aefb7db0201a1f3180ab55076eb48 Author: Eric Anholt Date: Sat Dec 27 09:00:58 2014 -1000 glamor: Just set the logic op to what we want at the start of all rendering. By dropping the unconditional logic op disable at the end of rendering, this fixes GL errors being thrown in GLES2 contexts (which don't have logic ops). On desktop, this also means a little less overhead per draw call from taking one less trip through the glEnable/glDisable switch statement of doom in Mesa. The exchange here is that we end up taking a trip through it in the XV, Render, and gradient-generation paths. If the glEnable() is actually costly, we should probably cache our logic op state in our screen, since there's no way the GL could make that switch statement as cheap as the caller caching it would be. v2: Don't forget to set the logic op in Xephyr's drawing. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 8102927282d5134493e5009a876a6b01a68d1f97 Author: Jon TURNEY Date: Thu Feb 5 12:52:02 2015 +0000 glamor: Fix build when configured --enable-glamor --disable-xshmfence Signed-off-by: Jon TURNEY Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 4218a1e066cf39bb980ebbc9f69536c85232da5c Author: Olivier Fourdan Date: Thu Feb 5 11:59:22 2015 +0100 glamor: check max native ALU instructions When using glamor (either in Xephyr or Xwayland) on hardware with too low instructions limit, glamor fallbacks to sw due to large shaders. This makes glamor unbearably slow on such hardware. Check reported value for GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB and fail in glamor_init() if the limit is lower than 128. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88316 Signed-off-by: Olivier Fourdan Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit e0788a03144186522fd0ef0e9c954e2744b40275 Author: Keith Packard Date: Wed Oct 29 23:47:23 2014 -0700 glamor: Eliminate GLAMOR_TEXTURE_LARGE pixmap type Initialize full pixmap private for all pixmaps, including block dimensions and counts so that no checks are needed when walking the fbos. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit cc731ce0ca4d6c5c8d9c1130864e652a814644b4 Author: Keith Packard Date: Wed Oct 29 23:20:11 2014 -0700 glamor: Create inline tests for small/large pixmaps This will let us eliminate the pixmap types shortly Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 020fcc582837b80b20843a09c1e28fa96096fe6b Author: Keith Packard Date: Wed Oct 29 23:08:57 2014 -0700 glamor: Eliminate separate 'large' pixmap private structure Just embed the large elements in the regular pixmap private and collapse the union to a single struct. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 9ef5cbf8ab8a51941d469bfcaca6cbfb7838d1ef Author: Keith Packard Date: Wed Oct 29 22:54:27 2014 -0700 glamor: Remove unused glamor_pixmap_private_atlas_t Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit af687396f1875de0a45683aad4fd5a9a2e00f10d Author: Keith Packard Date: Wed Oct 29 22:50:53 2014 -0700 glamor: Remove screen private and pixmap ptrs from pixmap private and fbo There's no reason to waste memory storing redundant copies of the same pointer all over the system; just pass in pointers as necessary to each function. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 1eb954c3830d46c27bf2a61f825b59f12092728c Author: Keith Packard Date: Wed Oct 29 21:31:32 2014 -0700 glamor: Remove remaining support for FBOs not matching pixmap size The core rendering code already requires that FBOs be allocated at exactly the pixmap size so that tiling and stippling work correctly. Remove the allocation support for that, along with the render code. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit adb847faeb51c567933fab97b97e79ee3d184dc8 Author: Keith Packard Date: Wed Oct 29 20:49:49 2014 -0700 glamor: Eliminate GLAMOR_TEXTURE_PACK pixmap type This is not used anywhere Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 2f80c7791bb0b11f261cb1e3e0d89163dcdd0342 Author: Keith Packard Date: Wed Oct 29 20:48:40 2014 -0700 glamor: Eliminate GLAMOR_SEPARATE_TEXTURE pixmap type This was only used to signal when we couldn't ask the DDX to draw to a pixmap; now that we have no DDX-based fallbacks, we don't need to have this type. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit c6ab13566798c7adff23a609575a7ac2d1ce2df6 Author: Keith Packard Date: Wed Oct 29 20:44:31 2014 -0700 glamor: Remove ddx fallback check functions With no DDX-based fallback support, we can remove these functions as they are no longer called. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 90d326fcc687e6d6d4b308f6272ededcf8145a17 Author: Keith Packard Date: Wed Oct 29 20:40:21 2014 -0700 glamor: Remove _nf rendering functions These were used by the non-standard glamor implementation in the intel driver. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 697f8581e04a93862a6049cc982d01d25f9a0410 Author: Keith Packard Date: Wed Oct 29 20:30:12 2014 -0700 glamor: Eliminate GLAMOR_USE_SCREEN and GLAMOR_USE_PICTURE_SCREEN Remove these defines as we start to remove support for non-standard glamor layering as used by the intel driver. v2: Rebase on the blockhandler change and the Xephyr init failure change (by anholt), fix stray NO_DRI3 addition to xwayland. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 28ff815c4b32c88bd9007fd79f2acf3682a4b4db Author: Keith Packard Date: Wed Oct 29 20:20:29 2014 -0700 glamor: Eliminate GLAMOR_CREATE_PIXMAP_MAP and GLAMOR_MEMORY_MAP GLAMOR_MEMORY_MAP was only used with GLAMOR_CREATE_PIXMAP_MAP, and GLAMOR_CREATE_PIXMAP_MAP doesn't appear to be used anywhere, so just remove both of them. v2: Fix a stray whitespace bug that was introduced (change by anholt). Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 0e1372e1bd8f79fa295738bc1e983cb3648ba4be Author: Maarten Lankhorst Date: Mon Jan 19 12:37:55 2015 +0100 glamor: GL_TEXTURE_MAX_LEVEL is not available on GLES2 Remove the calls to GL_TEXTURE_MAX_LEVEL. Setting the filtering is a sufficient hint to the driver about texture mipmap allocation. Signed-off-by: Maarten Lankhorst Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Ian Romanick commit c1f35c3d862f77cbd2fb871be5613fb0ca7e508b Author: Maarten Lankhorst Date: Mon Jan 12 15:29:34 2015 +0100 glamor: Use GL_FRAMEBUFFER instead of GL_READ_FRAMEBUFFER The latter might not be available on GLES2. Signed-off-by: Maarten Lankhorst Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit b66501b4fd9c392e0f971ea356b27eb71c9c9e79 Author: Maarten Lankhorst Date: Mon Jan 19 12:36:52 2015 +0100 glamor: do not check for gl errors in glamor_build_program According to Eric Anholt the check for glGetError is not needed here. Because a opengl error might be set before this function is called keeping the check could result in glamor_build_program returning failure when building the shader succeeded. Signed-off-by: Maarten Lankhorst Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 7c6f483670770e4e534cafd4e70d0b1490f4cca6 Author: Maarten Lankhorst Date: Mon Jan 19 12:32:54 2015 +0100 glamor: only use (un)pack_subimage when available Check for GL_EXT_unpack_subimage and GL_NV_pack_subimage to check if GL_(UN)PACK_ROW_LENGTH is available. Set the offsets manually to prevent calls to GL_(UN)PACK_SKIP_*. v2: Check support for GL_NV_pack_subimage as suggested by Matt Turner. Signed-off-by: Maarten Lankhorst Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 4f534c26c64cc1edd33b04d30e4df818b7ae55d9 Author: Olivier Fourdan Date: Wed Jan 28 16:08:26 2015 +0100 xwayland: Add dependency on glamor libs So that Xwayland gets re-linked each time glamor is modified. Signed-off-by: Olivier Fourdan Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 251a067993658fd02f158fef36476f898c238e3c Author: Olivier Fourdan Date: Mon Feb 2 10:41:06 2015 +0100 ephyr: Fail if glamor is requested but not usable Signed-off-by: Olivier Fourdan Signed-off-by: Eric Anholt Reviewed-by: Ian Romanick Reviewed-by: Eric Anholt commit 23702dd2689e2e1e65be5767ac0303a985bb04a0 Author: Emil Velikov Date: Thu Mar 19 12:26:29 2015 +0000 randr: coding style fixes In most of xserver code-base we define new functions at column 0, with their return type provided on the previous line. Two functions did not follow this rule so update them, and get them wrapped up to 80 as an added bonus. Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit 739e8fac0e9d8d4c1653e53a8f3ce2d38b3de320 Author: Emil Velikov Date: Thu Mar 19 12:22:18 2015 +0000 randr: wrap long line Also make use of total_name_len variable for consistency. Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit 363cd0e0b499ea8c32b2aa5cf7ea0f0a56b4c3ef Author: Emil Velikov Date: Thu Mar 19 12:19:23 2015 +0000 randr: use local variables where possible This will allow us to make the code more readable, and the lines will fit within 80 columns. Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit 93ef0e580e9cdbe739046a0873971d402525ef00 Author: Emil Velikov Date: Thu Mar 19 12:40:06 2015 +0000 randr: use randr: prefix in ErrorF() To provide some information about the origin of the message. Cc: Dave Airlie Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit a08ee773983c44ebb893f10a1dcfa443f2734277 Author: Emil Velikov Date: Thu Mar 19 12:36:50 2015 +0000 randr: remove chatty error messages All of these seem like left over from developments stage. Remove them as they can cause excessive flood in the logs. Cc: Dave Airlie Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit a34d29c2edd786f0baa0e7c334f4174eeecb71d2 Author: Emil Velikov Date: Sun Mar 8 17:56:58 2015 +0000 configure.ac: remove remaining TLS references No longer used with the removal of the GL dispatch (glapi) from libglx a few releases ago. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson Reviewed-by: Eric Anholt commit 95e83ff87ab0149ab01c9299524dfbe37d9b21a2 Author: Jon TURNEY Date: Thu Jul 12 02:00:43 2012 +0100 Don't allow both RandR XINERAMA and pseudoramiX XINERAMA extensions to register Prevent RRXinerama from activating if PseudoramiX is, so we don't get XINERAMA listed twice in the list of extensions. I think this is otherwise benign, as the PseudoramiX XINERAMA gets registered first and thus handles all requests. Perhaps AddExtension() ought to warn us if the extension name is already registered? This appears to be a long-standing bug seen in XQuartz, and now in XWin as well. Future work: Perhaps since RRXinerama isn't actually doing anything useful but faking it when we have one screen, it seems that the PseudoramiX code could be also used in that case. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 234fe391802b114e96d60a6630f717f8e4fb726c Author: Jon TURNEY Date: Fri Nov 7 13:38:20 2014 +0000 hw/xwin: Report OS version in log Report OS version in log Report if WoW64 is in use Manifest for compatbility with Windows versions, so we don't get lied to by GetVersionEx() Also, make the description in the manifest a bit more generic Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 7a22912edbda826778463f8fefa9c8e689858bbe Author: Jon TURNEY Date: Thu Nov 6 15:22:58 2014 +0000 hw/xwin: Remove Shadow DirectDraw engine Maybe a long time ago this made some kind of sense, but now there's no good reason to ever use this, rather than the Shadow DirectDraw NonLocking engine. Also remove screen private data members used by other removed engines. Also remove no longer needed OS version check in winDetectSupportedEngines() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 55a84be085e9f479f7907bed5fb68fc66ce81ae8 Author: Jon TURNEY Date: Sat Mar 3 20:13:19 2012 +0000 hw/xwin: Only set native positions if XINERAMA is enabled Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 23e07d71b607c99c3a0a0ea362c70dcae73485c6 Author: Jon TURNEY Date: Thu Nov 6 14:28:17 2014 +0000 hw/xwin: Register native screens with pseudoramiX Update man page to document pseudo-xinerama v2: Make the use of PseudoramiXExtensionInit() match the prototype v3: Update for nonsdk_extinit.h Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e036cbfccbe33775524a469082306913843c63df Author: Jon TURNEY Date: Thu Nov 6 13:54:11 2014 +0000 Make PseudoramiXExtensionInit() prototype more generally available Make PseudoramiXExtensionInit() prototype available to hw/xwin Rather than avoiding a reference to it being pulled in to Xorg by sdksyms by hiding this prototype behind the INXQUARTZ define, which is only defined when building Xquartz, introduce nonsdk_extinit.h and move it there. (The only remaining use of INXQUARTZ is in mi/miiniext.c, in order to do PseudoramiXExtensionInit() at the point apparently needed by Xquartz) Also remove duplicate declaration of noPseudoramiXExtension from pseudoramiX.h Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3aad9b7556391b0f55e46ba13ced5e58d8fd47f7 Author: Jon TURNEY Date: Mon Nov 7 20:54:10 2011 +0000 hw/xwin: Turn on -hostintitle by default Turn on -hostintitle by default Provide -nohostintitle to disable if needed Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b2aaf69e62f4109ffb8aaf39e9bd2571abb29dfb Author: Jon TURNEY Date: Thu Jun 28 14:22:07 2012 +0100 hw/xwin: Report Cygwin version information in log Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d02f9611c8d3bafca4be17c65efca3c5527f71e2 Author: Jon TURNEY Date: Mon Mar 16 16:29:29 2015 +0000 hw/xwin/glx: Improve code generator to deal with latest Khronos OpenGL registry XML Improve the parsing of the XML element Include all text from the param element, in the order it appears in the xml document, as part of the formal parameter declaration This is needed to correctly handle the XML description added in svn r27498 of glPathGlyphIndexRangeNV()'s baseAndCount parameter of type GLuint[2] This fixes the way the parameter declaration is generated so it is in the correct form 'GLuint baseAndCount_[2]' and not 'GLuint baseAndCount[2]_' Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5071cb7e0ac5f17c48ed7f3f3b6f242dec802f66 Author: Jon TURNEY Date: Mon Mar 16 16:14:10 2015 +0000 hw/xwin/glx: Refactor parsing of the XML element Factor out duplicated code used in parsing of the XML element in the code generator Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d3080d421bf0d91daea2e39bfc391c43d7fdad75 Author: Jon TURNEY Date: Thu Feb 5 20:29:48 2015 +0000 os: Teach vpnprintf() how to handle "%*.*s" XdmcpFatal uses the format specifier %*.*s, which vpnprintf() doesn't understand, which causes a backtrace and prevents the reason for the XDMCP failure being logged. See also: https://bugs.freedesktop.org/show_bug.cgi?id=66862 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758574 "%*.*s" is also currently used in a few other places, so teach vpnprintf() how to handle it $ fgrep -r "%*.*s" * hw/dmx/config/scanner.l: fprintf(stderr, "parse error on line %d at token \"%*.*s\"\n", hw/dmx/dmxlog.c: ErrorF("(%s) dmx[i%d/%*.*s]: ", type, hw/dmx/input/dmxinputinit.c: dmxLogCont(dmxInfo, "\t[i%d/%*.*s", os/access.c: ErrorF("Xserver: siAddrMatch(): type = %s, value = %*.*s -- %s\n", os/access.c: ("Xserver: siCheckAddr(): type = %s, value = %*.*s, len = %d -- %s\n", os/xdmcp.c: FatalError("XDMCP fatal error: %s %*.*s\n", type, Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 491cf02e191e70c5ce24c19da880bb79bebfc03c Author: Jon TURNEY Date: Tue Feb 10 14:37:26 2015 +0000 os: XDMCP options like -query etc. should imply -listen tcp In X server 1.17, the default configuration is now -nolisten tcp. In this configuration, XDMCP options don't work usefully, as the X server is not listening on the port for the display that it tells the display manager to connect to. Signed-off-by: Jon TURNEY Reviewed-by: Alan Coopersmith Reviewed-by: Colin Harrison commit f42520c5f151bda25e52ae8b0408a421c3fba7e5 Author: Jon TURNEY Date: Wed Feb 4 17:04:45 2015 +0000 ephyr: Avoid a segfault with 'DISPLAY= Xephy -glamor' ephyr_glamor_connect() returns NULL if we failed, but applying xcb_connection_has_error() to NULL is not permitted. Signed-off-by: Jon TURNEY Reviewed-by: Daniel Martin Reviewed-by: Colin Harrison commit 0a78b599b34cc8b5fe6fe82f90e90234e8ab7a56 Author: Jürg Billeter Date: Sat Feb 7 18:13:21 2015 +0100 int10: Fix error check for pci_device_map_legacy pci_device_map_legacy returns 0 on success. Signed-off-by: Jürg Billeter Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit 21b896939c5bb242f3aacc37baf12379e43254b6 Author: Egbert Eich Date: Tue Mar 3 16:27:05 2015 +0100 symbols: Fix sdksyms.sh to cope with gcc5 Gcc5 adds additional lines stating line numbers before and after __attribute__() which need to be skipped. Signed-off-by: Egbert Eich Tested-by: Daniel Stone Signed-off-by: Peter Hutterer commit 7ea64fb4374504bd3d524fc08c90efdab9f253ea Author: Alan Coopersmith Date: Mon Mar 9 09:55:57 2015 -0700 Clear ListenTransConns entries in CloseWellKnownConnections Since _XSERVTransClose frees the connection pointer passed to it, remove that pointer from the array, so we don't try to double free it if we come back into CloseWellKnownConnections again. Should fix https://bugzilla.yoctoproject.org/show_bug.cgi?id=6665 in which the shutdown section of the main() loop called CloseWellKnownConnections() and then moved on to ddxGiveUp(), which failed to release the VT and thus called AbortServer(), which called CloseWellKnownConnections() again. Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit 6d3cf35a6f0856ac44a7be560e2265461f9bb32b Author: Emil Velikov Date: Mon Mar 9 12:00:52 2015 +0000 autogen.sh: use quoted string variables Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent fall-outs, when they contain space. Signed-off-by: Emil Velikov Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5c4202ea85aaea2a4dc7eb29776357a2ba13e191 Author: Michal Srb Date: Thu Feb 19 14:57:27 2015 +0200 Expose GetMaster to modules. Add _X_EXPORT to GetMaster function. It is required by tigervnc's VNC module. Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f485a1af64bb00c696ea9f79961786bd791eaec1 Author: Peter Hutterer Date: Tue Dec 16 14:43:29 2014 +1000 Drop valuator mask argument from GetKeyboardEvents Nothing was using it and if anyone had they would've gotten a warning and noticed that it doesn't actually work. Drop this, it has been unused for years. Input ABI 22 Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 9d9bd38fe1454590c303dc936ddac913808bf881 Author: Dave Airlie Date: Tue Feb 17 14:40:27 2015 +1000 os/access: fix regression in server interpreted auth This was reported on irc on Fedora when rawhide went to 1.17.1. regression occured in: 2566835b4374edb3e5a8353d4f7c9e7ec4851c57 os: Eliminate uninitialized value warnings from access.c siAddrMatch doesn't need addr to be a useful value, it checks some things like localuser without having an address at all. Signed-off-by: Dave Airlie Tested-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3a06faf3fcdb7451125a46181f9152e8e59e9770 Author: Keith Packard Date: Tue Feb 10 22:16:49 2015 -0800 Mark development version for 1.18 Signed-off-by: Keith Packard commit 4a758f59a8a65c313244e06852745c8e180ff247 Author: Alan Coopersmith Date: Fri Dec 12 22:38:26 2014 -0800 dmx: include header for DMXExtensionInit() in dmx.c Gets rid of gcc 4.8 warning: dmx.c:1193:1: warning: no previous prototype for ‘DMXExtensionInit’ [-Wmissing-prototypes] DMXExtensionInit(void) ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit a0e44ddfb0c641e7896a55abf26621ae3d17e337 Author: Alan Coopersmith Date: Fri Dec 12 22:33:54 2014 -0800 dmx: constify GCOps & GCFuncs pointers Gets rid of 16 instances of gcc 4.8 warnings: In file included from dmxgc.c:41:0: dmx.h:327:23: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] (_saved)->_entry = (_actual)->_entry; \ ^ dmxgc.h:80:5: note: in expansion of macro ‘DMX_WRAP’ DMX_WRAP(funcs, &dmxGCFuncs, _pGCPriv, (_pGC)); \ ^ dmxgc.c:192:5: note: in expansion of macro ‘DMX_GC_FUNC_EPILOGUE’ DMX_GC_FUNC_EPILOGUE(pGC); ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 9682c47e228962e4008855c4da7467748742685e Author: Alan Coopersmith Date: Fri Dec 12 22:20:24 2014 -0800 dmx: Mark glxIsExtensionSupported as a const char * Gets rid of 9 instances of gcc 4.8 warning: glxcmds.c: In function ‘CreateContext’: glxcmds.c:378:13: warning: passing argument 1 of ‘glxIsExtensionSupported’ discards ‘const’ qualifier from pointer target type [enabled by default] else if (glxIsExtensionSupported("GLX_SGIX_fbconfig")) { ^ In file included from glxserver.h:49:0, from glxcmds.c:41: glxscreens.h:53:12: note: expected ‘char *’ but argument is of type ‘const char *’ extern int glxIsExtensionSupported(char *ext); Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 45ec646d77086eeb5f94766b055a93b5c75bdef0 Author: Alan Coopersmith Date: Fri Dec 12 22:16:49 2014 -0800 dmx: remove redundant redeclarations of variables from other headers Gets rid of these gcc 4.8 warnings: dmxcb.c:50:12: warning: redundant redeclaration of ‘PanoramiXPixWidth’ [-Wredundant-decls] extern int PanoramiXPixWidth; ^ In file included from dmxcb.c:49:0: ../../Xext/panoramiXsrv.h:12:22: note: previous declaration of ‘PanoramiXPixWidth’ was here extern _X_EXPORT int PanoramiXPixWidth; ^ dmxcb.c:51:12: warning: redundant redeclaration of ‘PanoramiXPixHeight’ [-Wredundant-decls] extern int PanoramiXPixHeight; ^ In file included from dmxcb.c:49:0: ../../Xext/panoramiXsrv.h:13:22: note: previous declaration of ‘PanoramiXPixHeight’ was here extern _X_EXPORT int PanoramiXPixHeight; ^ dmxcb.c:52:12: warning: redundant redeclaration of ‘PanoramiXNumScreens’ [-Wredundant-decls] extern int PanoramiXNumScreens; ^ In file included from dmxcb.c:49:0: ../../Xext/panoramiXsrv.h:11:22: note: previous declaration of ‘PanoramiXNumScreens’ was here extern _X_EXPORT int PanoramiXNumScreens; ^ dmxpict.c:60:12: warning: redundant redeclaration of ‘RenderErrBase’ [-Wredundant-decls] extern int RenderErrBase; ^ In file included from ../../render/glyphstr.h:29:0, from ../../render/picturestr.h:28, from dmx.h:65, from dmxpict.c:42: ../../render/picture.h:176:22: note: previous declaration of ‘RenderErrBase’ was here extern _X_EXPORT int RenderErrBase; ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 1033b85196e0f25877b4b9081993aff16bf32138 Author: Alan Coopersmith Date: Fri Dec 12 22:13:28 2014 -0800 dmx: remove redundant declaration of dmxFontPrivateIndex from dmxfont.h Gets rid of 8 instances of gcc 4.8 warning: In file included from glxcmds.c:38:0: ../../../hw/dmx/dmxfont.h:57:12: warning: redundant redeclaration of ‘dmxFontPrivateIndex’ [-Wredundant-decls] extern int dmxFontPrivateIndex; ^ In file included from glxcmds.c:35:0: ../../../hw/dmx/dmx.h:388:12: note: previous declaration of ‘dmxFontPrivateIndex’ was here extern int dmxFontPrivateIndex; /**< Private index for Fonts */ ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit ac64a653fb4935a799baca7545ba6ca401e20fa1 Author: Alan Coopersmith Date: Fri Dec 12 22:09:14 2014 -0800 dmx: glxproxy prototype cleanup Gets rid of 107 -Wmissing-prototypes & -Wredundant-decls warnings from gcc 4.8 Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit bd563fd48f909094d6660854e97811ad7e676ddf Author: Alan Coopersmith Date: Fri Dec 12 21:11:17 2014 -0800 dmx: more unshadowing of variables Gets rid of gcc 4.8 warnings: dmxinputinit.c: In function ‘dmxInputScanForExtensions’: dmxinputinit.c:877:14: warning: declaration of ‘display’ shadows a global declaration [-Wshadow] Display *display; ^ In file included from ../../../include/windowstr.h:60:0, from dmxinputinit.c:72: ../../../include/opaque.h:52:30: warning: shadowed declaration is here [-Wshadow] extern _X_EXPORT const char *display; ^ glxcmds.c: In function ‘__glXCreatePbuffer’: glxcmds.c:3397:21: warning: declaration of ‘pc’ shadows a parameter [-Wshadow] CARD32 *pc = (CARD32 *) (be_req + 1); ^ glxcmds.c:3314:52: warning: shadowed declaration is here [-Wshadow] __glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc) ^ glxscreens.c: In function ‘CalcServerVersionAndExtensions’: glxscreens.c:139:35: warning: declaration of ‘req’ shadows a previous local [-Wshadow] xGLXQueryServerStringReq *req; ^ glxscreens.c:68:26: warning: shadowed declaration is here [-Wshadow] xGLXQueryVersionReq *req; ^ glxscreens.c:140:36: warning: declaration of ‘reply’ shadows a previous local [-Wshadow] xGLXQueryServerStringReply reply; ^ glxscreens.c:69:27: warning: shadowed declaration is here [-Wshadow] xGLXQueryVersionReply reply; ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 57e08fae82f733304200a473f55b86e689404c13 Author: Alan Coopersmith Date: Fri Dec 12 21:07:12 2014 -0800 dmx: attempt to untangle nested loops using same index variable This doesn't just make gcc sad, it makes my brain sad. Change from: for (i = 0; i < dmxNumScreens; i++) { int i; for (i = 0; i < nconfigs; i++) { for (j = 0; j < dmxScreen->beNumVisuals; j++) { to the easier to follow: for (i = 0; i < dmxNumScreens; i++) { for (j = 0; j < nconfigs; j++) { for (k = 0; k < dmxScreen->beNumVisuals; k++) { Gets rid of gcc 4.8 warning: dmxinit.c: In function ‘InitOutput’: dmxinit.c:765:17: warning: declaration of ‘i’ shadows a previous local [-Wshadow] int i; ^ dmxinit.c:608:9: warning: shadowed declaration is here [-Wshadow] int i; ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 0fbebad72428abbc9fc3fa9f406f7a7e1b9d95b2 Author: Alan Coopersmith Date: Fri Dec 12 20:53:33 2014 -0800 dmx: remove unused variables Gets rid of gcc 4.8 warnings: dmxscrinit.c: In function ‘dmxBEScreenInit’: dmxscrinit.c:83:15: warning: unused variable ‘gcvals’ [-Wunused-variable] XGCValues gcvals; ^ dmxwindow.c: In function ‘dmxResizeWindow’: dmxwindow.c:860:19: warning: variable ‘pSibPriv’ set but not used [-Wunused-but-set-variable] dmxWinPrivPtr pSibPriv; ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit f358f0d50cadaf10f7d97e21da00419a4a37c4e1 Author: Alan Coopersmith Date: Fri Dec 12 19:09:36 2014 -0800 dmx: fix printf format argument warnings Gets rid of these gcc 4.8 warnings: dmxinit.c: In function ‘dmxErrorHandler’: dmxinit.c:167:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID64’ [-Wformat=] ev->resourceid); ^ dmxinit.c:171:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID64’ [-Wformat=] ev->resourceid); ^ dmxinit.c:175:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID64’ [-Wformat=] ev->resourceid); ^ dmxinit.c:181:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=] ev->serial); ^ dmxinit.c:183:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=] dpy->request); ^ dmxinit.c: In function ‘InitOutput’: dmxinit.c:637:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=] dmxLog(dmxInfo, "Generation: %d\n", dmxGeneration); ^ dmxprop.c: In function ‘dmxPropertyCheckOtherWindows’: dmxprop.c:223:24: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘Window’ [-Wformat=] dmxScreen->name, win, tp.value); ^ dmxprop.c: In function ‘dmxPropertyWindow’: dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘Window’ [-Wformat=] other->index, other->name, other->scrnWin); ^ dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘Window’ [-Wformat=] Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 11af200b004b4810c9267e3e16449c3175c64d4a Author: Alan Coopersmith Date: Fri Dec 12 18:58:01 2014 -0800 dmx: move format strings inline so gcc can check Gets rid of gcc 4.8 warnings: dmxprint.c: In function ‘dmxConfigPrintPair’: dmxprint.c:284:25: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] p->ysign < 0 ? '-' : '+', p->y); ^ dmxprint.c:289:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] dmxConfigOutput(addSpace, 0, p->comment, format, p->x, p->y); ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 5e01eac10e915568324aff81b51d3af558757042 Author: Alan Coopersmith Date: Fri Dec 12 18:52:05 2014 -0800 dmx: Add _X_ATTRIBUTE_PRINTF to dmxConfigLog() & dmxConfigOutput() Gets rid of gcc 4.8 warnings: dmxparse.c: In function ‘dmxConfigLog’: dmxparse.c:61:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] vprintf(format, args); /* RATS: All calls to dmxConfigLog from ^ dmxprint.c: In function ‘dmxConfigOutput’: dmxprint.c:149:9: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] pos += vfprintf(str, format, args); /* assumes no newlines! */ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 9e002dfcd71439fd81563db1f70e8c1964d52fab Author: Alan Coopersmith Date: Tue Dec 9 18:27:11 2014 -0800 Get rid of const warnings in XSERVER_INPUT_EVENT dtrace probe calls Use typedefs to work around dtrace dropping const qualifiers from probe arguments when generating Xserver-dtrace.h. Add new probes.h header to avoid having to replicate these typedefs in every file with dtrace probes. Gets rid of these warnings from gcc 4.8: getevents.c:1096:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' discards 'const' qualifier from pointer target type [enabled by default] getevents.c:1096:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1651:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1651:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1791:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1791:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1921:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1921:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 20079c36cf7d377938ca5478447d8b9045cb7d43 Author: Olivier Fourdan Date: Fri Jan 16 08:44:45 2015 +0100 xkb: Check strings length against request size Ensure that the given strings length in an XkbSetGeometry request remain within the limits of the size of the request. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 81c90dc8f0aae3b65730409b1b615b5fa7280ebd Author: Olivier Fourdan Date: Fri Jan 16 20:08:59 2015 +0100 xkb: Don't swap XkbSetGeometry data in the input buffer The XkbSetGeometry request embeds data which needs to be swapped when the server and the client have different endianess. _XkbSetGeometry() invokes functions that swap these data directly in the input buffer. However, ProcXkbSetGeometry() may call _XkbSetGeometry() more than once (if there is more than one keyboard), thus causing on swapped clients the same data to be swapped twice in memory, further causing a server crash because the strings lengths on the second time are way off bounds. To allow _XkbSetGeometry() to run reliably more than once with swapped clients, do not swap the data in the buffer, use variables instead. Signed-off-by: Olivier Fourdan Signed-off-by: Peter Hutterer commit 28f6427aec1f5a1982e1c01eff45af0d401bf659 Author: Keith Packard Date: Mon Feb 2 07:41:06 2015 +0100 Update to version 1.17.0 Signed-off-by: Keith Packard commit 697b696e5e24d0679f133183a3bb0852025377c2 Author: Dave Airlie Date: Fri Jan 30 09:59:49 2015 +1000 config/udev: Respect seat assignments when assigned devices Jonathan Dieter posted a few patches to do this inside the Xorg server but it makes no sense to do it there, just have the code we use to probe the device list at startup check seat assignments using the same code we check at hotplug time. Bugilla: https://bugzilla.redhat.com/show_bug.cgi?id=1183654 Reviewed-by: Peter Hutterer Acked-by: Hans de Goede Tested-by: Jonathan Dieter Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit df1b401f57ad4b4925bad66684445b476562f26f Author: Dave Airlie Date: Wed Jan 7 09:19:27 2015 +1000 randr: attempt to fix primary on slave output (v2) If the user wants to set one of the slave devices as the primary output, we shouldn't fail to do so, we were returning BadMatch which was tripping up gnome-settings-daemon and bad things ensues. Fix all the places we use primaryOutput to work out primaryCrtc and take it into a/c when slave gpus are in use. v2: review from Aaron, fix indent, unhide has_primary from macro. I left the int vs Bool alone to be consistent with code below, a future patch could fix both. Signed-off-by: Dave Airlie Reviewed-by: Aaron Plattner Signed-off-by: Keith Packard commit 62fcd364ac8c71a2db1db84b17b17cade6832492 Author: Adel Gadllah Date: Sat Jan 3 21:12:25 2015 +0100 dri2: Set vdpau driver name if ddx does not provide any driver name Currently when the ddx does not set any driver name we set DRI2 driver but not the VDPAU driver name. The result is that VDPAU drivers will not get found by libvdpau when the modesetting driver is being used. Just assume that the VDPAU driver matches the DRI2 driver name, this is true for nouveau, r300, r600 and radeonsi i.e all VDPAU drivers currently supported by mesa. Signed-off-by: Adel Gadllah Reviewed-by: Alex Deucher Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit fe4c774c572e3f55a7417f0ca336ae1479a966ad Author: Nikhil Mahale Date: Sat Jan 24 17:06:59 2015 -0800 os: Fix timer race conditions Fixing following kind of race-conditions - WaitForSomething() | ----> // timers -> timer-1 -> timer-2 -> null while (timers && (int) (timers->expires - now) <= 0) // prototype - DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev) DoTimer(timers, now, &timers) | | ----> OsBlockSignals(); .... OS Signal comes just before blocking it, .... timer-1 handler gets called. // timer-1 gets served and scheduled again; // timers -> timer-2 -> timer-1 -> null .... *prev = timer->next; timer->next = NULL; // timers -> null // timers list gets corrupted here and timer-2 gets removed from list. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=86288 Signed-off-by: Nikhil Mahale Reviewed-by: Julien Cristau v2: Apply warning fixes from Keith Packard Reviewed-by: Aaron Plattner Signed-off-by: Aaron Plattner Signed-off-by: Keith Packard commit 58f28b0427f0a0c0c445f314bd42721ca8e1e844 Author: Keith Packard Date: Fri Jan 23 10:59:39 2015 -0800 Update to version 1.16.99.902 Signed-off-by: Keith Packard commit fef2f6357b40b238ae01c4c80b0d29b17b839686 Author: Jason Ekstrand Date: Tue Jan 13 15:08:38 2015 -0800 modesetting: Return the crtc for a drawable even if it's rotated All of our checks for what crtc we are on take rotation into account so we select the correct crtc. The only problem is that we weren't returning it we were rotated. This caused X to think DRI3 apps were not on any crtc and limit them to 1 FPS. Signed-off-by: Jason Ekstrand Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 3dcd591fa9b71a3dce58d612ca5970209d8386eb Author: Jason Ekstrand Date: Tue Jan 13 15:08:37 2015 -0800 modesetting: Add support for using RandR shadow buffers This replaces the stubs for shadow buffer creation/allocation with actual functions and adds a shadow_destroy function. With this, we actually get shadow buffers and RandR now works properly. Most of this is copied from the xf86-video-intel driver and modified for modesetting. v2 Jason Ekstrand : - Fix build with --disable-glamor - Set the pixel data pointer in the pixmap header for dumb shadow bo's - Call drmmode_create_bo with the right bpp v2 Jason Ekstrand : - Make shadow buffers per-crtc and leave shadow_enable alone Signed-off-by: Jason Ekstrand Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 7c656bfcae1d68aeffd5e202b3c1569885f5d13d Author: Jason Ekstrand Date: Tue Jan 13 15:08:36 2015 -0800 modesetting: Add drmmode_bo_has_bo and drmmode_bo_map helper function Signed-off-by: Jason Ekstrand Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b4703a5a6e529b78810db8d8782317f0b4e2f265 Author: Jason Ekstrand Date: Tue Jan 13 15:08:35 2015 -0800 modesetting: Refactor drmmode_glamor_new_screen_pixmap The original drmmode_glamor_new_screen_pixmap function was specific to the primary screen pixmap. This commit pulls the guts out into a new, more general, drmmode_set_pixmap_bo function for setting a buffer on a pixmap. The new function also properly tears down the glamor bits if the buffer being set is NULL. The drmmode_glamor_new_screen_pixmap function is now just a 3-line wrapper around drmmode_set_pixmap_bo. v2 Jason Ekstrand : - Re-arranged code in drmmode_set_pixmap_bo and drmmode_glamor_handle_new_screen_pixmap so that glamor_set_screen_pixmap only gets called for the screen pixmap - Guard the call to glamor_set_screen_pixmapa with a drmmode->glamor check Signed-off-by: Jason Ekstrand Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit bb23fbf5bb278113c9c481875423b4d128180972 Author: Adam Jackson Date: Mon Jan 5 16:48:11 2015 -0500 dix: make RegionInit legal C++ The CVE fix in: commit 97015a07b9e15d8ec5608b95d95ec0eb51202acb Author: Alan Coopersmith Date: Wed Jan 22 22:37:15 2014 -0800 dix: integer overflow in RegionSizeof() [CVE-2014-8092 3/4] offended the C++ demons: ../../include/regionstr.h:147:45: error: invalid conversion from 'void*' to 'pixman_region16_data_t* {aka pixman_region16_data*}' [-fpermissive] Normally this isn't a problem, because around here we have the sense and common decency to not use C++, but this does make tigervnc fail to build, which is a little rude of us. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 082931014811e587a9734cbf4d88fd948979b641 Author: Chris Wilson Date: Sat Jan 17 10:09:54 2015 +0000 dri2: SourceOffloads may be for DRI3 only As a DDX may declare offload support without supporting DRI2 (because it is using an alternative acceleration mechanism like DRI3), when iterating the list of offload_source Screens to find a matching DRI2 provider we need to check before assuming it is DRI2 capable. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88514 Signed-off-by: Chris Wilson Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit f27d743c1899f307ec8063febbb3198c8945d372 Author: Carlos Olmedo Escobar Date: Wed Jan 21 01:44:54 2015 +0100 Avoid possible null pointer dereference. Signed-off-by: Carlos Olmedo Escobar Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 437d2ec5f250f8ab4b44cbae56f938719802e1cc Author: Carlos Sánchez de La Lama Date: Wed Jan 21 10:22:05 2015 +0100 randr: swap num-preferred field on RRGetOutputInfo reply Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88614 Signed-off-by: Carlos Sánchez de La Lama Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 3d12941b408de7a3bdc579e34e119f8aa81ea926 Author: Keith Packard Date: Thu Jan 22 22:28:34 2015 -0800 drivers/modesetting: Save current BlockHandler on return in msBlockHandler If the BlockHandler chain is modified while it is active, we need to re-fetch the current value and store it in our private for use the next time through. Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit b3e496c6d21058147de9a11b78860e73c74db3cb Author: Dave Airlie Date: Fri Jan 23 16:28:28 2015 +1000 glamor: use screen blockhandler rather than dix one (v3) This adds glamor into the block handler call chain in the correct place. This should fix interactions between glamor and drivers requiring damage from glamor. v2: okay don't consolidate, just leave things wierd for now remove blcokhandler in screen close. v3: block handler wrapping the right way. Signed-off-by: Dave Airlie Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 5af2f5b7d2f955586d0cb40eb30812f1893db22e Author: Markus Wick Date: Thu Jan 15 22:03:18 2015 +0100 xwayland: Set glamor filter to nearest glEGLImageTargetTexture2DOES only set the first level. Mesa handles this new texture as incomplete and renders a black screen. We also want to prevent linear filtering. https://bugs.freedesktop.org/show_bug.cgi?id=81800 Signed-off-by: Markus Wick Reviewed-and-Tested-by: Michel Dänzer Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 5f2e8ac51ccbf7c02f25c8cb7617df0238418cd1 Merge: 4e12d7b6f 430147950 Author: Keith Packard Date: Sat Jan 10 14:51:57 2015 +1300 Merge remote-tracking branch 'whot/for-keith' commit 4e12d7b6f4489fa06475465993a3e1e1d896390b Author: Jasper St. Pierre Date: Sun Jan 4 23:27:32 2015 -0800 modesetting: Update the cursor without hiding it In the new KMS APIs, the legacy drmModeSetCursor ioctl actually waits for a vblank after changing the cursor image before returning, meaning that the X server, in attempting to hide the cursor before updating its image, actually makes that hide *visible* for a full vblank. It's unknown why the X server does this by default, but turn it off. If we're with a legacy driver that doesn't support the modern drmModeSetCursor by waiting for a vblank before returning, we're going to get a tiny bit of tearing on the cursor plane. But between tearing with a new cursor image and tearing with a blank cursor image, I'd rather the former. The only proper solution to this is an atomic ioctl that page flips all planes, including the cursor plane, at vblank time and at the same time. Signed-off-by: Keith Packard Reviewed-by: Keith Packard commit 43014795087a0a8774dd9687f5967329b15f06a2 Author: Olivier Fourdan Date: Mon Jan 5 16:44:22 2015 +0100 Synchronize capslock in Xnest and Xephyr In Xnest or Xephyr, pressing CapsLock when focus is on another window does not update the state in the nested X server. This is because when synchronizing the lock modifier, sending a keypress or a key release only is not sufficient to toggle the state, unlike regular modifiers, one has to emulate a full press/release to lock or unlock the modifier. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 24b943132f90bc72ce8b5dc954fe9ee8484edfc2 Author: Olivier Fourdan Date: Fri Jan 2 18:50:17 2015 +0100 Fix subwindow in Xi emulated events Bug: 70790 Signed-off-by: Olivier Fourdan commit b058dec281568d6a9c5b5e230c20eed096cbdc6d Author: Peter Hutterer Date: Mon Jan 5 11:19:46 2015 +1000 mi: fix accidental x/y coordinate swap Reported-by: Adam Greenblatt Signed-off-by: Peter Hutterer Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 23a11fd85e12e94d29ee6d33715ac49684867b16 Author: Keith Packard Date: Sun Jan 4 19:13:35 2015 -0800 doc: Create a script to filter xmlto output This reduces the build log spam while still preserving the xmlto status to catch build failures correctly. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 1c01633877caa4239f901f02fbe113926318d030 Merge: 357385551 e774663fa Author: Keith Packard Date: Sun Jan 4 17:02:25 2015 -0800 Merge remote-tracking branch 'ajax/xserver-next' commit 3573855514557a518de40a93b3c578f28c7d9c2b Author: Olivier Fourdan Date: Wed Dec 3 13:49:37 2014 +0100 Remove explicit dependency on $(WAYLAND_LIBS) Xwayland Makefile explicitely set its dependencies on WAYLAND_LIBS. If the ibrairies are installed in a non-standard path, WAYLAND_LIBS contains '-L/path/to/the/lib' which will fail at build time with: "No rule to make target '-L/path/to/the/lib', needed by 'Xwayland'. Stop" Remove that explicit dependency to avoid the problem (LDADD ought to be enough to get the right libraries linked). Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit de89c6b8c6e81bad131c7f432e355cb42d233e87 Author: Peter Hutterer Date: Tue Dec 16 13:59:45 2014 +1000 xfree86: rename Xorg.bin to Xorg If the suid wrapper is enabled, /usr/bin/Xorg is just a shell script that execs either /usr/libexec/Xorg.bin directly or the Xorg.wrap binary which then execve's /usr/libexec/Xorg.bin. Either way, we end up with Xorg.bin, which is problematic for two reasons: * ps shows the command as Xorg.bin * _COMM and _EXE in systemd's journal will both show Xorg.bin as well There's not much we can do about the path, but having the actual command stay as Xorg means better compatibility to existing scripts. And, the reason for this path: the command journalctl _COMM=Xorg works universally, regardless of whether the wrapper is used or not. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Acked-by: Hans de Goede commit ee21be1324de1d6ef14e529fed7b75992e971beb Author: Peter Hutterer Date: Thu Dec 11 10:32:45 2014 +1000 dix: offset touch root coordinates by ScreenRec origins (#86655) For two ScreenRecs abs pointer positioning was working fine, but touch events stuck to the lower/right edge on any screen but the one with a 0/0 origin. Cause is a missing offset by the screen coordinates, causing the root coordinates in the event to desktop-wide, not screen-wide. Offset properly, just like we do for pointer events. X.Org Bug 86655 Signed-off-by: Peter Hutterer commit dc777c346d5d452a53b13b917c45f6a1bad2f20b Author: Keith Packard Date: Sat Jan 3 08:46:45 2015 -0800 dix: Allow zero-height PutImage requests The length checking code validates PutImage height and byte width by making sure that byte-width >= INT32_MAX / height. If height is zero, this generates a divide by zero exception. Allow zero height requests explicitly, bypassing the INT32_MAX check. Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith commit 924996c41c419dda0f02a96aafdf52f7670ff4ea Author: Michele Baldessari Date: Wed Dec 3 11:53:10 2014 -0500 ephyr: Implement per-screen colormaps Xephyr's pseudocolor emulation added in: commit 81a3b6fe27567b4f91033ece69996aa6bf8d01a3 Author: Matthew Allum Date: Mon Nov 8 22:39:47 2004 +0000 Add support to Xephyr for lower depths than hosts only tracks one global colormap for the whole (Xephyr) display. Move this to per-screen state so each screen's colormap can be correct. [ajax: rebased to 1.17, cleaned up commit message] Reviewed-by: Adam Jackson Signed-off-by: Michele Baldessari Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 7b076fdfc0e7a98430b6cb1c43079c137d7d3a6c Author: Carl Worth Date: Thu Dec 11 19:09:48 2014 -0800 os/xsha1.c: Add license and copyright attribution. I'm interested in copying this code to the mesa project, but before doing that it seems prudent to have the license and copyright attributions in place before copying that. To get this list of names I went through: git log -- os/xsha1.c and: git log -- render/glyph.c Signed-off-by: Keith Packard commit 66726064204b869a24e5a8dc6e24daa5acb92bab Author: Kenneth Graunke Date: Tue Dec 30 11:51:43 2014 -0800 modesetting: Fix build with --disable-glamor. present.c: In function 'ms_present_flush': present.c:204:9: error: implicit declaration of function 'glamor_block_handler' Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87858 Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt Reviewed-by: Jasper St. Pierre Reviewed-by: Rob Clark Signed-off-by: Keith Packard commit d723928870eea9fc2554abe137d6e57f7ad29e98 Author: Keith Packard Date: Sat Dec 27 09:11:33 2014 -0800 glamor: Fix nlines in glamor_xv_put_image when src_y is odd The number of lines of video to update in the texture needs to be computed from the height of the updated source, not the full height of the source. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 09230a2d435aa7f893ad5022220e3eb39ffb6db5 Author: Kenneth Graunke Date: Thu Dec 11 13:37:14 2014 -0800 modesetting: Add vblank synchronization support when using Present. modesetting hooked up vblank support for DRI2, but was missing support for vblanks in Present. This is mostly copy and pasted from Keith's code in the intel driver. v2: Use ms_crtc_msc_to_kernel_msc in ms_present_queue_vblank to hook up the vblank_offset workaround for bogus MSC values (which the DRI2 code already did). Also simplify the ms_present_get_crtc function. vblank.c already implements the functionality; we just need to convert types. v3: Fix ms_flush_drm_events return code. I'd copied code where 0 meant success into a function that returned a boolean, so the return code was always backwards. Also add DebugPresent calls in ms_present_vblank_{handler,abort}. Signed-off-by: Kenneth Graunke Reviewed-by: Keith Packard Tested-by: Jason Ekstrand Signed-off-by: Keith Packard commit 3b5be33fc55b3090d996014fa56603edb9c1d411 Author: Kenneth Graunke Date: Thu Dec 11 13:48:04 2014 -0800 modesetting: Include glamor.h from driver.h. We basically want it throughout the driver. Signed-off-by: Kenneth Graunke Reviewed-by: Keith Packard Tested-by: Jason Ekstrand Signed-off-by: Keith Packard commit 7d1fc04d27857c999bd732d54a0b36f5079449b8 Author: Kenneth Graunke Date: Thu Dec 18 17:58:18 2014 -0800 modesetting: Check DPMS mode in ms_covering_crtc(). crtc->enabled is insufficient; we should also make sure DPMS is on. Signed-off-by: Kenneth Graunke Reviewed-by: Keith Packard Tested-by: Jason Ekstrand Signed-off-by: Keith Packard commit 8affaade2c127ea08989c86e7d71cc9da3db1824 Author: Kenneth Graunke Date: Thu Dec 18 17:55:29 2014 -0800 modesetting: Track the CRTC's DPMS mode. We don't want to try to vblank synchronize to monitors which are off. In order to handle that properly, we need to know the CRTC's DPMS mode. Signed-off-by: Kenneth Graunke Reviewed-by: Keith Packard Tested-by: Jason Ekstrand Signed-off-by: Keith Packard commit b51f804b1ca826699296aff9de27d19257d78dae Author: Kenneth Graunke Date: Thu Dec 18 17:22:00 2014 -0800 present: If present_queue_vblank() fails, do present_execute(). Previously, if present_queue_vblank() failed, we simply dropped the present request on the floor, and returned an error. This was rather mean to clients - after presenting, they wait for a PresentComplete event to come back. But since the present never happens, they end up waiting forever, and lock up in poll(). This patch falls back to present_execute if present_queue_vblank fails. We still print a debugging message to warn when queueing fails, which allows us to continue debugging problems, but makes Present robust enough to not lock up people's compositing manager when vblank bugs happen. v2: Don't do present_queue_vblank() /and/ present_execute() (a bug that snuck in during last minute tidying). Signed-off-by: Kenneth Graunke Reviewed-by: Keith Packard Tested-by: Jason Ekstrand Signed-off-by: Keith Packard commit f9e22cefcb9684bf495ada3ec4b0231ab2dc6cff Author: Dima Ryazanov Date: Mon Dec 22 11:35:29 2014 -0800 Fix "Back", "Forward", and other special mouse buttons in XWayland. Currently, the indexes are off by 4 because of the scroll buttons. Signed-off-by: Dima Ryazanov Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 70a6f65f9e2b26ef7539dcacfcfea927bc1f13fd Author: Michel Dänzer Date: Thu Dec 25 11:42:03 2014 +0900 glamor: Make sure Xvideo source image data is properly aligned _glamor_upload_bits_to_pixmap_texture currently ignores the stride parameter, but __glamor_upload_pixmap_to_texture uses 4-byte alignment via glPixelStorei(GL_UNPACK_ALIGNMENT, 4). Also fix up the stride argument passed in though, in case it starts being used properly in the future. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87455 Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 11b85ab2fc944c0645df43180a6c7e2d6a06483a Author: Michel Dänzer Date: Wed Dec 24 11:46:46 2014 +0900 glamor: Make glamor_purge_fbo static Only called from glamor_fbo.c now. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 8323d2e90150bb86a12d00a16269c69a24efc896 Author: Michel Dänzer Date: Wed Dec 24 11:46:18 2014 +0900 glamor: Call glamor_pixmap_destroy_fbo from glamor_set_pixmap_private Calling glamor_purge_fbo directly was incorrect for large pixmaps. Fixes use-after free with large pixmaps: ==2029== Invalid write of size 8 ~ ==2029== at 0x85F93AD: __xorg_list_del (list.h:184) ==2029== by 0x85F93AD: xorg_list_del (list.h:204) ==2029== by 0x85F93AD: glamor_fbo_expire (glamor_fbo.c:280) ==2029== by 0x85F95CA: glamor_pixmap_fbo_cache_put (glamor_fbo.c:159) ==2029== by 0x85D7AB5: glamor_destroy_textured_pixmap (glamor.c:228) ==2029== by 0xC1BDDC4: radeon_glamor_destroy_pixmap (radeon_glamor.c:272) ==2029== by 0x519D00: damageDestroyPixmap (damage.c:1473) ==2029== by 0x4DD307: XvDestroyPixmap (xvmain.c:370) ==2029== by 0x4DB975: ShmDestroyPixmap (shm.c:258) ==2029== by 0x5098F6: FreePicture (picture.c:1425) ==2029== by 0x85E678E: glamor_composite_clipped_region (glamor_render.c:1558) ==2029== by 0x85F763A: glamor_composite_largepixmap_region (glamor_largepixmap.c:1347) ==2029== by 0x85E7964: _glamor_composite (glamor_render.c:1679) ==2029== by 0x85E7A38: glamor_composite (glamor_render.c:1758) ==2029== Address 0x1141d3c0 is 0 bytes inside a block of size 64 free'd ==2029== at 0x4C29E90: free (vg_replace_malloc.c:473) ==2029== by 0x85D7167: glamor_set_pixmap_private (glamor.c:570) ==2029== by 0xC1BDDC4: radeon_glamor_destroy_pixmap (radeon_glamor.c:272) ==2029== by 0x519D00: damageDestroyPixmap (damage.c:1473) ==2029== by 0x4DD307: XvDestroyPixmap (xvmain.c:370) ==2029== by 0x4DB975: ShmDestroyPixmap (shm.c:258) ==2029== by 0x45B246: doFreeResource (resource.c:875) ==2029== by 0x45BD5E: FreeResource (resource.c:905) ==2029== by 0x43444B: ProcFreePixmap (dispatch.c:1422) ==2029== by 0x43856E: Dispatch (dispatch.c:432) ==2029== by 0x43C96F: dix_main (main.c:298) ==2029== by 0x6CFAB44: (below main) (libc-start.c:287) Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 0d37c7e4b5d63308a60ca59c9de981b380af8689 Author: Keith Packard Date: Fri Dec 19 18:40:19 2014 -0800 modesetting: Detect whether damage tracking is needed Call drmModeDirtyFB and check the return value to detect whether the driver support for damage tracking is present, only initialize it in that case. Signed-off-by: Keith Packard Reviewed-by: Jason Ekstrand commit 7804305673ca63720e8736c0c88afa711ebe208a Author: Keith Packard Date: Fri Dec 19 19:34:34 2014 -0800 modesetting: Fix damage tracking auto-disable code dispatch_dirty_region was only returning -EINVAL error codes, otherwise it would return 0. The kernel returns -ENOSYS when the driver doesn't support damage tracking, so dispatch_dirty would never see the error and never disable damage tracking. Pass all errors back from dispatch_dirty_region and let dispatch_dirty deal with them. Signed-off-by: Keith Packard Reviewed-by: Jason Ekstrand commit 826e7c2b36f192fbbe7ddff37eb559f4d6301146 Author: Alan Coopersmith Date: Wed Dec 17 20:50:02 2014 -0800 Solaris: Move shared declarations to xf86_OSlib.h Gets rid of gcc 4.8 warnings: xf86AutoConfig.c:211:9: warning: nested extern declaration of 'xf86SolarisFbDev' [-Wnested-externs] sun_VTsw.c:44:1: warning: no previous prototype for 'xf86VTRelease' [-Wmissing-prototypes] sun_VTsw.c:59:1: warning: no previous prototype for 'xf86VTAcquire' [-Wmissing-prototypes] and ensures caller & definition stay in sync. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit bebcac0cf790b220e849e8905139d0744a606928 Author: Alan Coopersmith Date: Wed Dec 17 20:50:01 2014 -0800 Move RTLD_DI_SETSIGNAL code into a separate block to quiet warning Gets rid of gcc 4.8 warning: osinit.c:211:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 2c7111235ca5c3bd23cd824589dfbc0ebd477585 Author: Keith Packard Date: Sat Dec 13 22:22:30 2014 -0800 modesetting: Enable Xv when using glamor This just calls the existing function to create the relevant Xv adaptor and hook it up. Signed-off-by: Keith Packard Reviewed-by: Alex Deucher commit 5a541bd5e7adc9fdcc1883558be9218f82a284e0 Author: Keith Packard Date: Tue Dec 16 23:14:34 2014 -0800 modesetting: [v2] Don't re-enable the cursor when loading the image Hidden cursors also have their image updated; re-enabling the cursor each time the image is set will cause it to re-appear. * Unifies the code that was in drmmode_load_cursor_argb and drm_mode_show_cursor and moves it to a new drmmode_set_cursor * Add a new boolean, 'cursor_up', to the per-crtc private data to track whether the cursor should be displayed. * Call drmmode_set_cursor from drm_mode_show_cursor and, if the cursor should be displayed, from drm_mode_load_cursor_argb. v2: Call drmModeSetCursor2 when loading a new cursor image if the cursor should be displayed. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit 0f5fdaf600bfeada966aea942cb3e347d4efee30 Author: Michel Dänzer Date: Thu Dec 11 16:50:40 2014 +0900 glamor: Make sure glamor_egl_close_screen wraps glamor_close_screen The other way around fails to destroy the screen pixmap EGL image: ==1782== 80 (32 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 981 of 2,171 ==1782== at 0x4C28C20: malloc (vg_replace_malloc.c:296) ==1782== by 0xF9D4BD2: dri2_create_image_from_dri (egl_dri2.c:1264) ==1782== by 0xF9D4BD2: dri2_create_image_dma_buf (egl_dri2.c:1764) ==1782== by 0xF9D4BD2: dri2_create_image_khr (egl_dri2.c:1798) ==1782== by 0xF9C7937: eglCreateImageKHR (eglapi.c:1494) ==1782== by 0x85D5655: _glamor_egl_create_image (glamor_egl.c:134) ==1782== by 0x85D5655: glamor_egl_create_textured_pixmap (glamor_egl.c:302) ==1782== by 0x85D579B: glamor_egl_create_textured_screen (glamor_egl.c:225) ==1782== by 0xC1BE05D: radeon_glamor_create_screen_resources (radeon_glamor.c:67) ==1782== by 0xC1B6153: RADEONCreateScreenResources_KMS (radeon_kms.c:258) ==1782== by 0x4B2105: xf86CrtcCreateScreenResources (xf86Crtc.c:709) ==1782== by 0x43C823: dix_main (main.c:223) ==1782== by 0x6CFAB44: (below main) (libc-start.c:287) Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit c8d4c0a25dba49d1486761438b96374672b29645 Author: Michel Dänzer Date: Thu Dec 11 16:50:39 2014 +0900 glamor: Make glamor_destroy_textured_pixmap idempotent For robustness against drivers which may call both glamor_(egl_)destroy_textured_pixmap and glamor_destroy_pixmap. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 0355e280a39dee68981b2cbebfa2573cfde2f5bd Author: Michel Dänzer Date: Thu Dec 11 16:50:38 2014 +0900 glamor: Make glamor_set_pixmap_private not crash if the pixmap has no fbo Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 45b333525e4626523f2b3b7bb360404b6366750d Author: Michel Dänzer Date: Thu Dec 11 16:50:37 2014 +0900 glamor: Fix use-after-free in glamor_destroy_textured_pixmap ==25551== Invalid read of size 8 ==25551== at 0x85D5F2C: glamor_egl_destroy_pixmap_image (glamor_egl.c:527) ==25551== by 0x85D7750: glamor_destroy_pixmap (glamor.c:235) ==25551== by 0xC1BDD9B: radeon_glamor_destroy_pixmap (radeon_glamor.c:278) ==25551== by 0x5098F6: FreePicture (picture.c:1425) ==25551== by 0x85DD7A9: glamor_unrealize_glyph_caches (glamor_glyphs.c:257) ==25551== by 0x85D7B50: glamor_close_screen (glamor.c:586) ==25551== by 0x4B1A82: xf86CrtcCloseScreen (xf86Crtc.c:734) ==25551== by 0x4CFFC7: CursorCloseScreen (cursor.c:187) ==25551== by 0x513A44: AnimCurCloseScreen (animcur.c:106) ==25551== by 0x51529B: present_close_screen (present_screen.c:64) ==25551== by 0x43CA83: dix_main (main.c:351) ==25551== by 0x6CFAB44: (below main) (libc-start.c:287) ==25551== Address 0x83dafa0 is 96 bytes inside a block of size 152 free'd ==25551== at 0x4C29E90: free (vg_replace_malloc.c:473) ==25551== by 0x85D76B4: glamor_destroy_textured_pixmap (glamor.c:225) ==25551== by 0x85D7750: glamor_destroy_pixmap (glamor.c:235) ==25551== by 0xC1BDD9B: radeon_glamor_destroy_pixmap (radeon_glamor.c:278) ==25551== by 0x5098F6: FreePicture (picture.c:1425) ==25551== by 0x85DD7A9: glamor_unrealize_glyph_caches (glamor_glyphs.c:257) ==25551== by 0x85D7B50: glamor_close_screen (glamor.c:586) ==25551== by 0x4B1A82: xf86CrtcCloseScreen (xf86Crtc.c:734) ==25551== by 0x4CFFC7: CursorCloseScreen (cursor.c:187) ==25551== by 0x513A44: AnimCurCloseScreen (animcur.c:106) ==25551== by 0x51529B: present_close_screen (present_screen.c:64) ==25551== by 0x43CA83: dix_main (main.c:351) Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 913416b718e73e7416c2128a82d2e5e5cd962d28 Author: Alan Coopersmith Date: Tue Dec 9 10:15:08 2014 -0800 Solaris: delete undocumented, unuseful -protect0 flag Solaris already makes the page at address 0 inaccessible by default to catch NULL pointer bugs, we don't need a double secret undocumented flag to try to make our own hacky attempt at it. As a bonus, deleting this code removes gcc warning of: sun_init.c: In function 'xf86OpenConsole': sun_init.c:103:17: warning: declaration of 'fd' shadows a previous local [-Wshadow] int fd = -1; ^ sun_init.c:89:9: warning: shadowed declaration is here [-Wshadow] int fd; ^ Signed-off-by: Alan Coopersmith Reviewed-by: Mark Kettenis Signed-off-by: Keith Packard commit 7b784df51bd6be38238d7101b1f5e320eb4aa5b8 Author: Kenneth Graunke Date: Tue Dec 9 12:43:57 2014 -0800 modesetting: Use GBM for buffer allocations if Glamor supports it. For performance, Glamor wants to render to tiled buffers, not linear ones. Using GBM allows us to pick the 3D driver's preferred tiling modes. v2: Declare drmmode->gbm as void * if !GLAMOR_HAS_GBM. v3: Just use a forward declaration of struct gbm_device. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit cfef64b0cabe7677c7584a72d7432c20343d9361 Author: Dave Airlie Date: Tue Dec 9 12:28:38 2014 -0800 glamor: Add an accessor for the GBM device. (Originally written by Dave Airlie; split into a separate patch by Kenneth Graunke.) Signed-off-by: Dave Airlie Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit 980535757d38db5c812c8afa32726d8cc36abfa4 Author: Kenneth Graunke Date: Tue Dec 9 15:20:44 2014 -0800 modesetting: Create a drmmode_bo wrapper; use it for front_bo. This code is going to be extended to support GBM BOs soon. This small abstraction removes a lot of direct dumb_bo access, so we can add that support in one place, rather than putting conditionals at every pitch/handle/etc access. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit c6388964b079b3828c0b64951ff03008dda8f44a Author: Kenneth Graunke Date: Tue Dec 9 11:26:39 2014 -0800 modesetting: Drop dumb_bo::map_count field and dead unmap code. The drm kernel API for dumb BOs apparently doesn't include an unmap ioctl, so we can't do much here. It looks like this code was copied from libkms, which was also unfinished. We may as well delete the dead variable that simply gets incremented and never read. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit 87cc0c0d317c5eac4fcf9bf4a7ad36454c05f6b8 Author: Kenneth Graunke Date: Tue Dec 9 11:17:30 2014 -0800 modesetting: Move dumb_bo into its own source files. Eventually, drmmode_display will be able to use GBM for handling buffers, and won't need dumb_bo. Keeping the display related logic and buffer object abstraction in separate files seems a bit tidier. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit af4f94b08eb8e5961799a8a74a06449fd3fe8ad9 Author: Kenneth Graunke Date: Tue Dec 9 15:18:39 2014 -0800 modesetting: Create helper for glamor_egl_create_textured_screen call. This will need to change when we add GBM support; by pulling it into a helper function, we should only have to edit one place. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit b4324c6a2382dc96295bdb061316f699e4ffabb9 Author: Kenneth Graunke Date: Tue Dec 9 14:38:39 2014 -0800 modesetting: Move ModifyPixmapHeader calls out of if/else branches. Both branches called ModifyPixmapHeader with essentially the same parameters. By using new_pixels in the shadowfb case, we can make them completely the same, and move them out a level, for simplicity. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit 35e9924484ec7bafb749c88ed7f78e6a71f8dfb3 Author: Kenneth Graunke Date: Tue Dec 9 13:01:09 2014 -0800 modesetting: Stop using glamor_egl_create_textured_screen_ext(). The _ext variant takes an additional pointer argument, which it now ignores, thanks to Keith's recent patches. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit 91651e7c15892aa846fc406fbb13b37f094dd3f0 Author: Michel Dänzer Date: Wed Dec 10 16:21:44 2014 +0900 glamor: Reinstate glamor_(egl_)destroy_textured_pixmap They are part of the ABI. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit e774663fa5209ff469d920821934bb1f5964a72f Author: Michele Baldessari Date: Wed Dec 3 11:30:29 2014 -0500 ephyr: Implement per-screen colormaps Xephyr's pseudocolor emulation added in: commit 81a3b6fe27567b4f91033ece69996aa6bf8d01a3 Author: Matthew Allum Date: Mon Nov 8 22:39:47 2004 +0000 Add support to Xephyr for lower depths than hosts only tracks one global colormap for the whole (Xephyr) display. Move this to per-screen state so each screen's colormap can be correct. [ajax: rebased to 1.17, cleaned up commit message] Reviewed-by: Adam Jackson Reviewed-by: Eric Anholt Signed-off-by: Michele Baldessari commit cadd70c809232c9a6601fb8baab665a7ab10045d Author: Adam Jackson Date: Tue Dec 2 14:52:35 2014 -0500 glx: Add hack for GLX-1.2-style naked windows to GetDrawableAttributes Some people like to call this on bare Window XIDs and expect reasonable results. I sure wish they wouldn't, but since they do, if we're given a window without any glx decoration just fill in as much as we can. This means you won't actually get an answer for GLX_FBCONFIG_ID and friends, but there's not much to be done about that, and it matches what NVIDIA's driver seems to do. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54080 Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit f452b4a47b3bebf883e84df804e8d54830ccfe83 Author: Adam Jackson Date: Tue Dec 2 14:47:45 2014 -0500 glx: Dynamically compute attribute slot in GetDrawableAttributes No functional change. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c1455f76c6b1aa4ecaacb2221a687244285aa44b Author: Neil Roberts Date: Mon Dec 1 16:06:17 2014 -0500 glx: Add implementation of __GLXContext->loseCurrent for direct ctxts This adds a dummy implementation for the loseCurrent function in __GLXContext for direct contexts which just returns GL_TRUE. Without this then the X server can crash if receives a MakeCurrent message for a direct context because it will attempt to call loseCurrent when cleaning up the client in the callback for ClientStateGone. [ajax: added assumed s-o-b line] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86531 Reviewed-by: Adam Jackson Signed-off-by: Neil Roberts Signed-off-by: Keith Packard commit 6704bb0ed7a10dabe8ef3bb3adf8b8a7f29a78f0 Merge: 8aa23f27c 1559a9439 Author: Keith Packard Date: Tue Dec 9 11:47:11 2014 -0800 Merge remote-tracking branch 'alanc/master' commit 1559a94395258fd73e369f1a2c98a44bfe21a486 Author: Keith Packard Date: Tue Dec 9 09:31:00 2014 -0800 dix: GetHosts bounds check using wrong pointer value [CVE-2014-8092 pt. 6] GetHosts saves the pointer to allocated memory in *data, and then wants to bounds-check writes to that region, but was mistakenly using a bare 'data' instead of '*data'. Also, data is declared as void **, so we need a cast to turn it into a byte pointer so we can actually do pointer comparisons. Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit 9802a0162f738de03585ca3f3b8a8266494f7d45 Author: Keith Packard Date: Tue Dec 9 09:30:59 2014 -0800 Missing parens in REQUEST_FIXED_SIZE macro [CVE-2014-8092 pt. 5] The 'n' parameter must be surrounded by parens in both places to prevent precedence from mis-computing things. Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit 61b17c0f10307e25e51e30e6fb1d3e3127f82d86 Author: Keith Packard Date: Tue Dec 9 09:30:58 2014 -0800 glx: Can't mix declarations and code in X.org sources [CVE-2014-8098 pt. 9] We're using compiler compatibility settings which generate warnings when a variable is declared after the first statement. Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit b20912c3d45cbbde3c443e6c3d9e189092fe65e1 Author: Keith Packard Date: Tue Dec 9 09:30:57 2014 -0800 dbe: Call to DDX SwapBuffers requires address of int, not unsigned int [CVE-2014-8097 pt. 2] When the local types used to walk the DBE request were changed, this changed the type of the parameter passed to the DDX SwapBuffers API, but there wasn't a matching change in the API definition. At this point, with the API frozen, I just stuck a new variable in with the correct type. Because we've already bounds-checked nStuff to be smaller than UINT32_MAX / sizeof(DbeSwapInfoRec), we know it will fit in a signed int without overflow. Signed-off-by: Keith Packard Signed-off-by: Alan Coopersmith commit 8aa23f27c7e29c62d23867440b0bb00fc288b5ba Author: Keith Packard Date: Mon Dec 8 12:59:31 2014 -0800 glamor: Free existing EGL image when assigning new one When reallocating the framebuffer on screen resize, the old EGL image was getting leaked. Check for an existing EGL image and free it in this case. Signed-off-by: Keith Packard Revewied-by: Zhigang Gong commit c22433d55ea16e4879b092ee28d284fc895c9956 Author: Keith Packard Date: Fri Dec 5 11:02:11 2014 -0800 glamor: Remove redundant reference to screen pixmap EGL image There's no reason to store this in the egl screen private as the screen pixmap will always hold a reference to it anyways. Signed-off-by: Keith Packard Revewied-by: Zhigang Gong commit 5064ffab631dcbc4265079fb32a02d3e2f1c4cd8 Author: Keith Packard Date: Fri Dec 5 10:58:28 2014 -0800 glamor: Always destroy EGL image associated with destroyed pixmap There were three paths that called eglDestroyImageKHR: * The front buffer * The intel driver's flip buffer * pixmaps under DRI3 This patch unifies the second two by having glamor_destroy_pixmap always destroy any associaged EGL image. This allows us to stop storing the back_pixmap pointer in glamor as that was only used to make sure that buffer was freed at server reset time. v2: check for valid pixmap_priv before using it in glamor_egl_destroy_pixmap_image Signed-off-by: Keith Packard Reviewed-by: Zhigang Gong commit 7e7630bbb775573eea2a2335adb9d190c3e1e971 Author: Robert Morell Date: Wed Nov 12 18:51:43 2014 -0800 glx: Fix mask truncation in __glXGetAnswerBuffer [CVE-2014-8093 6/6] On a system where sizeof(unsigned) != sizeof(intptr_t), the unary bitwise not operation will result in a mask that clears all high bits from temp_buf in the expression: temp_buf = (temp_buf + mask) & ~mask; Signed-off-by: Robert Morell Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit e883c170c15493ab3637c0a01890f5a7ca4e16a5 Author: Adam Jackson Date: Mon Nov 10 12:13:48 2014 -0500 glx: Pass remaining request length into ->varsize (v2) [CVE-2014-8098 8/8] v2: Handle more multiplies in indirect_reqsize.c (Julien Cristau) Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 984583a497c813df5827ae22483133e704fee79c Author: Adam Jackson Date: Mon Nov 10 12:13:47 2014 -0500 glx: Length checking for non-generated single requests (v2) [CVE-2014-8098 7/8] v2: Fix single versus vendor-private length checking for ARB_imaging subset extensions. (Julien Cristau) v3: Fix single versus vendor-private length checking for ARB_imaging subset extensions. (Julien Cristau) Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Julien Cristau Signed-off-by: Alan Coopersmith commit 44ba149f28ece93c2fbfc9cc980588de5322dd4b Author: Adam Jackson Date: Mon Nov 10 12:13:46 2014 -0500 glx: Length-checking for non-generated vendor private requests [CVE-2014-8098 6/8] Reviewed-by: Keith Packard Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit afe177020d1fb776c6163f21eddc82cb185b95ca Author: Adam Jackson Date: Mon Nov 10 12:13:45 2014 -0500 glx: Request length checks for SetClientInfoARB [CVE-2014-8098 5/8] Reviewed-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit c91e4abc3b892f42802efa20fef7ada442c2d3f5 Author: Adam Jackson Date: Mon Nov 10 12:13:44 2014 -0500 glx: Top-level length checking for swapped VendorPrivate requests [CVE-2014-8098 4/8] Reviewed-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit a33a939e6abb255b14d8dbc85fcbd2c55b958bae Author: Adam Jackson Date: Mon Nov 10 12:13:43 2014 -0500 glx: Length checking for RenderLarge requests (v2) [CVE-2014-8098 3/8] This is a half-measure until we start passing request length into the varsize function, but it's better than the nothing we had before. v2: Verify that there's at least a large render header's worth of dataBytes (Julien Cristau) Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 698888e6671d54c7ae41e9d456f7f5483a3459d2 Author: Adam Jackson Date: Mon Nov 10 12:13:42 2014 -0500 glx: Integer overflow protection for non-generated render requests (v3) [CVE-2014-8093 5/6] v2: Fix constants in __glXMap2fReqSize (Michal Srb) Validate w/h/d for proxy targets too (Keith Packard) v3: Fix Map[12]Size to correctly reject order == 0 (Julien Cristau) Reviewed-by: Keith Packard Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit be09e0c988ffdb0371293af49fb4ea8f49ed324a Author: Julien Cristau Date: Mon Nov 10 12:13:41 2014 -0500 glx: Length checking for GLXRender requests (v2) [CVE-2014-8098 2/8] v2: Remove can't-happen comparison for cmdlen < 0 (Michal Srb) Reviewed-by: Adam Jackson Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Julien Cristau Signed-off-by: Alan Coopersmith commit 2a5cbc17fc72185bf0fa06fef26d1f782de72595 Author: Adam Jackson Date: Mon Nov 10 12:13:40 2014 -0500 glx: Add safe_{add,mul,pad} (v3) [CVE-2014-8093 4/6] These are paranoid about integer overflow, and will return -1 if their operation would overflow a (signed) integer or if either argument is negative. Note that RenderLarge requests are sized with a uint32_t so in principle this could be sketchy there, but dix limits bigreqs to 128M so you shouldn't ever notice, and honestly if you're sending more than 2G of rendering commands you're already doing something very wrong. v2: Use INT_MAX for consistency with the rest of the server (jcristau) v3: Reject negative arguments (anholt) Reviewed-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 13d36923e0ddb077f4854e354c3d5c80590b5d9d Author: Adam Jackson Date: Mon Nov 10 12:13:39 2014 -0500 glx: Fix image size computation for EXT_texture_integer [CVE-2014-8098 1/8] Without this we'd reject the request with BadLength. Note that some old versions of Mesa had a bug in the same place, and would _send_ zero bytes of image data; these will now be rejected, correctly. Reviewed-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 717a1b37767b41e14859e5022ae9e679152821a9 Author: Adam Jackson Date: Mon Nov 10 12:13:38 2014 -0500 glx: Additional paranoia in __glXGetAnswerBuffer / __GLX_GET_ANSWER_BUFFER (v2) [CVE-2014-8093 3/6] If the computed reply size is negative, something went wrong, treat it as an error. v2: Be more careful about size_t being unsigned (Matthieu Herrb) v3: SIZE_MAX not SIZE_T_MAX (Alan Coopersmith) Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit ab2ba9338aa5e85b4487bc7fbe69985c76483e01 Author: Adam Jackson Date: Mon Nov 10 12:13:37 2014 -0500 glx: Be more strict about rejecting invalid image sizes [CVE-2014-8093 2/6] Before this we'd just clamp the image size to 0, which was just hideously stupid; if the parameters were such that they'd overflow an integer, you'd allocate a small buffer, then pass huge values into (say) ReadPixels, and now you're scribbling over arbitrary server memory. Reviewed-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 23fe7718bb171e71db2d1a30505c2ca2988799d9 Author: Adam Jackson Date: Mon Nov 10 12:13:36 2014 -0500 glx: Be more paranoid about variable-length requests [CVE-2014-8093 1/6] If the size computation routine returns -1 we should just reject the request outright. Clamping it to zero could give an attacker the opportunity to also mangle cmdlen in such a way that the subsequent length check passes, and the request would get executed, thus passing data we wanted to reject to the renderer. Reviewed-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit f4afd53f2aeaddf509bf9f71d1716dd273fd6e14 Author: Alan Coopersmith Date: Sun Feb 9 22:42:47 2014 -0800 Add REQUEST_FIXED_SIZE testcases to test/misc.c Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 2df83bb122debc3c20cfc3d3b0edc85cd0270f79 Author: Alan Coopersmith Date: Sun Feb 9 21:28:05 2014 -0800 Add request length checking test cases for some Xinput 2.x requests Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit d153a85f7478a7a67ccb02fbca6390b0ab1732ee Author: Alan Coopersmith Date: Sun Feb 9 21:27:27 2014 -0800 Add request length checking test cases for some Xinput 1.x requests Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit a0ece23a8bd300c8be10812d368dc8058c97c63e Author: Alan Coopersmith Date: Sun Jan 26 20:02:20 2014 -0800 xfixes: unvalidated length in SProcXFixesSelectSelectionInput [CVE-2014-8102] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 5d3a788aeb2fbd3ca2812747dc18c94a8b981c63 Author: Alan Coopersmith Date: Sun Jan 26 19:51:29 2014 -0800 render: unvalidated lengths in Render extn. swapped procs [CVE-2014-8100 2/2] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit b5f9ef03df6a650571b29d3d1c1d2b67c6e84336 Author: Julien Cristau Date: Tue Oct 28 10:30:04 2014 +0100 render: check request size before reading it [CVE-2014-8100 1/2] Otherwise we may be reading outside of the client request. Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit 3df2fcf12499ebdb26b9b67419ea485a42041f33 Author: Alan Coopersmith Date: Sun Jan 26 19:38:09 2014 -0800 randr: unvalidated lengths in RandR extension swapped procs [CVE-2014-8101] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit d155b7a8e38e74aee96bf52c20c8b6a330d7d462 Author: Alan Coopersmith Date: Sun Jan 26 19:33:34 2014 -0800 present: unvalidated lengths in Present extension procs [CVE-2014-8103 2/2] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Julien Cristau commit 0a6085aaf3581cca558d960ea176ddf3a41a2213 Author: Alan Coopersmith Date: Sun Jan 26 19:28:05 2014 -0800 dri3: unvalidated lengths in DRI3 extension swapped procs [CVE-2014-8103 1/2] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 32a95fb7c7dbe22c9441c62762dfa4a8ec54d6c3 Author: Alan Coopersmith Date: Sun Jan 26 19:23:17 2014 -0800 Xv: unvalidated lengths in XVideo extension swapped procs [CVE-2014-8099] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 7553082b9b883b5f130044f3d53bce2f0b660e52 Author: Alan Coopersmith Date: Sun Jan 26 17:18:54 2014 -0800 xcmisc: unvalidated length in SProcXCMiscGetXIDList() [CVE-2014-8096] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 73c63afb93c0af1bfd1969bf6e71c9edca586c77 Author: Alan Coopersmith Date: Sun Jan 26 10:54:41 2014 -0800 Xi: unvalidated lengths in Xinput extension [CVE-2014-8095] Multiple functions in the Xinput extension handling of requests from clients failed to check that the length of the request sent by the client was large enough to perform all the required operations and thus could read or write to memory outside the bounds of the request buffer. This commit includes the creation of a new REQUEST_AT_LEAST_EXTRA_SIZE macro in include/dix.h for the common case of needing to ensure a request is large enough to include both the request itself and a minimum amount of extra data following the request header. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 2ef42519c41e793579c9cea699c866fee3d9321f Author: Alan Coopersmith Date: Wed Jan 22 23:12:04 2014 -0800 dbe: unvalidated lengths in DbeSwapBuffers calls [CVE-2014-8097] ProcDbeSwapBuffers() has a 32bit (n) length value that it uses to read from a buffer. The length is never validated, which can lead to out of bound reads, and possibly returning the data read from out of bounds to the misbehaving client via an X Error packet. SProcDbeSwapBuffers() swaps data (for correct endianness) before handing it off to the real proc. While doing the swapping, the length field is not validated, which can cause memory corruption. v2: reorder checks to avoid compilers optimizing out checks for overflow that happen after we'd already have done the overflowing multiplications. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 6692670fde081bbfe9313f17d84037ae9116702a Author: Alan Coopersmith Date: Wed Jan 22 23:40:18 2014 -0800 dri2: integer overflow in ProcDRI2GetBuffers() [CVE-2014-8094] ProcDRI2GetBuffers() tries to validate a length field (count). There is an integer overflow in the validation. This can cause out of bound reads and memory corruption later on. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Julien Cristau commit e0e11644622a589129a01e11e5d105dc74a098de Author: Alan Coopersmith Date: Wed Jan 22 23:44:46 2014 -0800 dix: integer overflow in REQUEST_FIXED_SIZE() [CVE-2014-8092 4/4] Force use of 64-bit integers when evaluating data provided by clients in 32-bit fields which can overflow when added or multiplied during checks. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 97015a07b9e15d8ec5608b95d95ec0eb51202acb Author: Alan Coopersmith Date: Wed Jan 22 22:37:15 2014 -0800 dix: integer overflow in RegionSizeof() [CVE-2014-8092 3/4] RegionSizeof contains several integer overflows if a large length value is passed in. Once we fix it to return 0 on overflow, we also have to fix the callers to handle this error condition v2: Fixed limit calculation in RegionSizeof as pointed out by jcristau. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Julien Cristau commit bc8e20430b6f6378daf6ce4329029248a88af08b Author: Alan Coopersmith Date: Mon Jan 6 23:30:14 2014 -0800 dix: integer overflow in GetHosts() [CVE-2014-8092 2/4] GetHosts() iterates over all the hosts it has in memory, and copies them to a buffer. The buffer length is calculated by iterating over all the hosts and adding up all of their combined length. There is a potential integer overflow, if there are lots and lots of hosts (with a combined length of > ~4 gig). This should be possible by repeatedly calling ProcChangeHosts() on 64bit machines with enough memory. This patch caps the list at 1mb, because multi-megabyte hostname lists for X access control are insane. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit eeae42d60bf3d5663ea088581f6c28a82cd17829 Author: Alan Coopersmith Date: Wed Jan 22 21:11:16 2014 -0800 dix: integer overflow in ProcPutImage() [CVE-2014-8092 1/4] ProcPutImage() calculates a length field from a width, left pad and depth specified by the client (if the specified format is XYPixmap). The calculations for the total amount of memory the server needs for the pixmap can overflow a 32-bit number, causing out-of-bounds memory writes on 32-bit systems (since the length is stored in a long int variable). Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 90cc925c5991fcb203f72d00b04419cd754a9b2c Author: Alan Coopersmith Date: Fri Jan 17 18:54:03 2014 -0800 unchecked malloc may allow unauthed client to crash Xserver [CVE-2014-8091] authdes_ezdecode() calls malloc() using a length provided by the connection handshake sent by a newly connected client in order to authenticate to the server, so should be treated as untrusted. It didn't check if malloc() failed before writing to the newly allocated buffer, so could lead to a server crash if the server fails to allocate memory (up to UINT16_MAX bytes, since the len field is a CARD16 in the X protocol). Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 3e7218a6c23354d66f508b18164cac98a346b3ee Merge: 6f4c398a0 bc71081f0 Author: Keith Packard Date: Mon Dec 8 18:07:55 2014 -0800 Merge remote-tracking branch 'jturney/indirect-glx-fixes' commit 6f4c398a0e632b0c92e3cb8ee03ca7f5b5cc018e Merge: aae646069 5920433c3 Author: Keith Packard Date: Mon Dec 8 18:04:08 2014 -0800 Merge remote-tracking branch 'jturney/master' commit aae6460694ac3667abb8c34fdf3a7dae524827a4 Author: Mario Kleiner Date: Sat Dec 6 05:40:08 2014 +0100 present: Fix use of vsynced pageflips and honor PresentOptionAsync. (v4) Pageflips for Pixmap presents were not synchronized to vblank on drivers with support for PresentCapabilityAsync, due to some missing init for vblank->sync_flips. The PresentOptionAsync flag was completely ignored for pageflipped presents. Vsynced flips only worked by accident on the intel-ddx, as that driver doesn't have PresentCapabilityAsync support. On nouveau-ddx, which supports PresentCapabilityAsync, this always caused non-vsynced pageflips with pretty ugly tearing. This patch fixes the problem, as tested on top of XOrg 1.16.2 on nouveau and intel. v4: Add additional PresentCapabilityAsync caps check, as suggested by Eric Anholt. Please also apply to XOrg 1.17 and XOrg 1.16.2 stable. Applying on top of XOrg 1.16.2 requires cherry-picking commit 2051514652481a83bd7cf22e57cb0fcd40333f33 which trivially fixes lack of support for protocol option PresentOptionCopy - get two bug fixes for the price of one! Signed-off-by: Mario Kleiner Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 32d3100bd78efe41d468f7d66861296aee468b6f Author: Mario Kleiner Date: Sat Dec 6 05:40:07 2014 +0100 present: Avoid crashes in DebugPresent(), a bit more info. DebugPresent() crashed the server when a dri3 drawable was closed while a pageflipped present was still pending, due to vblank->window-> Null-Ptr deref, so debug builds caused new problems to debug. E.g., glXSwapBuffers(...); glXDestroyWindow(...); -> Pageflip for non-existent window completes -> boom. Also often happens when switching desktop compositor on/off due to Present unflips, or when logging out of session. Also add info if a Present is queued for copyswap or pageflip, if the present is vsynced, and the serial no of the Present request, to aid debugging of pageflip and vsync issues. The serial number is useful as Mesa's dri3/present backend encodes its sendSBC in the serial number, so one can easily correlate server debug output with Mesa and with the SBC values returned to actual OpenGL client applications via OML_sync_control and INTEL_swap_events extension, makes debugging quite a bit more easy. Please also cherry-pick this for a 1.16.x stable update. Signed-off-by: Mario Kleiner Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 32ca85c9e075e40b8a4712a79a51702facba0332 Author: Daniel Martin Date: Fri Nov 28 11:20:50 2014 +0100 modesetting: Remove unused params from drmmode_output_init() drmmode_output_init() doesn't touch (the int*) num_dvi and num_hdmi. Remove both parameters. Signed-off-by: Daniel Martin Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit c0ea476b9bb91f03061b891ffb897c438fa03879 Author: Daniel Martin Date: Fri Nov 28 11:20:49 2014 +0100 modesetting: Fix ifdefs s/HAVE_UDEV/CONFIG_UDEV_KMS/ We don't define HAVE_UDEV, that's a remnant from xf86-video-modesetting. But, we have CONFIG_UDEV_KMS. Signed-off-by: Daniel Martin Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 8a16620dcd7a22fd9b38876ffc711629c4fbda0a Author: Daniel Martin Date: Fri Nov 28 11:20:48 2014 +0100 modesetting: Create new EGL screen in drmmode_xf86crtc_resize If we don't glamor_egl_create_textured_screen_ext() in drmmode_xf86crtc_resize() we end up with a black screen and no client window(s) visible. Signed-off-by: Daniel Martin Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 0d63fa5850fe9d8b045b8f1a83e72b75f9065a7a Author: Daniel Martin Date: Fri Nov 28 11:20:47 2014 +0100 modesetting: Move Bool glamor into drmmode struct Move the boolean glamor from struct modesetting into struct drmmode for later re-use in drmmode_display. Signed-off-by: Daniel Martin Reviewed-by: Eric Anholt Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 62a4eeaa25099872682d6c2f9f13a0e73fc5ce1e Author: Daniel Martin Date: Fri Nov 28 11:20:46 2014 +0100 config/udev: Prefix and shift "removing GPU" message The message "removing GPU device ..." appeared even if the removal was skipped (when path == NULL). Move it below the path check and make it a LogMessage with config/udev prefix. Signed-off-by: Daniel Martin Reviewed-by: Eric Anholt Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit bc71081f0e3d8ce3aecf2cb168431dbc9fe6a87b Author: Jon TURNEY Date: Fri Apr 18 12:17:06 2014 +0100 glx: Fix crash when a client exits without deleting GL contexts With the previous patches applied, we now have crash due to use-after-free when a client exits without deleting all it's GL contexts On client exit, CloseDownClient first calls glxClientCallback() with ClientStateGone, which calls __glXFreeContext() directly. Subsequently CloseDownClient() frees all the clients resources, which leads to ContextGone() being called for a context resource where the context has already been freed. Fix this by modifiying glxClientCallback() to free the context resource. Also make __glXFreeContext() static, as calling it directly leads to this problem, instead the context resource should be released. With the previous patches applied, this can be demonstrated with e.g. glxinfo, which doesn't delete it's context before exit. Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 5c606c0a89e74fa223a99864be11cc3be60a159b Author: Jon TURNEY Date: Fri Apr 18 12:17:05 2014 +0100 glx: Flush context which is being made non-current due to drawable going away Some sequences of glean tests fail with GLXBadCurrentWindow when using indirect rendering, e.g. glean -t 'fpexceptions getString'. Flush a context which is being made non-current due to the drawable on which is it is current going away. Waiting until another context is made current is too late, as the drawable no longer exists. v2: Rewrite for direct GL dispatch v3: Inline FlushContext(), doesn't need to be a separate function e.g. LIBGL_ALWAYS_INDIRECT=1 ./glean -r results -o --quick -t "fpexceptions getString" fails with a BadContextTag error. Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 437b27494f127854d75e59b4e2aac264e9f913e9 Author: Jon TURNEY Date: Fri Apr 18 12:17:04 2014 +0100 Revert "glx: Simplify glXDestroyContext" This reverts commit 7f5adf73a0f9a951a6df201532b4031d38054369. This seems to miss the whole point of the idExists flag, as it makes the lifetime of that being true the same as the lifetime of the Context resource. The previously current context tag is always given in a MakeContextCurrent request, even if that context tag is no longer valid (for example, the context has been deleted), so this leads to BadContextTag errors. See fd.o bug #30089 for the makecurrenttest.c testcase, and some discussion of previous manifestations of this bug. Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 4b0d0df34f10a88c10cb23dd50087b59f5c4fece Author: Peter Harris Date: Mon Nov 17 14:31:24 2014 -0500 Fix overflow of ConnectionOutput->size and ->count When (long) is larger than (int), and when realloc succeeds with sizes larger than INT_MAX, ConnectionOutput->size and ConnectionOutput->count overflow and become negative. When ConnectionOutput->count is negative, InsertIOV does not actually insert an IOV, and FlushClient goes into an infinite loop of writev(fd, iov, 0) [an empty list]. Avoid this situation by killing the client when it has more than INT_MAX unread bytes of data. Signed-off-by: Peter Harris Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 802932d112a3f6a09420be9e4a13fa78ac43840b Author: Adam Jackson Date: Mon Nov 17 15:28:58 2014 -0500 render: fix ChangePicture when Xinerama is active (v2) (#49170) ChangePicture takes wire XIDs, but didn't do any Xinerama translation, which meant setting a clip pixmap or a separate alpha picture would result in those elements pointing at the instance of the pixmap on screen 0. Which is, you know, bad. v2: This one actually builds. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49170 Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit c2994001680a7dcf9c167886d49b7326c97cd5d1 Author: Aaron Plattner Date: Fri Nov 21 08:39:02 2014 -0800 os: "Server terminated successfully" is not an error ErrorFSigSafe calls LogVMessageVerbSigSafe with the message type set to X_ERROR. That generates this in the log: (EE) Server terminated successfully (0). Closing log file. People periodically report this as an error, sometimes quoting this "error" rather than an earlier error that actually caused a problem. v2: Use X_INFO instead of X_NOTICE Signed-off-by: Aaron Plattner Reviewed-by: Keith Packard Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit b09d59342804db7dbb8056dca43dd39f54e290aa Author: Alan Coopersmith Date: Wed Nov 26 13:01:29 2014 -0800 Add -iglx & +iglx to Xserver.man Covers the current state after commits 99f0365b1fbdfd9238b9f, d0da0e9c3bb8fe0cd4879, & e3aa13b8d63ea2fba6eb4 were all applied. Signed-off-by: Alan Coopersmith Reviewed-by: James Jones Reviewed-by: Robert Morell Signed-off-by: Keith Packard commit c52a2b1ebad56820af932dfbc871701a8b04fd9c Author: Adam Jackson Date: Tue Nov 11 12:30:07 2014 -0500 mi: Fix regression in arc drawing xts' XDrawArcs/15 regressed (turning into a server-side infinite loop) after: commit 7679afd4da8b86aed27e5916ba723116a3c8bb4a Author: Adam Jackson Date: Fri Sep 26 12:01:37 2014 -0400 mi: Fold mifpolycon.c into miarc.c The reason is miarc.c provided its own definitions (sigh) of min/max, that both accept int arguments and return an int. Since miFillSppPoly uses a double (sigh) and some min-involving math for its loop index variable, things do not go well. Since the integer versions of min/max are redundant, nuke 'em. Signed-off-by: Adam Jackson Reviewed-by: Aaron Plattner Tested-by: Keith Packard Signed-off-by: Keith Packard commit ec0ac8970b508adcbc3d104b14a127118e4979d0 Merge: 65cc0982a 0f88d4e79 Author: Keith Packard Date: Mon Nov 24 15:39:51 2014 -0800 Merge remote-tracking branch 'whot/for-keith' commit 65cc0982afb1d47d17e655efaef40d4a82e7574a Author: Keith Packard Date: Mon Oct 13 10:31:52 2014 -0700 glamor: Don't insert fbos from external objects into fbo cache Mark fbos created from external buffers so that when the associated pixmap is destroyed, they aren't put into the fbo cache for later re-use and are instead freed immediately. Signed-off-by: Keith Packard Reviewed-by: Alex Deucher commit 0f88d4e7937116dbc438f98ddf1f3d94cfc5bead Author: Peter Hutterer Date: Wed Nov 12 10:29:36 2014 +1000 mi: fix documentation for miPointerSetPosition Changed when we added barriers, documentation didn't get updated. Reported-by: Dave Airlie Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 6a117af7e7ef6eac796ff0680a915c866fce4019 Author: John Hunter Date: Mon Nov 3 15:45:38 2014 +0800 fix an annotation mistake Signed-off-by: John Hunter Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 732fd7e571b81d63aa44d6e4cf55883479e88f2f Author: Peter Hutterer Date: Fri Oct 31 09:45:12 2014 +1000 Drop trailing whitespaces sed -i "s/[ ]\+$//g" **/*.(c|h) happy reviewing... git diff -w is an empty diff. Signed-off-by: Peter Hutterer commit 96143d6dc35c98cb6b4e409dd89687e4ced3c1f0 Author: Peter Hutterer Date: Fri Oct 31 09:32:35 2014 +1000 dix: silence compiler warning comparing CARD32 to -1 window.c:3246:36: warning: comparison of constant -1 with expression of type 'CARD32' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare] if (optional->backingBitPlanes != ~0L) ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~ Signed-off-by: Peter Hutterer Reviewed-by: Michel Dänzer commit 04ca16997994c7561ed8948b89fc1c922233da13 Author: Peter Hutterer Date: Fri Oct 31 09:29:33 2014 +1000 dix: silence compiler warning inpututils.c:243:26: warning: comparison of constant 256 with expression of type 'KeyCode' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare] if (modkeymap[i] >= MAP_LENGTH) ~~~~~~~~~~~~ ^ ~~~~~~~~~~ MAP_LENGTH depends on MAX_BUTTONS which is somewhat arbitrarily chosen. We don't expect this to ever change, but just in case leave the condition there so the code is correct if we drop the number down. Signed-off-by: Peter Hutterer commit 79b9d33545034f2952ebc7e444c201693b45f44b Author: Peter Hutterer Date: Fri Oct 31 09:26:28 2014 +1000 xwayland: declare fatal log handler as noreturn xwayland.c:661:1: warning: function 'xwl_log_handler' could be declared with attribute 'noreturn' [-Wmissing-noreturn] Signed-off-by: Peter Hutterer commit adee4f239b5074d318dfc48beb0ec4e91973b449 Author: Peter Hutterer Date: Fri Oct 31 09:24:50 2014 +1000 xfree86: drop double-typedef of DBusConnection Just include dbus.h, it's been typedef'd there since 2003. Signed-off-by: Peter Hutterer commit 25315ee555dfeb96d9ed83064b1022ed852b612e Author: Peter Hutterer Date: Fri Oct 31 09:16:28 2014 +1000 Xext: fix clang compiler warning shm.c:1150:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((shmdesc->addr == ((char *) -1))) { Signed-off-by: Peter Hutterer commit 995ecfb51d4ab8197e4591d5c0957e08a0bd6a59 Author: Peter Hutterer Date: Thu Oct 30 09:00:21 2014 +1000 include: change RegionSize() to take a size_t /usr/include/xorg/regionstr.h:130:36: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec))); ^ ~ Really only just pushes the problem to the caller, but maybe that motivates someone to fix it. Signed-off-by: Peter Hutterer commit 3ccec1b5ba6a26a30f82ba3aa9c5218dfa336869 Author: Peter Hutterer Date: Thu Oct 30 08:56:55 2014 +1000 include: fix documentation for list.h Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 5920433c3a30f5f1c0ba1ab39a0c2ff388df6b23 Author: Colin Harrison Date: Sat Sep 27 11:50:11 2014 +0100 hw/xwin: Don't allocate one wchar_t too much for unicode text placed on the Windows clipboard The count of wchar_t returned by MultiByteToWideChar() includes the terminating null character, so don't add one to it. Also, reduce the scope of various length variables Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit d172cd630dae9c991b84b4c367a4caf8199266ac Author: Jon TURNEY Date: Mon Apr 28 12:48:15 2014 +0100 hw/xwin: Fix hang on shutdown when we own the clipboard. If we are the clipboard owner when we are shutdown, we recieve a WM_RENDERALLFORMATS, to render the clipboard, so it's contents will remain available to other applications. Unfortunately, this is far too late to do anything useful with, as the server is waiting for the clipboard thread to exit, and so can't process requests to convert clipboard contents. Change so we just do nothing on WM_RENDERALLFORMATS. (I'm not convinced that WM_RENDERALLFORMATS has ever worked usefully, in any case). (To make this work, I guess we would need to rearrange the way shutdown works completely: first synchronously stop the clipboard, then stop the X server) We also then receive a WM_DRAWCLIPBOARD, perhaps telling us that the available clipboard formats have changed (as ones which haven't been rendered are now removed), but the clipboard owner is now the system, not us, which we have to arrange to ignore. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 94d433c8cb64c9167050d02473176f888decf1d8 Author: Jon TURNEY Date: Fri Feb 21 23:20:00 2014 +0000 hw/xwin: Fix clipboard thread restart It seems that the clipboard thread restart mechanism has been broken for a while, which can be demonstrated using XDMCP with KDM (e.g. to a Kubutunu 12.04 host) KDM kills all attached clients, including the clipboard integration client, which restarts, but then exits on WM_QUIT. Using PostQuitMessage() in WM_DESTROY is unhelpful, as we may not actually be quitting the thread, if we just destroyed the window because the clipboard thread is about to retry, because he WM_QUIT message sticks around, and is noticed the next time we look at the window message queue and confuses us into thinking we need to quit. Sending a WM_DESTROY is apparently never correct anyhow, see [1] So: 1/ Use DestroyWindow() to destroy the clipboard messaging window when cleaning up for retry or exit in winClipboardProc (the clipboard thread main proc) 2/ Send a special WM_WM_QUIT message in winClipboardWindowDestroy() from the X server thread when the X server is resetting. 3/ When processing that WM_WM_QUIT message in the clipboard thread, cause the clipboard window to PostQuitMessage(), which causes the clipboard thread to exit. [1] http://blogs.msdn.com/b/oldnewthing/archive/2011/09/26/10216420.aspx Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b4a08e642b977b4bbc892ff1d96ecc0cf6e2ca54 Author: Jon TURNEY Date: Thu Nov 21 15:18:48 2013 +0000 hw/xwin: Improve reliability of clipboard X->Windows pastes Sometimes, particularly with large clipboard pastes to Windows, we could end up waiting for the timeout to expire, rather than pasting the data. Various changes to improve reliability: 1. Use XFlush() not XSync() in winProcessXEventsTimeout(). It makes no sense to ensure we have received replies to outstanding requests if we are going to wait for them using select() 2. Add XFlush() to winClipboardProc() Make sure we have sent any requests before we wait using select() 3. Don't use FD_ISSET() to check which fd is ready This looks like a Cygwin select() bug in that it sometimes returns 0 with an empty fd set before the timeout expires, but a fd appears to be ready. Add select() return value to debug output when we are warning that this has happened. 4. Drain event queues before entering select() Unconditionally drain event queues before entering select(). This seems to be the recommended way of writing select() and X event processing loops. winClipboardFlushXEvents() checks using XPending(), and winClipboardFlushWindowsMessageQueue() checks using PeekMessage() so this is safe against blocking, but means that may not need to enter select() at all sometimes. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c03f9e23c2b75af410b2fc76ca3f1aa9e979dcc4 Author: Jon TURNEY Date: Tue Sep 24 15:09:22 2013 +0100 hw/xwin: Add controls for enabling/disabling monitoring of PRIMARY selection xwinclip: Add -noprimary option Xwin: Add -primary and -noprimary options and tray-menu control v2: Use Bool type for fPrimarySelection Add -noprimary to usage message Fix indentation in hw/xwin/winwndproc.c Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 851b50419907276fdc781b6be2d42b38849bbd77 Author: Jon TURNEY Date: Tue Sep 24 16:02:37 2013 +0100 hw/xwin: Retrieve TARGETS to avoid unnecessary failing conversion attempts See http://cygwin.com/ml/cygwin-xfree/2013-07/msg00016.html It looks like the change in a9aca218f557c723e637287272819a7c17174e1e had some unforseen consequences. If the X11 selection contents are not convertable to COMPOUND_TEXT, UTF8_STRING or STRING format (for example, if it is an image), after those conversion attempts have failed, we sit in winProcessXEventsTimeout() until the timeout expires. It also seems that maybe gnuplot doesn't respond correctly to this sequence of conversion requests and doesn't reply to some of them, which also causes us to sit in winProcessXEventsTimeout() until the timeout expires. The Windows application which has requested the clipboard contents via GetClipboardContents() is blocked until we return from WM_RENDERFORMAT, so sitting waiting for this timeout to expire should be avoided. So instead, explicitly request conversion to the TARGETS target, choose the most preferred format, and request conversion to that. Also: if there is no owned selection, there is nothing to paste, so don't bother trying to convert it. v2: Fix compilation with -Werror=declaration-after-statement Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 4db1241037e3fe8f0a46888377b8fef40bae9065 Author: Jon TURNEY Date: Tue Sep 24 13:30:32 2013 +0100 hw/xwin: In SelectionNotify, don't pointlessly retrieve just the size of the property Don't pointlessly retrieve just the size of the property, if we are then going to assume we can retrieve the whole property in one request anyhow... Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c5ad92077e7eb32590fafa92d697cc4173f7e57b Author: Jon TURNEY Date: Tue Sep 24 12:23:42 2013 +0100 hw/xwin: In SelectionNotify, delete the property containing returned data after we have retrieved it Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit ff018d88b9f0fe23ba96c81b53d58532baf4df42 Author: Jon TURNEY Date: Thu Oct 2 14:10:50 2014 +0100 hw/xwin: Remove some redundant clipboard externs, now defined in winglobals.h Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 63bb5c5ef16edf652179770294dcca4fc07dc992 Author: Thierry Reding Date: Wed Oct 29 16:59:27 2014 +0100 xv: Add missing gcstruct.h include Commit ea3f3b0786d5 (xv: Move xf86 XV color key helper to core.) added code that uses internals of struct _GC. This structure is defined in the include/gcstruct.h header which wasn't included by the source file, only gc.h was. That caused the following build failure: CC xvmain.lo Xext/xvmain.c: In function 'XvFillColorKey': Xext/xvmain.c:1114:13: error: dereferencing pointer to incomplete type (*gc->ops->PolyFillRect) (pDraw, gc, nbox, rects); ^ Fix this by including the correct header file. Signed-off-by: Thierry Reding Tested-by: Keith Packard Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 882f2d10d99a04a96afc0ce0c8937e16bec3afb5 Author: Axel Davy Date: Wed Oct 29 13:31:42 2014 +0100 Fix present_notify to return right away when querying current or past msc. When the target msc is past or is the current one, we want to get immediate feedback. This patch fixes this behaviour. Signed-off-by: Axel Davy Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 72a0754f4605493fd60471557422f88a97eb356a Author: Aaron Plattner Date: Wed Oct 29 19:19:18 2014 -0700 xfree86: Bump ABI versions (video: 19, extension: 9) Among other things, commit b851ca968b7cce6d1a6438c05d3d5c8832249704 added a NameWindowPixmap function pointer to ScreenRec, shifting some of the fields around. Signed-off-by: Aaron Plattner Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b227d974569b4c315a72b85fe839c5f455396678 Author: Peter Hutterer Date: Thu Oct 30 08:54:11 2014 +1000 include: fix compiler warning about casting int to uint16_t /usr/include/xorg/misc.h:141:30: warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wconversion] return ((x & 0xff) << 8) | ((x >> 8) & 0xff); ~~~~~~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ Function sig is a uint16_t, so just force the cast. Signed-off-by: Peter Hutterer commit e9db7682028bb0464c211c1f7bb6983fcfb6f37b Author: Keith Packard Date: Tue Oct 28 21:32:24 2014 -0700 Update to version 1.16.99.901 1.17 RC1 Signed-off-by: Keith Packard commit 5ff74d68b0cce85e041251efdc76595eac3c89e4 Author: Keith Packard Date: Tue Oct 28 21:31:40 2014 -0700 xfree86: Include 'drivers' directory with distribution Even if we don't build it locally, make sure it gets included with the release. Signed-off-by: Keith Packard commit f36f16f0551aa091c1ff154875aebe3d29cf51e7 Author: Keith Packard Date: Tue Oct 28 21:30:23 2014 -0700 dri2: Distribute new pci_ids headers Create hw/xfree86/dri2/pci_ids/Makefile.am which includes all of the new pci id files in the tarballs. Build that from configure.ac, and run it from dri2/Makefile.am Signed-off-by: Keith Packard commit 65dd1ba7b3e00243a76ec691e566ef7c8dd94855 Author: Keith Packard Date: Wed Oct 22 14:48:10 2014 -0700 dix: Untwist transformAbsolute logic, eliminate uninitialized value warnings tranformAbsolute has a pretty simple job, that of running the X/Y values from a device through the transformation matrix. The tricky bit comes when the current device state doesn't include one of the values. In that case, the last delivered value is back-converted to device space and used instead. The logic was twisted though, confusing GCC's uninitialized value detection logic and emitting warnings. This has been fixed by changing the code to: 1) Detect whether the ValuatorMask includes X/Y values 2) If either are missing, back-convert the current values into ox/oy 3) When X/Y are present, set ox/oy to the current value 4) Transform 5) Store X/Y values if changed or if they were set before. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 0fbbdb37c87b5824729f65c7fbac05223024fd27 Author: Adam Jackson Date: Wed Oct 22 13:19:18 2014 -0400 composite: Wrap GetSpans GetSpans should flush composition from children to parent, just like GetImage and SourceValidate. Fortunately no one is likely to have noticed, since to hit this you're already deep into failure town. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit da70c7d556bbf21ad495c26e982e2e0f2d7de6c1 Author: Keith Packard Date: Wed Oct 22 14:27:26 2014 -0700 xkb: Initialize 'bad' Atom in _XkbSetNamesCheck When _XkbCheckAtoms returns NULL for an error, it always sets the error return code, but GCC can't figure that out, so just initialize the local variable, 'bad', in _XkbSetNamesCheck to eliminate the warning. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 2566835b4374edb3e5a8353d4f7c9e7ec4851c57 Author: Keith Packard Date: Wed Oct 22 14:24:55 2014 -0700 os: Eliminate uninitialized value warnings from access.c The ConvertAddr function doesn't reliably set the 'addr' return value, and so callers are getting flagged for using potentially uninitialized values. Initialize the value in the callers to NULL and then go ahead and check for NULL values before using them. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 1b94fd77792310c80b0a2bcf4bf6d4e4c4c23bca Author: Alex Orange Date: Fri Oct 3 15:41:38 2014 -0600 fb: Fix Bresenham algorithms for commonly used small segments. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=54168 Fix errors introducted in 863d528a9f76d0e8f122aebf19f8564a4c67a938. Said patch does indeed remove the problematic writes to bad memory, however it also introduces errors in the algoritm. This patch has the effect of reverting said patch and adding an if in the proper location to catch the out of bounds memory write without causing problems to the overall algorithm. Signed-off-by: Alex Orange Reviewed-by: Peter Harris Tested-by: Peter Harris Signed-off-by: Keith Packard commit ea5b2b0a2e2143ad1414fcbdc081b5d584588346 Author: Jon TURNEY Date: Tue Oct 21 15:03:55 2014 +0100 os: -displayfd should check ports up to 65535 -displayfd should check ports up to 65535 Noticed during https://cygwin.com/ml/cygwin-xfree/2014-07/msg00024.html Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 3a123fbdda56b24dc01a2308137144dc960e0d61 Merge: 9b29fa957 7ea4a21fe Author: Keith Packard Date: Mon Oct 27 15:39:26 2014 -0700 Merge remote-tracking branch 'jturney/master' Conflicts: hw/xwin/winpixmap.c Adam removed a pile of windows code, including this file. commit 9b29fa957a397664463c7c78fbcc2f34d1993271 Author: Chris Wilson Date: Thu Oct 16 14:09:08 2014 +0100 Xext/shm: Detach SHM segment after Pixmap is released The GPU may still have a reference to the SHM segment which would only be finally released when the Pixmap is destroy. So we can only detach the SHM segment (and thereby making the memory unaccessible) after the backend has had a chance to flush any remaining references. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85058 Signed-off-by: Chris Wilson Reported-and-tested-by: gedgon@gmail.com Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 5adc20179e9818d51e1cd79bfc8a8271786c3949 Author: Keith Packard Date: Mon Oct 27 15:28:14 2014 -0700 modesetting: Skip kernel work-around on error in crtc to kernel msc ms_crtc_msc_to_kernel_msc attempts to work around kernel inconsistencies in reporting msc values by comparing the expected value with the reported value. If the kernel fails to actually provide its current values, then just skip the work around steps as there's really nothing better we can do. Signed-off-by: Keith Packard commit 59b12c454d9c4b5a26c6ad87c53abc671b15ce37 Merge: 5574a0a07 cac4b064f Author: Keith Packard Date: Mon Oct 27 14:48:55 2014 -0700 Merge remote-tracking branch 'anholt/modesetting-dri2-no-pageflip' commit 5574a0a07e83ff989c074c44d3ea9db0a819f472 Author: Keith Packard Date: Mon Oct 27 13:38:21 2014 -0700 composite: Skip SetWindowPixmap when pixmap isn't changing Check the current window pixmap to see if it matches the new pixmap and avoid calling SetWindowPixmap in that case. x11perf -ucreate highlights an instance where compCreateWindow reassigns the same Pixmap to the Window. Currently this triggers an expensive invalidation of the entire window hierachy, making sure that DRI2 clients are kept informed of the handle changes. However, as the backing Pixmap for the Window is actually unchanged, there is no need to do anything in this case. Signed-off-by: Keith Packard Reviewed-by: Chris Wilson Tested-by: Chris Wilson commit df6a3a07f60c40bab2b59b9b3ba0c20c8fb7e95d Author: Yogish Kulkarni Date: Wed Oct 22 12:55:28 2014 +0530 Skip SetCursor when vtSema is FALSE. Consider below sequence - 1) Cursor is removed : isUp will be FALSE if HW cursor is set. 2) VT switched away from X : vtSema becomes FALSE. 3) xf86CursorSetCursor is called with non-null CursorPtr : Saves the passed in CursorPtr, fallbacks to SW cursor and invokes spriteFuncs->SetCursor which saves the area under cursor and restores the cursor. This sets isUp to TRUE and as vtSema is FALSE saved data is garbage. 4) VT switched to X : vtSema becomes TRUE. xf86Cursor enable fb access is called which will remove the SW cursor, i.e copies saved data in #3 to screen. This results to momentary garbage data on screen. Hence when !vtSema skip spriteFuncs->SetCursor. X.Org Bug 85313 Signed-off-by: Yogish Kulkarni Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit cac4b064f9f66435430f61568c6a516c54bf3c40 Author: Eric Anholt Date: Mon Dec 30 17:23:38 2013 -0800 modesetting: Add support for DRI2 with glamor. This is derived from the intel driver DRI2 code, with swapchain and pageflipping dropped, functions renamed, and vblank event management shared code moved to a vblank.c for reuse by Present. This allows AIGLX to load, which means that you get appropriate visuals exposed in GL, along with many extensions under direct-rendering that require presence in GLX (which aren't supported in glxdriswrast.c). v2: Drop unused header includes in pageflip.c, wrap in #ifdef GLAMOR. Drop triple-buffering, which was totally broken in practice (I'll try to fix this later). Fix up some style nits. Document the general flow of pageflipping and why, rename the DRI2 frame event type enums to reflect what they're for, and handle them in a single switch statement so you can understand the state machine more easily. v3: Drop pageflipping entirely -- it's unstable on my Intel laptop (not that the normal 2D driver is stable with pageflipping for me), and I won't get it fixed before the merge window. It now passes all of the OML_sync_control tests from Jamey and Theo (except for occasional warns in timing -fullscreen -divisor 2). v4: Fix doxygen at the top of vblank.c Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 7064b00d478646cb428e427df2d3f91d7022c582 Author: Eric Anholt Date: Mon Dec 30 00:25:37 2013 -0800 modesetting: Export two functions I want to reuse from DRI2/Present. This renames dumb_get_bo_from_handle(), since it wasn't using a handle (GEM terminology) but a dmabuf fd. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Reviewed-by: Alex Deucher commit 34a98c8103a6f725283d0d1ee4084bf387b93019 Author: Eric Anholt Date: Wed Oct 8 04:12:49 2014 -0700 dri2: Automatically fill in the driver name if the DDX doesn't provide it. This will be used by the modesetting driver to support DRI2 across all hardware that can support glamor, and could potentially be used by other drivers that have to support DRI2 on sets of hardware with multiple Mesa drivers. This logic is the same as what's present in the Mesa driver loader, except for the lack of nouveau_vieux support (which requires a predicate on the device). v2: Fix duplicated assignment of info->driverName. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 470d97e1d176981dbd8087c621e54caab0d6c73c Author: Eric Anholt Date: Tue Dec 31 13:52:49 2013 -0800 dri2: Import a copy of Mesa's PCI ID -> driver name mappings. This comes from Mesa commit acdcef6788beaa2a1532e13ff84c3e246b8025ed Previously, each driver had to tell DRI2 what GL driver object should be loaded. Originally for a 2D driver that was a matter of giving the constant string for the vendor name, same as the driver's name. For a driver that's trying to handle multiple generations of hardware with different Mesa driver filenames, the driver had to bake in a mapping from PCI ID to the appropriate driver name in Mesa, which seems like a pretty awful layering violation (and one that was fixed with DRI3) As of January, Mesa now handles the mapping from a DRI fd to the driver name on its own, but the AIGLX loader still relies on DRI2 for choosing the filename. Instead of propagating the PCI ID list from each 2D driver to the modesetting driver, import a central copy of the PCI ID list so that drivers can stop handling this themselves. (Some day, when AIGLX transitions to EGL, we can drop the DRI2 filename setup entirely). Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 839f05329ddb6f9b5b988edf3a2c3a1f856727f7 Author: Adam Jackson Date: Fri Feb 28 16:35:10 2014 -0500 dix: Retype and repack GC LP64: 160 bytes before, 128 after. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 73e2383b7350723256894c5076d0c731aec5cd1f Author: Adam Jackson Date: Fri Jun 20 13:31:20 2014 -0400 dix: Always store GC client clip as a region (v2) Again, this changes FixesCreateRegionFromGC to throw BadMatch when fed a GC with no client clip. v2: Fix Xnest and some variable names (Keith) Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit e7b9295551d55b42b416ba70cce11dae79ece5e7 Author: Adam Jackson Date: Fri Sep 26 13:41:59 2014 -0400 fb: Hide fbPush{Pattern,Fill} Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit e31d16a82d83738740f67743b759c006d9845e79 Author: Adam Jackson Date: Fri Sep 26 13:32:37 2014 -0400 fb: Hide fbDots Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 5db0f067ed4ff24c48cdb7998e4a52ad80037cb7 Author: Adam Jackson Date: Fri Sep 26 13:30:06 2014 -0400 fb: Hide Bresenham line details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit b184a863c111834e28564d963c0733a30833f128 Author: Adam Jackson Date: Tue Jul 8 12:23:48 2014 -0400 fb: Hide some zero-width line details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 266cd552bd54fd3e7a83ae7178a303285857631e Author: Adam Jackson Date: Tue Jul 8 12:13:13 2014 -0400 fb: Hide glyph implementation details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit e572bcc7f4236b7e0f23ab762f225b3bce37db59 Author: Adam Jackson Date: Mon Jun 23 15:24:35 2014 -0400 fb: Remove even/odd tile slow-pathing Again, clearly meant to be a fast path, but this turns out not to be the case. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 836bb27726441e048bb300664343a136bc596a5b Author: Adam Jackson Date: Tue Jun 17 12:25:42 2014 -0400 fb: Remove unused fbReduceRasterOp Appears to have been cargo-culted in from cfb and then never used. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 167ccd33e0d2c4bd68aebcdba5a512d24c5eb49a Author: Adam Jackson Date: Tue Jun 17 12:21:19 2014 -0400 fb: Move fbStipple*Bits near their only consumer And remove fbStippleTable since gcc can't figure that out itself. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 7430fdb689678b98ac63f5a8dad13719bac777e0 Author: Adam Jackson Date: Tue Dec 17 14:46:38 2013 -0500 fb: Remove even/odd stipple slow-pathing This is clearly meant to be a fast path, but it appears to be a net loss at this point. If you really wanted to ricer-tune here, note that the inner loop of fbBltOne is a bit too complicated for gcc (at least 4.8.2), it doesn't specialize the loop for the handful of legal values of bitsPerDst, which means computing at runtime what could have been const-propped. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a1983736853814d34450c0a0de1c4f6ee308423d Author: Adam Jackson Date: Tue Jun 17 11:24:06 2014 -0400 fb: FB_SHIFT is 5 (and FB_UNIT is 32) The other paths don't build or work, PCI and other buses are almost always 32 bit data paths, and X doesn't really support pixels bigger than that anyway. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 3d35bd6b79957a3441abd87a377f0beb058997ed Author: Adam Jackson Date: Mon Mar 24 12:01:54 2014 -0400 fb: Eliminate fbLaneTable, staticize fb{8,16,32}Lane gcc doesn't appear to be smart enough to fold away the indirection here, even if you make fbLaneTable const. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 86ce6262975a7d53d9331723beb49cbe7bd02b48 Author: Adam Jackson Date: Fri Sep 26 12:39:38 2014 -0400 mi: Fold micursor.c into mipointer.c Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 3b63900e90f44cf85a4d3391d23407b3bb6db52b Author: Adam Jackson Date: Fri Sep 26 12:34:15 2014 -0400 mi: Fold mipolyutil.c into mipoly.c Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 21b041ef48c49ff6fc06f6e4482ffe54cb763493 Author: Adam Jackson Date: Fri Sep 26 12:27:22 2014 -0400 mi: Fold mipoly{con,gen}.c into mipoly.c Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 7679afd4da8b86aed27e5916ba723116a3c8bb4a Author: Adam Jackson Date: Fri Sep 26 12:01:37 2014 -0400 mi: Fold mifpolycon.c into miarc.c Also put mifpoly.h on a diet, and stop including it from places that don't need it. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit f307ef10f4c33da4b5ae59800931741b0a431d75 Author: Adam Jackson Date: Mon Jul 21 17:22:07 2014 -0400 mi: Fold mispans.c into miwideline.c Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 707965407a3c907058b89610e73e02989fd0b552 Author: Adam Jackson Date: Fri May 23 12:10:29 2014 -0400 mi: Unexport arc fill implementation details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit ce8fff5cd681523088c14b97ce4fb6e4fb658321 Author: Adam Jackson Date: Fri May 23 12:06:03 2014 -0400 mi: Unexport subpixel polygon implementation details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a085ba82bde375b5c884a40b410b563815c58a9e Author: Adam Jackson Date: Fri May 23 11:55:05 2014 -0400 mi: Unexport span group implementation details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit c15c886ee70f9144bc4603b918310f229312aadc Author: Adam Jackson Date: Fri May 23 11:50:07 2014 -0400 mi: Unexport polygon edge table implementation details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 9bdc9b0113915de3d536b2b3f025915379c2126f Author: Adam Jackson Date: Fri May 23 11:21:28 2014 -0400 mi: Unexport wide line details XAA wanted these, once upon a time, but that's gone now. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit d181e52ceb9ae44e1faa8d5af8805f43328da6c2 Author: Keith Packard Date: Fri Oct 24 11:56:23 2014 -0700 glamor: Free converted bits in _glamor_upload_bits_to_pixmap_texture fast path When uploading bits to a texture which need reformatting to match a supported GL format, a temporary buffer is allocated to hold the reformatted bits. This gets freed in the general path, but is not freed in the fast path because that includes an early return before the call to free. This patch removes the early return and places the general case under an 'else' block, so that both paths reach the call to free. Signed-off-by: Keith Packard Reviewed-by: Alex Deucher commit 55b27ed70cf9dfa9b9dffe46e9a3191bfda38f7c Author: Andreas Hartmetz Date: Sat Oct 4 18:13:04 2014 +0200 glamor: Don't free memory we are going to use. glamor_color_convert_to_bits() returns its second argument on success, NULL on error, and need_free_bits already makes sure that "bits" aliasing converted_bits is freed in the success case. Looks like the memory leak that was supposed to be fixed in 6e50bfa706cd3ab884c933bf1f17c221a6208aa4 only occurred in the error case. Reviewed-by: Michel Dänzer Signed-off-by: Keith Packard commit 16a32c53f6e9ad1f3284d4596edfa33e9efb740e Author: Alan Coopersmith Date: Thu Oct 9 05:42:09 2014 -0700 If fork fails in System(), don't fallthrough to exec() In the unlikely event of a failure in creating processes, signal masks will fall from the panels above you. Secure your mask before telling your child what to do, since it won't exist, and you will instead cause the server itself to be replaced by a shell running the target program. Found by Coverity #53397: Missing break in switch Execution falls through to the next case statement or default; this might indicate a common typo. In System: Missing break statement between cases in switch statement (CWE-484) Signed-off-by: Alan Coopersmith Reviewed-by: Matthieu Herrb Signed-off-by: Keith Packard commit 7e5bc49d1ed2c78c321da79bdbc99b90c5f95b38 Author: Alan Coopersmith Date: Thu Oct 9 05:42:08 2014 -0700 Allocate enough room for both reset & flags attributes ctx_attribs had room for 3 pairs of attributes, but if both flags & reset attributes were being returned it was storing 4 pairs in the array. Found by Coverity #53442: Out-of-bounds write This could cause an immediate crash or incorrect computations. In create_driver_context: Out-of-bounds write to a buffer (CWE-119) Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit cffd4e4a4ee615d8583eae78b35017e0d1bfa4f0 Author: Adam Jackson Date: Thu Oct 9 09:58:06 2014 +0200 mi: Mark the span blit routines as _X_COLD On gcc, __attribute__((cold)) means: - consider calls to the function to be unlikely for branch prediction - optimize the function for size - emit the function in a dedicated cold text section It's not worth deleting these routines even though there are no longer in-tree consumers, but we can at least keep them out of i$ at runtime. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit de55aafa8f6a9e0dec364bec920d6f91ef2b39f0 Merge: 462bf87c4 c79f824bf Author: Keith Packard Date: Thu Oct 23 17:28:24 2014 -0700 Merge remote-tracking branch 'ajax/xwin' commit 462bf87c4d1c2211dd49a5ce62d01ff84ff33970 Author: Adam Jackson Date: Wed Oct 8 17:20:33 2014 +0200 render: Always store client clip as a region This does have one semantic change. FixesCreateRegionFromPicture used to throw BadImplementation if you tried to create a region from a picture with no client clip. I changed that to BadMatch here since that more honestly describes what's going on. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 3f4edd2e3ff84c38df563b09c2e8c32404db38f7 Author: Adam Jackson Date: Wed Oct 8 17:18:32 2014 +0200 xinerama: Fix access mode in GetImage's drawable lookup Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau Signed-off-by: Keith Packard commit 942e18e17e334d7a25f8c1dcc6f5c3711eeb6a7d Author: William ML Leslie Date: Wed May 21 10:28:52 2014 +1000 Xephyr: option to disable grabbing the host This patch makes it possible to use C-S key combinations within Xephyr without losing access to the host window manager's commands. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 7ea4a21feed5ac5e71cc6d8141c97d6362402c5d Author: Jon TURNEY Date: Fri Sep 19 13:37:50 2014 +0100 configure.ac: Force --disable-libdrm on Cygwin This is now needed to avoid trying to build the modesetting driver by default when building the Xorg DDX on Cygwin. http://tinderbox.x.org/builds/2014-09-18-0011/logs/xserver/#build Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 883927d2e8733f4070b2a8bcc5ec8cc2d7a661b3 Author: Jon TURNEY Date: Tue Sep 30 13:55:59 2014 +0100 configure.ac: Avoid "Your OS is unknown" warning when configuring for Cygwin Don't emit "Your OS is unknown" warning when configuring with --enable-xorg to build the XOrg DDX for Cygwin. The list of supported OSes is getting a bit unwieldy, so just remove it. Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 549b3175afc46cee6e1b61841f854a5272eaf1f7 Author: Jon TURNEY Date: Thu Oct 2 15:37:50 2014 +0100 hw/xwin: Fix unused variable warning in winCreateMsgWindow() winmsgwindow.c:99:11: warning: variable ‘winClass’ set but not used [-Wunused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5adfb566fe05bcf5f40b4adc1457862936d6d038 Author: Jon TURNEY Date: Fri Oct 3 14:22:30 2014 +0100 hw/xwin: Fix redundant declaration warning in winprefslex.l winprefslex.l:40:12: warning: redundant redeclaration of ‘yyparse’ [-Wredundant-decls] winprefsyacc.h:130:5: note: previous declaration of ‘yyparse’ was here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 8f062f73805765f5769dfd7b738c8dd10062fba6 Author: Jon TURNEY Date: Fri Oct 3 14:12:57 2014 +0100 hw/xwin: Fix warning in yyerror() winprefsyacc.y:257:3: warning: nested extern declaration of ‘yylineno’ [-Wnested-externs] Promote yylineno declaration to file scope Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit f0f0c92a08f0ccf5a7ac447d117eb0341fe136d6 Author: Jon TURNEY Date: Fri Oct 3 14:00:06 2014 +0100 hw/xwin: Fix const warning in winPrefsLoadPreferences() winprefs.c:643:14: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 593c6b19349538ec3b89bc48eb3f0bb4c0cebb23 Author: Jon TURNEY Date: Thu Oct 2 15:35:54 2014 +0100 hw/xwin: Fix const warnings in winprefsyacc.y winprefsyacc.y:174:5: warning: passing argument 1 of ‘AddMenuLine’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:67:13: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.y:174:5: warning: passing argument 3 of ‘AddMenuLine’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:67:13: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.y:175:5: warning: passing argument 3 of ‘AddMenuLine’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:67:13: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.y:178:5: warning: passing argument 3 of ‘AddMenuLine’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:67:13: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.c:1737:9: warning: passing argument 1 of ‘yyerror’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:82:12: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.c:1854:3: warning: passing argument 1 of ‘yyerror’ discards ‘const’ qualifier from pointer target type [enabled by default] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 394ad259596801860d32d531408a07b63e469427 Author: Jon TURNEY Date: Thu Oct 2 14:31:35 2014 +0100 hw/xwin: Fix const warning in winCheckDisplayNumber() InitOutput.c:1032:19: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 701492e5d9487545afeb5ebfcebccc0408ca7bc4 Author: Jon TURNEY Date: Thu Oct 2 14:30:56 2014 +0100 hw/xwin: Fix warning in winXIconToHICON() winmultiwindowicons.c:403:29: warning: passing argument 8 of ‘XGetWindowProperty’ from incompatible pointer type [enabled by default] /usr/include/X11/Xlib.h:2688:12: note: expected ‘Atom *’ but argument is of type ‘long unsigned int *’ Looks like this has been wrong since I added it in 527cf131 :-( Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a14f1d94d5bb87055f7e4812e9ef75771ea65bc5 Author: Jon TURNEY Date: Thu Oct 2 14:09:40 2014 +0100 hw/xwin: Fix format warnings with debug printing of pointers on 64-bit Fix various pieces of debug output, mainly under --enable-debug, which use a "%08x" printf format for a pointer type. Use "%p" format for 64-bit portability. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 03d462ddd2cacce92dc9e6bad00710d899509387 Author: Jon TURNEY Date: Thu Oct 2 12:04:20 2014 +0100 hw/xwin: Fix warnings in glx/glshim.c glext.h currently requires GL_GLEXT_PROTOTYPES in order to prototype glCompressedTexImmage* functions generated_gl_shim.c:2859:6: warning: no previous prototype for 'glCompressedTexImage3DARB' [-Wmissing-prototypes] generated_gl_shim.c:2866:6: warning: no previous prototype for 'glCompressedTexImage2DARB' [-Wmissing-prototypes] generated_gl_shim.c:2873:6: warning: no previous prototype for 'glCompressedTexImage1DARB' [-Wmissing-prototypes] generated_gl_shim.c:2880:6: warning: no previous prototype for 'glCompressedTexSubImage3DARB' [-Wmissing-prototypes] generated_gl_shim.c:2887:6: warning: no previous prototype for 'glCompressedTexSubImage2DARB' [-Wmissing-prototypes] generated_gl_shim.c:2894:6: warning: no previous prototype for 'glCompressedTexSubImage1DARB' [-Wmissing-prototypes] generated_gl_shim.c:2901:6: warning: no previous prototype for 'glGetCompressedTexImageARB' [-Wmissing-prototypes] Also, explicitly prototype glXGetProcAddressARB(), as glx/glxdri*.c does, as it's not practical to include glx.h here... Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 329e8125aa3b4c83121f8290a5436c2cb4c1cf96 Author: Jon TURNEY Date: Wed Oct 1 12:14:43 2014 +0100 hw/xwin: Fix compilation with -Werror=declaration-after-statement xevents.c: In function 'winClipboardInitMonitoredSelections': xevents.c:129:5: error: 'for' loop initial declarations are only allowed in C99 mode for (int i = 0; i < CLIP_NUM_SELECTIONS; ++i) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 97c3298caab7c5a5396fcbde02d862e5380d7d2e Author: Jon TURNEY Date: Wed Oct 1 12:02:04 2014 +0100 hw/xwin: Fix compilation with -Werror=return-type winshadddnl.c: In function ‘winRedrawScreenShadowDDNL’: winshadddnl.c:991:9: error: ‘return’ with no value, in function returning non-void [-Werror=return-type] Just wrong in 1c34e774 Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 61a292adf45405641de1c522a04c148e0a152acd Author: Keith Packard Date: Thu Oct 9 15:17:17 2014 +0200 glx: check return from __glXGetAnswerBuffer This function can return NULL; make sure every caller tests for that. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit d634ecdf82f244ff8ce75d351fc175792d254e5c Merge: 6622f0cb1 7ebf480f5 Author: Keith Packard Date: Thu Oct 9 15:08:31 2014 +0200 Merge remote-tracking branch 'ajax/dead-code' commit 6622f0cb1761501f3287ffa8d3cbca3fd30f9f0c Merge: f12e7f498 5ecd7866f Author: Keith Packard Date: Thu Oct 9 15:05:26 2014 +0200 Merge remote-tracking branch 'ajax/mi-cleanup' commit f12e7f4980416b74988052a04d0f2487b2c4a7e9 Merge: da887726e aaf5e2d64 Author: Keith Packard Date: Thu Oct 9 14:21:19 2014 +0200 Merge remote-tracking branch 'anholt/modesetting-glamor' commit da887726eeaece0396962dd3912578d3372881b1 Author: Alan Coopersmith Date: Sun Sep 21 09:49:06 2014 -0700 Use unique display name for each xi2 test program [v3] make -j 8 check was sporadically failing in different xi2 tests. After adding the asserts in the previous commit to catch xkb failure it became easier to catch the failures and see that multiple tests were running at once trying to write to /tmp/server-(null).xkm and then delete it, and interfering with each other. Putting a unique string into the display variable let them each write to their own file and not interfere with others. v2: Fix Linux bits: Add #include to get a declaration of program_invocation_name on Linux. Use only the last portion of the pathname so that the resulting display name doesn't contain any slashes. v3: use program_invocation_short_name on Linux This is the same as program_invocation_name, except is has stripped off any path prefix. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 5ecd7866f7587d620f000e802a262c7cd4b9df33 Author: Adam Jackson Date: Thu Sep 11 10:11:39 2014 -0400 misc: Fold together some redundant conditionals Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 5b07f1db6de9f08f757206454da03ee0ae872bfc Author: Adam Jackson Date: Thu Sep 18 16:05:40 2014 -0400 fb: fb{Map,Unmap}Window -> fb{Realize,Unrealize}Window Make the function names match the screen slot name. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 9ed83a694b6492c9db226b115ed282cb127e798e Author: Adam Jackson Date: Thu Sep 18 15:36:57 2014 -0400 mi: miSlideAndSizeWindow -> miResizeWindow Make the function name match the screen slot name. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 939ca767c7603923a91fd37901175a42e802d40e Author: Adam Jackson Date: Thu Sep 18 14:50:28 2014 -0400 dix: Remove an obfuscatory macro Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit d138d9ccc62a9472925574089f346bf9aa3dab1f Author: Adam Jackson Date: Mon Sep 15 13:05:24 2014 -0400 dix: Remove some pointless casting of NULL Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 277330075bfbd4343c4efdd136e0be716e1a491f Author: Adam Jackson Date: Mon Sep 15 12:30:44 2014 -0400 dix: Remove an empty if Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 81d76a835b2f647e3051b1d93606e59db7998d76 Author: Adam Jackson Date: Mon Sep 15 12:10:55 2014 -0400 dix: Lower backStorage to a bit instead of a pointer Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 322ba42c23a3a107f7a62fb1c449792b616e5eba Author: Adam Jackson Date: Mon Sep 15 12:05:26 2014 -0400 dix: Remove DIXsaveUnder bit from the Window Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 1e56b2dfc6377234ffdcdf206528d476b04d13af Author: Adam Jackson Date: Fri Sep 12 12:51:13 2014 -0400 mi: Move pScreen->SendGraphicsExpose up to dix No DDX is overriding this and it's fairly absurd to expose it as a screen operation anyway. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 5d3bd8a3dc6456ea1ccf7b5f71b972379d7565ec Author: Adam Jackson Date: Fri Sep 12 11:56:28 2014 -0400 mi: Drop plane argument from miHandleExposures This existed to be passed to the bs recovery routine; since we back all planes, we don't care. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 7eddc80bc4a6c1902746a9fbe79ab553f9fd5821 Author: Adam Jackson Date: Tue Aug 5 14:07:17 2014 -0400 mi: Simplify composite border clip redirection interface There's not really a good reason for mi to not just call the composite code directly. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 7b35dc9b1533d4b99a3f84f460ac66354a6fe347 Author: Adam Jackson Date: Tue Sep 23 10:35:37 2014 -0400 mi: Deobfuscate miOverlayWindowExposures Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit fb34f273481b90a90a988f0f5c5a2d642a5661b8 Author: Adam Jackson Date: Tue Sep 23 10:30:56 2014 -0400 mi: Deobfuscate miWindowExposures Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 0d30d44a8cdacfbc99d8193f76c133b803464622 Author: Adam Jackson Date: Thu Sep 11 12:44:54 2014 -0400 dix: Drop the third argument from WindowExposuresProcPtr A careful read shows that it was always NULL. It hasn't always been; as the DDX spec indicates, it was the "occluded region that has backing store", but since that backing store code is long gone, we can nuke it. mi{,Overlay}WindowExposures get slightly simpler here, and will get even simpler in just a moment. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit aaf5e2d643af590366b2d02ad1c2db05d1fc4131 Author: Eric Anholt Date: Sat Dec 28 11:32:10 2013 -0800 modesetting: Add support for rendering using glamor. By default modesetting now tries to enable X acceleration using glamor, but falls back to normal shadowfb if GL fails to initialize. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 6d41bdb23ca92803e3a51dc317d2b80cdb92f43a Author: Eric Anholt Date: Tue Aug 26 16:59:37 2014 -0700 modesetting: Deduplicate some scrn setup. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 20a3b482191711bc15be0410ccc3651924271349 Author: Eric Anholt Date: Wed Oct 8 00:41:13 2014 -0700 modesetting: Fix some weird formatting after x-indent-all.sh. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 3119acdab9eecff90b8fd9a265e2a456e7bc8779 Author: Eric Anholt Date: Wed Oct 8 00:39:15 2014 -0700 modesetting: Run x-indent-all.sh. As I was editing code, the top-level .dir-locals.el was making my new stuff conflict with the existing style. Make it consistently use the xorg style, instead. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit c79f824bf6617816aaf10393beec8dddfa591f7b Author: Adam Jackson Date: Thu Sep 25 15:49:26 2014 -0400 xwin: Remove primary DirectDraw engine Again, as the documentation says, "unsupported, obsolete". Reviewed-by: Jon TURNEY Signed-off-by: Adam Jackson commit 8465ee788fd541fa37681aa0a44103c7f944d437 Author: Adam Jackson Date: Thu Sep 25 15:37:33 2014 -0400 xwin: Remove native GDI engine (v2) As the man page says, "unsupported, experimental, and barely functional". The last even minor updates to any of this were back in 2004, presumably it's not getting better any time soon. This is also the only GC ops implementation in the tree that actually falls all the way down to the spans routines for everything, so that's pretty nice to be rid of. v2: Fix stray break statement (Jon) Reviewed-by: Jon TURNEY Signed-off-by: Adam Jackson commit e2a3e91a56cb598f2c8257614d92ccd46b7fc094 Author: Adam Jackson Date: Fri Jul 25 11:01:22 2014 -0400 rootless: remove redundant RootlessShapedWindowIn miShapedWindowIn is identical. Which you would expect, since neither one takes an actual WindowPtr argument, so they couldn't possibly make reference to rootlessness. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 7e8ac6dcd24d56e384ad09c7c23259cb3f4f8dc6 Author: Adam Jackson Date: Thu Sep 11 12:30:15 2014 -0400 xquartz: Remove useless DRIWindowExposures Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a8c6fc46c088bedb36c6441b78c98ca4cb9761b4 Author: Adam Jackson Date: Thu Sep 11 10:24:27 2014 -0400 kdrive: Remove vestigial reference to fbInitValidateTree Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 7ebf480f5eb75e06271ec924769e51bdcbbdc69c Author: Adam Jackson Date: Fri Feb 28 12:34:49 2014 -0500 xfree86: Remove some can't-happen printf from xf86CreateRootWindow Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 3689be96ac125c9bfca9d37de4878f05f4e2f584 Author: Adam Jackson Date: Tue Jun 10 12:54:41 2014 -0400 vfb: Don't reimplement micmap so much We know we're atop fb which is atop micmap, the only thing we need to hook is InstallColormap to handle the xwd colormap change. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 692676debbc2227054d67078c6442f1ab1811192 Author: Adam Jackson Date: Mon Jun 16 12:35:28 2014 -0400 loader: Remove some baklava code Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit c695a1430b80bac0b95e4d7f559e1bd223ecb1ef Author: Adam Jackson Date: Tue Jul 8 14:38:34 2014 -0400 input: Remove unused SetKeySymsMap Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 645063cd9384a26353775e92a79ed8710c6ca66c Author: Adam Jackson Date: Tue Mar 4 12:51:49 2014 -0500 exa, kdrive: Remove redundant BitsPerPixel macros We already get this from servermd.h Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit cccba52d152a7d233c0b762a54844ecef831483e Author: Alan Coopersmith Date: Sun Sep 21 09:49:05 2014 -0700 Abort xi2 tests if ActivateDevice() fails I was getting segfaults in xi2 tests from trying to copy XKB keyboard state to NULL pointers with a stack of: key=key@entry=0) at xkbActions.c:1189 sendevent=sendevent@entry=0 '\000') at devices.c:420 at protocol-xiquerydevice.c:338 which turned out to be due to xkbcomp failure, which was logged in the test logs as: XKB: Failed to compile keymap Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config. but which was overlooked because the ActivateDevice() return code wasn't checked and the tests went forward assuming the structures were all correctly initialized. This catches the failure closer to the point of failure, to save debugging time. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 95a5b92e37f73f497d547fd91c543c16d2cc73de Author: Keith Packard Date: Thu Oct 2 10:26:53 2014 -0700 xfree86: Remove remaining return FALSE from configServerFlags Remove the error return path from the FLAG_PIXMAP path and leave the default value in place. There's no point skipping the rest of this function. Signed-off-by: Keith Packard commit e9651e3dbc32650fcaf90888b4cbef81da77cfcd Merge: 9bc01dfc7 4433bc6d5 Author: Keith Packard Date: Thu Oct 2 10:24:33 2014 -0700 Merge remote-tracking branch 'ajax/dead-code' commit 9bc01dfc7070a40f5948588895b3a11dd1636d0e Author: Axel Davy Date: Sat Sep 27 23:17:13 2014 +0200 Fix present_pixmap when using present_notify_msc Calling present_notify_msc could cancel a pending pixmap presentation. Signed-off-by: Axel Davy Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b3e9791fd375eb71b6150a77b8009b046b213004 Author: Daniel Martin Date: Sat Sep 20 09:07:41 2014 +0200 xfree86: Delete file modinit.h All references to modinit.h have been remove with: a1d41e3 Move extension initialisation prototypes into extinit.h Signed-off-by: Daniel Martin Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 2aeb9d8f8b22ceb1de883c231a0a75d4c75d3f4a Author: Daniel Martin Date: Sat Sep 20 09:07:40 2014 +0200 security: Remove XpExtension from SecurityTrustedExtensions There's no XPrint extension (anymore). Signed-off-by: Daniel Martin Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 12c19bbff4b7b2d0b350a7b93b38ebbf69748534 Author: Daniel Martin Date: Sat Sep 20 09:07:39 2014 +0200 dix: Remove XpExtension leftovers from protocol.txt There's no XPrint extension (anymore). Signed-off-by: Daniel Martin Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit d3d845ca9e92f0a2ccde93f4242d7769cfe14164 Author: Michel Dänzer Date: Thu Sep 25 15:27:22 2014 +0900 glamor: Use GL_STREAM_READ also for read/write access to a PBO Otherwise the CPU may end up reading from non-cacheable memory, which is very slow. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84178 Signed-off-by: Michel Dänzer Reviewed-by: Markus Wick Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 78c27d12e1f4857bfcfc92afbb69d5dd989232b9 Merge: 6e50bfa70 1d6334dd0 Author: Keith Packard Date: Mon Sep 29 13:04:49 2014 -0700 Merge remote-tracking branch 'jturney/xwin-clipboard-refactoring' commit 6e50bfa706cd3ab884c933bf1f17c221a6208aa4 Author: Michel Dänzer Date: Wed Sep 24 16:48:10 2014 +0900 glamor: Fix leak of converted_bits in _glamor_upload_bits_to_pixmap_texture ==9530== 808,575,600 bytes in 5,904 blocks are definitely lost in loss record 4,602 of 4,602 ==9530== at 0x4C28C20: malloc (vg_replace_malloc.c:296) ==9530== by 0xAD29C98: _glamor_upload_bits_to_pixmap_texture (glamor_pixmap.c:771) ==9530== by 0xAD2AE95: glamor_upload_sub_pixmap_to_texture (glamor_pixmap.c:1031) ==9530== by 0xAD2BD55: glamor_upload_pixmap_to_texture (glamor_pixmap.c:1057) ==9530== by 0xAD1C2E6: glamor_composite_choose_shader (glamor_render.c:1025) ==9530== by 0xAD1C629: glamor_composite_with_shader (glamor_render.c:1174) ==9530== by 0xAD1DA77: glamor_composite_clipped_region (glamor_render.c:1542) ==9530== by 0xAD1E849: _glamor_composite (glamor_render.c:1689) ==9530== by 0xAD1ED90: glamor_composite (glamor_render.c:1758) ==9530== by 0x519FD6: damageComposite (damage.c:502) ==9530== by 0xAD27AA3: glamor_trapezoids (glamor_trapezoid.c:147) ==9530== by 0xAD27B51: glamor_trapezoids (glamor_trapezoid.c:101) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84176 Signed-off-by: Michel Dänzer Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 4433bc6d53e651b3dc4112099a153c2574f30797 Author: Adam Jackson Date: Thu May 1 12:48:15 2014 -0400 x86emu: Undefine _NO_INLINE Never defined by the server. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 1c3cb68d0cd15d29fd3aaa9eedbfa772ec8e3a47 Author: Adam Jackson Date: Tue Jul 29 14:15:24 2014 -0400 xfree86: Remove pointless xf86PrintMarkers Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 30fa6da6f140d713041942a81f5d6da6736e4f7f Author: Adam Jackson Date: Tue Jul 29 14:07:39 2014 -0400 xfree86: configServerFlags never fails, make it return void Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 2bf9db1930528255a37f9787aeb82e2851f814c2 Author: Adam Jackson Date: Tue Jul 29 14:02:01 2014 -0400 xfree86: Remove unused xf86Info.useDefaultFontPathFrom Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit fffea07b4cb0992fed2cca33be08440ea94090d9 Author: Adam Jackson Date: Tue Jul 29 13:48:10 2014 -0400 xfree86: Remove xf86Info.log (v2) SUBCLASS ALL THE THINGS v2: Remove the enum too (anholt) Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 2f5cfbee5409b088156d4cd84a3376499e291631 Author: Adam Jackson Date: Tue Jul 8 14:50:22 2014 -0400 xfree86: Remove DisplayID support Not actually wired up so it's fairly useless. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit b56fcce761534d3e28b7ea19e2a13213c3157a1f Author: Adam Jackson Date: Tue Jun 17 10:36:44 2014 -0400 xfree86: Remove useless back-pointer to pScrn from colormap code Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit ef22655311efa0d5a5395ba2f19aa20d71a05a4f Author: Adam Jackson Date: Fri May 2 13:36:13 2014 -0400 xfree86: Remove spurious xf86ConfigError READABLE. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 35f0257360fa6e11b9ecc08e467163718e012bb1 Author: Adam Jackson Date: Tue Mar 4 11:12:16 2014 -0500 xfree86: Remove Option "TextClockFreq" No modern driver pays attention to this. Presumably there existed hardware once where you couldn't just read the right values out of the CRTC. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 6755aa2c1244fee11846c1e0b274bd34900e3299 Author: Adam Jackson Date: Fri Jul 25 12:31:54 2014 -0400 xfree86: Remove xv clip notify driver hook Nothing's using it. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit e89ccacea9a1e4bc3693bb78e717343addd517e5 Author: Adam Jackson Date: Thu Jan 23 10:27:58 2014 -0500 mi: Remove Windows 8-bpp colormap compatibility Nice, but not something our Windows servers build, and not something that belongs in mi anyway. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 7cd192edc195c089c6df32e9f22e57da7467b6fd Author: Adam Jackson Date: Mon Jun 16 11:55:30 2014 -0400 loader: Deobfuscate RTLD_* macro stuff POSIX requires that these be named correctly, no need to be clever. Reviewed-by: Mark Kettenis Signed-off-by: Adam Jackson commit cc59be38b7eff52a1d003b390f2994c73ee0b3e9 Author: Keith Packard Date: Fri Sep 12 11:33:48 2014 -0700 os: Don't listen to 'tcp' by default. Add '-listen' option. [v2] This disables the tcp listen socket by default. Then, it uses a new xtrans interface, TRANS(Listen), to provide a command line option to re-enable those if desired. v2: Leave unix socket enabled by default. Add configure options. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 8ada3fb32cd7dd8948eb55620de18ba03df6131d Author: Keith Packard Date: Sat Sep 20 10:04:11 2014 -0700 Require xtrans 1.3.5 or newer This version of xtrans offers the TRANS(Listen) function. Signed-off-by: Keith Packard commit 18935b41e13b34571ffda84bde5257b8e84e6d1f Author: Keith Packard Date: Sat Sep 20 04:04:43 2014 -0700 XSERVER_DTRACE needs request names from registry too The dtrace code in the server wants to log the name of each executed request, which it gets from the registry. Use that as an additional indication of when that portion of the registry should be included in the server build. See: http://tinderbox.x.org/builds/2014-09-19-0003/logs/xserver/#build Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 28337cb14e4347e1dd7936c5393a22e042866687 Author: Jon TURNEY Date: Fri Sep 19 14:22:13 2014 +1000 xserver: Move 'pragma GCC diagnostic' outside functions $ gcc --version gcc (Gentoo 4.4.3-r2 p1.2) 4.4.3 /jhbuild/checkout/xorg/xserver/os/log.c: In function ‘LogInit’: /jhbuild/checkout/xorg/xserver/os/log.c:199: error: #pragma GCC diagnostic not allowed inside functions /jhbuild/checkout/xorg/xserver/os/log.c:201: warning: format not a string literal, argument types not checked /jhbuild/checkout/xorg/xserver/os/log.c:212: error: #pragma GCC diagnostic not allowed inside functions /jhbuild/checkout/xorg/xserver/os/log.c:214: warning: format not a string literal, argument types not checked etc. Reviewed-by: Dave Airlie Signed-off-by: Jon TURNEY Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit 7e6bd546846964fd9b8c2a06dea4782a552b62d7 Author: Keith Packard Date: Wed Aug 6 12:58:38 2014 -0700 glamor: Remove shader-based trapezoid implementation. Fixes Bug 76213. I can't find any performance benefit to using the GL path and the code renders this trapezoid incorrectly: top: FIXED 29.50 bottom: FIXED 30.00 left top: POINT 0.00, 29.50 left bottom: POINT 0.00, 30.50 right top: POINT -127.50, 29.50 right bottom: POINT 52.50, 30.00 This should render a solid line from 0,30 to 52,30 but draws nothing. The code also uses an area computation for trapezoid coverage which does not conform to the Render specification which requires a specific point sampling technique. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit b2452311bd1d67b4d78612570d4a25c685c78a0c Author: Keith Packard Date: Tue Aug 19 12:52:05 2014 -0700 glamor: Check large pixmap users in glamor_largepixmap.c This enables the assertion that all users of the large pixmap member are restricted to pixmaps which are actually large. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 5fc3e99f537b10dd9c2adfd37cf2c4ba5ed4bd44 Author: Keith Packard Date: Tue Aug 19 12:44:41 2014 -0700 glamor: Handle compositing from large to small pixmaps glamor_composite_largepixmap_region is given the job of dealing with compositing between a mixture of large and small pixmaps. However, it was assuming that the destination pixmap was large and fetching members of the large structure even for small pixmaps. This manifested with assertion failures when compositing from a large pixmap to a small pixmap. Fixed by using the pixmap size for the destination block size for small pixmaps. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 6e78d7f5e6edf56180e2ecfd25300bb2523876ab Author: Keith Packard Date: Tue Aug 19 12:41:45 2014 -0700 glamor: Don't abuse large_pixmap members for regular pixmaps glamor_compute_clipped_regions_ext wants to treat small and large pixmaps uniformly and did that by writing into the large pixmap union member in small pixmaps to construct something that looks like a one texture large pixmap. Instead of doing that, simply allocate the necessary elements locally on the stack and use them from there. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit bab319763c9734da3cff7b91a582f54989dc4cbe Author: Keith Packard Date: Tue Aug 19 12:39:07 2014 -0700 glamor: Add macro __glamor_large in glamor_largepixmap.c For now, this simply fetches the large member of the pixmap private. It will be changed to assert that the pixmap is large once bugs related to that have been fixed. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 16e429f1f96f984b1ff575875a7a4d7d29b482e2 Author: Keith Packard Date: Tue Aug 19 12:34:41 2014 -0700 glamor: Change SET_PIXMAP_FBO_CURRENT from macro to static inline This is the last function-like macro in glamor_priv.h; change to static inline like all of the other functions there. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit ea7357de90792cbceca6d8d9fdc144e7df8a0fba Author: Keith Packard Date: Wed Sep 10 14:01:59 2014 -0700 present: Clear pending flip pixmaps at CloseScreen If a flip is active at server reset time, the associated window will get destroyed which will queue an unflip operation. If that isn't synchronous, then it won't have finished by the time CloseScreen is called. Calling present_flip_idle will signal the fence and remove the reference to the fence and pixmap, freeing these in the X server and allowing a DRM client to clean up as well. This also rewords other comments in present_flip_destroy, removing scary words about needing synchronous operation (everything in this function is synchronous now) and describing what effect we actually need from present_set_abort_flip. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 2051514652481a83bd7cf22e57cb0fcd40333f33 Author: Keith Packard Date: Wed Sep 10 14:02:13 2014 -0700 present: Support PresentOptionCopy We added this option to the present protocol before 1.0 but somehow never implemented it in the server. It's pretty simple; just don't ever do flips if the application specifies Copy. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 69d8572ae4cd1bce17223ea8aff87916a974c861 Author: Keith Packard Date: Wed Sep 10 15:21:32 2014 -0700 Build required portions of registry.c automatically [v2] Instead of making the inclusion of the registry code a global conditional, split the registry into two pieces; the bits required by the X-Resource extension (the resource names) and the bits required by the XCSECURITY extension (the protocol names). Build each set of code if the related extension is being built. v2: Check for both XCSECURITY and XSELINUX. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit a11fc2493e85e4a532f4954805a7c6d1c601b08f Author: Keith Packard Date: Wed Sep 10 15:04:00 2014 -0700 dix: Close protocol.txt after we're done loading extension names Don't leave this file open during the whole server execution process; close it once all of the extensions are initialized. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 9e07f3a3d28b01402beecb3280c94fc525bd8075 Author: Keith Packard Date: Wed Sep 10 15:41:08 2014 -0700 test: Only build hashtable tests if building X-Resource extension The hash table functions are only included in the server when the X-Resource extension is built, so don't try to build and test them unless the X-Resource extension is being built. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 670ee0757febfb965d718fce2d5688717def667d Author: Adam Jackson Date: Tue Sep 16 11:10:58 2014 -0400 ephyr: Properly implement hardware cursors (v3) When dix hands us a new cursor we proxy it through to the host server; since we keep the host XID on the cursor bits private we can switch among them with just ChangeWindowAttributes. v2: Use xcb-renderutil for argb format lookup (Uli, Keith) Fall back to core cursors for host RENDER < 0.5 (Keith) Drop useless ephyrEnableCursor Consistently create/destroy the cursor image GC on both paths Treat null cursor from dix as invisible v3: Initialize the invisible cursor's image (Keith) Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit f839caadd4e567bf89f893aa7e5ba1327b712b4b Author: Adam Jackson Date: Wed Sep 17 11:07:22 2014 -0400 loader: Remove compatibility with ancient XFree86 version numbering Pretty sure I'm guilty of adding this. I think I was thinking of trying to be compatible with some really old binary-only driver that I had vague aspirations of reverse-engineering, but since I haven't gotten around to it in the intervening decade... Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit af40913797e6595fb5466c2ff3110e9526a37b9f Author: Julien Cristau Date: Wed Sep 17 07:41:27 2014 +0200 xwayland: always include drm.xml in tarballs Move drm.xml out of the automake conditional so make dist includes it even if glamor-egl is disabled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83960 Signed-off-by: Julien Cristau Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit eaee6572beefca240c42791f9a3a6e547bedd410 Merge: e3aa13b8d b84d25fd5 Author: Keith Packard Date: Wed Sep 17 15:49:24 2014 -0700 Merge remote-tracking branch 'anholt/modesetting-import' commit e3aa13b8d63ea2fba6eb47ddd0a7dde5a6d2b661 Author: Jon TURNEY Date: Wed Sep 17 15:38:39 2014 -0700 Update help text since -iglx is now the default This should have been part of d0da0e9c3bb8fe0cd4879ecb24d21715bfaa209b Signed-off-by: Jon TURNEY Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit b84d25fd53e97105b99495af84abaacc4c901967 Author: Eric Anholt Date: Tue Aug 26 11:22:02 2014 -0700 modesetting: Drop remaining old-xserver compatibility. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 7b0965a826612988dd721ddbd67cfbec392b67b5 Author: Eric Anholt Date: Tue Aug 26 11:37:46 2014 -0700 modesetting: Drop use of compat-api.h Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 2feda3b6b58f46cef91ea41312aac9021a703777 Author: Eric Anholt Date: Tue Aug 26 11:06:23 2014 -0700 modesetting: Connect the driver to the build. v2: Fix libdrm version check, and use XORG_VERSION_* instead of a static 1.0.0 version for the driver module. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 30dcc10f6c9c4bacbc0e3652917c298ca9fb3898 Author: Adam Jackson Date: Mon May 5 11:18:33 2014 -0400 xfree86: Clean up some more alpha awareness Since the sparse stuff is gone none of these variables get used for anything, they're just dead side-effect-less execution. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 2e21c081d34d52ee49ac00a294d2e74caf529818 Author: Adam Jackson Date: Fri May 2 13:00:21 2014 -0400 xfree86: Remove the memory of MTRR awareness pciaccess does this for us, and none of our internal hooks really remain. This does remove a cleanup pass from the BSD code, but the case it's covering (a previous server leaving MTRRs around) can't happen anymore. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c42712ab4d8eec56704ad5422d8f54befeb1e886 Author: Adam Jackson Date: Fri May 2 12:58:23 2014 -0400 xfree86: Remove xf86CheckMTRR Die die die die die. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 8686463de7e1ef9814824d46526d8177a7a492a0 Author: Adam Jackson Date: Fri May 2 12:55:37 2014 -0400 xfree86: Remove xf86ReadBIOS Not being used externally or internally anymore. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 21b216ad6ce2e9c89359b95e4196e42d91bf9420 Author: Adam Jackson Date: Fri May 2 12:46:45 2014 -0400 int10: Port off xf86ReadBIOS If the linux vm86 backend changes look somewhat horrifying to you, that's because you have taste. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 96c0da812a563d8229dc1396ac801329b3bcba91 Author: Adam Jackson Date: Fri May 2 12:39:01 2014 -0400 xfree86: Remove xf86LinearVidMem The only driver even pretending to check the result is mach64 anyway. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit ec0e29ed5bc71516de7feb226b548ce45cb9ffdf Author: Adam Jackson Date: Fri May 2 12:32:02 2014 -0400 xfree86: Remove {set,undo}WC from VidMemInfo Now that mapMem is gone this can never actually get called. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 9db2af6f757ef9680c70eb731698b7c9f9aca203 Author: Adam Jackson Date: Fri May 2 12:14:10 2014 -0400 xfree86: Remove xf86{Map,Unmap}VidMem This API sucks. Fortunately it's mostly unused at this point. geode, sis, and xgi need minor patches to use the corresponding pciaccess code, neomagic will (more explicitly) lose its non-PCI support, and newport will need to be ported to /dev/mem or the platform bus or something. This should also make it pretty clear that alpha's sparse memory support was basically not a thing anymore, very few tears shed. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 6d6aa8ab6b6d62d65f1354b4cd9af0bf4f2e81d7 Author: Eric Anholt Date: Tue Aug 26 11:43:54 2014 -0700 modesetting: Update for the platform device API change. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 9c080f44960d2338c7a59eee132a02d45186bfb0 Author: Eric Anholt Date: Tue Aug 26 11:41:46 2014 -0700 modesetting: Drop use of "pointer" for "void *" The xserver doesn't have that typedef. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit a10ea01475c6d0795b1a00cfd8be9912f4b54235 Author: Eric Anholt Date: Tue Aug 26 11:24:31 2014 -0700 modesetting: xserver already checks XEXTPROTO >= 7.2.99.901. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit c7e8d4a6ee9542f56cd241cf7a960fb8223a6b22 Author: Eric Anholt Date: Tue Aug 26 11:21:24 2014 -0700 modesetting: unifdef MODESETTING_OUTPUT_SLAVE_SUPPORT The server will always have it. v2: Clean up some weird formatting from the unifdeffing. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 0c07bfb38e61a8a6ad511dc8827e2dd20d68665d Author: Eric Anholt Date: Mon Aug 25 15:42:45 2014 -0700 modesetting: Merge modesetting's COPYING into the xserver's. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 1d6334dd0ca99923b6b55c5c047ef6b5c325f66c Author: Jon TURNEY Date: Wed Jun 19 13:09:35 2013 +0100 hw/xwin: Undefine _XSERVER64 in hw/xwin/winclipboard Including any server header might define the macro _XSERVER64 on 64 bit machines. That macro must _NOT_ be defined for Xlib client code, otherwise bad things happen. So let's undef that macro if necessary. Remove server directories from include path to ensure no server includes are included Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 7ca93301940647219dbed2d14fcd3f37e49fb477 Author: Jon TURNEY Date: Tue Jun 18 19:53:52 2013 +0100 hw/xwin: Only add to XSetIOErrorHandler() handler chain once Only use XSetIOErrorHandler() to add to the global XSetIOErrorHandler() chain once. If we do it every restart, then we make a loop in the handler chain, and we end up with a thread spinning in that loop when the server shuts down... Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5819a02d461349dbfc86317c742406d2217f7f0c Author: Jon TURNEY Date: Tue Jun 18 19:35:20 2013 +0100 hw/xwin: Add a basic manpage for xwinclip Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 492c924c8531b013d50637e29213da287b9a7fa2 Author: Jon TURNEY Date: Tue Jun 18 19:28:53 2013 +0100 hw/xwin: In clipboard function prototypes, use Window type, not int type Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 4a38c3bda2b0a868d7611f9423d8a0f304b435aa Author: Jon TURNEY Date: Tue Jun 18 19:18:08 2013 +0100 hw/xwin: Remove XOpenDisplay() retry code Remove XOpenDisplay() retry code. This isn't a sensible thing for the application to be doing, and XWin server needs to retry much more than just XOpenDisplay(). Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 4fc62aef8079266f8878cb355e6eb894000d8b8b Author: Jon TURNEY Date: Wed Jun 19 14:00:28 2013 +0100 hw/xwin: Improve comment about why we can't XCloseDisplay() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 89eb7bdcad092821b61a48832e1db82975a2252b Author: Jon TURNEY Date: Wed Jun 19 13:59:40 2013 +0100 hw/xwin: Remove setjmp()/longjmp() error constants Check specially that setjmp() returned a value which we don't pass to longjmp() seems a bit over-complex. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d0353bbe57aab910a6ef7da8778023a9d39c37df Author: Jon TURNEY Date: Thu Jun 20 00:04:16 2013 +0100 hw/xwin: Move WIN_MSG_QUEUE_FNAME to where it's used Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit fa0da5a020c2ea9366568375b7f35d3f2ddad680 Author: Jon TURNEY Date: Thu Jun 20 13:04:35 2013 +0100 hw/xwin: Use header for prototypes in textconv.c Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit cbe133752d1e817246b532a274fda3f7d74ebca1 Author: Jon TURNEY Date: Thu Jun 20 12:50:18 2013 +0100 hw/xwin: Remove unused X includes from internal.h and add them where needed Also removing server headers we might clash with and no longer need. Make a few adjustments to allow for this change: - provide a prototype of ErrorF() - use the MAX() macro provided by sys/param.h, not the max() macro provided by misc.h - use the X 'Bool' type rather than the unwrapped Windows 'BOOL' type Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 52f3cf3c612b2f33e39fd6f985b840a0d7192a50 Author: Jon TURNEY Date: Wed Jun 19 18:09:07 2013 +0100 hw/xwin: Remove standard includes from internal.h and add them where needed Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5992550c4cf8818d1c47c1e474c3d8c3383983fa Author: Jon TURNEY Date: Mon Jun 17 19:01:19 2013 +0100 hw/xwin: Add xwinclip test client Add xwinclip test client, which includes stubs for winDebug(), ErrorF() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5ae674ae6d6c0b02fd86c5e7b23b8c38b19f180a Author: Jon TURNEY Date: Mon Jun 17 20:03:04 2013 +0100 hw/xwin: Changes in error logging to make libwinclipboard more useful as a library Consistently use ErrorF() rather than winErrorFVerb() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e1cf2b47bea9ff3e64c0ef1e4d0744d9df4bc1b7 Author: Jon TURNEY Date: Mon Jun 17 19:58:20 2013 +0100 hw/xwin: Look up atoms in winClipboardProc() Look up all atoms of interest in clipboard code in winClipboardProc() and pass them down. This avoids the need to check serverGeneration to notice when we need to invalidate cached atom values. Also consistently use cached atom values everywhere, rather than sometimes just doing XInternAtom() again. Remove WIN_LOCAL_PROPERTY as unused now, as we only refer to CYGX_CUT_BUFFER once and do that directly. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit be61a1fc7e25a380f8d506e13b22017492a71913 Author: Jon TURNEY Date: Mon Jun 17 19:07:05 2013 +0100 hw/xwin: Add fUseUnicode as parameter to winClipboardProc() Add fUseUnicode as parameter to winClipboardProc() Access g_fUseUnicode global when calling it Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 126c1cfaa5b5978026d44a1f8b044d367056965b Author: Jon TURNEY Date: Mon Jun 17 18:27:56 2013 +0100 hw/xwin: Separate libwinclipboard interface and internal header files Rename the libwinclipboard internal header from winclipboard.h to internal.h Put libwinclipboard's public interface into winclipboard.h This lets winclipboardinit.c partake of that public interface, and all X server headers without clashes winInitClipboard() prototype belongs in a server header v2: Remove duplicate declaration of winClipboardWindowDestroy() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 30c535219ef2c251d90a1a1d3d07c8a7ec936da9 Author: Jon TURNEY Date: Tue Jun 18 00:32:53 2013 +0100 hw/xwin: Return a shutdown flag from winClipboardProc() if we should stop trying Return a shutdown flag from winClipboardProc(), and use it in winClipboardThreadProc() to determine if we should stop. Currently this is set if the clipboard messaging window received a WM_QUIT. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 88d44597046086953032fec7e035fc036596e255 Author: Jon TURNEY Date: Mon Jun 17 00:38:47 2013 +0100 hw/xwin: Move clipboard integration code down to a subdirectory Move clipboard integration code down to a subdirectory and build as a convenience library Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e965001a732a6b573c374f6a3503e172df01e8ec Author: Jon TURNEY Date: Mon Jun 17 13:18:16 2013 +0100 hw/xwin: Make g_hwndClipboard static Move winFixClipboardChain() into winclipboardthread.c Add winCLipboardWindowDestroy() function to access it for WM_DESTROY Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 03a59e7f787a160c6cc07c7a37df64a793242ef2 Author: Jon TURNEY Date: Mon Jun 17 02:01:39 2013 +0100 hw/xwin: Add remaining clipboard globals to winglobals.h Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 8f9fba5bc1499804a6c4a3287d99fe7dab8d6b8f Author: Jon TURNEY Date: Mon Jun 17 02:01:27 2013 +0100 hw/xwin: Hoist use of winSetAuthorization() and winGetDisplayName() up one level Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a3c1e405cb78df9ef18a1158dcaed3c27b3cbffe Author: Jon TURNEY Date: Sun Jun 16 22:35:22 2013 +0100 hw/xwin: Eliminate g_pClipboardDisplay and g_iClipboardWindow globals Eliminate the g_pClipboardDisplay and g_iClipboardWindow globals used to make those values available to the clipboard wndproc, by passing them in via the WM_CREATE message instead. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 229a0a83a44c94ce76eb937d58dc1773a38baa3e Author: Jon TURNEY Date: Sun Jun 16 22:13:26 2013 +0100 hw/xwin: Move winClipboardCreateMessagingWindow() to winclipboardthread.c Move winClipboardCreateMessagingWindow() from winclipboardinit.c to winclipboardthread.c, the only place that uses it, and make it static. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a70c2384a2689cc0346868bb27366c008c01758d Author: Jon TURNEY Date: Mon Feb 13 19:58:37 2012 +0000 hw/xwin: Remove SetSelectionOwner wrapper, use XFixesSetSelectionOwnerNotify event instead Use the XFixesSetSelectionNotify event instead of a SetSelectionOwner wrapper, the completely equivalent client-side mechanism. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit ab55746c1b179172a82b7a89ec6429b268a1f166 Author: Jon TURNEY Date: Mon Jun 17 01:55:46 2013 +0100 hw/xwin: Remove g_fClipboardLaunched, it's value is identical to g_fClipboardStarted Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 42d13810822f6b48771d77b09c0ef7cc2356ede5 Author: Jon TURNEY Date: Mon Jun 17 01:30:09 2013 +0100 hw/xwin: Hoist setting of g_fClipboardStarted flag up one level Hoist the setting of g_fClipboardStarted flag up one level. Also move up the clearing of the g_fClipboardLaunched at the end of clipboard function. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 290dbff0753ddf60f04da92d5a408c567a2ee3e0 Author: Jon TURNEY Date: Mon Jun 17 01:55:03 2013 +0100 hw/xwin: winProcEstablishConnection doesn't need to check if clipboard started winProcEstablishConnection doesn't need to check if clipboard has already been started. It should be clear that we start the thread only once when the wrapper tells us to, as the wrapper unhooks itself thereafter. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 91e55691ef07735bb866c0f4d3c1a6e2ca167992 Author: Jon TURNEY Date: Sun Jun 16 23:57:17 2013 +0100 hw/xwin: Hoist clipboard thread restart up one level Hoist clipboard thread restart up one level. Note that currently g_fClipboardLaunched is set the first time in the winProcEstablishConnection wrapper, and subsequent times when the clipboard thread restarts itself. Try to clarify this and just set g_fClipboardLaunched before starting the thread. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0bb6eae4e34634abb2679004ace94504a4d65964 Author: Jon TURNEY Date: Mon Jun 17 00:07:01 2013 +0100 hw/xwin: Push winClipboardShutdown() into winclipboardinit.c Push winClipboardShutdown() into winclipboardinit.c This lets us make g_ptClipboardProc static Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 6343b531d786dd4a9bb52050c9ef267a04374b57 Author: Jon TURNEY Date: Wed Jan 1 17:54:48 2014 +0000 hw/xwin: Remove left-over pthread_exit() in clipboard code Commit c1bf3baa44fbd8af33a2b3ce045324485b85a7a7 removed all but one of the pthread_exit() calls which used to call winClipboardThreadExit() Fix the final remaining one to exit via done label on IOError instead. Also fix a comment and report pre-flush failure to log, but do not exit Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d3427717f2c6a473dc3d20631dff653e4e37228e Author: Adam Jackson Date: Wed Jul 2 12:09:52 2014 -0400 xwayland: Snap damage reports to the bounding box Instead of sending every little rect. Lets x11perf run to completion, makes 'while true; do gtkperf -a; done' take longer to crash. This is effectively a resend of the same logic against the old xfree86+xwayland branch: http://lists.x.org/archives/xorg-devel/2013-October/038453.html Reviewed-by: Daniel Stone Reviewed-by: Kristian Høgsberg Signed-off-by: Adam Jackson commit 5ecc0315a2b9bea44ace886f5706a7a3f5cbc4f6 Author: Jasper St. Pierre Date: Mon Jun 30 13:53:50 2014 -0400 xwayland: Implement throttling for surfaces based on the frame event This implements simple throttling that keeps us to one attach per frame. There isn't really an active performance benefit, since the buffers will be redrawn only once per frame anyway, but it does cut down on the chatty network traffic. Since the Wayland sockets might fill up as well, the cut down on the volume of data we send out also provides us with a big stability benefit. Namely, mutter is a lot more stable running gtkperf, a fairly intensive X11 application, after this change. Reviewed-by: Daniel Stone Signed-off-by: Jasper St. Pierre commit 6c442fc4f7d84508665dfdee8a75ec91f50395dc Author: Jasper St. Pierre Date: Mon Jun 30 15:28:16 2014 -0400 xwayland-input: Fix a crasher for a race with the Wayland compositor If something quickly maps and unmaps a window, then we'll immediately create and destroy the Wayland surface that cooresponds to that window. If our mouse pointer is over the window when the surface is created, we'll receive a enter on the window. Since resource creation and destruction is not synchronous, that means that the compositor will queue up an event for a resource that's eventually destroyed. On the client-side, when we receive this message, we note that the resource isn't allocated, and get a NULL surface in our enter handler. We immediately try to dereference this, and then crash. This was caused by running gtkperf while moving the window a lot. Reviewed-by: Daniel Stone Signed-off-by: Jasper St. Pierre commit 1d32004ed5a3a20b2d5879867e213122dced69d0 Author: Michel Dänzer Date: Wed Sep 10 16:20:48 2014 +0900 glamor: Make glyph mask cache per-screen It references a pixmap, which is a per-screen resource. Fixes broken text rendering in xfwm4-tweak-settings in Zaphod mode. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 710d314ad16cf1eaca3b97b1736ff0ca43e598c4 Author: Michel Dänzer Date: Wed Sep 10 16:20:47 2014 +0900 glamor: Track glyph caching information per screen This is necessary because the glyph caches are per screen. Fixes broken menu text in gnome-terminal in Zaphod mode. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit a4e8e6dff9a0c26944a325e4017faa68d93ae5b8 Author: Michel Dänzer Date: Wed Sep 10 16:20:46 2014 +0900 glamor: Move 'glyph caches realized' check to glamor_realize_glyph_caches And rename the boolean to reflect what it's about. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 0acff6e4374340dc391014f396f190daf73d579c Author: Michel Dänzer Date: Wed Sep 10 16:20:45 2014 +0900 glamor: Call glamor_glyphs_init from glamor_create_screen_resources The comment above glamor_glyphs_init was already saying so. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 54a1d4db825be90fb7be138e3267a15922d62f03 Merge: 8f8dcfee2 f92df22a0 Author: Keith Packard Date: Thu Sep 11 18:27:41 2014 -0700 Merge remote-tracking branch 'jturney/master' commit 8f8dcfee2085ba82107a8bf3872a0bb241493409 Author: Alan Coopersmith Date: Thu Sep 4 23:18:03 2014 -0700 Make list tests actually test lists Coverity scan detected that asserts were setting values, not checking them: CID 53252: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53259: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53260: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53261: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? Fixing those to be == caused test_nt_list_insert to start failing as part assumed append order, part assumed insert order, so it had to be fixed to use consistent ordering. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit d0da0e9c3bb8fe0cd4879ecb24d21715bfaa209b Author: Eric Anholt Date: Thu Sep 4 10:59:40 2014 -0700 glx: Disable indirect GLX contexts by default. Almost every situation of someone running indirect GLX is a mistake that results in X Server crashes. Indirect GLX is the cause of regular security vulnerabilities, and rarely provides any capability to the user. Just disable it unless someone wants to enable it for their special use case (using +iglx on the command line). Signed-off-by: Eric Anholt Acked-by: Keith Packard Signed-off-by: Keith Packard commit bf338efc678258d2d366dff2ed873752f98f0bfc Author: Keith Packard Date: Thu Sep 4 08:36:07 2014 -0700 glx/present: Only send GLX_BufferSwapComplete for PresentCompleteKindPixmap Present didn't provide the 'kind' argument to the present_complete_notify hook that GLX uses to construct GLX_BufferSwapComplete events, so GLX was reporting events for PresentCompleteKindMSC notifications, which resulted in duplicate GLX_BufferSwapComplete events and crashes in clutter. See the gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=733282 Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 7a0c79c8c478bf22ee71c1ea35886a6f555ef2bb Author: Thomas Petazzoni Date: Tue Sep 2 22:03:14 2014 +0200 os/log: adjust gcc version conditions for #pragma In commit e67f2d7e0f9189beb2907fa06cff5ecc7f35f922 ("gcc 4.2.1 doesn't support #pragma GCC diagnostic ignored"), some compile time conditionals were added around the #pragma usage. Those conditionals ensure that the #pragma are not used on gcc <= 4.2. However, the usage of #pragma diagnostic inside functions was only added in gcc 4.6, and a build failure is therefore experienced with gcc 4.5: log.c: In function 'LogInit': log.c:199:9: error: #pragma GCC diagnostic not allowed inside functions log.c:201:9: warning: format not a string literal, argument types not checked log.c:212:9: error: #pragma GCC diagnostic not allowed inside functions log.c:214:17: warning: format not a string literal, argument types not checked $ ./host/usr/bin/powerpc-linux-gnu-gcc -v [...] gcc version 4.5.2 (Sourcery G++ Lite 2011.03-38) This patch therefore adjusts the compile time conditionals to make sure the #pragma is not used on gcc <= 4.5, and only used on gcc >= 4.6. Signed-off-by: Thomas Petazzoni Acked-by: Keith Packard Signed-off-by: Keith Packard commit da4bad620a6f1a58978f5279fda74da3c1c1d443 Author: Dave Airlie Date: Tue Jul 30 13:50:48 2013 +1000 pixmap: fix reverse optimus support with multiple heads For doing reverese optimus to multiple outputs on a secondary GPU the GPU can store the blits into a large screen pixmap, unfortunately this means we need a destination offset into the dirty code, so add a new API that just adds this interface. Signed-off-by: Dave Airlie Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit e1cc0d3df1fdb6c4393ac455ca038e1e0680bb22 Author: Maks Naumov Date: Thu Aug 21 12:58:16 2014 -0700 glx: Fix 'y ' value in swrastGetDrawableInfo() Signed-off-by: Maks Naumov Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit f92df22a037cb8b672dab2e7aef18a22275f5660 Author: Jon TURNEY Date: Fri Jul 18 15:08:17 2014 +0100 hw/xwin/glx: Remove an incorrect assertion in glxWinDrawableSwapBuffers The piglit test glx_make_current triggers this assertion, by making the context current on a different drawable before issuing a glXSwapBuffers() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b21321e515fc778f87077b7ce47922c43a4ba103 Author: Jon TURNEY Date: Mon Jul 14 19:41:25 2014 +0100 hw/xwin/glx: Downgrade "forcing window to exist" message to debug It happens whenever a GLX client uses GL on a window before it's been mapped, so don't log it like an error. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 31d089633683ea2a2716651c3c48e1456cc595bf Author: Jon TURNEY Date: Wed Jul 16 13:44:33 2014 +0100 hw/xwin/glx: Fix a couple of typo bugs in indirect.c fbConfigToPixelFormatIndex()'s drawableTypeOverride parameter is a drawable type bitmask, not a drawable type enum value WGL_SWAP_COPY_ARB is a value of the WGL_SWAP_METHOD_ARB attribute for wglChoosePixelFormatARB(), not an attribute itself also remove duplicate error reporting for wglChoosePixelFormat() and fix a comment Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b1ea714cdce8444c6ad7778dae04e35c6bcc1750 Author: Jon TURNEY Date: Sun Apr 27 22:10:31 2014 +0100 hw/xwin/glx: Update .gitignore Update to align with rewrite of wrapper generation script in commit 583a1146233f16d861706926706e5feec3baffba Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d1d3bd359670a8f55c9350fd905af32ba6e67d33 Author: Jon TURNEY Date: Sun Mar 30 20:51:36 2014 +0100 hw/xwin/glx: Don't override the server supported GL extensions string. Don't override the server supported GL extensions string. The string reported to the client is the intersection of client, server and GL implementation extensions. Overriding the server supported GL extensions string like this causes extensions which are supported by the client and implementation, but not by the server, to be erroneously reported, so don't change it. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c99cd058a89bbfc9ceab3c91b93451f70351ddce Author: Jon TURNEY Date: Tue Mar 4 22:37:13 2014 +0000 hw/xwin: Add an idempotency guard to glwindows.h Add an idempotency guard to glwindows.h Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 1c34e774eff6c5a22501833444a10440cf3f915a Author: Jon TURNEY Date: Mon Nov 11 15:09:18 2013 +0000 hw/xwin: Fix a potential crash in winRedrawScreenShadowDDNL() Seen during shutdown when using '-fullscreen' and '-depth 8' Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 16d9da08861fe504de4be8c31708592e30687156 Author: Jon TURNEY Date: Thu Feb 18 23:36:27 2010 -0600 hw/xwin: Improve choice of display name used by internal clients Choose the display name used to connect to internal clients and exported into environment of processes started from the traymenu so that it uses a transport we know is working This should mean the server can start correctly with -multiwindow and/or -clipboard and any two of -nolisten inet6, -nolisten inet and -nolisten unix (the server will correctly refuse to start if all 3 are used, as it must be listening on at least one socket) v2: Place prototype for winGetDisplayName() in windisplay.h, and include it where needed. v3: Include xwin-config.h, so that _XSERVER64 is defined, just in case anything relies on that. v4: Replace grovelling around in the server's list of listeners with new Xtrans TransIsListening() interface, added in Xtrans 1.3.3 See also [1] [1] https://sourceware.org/bugzilla/show_bug.cgi?id=10725 Signed-off-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz Reviewed-by: Colin Harrison commit 95357539c1178a97d8a167461806a280d2803ec4 Author: Jon TURNEY Date: Wed Jan 1 20:34:36 2014 +0000 hw/xwin: Makefile.am cleanup - Rename XWIN_GLX_LINK_FLAGS -> XWIN_GLX_SYS_LIBS for consistency - Rename MULTIWINDOW_LIBS -> MULTIWINDOW_SYS_LIBS for consistency - Don't link with XWin with $(MAIN_LIB), it provides it's own main() - Put one library per line for more intelligible diffs when one is added Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit aa40d0c07173209a2c13b332f1168e0df499a19e Author: Jon TURNEY Date: Fri Jun 13 16:16:51 2014 +0100 hw/xwin/glx: When generating shims, limit the considered features to GL version <=1.2 This fixes a problem when using Khronos registry data since the change of 2013-08-16 removed glBlend(Color|Equation) from GL1.2 and added them to GL_ARB_imaging. If shim generation considers all features, no shims are generated for glBlend(Color|Equation) as they are first emitted for GL 1.4 (which we ignore as shims are only generated for GL version <=1.2), then emission for GL_ARB_imaging is skipped as they have already been emitted. Also improve feature name matching so it is exact, not on an initial substring, so 'GL_ARB_texture_compression_bptc' and 'GL_ARB_texture_compression_rgtc' aren't matched by 'GL_ARB_texture_compression'. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 35dc7c75150733dbcef8a18b6796f49a7c48ebee Merge: 3a51418b2 5f3485b06 Author: Eric Anholt Date: Mon Aug 25 15:52:58 2014 -0700 Merge branch 'modesetting-import' into master This reintroduces a "hardware" driver to the xfree86 directory. Unlike the drivers that xorg used to include in the source tree, that needed independent release schedules to get hardware support out the door, the modesetting driver shouldn't change much as new hardware gets released. A lot of what this driver needs to do is just keep up with server ABI changes. This import was done by taking xf86-video-modesetting-0.9.0, and running this script with 'git-filter-branch -f --tree-filter ~/bin/modesetting-filter': mkdir -p hw/xfree86/drivers/modesetting rm -f README autogen.sh configure.ac Makefile.am .gitignore rm -f man/Makefile.am mv man/modesetting.man hw/xfree86/drivers/modesetting/ mv COPYING hw/xfree86/drivers/modesetting/ mv src/* hw/xfree86/drivers/modesetting/ commit 3a51418b2db353519a1779cf3cebbcc9afba2520 Author: Laércio de Sousa Date: Mon Aug 18 08:45:43 2014 -0300 ephyr: set screen size & origin from host X server output's CRTC geometry If a given output is passed via new -output option, Xephyr will query host X server for its info. If the following conditions are met: a. RandR extension is enabled in host X server; b. supported RandR version in host X server is 1.2 or newer; c. the given output name is valid; d. the given output is connected; then Xephyr will get output's CRTC geometry and use it to set its own screen size and origin. It's just like starting Xephyr in fullscreen mode, but restricted to the given output's CRTC geometry (fake "Zaphod mode"). This is the main feature needed for Xephyr-based single-card multiseat setups where we don't have separate screens to start Xephyr in fullscreen mode safely. Signed-off-by: Laércio de Sousa Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 84b02469ef97e6f85d074d220a517d752180045f Author: Laércio de Sousa Date: Mon Aug 18 08:45:42 2014 -0300 ephyr: enable screen window placement following kdrive -screen option extended syntax With this patch, one can launch Xephyr with option "-screen WxH+X+Y" to place its window origin at (X,Y). This patch relies on a previous one that extends kdrive -screen option syntax to parse +X+Y substring as expected. If +X+Y is not passed in -screen argument string, let the WM place the window for us, as before. Signed-off-by: Laércio de Sousa Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 376f4de8ae927748417046390c24afbda24b0583 Author: Laércio de Sousa Date: Mon Aug 18 08:45:41 2014 -0300 kdrive: add support to +X+Y syntax in -screen option parsing This patch enhances current -screen option parsing for kdrive-based applications. It can parse strings like x++, storing X and Y offsets in KdScreenInfo instances. For negative values, this patch supports +-X+-Y (not -X-Y) syntax. It will allow e.g. proper Xephyr window placement for multiseat purposes. Signed-off-by: Laércio de Sousa Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit fe5018e0564118a7a8198fa286186fdb9ed818c7 Author: Takashi Iwai Date: Tue Aug 19 15:57:22 2014 -0500 fb: Fix invalid bpp for 24bit depth window We have a hack in fb layer for a 24bpp screen to use 32bpp images, and fbCreateWindow() replaces its drawable.bitsPerPixel field appropriately. But, the problem is that it always replaces when 32bpp is passed. If the depth is 32, this results in bpp < depth, which is actually invalid. Meanwhile, fbCreatePixmap() has a more check and it creates with 24bpp only when the passed depth <= 24 for avoiding such a problem. This oneliner patch just adds the similar check in fbCreateWindow(). This (hopefully) fixes the long-standing broken graphics mess of cirrus KMS with 24bpp. Signed-off-by: Takashi Iwai Reviewed-by: Keith Packard commit 5d133276de9c50146e80ffc69edd429c2afe98e6 Author: Thierry Reding Date: Thu Feb 13 13:36:12 2014 +0100 xfree86: Allow non-PCI devices as primary On platforms that don't support PCI or have no GPU attached to the PCI bus, there can still be a primary device on a non-PCI bus. Signed-off-by: Thierry Reding Reviewed-by: Rob Clark Tested-by: Rob Clark Signed-off-by: Keith Packard commit 2f0183222b4279266e6ef60b923738ff55f0afba Author: Thierry Reding Date: Thu Feb 13 13:31:31 2014 +0100 xfree86: Fallback to first platform device as primary When neither of the various bus implementations was able to find a primary bus and device, fallback to using the platform bus as primary bus and the first platform device as primary device. Signed-off-by: Thierry Reding Reviewed-by: Rob Clark Tested-by: Rob Clark Signed-off-by: Keith Packard commit 33aeec8a11bc75a06d32956bbdd9efb216790a02 Author: Keith Packard Date: Thu Jan 30 16:24:35 2014 -0800 dri3: Don't enable the DRI3 extension unless some screen supports it There's no reason to advertise this extension unless one of the hardware drivers actually supports it. Not listing it means it's slightly easier for users to tell what's going on. On the other hand, not listing it means we may have applications that only check for the extension and not for appropriate per-screen support. I don't think that's a real risk as DRI3 is only useful for systems with deep knowledge of the hardware. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 0d7306ffe2e069f0091c4f174f138127100abb43 Author: Michel Dänzer Date: Wed Aug 13 17:10:21 2014 +0900 glamor: Don't call glamor_copy_fbo_cpu() for GLAMOR_DRM_ONLY pixmaps It results in a crash. Signed-off-by: Michel Dänzer Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit c2548d71f7a754251d89696ae49aab2fe07446df Author: Joerg Sonnenberger Date: Mon Aug 11 10:36:01 2014 +0200 Fix format string. Reviewed-by: Keith Packard Signed-off-by: Thomas Klausner Signed-off-by: Keith Packard commit d4111239e698f0126123830429d74da7d24910ed Author: Keith Packard Date: Wed Aug 13 11:30:11 2014 -0700 glamor: Free Xv put image data immediately after use The Xv StopVideo callback is not invoked on textured video ports, so the temporary pixmaps allocated for the video planes are never freed. Freeing the storage immediately after use is a simple solution to this problem which doesn't appear to have any visible performance impact. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit c47ee880e742e15fdbd5f5ac3eba64db6228c09f Author: Eric Anholt Date: Mon Aug 11 15:23:02 2014 -0700 glamor: Don't try to set up core fonts textures when we won't use them. This happens to avoid GL errors on hardware without EXT_texture_integer (which implies < GLSL 130, and thus glamor_text.c programs not compiling anyway). Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit d09c9ddb866dea31e2adf82be329d5d3489718f5 Merge: 606b701c5 ab32ee358 Author: Keith Packard Date: Tue Aug 12 16:34:24 2014 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 606b701c563c10f01dec147e061fa00cda784a9d Author: Michel Dänzer Date: Wed Aug 6 10:30:25 2014 +0900 glamor: Add glamor_copy_fbo_cpu() for CopyArea to non-GPU destination This provides a speedup e.g. when the destination is an SHM pixmap. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76285 Signed-off-by: Michel Dänzer Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 1e30fc1b99bda040038e4fd56d1b27c686b44c75 Author: Peter Hutterer Date: Mon Aug 4 10:47:03 2014 +1000 xkb: ignore floating slave devices when updating from master (#81885) Introduced in 45fb3a934dc0db51584aba37c2f9d73deff9191d. When a device is enabled, the master's locked state is pushed to the slave. If the device is floating, no master exists and we triggered a NULL-pointer dereference in XkbPushLockedStateToSlaves. X.Org Bug 81885 Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 4599a4492ca6a1c87cd9c537c54fbda11f13c15c Author: Daphne Pfister Date: Wed Jul 23 21:51:57 2014 -0400 os: Regenerate os/oscolor.c from app/rgb #52289 Regenerate os/oscolor.c from rgb.txt. This adds the following colors: aqua, lime, fuchsia, crimson, indigo, olive, rebecca purple, silver and teal. It also adds versions of gray, grey, green, maroon and purple prefixed with web and x11 for the colors that are different between X11 and HTML/CSS web colors. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=52289 Related: https://bugs.freedesktop.org/show_bug.cgi?id=80371 Signed-off-by: nobody Tested-by: Keith Packard Signed-off-by: Keith Packard commit ee9f766abf6fbe0cc36234bfe727aba924e9b5fd Author: Keith Packard Date: Mon Jul 28 12:09:51 2014 -0700 xfree86: [v2] Remove duplicate InputInfoPtr typedef from xf86Xinput.h GCC 4.2 doesn't accept 2 typedef declarations of the same type, so remove the extra one from xf86Xinput.h and have xf86Xinput.h #include xf86.h to make sure everyone using just that file gets the typedef. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Reviewed-by: Matthieu Herrb commit ab32ee35890be51137b56525826ffe219b63eb88 Author: Jeremy Huddleston Sequoia Date: Mon Aug 11 13:15:24 2014 -0700 XQuartz: Better support turning off "Displays have separate Spaces" on OS X Mavericks http://xquartz.macosforge.org/trac/ticket/1876 Follow-up to: 1c10b37380d228b35db8a8616a6312ac54f5e59b Signed-off-by: Jeremy Huddleston Sequoia commit dfbc6a1a78ff3192baae6f7f2af98b6e51422f75 Author: Jeremy Huddleston Sequoia Date: Wed Jul 23 11:53:33 2014 -0700 ListenOnOpenFD: Remove Resets since this is intended to be for hotplugging connections pharris says that the resets should not be done in the hotplugging case. This may fix a crash reported against XQuartz: http://xquartz.macosforge.org/trac/ticket/869 Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Harris commit 3714f5401690b288045090c4bcd9cb01c6e4860e Author: Eric Anholt Date: Sun Apr 6 07:57:44 2014 +0100 kdrive: Remove a dead struct. It's never been used in the history of the tree. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit ef258fa4fd0c215b1327fb3d94b37e75af9fae6b Author: Eric Anholt Date: Wed Jul 30 21:11:51 2014 -0700 xv: Drop the ClientPtr from the interface to the DDX. Nobody was using it. v2: Merge the hunk that was accidentally in the previous commit into this one. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 850b268e2b9e49445a22e041a356d8ff26ae2147 Author: Eric Anholt Date: Sat Apr 5 10:55:45 2014 +0100 xv: Remove the no-op AllocatePort/FreePort interfaces. v2: Fix accidentally squashed-in change for dropping client from the arguments, which should have been in the next commit. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard (v2) commit 41d4a626c6ceb15d5b008dca00c6f5032ddd9556 Author: Eric Anholt Date: Sat Apr 5 10:35:52 2014 +0100 kdrive: Don't bother explicitly clearing new window privates to NULL. Privates are initially cleared to zero by dixInitPrivates(). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e311318b35ef4f82996c6e277137569005893b44 Author: Eric Anholt Date: Sat Apr 5 09:11:03 2014 +0100 kdrive: Remove dead KXVPaintRegion(). It's been unused since mach64 was deleted, and now there's a helper in core XV. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 7eac142fb6e8abb011ce59feda3c2d7b04f2b225 Author: Eric Anholt Date: Sat Apr 5 09:09:17 2014 +0100 xv: Fix malloc-failure cases in the fill color key helper. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit ea3f3b0786d58b2ba6a9bbf0a32e734670f54b73 Author: Eric Anholt Date: Sat Apr 5 09:07:18 2014 +0100 xv: Move xf86 XV color key helper to core. Color key overlay implementations want to reuse this code, and XF86's had bugs (to be fixed in the next commit). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit b01cfe5f23766b9c13ed6bd889263d5d7a8a351d Author: Eric Anholt Date: Fri Apr 4 22:58:37 2014 +0100 xv: Move CloseScreen setup from a DIX hook to normal wrapping. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 6a71ee79aabe6b611cae443a49786824a0322313 Author: Eric Anholt Date: Fri Apr 4 18:02:14 2014 +0100 xv: Drop unused XvdiVideoStopped(). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 4a095902a37cb98d7954d0873dcf1376cbab54b8 Author: Eric Anholt Date: Fri Apr 4 18:01:07 2014 +0100 xv: Drop unused XvdiPreemptVideo(). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e7dde86f2343832c52ef74f5c4fe44a72054c79b Author: Eric Anholt Date: Fri Apr 4 17:54:58 2014 +0100 xv: Move the DDX XV screen private allocation into the DDXes. XV was going against convention by having the core infrastructure allocate the private on behalf of the DDX. I was interested in this because I was trying to make multiple pieces of DDX be able to allocate adaptors, and that wasn't going to work if DDX-specific code was hung off of a single global screen private. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit a146c6d4212ed199002e40419b4aa22da8f49e3a Author: Eric Anholt Date: Fri Apr 4 13:12:34 2014 +0100 xv: Drop the ddQueryAdaptors() interface. The core was passing pointers to pxvs's nAdaptors and pAdaptors, and the two hardware implementations were copying pxvs's nAdaptors and pAdaptors into those pointers. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit cb42805c6675bbb9f0b37609fe2ffecc07f46290 Author: Eric Anholt Date: Fri Dec 27 21:54:26 2013 -0800 xv: Move common code for adaptor cleanup to xvmain.c Since any DDX XV screen cleanup would need this same code for freeing the tree of pointers for xv adaptors, move it to the dix. v2: Unconditionalize the pPorts freeing, to match the block above it. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard (v1) commit 8cb0da29404d3fed13c1cbedb5c6164e4733ea82 Author: Eric Anholt Date: Fri Dec 27 20:59:12 2013 -0800 xv: Remove dead VIDEO_NO_CLIPPING from the xorg and kdrive DDXes. As far as I can see, nothing has ever used this flag except possibly the i.mx6 xorg ddx debug during bringup. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit a6ec7d5278405d69e60cca2964006fb7ce32c556 Author: Eric Anholt Date: Fri Dec 27 20:53:00 2013 -0800 xv: Remove dead VIDEO_INVERT_CLIPLIST from the xorg and kdrive DDXes. As far as I can see (looking at trees on my disk, plus googling for the term), nothing has ever used this flag Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e6c8c7e46c79b2837a7d0b12079a47734eff1eb7 Author: Egbert Eich Date: Mon Aug 4 19:16:30 2014 +0200 BellProc: Send bell event on core protocol bell when requested XKB allows to override the BellProc() ringing the 'keyboard bell': instead an event is sent to an X client which can perform an appropriate action. In most cases this effectively prevents the core protocol bell from ringing: if no BellProc() is set for the device, no attempt is made to ring a bell. This patch ensures that an XKB bell event is sent also when the core protocol bell is rung end thus an appropriate action can be taken by a client. Signed-off-by: Egbert Eich Acked-by: Peter Hutterer Signed-off-by: Keith Packard commit e8373e4b6a793b48487b1a82d798d97b5c9a10a3 Author: Keith Packard Date: Thu Jul 31 19:57:53 2014 -0700 Add X_BYTE_ORDER to xorg-server.h Drivers don't get to use dix-config.h, they use xorg-server.h instead. Add X_BYTE_ORDER to that file so drivers can see the value. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit e31564e1a21e73f4d20d6471da4fc7a9b63e4062 Author: Michel Dänzer Date: Thu Jul 31 08:35:13 2014 -0700 Check for dix-config.h or xorg-server.h before using X_BYTE_ORDER Now that servermd.h depends on X_BYTE_ORDER being defined in dix-config.h or xorg-server.h, check to make sure one of those has been included before using the value. Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 61afe950e6a1a640ad9c5368549914ea32b90d48 Author: Keith Packard Date: Mon Jul 21 19:27:20 2014 -0700 xfree86/modes: rotation damage is automatically destroyed on close Don't try to destroy rotation_damage in the xf86RotateCloseScreen; it will have been destroyed when the screen pixmap was destroyed. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 40dc81154ad38514793f2181447d597b57d39e80 Author: Keith Packard Date: Sun Jul 20 18:57:42 2014 -0700 present: Avoid crash at server shutdown When a present flip operation is still in process during server reset, the call to present_set_abort_flip may not happen until the screen is being closed, at which point there is no root window to set pixmaps for. Check to make sure there's a window before resetting window pixmaps. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 627bce80894647c681b146a709aad4c390b4374e Author: Keith Packard Date: Sun Jul 20 18:53:52 2014 -0700 present: Make window MSC offset 0 initially The MSC offset used by a window is adjusted as the window moves between screens, and between shown/unshown. The value shouldn't matter, but it's helpful for debugging to have window MSC values be the same as the CRTC MSC at first. This patch introduces a unique CRTC value so that Present can detect the first time a window is a PresentPixmap destination and set the MSC offset to zero, rather than using the fake MSC value as the previous window MSC. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit bd4198b01f2baf2284e61ea7ebf4600f554800e9 Author: Keith Packard Date: Fri Jul 18 11:19:01 2014 -0700 xfree86: Avoid compiler warning for unused vars without systemd When systemd isn't being used, systemd_logind_release_fd is defined as an empty macro, leaving the arguments unused. Fix the compiler warnings by simply removing the local variables and referencing the structure within the macro call. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit b063a185ab9d2c54669fb6e036fdbae3707c9e4b Author: David Ung Date: Tue Jul 29 15:01:39 2014 -0700 randr: Fix logic in RRPointerToNearestCrtc RRPointerToNearestCrtc is suppose to snap to the nearest Crtc, but best_x and best_y is always positive, hence when calling SetCursorPosition it will make the cursor even further away. Correct delta x/y to allow negative values and also use "width/height -1" in the calculation. Also choose the closest Crtc by setting the "best" value. Signed-off-by: David Ung Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 90803042bcbb9dc6261b5d112acf5613829d9f70 Author: Keith Packard Date: Wed Jul 30 10:13:53 2014 -0700 Fix files including xorg-server.h by mistake A few files in the server are including xorg-server.h, which is only for use by Xorg server drivers. This fixes those errors and then adds a check to make sure it doesn't happen again. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit a08e7a098aa37351294a25fe62b7ff6e95622e64 Author: Adam Jackson Date: Tue Jun 24 14:21:57 2014 -0400 dri1: Remove unused DRI{,Post}ValidateTree i810, mga, savage, and tdfx do reference these slots, but only to set them to NULL, so while this does have API impact it's not actually used. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 5486c834fa3eebd79a4811143e513d6a92b7e504 Author: Adam Jackson Date: Tue Jun 24 14:16:55 2014 -0400 xquartz: Remove unused DRI{,Post}ValidateTree Cargo-culted from DRI1, not actually used for anything. Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a5e7701058c676231d2bc3f9a0c7c0fa9da7ad45 Author: Adam Jackson Date: Wed May 28 14:48:14 2014 -0400 xkb: Remove some fascinating paranoia from event emission XkbInterestPtrs are created by clients that already exist, meaning, clients that have already had ProcVector installed as something other than InitialProcVector. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit ac3af4bd21394291ef6dd9cfcdd8ce6fceefec40 Author: Adam Jackson Date: Tue Jun 17 12:58:41 2014 -0400 xfree86: Remove unused HardEdges Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 4100687ea667970733c3aa69f704be0e3747f9fd Author: Adam Jackson Date: Mon Jun 23 15:42:23 2014 -0400 xfree86: Remove useless #include "fb.h" Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 2d451c5cdc7f81ea0c94c3542fab45027f829736 Author: Adam Jackson Date: Thu May 22 14:04:16 2014 -0400 xfree86: Remove pointless xf86RandRCreateScreenResources Given the #if 0 this was wrapping for no effect. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a8cca7bd5ad7ea36a9585f4927ed53cfa6db1daf Author: Adam Jackson Date: Fri May 2 11:43:14 2014 -0400 xfree86: Remove protectMem from VidMemInfo Never filled in. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit e4cf1e58f5745dd39a9dd5eb29acd1cb28710094 Author: Adam Jackson Date: Fri May 2 11:11:14 2014 -0400 xfree86: Remove unused xf86{Map,Unmap}LegacyIO I ported these to pciaccess in: commit 858fbbb40d7c69540cd1fb5315cebf811c6e7b3f Author: Adam Jackson Date: Fri Sep 16 13:33:04 2011 -0400 pci: Port xf86MapLegacyIO to pciaccess As of yet there are still no drivers using them, and there's not a lot of value in having the wrappers when they just trivially call pciaccess anyway. Nuke 'em. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 96206cf47752af3fc8ca14dc1e03c59ed482167f Author: Adam Jackson Date: Tue Jul 8 13:19:08 2014 -0400 xfree86: Remove deprecated PCI types Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 46fd5a28ef7191b5ad0244f849c756dd2c5f43b6 Author: Adam Jackson Date: Fri May 2 11:09:53 2014 -0400 xfree86: Remove some unused pre-pciaccess types Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 3bb9f9862b5bea3720ba7922714af729cab38776 Author: Adam Jackson Date: Fri Feb 28 13:31:08 2014 -0500 xfree86: Remove xf86ConfigActivePciEntity The giant OBSOLETE DO NOT USE comment has been there since 2000, probably it's safe to nuke by now. Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 51531a67179e342f6ad798de21accf014748a04f Author: Adam Jackson Date: Tue Jun 10 13:10:28 2014 -0400 vgahw: Nuke unused vgaCmap.c Never been built since m12n, can't be needed. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 2db71b232c4756773562182cadb7ccdf5194a62d Author: Adam Jackson Date: Tue Jun 10 13:00:11 2014 -0400 saver: Don't open-code IsMapInstalled Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit dd0e8491f75afbd72bea17172a042aa45ff7e30b Author: Adam Jackson Date: Fri Jun 20 12:36:10 2014 -0400 render: Remove unused CopyPicture Arguably this would be useful API, but it's never called, and a careful reading of the CPClipMask path reveals that callers would be fairly disappointed. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 578026fcd58d12dd0be4c0976ee5ecf95a9d61f0 Author: Adam Jackson Date: Tue May 20 12:43:59 2014 -0400 os: Remove LocalClientCred The comment lies, shm hasn't used this code since: commit fdef7be5c8d5989e0aa453d0a5b86d0a6952e960 Author: Alan Coopersmith Date: Tue Oct 9 18:44:04 2007 -0700 Sun bug 6589829: include zoneid of shm segment in access [...] Reviewed-by: Alan Coopersmith Signed-off-by: Adam Jackson commit cad9b053d52f62432dfd70e42e0240de77027cae Author: Adam Jackson Date: Tue Jul 8 13:24:25 2014 -0400 os: Remove deprecated malloc/free wrappers Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit d5b279977236c4f80a8ba81db1f81a314484facf Author: Adam Jackson Date: Thu May 22 13:58:45 2014 -0400 miext/shadow: Remove shadowInit This code is nonsensical. You end up creating a screen-sized pixmap that's totally detached from everything else, which you then listen for damage on, which means you'll never hear any damage, which means your shadow update hooks will never get called. Any driver using this would be sorely disappointed. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit cf4793d99ecee4dfd6094e02b1ccb89eb744d313 Author: Adam Jackson Date: Fri Feb 28 15:36:31 2014 -0500 miext/shadow: Remove ancient backwards-compatibility hack Here's a trip down memory lane. Back when we merged kdrive we adopted kdrive's version of shadow, which used damage directly instead of hand-rolling it. However a couple of Xorg drivers referred to the accumulated damage region in the shadow private directly, so I added a hack to copy the damage region around. That was 9148d8700b7c5afc2644e5820c57c509378f93ce, back in early 2006. Eight years is unusually patient for me. The neomagic and trident drivers were still relying on this, but they've been modified to ask the damage code for the region instead. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 35eabf2e5272e17e6765027d4baea43b34c66933 Author: Adam Jackson Date: Tue Jul 8 14:11:22 2014 -0400 mi: Remove apparently unused miSegregateChildren This came in between XFree86 4.3 and 4.4, I'm not entirely sure what it was meant to do. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 150acef3af9bb43cb60cbcc558ef3ad4a710e624 Author: Adam Jackson Date: Mon May 19 13:46:12 2014 -0400 kdrive: Remove some dead bits of the man page Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 71ef49062ee33ac49033fbcd67bab88120882668 Author: Adam Jackson Date: Fri Feb 28 14:05:25 2014 -0500 dix: Make some LBX-era code more obvious isItTimeToYield in the conditional effectively didn't do anything here. Take it out, and remove the comment since LBX proxies aren't a thing for us anymore. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a317e0a974c1597d55fe05a38b4a495c4e4e8d71 Author: Adam Jackson Date: Fri May 2 11:50:17 2014 -0400 bsd: Remove some reference arm code behind #if 0 git history is reference enough, thanks. Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 8a60d1c3f4a62675cad005107f56413f946ecd77 Author: Keith Packard Date: Mon Jul 28 11:10:15 2014 -0700 glamor: Eliminate diagonal tearing in xv This uses a single large triangle and a scissor to draw the video instead of two triangles. Signed-off-by: Keith Packard Reviewed-by: Alex Deucher commit 29eaa61cb210e0c67004bc567af0c15d48aad626 Author: Adam Jackson Date: Tue Jul 22 11:05:32 2014 -0400 mi: Remove semi-arbitrary arch awareness in packed coordinate macros The majority of arches end up on the right-shift path here. I can't think of any arch where that'd be slower than a divide, and semantically it makes more sense to think of this as a shift operation anyway. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 6ddd164508f81e9582b66061b385bd34ac1ccb7e Author: Adam Jackson Date: Tue Jul 22 10:59:13 2014 -0400 xfree86: Unify the ppc/sparc mmio-swap-or-not conditionals Map SPARC_MMIO_IS_BE and PPC_MMIO_IS_BE to MMIO_IS_BE and use the same macros for both since they're identical. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 8ffd1c066ab1e993d8964aef12a7c585329c677c Author: Adam Jackson Date: Tue Jul 22 10:59:12 2014 -0400 xfree86: Clean up some silly __sparc macro usage The top of this file already defines __sparc__ if __sparc is defined. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 1c1711b57f2c278c0df03bf9e7e9a1776a546968 Author: Adam Jackson Date: Tue Jul 22 10:59:11 2014 -0400 xfree86: Pull generic barrier() definition up to top level And remove the redundant redecl from the nds32 section. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit c73929bbfc14ba80397c53ca98d3b503c807ae78 Author: Adam Jackson Date: Tue Jul 22 10:59:10 2014 -0400 xfree86: Remove MMIO_ONB* and friends Non-barrier-emitting MMIO writes. They appear to be utterly unused, burn it all down. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 9b33e31d4160dc484ee569740f883f4d34e10653 Author: Adam Jackson Date: Tue Jul 22 10:59:09 2014 -0400 xfree86: Clean up powerpc barrier decls I think the externs are there for the non-gcc case? And maybe there was some assembly code to implement that once? Whatever, at this point on ppc the compiler is either gcc or willing to pretend. The macros below the decls take care of the actual eieio so the externs can just go. Also remove a comment that maybe made sense once upon a time. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit b5141a1fab4d45c1af62db8dc712deb9776668a9 Author: Adam Jackson Date: Tue Jul 22 10:59:08 2014 -0400 xfree86: Simplify a bunch of OS and arch conditionals All of this is inside #ifdef __GNUC__, between that and configure.ac we can assume there's a unixy thing under us. Given that there's no real reason to limit the arch paths to particular OSes, so let's not. The final #elif here, combined with the ones before it, effectively said "if not (alpha amd64 sparc* mips* ppc* arm* nds32 m68k sh hppa s390 m32r)", and as the comment above it hints, it's meant to cover i386 (and happens to also cover itanic). Flip the conditional around to be sensible. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 6d3ba80f197b04b6e0814190cf5c678c786c14d6 Author: Adam Jackson Date: Tue Jul 22 10:59:07 2014 -0400 xfree86: Remove pre-2.6 Linux ppc support 2.6.0 was December 2003, you've had plenty of time to get your head in the game. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit e242e82eba17414603c8806fffc9ecd235eebabb Author: Adam Jackson Date: Tue Jul 22 10:59:06 2014 -0400 xfree86: Remove a useless !__SUNPRO_C guard You can't tell from context here, but this is all inside #ifdef __GNUC__, so this conditional can't do squat. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 93745a6c1afc830759219f8632ec565d83c7bc12 Author: Adam Jackson Date: Tue Jul 22 10:59:05 2014 -0400 xfree86: Undef GCCUSESGAS Can't be needed, we've never defined it in modular xserver. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit b1d9bc8d1d828b0dedda46da98628b47915e6a04 Author: Adam Jackson Date: Tue Jul 22 10:59:04 2014 -0400 xfree86: Remove an unlikely bit of #pragma __USLC__ appears to mean the SCO OpenServer compiler, which configure.ac doesn't think is an OS the xfree86 ddx supports. The conditionals surrounding these pragmas effectively mean "if not gcc and not Sun C", and probably arbitrary pragmas aren't supported by arbitrary compilers. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit f7f9ccef1dc251a1b95ca698ac39bd0a47f0c8fa Author: Adam Jackson Date: Tue Jul 22 10:59:03 2014 -0400 xfree86: Undef __HIGHC__ MetaWare High C++ compiler? xfree86 cvs history shows this being added in a commit whose text is, classically, "updates". metaware.com redirects to a 404 on synopsys.com, which to me indicates it's not super important to them, and their order form won't even tell you how much the thing costs. At any rate if this is worth worrying about it's worth letting autoconf worry about for us. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 80446086b9cfcc5e23a400d7fa38ec773fae68fc Author: Adam Jackson Date: Tue Jul 22 10:59:02 2014 -0400 xfree86: Undef FAKEIT I guess this is meant to stub out all I/O port calls? Whatever, it's not been defined by the buildsystem at least as far back as monolith 6.8.2. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 8002b1a8cb18ecc6526e8ebfd769767f8991ebd6 Author: Adam Jackson Date: Tue Jul 22 10:59:01 2014 -0400 xfree86: Remove a few random ppc decls Whatever these are, they're not something grep can find, they must not be used. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 5f5af5d6692b625f6231c8bca3ac801f2ac75717 Author: Adam Jackson Date: Tue Jul 22 10:59:00 2014 -0400 xfree86: Remove remaining unused unaligned accessors Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit d28b788e11182d134bce5a414359841b37b62ac0 Author: Adam Jackson Date: Tue Jul 22 10:58:59 2014 -0400 xfree86: Move generic unaligned helpers into int10 code This is the only place they're actually used (well, aside from some XAA code in the s3 driver, but one s3 and 2 XAA). Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 956a8d5c92a66ddd8d00e63a95b17cfd376fe424 Author: Adam Jackson Date: Tue Jul 22 10:58:58 2014 -0400 xfree86: Remove unused unaligned int64 helpers Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit da2b2671863655776d60102ddc7af61470d14022 Author: Adam Jackson Date: Tue Jul 22 10:58:57 2014 -0400 xfree86: Unspecialize gcc variants of unaligned memory access Yes yes, very clever, memmove works fine on gcc too, let's just do the portable thing since none of this is performance code. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit e03c902e03dea7a6a98ad5fb00580b9404b67c4d Author: Adam Jackson Date: Tue Jul 22 10:58:56 2014 -0400 xfree86: Undefine NO_INLINE Nothing in the server defines this, nor do any drivers. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit f63b8e44ab278dd65be93146790bf150717fc1c8 Author: Adam Jackson Date: Tue Jul 22 10:58:55 2014 -0400 xfree86: Remove MMIO_MOVE32 Only used by mach64's XAA code, which isn't built if XAA isn't available, and it isn't. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 1100935650cc0032709d095d6d5a5f136bec99b9 Author: Adam Jackson Date: Tue Jul 22 10:58:54 2014 -0400 xfree86: Remove nds32_flush_icache I guess this might have been needed for elfloader, except we didn't support nds32 back then, so I assume this was cargo-culted from ppc_flush_icache, which is also dead now. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit eb76228080da6fb28c34c903a9854aebe157d2c7 Author: Adam Jackson Date: Tue Jul 22 10:58:53 2014 -0400 xfree86: Remove #include "compiler.h" from places that don't need it Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 4afedf545b673282f2e214c0e2c759c9be9b9a2a Author: Ross Burton Date: Wed Jul 9 11:33:23 2014 +0100 configure.ac: add option for xshmfence xshmfence is usable outside of DRI3, and is currently autodetected which isn't good for distributions where deterministic builds are desired. Signed-off-by: Ross Burton Reviewed-by: Matt Turner Signed-off-by: Keith Packard commit 2172714c67d8701aa54c202e89f246f1dddac80a Author: Carlos Garnacho Date: Tue Jul 22 17:55:25 2014 +0200 xwayland: Only disable/enable devices on capabilities change Anytime a capability is first reported, the device is created, but after that, it is only disabled/enabled. This is a closer behavior to what Xorg does on VT switch, at the expense of maybe leaving a dangling "physical" device if a capability goes for good. Otherwise, any DeviceIntPtr (re)created after server initialization will be left floating, and bad things happen when the wayland enter event handler tries to update cursor position based on a floating device. Signed-off-by: Carlos Garnacho Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 556cdf8fe870bc23e0393c0eed15c86f49a0b9f8 Merge: 83701c4ee 1faa76670 Author: Keith Packard Date: Thu Jul 24 16:51:00 2014 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 83701c4ee8f79f69f4286ef262cd3ae3922629b9 Author: Adam Jackson Date: Mon Jul 21 10:21:07 2014 -0400 xfree86: Remove i2c multimedia modules These came in with the GATOS merge I think. The only driver using them was radeon, and then only in UMS mode. The radeon driver dropped UMS support from the main branch about two years ago, the UMS branch hasn't been touched in about fifteen months, and does not build against 1.16 in any case, so this is all dead code. Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 4302484ef2e67b2e05756c7ee0834dce938f1b44 Author: Adam Jackson Date: Mon Jul 21 10:06:53 2014 -0400 dix: Remove arch awareness from servermd.h (v2) At this point we have no architectures where image byte order is different from bitmap bit order, or where either of those two are not also the native word endianness. Hooray, one more place where we don't have to worry about enabling new CPU architectures. v2: Rebase to master to handle the addition of ppc64le, arc, and xtensa, and use autoconf's endianness detection instead of gcc predefines. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 860cd209679a2e56460977882b3b3826ddcb8710 Author: Adam Jackson Date: Mon Jul 21 10:06:52 2014 -0400 dix: Remove a weird case of little-endian s390 I really don't think this was ever correct, but I'm also not sure what non-Linux Unix this was meant to enable. The only one I know of was OS/390 / z/OS / OpenEdition, but I think that was big-endian too. At any rate this is all about to go away, so this is just removing an edge case. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit f593d76de76a645e29af5dd457ad1fd5a30736cc Author: Adam Jackson Date: Mon Jul 21 10:06:51 2014 -0400 dix: Remove wacky sparc special casing (v2) This appears to be defining sparc if ever __sparc or __sparc__ were defined, which is almost reasonable, but these days we want to be using the __arch__ style. Why any of this would ever be triggered on m68k is truly a mystery for the ages. v2: Fix commit message, as noted by nix Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 17c3347f14822b9f7da4253c71f6ed51be2b38d1 Author: Adam Jackson Date: Mon Jul 21 10:06:50 2014 -0400 dix: Default GLYPHPADBYTES to 4 This effectively no longer varied across architectures anyway. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 094b76735cb99b9f26e21f32170614454c644653 Author: Adam Jackson Date: Mon Jul 21 10:06:49 2014 -0400 dix: Remove some cfb leftovers These macros meant something in cfb, but not in fb. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit fee9a1536651ace9324b956df809ef22a63938f8 Author: Adam Jackson Date: Mon Jul 21 10:06:48 2014 -0400 dix: Remove some dead macros Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 634aa310c5130ef4d38f339bb26b01b5a7bad4e9 Author: Adam Jackson Date: Mon Jul 21 10:06:47 2014 -0400 dix: (Don't) change BITMAP_SCANLINE_UNIT on Linux s390{, x} Every other architecture sets this to 32, and I can't think of any benefit s390 would derive from changing it. It is, at any rate, something the client already copes with, and the only internal code impact seems to be some complicated math in miGetPlane, which you never hit if you're using fb. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit f6469f1910c72add358b7263d69bd116b4450ece Author: Adam Jackson Date: Mon Jul 21 10:06:46 2014 -0400 dix: Remove some XFree86 3.x leftovers Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 5aaacb501ff26bad391664cc7367bfe5164f72c7 Author: Adam Jackson Date: Mon Jul 21 10:06:45 2014 -0400 dix: Remove an ancient IBM configuration Whatever unix this was meant to be is either no longer in circulation, or is AIX, which we don't claim to support anyway. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 06268a0c55b7ce2737bdaa39f11cce07efa8bfa3 Author: Aaron Plattner Date: Sat Jul 19 09:59:07 2014 -0700 xfree86: Remove stale /usr/share/X11/xorg.conf.d hard-code from the xorg.conf man page I forgot that the old behavior of searching in /usr/share/X11/xorg.conf.d was documented in the man page. Signed-off-by: Aaron Plattner Fixes: acc0b5edd1dc ("xfree86: Only support one sysconfigdir") Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 1faa76670572e3478965fd2cd9ab60ab2d865e3a Author: Jeremy Huddleston Sequoia Date: Sat Jul 19 17:08:09 2014 -0700 mieq: Fix a crash regression in mieqProcessDeviceEvent (lldb) bt * thread #6: tid = 0x92d4eb, 0x00000001001dee94 X11.bin`mieqProcessDeviceEvent(dev=0x0000000000000000, event=0x0000000100298bb0, screen=0x0000000000000000) + 36 at mieq.c:519, stop reason = EXC_BAD_ACCESS (code=1, address=0x44) * frame #0: 0x00000001001dee94 X11.bin`mieqProcessDeviceEvent(dev=0x0000000000000000, event=0x0000000100298bb0, screen=0x0000000000000000) + 36 at mieq.c:519 frame #1: 0x00000001001df3eb X11.bin`mieqProcessInputEvents + 555 at mieq.c:631 frame #2: 0x0000000100017674 X11.bin`ProcessInputEvents + 20 at darwinEvents.c:422 frame #3: 0x0000000100175eaa X11.bin`Dispatch + 154 at dispatch.c:357 frame #4: 0x0000000100181b4a X11.bin`dix_main(argc=4, argv=0x00007fff5fbff750, envp=0x00007fff5fbff650) + 1594 at main.c:296 frame #5: 0x000000010001ba80 X11.bin`server_thread(arg=0x0000000101208220) + 64 at quartzStartup.c:66 frame #6: 0x00007fff89bb9899 libsystem_pthread.dylib`_pthread_body + 138 frame #7: 0x00007fff89bb972a libsystem_pthread.dylib`_pthread_start + 137 frame #8: 0x00007fff89bbdfc9 libsystem_pthread.dylib`thread_start + 13 Regression from: 9fb08310b51b46736f3ca8dbc04efdf502420403 Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer commit cff12936275db2f71f6d24f9ea0985a0d14af454 Author: Keith Packard Date: Fri Jul 18 21:46:23 2014 -0700 glamor: sync_fence_set_triggered should use glFlush, not glFinish I intended to use glFlush all along, but somehow managed to type glFinish instead. glFlush is sufficient (for a single-queue GPU) to ensure serialization between queued rendering in the X server and future rendering from the client. Signed-off-by: Keith Packard Reviewed-by: Jasper St. Pierre commit cfa302d6224d10860e60491333950544c4fb9b04 Author: Keith Packard Date: Fri Jul 18 11:16:27 2014 -0700 glamor: Add support for SHM sync fences This hooks up SHM sync fences to complete the requirements for DRI3 running on Glamor. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit ac3acab1311c47cc73e2681e575f0407284c3c66 Author: Colin Walters Date: Fri Jul 18 09:13:54 2014 -0400 xf86platformBus: Add assertion to avoid (fatal) compiler warning Compilation of -video-intel started failing in gnome-continuous, it's because xserver has -Werror=return-type on, and gcc can't prove this function always returns a value: /usr/include/xorg/xf86platformBus.h:119:1: error: control reaches end of non-void function [-Werror=return-type] Let's add assertions to the accessor functions to fix this. Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 5c2e9fa3d6c4bdf626fededce866056ba8eca502 Merge: e678b4971 6d4954884 Author: Keith Packard Date: Thu Jul 17 20:06:21 2014 -0700 Merge remote-tracking branch 'anholt/glamor-next' commit 6d4954884908ea9894fcfe9836db1ba7bb45be61 Merge: 9ddcb20f4 55f5bfb57 Author: Eric Anholt Date: Thu Jul 17 18:00:44 2014 -0700 Merge remote-tracking branch 'origin/master' into glamor-next I've done this merge manually to resolve the minor conflict in glamor.c. Signed-off-by: Eric Anholt commit 9ddcb20f47b5e199989c8990512b0bca1354af86 Author: Eric Anholt Date: Mon Jun 16 07:24:09 2014 +0100 glamor: Drop the "are we doing a series of blits or draws" logic. It's unused since keithp's copy acceleration code completely replaced glamor_copyarea.c and removed the blit path. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit b03a581d8cbe3f29140935063b865285e2a00333 Author: Eric Anholt Date: Mon Jun 16 07:15:58 2014 +0100 glamor: Remove a dead prototype. The corresponding code was deleted in 2ff41008494e6c5909c058f1f80b4f66617dada1 (2012) Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit b5f94df319469ad44b0e88374a0d389414803f7a Author: Eric Anholt Date: Mon Jun 16 07:06:30 2014 +0100 glamor: Drop dead glamor_restore_pixmap_to_texture(). Unused since the glamor_prepare.c replacement of glamor_finish_access(). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 98155bd9d9b2a15a4dbcf80b2b57a7636efb14da Author: Eric Anholt Date: Mon Jun 16 07:01:28 2014 +0100 glamor: Drop dead glamor_download_pixmap_to_cpu() Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit b6181007de357da58125e022992f165b10eda65d Author: Eric Anholt Date: Mon Jun 16 07:04:01 2014 +0100 glamor: Drop dead get/pub sub pixmap functions. These were replaced by the new glamor_prepare.c code. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e310387f443b6333edf02c8980daa303505382b4 Author: Eric Anholt Date: Sun Jan 12 10:19:10 2014 -0800 glamor: Remove always-true yInverted flag. All users of glamor had the same value set, and it complicated things for no reason. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit d71ecbb458c15fda608654b78d99683ebeab3c60 Author: Eric Anholt Date: Sun Apr 6 07:22:26 2014 -0700 glamor: Drop constant arguments to glamor_solid(). After keithp's change to drop the old glamor_fill() code, nothing ever changed these values. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit db9bff5c389f96991df8d6c62df1174e62e937d3 Author: Eric Anholt Date: Wed Apr 2 12:09:47 2014 -0700 glamor: Drop unnecessary glTexParameteri() in upload of texture data. We're not drawing, and we're not initially setting up the texture for later drawing. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 1140a89d7762540965ff865d154cb0528049066f Author: Eric Anholt Date: Wed Apr 2 12:12:06 2014 -0700 glamor: Use MIN/MAX macros to clean up glamor_transfer.c Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 2ab0fba9df695f19f0b43321d01395736f865c69 Author: Eric Anholt Date: Wed Apr 2 13:41:09 2014 -0700 glamor: Drop unnecessary glTexParameteri() in SetSpans(). If this path needed the filters set, so would all the other glDrawArrays() callers. But they don't. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e678b4971b666e65a99c141e0a5f33969aa701b7 Author: Keith Packard Date: Tue Jul 15 17:31:59 2014 -0700 xfree86: Provide backward-compatibilty API for OdevAttributes This allows drivers to compile using the old OdevAttributes API against a new server. It generates compiler errors if the caller uses the wrong or undefined attribute types, or if the caller provides an incorrect default value for an integer attribute. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 60c05ce1ab5d9dc7c034b6b3723f43a42ea637d8 Author: Keith Packard Date: Tue Jul 15 17:31:58 2014 -0700 config: Replace OdevAttributes linked list with struct OdevAttributes are a fixed set of values with known types; instead of storing them in a linked list and requiring accessor/settor functions, replace the list header, struct OdevAttributes, with a struct that directly contains the values. This provides for compile-time typechecking of the values, eliminates a significant amount of code and generally simplifies using this datatype. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 55f5bfb578e934319d1308cbb56c900c5ac7cfa7 Author: Keith Packard Date: Wed Jul 16 16:03:23 2014 -0700 glamor: Fix temp picture coordinates in glamor_composite_clipped_region To understand this patch, let's start at the protocol interface where the relationship between the coordinate spaces is documented: static Bool _glamor_composite(CARD8 op, PicturePtr source, PicturePtr mask, PicturePtr dest, INT16 x_source, INT16 y_source, INT16 x_mask, INT16 y_mask, INT16 x_dest, INT16 y_dest, CARD16 width, CARD16 height, Bool fallback) The coordinates are passed to this function directly off the wire and are all relative to their respective drawables. For Windows, this means that they are relative to the upper left corner of the window, in whatever pixmap that window is getting drawn to. _glamor_composite calls miComputeCompositeRegion to construct a clipped region to actually render to. In reality, miComputeCompositeRegion clips only to the destination these days; source clip region based clipping would have to respect the transform, which isn't really possible. The returned region is relative to the screen in which dest lives; offset by dest->drawable.x and dest->drawable.y. What is important to realize here is that, because of clipping, the composite region may not have the same position within the destination drawable as x_dest, y_dest. The protocol coordinates now exist solely to 'pin' the three objects together. extents->x1,y1 Screen origin of clipped operation width,height Extents of the clipped operation x_dest,y_dest Unclipped destination-relative operation coordinate x_source,y_source Unclipped source-relative operation coordinate x_mask,y_mask Unclipped mask-relative operation coordinate One thing we want to know is what the offset is from the original operation origin to the clipped origin Destination drawable relative coordinates of the clipped operation: x_dest_clipped = extents->x1 - dest->drawable.x y_dest_clipped = extents->y1 - dest->drawable.y Offset from the original operation origin: x_off_clipped = x_dest_clipped - x_dest y_off_clipped = y_dest_clipped - y_dest Source drawable relative coordinates of the clipped operation: x_source_clipped = x_source + x_off_clipped; y_source_clipped = y_source + y_off_clipped; Mask drawable relative coordinates of the clipped operation: x_mask_clipped = x_source + x_off_clipped; y_mask_clipped = y_source + y_off_clipped; This is where the original code fails -- it doesn't subtract the destination drawable location when computing the distance that the operation has been moved by clipping. Here's what it does when constructing a temporary source picture: temp_src = glamor_convert_gradient_picture(screen, source, extent->x1 + x_source - x_dest, extent->y1 + y_source - y_dest, width, height); ... x_temp_src = -extent->x1 + x_dest; y_temp_src = -extent->y1 + y_dest; glamor_convert_gradient_picture needs source drawable relative coordinates, but that is not what it's getting; it's getting screen-relative coordinates for the destination, adjusted by the distance between the provided source and destination operation coordinates. We want x_source_clipped and y_source_clipped: x_source_clipped = x_source + x_off_clipped = x_source + x_dest_clipped - x_dest = x_source + extents->x1 - dest->drawable.x - x_dest x_temp_src/y_temp_src are supposed to be the coordinates of the original operation translated to the temporary picture: x_temp_src = x_source - x_source_clipped; y_temp_src = y_source - y_source_clipped; Note that x_source_clipped/y_source_clipped will never be less than x_source/y_source because all we're doing is clipping. This means that x_temp_src/y_temp_src will always be non-positive; the original source coordinate can never be strictly *inside* the temporary image or we could have made the temporary image smaller. x_temp_src = x_source - x_source_clipped = x_source - (x_source + x_off_clipped) = -x_off_clipped = x_dest - x_dest_clipped = x_dest - (extents->x1 - dest->drawable.x) Again, this is off by the destination origin within the screen coordinate space. The code should look like: temp_src = glamor_convert_gradient_picture(screen, source, extent->x1 + x_source - x_dest - dest->pDrawable->x, extent->y1 + y_source - y_dest - dest->pDrawable->y, width, height); x_temp_src = -extent->x1 + x_dest + dest->pDrawable->x; y_temp_src = -extent->y1 + y_dest + dest->pDrawable->y; Signed-off-by: Keith Packard Reviewed-by: Markus Wick commit 16fbad3c7a22d2fb33549bcd422de985a60982b8 Author: Keith Packard Date: Thu Jul 17 16:17:53 2014 -0700 Post 1.16 version bump to 1.16.99.1 And we're off towards 1.17; this version bump serves to keep development versions distinct from stable versions. Signed-off-by: Keith Packard commit bfa5c73a36230f77fb211f185152212541c9d56d Author: Keith Packard Date: Wed Jun 4 22:00:45 2014 -0700 ephyr: Free damage structure at server reset time The usual mechanism for freeing a damage structure when the pixmap is destroyed does not work for the screen pixmap as it isn't freed in the normal way. The existing driver cleanup function, scrfini, is called after the wrapped CloseScreen functions, including damageCloseScreen, are called and thus ephyr can't free the damage structure at that point. Deal with this by providing an early CloseScreen hook in KdCloseScreen which ephyr can use to free the damage structure before damage itself shuts down. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 3319e7041ff89bb01b16a1dbbac85e28b1976ae3 Author: Keith Packard Date: Fri Apr 18 14:24:29 2014 -0700 hw/xfree86: Let xf86Rotate leave the BlockHandler unwrapped when possible When no shadow frame buffer is needed, the rotate block handler doesn't need to be called any more. Remove it from the chain. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 79a2733005202af43821d8fd8e4c9fb77bf8f69e Author: Keith Packard Date: Fri Apr 18 14:11:17 2014 -0700 hw/xfree86: Fix VGA arbiter screen proc wrapping Change the screen proc epilog code to re-fetch the current screen function in case a nested proc changes how things work. This isn't a problem with the current code as all of the wrapping layers that are set up at server init time (like the VGA arbiter) leave themselves in the screen proc chain forever. But, this makes the code conform with the expected norms. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit a1189fe322724ab1b524aaad5b700287777252bd Author: Keith Packard Date: Fri Apr 18 13:57:55 2014 -0700 mi: Fix block handler wrapping in miSprite miSpriteBlockHandler was leaving the BlockHandler wrapped until just before calling any nested block handler. If any code executed before that added or removed block handlers, the wrapping chain would have been broken. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 08fc33042c858568e7244eb9ad25a8d0270754f0 Author: Keith Packard Date: Fri Apr 18 13:55:50 2014 -0700 hw/xfree86: Fix block handler wrapping in xf86Rotate xf86Rotate, it was delaying unwrapping the BlockHandler until after calling xf86RotateRedisplay. If there was a software cursor on the screen, the redisplay operation would cause cursor to be removed from the frame buffer and the misprite block handler to be inserted into the block handler chain with the misprite screen private saved block handler now set to xf86RotateBlockHandler. When xf86RotateRedisplay returned, xf86RotateBlockHandler would then set screen->BlockHandler to its saved value, call down and then reset screen->BlockHandler to xf86RotateBlockHandler. miSpriteBlockHandler would never be called after that, which meant that the software cursor will now disappear from the screen whenever rendering overlapped and would only reappear when the cursor was moved. To correct this, all that is needed is to move the restoration of screen->BlockHandler to the top of xf86RotateBlockHandler, before the call to xf86RotateRedisplay. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit c75fee79ace394f6f51aa6fdda1c0436eb8a2026 Author: Keith Packard Date: Fri Apr 18 13:54:11 2014 -0700 Document how to correctly wrap screen procedures This adds a large comment to include/scrnintstr.h which should serve to document the correct way to wrap any screen procedure, with a particular focus on how to dynamically add/remove wrapping layers while the server is running. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 5eb77697ea35e7dc8cb8af2c3b5d8ffdba0fb632 Author: Peter Harris Date: Mon Mar 10 18:31:33 2014 -0400 Avoid starting a comment with */* Even though -Wcomment doesn't mind it (in gcc or clang), the appearance of */* confuses the syntax highlighter of some editors (eg. vim), and causes warnings in MSVC. Signed-off-by: Peter Harris Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 8b36e1ec8dd9f53e9f4e10422c2100844e9e549c Author: Keith Packard Date: Thu Jul 17 00:03:33 2014 -0700 Update to version 1.16.0 Signed-off-by: Keith Packard commit 4dbb641bb2d4037f107b58b31e80963dc8b72c0e Author: Hans de Goede Date: Mon Jul 14 14:01:47 2014 +0200 config_odev_add_attribute*: Check for right attribute type Don't allow setting string attributes to integers and vice versa. Signed-off-by: Hans de Goede Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 25eca7ce35973577c8d85704c270f7fb53e6732e Author: Hans de Goede Date: Mon Jul 14 14:01:46 2014 +0200 Fix ODEV_ATTRIB_DRIVER overlapping with ODEV_ATTRIB_FD Looks like the value of ODEV_ATTRIB_DRIVER was not updated when the patch adding it got rebased on top of a newer server version. This fixes the xserver crashing when systemd-logind integration is used. https://bugzilla.redhat.com/show_bug.cgi?id=1118540 Signed-off-by: Hans de Goede Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 9a19bf06b5b409fa0d5b5932e29cd4c5545052c5 Author: Peter Hutterer Date: Mon Jul 14 15:05:58 2014 +1000 Revert "dix: fix up coordinate scaling when external monitors are present" This reverts commit d90b5f83010248be65b2039b0b2d0b9e6a4e93cf. Reverting for two reasons: * the scaling does not work on devices that don't advertise resolution, and the default resolution used (100 units/mm) is higher than most devices, resulting in a significant slowdown of the touchpads. * the scaling is still affected by resolution changing. The patch worked before acceleration but since it maps into resolution-dependent dx/dy coordinates the acceleration may distort the movement after the fact. So the same input data generates different movements depending on the resolution. This can't easily be fixed for all affected devices as synaptics has its own velocity calculation method whereas wacom doesn't. So anything in the server won't work for both at the same time. Revert this for now, until a more integrated solution can be implemented. commit acc0b5edd1dc560b5c39dc44872b46581ec23903 Author: Aaron Plattner Date: Fri Jul 11 15:56:35 2014 -0700 xfree86: Only support one sysconfigdir When the X server is compiled with --prefix set to something other than /usr, then it ends up with a nonstandard sysconfigdir in its .pc file. This causes various other components to install their xorg.conf.d snippets there. However, the X server first looks for /usr/share/X11/xorg.conf.d before looking in sysconfigdir. That means that if the system administrator installed anything that created that path, the user's custom sysconfigdir is not searched. Rather than doing that, just look in the configured sysconfdir and nowhere else. Signed-off-by: Aaron Plattner Reviewed-by: Julien Cristau Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 578b9283bcc129d0a35fabe2637c7622085ef1e8 Author: Peter Hutterer Date: Thu Jul 10 10:39:50 2014 +1000 xfree86: don't force the screensaver off on DPMS unblank, merely suggest it Commit 41d4beb2616ceb3f1a1b8694733e85bae70de59a added symmetry to the screensaver/DPMS invocations so that one (en|dis)ables the other. Having dependencies between DPMS and the screensaver is subject to further arguments, but in this particular case using SCREENSAVER_FORCER is detrimental. SCREENSAVER_FORCER(ScreenSaverReset) resets the idle time for all devices on DPMS unblank. It prevents at least one use-case that GNOME tries to implement: GNOME displays a notification before suspending. If the display is currently blanked, GNOME lights it up to display the message. With the original patch in place DPMS unblank also resets the device idle times, thus restarting the timeout ad infinitum. Switch this to a more suggestive SCREENSAVER_OFF(ScreenSaverReset). This keeps the symmetry in blanking mode (DPMS and screensaver turn each other on/off as expected) but does not reset the idle time on the devices. https://bugzilla.gnome.org/show_bug.cgi?id=731241 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-By: Egbert Eich commit daa1a9d22db8e83d1933d8403acf72626199ee2a Author: Peter Hutterer Date: Mon Jul 7 08:27:44 2014 +1000 os: prevent negative array index access (#80890) If an empty string is provided to LogMessageVerbSigSafe, the length of the printed string is 0. Read-only access only and the only effect it had was adding a linebreak or not. X.Org Bug 80890 Signed-off-by: Peter Hutterer commit 9de3cc8daa4c6e877d30a0e8ccfe0cc159f1dbe3 Merge: 9308eafb7 a5499870e Author: Keith Packard Date: Mon Jul 7 16:53:07 2014 -0700 Merge remote-tracking branch 'jturney/master' commit 9308eafb7d303739b81634ed2ee0da88554fd429 Author: Keith Packard Date: Mon Jul 7 16:28:26 2014 -0700 Update to version 1.15.99.904 One more RC to get the non-PCI patches tested before release Signed-off-by: Keith Packard commit b6cc489838dca0bcec7e9dbb4663b871e8cb7bc8 Author: Thierry Reding Date: Thu Feb 13 21:09:49 2014 +0100 xfree86: Make error message more readable While at it also replace a tab by four spaces for consistency. Reviewed-by: Aaron Plattner Tested-By: Aaron Plattner Signed-off-by: Thierry Reding Reviewed-by: Rob Clark Tested-by: Rob Clark Signed-off-by: Keith Packard commit eeefecd9df88920d4dca4100a84a135f7f53dd82 Author: Thierry Reding Date: Thu Feb 13 13:54:23 2014 +0100 xfree86: Support driver loading via OutputClass Use the OutputClass configuration to determine what drivers to autoload for a given device. Reviewed-by: Aaron Plattner Tested-By: Aaron Plattner Signed-off-by: Thierry Reding Tested-by: Rob Clark Signed-off-by: Keith Packard commit a270bb18baa6e3b45fa4a105a8d2be51ac5270bc Author: Thierry Reding Date: Thu Feb 13 13:42:05 2014 +0100 xfree86: Introduce OutputClass configuration The OutputClass section provides a way to match output devices to a set of given attributes and configure them. For now, only matching by kernel driver name is supported. This can be used to determine what DDX module to load for non-PCI output devices. DDX modules can ship an xorg.conf.d snippet (e.g. in /usr/share/X11/xorg.conf.d) that looks like this: Section "OutputClass" Identifer "NVIDIA Tegra open-source driver" MatchDriver "tegra" Driver "opentegra" EndSection This will cause any device that's driven by the kernel driver named "tegra" to use the "opentegra" DDX module. See the OUTPUTCLASS section in xorg.conf(5) for more details. Reviewed-by: Aaron Plattner Tested-By: Aaron Plattner Signed-off-by: Thierry Reding Tested-by: Rob Clark Signed-off-by: Keith Packard commit 856bb80cea695106a8f6767d00918b38795b51c6 Author: Thierry Reding Date: Wed Feb 12 16:43:29 2014 +0100 xfree86: Store kernel driver name in platform device attribute When opening a DRM device, query the version and store the driver name as a new attribute for future reference. Reviewed-by: Aaron Plattner Tested-By: Aaron Plattner Signed-off-by: Thierry Reding Reviewed-by: Rob Clark Tested-by: Rob Clark Signed-off-by: Keith Packard commit 5a4e15c3f6fb8d674879e54458328e9f595d9451 Author: Thierry Reding Date: Fri Feb 14 15:45:33 2014 +0100 xfree86: Make driver matching consistent Most of the driver enumeration functions take an array and a maximum number of entries that they are allowed to fill in. Upon success, they return the number of entries filled in. This allows them to be easily used to consecutively. One exception is the xf86MatchDriverFromFiles() function, which doesn't return a value, so callers have to manually search the array for the first empty entry. This commit modifies the xf86MatchDriverFromFiles() to behave the same way as others, which makes it easier to deal with. Reviewed-by: Aaron Plattner Tested-By: Aaron Plattner Tested-by: Rob Clark (on arm / platform device) Signed-off-by: Thierry Reding Signed-off-by: Keith Packard commit a61ca6f006d70343c88fe45206fae0669d1e8971 Author: Tomasz Borowik Date: Thu Jul 3 13:04:44 2014 -0700 glamor: Fix stack corruption in glamor_init glGet on GL_MAX_VIEWPORT_DIMS returns two values Reviewed-by: Markus Wick Signed-off-by: Keith Packard commit 10d2805dbc6b96a159b8c5acedcd53f34df362bf Author: Keith Packard Date: Thu Jun 26 14:12:24 2014 -0700 fb: Don't free NULL pixmap in fbCloseScreen. Bug #80313 We fixed fbCloseScreen to use the FreePixmap function so that the private counts would be updated correctly during CloseScreen. Xvfb calls FreePixmap and sets devPrivate to NULL before fbCloseScreen is called; not checking devPrivate before calling would result in a NULL pointer dereference. Signed-off-by: Keith Packard Reviewed-by: Julien Cristau commit a5499870e2f88822f52b1b54cad0db69856597c0 Author: Yaakov Selkowitz Date: Sun Apr 6 04:47:15 2014 -0500 hw/xwin: link dynamically and export symbols With my patch to fix shared libXfont to work correctly on Cygwin/Win32, there is no need for -static anymore. But, XWin.exe must export its symbols in order for them to override libXfont's stubs. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY commit 5f3485b06e180674af640e7e9d7d56f67b61735b Author: Maarten Lankhorst Date: Thu Jun 26 10:37:19 2014 +0200 bump to 0.9.0 commit a3b44ad8db1fa2f3b81c1ff9498f31c5323edd37 Author: Thierry Reding Date: Wed Jun 25 16:03:29 2014 +0200 exa: Fix a warning when enabling DEBUG_TRACE_FALL The format string wants a picture and a character, but the argument list contains only a character, causing GCC to complain. Add the missing argument. Signed-off-by: Thierry Reding Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 2f113d68f6c1572576bc57ecca12e44cc9e438eb Author: Kristian Høgsberg Date: Mon Jun 16 11:34:55 2014 -0700 xwayland: Add glamor and DRI3 support Reviewed-by: Axel Davy Signed-off-by: Kristian Høgsberg Signed-off-by: Keith Packard commit fd16555c2fc606fc43236050deba558c20e184e8 Author: Michel Dänzer Date: Tue Jun 24 16:09:19 2014 +0900 Revert "glamor: Fix coordinates handling for composite source/mask pictures" This reverts commit 4e9aabb6fc15d8052934f20c6a07801c197ec36a. It broke kwin decorations with XRender compositing. Signed-off-by: Michel Dänzer Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 18744907d0766b1b57be12df5adafd0f93221006 Author: Chris Wilson Date: Tue Jun 10 07:45:05 2014 +0100 dri2: Invalidate DRI2Buffers upon SetWindowPixmap updates When transitioning to a redirected or unredirected Window, the Composite layer modifies the Window's Pixmap. However, the DRI2Buffer for the Drawable is still pointing to the backing bo of the old Pixmap with the result that rendering goes astray. This now also effects DRI2 Drawables that are touched by PresentPixmap. v2: Fixup the function name after rebasing Signed-off-by: Chris Wilson Cc: Reinis Danne Reviewed-by: Dave Airlie Cc: Keith Packard Signed-off-by: Keith Packard commit 4d92fab39c4225e89f2d157a1f559cb0618a6eaa Author: Chris Wilson Date: Wed Jun 18 11:14:43 2014 +0100 dri2: Use the PrimeScreen when creating/reusing buffers This fixes a segfault when we attempt to call ds->ReuseBufferNotify() passing a Prime DRI2BufferPtr to the master backend. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80001 Signed-off-by: Chris Wilson Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 0d9ad781807022d78239327ed508758a3f88b090 Author: Eric Anholt Date: Mon Jun 16 08:06:53 2014 +0100 glamor: Fix GLES2 non-VBO temporary memory allocation. We'd get a request for like 16 bytes, claim to have allocated GLAMOR_VBO_SIZE, and then not reallocate when something a request bigger than 16 came along. The intent was to always allocate at least GLAMOR_VBO_SIZE. Fixes segfaults with Xephyr -glamor_gles2 and running gnome-terminal. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 736bed2aaf4bb672b6c7b33146fe84700baf22bd Merge: ce581ac3f d90b5f830 Author: Keith Packard Date: Mon Jun 23 14:18:03 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit ce581ac3fa80c4c52d87bd54fa92bc566b7d6adc Author: Axel Davy Date: Wed Jun 18 22:22:09 2014 -0400 present: fix bad logic in cancelling scheduled operations. If we present several pixmaps in advance for different msc, the later one shouldn't cancel the previous ones. This reverts a change made by commit e6f5d9d7b7efdacea0f22f1808efca849bcede4c Without this fix, vblank_mode=0 glxgears doesn't update with the present fallback. Signed-off-by: Axel Davy Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit adb7bc3386559dfee34b359dadcbb6796bc416e7 Author: Dinar Valeev Date: Mon Feb 24 11:36:54 2014 +0100 arch: Fix image and bitmap byte order for ppc64le So far PPC was big endian for sure. For ppc64le this is no longer true. Signed-off-by: Egbert Eich Reviewed-by: Mark Kettenis Signed-off-by: Keith Packard commit ea47341792cf06eda5bbdf0aca48aacc024a5be0 Merge: 334faabe6 a11bbd875 Author: Keith Packard Date: Mon Jun 23 13:50:54 2014 -0700 Merge remote-tracking branch 'anholt/glamor-fixes' commit 334faabe682a422075ba214501c7554dd5ee5563 Author: Frank Binns Date: Tue Jun 10 13:43:31 2014 +0100 present: restore screen pixmap when aborting a flip If a 2D application is started on top of a fullscreen 3D application, which is flipping, then we need to stop flipping and restore the root window, and possibly the flip window, to using the screen pixmap. Normally this would be done as part of an unflip. However, in the case that there is a pending flip there is no mechanism to abort so the unflip is deferred until the pending flip completes. This provides a window of opportunity for the 2D application to draw to the wrong pixmap. Restore the screen pixmap at the point a pending flip is marked as aborted, thus avoiding this issue. Reviewed-by: Keith Packard Signed-off-by: Frank Binns Signed-off-by: Keith Packard commit d90b5f83010248be65b2039b0b2d0b9e6a4e93cf Author: Peter Hutterer Date: Fri May 30 09:56:37 2014 +1000 dix: fix up coordinate scaling when external monitors are present The goal of all this is to get an x/y motion reflecting the motion on the device, i.e. a circle on the device is a circle on the screen. This is currently done by scaling the y coordinate depending on the screen ratio vs device ratio. Depending on that ratio the movement on the y axis may be accelerated (ratio < 1) or slowed (ratio > 1). This leads to the weird effect that changing the screen ratio by plugging a new monitor changes the speed of the touchpad. Use a different algorithm: calculate the physical movement on the device, map that to the same-ish distance on the screen, then convert that back into a device-specific vector. This way we get the same mapping regardless of the current screen dimensions. Since the pointer accel code doesn't take device resolution into account, make sure we apply our crazy mapping before we accelerate. This way we accelerate resolution-independent. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 382ff4a306b97b0ddcdac03ce8611b026ca5323b Author: Keith Packard Date: Tue Jun 17 15:50:48 2014 -0700 present: Remove executing vblank from window list. Bug# 79709. Once the vblank is actually getting executed, it's lifetime is no longer tied to the window, and so it shouldn't be controlled by window destruction. In particular, if the vblank is queued for flip, it will get stored in the flip_pending field, and will be correctly destroyed when the flip completes. Signed-off-by: Keith Packard commit 199d9a6a942af9b443616f6ef6d26052ef3f48b9 Author: Eric Anholt Date: Fri Dec 27 11:12:27 2013 -0800 xephyr: Allow initializing glamor with gles2 (on GLX). This should be useful for glamor development, so you can test both paths (which are significantly different, and apparently glamor_gradient.c was broken on GLES2 as of the import). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 98b6158bc1e32aaca375829452266e013a520e14 Author: Eric Anholt Date: Sun Apr 6 07:44:20 2014 +0100 glamor: Share code for put_image handling. The difference between the two is that XF86 has the clip helper that lets you upload less data when rendering video that's clipped. I don't think that's really worth the trouble, especially in a world of compositors, so I've dropped it to get to shared code. It turns out the clipping code was broken on xf86-video-intel anyway. To reproduce, run without a compositor, and use another window to clip the top half of your XV output on the glamor XV adaptor: the rendering got confused about which half of the window was being drawn to. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 34884e16bf7c97434e7883d025c6814e083b0def Author: Eric Anholt Date: Sat Apr 5 12:30:28 2014 +0100 ephyr: Add support for XV using glamor. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 23d303bf905e76a70bda942037bdfbdcd06e55d2 Author: Eric Anholt Date: Sat Apr 5 12:57:16 2014 +0100 kdrive: Mark XV names const to avoid warnings. No code modifies it at runtime, and it's common to store string literals to it. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 65efc14b6ae1ee73bf6db379d7826b6bc9fd6d33 Author: Eric Anholt Date: Sat Apr 5 11:50:51 2014 +0100 glamor: Split the XV code into XF86-dependent parts and generic. I want to expose this from Xephyr as well, both to be able to test XV changes rapidly, and beause the XV passthrough to the host's overlay really doesn't work out well when we glXSwapBuffers() over the colorkey. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit a5662193f1c3dd63f615d96d1a300f70086ccbc6 Author: Eric Anholt Date: Sat Apr 5 12:26:33 2014 +0100 kdrive: Simplify the adaptor setup interface. Now that we don't have to worry about the generic adaptors code, there's no need to have a list of pointers to different sets of adaptors. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 55aad7399d4470bc46c064aafe07d12a6c293982 Author: Eric Anholt Date: Fri Apr 4 12:09:01 2014 +0100 kdrive: Remove dead generic XV adaptors code. I couldn't find any callers in the history of the tree. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 0edc0a78fbfac4578b0f809aef17332c1eb461e3 Author: Eric Anholt Date: Sun Apr 6 08:12:35 2014 +0100 kdrive: Do a little more cleanup from the XV struct deduplication. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 1d90e8811a7d4db328c0c944bec0aa3ed6afb70d Author: Eric Anholt Date: Fri Dec 27 21:34:44 2013 -0800 xorg: Remove duplicated definitions of some XV-related structs. These were field-for-field identical, so we can just typedef them to be the same, and memcpy their contents. v2: Fix missed strdup(). Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit a6aaa51752f301de24abce264976ba3c3a50863c Author: Keith Packard Date: Fri Mar 21 14:55:47 2014 -0700 glamor: Remove stubbed-out glamor_stipple function This function isn't used anymore. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit ef2bf0e645ed8242a0b637ed6a9d5b8c03b6b481 Author: Keith Packard Date: Fri Mar 21 14:30:33 2014 -0700 glamor: Remove 'tiling' shader code The core rendering paths all use the glamor_program fill functions now Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 18c09e60bf16b28060ade5d24110f2aa6bc19b57 Author: Keith Packard Date: Sun Mar 16 20:49:28 2014 -0700 glamor: Replace glamor_solid_boxes and glamor_solid with GC using code This provides glamor_solid_boxes and glamor_solid using regular GC operations instead of calling directly to underlying rendering functions. This will allow the old rendering code to be removed. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit bd3b2c48f69a5169aefb261c041462271c69a07a Author: Keith Packard Date: Thu Apr 3 14:22:52 2014 -0700 glamor: Add accelerated stipple support This copies the stipple to a 8bpp pixmap and uses that to paint the texture from. v2: Create deep stipple pixmap without GLAMOR_CREATE_FBO_NO_FBO v3: Fix stipple origin sign (matches tiles now). Track changes to original stipple with damage. This isn't required by the X spec, but java appears to depend on it, so we'll just do it. When Glamor switches to 8bpp bitmaps, we'll be able to render directly from them and not need this anymore. v4: Review comments from Eric: * Remove stray whitespace change * Avoid "large" pixmap for stipple by using GLAMOR_CREATE_NO_LARGE * Wrap to 80 columns v5: Don't crash when stipple damage tracker is destroyed The stipple damage tracker is automatically destroyed when the associated stipple pixmap is destroyed. When this happens, just clear the pointer from the GC rather than calling glamor_invalidate_stipple; that function would call DamageUnregister on the now invalid stipple damage pointer and crash. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit d18f5801c9a632dd4d9f8b7912491b6623e943d5 Author: Keith Packard Date: Wed Apr 2 14:07:20 2014 -0700 glamor: Add glamor_program based 0-width dashed lines This makes sure the pixelization for dashed lines matches non-dashed lines, while also speeding them up. v2: Switch to glamor_make_current v3: Create dash pattern pixmap without GLAMOR_CREATE_FBO_NO_FBO v4: Adopt suggestions from Eric's review: - Drops power-of-two alignment of our line vertex data, simplifying the code. - Stops reading from the VBO. While on keithp's and my machines the VBO is mapped cached, on many implementations it will be mapped WC, making those reads extremely expensive. - Style fixes (line wrapping, spaces around operators). v5: Adopt suggestions from Markus' review: - Use max when computing zero-width dashed line length. Don't open code max here. - Embed CoordModePrevious into VBO writing for dashed lines Instead of pre-computing the coord mode previous results, just embed this in the loop which fills the vertex buffer. Saves re-writing the request buffer, and shortens the code a bit v6: Export glamor_destroy_gc for UXA UXA needs to call glamor_destroy_gc from its GCFuncs, so export it. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit dc9fa9080a1cb994b4e54a341d2245f442dac576 Author: Keith Packard Date: Sun Mar 23 20:59:02 2014 -0700 glamor: Use glamor_program and GL_LINES for 0-width lines GL lines are nearly X compliant; you just need to fill in the last pixel when the client hasn't requested CapNotLast. v2: switch to glamor_make_current v3: use miPolylines instead of custom glamor fallback path. Wrap code to 80 columns. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 51075ebd37dca8d17c42425fb756ad3090e157c4 Author: Keith Packard Date: Fri Mar 21 18:03:07 2014 -0700 glamor: Use glamor_program for glamor_push_pixels This uses the same shaders as glamor_poly_glyph_blt. v2: Wrap some long lines (changes by anholt). Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 45ebc4e3fac7f1a85167d05e2833949b89f02d64 Author: Keith Packard Date: Sat Mar 15 13:31:18 2014 -0700 glamor: Add glamor_program based copy acceleration Paints with textures, using a temporary buffer for overlapping copies Performs CPU to GPU transfers for pixmaps in memory. Accelerates copy plane when both objects are in the GPU. Includes copy_window acceleration too. v2: Use NV_texture_barrier for non-overlapping copies within the same drawable v3: Switch to glamor_make_current v4: Do overlap check on the bounding box of the region rather than on individual boxes v5: Use Eric Anholt's re-written comments which provide a more accurate description of the code v6: Use floating point uniform for copy plane bit multiplier. This avoids an int to float conversion in the copy plane fragment shader. Use round() instead of adding 0.5 in copy plane. round() and +0.5 end up generating equivalent code, and performance measurements confirm that they are the same speed. Round() is a bit clearer though, so we'll use it. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt Reviewed-by: Markus Wick commit 0e08a79599c773f77c0667d557376a5ccee3f89c Author: Keith Packard Date: Wed Apr 2 14:05:35 2014 -0700 glamor: Directly reference the private key records There's no reason to use a pointer here, it just wastes time. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 15e4d14dfae054c026b7e965ac33985e5cf6a168 Author: Keith Packard Date: Sat Mar 15 13:27:14 2014 -0700 glamor: Replace fallback preparation code These offer a simpler and more efficient means for temporarily transitioning to CPU-accessible memory for fallback implementations. v2: Do not attempt fallbacks with GLAMOR_DRM_ONLY pixmaps glamor cannot transfer pixels for GLAMOR_DRM_ONLY pixmaps using glReadPixels and glTexSubImage2D, and so there's no way to perform fallback operations with these pixmaps. v3: Clear ->pbo field when deleting the PBO. Otherwise, we'd reuse the old name next time we fall back on the pixmap, which would potentially conflict with some other pixmap that genned a new name, or just do a lazy allocation of the name (compat GL context, like we currently use) or error out (core GL context, like we hope to use some day). Also, style fixes. Changes by anholt, acked by keithp. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 3ac481c9dac591ffc33812ab047fc793d8a43d4f Author: Keith Packard Date: Wed May 7 10:31:16 2014 -0700 mi: Draw multiple lines in one FillSpans call in miZeroLine miZeroLine allocates enough space to draw a line spanning the entire width/height of the target drawable. When drawing multiple shorter lines, this leaves most of the space in that buffer unfilled. Let multiple lines be drawn into the buffer if there is plenty of space. Speeds up glamor fallback zero-width lines: Before 6000000 trep @ 0.0020 msec (508000.0/sec): 1-pixel line 6000000 trep @ 0.0020 msec (492000.0/sec): 10-pixel line 6000000 trep @ 0.0023 msec (427000.0/sec): 100-pixel line 4000000 trep @ 0.0035 msec (282000.0/sec): 500-pixel line After: 600000000 trep @ 0.0000 msec (43400000.0/sec): 1-pixel line 140000000 trep @ 0.0001 msec (13000000.0/sec): 10-pixel line 16000000 trep @ 0.0008 msec (1300000.0/sec): 100-pixel line 4000000 trep @ 0.0038 msec (261000.0/sec): 500-pixel line (500 pixel lines do not change in performance because the buffer can only one one of them.) Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit ea678a73c5688f73071d5581b6406808b7a0230f Author: Keith Packard Date: Fri Apr 25 22:43:51 2014 -0700 mi: Fill spans for multiple arcs in miPolyFillArc This allocates span data for multiple arcs and draws the whole set in one call, rather than doing them one at a time. For modern hardware, this is a significant performance improvement. v2: Limit the number of spans per buffer to 4M to avoid integer overflow in computing the malloc size. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit a7fce36affb8211990e5b4956adea4d75f0e73c9 Author: Keith Packard Date: Wed May 7 09:58:26 2014 -0700 mi: Make miPolyArc draw fast zero-width when possible Instead of forcing drivers to figure out when to call miZeroPolyArc, have miPolyArc call that when possible. This involved renaming the existing miPolyArc call to miWideArc and creating a new miPolyArc wrapper function as miZeroPolyArc falls back to miWideArc when the arc is too large to be drawn with the zero-width code (ellipses larger than 800x800). Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit bf1429b2034a577c994ff16b60d809d05ca99241 Author: Keith Packard Date: Wed May 7 09:56:39 2014 -0700 mi: Create miPolylines as a general-purpose line drawing function Instead of requiring all drivers to figure out which mi function to call for each of the four cases, create a single wrapper in mi that handles them correctly. Now drivers can simply use miPolylines in all cases. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 14d82a2bc3179160803c62c20746630d14e1b7d7 Author: Keith Packard Date: Thu Mar 13 23:29:54 2014 -0700 ephyr: Deal with non-root visual for window glx will sometimes select a non-root visual, deal with that by creating a suitable colormap and using that instead of attempting to use the default colormap. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit a11bbd875f3f90a3d02d727778cb1d3524cf59fd Author: Eric Anholt Date: Fri May 30 10:39:30 2014 -0700 glamor: Don't leak a prepare_access_gc() in putimage fallbacks. It turns out putimage doesn't use the GC tile or stipple anyway, so there's no need to do this. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 8da1e4e2bf28c3610cdbe1770a57be89578d37f5 Author: Markus Wick Date: Wed May 14 23:08:18 2014 +0200 glamor: Choose max fbo size by texture + viewport size The max size of renderbuffers and texture often match by accident, but as we always use textures, we should check for the right flag. Also check for viewport size as this may be lower and we want to render to almost every pixmap. Signed-off-by: Markus Wick Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 3778fab34bc00334edec4f845d0c6d43440f265a Author: Markus Wick Date: Wed May 14 23:08:17 2014 +0200 glamor: Fix no-mipmap allocations With GL_TEXTURE_MIN_FILTER, we configure not to use mipmaps, but there's no real way until GL_ARB_texture_storage to dictate whether memory should be allocated for mipmap levels or not. GL_TEXTURE_MAX_LEVEL is a stronger hint to the driver than the filtering that we really don't want mipmap allocations. Stops VARM wasting warnings from the nvidia driver. Signed-off-by: Markus Wick Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Keith Packard commit 1095c262502332bc570a9b288b01da51c1fa10ec Author: Alan Coopersmith Date: Fri Jun 6 17:54:22 2014 -0700 config: show default path in help for --with-xkb-bin-directory Now shows: --with-xkb-bin-directory=DIR Directory containing xkbcomp program (default: ${bindir}) Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit e27a839bf0488d5b1cc2e2a887f2ea0e3d790790 Author: Jeremy Huddleston Sequoia Date: Thu Jun 5 20:38:44 2014 -0700 mi: Build fix: mieqProcessDeviceEvent returns void mieq.c:520:9: error: void function 'mieqProcessDeviceEvent' should not return a value [-Wreturn-type,Semantic Issue] return 0; ^ ~ 1 error generated. Regression-from: 9fb08310b51b46736f3ca8dbc04efdf502420403 Found-by: Tinderbox Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer commit 08820f03768e904f1746ef93ca01660330dc5406 Author: Keith Packard Date: Wed Jun 4 22:28:57 2014 -0700 Update to version 1.15.99.903 Signed-off-by: Keith Packard commit 9fb08310b51b46736f3ca8dbc04efdf502420403 Author: Peter Hutterer Date: Wed May 21 10:07:31 2014 +1000 mi: don't process events from disabled devices (#77884) Once a device is disabled, it doesn't have a sprite pointer anymore. If an event is still in the queue and processed after DisableDevice finished, a dereference causes a crash. Example backtrace (crash forced by injecting an event at the right time): (EE) 0: /opt/xorg/bin/Xorg (OsSigHandler+0x3c) [0x48d334] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x37fcc0f74f] (EE) 2: /opt/xorg/bin/Xorg (mieqMoveToNewScreen+0x38) [0x609240] (EE) 3: /opt/xorg/bin/Xorg (mieqProcessDeviceEvent+0xd4) [0x609389] (EE) 4: /opt/xorg/bin/Xorg (mieqProcessInputEvents+0x206) [0x609720] (EE) 5: /opt/xorg/bin/Xorg (ProcessInputEvents+0xd) [0x4aeb58] (EE) 6: /opt/xorg/bin/Xorg (xf86VTSwitch+0x1a6) [0x4af457] (EE) 7: /opt/xorg/bin/Xorg (xf86Wakeup+0x2bf) [0x4af0a7] (EE) 8: /opt/xorg/bin/Xorg (WakeupHandler+0x83) [0x4445cb] (EE) 9: /opt/xorg/bin/Xorg (WaitForSomething+0x3fe) [0x491bf6] (EE) 10: /opt/xorg/bin/Xorg (Dispatch+0x97) [0x435748] (EE) 11: /opt/xorg/bin/Xorg (dix_main+0x61d) [0x4438a9] (EE) 12: /opt/xorg/bin/Xorg (main+0x28) [0x49ba28] (EE) 13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x37fc821d65] (EE) 14: /opt/xorg/bin/Xorg (_start+0x29) [0x425e69] (EE) 15: ? (?+0x29) [0x29] xf86VTSwitch() calls ProcessInputEvents() before disabling a device, and DisableDevice() calls mieqProcessInputEvents() again when flushing touches and button events. Between that and disabling the device (which causes new events to be refused) there is a window where events may be triggered and enqueued. On the next call to PIE that event is processed on a now defunct device, causing the crash. The simplest fix to this is to discard events from disabled devices. We flush the queue often enough before disabling that when we get here, we really don't care about the events from this device. X.Org Bug 77884 Signed-off-by: Peter Hutterer Reported-by: Maarten Lankhorst Tested-by: Maarten Lankhorst Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit e6f5d9d7b7efdacea0f22f1808efca849bcede4c Author: Keith Packard Date: Mon Jan 27 11:23:58 2014 -0800 present: Queue flips for later execution When a flip (or unflip) is pending and a flip request comes in, leave it queued until the pending flip completes and then execute it. This fixes a bug where an application submitting back-to-back present_pixmap requests for sequential frames would alternate between flipping and copying as the pending flip would cause the new present_pixmap request to not use a flip. Signed-off-by: Keith Packard Reviewed-by: Chris Wilson Tested-by: Frank Binns commit 2f5cf9ff9a0f713b7e038636484c77f113a5f10a Author: Frank Binns Date: Thu Apr 24 11:37:48 2014 +0100 xfixes: disable cursor on X server reset The initial state of the cursor is set to disabled but this was never be re-disabled during X server reset. This meant any application run after an X server reset would have the cursor displayed even if it hadn't requested this to be the case. Signed-off-by: Frank Binns Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b92d86a982504af2605042c19ef796d135074ee1 Author: Brendan King Date: Thu Apr 24 11:37:47 2014 +0100 dix: fix pixmap leak on server reset The server is leaking a pixmap (created by CreateDefaultStipple()) on reset. The leak is caused by some X Server graphics contexts not being freed on reset by the machine independent cursor code in the server, which in turn is caused by the cursor cleanup code (miSpriteDeviceCursorCleanup()) not being called. Ensures the DeviceCursorCleanup() function is called when the associated input device is closed on server reset. Signed-off-by: Frank Binns Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit a99c061aafd4aaa5728c776dca7d0a1789ac739a Author: Brendan King Date: Thu Apr 24 11:37:46 2014 +0100 dix: reference the cursor just once in InitializeSprite() The new current cursor was being referenced twice, resulting in a memory leak when the current server generation ended. Signed-off-by: Frank Binns Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 444a1f7a8802999e27ecf5f6eb598df2206f7277 Author: Brendan King Date: Thu Apr 24 11:37:45 2014 +0100 fb: fix screen pixmap leak on server reset Call FreePixmap() instead of free() to destroy the screen pixmap in fbCloseScreen(). Signed-off-by: Frank Binns Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 7ca458493aa2f0aa091c989ea0768611e0730bf5 Author: Chris Wilson Date: Wed May 28 08:14:00 2014 +0100 xfree86: Report Present as a built-in module This is so that drivers can do a runtime check that Present is available, similar to existing runtime checks performed by the drivers for DRI. Signed-off-by: Chris Wilson Signed-off-by: Keith Packard commit 746be5a03ebbda4ab411ca3efb2ed95f99e9ea46 Author: Chris Wilson Date: Wed May 28 08:13:59 2014 +0100 xfree86: Report DRI3 as a built-in module This is so that drivers can do a runtime check that DRI3 is available, similar to existing runtime checks performed by the drivers for DRI and DRI2. v2: Only add DRI3 to the list if the module was actually built into the server (Mark Kettenis). Signed-off-by: Chris Wilson Cc: Mark Kettenis Signed-off-by: Keith Packard commit b5526141f78df15bc5df2497bc4b4a17f1a6368d Merge: dc8d06884 a205ec3ab Author: Keith Packard Date: Mon Jun 2 13:08:23 2014 -0700 Merge remote-tracking branch 'jturney/master' commit dc8d0688471695ec5a8db5fef93fbcfc064891d5 Author: Max Filippov Date: Mon Jun 2 01:17:31 2014 +0400 xtensa: add support for xtensa architecture Signed-off-by: Max Filippov Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit a6ffdc69c4ac45bc39924159c7fab5f02f720f1f Merge: 63c48de63 1c10b3738 Author: Keith Packard Date: Mon Jun 2 11:30:24 2014 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 63c48de63becdee680e90cb2363984c2f8f77fd1 Author: Søren Sandmann Date: Fri May 30 16:50:35 2014 -0400 xfree86: Add "modesetting" to list of fallback drivers To make X -configure work properly, the output of fixup_video_driver_list() should be in order of preference. Otherwise, the config file may use the incorrect driver for some devices. In particular, the drivers that work for all (or many) devices need to be last in the list. Since the modesetting driver works for many devices, it needs to be considered a fallback driver. Signed-off-by: Søren Sandmann Acked-by: Daniel Stone Signed-off-by: Keith Packard commit ab47ec9636b21a7f542d2e8612834915e7c8cc64 Merge: 0df871cf3 cfaf2abba Author: Keith Packard Date: Mon Jun 2 11:22:48 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit 0df871cf34ee5f1a85586206027de9b02fb364ec Author: Robert Ancell Date: Thu May 22 10:43:52 2014 +1200 Fix overflow checking extension versions The easiest way to check for the version of an extension is to send the maximum possible version numbers in the QueryVersion request. The X server overflows on these as it assumes you will send a reasonable version number. Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 4cbd3fabaa41e89579530bceb01b9239fa2afdb7 Author: Adam Jackson Date: Wed May 21 09:22:49 2014 -0400 configure: Require sufficiently new wayland-client for xwayland ddx The explicit release requests were added in 1.3.0, don't try to build against older. Signed-off-by: Adam Jackson Reviewed-by: Jasper St. Pierre Signed-off-by: Keith Packard commit a205ec3ab77c6765d44f77c526a832345fef77b0 Author: Jon TURNEY Date: Sat Apr 5 15:15:46 2014 +0100 configure: Restore DEFAULT_LOGDIR to xwin-config.h, it is used Commit f37a46913489397d8628ffe578c8d4ed50b6ca72 removed this from xwin-config.h.in for some reason, but it is used. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit aaaa41345674a1c76a70836394cb5e57f82e9a26 Author: Jon TURNEY Date: Sun Apr 27 20:55:51 2014 +0100 hw/xwin: Update for __glXLastContext -> lastGLContext Update for __glXLastContext -> lastGLContext. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 1c10b37380d228b35db8a8616a6312ac54f5e59b Author: Jeremy Huddleston Sequoia Date: Sat May 31 17:45:02 2014 -0700 XQuartz: Update logic to account for title bar on every display in Mavericks http://xquartz.macosforge.org/trac/ticket/832 Signed-off-by: Jeremy Huddleston Sequoia commit ad0ff649c68b18c4b95b078c2d1d1e7de71a7c6f Author: Jeremy Huddleston Sequoia Date: Sat May 31 17:22:51 2014 -0700 XQuartz: Dead code removal (ENABLE_DEBUG_LOG) Signed-off-by: Jeremy Huddleston Sequoia commit e281288d5afedb154f52c31f70a350a013ecfb06 Author: Jeremy Huddleston Sequoia Date: Sat May 31 13:04:43 2014 -0700 XQuartz: Bump to 2.7.7 Signed-off-by: Jeremy Huddleston Sequoia commit cfaf2abbac3f01e57d00845d8908bf01559263f9 Author: Peter Hutterer Date: Sat May 24 20:05:53 2014 +1000 man: drop specific mention of DontZap in -retro (#71113) DontZap off is the default anyway, don't mention it specifically to avoid confusion X.Org Bug 71113 Signed-off-by: Peter Hutterer commit e48a132b6d187f355abd7021be47edde972e7091 Author: Peter Hutterer Date: Sat May 24 20:02:56 2014 +1000 xfree86: fix wrong DontZap documentation (#71113) X.Org Bug 71113 Signed-off-by: Peter Hutterer commit 548fc937b22d4dfe7f96e0bd77522261603a2c2f Author: Robert Ancell Date: Thu May 22 10:43:52 2014 +1200 Fix overflow checking extension versions The easiest way to check for the version of an extension is to send the maximum possible version numbers in the QueryVersion request. The X server overflows on these as it assumes you will send a reasonable version number. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit db2e708f31a162c6c66643d3559dd5f3e21ee06b Author: Adam Jackson Date: Thu Sep 27 17:44:42 2012 -0400 glx: Require at least one True/DirectColor visual Mesa no longer supports rendering to anything less. GLX 1.2 requires that the server advertise at least one GLX visual. GLX 1.3 and 1.4 are more subtle: they require at least one fbconfig capable of window rendering, and _also_ require that window-capable fbconfigs have a non-zero value for the GLX_VISUAL_ID. In either case we should refuse to init GLX if there's not at least one GL-capable visual on at least one screen. Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit d7a2df0a7499864cb005b098b79c1bdf884f6600 Author: Steven McDonald Date: Sun May 18 13:42:08 2014 +0200 Xi: block SIGIOs while copying device classes around I've been seeing sporadic (anywhere from once every few days to 3-4 times a day) crashes and freezes in X. The problematic behaviour isn't always the same, but I chose a particular incident to debug, and found that X was segfaulting in updateMotionHistory, on line 575 of dix/getevents.c. After some further investigation, I found that the bug was being triggered when a SIGIO was received in DeepCopyPointerClasses, between the AllocValuatorClass call (line 540) and updating the to->valuator pointer (line 545). AllocValuatorClass calls realloc() on to->valuator, so between these lines, it's not guaranteed to point to allocated memory. It seems the SIGIO handler is calling updateMotionHistory, which is reading the memory pointed to by to->valuator and getting a wrong value for last_motion, which updates buff to point to wildly the wrong place and thus generates a segfault when a memcpy() is done into buff. I am attaching a patch which I've been running on that machine for the past three days, and haven't yet observed any more crashing or freezing behaviour. The patch simply calls OsBlockSIGIO while DeepCopyDeviceClasses is in progress, as the state of the X server's device data structures is not guaranteed to be in a consistent state during that time. Debian bug#744303 Signed-off-by: Julien Cristau Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d3a3ee7a0e5cbd3fcaba77d2d5664e1524eda11c Author: Peter Hutterer Date: Thu May 8 09:39:36 2014 +1000 os: automatically switch to sigsafe logging when needed If we're smart enough to warn, we should be smart enough to just pass it through to the right function. Worst case we lose some formatting specifiers which pnprintf will complain about anyway. And in most cases it won't matter. This requires renaming pnprintf to vpnprintf and changing the size_t to int to be compatible with Xvscnprintf. pnprintf is internal only, the others are exported API so we can't change them as easily. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 6d684f916b4c33327d32ef1f48803bf90357287f Author: Adam Jackson Date: Wed May 21 09:23:19 2014 -0400 shadowfb: Fix initialization This has to run at initial CreateWindow time, at CreateScreenResources the root window doesn't actually exist yet. Tested-by: Michael Thayer Signed-off-by: Adam Jackson Reviewed-by: Michael Thayer Signed-off-by: Keith Packard commit d9e99edd4dcf109492abdaa73ccf8f29d5bfd159 Author: Adam Jackson Date: Wed Apr 30 13:49:06 2014 -0400 glxproxy: Fix memory leak on error path in CreateGLXPixmap (#50281) (v2) v2: Fix another path spotted by keithp Signed-off-by: Adam Jackson Reviewed-by: Jasper St. Pierre Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit dff1f5e1a9608eda2992fc9e3304edee7b5bee9b Author: Adam Jackson Date: Wed Apr 30 13:49:05 2014 -0400 dmx: Fix memory leak in dmxBELoadFont (#50281) Signed-off-by: Adam Jackson Reviewed-by: Jasper St. Pierre Signed-off-by: Keith Packard commit 3dba171f5e82101aa8ea2e47d2253c3410907f6a Author: Michal Srb Date: Tue Apr 15 18:54:35 2014 +0300 dri2: Fix detection of wrong prime_id in GetScreenPrime. Checking the iterating variable ("slave") against null can not detect if the xorg_list_for_each_entry finished without break being invoked - slave variable will be always non-null. This caused segfault whenever someone tried to use DRI_PRIME with incorrect id while having at least one render offloading slave configured. Restructurize the GetScreenPrime to work as expected. Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit c08d2b8ccb0158dbf1f529f80cc3236e66236cce Author: Alexey Brodkin Date: Thu May 1 15:39:29 2014 +0300 ARC: Add support for ARC architecture Xorg server could be built for and run on Synopsys DesignWare ARC cores. These changes are required for successful building and execution of the server. Both little-endian and big-endian flavors of ARC cores are supported. Signed-off-by: Alexey Brodkin Acked-by: Adam Jackson Reviewed-by: Egbert Eich Signed-off-by: Keith Packard commit 042bae0b49f6192ec3cb8bb51423c90c44638134 Author: Adam Jackson Date: Wed May 21 10:16:39 2014 -0400 Use own thunk function instead of shadowUpdatePackedWeak I plan to remove the Weak functions from a future server. Signed-off-by: Adam Jackson commit d5587cf3acb7ad6f81e1c095f1b88f8fb25ee953 Author: Peter Hutterer Date: Wed May 14 10:32:30 2014 +1000 config: revert quirk for the Evoluent Vertical Mouse This quick makes the mouse behaviour more obvious (LMR buttons generate LMR events) but goes against the manufacturer's intended defaults: Top button - left click. Wheel button - .middle click (e.g., for pan and rotate in CAD programs). Middle button - right click. Bottom button - back. Thumb button - forward. from http://www.evoluent.com/vm3.html Signed-off-by: Peter Hutterer commit 01e18af17f8dc91451fbd0902049045afd1cea7e Author: Dave Airlie Date: Mon May 12 14:55:04 2014 -0700 rrcrtc: brackets are hard, lets go shopping. Slaving two outputs on a secondary GPU to a primary GPU testing picked this up, in that we'd try to resize to the totally the wrong thing, then as usual segfault in the rotation code. Signed-off-by: Dave Airlie Reviewed-by: Aaron Plattner commit 6dd86f3cba7cca67f3a9102db2e90722d32a34cb Author: Eric Anholt Date: Mon May 5 17:01:14 2014 -0700 glamor: Don't forget to check whether we can fall back in polysegment. Part of the _nf contract is that glamor will only return FALSE if glamor has checked that UXA can actually map the pixmaps (UXA only allocates the BO itself in the screen pixmap and DRI2 cases, and can't map it otherwise). Fixes server segfaults zooming in and out of libreoffice spreadsheets. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit fb24ac0a2c317099bdf7d1d8e4b7c443e3ee644f Author: Laércio de Sousa Date: Fri May 9 09:09:16 2014 -0300 xfree86: fix warnings after MatchSeat patch This patch fixes some compile warnings that arise after commit 7070ebeebaca1b51f8a2801989120784a1c374ae (xfree86: add new key MatchSeat to xorg.conf sections "Device", "Screen", and "ServerLayout") available at git repository git://people.freedesktop.org/~whot/xserver for-keith Signed-off-by: Keith Packard commit bbfed454b2a0fd5e2723524d145cb7c6e5aa9193 Author: Eric Anholt Date: Thu May 8 08:45:22 2014 -0700 glamor: Stop disabling asserts by default. Disabling asserts is something the user gets to manage. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Signed-off-by: Keith Packard commit 8e2fefe3ef247f8b5d74e32e8d37c619b06fc60c Author: Peter Hutterer Date: Tue Apr 29 16:52:01 2014 +1000 Xi: don't copy a DeviceEvent into an InternalEvent ==26141== Invalid read of size 8 ==26141== at 0x58FAEA: DeliverEmulatedMotionEvent (exevents.c:1484) An InternalEvent is bigger than a DeviceEvent, thus copying one to the other reads past the allocated boundary. Shouldn't have any real effect since we shouldn't access anything past the DeviceEvent boundary if the event type is correct. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d7ac9aff061f2961e6b76557dda97b57988ce362 Author: Peter Hutterer Date: Wed Apr 30 10:55:26 2014 +1000 mi: start calculating the sprite trace from the first child of root Introduced in 73698d41e41ce76bef2d9a90b46ac0c24ae148dd "Make XYToWindow a screen function" Moving the code into miwindow.c changed the start of the loop from RootWindow()->firstChild to DeepestSpriteWindow(). This function is only supposed to be called from miXYToWindow which resets spriteTraceGood to 1, thus DeepestSpriteWindow() is always the root window anyway. What got dropped was the firstChild as the first window to handle, so we may end up with the root window twice in the sprite trace. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d60724b752613ce2ad11c6ae102bf4513f9768ff Merge: a5b975714 15460eaed Author: Keith Packard Date: Thu May 8 12:58:41 2014 -0700 Merge commit 'who/for-keith' Skipping two unreviewed patches; will mark them reviewed and cherry pick commit a5b9757142a2ab471ca26651dce9cc5f5e351f3d Author: Keith Packard Date: Fri Apr 25 15:07:03 2014 -0700 glamor: Publish change_window_attributes and copy_window Because uxa doesn't just use glamor directly, it keeps these two functions from being wrapped so that they get called automatically. Publishing these will allow uxa to call them directly. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 4711182033ec579caff8c930d420f90ecdbe54cf Author: Keith Packard Date: Fri Apr 25 20:25:56 2014 -0700 glamor: Work around libXfont when it fails to use defaultChar GetGlyphs is supposed to always return the full list of characters when there is a default character available. However, if an application opens a 16-bit two dimensional font and then draws with 8-bit requests, the bitmapGetGlyphs function in libXfont versions up through 1.4.7 will return zero glyphs if there is no 0th row. While this is a bug in libXfont and should be fixed there, it's easy to protect glamor from it by simply falling through to the case that handles GetGlyphs failures for fonts without a default character. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 91767a32874790f8a8c7340be0e81a0b719ca4f6 Author: Keith Packard Date: Fri Apr 25 23:38:35 2014 -0700 glamor: Fix uxa-entry point for ImageText16 Was interpreting the incoming chars as 8-bits instead of 16-bits, resulting in the wrong characters being drawn. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 15460eaed28b5353a94a17091d7795cfaeda9146 Author: Peter Hutterer Date: Fri May 2 14:14:58 2014 +1000 systemd-logind: let the logind code decided whether to close an fd We can only request one fd per device from systemd-logind. If a fd is re-used by the same device, releasing the fd from one device doesn't mean we can close it. The systemd code knows when it's really released, so let it close the fd. Test case: xorg.conf section for an input device with hotplugging enabled. evdev detects the duplicate and closes the hotplugged device, which closes the fd. The other instance of evdev thinks the fd is still valid so now you're playing a double lottery. First, which client(s) will get the evdev fd? Second, which requests will be picked up by evdev and which ones will be picked up by the client? You'll never know, but the fun is in finding out. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 219ce9e6c34bfc946005fb8e81ab4fb74ae1d25a Author: Dave Airlie Date: Fri May 2 13:16:05 2014 +1000 modesetting: fix build regression against older servers. Signed-off-by: Dave Airlie commit 795af9ff017113788b4bb6d9dbeb5370c5b8165c Author: Dave Airlie Date: Fri May 2 13:14:30 2014 +1000 modesetting: fix use after free. Signed-off-by: Dave Airlie commit 42a4873cc7fe0c7a729e48f806e877c4dac5c07f Author: Keith Packard Date: Wed Apr 30 09:32:29 2014 -0700 hw/xfree86: Video Driver ABI version 18.0 With the change in the cursor interface in 4c3932620c29c91dfbbc8eb09c84efcaa7ec873e, we need to bump the video driver ABI number to ensure that drivers are rebuilt to match the new interface. Signed-off-by: Keith Packard Reviewed-by: Aaron Plattner commit a6f5ffd5879e7fb052d343592951cc476b699bb4 Author: Laércio de Sousa Date: Thu Apr 3 11:19:15 2014 -0300 xfree86: add short description about MatchSeat key in xorg.conf man page Signed-off-by: Laércio de Sousa Reviewed-by: Dave Airlie Signed-off-by: Peter Hutterer commit 7070ebeebaca1b51f8a2801989120784a1c374ae Author: Oleg Samarin Date: Thu Apr 3 11:19:14 2014 -0300 xfree86: add new key MatchSeat to xorg.conf sections "Device", "Screen", and "ServerLayout" This patch introduces a new key MatchSeat in xorg.conf (also applies to any .conf file in xorg.conf.d). It will allow targeting a given "Device", "Screen", and/or "ServerLayout" section to a particular seat only (specified by option "-seat" in X server command line), so that other seats won't be affected. Without this patch, one needs to write a separate xorg.conf.custom file and pass it to X server via "-config" option, if one wants that these settings only apply for the right seat. However, in some cases, this solution is undesirable or even impossible (e.g. when using GDM, which doesn't allow X server command line customization). Example file (/etc/X11/xorg.conf.d/seat1.conf), which would be ignored by X server unless it was started with "-seat seat1" option: Section "Device" Identifier "card0" Driver "nvidia" Option "NoLogo" "True" MatchSeat "seat1" EndSection Signed-off-by: Oleg Samarin Signed-off-by: Laércio de Sousa Reviewed-by: Dave Airlie Signed-off-by: Peter Hutterer commit 29b1484bb9555e45067669cbfe68a3c40596f4ff Author: Laércio de Sousa Date: Thu Apr 3 11:19:13 2014 -0300 xfree86: allow fallback to PCI bus probe for graphics devices on non-seat0 X servers (#66851) Currently non-seat0 X servers only probe platform bus for graphics devices, which is OK for most KMS-compliant drivers. However, for non-KMS drivers (like NVIDIA proprietary ones), graphics devices can't be reached by platform bus probe, resulting in a "No devices detected" error. This patch allows a fallback to PCI bus probe for non-seat0 X servers in case no platform bus graphics device is found. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66851 Signed-off-by: Laércio de Sousa Reviewed-by: Hans de Goede Reviewed-by: Dave Airlie Signed-off-by: Peter Hutterer commit 2535b76c0d32bc1dd0ddaca06a419a68a4757df1 Author: Robert Ancell Date: Wed Apr 23 08:19:35 2014 +1200 os: Add -displayfd into -help text Add -displayfd into -help text. It was mentioned in the man page but seem to have been missed from the -help text. Signed-off-by: Keith Packard commit a26578dbb93dbaab1910b52f9fa1c87f8c9e6d1e Author: Ray Strode Date: Thu Apr 24 13:38:29 2014 -0400 selinux: don't checkout for AVCs on select() EINTR wakeup handlers are called even when select() returns EINTR, and when they're called the passed fd set is undefined. This commit fixes the selinux wakeup handler to avoid checking for AVCs over the netlink socket spuriously. Reviewed-by: Adam Jackson Signed-off-by: Ray Strode Signed-off-by: Keith Packard commit bcb17b99873f020f2639b860ce99d260def0cd97 Author: Ray Strode Date: Thu Apr 24 13:38:28 2014 -0400 dbus: don't dispatch dbus events on select() EINTR wakeup handlers are called even when select() returns EINTR, and when they're called the passed fd set is undefined. This commit fixes the dbus wakeup handler to avoid dispatching into dbus spuriously. Reviewed-by: Adam Jackson Signed-off-by: Ray Strode Signed-off-by: Keith Packard commit 6bd7ad914470322ddd02b50078e159234ebec643 Merge: b92a9289f e06fbe4dc Author: Keith Packard Date: Tue Apr 29 09:37:37 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit e06fbe4dc81110e01d36f958849c4ab5f2a9df0e Author: Peter Hutterer Date: Mon Apr 28 07:57:00 2014 +1000 dix: remove a now-superfluous comment Obsolete since 93945b0a74aa8156a88f52b8ba77f1210042f396 Signed-off-by: Peter Hutterer commit 6a848122def0f2a439e21c50f22814db11760132 Author: Michal Srb Date: Wed Apr 2 17:14:05 2014 +0300 input: Remove invalid bug checks. Commit 2f1aedcaed8fd99b823d451bf1fb02330c078f67 added several bug checks. Some of them are not correct. Checks in Init(Ptr|String|Bell|Led|Integer)FeedbackClassDeviceStruct verify that no feedback struct was set yet, but that is not required. If any feedback structs are already present, the function will chain them behind the new one. Signed-off-by: Michal Srb Signed-off-by: Peter Hutterer commit f073b5e58262d5fcc0102d773091d11d175227ce Author: Hans de Goede Date: Tue Mar 18 15:48:22 2014 +0100 Add support for server managed fds Signed-off-by: Hans de Goede commit b92a9289fef4831e9af69e5f6f64b5454f550559 Author: Thierry Reding Date: Wed Feb 12 17:11:40 2014 +0100 xfree86: int10: Fix build on ARM Commit 7353ec7cb6fc235b03e59e35425201429c83ee72 "xfree86: Switch int10 code to stdint types" uses designated initializers to setup the fields of the X86EMU_pioFuncs. This breaks compilation on ARM, since out{b,w,l}() are redefined using the preprocessor and therefore cause the compiler to complain about non-existent fields being assigned to. It seems like the compiler.h header that contains these redefinitions isn't actually needed in xf86x86emu.c, so the easiest "fix" is to not include it. Signed-off-by: Thierry Reding Reviewed-by: Rob Clark commit 774fea38c48671ed44e54278f0280bae04822491 Author: Rob Clark Date: Thu Apr 3 15:35:53 2014 -0400 int10: fix build error Fixes: stub.c:66:1: error: conflicting types for 'xf86int10Addr' In file included from stub.c:14:0: xf86int10.h:72:53: note: previous declaration of 'xf86int10Addr' was here Signed-off-by: Rob Clark commit b241934238feedcb86c113fe3beb69a7470de02d Author: Rob Clark Date: Thu Apr 3 14:54:02 2014 -0400 default to stub int10 implementation on arm There should be no reason to need a real int10 implementation on arm, and switching to stub is an easy way to fix: xf86x86emu.c: In function 'xf86Int10ExecSetup': xf86x86emu.c:56:9: error: unknown field 'xf_outb' specified in initializer xf86x86emu.c:57:9: error: unknown field 'xf_outw' specified in initializer xf86x86emu.c:58:9: error: unknown field 'xf_outl' specified in initializer which is caused by the following in compiler.h: #define outb xf_outb #define outw xf_outw #define outl xf_outl Signed-off-by: Rob Clark Acked-by: Daniel Stone commit 4c3932620c29c91dfbbc8eb09c84efcaa7ec873e Author: Keith Packard Date: Fri Apr 25 08:22:15 2014 -0700 hw/xfree86: Restore API compatibility for cursor loading functions Create load_cursor_image_check, load_cursor_argb_check, LoadCursorImageCheck and LoadCursorARGBCheck that can return failure and use them in preference to the old unchecked variants. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede Reviewed-by: Michael Thayer commit 99f0365b1fbdfd9238b9f5cc28491e4e6c7324f1 Author: Eric Anholt Date: Wed Apr 23 09:52:17 2014 -0700 Add a command line argument for disabling indirect GLX. The attack surface for indirect GLX is huge, and it's of no use to most people (if you get an indirect GL context, you're better served by a immediate X error than actually trying to use an indirect GL context and finding out that it doesn't support doing anything you want, slowly). This flag gives you a chance to disable indirect GLX in environments where you just don't need it. I put in both the '+' and '-' arguments right now, so that it's easy to patch the value to change the default policy. Signed-off-by: Eric Anholt Acked-by: Julien Cristau Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit a4d96afdbddb7a636df8e336059d3a5624f2e6ae Author: Zhigang Gong Date: Wed Apr 23 18:54:43 2014 +0900 glamor: Fallback to system memory when fail to allocate one big fbo. Even when create a pixmap which smaller than the max_fbo_size, it may fail due to some low level driver limitation. If that is the case, we don't need to crash the xserver. We just need to fallback to system memory. See the related bug at: https://bugs.freedesktop.org/show_bug.cgi?id=71190 Signed-off-by: Zhigang Gong Reviewed-by: Michel Dänzer Tested-by: Kai Wasserbach Tested-by: Erich Seifert Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt commit 21e0e373858bd7f3458172ebd465397e33b90162 Author: Michel Dänzer Date: Wed Apr 23 18:54:42 2014 +0900 glamor: Fix memory leak in _glamor_copy_n_to_n() It would leak the memory allocated for the region rects in some cases. Found with valgrind. Reviewed-by: Alex Deucher Reviewed-by: Zhigang Gong Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt commit 4e9aabb6fc15d8052934f20c6a07801c197ec36a Author: Anthony Waters Date: Wed Apr 23 18:54:41 2014 +0900 glamor: Fix coordinates handling for composite source/mask pictures There were actually two issues with the original code I believe, the first is that the call to glamor_convert_gradient_picture wasn't properly referencing the coordinates of the source/mask pictures. The second, was that the updated references (x_temp/y_temp) were also improperly set, they should always be 0 because the temp pictures are new ones that start at (0, 0). The reason it worked in certain cases and it didn't in others (notably the tray icons) was due to the numbers working out based on the call to glamor_composite. In the cases that it did work extent->x1 would equal x_dest and extent->y1 would equal y_dest, making it so what was actually passed into glamor_convert_gradient_picture and the settings for x_temp/y_temp were correct. However, for the case when extent->x1 wouldn't equal x_dest and extent->y1 wouldn't equal y_dest (for example with the tray icons) then the wrong parameters get passed into glamor_convert_gradient_picture and x_temp/y_temp are set improperly. Fixes issues with tray icons not appearing properly in certain cases. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64738 Signed-Off-by: Anthony Waters Reviewed-by: Alex Deucher Reviewed-by: Zhigang Gong Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt commit 5062b4fadd977d044e54b53b7f3e02e466eac9a9 Author: Keith Packard Date: Sun Mar 16 20:44:48 2014 -0700 glamor: Add glamor_transfer based glamor_get_image and glamor_put_image These use the upload_boxes and download_boxes helpers to provide reasonably efficient image transfer. Fixes segfaults in Xephyr with x11perf -reps 1. Performance improvements: Improves -putimage10 by 548.218% +/- 88.601% (n=10). Improves -putimage500 by 3.71014% +/- 1.5049% (n=10). Improves -getimage10 by 8.37004% +/- 4.58274% (n=10). No statistically significant difference on -getimage500 (n=10). v2: Fix rebase failures, don't forget to check/prepare the gc in putimage fallbacks (changes by anholt). Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 747160016ba2d0cd42ad6b174cbf927d67c01875 Author: Keith Packard Date: Tue Apr 22 16:33:45 2014 -0700 glamor: Wire alpha to 1 for pictures without alpha bits When sourcing a picture that has no alpha values, make sure any texture fetches wire the alpha value to one. This ensures that bits beyond the depth of the pixmap, or bits other than the RGB values aren't used. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit a69907288d59792fd783f2f1756cde03d4a06f97 Author: Michel Dänzer Date: Mon Apr 21 17:47:15 2014 +0900 glx: If DRI2GetBuffers changes the GL context, call it again By changing the context, it may also invalidate the DRI2 buffer information, so we need to get that again. Fixes crashes due to use-after-free with LIBGL_ALWAYS_INDIRECT=1 glxgears and piglit. Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Adam Jackson commit f6abfece3e59fa8c2e14a61430133816837855f8 Author: Eric Anholt Date: Thu Apr 17 18:50:13 2014 -0700 glamor: Move a make_current before the first GL call entrypoint. Fixes a usage of the wrong context with swrast GLX's GetImage entrypoint. Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit 707726b155a2a086d12e0a6abef7f1e59def5370 Author: Eric Anholt Date: Fri Apr 4 07:03:46 2014 +0100 glamor: Do the same MakeCurrent(None) for GLX as we do for EGL. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit 482b06a95a0a2c9a58bc196eb3dd928d796853df Author: Eric Anholt Date: Fri Apr 4 07:03:31 2014 +0100 glamor: Explain the weird EGL_NO_CONTEXT code. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit fab0a4a4c9dad2275bb398d09632f4274b5e16f2 Author: Eric Anholt Date: Fri Mar 14 17:31:18 2014 -0700 glamor: Replace glamor_get/put_context() with just glamor_make_current(). Now that we have the DIX global state for the current context, we don't need to track nesting to try to reduce MakeCurrent overhead. v2: Fix a mistaken replacement of a put_context with make_current in glamor_fill_spans_gl() (caught by keithp). Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer (v1) Reviewed-by: Adam Jackson (v1) commit 11ff12d4e74c0b514cb62cc47df9770c91e5002a Author: Eric Anholt Date: Fri Mar 14 17:29:31 2014 -0700 glamor: Stop unsetting the EGL context in put_context(). This matches the Xephyr behavior. Now that we know when to reset the context in the presence of GLX, we don't need to try to keep our stuff from being smashed by GLX. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit b5e394b3f5d80749af0148611df2eb009e7bf823 Author: Eric Anholt Date: Fri Mar 14 17:20:12 2014 -0700 glamor: Use lastGLContext to coordinate the context with GLX. This gets us some more context changes that are needed to make sure the two sides render to the right drawables and manipulate the right objects. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit ab6e958a2e611b03e475c16d10beb9961d8dffc8 Author: Eric Anholt Date: Wed Apr 9 10:23:01 2014 -0700 glx: Make sure that DRI2/swrast calls haven't changed the GL context. These functions are called from the GL driver, in some series of GL calls by GLX. If some server component (like glamor CreatePixmap for GetBuffers()) changes the GL context on us, we need to set it back or the later GL calls will land in the glamor context instead of the GLX context. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit f3f2fb6baac3d2b248eb4b0da13fe95e9dc3de7d Author: Eric Anholt Date: Wed Apr 9 11:25:32 2014 -0700 glx: Refactor DRI2CopyRegion calls. I needed to add some code to each one, so it's a good time to make a helper func. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit 008f1ab31e8ac6be8f3fb11f19cdf8674be318dd Author: Eric Anholt Date: Thu Apr 17 18:28:54 2014 -0700 glx: Unconditionally clear lastGLContext on loseCurrent(). This hook calls unbindContext in the DRI driver interface, which unsets the dispatch table, regardless of whether the context argument was the current one or not. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit 789509ef5324ce9141222fa92dea51b5cc777209 Author: Eric Anholt Date: Thu Apr 17 18:23:51 2014 -0700 glx: Move GLX MakeCurrent lastGLContext updates next to makeCurrent(). We want to make sure that lastGLContext is set correctly during makeCurrent, because we may have recursive GL context changes in the DRI2 interfaces due to glamor. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit abf12027063dbe22bec1d055ad8db365cf07395a Author: Eric Anholt Date: Thu Apr 17 18:18:49 2014 -0700 glx: Move the GLX variable caching what GL context is current to dix. GLX is trying to track whether the context it wants is current, to avoid the glFlush() (and the rest of the overhead) that occurs on all MakeCurrent calls. However, its cache can be incorrect now that glamor exists. This is a step toward getting glamor to coordinate with GLX. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit f12221cbd8ff33070fa2ca086bccf7ed32115f0e Author: Eric Anholt Date: Wed Apr 16 16:16:21 2014 -0700 glamor: Fix a missing set of the GL context. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit e924034269532979f1e88947ee9c33d30461edae Author: Eric Anholt Date: Mon Apr 21 10:56:38 2014 -0700 glamor: Fix accelerated rendering of GTK's ARGB vs xBGR composites. There is some complicated code to support tweaking the format as we upload from a SHM pixmap (aka the GTK icon cache), but if we weren't sourcing from a SHM pixmap we just forgot to check that the formats matched at all. We could potentially be a little more discerning here (xRGB source and ARGB mask would be fine, for example), but this will all change with texture views anyway, so just get the rendering working for 1.16 release. Fixes the new rendercheck gtk_argb_xbgr test. v2: Squash in keithp's fix for checking that we have a non-NULL pixmap, and reword the comment even more. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 4bbee6761d49478fa40ec5daa2797f13ae96ce5c Author: Jamey Sharp Date: Fri Apr 18 09:31:09 2014 -0700 Make glamor build with --enable-debug. Bad anholt, no biscuit. Broken in commit 4c9a20072552c52b3763bd73e7a7e9b9cb8b4993. Signed-off-by: Jamey Sharp Cc: Eric Anholt Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit ba2432a020a9f9bd0892f643117795336ba0fc16 Author: Adam Jackson Date: Thu Apr 10 11:34:28 2014 -0400 xfixes: Forbid manipulating clip for source-only pictures (#28968) Just throw BadPicture instead of crashing. It's not currently a meaningful thing to do anyway, RenderSetPictureRectangles would error if you tried (which this patch changes to BadPicture as well for consistency). The problem with trying to do it is if the clip is specified as a pixmap then we try to convert it to a region, and ->BitmapToRegion requires a ScreenPtr, and source-only pictures don't have one. I can imagine a use for client clip on source-only pictures, so if we really wanted to allow this, probably the way forward is to always store the clip as a region internally, and when setting the clip _from_ a pixmap, look up BitmapToRegion relative to the pixmap not the picture. But since clearly nobody can be relying on it working... Signed-off-by: Adam Jackson Reviewed-by: Hans de Goede Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 70e564104b69bc53d29633f392f2c1ab94caddc9 Author: Dominik Behr Date: Tue Apr 1 20:36:13 2014 -0700 xf86RandR12: use correct gamma size when allocating gamma table When setting crtc->gamma_size to randr_crtc->gammaSize we should use randr_crtc->gammaSize to allocate new gamma table in crtc. Currently, if randr_crtc->gammaSize > crtc->gammaSize the subsequent memcpy will overwrite memory beyond the end of gamma table. Signed-off-by: Dominik Behr Reviewed-by: Stéphane Marchesin Signed-off-by: Keith Packard commit 35d275c7519570ceaf82cd5e7a663a8a5be4d441 Author: Eric Anholt Date: Fri Apr 4 08:38:33 2014 +0100 os: Initialize the set of signals to be suppressed during our handler. Fixes a valgrind complaint: ==8805== Syscall param rt_sigaction(act->sa_mask) points to uninitialised byte(s) ==8805== at 0x5EB8315: __libc_sigaction (sigaction.c:66) ==8805== by 0x5B13DA: busfault_init (busfault.c:145) ==8805== by 0x5A60A2: OsInit (osinit.c:191) ==8805== by 0x46EBA2: dix_main (main.c:163) Signed-off-by: Eric Anholt Reviewed-by: Alan Coopersmith Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 19e5a13970ad9d440c0789395e94931429ef4fbb Author: YunQiang Su Date: Sat Oct 12 13:22:35 2013 +0800 Fix hw/xfree86/common/compiler.h for mips64 Mark mips64 as 64bit Use long as PORT_SIZE Signed-off-by: YunQiang Su Reviewed-by: Matt Turner Signed-off-by: Keith Packard commit f466fb2432292d74123d701764c432d3aa75ef1d Author: Adam Jackson Date: Thu Apr 10 11:45:37 2014 -0400 xres: Fix size estimation for <8bpp pixmaps (#69057) Just use floats, it's not like this is a performance path. Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau Signed-off-by: Keith Packard commit 5df66822c9f6bac1ed3952971958068600ccd095 Author: Keith Packard Date: Mon Apr 21 21:38:28 2014 -0700 shadowfb: Fix compilation errors Ok, that's embarassing -- I didn't even make sure Adam's patch compiled. These are minimal fixes to make it build. Signed-off-by: Keith Packard commit 2dcb1672620ef5f16111517e9e7a98cf97deb678 Author: Adam Jackson Date: Thu Apr 10 13:42:42 2014 -0400 shadowfb: Port to miext/damage (#31303, #65547) Somewhat shocking how much simpler this is, isn't it? We no longer need to wrap the screen or GC or Picture, because damage does it for us, which is doubly great since the old shadowfb code didn't wrap _enough_ things (border updates and Render glyphs, at least). The only real difference now between this and shadow is a) shadow will let you track arbitrary pixmaps, and b) shadow's update hook runs off the BlockHandler whereas shadowfb is immediate. Tested on nouveau. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 8edeac202ecbace859b7889dd811424471dcca73 Author: Peter Harris Date: Wed Apr 16 20:24:34 2014 -0400 composite: Fix memory leak in compCopyWindow Signed-off-by: Peter Harris Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 935ea0d7b5e18ad8f22ee074a08cbdc7390d0f5d Author: Alan Coopersmith Date: Mon Apr 21 15:18:45 2014 -0700 dmxConfigCanvasUpdate: Delay dereference until after checking for NULL Flagged by cppcheck 1.64: [hw/dmx/config/xdmxconfig.c:306] -> [hw/dmx/config/xdmxconfig.c:323]: (warning) Possible null pointer dereference: fs - otherwise it is redundant to check it against null. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 983e30361f49a67252d0b5d82630e70724d69dbf Author: Peter Harris Date: Fri Apr 11 17:44:59 2014 -0400 fb: Fix origin of source picture in fbGlyphs If a source picture doesn't repeat and a mask format is specified, the incorrect calulation of the origin of the glyphs caused the glyphs to not be drawn at all. Noticed when running gtk-demo from RHEL 6.5 and selecting "Rotated Text". Signed-off-by: Peter Harris Reviewed-by: Keith Packard Signed-off-by: Keith Packard /* Test for this bug cc -std=c99 -o glyph glyph.c `pkg-config --cflags --libs xcb-render` */ // 16 x 16 pictfmt_a8 "glyph" static const char glyph[] = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, }; static struct { uint8_t len; uint8_t pad[3]; uint16_t deltax, deltay; uint8_t glyph; uint8_t pad2[3]; } elt = { len:1, glyph:1, deltax:WIN_SIZE/2 - GLYPH_SIZE/2, deltay:WIN_SIZE/2 - GLYPH_SIZE/2 }; int main(int argc, char *argv[]) { int screen; xcb_connection_t *c = xcb_connect(NULL, &screen); if (!c || xcb_connection_has_error(c)) { fprintf(stderr, "Cannot open default display \"%s\"\n", getenv("DISPLAY")); return EXIT_FAILURE; } // Find root window and depth const xcb_setup_t *setup = xcb_get_setup(c); if (screen >= setup->roots_len) screen = 0; xcb_screen_iterator_t si = xcb_setup_roots_iterator(setup); for (int i=0; i < screen; i++) xcb_screen_next(&si); xcb_window_t root = si.data->root; uint8_t depth = si.data->root_depth; xcb_visualid_t visual = si.data->root_visual; // Find picture formats xcb_render_query_pict_formats_reply_t *qpf; qpf = xcb_render_query_pict_formats_reply(c, xcb_render_query_pict_formats(c), NULL); if (!qpf) { fprintf(stderr, "Cannot query RENDER picture formats\n"); return EXIT_FAILURE; } xcb_render_pictformat_t fmt_a8 = 0; xcb_render_pictforminfo_iterator_t pfi = xcb_render_query_pict_formats_formats_iterator(qpf); for (int i = 0; i < xcb_render_query_pict_formats_formats_length(qpf); i++) { if (pfi.data->depth == 8 && pfi.data->type == XCB_RENDER_PICT_TYPE_DIRECT && pfi.data->direct.alpha_mask == 0xFF) { fmt_a8 = pfi.data->id; break; } xcb_render_pictforminfo_next(&pfi); } if (!fmt_a8) { fprintf(stderr, "Cannot find a8 RENDER picture format\n"); return EXIT_FAILURE; } xcb_render_pictformat_t fmt_visual = 0; xcb_render_pictscreen_iterator_t psi = xcb_render_query_pict_formats_screens_iterator(qpf); for (int i = 0; i < xcb_render_query_pict_formats_screens_length(qpf); i++) { xcb_render_pictdepth_iterator_t pdi = xcb_render_pictscreen_depths_iterator(psi.data); for (int j = 0; i < xcb_render_pictscreen_depths_length(psi.data); i++) { xcb_render_pictvisual_iterator_t pvi = xcb_render_pictdepth_visuals_iterator(pdi.data); for (int k = 0; k < xcb_render_pictdepth_visuals_length(pdi.data); i++) { if (pvi.data->visual == visual) { fmt_visual = pvi.data->format; goto found_visual; } xcb_render_pictvisual_next(&pvi); } xcb_render_pictdepth_next(&pdi); } xcb_render_pictscreen_next(&psi); } found_visual: if (!fmt_visual) { fprintf(stderr, "Cannot find visual RENDER picture format\n"); return EXIT_FAILURE; } xcb_render_glyphset_t glyphset = xcb_generate_id(c); xcb_render_create_glyph_set(c, glyphset, fmt_a8); uint32_t glyph_ids[] = {1}; xcb_render_add_glyphs(c, glyphset, 1, glyph_ids, &(xcb_render_glyphinfo_t){width:GLYPH_SIZE, height:GLYPH_SIZE}, sizeof(glyph), glyph); // Create window, pixmap, and gc xcb_window_t window = xcb_generate_id(c); uint32_t list[] = { si.data->black_pixel, XCB_EVENT_MASK_EXPOSURE }; xcb_create_window(c, XCB_COPY_FROM_PARENT, window, root, 0, 0, WIN_SIZE, WIN_SIZE, 0, XCB_WINDOW_CLASS_INPUT_OUTPUT, XCB_COPY_FROM_PARENT, XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK, list); xcb_map_window(c, window); xcb_render_picture_t winpic = xcb_generate_id(c); xcb_render_create_picture(c, winpic, window, fmt_visual, 0, NULL); xcb_pixmap_t pixmap = xcb_generate_id(c); xcb_create_pixmap(c, depth, pixmap, window, GLYPH_SIZE, GLYPH_SIZE); xcb_render_picture_t pixpic = xcb_generate_id(c); xcb_render_create_picture(c, pixpic, pixmap, fmt_visual, 0, NULL); xcb_render_fill_rectangles(c, XCB_RENDER_PICT_OP_SRC, pixpic, (xcb_render_color_t){green:0xFFFF, alpha:0xFFFF}, 1, &(xcb_rectangle_t){width:GLYPH_SIZE, height:GLYPH_SIZE} ); xcb_flush(c); for (xcb_generic_event_t *ev = xcb_wait_for_event(c); ev; ev = xcb_wait_for_event(c)) { int type = ev->response_type; free(ev); if (type == XCB_EXPOSE) { xcb_clear_area(c, 0, window, 0, 0, 0, 0); xcb_render_composite_glyphs_8(c, XCB_RENDER_PICT_OP_SRC, pixpic, winpic, fmt_a8, glyphset, 0, 0, sizeof(elt), (uint8_t *)&elt); xcb_flush(c); } } return EXIT_SUCCESS; } commit 80a0b29c3b61ba9024bd0278ea8cc51686afe3f4 Author: Michel Dänzer Date: Fri Apr 11 11:01:51 2014 +0900 glamor: Add remaining header files to SOURCES It wasn't possible to build glamor from tarballs. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64297#c9 Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit ea15f8b4c90ebef21d4031bf7f412ef9241d5438 Author: Jasper St. Pierre Date: Mon Apr 21 16:30:49 2014 -0400 dixfonts: Turn a missing directory ErrorF into a DebugF On systems without these directories, we don't need to be complaining loudly. Reviewed-by: Kristian Hoegsberg Signed-off-by: Keith Packard commit ba5c2b6c876a15fe18bc1ff1ab4e773c46bc9009 Merge: 9c86d5f4f 66b602474 Author: Keith Packard Date: Mon Apr 21 14:59:51 2014 -0700 Merge remote-tracking branch 'krh/xwayland-for-keithp' commit 9c86d5f4f6f5d6d135a9f2f8eae904c6441e84e5 Author: Kristian Høgsberg Date: Tue Mar 25 14:57:12 2014 -0700 .gitignore: Add new autotools file 'test-driver' Automake 1.12 introduces a new parallel test framework that uses a shell script helper and generates *.log and *.trs files. Add to .gitignore. Signed-off-by: Kristian Høgsberg Reviewed-by: Gaetan Nadon Signed-off-by: Keith Packard commit 28fa5dd5cad3a5fb51018250dfa2b605a8aea85c Author: Julien Cristau Date: Mon Apr 14 15:27:19 2014 +0200 configure: require xproto 7.0.26 for pointer typedef removal Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit d2274f2f46db300ac75ca0fdcba7f5655865b8b6 Author: Julien Cristau Date: Mon Apr 14 15:27:18 2014 +0200 configure: require fontsproto 2.1.3 for pointer typedef removal Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 6d892ad112fc887e184f50c5dc2ba593668e9e11 Author: Robert Morell Date: Fri Apr 18 18:29:44 2014 -0700 randr: Implement RandR 1.4 request swapping The protocol handlers all have support for swapping variable data and replies, but the top-level dispatch plumbing was missing. Signed-off-by: Robert Morell Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit ed4ee7c34a7fbb58a449647fb8d968618c499a61 Author: Robert Morell Date: Fri Apr 18 18:29:43 2014 -0700 randr: Fix size checks for SetProvider* reqs Both xRRSetProviderOutputSourceReq and xRRSetProviderOffloadSinkReq are fixed-size requests, so the length on the wire should match exactly. Signed-off-by: Robert Morell Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 668321e7e5acb41c0c7b299f57165e86dc74d7ed Author: Robert Morell Date: Fri Apr 18 18:29:42 2014 -0700 randr: Fix crash for NULL swap dispatch procs The previous code was checking the wrong table for function pointers. Signed-off-by: Robert Morell Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 66b602474047c499b8a888267a489790fc9f9d85 Author: Kristian Høgsberg Date: Mon Apr 21 11:14:51 2014 -0700 xwayland: Remove left-over ErrorF logging Reviewed-by: Jasper St. Pierre Signed-off-by: Kristian Høgsberg commit 138bf5ac9703b410a6066c303feea067680edf5a Author: Jamey Sharp Date: Fri Apr 18 12:22:19 2014 -0700 DRI2SwapBuffers: Fix uninitialized target SBC. Fixes Piglit test "swapbuffersmsc-return swap_interval 0". Ensure that *swap_target gets initialized on any 'return Success' path, even if the swap request can't be completed by the driver and the server falls back to a simple blit. That path can also be triggered by setting swap_interval to 0, which disables sync to vertical retrace. We originally found this bug because for some reason SDL2 automatically sets swap_interval to 0, when we were trying to test OML_sync_control in an SDL2 test application. We then discovered that the above-mentioned Piglit test has been failing for the same reason since it was introduced. Signed-off-by: Jamey Sharp Signed-off-by: Theo Hill Reviewed-by: Keith Packard Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 4927af4475bc7d020190d9f468c90366525c1109 Author: Jamey Sharp Date: Fri Apr 18 12:22:18 2014 -0700 DRI2SwapBuffers: Don't reuse swap_target variable. swap_target is an out-parameter that needs to be set to the value that SBC will take on after this SwapBuffers request completes. However, it was also being used as a temporary variable to hold the MSC at which the SwapBuffers request got scheduled to occur. This confusion makes it harder to reason about whether swap_target is being set correctly for its out-parameter usage. (Hint: It isn't.) For the latter use, it makes more sense to use the existing target_msc variable, which already has the right value unless target_msc, divisor, and remainder are all 0, in which case we can set it using swap_interval as usual. Signed-off-by: Jamey Sharp Signed-off-by: Theo Hill Reviewed-by: Keith Packard Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit d2c6e801b548674b8636e6a64b42c9038d46263c Author: Kristian Høgsberg Date: Tue Apr 8 09:23:42 2014 -0700 configure.ac: Remove check for WAYLAND_SCANNER_RULES This makes configure fail if the wayland autoconf macros aren't found. We don't need the scanner for shm-only xwayland so just drop this line for now. Reviewed-by: Daniel Stone Reviewed-by: Gaetan Nadon Reviewed-by: Jeremy Huddleston Sequoia Signed-off-by: Kristian Høgsberg commit f618455c802abb77de8d64eb442422cfe5e26ea8 Author: Kristian Høgsberg Date: Tue Apr 8 09:19:13 2014 -0700 xwayland: Build without xshmfence Reviewed-by: Daniel Stone Signed-off-by: Kristian Høgsberg commit 552d40b26a082df6f1816bb461793b8fa8b553c6 Author: Kristian Høgsberg Date: Tue Apr 8 09:17:51 2014 -0700 xwayland: Build without GLX extension Reviewed-by: Daniel Stone Signed-off-by: Kristian Høgsberg commit c7011249d2abe6cc7af82ee4b79d8f6873444707 Author: Keith Packard Date: Fri Apr 18 15:12:14 2014 -0700 xkb: Verify reads of compiled keymap header and TOC Check the return values from fread to make sure the elements are actually getting read from the file. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 0af8788579c2f52cc1172952c9004483bf863932 Author: Keith Packard Date: Fri Apr 18 15:09:50 2014 -0700 os: Ignore log file write failures There's no place to log the message if writing to the log file fails, and we surely don't want to crash in that case, so just ignore errors and keep going. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 7abd28685066369ded807f59493c1159cfb286bf Author: Keith Packard Date: Fri Apr 18 15:05:00 2014 -0700 os: Make sure that writing our pid to the lock file actually worked There's no sense verifying that we can create the lock file and then ignoring the return value from write. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit d72f691c0c9cace857975a6608a4cb431c8b6846 Author: Keith Packard Date: Fri Apr 18 15:00:30 2014 -0700 os: FatalError if -displayfd writes fail When the server is started with the -displayfd option, check to make sure that the writes succeed and give up running if they don't. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 4957e986841225e9984daca76f1a0ee08df125bb Author: Keith Packard Date: Fri Apr 18 15:00:35 2014 -0700 os: Clear the -displayfd option after closing the file Failing to clear this means that we'll attempt to write the display number to a random file descriptor on subsequent X server generations. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 0c0feddbcda238efa82a47f456ef3008ffa53195 Author: Keith Packard Date: Fri Apr 18 14:54:02 2014 -0700 kdrive: Ignore failure to chown console tty to current user I'm not sure what we'd do in this case anyways, other than fatal error. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 696e08f8e820449bb4b0ce7a60bf5b5bc5097935 Author: Keith Packard Date: Fri Apr 18 14:50:14 2014 -0700 kdrive: Explicitly ignore errors from the -switchCmd script Make it clear that we intentionally ignore the -switchCmd return value. This keeps GCC from emitting a warning when the server is compiled with -D_FORTIFY_SOURCE=2. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 570b1c79942b237022be3594ae3a25e7b833cb73 Author: Keith Packard Date: Fri Apr 18 14:47:00 2014 -0700 test: [v2] Validate server log reading more carefully in signal-logging test Check return value from fgets and strchr instead of assuming they worked. [v2] Don't do any necessary work inside the assert call. Also make sure the return value was long enough. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 3119aae80782b7ff5613c719fbcc8a01feab1134 Author: Gaetan Nadon Date: Fri Apr 4 14:59:21 2014 -0400 test: create a link to the generated hw/xfree86/sdksyms.c at build time Automake 1.14 gives us warning about source code specified in _SOURCES that comes from directories other than the current one. It suggests to enable the subdir-objects feature which only supports code in sub directories. The test directory needs source from hw/xfree86 which is neither under test nor under a sub directory of test. In 1.14 we get a warning, in 2.0 it will break as it will overwrite the object code in xfree86. The solution in this case is to create a link to hw/xfree86/sdksyms.c at build time. It's just like any other built source file. There are no links created in git. Signed-off-by: Gaetan Nadon Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 58ef01648b18f85ad79620da110ece2339f638c3 Author: Adam Jackson Date: Thu Apr 17 10:49:46 2014 -0400 dri1: Don't bother asking the loader about drmGetLibVersion This was added for DRM_IOCTL_SET_VERSION support, which has been around for over ten years now. Since we require ≥2.3.0 in configure.ac this would really only protect you if you managed to build against a modern libdrm but run against one that's more than 7½ years old, which, doctor it hurts when I do this. Archaeology: http://cgit.freedesktop.org/~ajax/dri/commit/xc/programs/Xserver/GL/dri/dri.c?id=77d62efca033dced96ab7998b7c62a4e2df907d5 Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 461ed561b9f75cee43c0dfd39228716f977956e7 Author: Hans de Goede Date: Fri Apr 18 11:30:16 2014 +0200 Xorg.wrap manpages: use __appmansuffix__ instead of hardcoding 1 Cc: Gaetan Nadon Signed-off-by: Hans de Goede Reviewed-by: Gaetan Nadon commit 584961c86427b400a5ba65b0f145d00748d2da1e Author: Hans de Goede Date: Fri Apr 18 11:26:00 2014 +0200 man/Makefile.am: Fix Xorg.wrap.man Xwrapper.config.man missing from make dist Fix suggested by: Gaetan Nadon Cc: Gaetan Nadon Signed-off-by: Hans de Goede Reviewed-by: Gaetan Nadon commit ec01d51a9973a9cf5f32f14f00058f1fdc9ed25e Author: Guillem Jover Date: Mon Apr 14 18:13:25 2014 +0200 Xorg.wrap: Make the console check portable Handle the unported case by issuing a build-time and run-time warning. And add support for FreeBSD kernel based systems, by using the VT_GETINDEX ioctl to check if the file descriptor is on a virtual console. Signed-off-by: Guillem Jover Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 3a469917b585914ba2421e305f3b6a837b232e93 Author: Guillem Jover Date: Mon Apr 14 18:13:24 2014 +0200 Xorg.wrap: Clarify error messages Not printing the program name produces very confusing messages that might be difficult to attribute while trying to diagnose problems, let's be explicit about who we are. Also add a missing "/" between SUID_WRAPPER_DIR and "Xorg.bin". Signed-off-by: Guillem Jover Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 50b6e1b0d786d95ee8eab030b0d1fd7420e2fbeb Author: Guillem Jover Date: Mon Apr 14 18:13:23 2014 +0200 Xorg.wrap: Use instead of hardcoding libdrm include path The libdrm.pc file gives us the correct include path, do not try to hardcode it on the source, as it might vary on the installed system, for example on Debian-based systems it's under /user/include/libdrm/. Signed-off-by: Guillem Jover Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 7bffceb9f939c0bf5529b00500cbb14ae01bb61a Author: Guillem Jover Date: Mon Apr 14 18:13:22 2014 +0200 Xorg: Add Xorg.wrap to hw/xfree86/.gitignore Signed-off-by: Guillem Jover Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 208157a76c6f340e0161e18ac77149d7110af2f5 Author: Julien Cristau Date: Sun Apr 13 19:14:34 2014 +0200 configure: fix help text for dmx As of 93fa64e17d7bd600ebf18ecab85f5b2d17fe30ce it's disabled by default, so stop saying it's automatically enabled in configure --help. Signed-off-by: Julien Cristau Reviewed-by: Kenneth Graunke Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit c917fa411502d402b9c69de30f6a88e102bb8610 Author: Keith Packard Date: Tue Apr 8 01:01:28 2014 -0700 glamor: Always allocate precisely the requested pixmap size Using a pixmap as a tile or stipple means that we must have the underlying FBO match the pixmap geometry exactly. We may want to add some complexity here to migrate pixmaps into exact sized objects as necessary, but for now, make the server work correctly by skipping this optimization. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 3028ae6c9aa37168e249e0d847b29f8e3efb05b2 Merge: bd3de10f8 ec6007e6f Author: Keith Packard Date: Wed Apr 9 21:59:17 2014 -0700 Merge remote-tracking branch 'jeremyhu/master' commit bd3de10f86a511886b0748d55fa19860314a0150 Author: Keith Packard Date: Tue Apr 8 14:25:18 2014 -0700 Bump to version 1.15.99.902. Closing the 1.16 merge window. Signed-off-by: Keith Packard commit 6ec04a75deb1695820e337abbefe1929d5928f15 Author: Keith Packard Date: Fri Apr 4 16:28:43 2014 -0700 dri3: Fix dri3_open API change by adding new dri3_open_client Xwayland will eventually need the current client in dri3_open. Simply changing that API is not an option though as other drivers that implement DRI3 will not have a matching function signature and will crash when called. Add a new dri3_open_client function pointer and bump DRI3_SCREEN_INFO_VERSION so that drivers can be aware of the new function which will be used in preference to the old function when available. Signed-off-by: Keith Packard Reviewed-by: Eric Anhole commit ec6007e6f7772a90713c9c51c64359229961ce27 Author: Jeremy Huddleston Sequoia Date: Sun Apr 6 05:32:00 2014 -0700 XQuartz: Ensure we wait for the server thread to terminate AKA: XQuartz 2.7.5 doesn't delete its /tmp/.X$d-lock http://xquartz.macosforge.org/trac/ticket/823 Signed-off-by: Jeremy Huddleston Sequoia commit 901fbfbbbd71c0d82080957f8ba09eebbc786f2b Author: Michael Thayer Date: Mon Mar 31 11:21:42 2014 +0200 Add a return value to load_cursor_argb() to allow it to report failure load_cursor_argb() may need to be able to fail and have the server fall back to a software cursor in at least the following circumstances. 1) The hardware can only support some ARGB cursors and this does not just depend on cursor size. 2) Virtual hardware may not wish to pass through a cursor to the host at a particular time but may wish to accept the same cursor at another time. This patch adds a return value to the API and makes the server do the software fall-back on failure. Signed-off-by: Michael Thayer Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 62ab4102260fd3342a0e5ae3a4f77b430af64f4e Author: Michael Thayer Date: Mon Mar 31 11:19:16 2014 +0200 Set a flag property on the root window to say if the X server VT is active An X11 client may need to know whether the X server virtual terminal is currently the active one. This change adds a root window property which provides that information. Intended interface user: the VirtualBox Guest Additions. Signed-off-by: Michael Thayer Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit b851ca968b7cce6d1a6438c05d3d5c8832249704 Author: Daniel Stone Date: Thu Apr 3 18:22:50 2014 +0100 Add pScreen->NameWindowPixmap hook This hook allows drivers to be notified when a pixmap gains a new ID. (ABI break.) Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit b4d0bec22c15930abf13a7fb9d684208ccd56b1d Merge: 3c34dd360 6e539d881 Author: Keith Packard Date: Thu Apr 3 15:35:01 2014 -0700 Merge remote-tracking branch 'krh/xwayland-for-keithp' commit 6e539d8817f738289dc2dea13d0720116287ab9d Author: Kristian Høgsberg Date: Tue Mar 11 16:11:39 2014 -0700 Xwayland DDX Started out as an Xorg module to be used from Xorg drivers to let Xorg run under a wayland server. The idea was to be able to reuse the 2D acceleration from the Xorg driver. Now with glamor being credible, a better plan is to just make Xwayland its own DDX, similar to Xwin and Xquartz. This is a much better fit, as much of the code in the original approach had to hack around Xorg doing Xorg things like take over the VT, probe input devices and read config files. Another big win is that Xwayland dosn't need to be setuid root. The Xwayland support for DRI3, Glamor and render nodes was done by Axel Davy , who also did a lot of work on the rebase to the Xwayland DDX. Contributions from: Christopher James Halse Rogers Corentin Chary Daniel Stone Kristian Høgsberg Robert Bragg Scott Moreau Tiago Vignatti Giovanni Campagna Jonas Ådahl Ray Strode Trevor McCort Rui Matos Axel Davy Jasper St. Pierre Signed-off-by: Kristian Høgsberg Reviewed-by: Axel Davy commit 3c34dd3603989c0365654ca1b6809395c7f3b169 Author: Keith Packard Date: Tue Apr 1 21:15:48 2014 -0700 glamor: Add glamor_program based poly_text and image_text Accelerates text painting with GPU-based geometry computation and stippling v2: Simplify get_glyphs, expand single character variable names to more descriptive ones. (Markus Wick) v3: Rebase against the glamor_prepare_* un-renaming (changes by anholt). Improves x11perf -f8text by 417.908% +/- 11.0144% (n=10) Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 5f700c3ac31db52f02f6ef11ea7823a8ce4f6f6f Author: Keith Packard Date: Tue Apr 1 21:15:47 2014 -0700 glamor: Use glamor_program for glamor_glyphblt This constructs suitable shaders using the glamor_program infrastructure for poly glyph blt, and then gets rid of the no-op wrapper of miImageGlyphBlt. Improves x11perf -f8text by 11.6221% +/- 1.04585% (n=10) Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 3411e8c538476443cafbb70082ef7457932e4a38 Author: Keith Packard Date: Tue Apr 1 21:15:46 2014 -0700 glamor: Add glamor_program based poly_fill_rect This accelerates poly_fill_rect using GPU-based geometry computation Improves x11perf -rect100 by 41.5127% +/- 7.63888% (n=10) Improves x11perf -rect10 by 3745.72% +/- 94.7503% (n=6) v2: Rebase on skipping the prepare rewrite for now, and fix the GLSL 1.20 and GLES2 cases (changes by anholt). Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 0a6d31161811c422799d6f065ea2842d42707530 Author: Keith Packard Date: Tue Apr 1 21:15:45 2014 -0700 glamor: Add glamor_program based fill/set/get spans This accelerates spans operations using GPU-based geometry computation -wellipse500 goes from about 4k/sec before the patch, to ~8k/sec in the GLES2 fallback loop, to ~100k/sec in desktop mode. v2: Rebase on skipping the prepare rewrite for now, and fix the GLSL 1.20 and GLES2 cases (changes by anholt). Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit d78c257f523908760c1b872cc4bef3d42eb31f50 Author: Keith Packard Date: Tue Apr 1 21:15:43 2014 -0700 glamor: Add simple upload/download functions in glamor_transfer These use glTexSubimage2D for upload and glReadPixels for download. There are a variety of interfaces to the basic function as needed by the callers. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt commit 693e6bea897e4c9473a9f22dd8b90df3437e04a1 Author: Keith Packard Date: Tue Apr 1 21:15:42 2014 -0700 glamor: Use plain GLSL 1.20 features for fill code. This prevents performance regressions from losing acceleration support on older hardware as we transition to using glamor_program.c for acceleration. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 5b76b3978d792c92b23a691204b473209782476e Author: Keith Packard Date: Tue Apr 1 21:15:42 2014 -0700 glamor: Compute supported GLSL version and save in screen private This currently computes the GLSL version in a fairly naïve fashion, and leaves that in the screen private for other users. This will let us update the version computation in one place later on. v2: Drop an accidental rebase-squashed hunk (change by anholt). Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 3c2c59eed3c68c0e5a93c38cf01eedad015e3157 Author: Keith Packard Date: Tue Apr 1 21:15:41 2014 -0700 fb: Publish fbGlyphs and fbUnrealizeGlyph This lets other code jump directly into the fb code for fallbacks Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 9dffcda804b2609f0b319d35dd47fd401d4fafce Author: Keith Packard Date: Tue Apr 1 20:54:22 2014 -0700 glamor: Bail from composite when pixmap cannot be uploaded I think the sense of the return value was just flipped here; if you return TRUE, then the calling code assumes that the pixmap *has* been uploaded and that an FBO is available. When it tries to use it, it crashes though. Returning false makes the caller bail back to software. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 15fec3bc3a2d29c903f35b5a30ac09e196eb36b1 Author: Keith Packard Date: Tue Apr 1 20:54:21 2014 -0700 glamor: Remove warning message when pixmap cannot be stored in a texture This happens when you have 4bpp pixmaps; it's not an error, so stop flooding the log file when it happens. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 5f177f3582323b6c1791e9e2c107548b607369de Author: Keith Packard Date: Tue Apr 1 20:54:20 2014 -0700 glamor: Public polyLines function is glamor_poly_lines_nf There was a spurious declaratoin in glamor.h for glamor_poly_line_nf Signed-off-by: Keith Packard Signed-off-by: Eric Anholt commit 6aac97198f60de9d4e415fb4fa2fc11cac6c6790 Author: Keith Packard Date: Tue Apr 1 20:54:19 2014 -0700 glamor: Initialize XV shaders from glamor_xv_init instead of glamor_init The glamor_init calls to glamor_init_xv_shader were never getting run because GLAMOR_XV was never defined. Instead of trying to make that work, fix glamor_xv_init to make the call instead. Further, just get rid of the glamor_fini_xv_shader function entirely as the shader program will be destroyed when the context is destroyed at server reset time. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 1707faf36d49a63efc462dfef133a555fe093832 Author: Keith Packard Date: Tue Apr 1 20:54:18 2014 -0700 glamor: SetWindowPixmap is not related to RENDER Move the configuration of screen->SetWindowPixmap out from under it. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 8d88b90953471ead3b480b6ae9d7280b8bd6b216 Author: Keith Packard Date: Tue Apr 1 20:54:15 2014 -0700 glamor: glamor_poly_point_nf cannot fail for non-DDX pixmaps All of the glamor _nf functions must check to see if the DDX can access the pixmap directly before returning failure back to the driver; this restructures the point code to split out the _nf checking from the _gl code. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit d5dd1d6371021c2aad94e33c5837ccd4bf9bf0f4 Author: Eric Anholt Date: Fri Mar 21 13:13:27 2014 -0700 Revert "glx: Make sure we get an FBConfig the root window's visual." This reverts commit b5a61239e2fef167c229154d7919ff862503e3f3. Not only did I screw up and introduce a warning, it turns out glXChooseFBConfig() explicitly ignores this attribute. Thanks, GLX. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 84f977467b514af88019ab2791bf7a74530b54df Merge: 9d20d18fb 98924719d Author: Keith Packard Date: Thu Apr 3 10:44:28 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit 98924719d524bf87cdf301063cd744d1271c33ff Author: Peter Hutterer Date: Wed Apr 2 13:55:10 2014 +1000 Revert "xkb: ProcesssPointerEvent must work on the VCP if it gets the VCP" This was the wrong fix to the problem, and it triggered a change in XKB behavior: previously a button event would unlock a latched modifier, now it doesn't anymore. https://bugs.freedesktop.org/show_bug.cgi?id=73155 Note that the new behavior is is strictly spec compliant but we've had the other behavior for a long time so we shouldn't break it. The bug this patch originally fixed was a null-pointer dereference when releasing button events on server shutdown. This was addressed by the commit below, so the need for this patch has gone away anyway. commit 3e4be4033aed78b2bb3a18d51f0963989efd1af3 Author: Peter Hutterer Date: Fri Jan 25 11:47:32 2013 +1000 dix: when shutting down slave devices, shut down xtest devices last This reverts commit 2decff6393a44b56d80d53570718f95354fde454. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 9d65c515d83d2158b5949e249777ca2a02b31901 Author: Hans de Goede Date: Tue Apr 1 11:24:17 2014 +0200 xf86LogInit: log to XDG_DATA_HOME when not running as root When no logfile was specified (xf86LogFileFrom == X_DEFAULT) and we're not running as root log to $XDG_DATA_HOME/xorg/Xorg.#.log as Xorg won't be able to log to the default /var/log/... when it is not running as root. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit e738276e96590b2230dd9d9f5a3f9485f592e1e6 Author: Kristian Høgsberg Date: Mon Mar 31 18:04:07 2014 -0700 glamor: Expose glamor_destroy_pixmap() When we create a glamor pixmap by calling glamor_create_pixmap() directly, we need to call glamor_destroy_pixmap() to destroy it. Signed-off-by: Kristian Høgsberg Reviewed-by: Keith Packard commit d14803437582668f5ffea14071ea962b6b8e450d Author: Kristian Høgsberg Date: Mon Mar 31 18:00:54 2014 -0700 glamor: Add new GLAMOR_CREATE_PIXMAP_NO_TEXTURE pixmap create flag This flag lets a DDX allocate a glamor pixmap without allocating the texture that backs it. The DDX can then allocate the texture itself and then set it later. Signed-off-by: Kristian Høgsberg Reviewed-by: Keith Packard commit fe204185bc801bb17785dc8d1cde09d48b5e257f Author: Kristian Høgsberg Date: Mon Mar 31 17:59:18 2014 -0700 glamor: Move glamor_egl_screen_init() prototype to glamor.h A DDX that implements the glamor EGL functions need to pull in this prototype but shouldn't need to pull in glamor_priv.h Signed-off-by: Kristian Høgsberg Reviewed-by: Keith Packard commit 9ba2084321b1ac8d271feefee4f5b968d34226d6 Author: Kristian Høgsberg Date: Thu Mar 27 23:47:59 2014 -0700 dri3: Allow asynchronous implementation for dri3_open By passing the client pointer to the dri3_open implementation, we allow the clients to implement the open callback asynchronously. If the client ignore count is positive after returning from dri3_open, we assume that authentication is in progress and doesn't send the reply. The code to send the reply is moved into a helper function, which the implementation can call upon receiving its authenticaion reply. Signed-off-by: Kristian Høgsberg Reviewed-by: Keith Packard commit 4ba7b594464887ae68623e150348d90812eec36c Author: Kristian Høgsberg Date: Thu Mar 27 22:15:28 2014 -0700 composite: Add exception mechanism for implicit redirection policy Normally composite will decide to add implicit redirection when a window with an alternate visual is a parent of a window with a regular visual or vice versa. This uses extra pixmap memory and incurs an extra copy. This exception mechanism provides a way for a DDX to override this if the DDX knows that its acceleration architecture will render correctly. The relevant case is that of an RGB window reparented into a ARGB parent frame window. If the DDX knows that the acceleration architecture in use will pad the alpha channel to opaque when rendering to the RGB window, the implicit redirection can be avoided. This patch adds a new composite function: CompositeRegisterImplicitRedirectionException() which lets a DDX register a pair of parent and child window visuals, that will not be implicitly redirected even if the normal policy would have made that choice. Signed-off-by: Kristian Høgsberg Reviewed-by: Keith Packard commit 73698d41e41ce76bef2d9a90b46ac0c24ae148dd Author: Keith Packard Date: Mon Mar 31 23:55:25 2014 -0700 Make XYToWindow a screen function This allows DDXen to override the window picking to account for native windows not seen by the X server. The bulk of the picking logic is exposed as a new helper function, miSpriteTrace(). This function completes the sprite trace filled out by the caller, and can be set up to start the search from a given toplevel window. v2: Leave existing XYToWindow API in place for API compatibility Signed-off-by: Keith Packard Reviewed-by: Kristian Høgsberg commit f37a46913489397d8628ffe578c8d4ed50b6ca72 Author: Hans de Goede Date: Wed Mar 26 12:24:49 2014 +0100 configure: Change DEFAULT_LOGPREFIX to really be a filename prefix Rather then a full path prefix, this is a preparation patch for adding support for logging to another location when not running as root. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9d20d18fb9dcc74bfa5392a2da40fd41b3e640d3 Merge: 8468e2443 bc348bd2c Author: Keith Packard Date: Mon Mar 31 23:24:56 2014 -0700 Merge remote-tracking branch 'jturney/master' commit 8468e24430988058b150dc1daef3aad6ba9fa698 Author: Adam Jackson Date: Thu Mar 27 11:48:39 2014 -0400 mi: Hush extension initialization (#75870) Printing these as ErrorF is fairly obnoxious, since it means the non-hardware servers now spew stuff to the console for entirely routine events. And actually, printing these at all is fairly obnoxious, since a) we're printing a line for every extension, whether it's enabled or not, and b) we're not actually initializing the extension at this point. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit a2880699e8f1f576e1a48ebf25e8982463323f84 Author: Keith Packard Date: Tue Mar 25 08:21:16 2014 -0700 fb: fix fast-path blt detection The width parameter is used to disable the blit fast-path (memcpy) when source and destination rows overlap in memory. This check was added in [0]. Unfortunately, the calculation to determine if source and destination lines overlapped was incorrect: (1) it converts width from pixels to bytes, but width is actually in bits, not pixels. (2) it adds this byte offset to dst/srcLine, which implicitly converts the offset from bytes to sizeof(FbBits). Fix both of these by converting addresses to byte pointers and width to bytes and doing comparisons on the resulting byte address. For example: A 32-bpp 1366 pixel-wide row will have width = 1366 * 32 = 43712 bits bpp = 32 (bpp >> 3) = 4 width * (bpp >> 3) = 174848 FbBits (FbBits *)width => 699392 bytes So, "careful" was true if the destination line was within 699392 bytes, instead of just within its 1366 * 4 = 5464 byte row. This bug causes us to take the slow path for large non-overlapping rows that are "close" in memory. As a data point, XGetImage(1366x768) on my ARM chromebook was taking ~140 ms, but with this fixed, it now takes about 60 ms. XGetImage() -> exaGetImage() -> fbGetImage -> fbBlt() [0] commit e32cc0b4c85c78cd8743a6e1680dcc79054b57ce Author: Adam Jackson Date: Thu Apr 21 16:37:11 2011 -0400 fb: Fix memcpy abuse The memcpy fast path implicitly assumes that the copy walks left-to-right. That's not something memcpy guarantees, and newer glibc on some processors will indeed break that assumption. Since we walk a line at a time, check the source and destination against the width of the blit to determine whether we can be sloppy enough to allow memcpy. (Having done this, we can remove the check for !reverse as well.) v3: Convert to byte units This first checks to make sure the blt is byte aligned, converts all of the data to byte units and then compares for byte address range overlap between source and dest. Signed-off-by: Keith Packard Reviewed-by: Daniel Kurtz commit bc348bd2c42f3f18786085ccef2f010eff5bf3d2 Author: Jon TURNEY Date: Mon Mar 11 14:34:32 2013 +0000 Handle -displayfd and an explicit display number sensibly Handle -displayfd and an explicit display number sensibly, e.g. use the explicitly specified display number, and write it to the displayfd v2: displayfd might be 0, so use -1 as invalid value v3: Rebase for addition of NoListenAll flag Signed-off-by: Jon TURNEY Reviewed-by: Kristian Høgsberg commit a3730271d52542757ec0f41acc29e7730501f666 Author: Jon TURNEY Date: Mon Mar 24 17:32:10 2014 +0000 Fix build when configured --enable-debug Include os.h for ErrorF() to fix implicit-function-declaration warnings when configured with --enable-debug. hw/xfree86/parser/DRI.c: In function 'xf86parseDRISection': hw/xfree86/parser/DRI.c:87:5: error: implicit declaration of function 'ErrorF' [-Werror=implicit-function-declaration] hw/xfree86/parser/Extensions.c: In function 'xf86parseExtensionsSection': hw/xfree86/parser/Extensions.c:77:5: error: implicit declaration of function 'ErrorF' [-Werror=implicit-function-declaration] Signed-off-by: Jon TURNEY Reviewed-by: Julien Cristau commit 5870bd398d6073938d821c060eccf24adc07a2f1 Author: Jon TURNEY Date: Mon Mar 24 17:32:09 2014 +0000 Fix ephyr build with --disable-glamor See http://tinderbox.x.org/builds/2014-03-23-0010/logs/xserver/#build Signed-off-by: Jon TURNEY Tested-by: Julien Cristau Reviewed-by: Julien Cristau commit 432fc37e2ca833f1ec3cb614cbdc3a7ae13f22b7 Author: Jon TURNEY Date: Mon Feb 24 20:45:51 2014 +0000 Build fbcmap_mi.c once, rather than once for each DDX Build fbcmap_mi.c once, rather than once for each DDX, and make it part of libfb or libwfb convenience library. Since 84e8de1271bb11b5b4b9747ae4647f47333a8ab7 we don't have fbcmap.c This is a sort of revert of 17d85387d1e6851d35474b65929e268ca64ef65b v2: Remove libkdrivestubs.la from configure.ac Signed-off-by: Jon TURNEY Reviewed-by: Gaetan Nadon commit f23dd02b969089b66685f70887f19041049f7a24 Author: Jon TURNEY Date: Fri Feb 21 18:11:33 2014 +0000 Build Xi/stubs.c once as a convenience library, rather than once for each DDX which wants to use it Signed-off-by: Jon TURNEY Reviewed-by: Gaetan Nadon commit 45b223e1c2bdc447263a9de7af62c93f4058c33c Author: Jon TURNEY Date: Wed Sep 7 12:50:20 2011 +0100 Build dpmsstubs.c once as a convenience library, rather than once for each DDX which wants to use it Signed-off-by: Jon TURNEY Reviewed-by: Gaetan Nadon commit 7b2a517ba99f6756e98c4aef47d9b9399b997157 Author: Julien Cristau Date: Wed Mar 26 23:24:20 2014 +0100 Xephyr: restore initial window resize lost in xcb conversion The XResizeWindow call wasn't replaced by the xcb equivalent, so we were no longer setting the initial window size, only wm size hints. Regression from commit a2b73da "Xephyr: start converting hostx.c over to xcb" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74849 Signed-off-by: Julien Cristau Reported-by: Laércio de Sousa Tested-by: Jon TURNEY Reviewed-by: Jon TURNEY Signed-off-by: Keith Packard commit 1b5d7e78460ed686ba2da398dab341d4867fd4a0 Author: Keith Packard Date: Wed Mar 12 14:35:27 2014 -0700 glamor: Add glamor_program PolyPoint implementation This accelerates poly point when possible by off-loading all geometry computation to the GPU. Improves x11perf -dot performance by 28109.5% +/- 1022.01% (n=3) Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 72a4beff6d3aed767df9a30bca0c1d860715928f Author: Keith Packard Date: Sat Mar 22 15:20:49 2014 -0700 glamor: Move glamor_poly_segment to separate glamor_segment.c file There's no reason to mix PolyPoint and PolySegment in the same file. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-off-by: Eric Anholt commit 029b64c30a8bdf87edfdb1c988f4e8dcee1bb4ef Author: Keith Packard Date: Wed Mar 12 14:27:59 2014 -0700 glamor: Add infrastructure for generating shaders on the fly This just adds a bunch of support code to construct shaders from 'facets', which bundle attributes needed for each layer of the rendering system. At this point, that includes only the primitive and the fill stuff. v2: Correct comment in glamor transform about 1/2 pixel correction needed for GL_POINT. (Eric Anholt) v3: Rebase on Markus's cleanups (change by anholt) Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 0ca7223742e9ec0594203b3a99b11441730cca1a Author: Keith Packard Date: Thu Mar 13 23:12:27 2014 -0700 glamor: Add helper functions to walk pixmap tiling This adds a few helper functions to make pixmap fbo access symmetrical between the single fbo and tiled cases. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt commit 209d004469391420130262059af43a813b2c07d7 Author: Keith Packard Date: Thu Mar 13 23:11:40 2014 -0700 glamor: Add bounding box to one-fbo pixmaps This lets code treat the one-fbo pixmaps more symmetrically with the tiled pixmaps. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt commit 82f91433e277e3711678c1b16be85e89b6c7d530 Author: Keith Packard Date: Tue Mar 18 21:23:24 2014 -0700 glamor: Get testing code using small FBOs working again Glamor has a mode where pixmaps will be constructed from numerous small FBOs. This allows testing of the tiled pixmap code without needing to create huge pixmaps. However, the render glyph code assumed that it could create a pixmap large enough for the glyph atlas. Instead of attempting to fix that (which would be disruptive and not helpful), I've added a new pixmap creation usage, GLAMOR_CREATE_NO_LARGE which forces allocation of a single large FBO. Now that we have pixmaps with varying FBO sizes, I then went around and fixed the few places using the global FBO max size and replaced that with the per-pixmap FBO tiling sizes, which were already present in each large pixmap. Xephyr has been changed to pass GLAMOR_CREATE_NO_LARGE when it creates the screen pixmap as it doesn't want to deal with tiling either. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 11e2f0de71fa341f8b0b1da0a1b9ccbfa6550a50 Author: Keith Packard Date: Tue Mar 18 21:35:41 2014 -0700 mi: miPutImage with XYPixmap failed at depth 32 on 64-bit machines The X server still has 'unsigned long' in a few places to hold 32 bit values. One of those is in miPutImage where it's holding the temporary planemask for XYPixmap format images. It computed the highest plane in the source image with 1 << (depth - 1). On 64-bit machines, taking that value and storing it in an unsigned long promotes it to a signed 64-bit value (0xffffffff80000000). Then, it loops over that value, shifting one bit right each time, waiting for it to go to zero.. That takes 64 iterations, and ends up with some mystic planemask values *and* walking off the end of the source image data and out into space. A simple cast is all that is required to compute the correct initial plane mask (0x0000000080000000), at which point the loop operates correctly once again. Checking the fbPutImage code, I note that this same bug was fixed in 2006 by Aaron Plattner in commit f39fd4242902eaa862321d39337f429dd14ebacf Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Aaron Plattner commit ae87b536155207e6e28b68963593a7ab09792e08 Author: Keith Packard Date: Sat Mar 15 23:53:53 2014 -0700 dix: Allow NULL stipple in ChangeGC miOpqStipDrawable resets the stipple after painting. When that stipple was NULL, ChangeGC needs to handle that and not crash. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-off-by: Eric Anholt commit 2e040f41de18f4d46e649561b6efb043195fdfbe Author: Markus Wick Date: Tue Mar 18 09:42:55 2014 +0100 glamor: Drop feature dependent optimization on startup. We don't care that much about startup time to write different code paths... Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 2e75d974bcfdd879d7417cc02892b78eaea5e888 Author: Markus Wick Date: Tue Mar 18 09:42:54 2014 +0100 glamor: Remove unneeded unbindings. They are already cleared in glamor_put_vbo_space. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 7c4e1472966d9d3d6432621c3114f491a5378604 Author: Markus Wick Date: Tue Mar 18 09:42:53 2014 +0100 glamor: Always keep GL_ELEMENT_ARRAY_BUFFER bound to the same IB. We never used glDrawElements() with a different index buffer. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 82168b1e6ede48898be8a64b1c93b7d82ef65702 Author: Markus Wick Date: Tue Mar 18 09:42:52 2014 +0100 glamor: Select VBO path by ARB_mbr extension. The mbr path was hard coded enabled for desktop gl and disabled for gles. But there are both desktop without mbr and GLES with mbr. v2: Don't forget to update the fini path, too (change by anholt) Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 53df6e8c3bd7025883b9614a549fbf268c110b74 Author: Markus Wick Date: Tue Mar 18 09:42:51 2014 +0100 glamor: Update GL requirements to 2.1. We will never ever run on OpenGL 1.2 as we use shaders everywhere. 2.0 may be enough, but we also often use PBOs and our big shaders won't fit into the first GLSL limits. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 15d36444acc7a2890ade8e320dc16d627a9d2035 Author: Markus Wick Date: Tue Mar 18 09:42:50 2014 +0100 glamor: Use epoxy_gl_version() instead of rolling our own. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 9d87f66e862a521553d48aa73e5ee97431d36ad3 Author: Markus Wick Date: Tue Mar 18 09:42:49 2014 +0100 glamor: Use epoxy_has_gl_extension() instead of rolling our own. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 708fe0625f31ad39ba54f27f04d17ed2aa621cad Author: Markus Wick Date: Tue Mar 18 09:42:48 2014 +0100 glamor: Use glsl "fract/mod" instead of "while" in gradient shaders. This fixes gtkperf. It seemed to hang forever. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 84ff8960722fa9baf6ad70756b9c335bf2a5e515 Author: Eric Anholt Date: Tue Mar 18 09:42:47 2014 +0100 kdrive: Remove duplicated definitions of some XV-related structs. v2: Fix crash because of removed strdup. (by Markus Wick) Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt (v2) commit 370c8c75ca6aebb5d93d2ab87c9c8ffac21fc57d Author: Gaetan Nadon Date: Wed Mar 19 11:28:57 2014 -0400 xfree86: glamor_egl subdir must be distributed - breaks distcheck Signed-off-by: Gaetan Nadon Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 870bbf85e63a59f252f3ea9d63e28f083359d990 Author: Gaetan Nadon Date: Wed Mar 19 14:17:15 2014 -0400 ephyr: typo where "()" should be "$()" in the Makefile - breaks make dist make[3]: Entering directory `/home/nadon/xorg/src/xserver/hw/kdrive/ephyr' make[3]: *** No rule to make target `()', needed by `distdir'. Stop. make[3]: Leaving directory `/home/nadon/xorg/src/xserver/hw/kdrive/ephyr' make[2]: *** [distdir] Error 1 Signed-off-by: Gaetan Nadon Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit dc48bd653c7e1013e2d69e3f59ae3cbc0c893473 Author: Hans de Goede Date: Mon Mar 24 16:32:01 2014 +0100 systemd-logind: Monitor systemd-logind going away When we're using server managed-fds through systemd-logind, systemd-logind *must* keep running while we are using it, as it does things like drmSetMaster and drmDropMaster for us on vt-switch. On a systemd-logind restart, we cannot simply re-connect since we will then get a different fd for the /dev/dri/card# node, and we've tied a lot of state to the old fd. I've discussed this with the systemd people, and in the future there may be a restart mechanism were systemd-logind passed fds from the old logind to the new logind. But for now there answer is simply: "Don't restart systemd-logind", and there never really is a good reason to restart it. So to ensure unpleasentness if people do decide to restart systemd-logind anyways (or when it crashes), monitor logind going away and make this a fatal error. This avoids getting a hard-hung machine on the next vt-switch and will hopefully quickly educate users to not restart systemd-logind while they have an X session using it active. Signed-off-by: Hans de Goede Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit c0d3a13e7ee42be26d6d1923c9f3ae0355497869 Author: Hans de Goede Date: Mon Mar 24 16:31:59 2014 +0100 Buildsys: Create SUID_WRAPPER_DIR before using it Signed-off-by: Hans de Goede Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 6289f71494453d34614b7ff1238840681c2472af Author: Gaetan Nadon Date: Tue Mar 25 14:00:13 2014 -0400 suid: adding Xorg.sh.in to EXTRA_DIST is redundant All files specified in AC_CONFIG_FILES get distributed automatically. Signed-off-by: Gaetan Nadon Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit b82ef51509bf24e8eafeb615a3e2f4fcd559554e Author: Gaetan Nadon Date: Tue Mar 25 13:49:02 2014 -0400 suid: add generated Xorg.sh to hw/xfree86/.gitignore Signed-off-by: Gaetan Nadon Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit ca8f26f63694c27fa488a3b58ea6f00b7dd50f81 Author: Gaetan Nadon Date: Tue Mar 25 13:48:52 2014 -0400 suid: replace deprecated AC_HELP_STRING with AS_HELP_STRING Fixes automake warning. Signed-off-by: Gaetan Nadon Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit bda6fdc71c25b0c3f3747f445103a1995a5713f4 Merge: e46820fb8 78167a98a Author: Keith Packard Date: Tue Mar 25 16:06:03 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit e46820fb897600800b5f3297a59039556774e9c5 Author: Emil Velikov Date: Thu Sep 26 20:28:37 2013 +0100 miinitext: introduce LoadExtensionList() to replace over LoadExtension() Looping around LoadExtension() meant that ExtensionModuleList was reallocated on every extension. Using LoadExtensionList() we pass an array thus the function can do the reallocation in one go, and then loop and setup the ExtensionModuleList. Signed-off-by: Emil Velikov Reviewed-by: Keith Packard v2: Update ephyr [Keith Packard] v3: Eliminate const warnings in LoadExtensionList [Keith Packard] Signed-off-by: Keith Packard commit 78167a98a8631ee3fad145ddc051ceb8487b9683 Author: Adam Jackson Date: Fri Nov 8 09:44:24 2013 -0500 xkb: Restore XkbCopyDeviceKeymap Removed in d35a02a767017f13db4bd4742eef49293d5a30ea, tigervnc 1.2.80 and xf86-video-nested need it for now. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 215f3d2e0f2a4ef6fc2f2c08fb991e1f00b747c8 Author: Kristian Høgsberg Date: Wed Mar 19 20:46:41 2014 -0700 os: Add AddClientOnOpenFD() to create a new client for an file descriptor When the Xwayland server is socket-activated, we need to connect and initialize the window manager before the activating client gets to proceed with connecting. We do this by passing a socket file descriptor for the window manager connection to the Xwayland server, which then uses this new function to set it up as an X client. Signed-off-by: Kristian Høgsberg Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d415b9d69fdaab4ce3fc05d3d26b2d8413403aa4 Author: Emil Velikov Date: Thu Sep 26 20:16:31 2013 +0100 miinitext: avoid allocating a sentinel ExtensionModule With all the logic now in place there is no need to allocate a separate ExtensionModule to be used as a sentinel. Signed-off-by: Emil Velikov Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit b421ac8e026f464fdba2082aaedc00c19fb8b6c7 Author: Emil Velikov Date: Thu Sep 26 20:11:40 2013 +0100 miinitext: constify staticExtensions The array is readonly and should not be tampered with. Signed-off-by: Emil Velikov Reviewed-by: Keith Packard commit 5ff34b5a0b3b333bf0f0334717cc8630cc785510 Author: Emil Velikov Date: Thu Sep 26 20:08:56 2013 +0100 miinitext: drop sentinel detection during LoadExtension All the sentinels from the extension lists were removed, thus the only case were this would trigger is when the code is broken badly. Signed-off-by: Emil Velikov Reviewed-by: Keith Packard commit 6fea450d41a03d32c10c7da162dfaadd8ead4ece Author: Emil Velikov Date: Thu Sep 26 20:08:16 2013 +0100 miinitext: move AddStaticExtensions() to LoadExtension() Separate the function from NewExtensionModule() as the former does only memory reallocation. No functional change. Signed-off-by: Emil Velikov Reviewed-by: Keith Packard commit bf087659f0fb747c471e26c5b287c35877818040 Author: Alan Coopersmith Date: Sat Mar 22 14:30:04 2014 -0700 Add necessary headers for major()/minor() on Solaris to xf86Xinput.c Without these, after commit fdb4ec86c29d85c, it fails to build on Solaris, with errors of: xf86Xinput.c: In function 'xf86stat': xf86Xinput.c:816:5: error: implicit declaration of function 'major' [-Werror=implicit-function-declaration] xf86Xinput.c:817:5: error: implicit declaration of function 'minor' [-Werror=implicit-function-declaration] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit d9fdae5f4a648a10653e18dbc602646f3e22e522 Merge: 99bee6c05 0e5d2996a Author: Keith Packard Date: Sat Mar 22 14:09:00 2014 -0700 Merge remote-tracking branch 'jturney/master' commit 99bee6c0549b36ef15f625bab3997cbd70c7b879 Author: Gaetan Nadon Date: Fri Jan 17 09:54:01 2014 -0500 Default font path: remove the check for ${sysconfdir}/X11/fontpath.d The location ${sysconfdir}/X11/fontpath.d is unknown at configuration time (only at make time) as evidenced by the configuration output: checking for ${prefix}/etc/X11/fontpath.d... no Unlike font-util for the X fonts, there is no mechanism to query where fontpath.d is. Fedora have chosen /etc/X11 and others have followed, but this is not a standard. It might also be installed at another location, it may or may not be under the xserver installation prefix. We just don't know. Debian does not use this at all. Distros are using --with-default-path when they support fontpath.d, so they never relied on the server default as it never worked. The patch essentially is a noop, which leaves the door open for anyone who could potentially provide a reliable implementation of choosing fontpath.d when applicable. Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 1782316744866a181ed92486bb4dca6ac46d40bd Merge: 4fb31e482 2b77b208d Author: Keith Packard Date: Sat Mar 22 13:46:15 2014 -0700 Merge remote-tracking branch 'jwrdecoede/for-keith' commit 0e5d2996ac872aca5995897fc518bdf9116bd246 Author: Jon TURNEY Date: Wed Sep 11 13:36:18 2013 +0100 hw/xwin: Fix WM_ENDSESSION crash on x86_64 We need to include xwin-config.h into winmsgwindow.c, so that _XSERVER64 is defined, so that the layout of ScreenRec type is correct, so that it's privates can be accessed correctly, so that the WM_GIVEUP message can be sent to the screen window. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 896b53ffa72d91d7d604967028291525562b60dd Author: Jon TURNEY Date: Sun Jun 16 13:55:51 2013 +0100 hw/xwin: Improve NET_WM_ICON validation Check that we don't overrun the end of the property data while converting icons See http://cygwin.com/ml/cygwin-xfree/2013-06/msg00040.html for testcase. Also, some warning fixes in winXIconToHICON() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit ab61d070024a4776f011e71d762d4c6c0cf58b12 Author: Jon TURNEY Date: Sun Mar 31 18:29:07 2013 +0100 hw/xwin: Remove obsolete control handling for About dialog Remove the unused, cygwin-specific handling for ChangeLog, UG and CG buttons in the About... Dialog. The buttons themselves were removed in commmit 34269a90ea2087f883f5dc8805894fc4998e4b81. Also remove those window control IDs which are now obsolete. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3b4d472b72601922bac264283eb6b611d8d524fc Author: Oliver Schmidt Date: Wed Sep 7 14:00:56 2011 +0100 hw/xwin: Minimize redraw events after resizing/moving windows in multiwindow mode In multiwindow mode the modal moving/resizing of windows causes a lot of redraw events to be sent to the X clients after the user releases the mouse button. During the moving/resizing client windows are not redrawn as long as the mouse button is pressed, but all redraw/resizing events are queued and executed step after step after the moving/resizing ends. Some clients collect and combine multiple redraw or resizing events, other clients (e.g. xterm) simply execute each redraw or sizing event. The enclosed patch minimizes the events for clients to only one event after the user releases the mouse button to end the moving/resizing. This improves the user experience and reduces strange screen flickerings, especially on slow platforms. The enclosed patch modifies winmultiwindowwndproc.c such that the windows events WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE that are sent by Windows when the modal window resizing/moving begins or ends are considered. Only after WM_EXITSIZEMOVE is the redraw/resizing executed. Signed-off-by: Oliver Schmidt Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 03e1cc6f250a3f5cf17b34639adbbc9850c681cd Author: Jon TURNEY Date: Mon Nov 7 20:54:10 2011 +0000 hw/xwin: Add '@' to window name when it's useful to do so Enhance GetWindowName() so it appends the result of XGetWMClientMachine() when it is available and useful to do so Add -hostintitle option to control this behaviour. Add documentation for this option to man page and -help text. Also, fix warning in UpdateName() v2: Provide a HOST_NAME_MAX definition for MinGW v3: Use '@host' rather than ' (on host)'. Don't add host if it's already in the title. Signed-off-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz Reviewed-by: Colin Harrison commit 6804acfe4fabc8ff8491bbc7edb6260440d3d4d3 Author: Colin Harrison Date: Fri Mar 14 15:44:54 2014 +0000 hw/xwin: Remove prototype for non-existent winMWExtWMUpdateIcon() winMWExtWMUpdateIcon() was removed in commit 527cf13135cfd279733060e0028bbfbe02be5167 Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 7fb5d765ba1e28eb775b847cef3d6079eba3bac1 Author: Colin Harrison Date: Fri Mar 14 15:40:43 2014 +0000 hw/xwin: Use AllocDevicePair() Use AllocDevicePair() rather than allocating Windows keyboard and pointer devices individually. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 061e5eba00a9a0dc27ff76946dc5f77004fc6a56 Author: Colin Harrison Date: Fri Mar 14 15:36:59 2014 +0000 hw/xwin: Consistently use 'L' for long int constants Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 46df614784cbbffcf6368859285e949010f1ceb8 Author: Colin Harrison Date: Fri Mar 14 15:36:24 2014 +0000 hw/xwin: Remove an unneeded include Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit d48749492dc492fd7430ffdfd29842153618f778 Author: Colin Harrison Date: Fri Mar 14 15:34:04 2014 +0000 hw/xwin: Use boolean AND rather than bitwise AND in WIN_POLLING_MOUSE_TIMER_ID For clarity, use boolean AND rather than bitwise AND in WIN_POLLING_MOUSE_TIMER_ID processing. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 80ac4a85d56130d09bbc72ed071759a361ded689 Author: Colin Harrison Date: Fri Mar 14 15:23:16 2014 +0000 hw/xwin: Fix declaration after statement warning in ddxGiveUp() Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit cf59f4888e202c6a68176bd3de1f837ca8480370 Author: Colin Harrison Date: Fri Mar 14 15:09:24 2014 +0000 hw/xwin: Fix typo in comment Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 561bca469d3ade1ff14faddaf70bf12dcdc6aa74 Author: Jon TURNEY Date: Thu Mar 13 22:38:43 2014 +0000 hw/xwin: Fix const discarded warning in winGenerateAuthorization() Fix const discarded warning in winGenerateAuthorization() in !XCSECURITY case In function ‘winGenerateAuthorization’: hw/xwin/winauth.c:123:38: warning: passing argument 2 of ‘GenerateAuthorization’ discards ‘const’ qualifier from pointer target type [enabled by default] hw/xwin/winauth.c:99:1: note: expected ‘char *’ but argument is of type ‘const char *’ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 44fe1b8ea284df6bbaef67e246016d104665b2fe Author: Kristian Høgsberg Date: Wed Mar 19 14:03:13 2014 -0700 os: Add a mechanism to prevent creating any listen sockets A socket-activated server will receive its listening sockets from the parent process and should not create its own sockets. This patch introduces a NoListen flag that can be set by a DDX to prevent the server from creating the sockets. When NoListen is enabled, we also disable the server lock checking, since the parent process is responsible for checking the lock before picking the display name and creating the sockets. Signed-off-by: Kristian Høgsberg Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 62d584d63190c6c8cef5fd49d87b1cb29358a434 Author: Kristian Høgsberg Date: Tue Mar 18 22:05:58 2014 -0700 os: Always compile ListenOnOpenFD() and export it This function was written to allow the X server to inherit the listen socket from launchd on OS X. The code is not specific to OS X though and will be useful for on-demand launched Xwayland servers. Signed-off-by: Kristian Høgsberg Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 797781c7bfd7a0df354fb85aa73df4560828b90b Author: Kristian Høgsberg Date: Wed Mar 19 10:27:39 2014 -0700 test: Don't add TEST_LDADD to list test The list test case is always enabled, even if Xorg is disabled. TEST_LDADD pulls in Xorg files which breaks linking when Xorg is disabled. The list test doesn't need any libraries, so just remove list_LDADD. Signed-off-by: Kristian Høgsberg Cc: Peter Hutterer Signed-off-by: Peter Hutterer commit 4fb31e4824d46edc80bb49b4065152899faa5ac6 Merge: d18d3f6d1 0e531fbb9 Author: Keith Packard Date: Wed Mar 19 06:43:14 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit 0e531fbb97868b9a869044fc5a4f6cb58de6751e Author: Kristian Høgsberg Date: Wed Mar 12 16:31:25 2014 +1000 xkb: add XkbLoadKeymapFromString Signed-off-by: Peter Hutterer Reviewed-by: Kristian Høgsberg commit d18d3f6d18aa7827748f7ba14efd405b525883d0 Merge: 81a4952d3 6649d0059 Author: Keith Packard Date: Mon Mar 17 17:29:56 2014 -0700 Merge remote-tracking branch 'anholt/glamor-megaseries' commit 6649d0059e1bc136b84a9e457ae81c07521fadc0 Author: Michel Dänzer Date: Mon Mar 17 13:16:48 2014 +0900 glamor: Move up glamor_priv->flags assignment in glamor_init() It wasn't assigned yet when it was tested for GLAMOR_NO_DRI3. Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit b5a61239e2fef167c229154d7919ff862503e3f3 Author: Eric Anholt Date: Fri Mar 14 13:10:04 2014 -0700 glx: Make sure we get an FBConfig the root window's visual. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 9999a660135fafe5f1fdf9452e5ca74ffb069dc2 Author: Markus Wick Date: Thu Mar 13 11:17:39 2014 +0100 glamor: don't reset the GLSL program We don't use fixed function rendering, so there is no need to reset the program at all. This lets the driver avoid checking for state changes between draw calls when we rebind the same program. Improves xephyr x11perf -f8text performance by 6.03062% +/- 1.64928% (n=20) Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit aa2635b804e7d28322f62d802190bdf0bb799634 Author: Markus Wick Date: Thu Mar 13 00:24:04 2014 +0100 glamor: remove disabled code This block was disabled since 2011, so there is likely no need to keep it any more. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 6227f07b69b8ab3cd39cf9d257daf2a7202b4ef5 Author: Alan Coopersmith Date: Tue Mar 11 17:28:10 2014 -0700 Remove duplicate assignment of repeat_type_uniform_location Flagged by cppcheck 1.64: [glamor/glamor_gradient.c:987] -> [glamor/glamor_gradient.c:991]: (performance) Variable 'repeat_type_uniform_location' is reassigned a value before the old one has been used. Signed-off-by: Alan Coopersmith Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt commit 1a4b24993974200e26345ea6c501d4aa093169db Author: Eric Anholt Date: Thu Feb 20 15:50:03 2014 -0800 glamor: Apply debug labels to our shaders. This will help tools like fips, apitrace, or INTEL_DEBUG=shader_time provide useful information about the shaders in use. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit d07d2c3c5f95fd644ef563004dfa7f3c53904168 Author: Eric Anholt Date: Sat Jan 11 21:26:01 2014 -0800 glamor: Don't forget to unmap our PBOs before using them to upload. From the GL_ARB_vertex_buffer_object spec: After the client has specified the contents of a mapped data store, and before the data in that store are dereferenced by any GL commands, the mapping must be relinquished by calling boolean UnmapBufferARB(enum target); Our mappings were only getting reaped at PBO destroy time, after the upload. If the GL implementation wasn't coherent, it would have used stale data to do the texture upload. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 64146e4560fdf3c3a40d023ac8e22259915b05ad Author: Eric Anholt Date: Sat Jan 11 21:11:18 2014 -0800 glamor: Add an assert about an invariant the upload code relies on. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 7eb2bafe22dcc90c2fb94d2d9cae370b683dba7c Author: Eric Anholt Date: Fri Jan 10 15:54:25 2014 +0800 glamor: Fix ignoring the ALU during SetSpans(). Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 923c8db7ed1adfe4689f0a36496262faca44b79d Author: Eric Anholt Date: Thu Jan 9 11:36:30 2014 +0800 glamor: Improve the performance of line fallbacks. If the lines aren't solid-filled vert/horiz solid-filled rectangles, we fall back. libreoffice has some diagonal lines, and the performance of the fallback path was atrocious. Just fall back to mi's spans instead, so that we don't do an upload/download. Improves x11perf -seg100 by 863.652% +/- 9.8968% (n=5) Signed-off-by: Eric Anholt commit b6953045566dae15437d4220e68986db7a6b4ca7 Author: Eric Anholt Date: Thu Jan 9 10:53:04 2014 +0800 glamor: Improve the performance of PolyGlyphBlt. Using the same idea as the previous PushPixels code, just make points for each point in the glyph. This is an advantage over the pushpixels fallback because we can batch the BO mappings and draw calls across glyphs. Improves performance of x11perf -f8text by 773.389% +/- 3.50754% (n=10). Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit b885a639144cdadcb0dae8249a168db158770604 Author: Eric Anholt Date: Sun Jan 5 21:54:48 2014 +0800 glamor: Improve the performance of PushPixels by, well, pushing pixels. Otherwise, mi will fall back to GetSpans()ing the bitmap, walking the bitmap, computing spans to be filled, and calling FillSpans(). Improves x11perf -f8text by 759.373% +/- 3.33096% (n=166) Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit ab68982dcc53d29d5e3c5ea092bd91dab09e54c9 Author: Eric Anholt Date: Sat Jan 11 00:06:21 2014 +0800 glamor: Add missing prepares on the GC during fb fallbacks. We had regressions in CopyPlane reported by xts5, because we were (successfully!) dereferencing the null pixmap->devPrivate.ptr for a tile or stipple without having done a prepare. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 93f1824a0b19346f0e1759bedfa9cf10772067af Author: Eric Anholt Date: Sat Jan 11 00:00:00 2014 +0800 glamor: Rely on nested mappings to handle src==dst and !prepare bugs. Now that the core deals with that for us, we can avoid all this extra carefulness. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 4c9a20072552c52b3763bd73e7a7e9b9cb8b4993 Author: Eric Anholt Date: Fri Jan 10 23:43:09 2014 +0800 glamor: Allow nested mapping of pixmaps. The common pattern is to do nested if statements making calls to prepare_access() and then pop those mappings back off in each set of braces. Some cases checked for src == dst to avoid leaking mappings, but others didn't. Others didn't even do the nested mappings, so a failure in the outer map would result in trying to umap the inner and failing. By allowing nested mappings, we can fix both problems by not requiring the care from the caller, plus we can allow a simpler nesting of all the prepares in one if statement. v2: Add a comment about nested unmap behavior, and just reuse the glamor_access_t enum. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit d86eacedab443f172baccf544d17e09090f71f3c Author: Eric Anholt Date: Fri Jan 10 23:39:02 2014 +0800 glamor: Drop unused GLAMOR_ACCESS_WO. Nothing was using it, and it was going to complicate the glamor_prepare_access bugfixing I'm going to do next. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit c36b903f240664f7222cfefc480e60fca936de6a Author: Eric Anholt Date: Thu Mar 13 10:09:08 2014 -0700 glamor: Drop stale comment. The old Xephyr codebase was using the GL window system framebuffer for the screen pixmap, but that meant you couldn't texture from it to do operations sourcing from the screen, so in the version that landed I instead had the screen just be a plain texture. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f7cd1189d068471373f51d932c558f8151182d58 Author: Eric Anholt Date: Fri Jan 10 22:42:02 2014 +0800 glamor: Replace some goofy enum-likes with a real enum. This unpacks the bitfield into an int size, but my experience has been that packing bitfields doesn't matter for performance. v2: Convert more comparisons against numbers or implicit bool comparisons to comparisons against the enum names, and fix up some comments. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 575e3e1bf08c418430da86228d2774e8fda4b8c0 Author: Eric Anholt Date: Mon Jan 6 07:22:47 2014 +0800 glamor: Fix up doxygen for glamor_fill.c. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 53996e252e51c8053537f485616a078cb7b0f738 Author: Eric Anholt Date: Mon Jan 6 07:05:02 2014 +0800 glamor: Rename more solid fill variables to clean up the code. Now the error path of allocation is more obvious: We leave things in the a-few-boxes-at-a-time stack memory state. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit ec3ab2f67baa00326a4964ed2047e8a137915578 Author: Eric Anholt Date: Mon Jan 6 07:01:17 2014 +0800 glamor: Rename a variable to be more descriptive. The "valid_" prefix was used above to describe our allocation that gets reused multiple times, which is totally unrelated. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 01e30d2043f5df104947908f14a377dc77896a98 Author: Eric Anholt Date: Mon Jan 6 06:55:15 2014 +0800 glamor: Fix some integer overflow errors. Imagine a nbox that was (UINT_MAX + small number) / (4 * 2 * sizeof(float)). We'd malloc a few bytes after the integer overflow, but glamor_set_normalize_vcoords would write over gigabytes of heap. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 20bcda977755559294c3a951f80af2ec861595fc Author: Eric Anholt Date: Mon Jan 6 06:53:46 2014 +0800 glamor: Drop bogus _X_UNLIKELY. nbox > 4 is actually quite common for spans handling. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit ad3dd80720676dcdc11ab5db63ccbed7c9509d7e Author: Eric Anholt Date: Mon Jan 6 06:52:32 2014 +0800 glamor: Fix stack overflow in glamor_solid vertex handling. ARRAY_SIZE(vertices) is 32 (floating point values), so we need to divide by the number of floats in a box like we do in the overflow case below. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit d036d22a95b8516a817dd4fa4dd35be363709636 Author: Eric Anholt Date: Sat Jan 4 13:28:52 2014 -0800 glamor: Drop duplicated lines for getting pixmap state in GetImage. No change in generated code size -- apparently the compiler figured it out. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit e23dd41195dfaf1f3e303197845a071d01523618 Author: Eric Anholt Date: Mon Dec 30 18:41:57 2013 -0800 glamor: Return the stride/size for glamor_dri3_name_from_pixmap(), too. Just like for a caller of glamor_dri3_fd_from_pixmap(), otherwise the consumer of that named buffer has no idea what GL chose for the stride. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 4e21b7ee49bc8f33c6211411d80aa70b16998adc Author: Eric Anholt Date: Mon Dec 30 18:33:09 2013 -0800 glamor: Drop the body of the function for enabling DRI3 extensions. The flag is already being set at glamor_egl_screen_init() time, so no need for the driver to separately call this. That said, leave the function around to keep the ABI compatibility. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 92e2125c5219c7b270785f063fe2560583b2baff Author: Eric Anholt Date: Mon Dec 30 18:29:50 2013 -0800 sync: Add a header include necessary to use misyncstr.h Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 12b2adaaeb091ad48825f439fa0359e5641c86d1 Author: Eric Anholt Date: Sat Dec 28 13:46:17 2013 -0800 glamor: Do glyph private init at screeninit time, and other stuff at CSR. This hasn't actually been a problem, since the server hasn't allocated any glyphs before our glyph private initialization during CreateScreenResources. But it's generally not X Server style to do things this way. Now that glamor itself drives both parts of glyphs setup, DDX drivers no longer need to tell glamor to initialize glyphs. We do retain the old public symbol so they can keep running with no changes. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit df1ef90fa0f98c779c3f312130183dbf32f1e447 Author: Eric Anholt Date: Fri Dec 27 18:45:44 2013 -0800 glamor: Move the EGL image to the normal pixmap private. There's no reason to hide EGL from the rest of glamor, now that we have epoxy. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 732faea542c5ecab353536f93bab5dc6c6068d0a Author: Eric Anholt Date: Fri Dec 27 18:27:56 2013 -0800 glamor: Use epoxy_has_egl_extension() instead of rolling our own. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit a895f6a16588024e03218d8d0e77dd8bd8494329 Author: Eric Anholt Date: Sun Jan 5 02:45:05 2014 -0800 glamor: Drop the set of the context to NULL at the end of glamor ops. The theory here was that it (which I copied from EGL) existed to fix up context switching with indirect GLX. But indirect GLX won't even try to set the context again unless its lastContext field is cleared, so we need to solve this a different way. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f31911ff8f3f3707101b7771d5dc994ed1ca5c70 Author: Eric Anholt Date: Thu Feb 27 17:55:50 2014 -0800 xephyr: Don't forget to glViewport() before drawing the screen. Fixes misrendering with cairogears. I had noticed the failure while trying to figure out what was going on with traps. Cairogears was apparently putting its results on the screen through putimage, which is a texture upload, so the last GL drawing was done to the size of the cairogears window, not the size of the xephyr screen. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 8b6c79e19cfabd9f343884ddd91a738720c94583 Author: Kristian Høgsberg Date: Wed Mar 12 17:20:17 2014 +1000 xkb: add KeymapOrDefault Helper function to return a default map if the keymap compilation failed. Signed-off-by: Peter Hutterer Reviewed-by: Kristian Høgsberg commit cb9a1d01468732196fd25c6422991e784639ffce Author: Kristian Høgsberg Date: Wed Mar 12 17:18:22 2014 +1000 xkb: factor out xkb loading to LoadXkm Signed-off-by: Peter Hutterer Reviewed-by: Kristian Høgsberg commit 4391cf27f40ec53d41ac7e437cde49848eb32bde Author: Peter Hutterer Date: Wed Mar 12 16:08:15 2014 +1000 xkb: add a callback to xkbcomp This provides a callback to write to xkbcomp's buffer once everything is prepared. Signed-off-by: Peter Hutterer Reviewed-by: Kristian Høgsberg commit 6ebd838d80074075827dedb75ed4169ea1946be3 Author: Peter Hutterer Date: Wed Mar 12 17:17:25 2014 +1000 xkb: constify XkbDDXOpenConfigFile Signed-off-by: Peter Hutterer Reviewed-by: Kristian Høgsberg commit 2b77b208daf9402472ba7fb709156a14eb487299 Author: Hans de Goede Date: Wed Mar 12 16:00:23 2014 +0100 xf86Xinput: release server managed fd before removing the device from the list So that the fd in use test in systemd_logind_release_fd works properly. Note we cannot change the test inside systemd_logind_release_fd as it must work for devices which were never added to the xf86InputDevs too. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 0e972b6037d3709c13d46adef9d14b702f477abc Author: Hans de Goede Date: Wed Mar 12 14:57:24 2014 +0100 systemd-logind: Correctly deal with InputDevs sharing a device-node InputDevices may share a single device-node, this happens ie with Wacom tablets. This patch makes take_fd and release_fd properly deal with this, together with the earlier patch for updating the fd in all matching xf86InputDevs on pause / resume this completes support for such shared device-nodes. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 8d3f63dbe9bfd816beb6475fd0e00df4dbba269f Author: Hans de Goede Date: Wed Mar 12 12:58:22 2014 +0100 systemd-logind: Add a systemd_logind_set_input_fd_for_all_devs helper And use it where appropriate. Setting the fd for all matching InputDevices is necessary when we've multiple InputDevices sharing a single device-node, such as happens with Wacom tablets. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 4e3d9690e1868d286dcb766b429f9c99313f2401 Author: Hans de Goede Date: Wed Mar 12 13:19:32 2014 +0100 systemd_logind_find_info_ptr_by_devnum: Move to higher inside the file This is a preparation patch for adding support for server managed fds for InputDevices where multiple input devices share the same device node (and thus also their major and minor). Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit ddc3888bbaaddc47706a9cb96459738683d72cb3 Author: Hans de Goede Date: Wed Mar 12 12:45:40 2014 +0100 systemd_logind_find_info_ptr_by_devnum: Add a start argument Modify systemd_logind_find_info_ptr_by_devnum to take a start argument, so that it can be used to find all occurences of a devnum in an InputInfo list, rather then just the first. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 40e3c79a591909ab64822cc86fd07513317bf19b Author: Hans de Goede Date: Tue Mar 11 11:38:09 2014 +0100 Remove config_odev_add_*attribute checks in various places Note that there are more callers but those were already not doing any error checking. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 92ff79f1a804d63d2f2bb59dfbf3a2869627609a Author: Hans de Goede Date: Tue Mar 11 11:28:15 2014 +0100 config_odev*: Use XNF alloc functions config_odev* functions are called in code-paths were we already use XNF* functions in other places, so which are not oom safe already. Besides that oom is something which should simply never happen, so aborting when it does is as good a response as any other. While switching to XNF functions also fixup an unchecked strdup case. Note the function prototypes are kept unchanged, as they are part of the server ABI. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit e7b84ca46944895971a8f048c7e34869b7de01c0 Author: Hans de Goede Date: Wed Mar 5 16:41:14 2014 +0100 Xorg: Add a suid root wrapper With the recent systemd-logind changes it is possible to install the Xorg binary without suid root rights and still have everything working as it should *if* the user only has cards which are supported by kms. This commit adds a little suid root wrapper, which is a bit weird, first we strip the suid-root bit of the Xorg binary, and then we add a wrapper ? The function of this wrapper is to see if a system still needs root-rights, if it does not (it supports kms and the kms drivers are properly loaded), then it will immediately drop all elevated rights before executing the real Xorg binary. If it finds (some) cards which don't support kms, or no cards at all, then it will execute the Xorg server with elevated rights so that ie the nvidia binary driver and the vesa driver can keep working normally. To make it possible for security concious users who don't need the root rights to completely remove the wrapper, Xorg is started in a 3 step process when the wrapper is enabled during build time: 1) A simple shell script which checks if the wrapper is there, if it is it executes the wrapper, if not it directly executes the real Xorg binary 2) The wrapper gets executed, does its checks, normally drops all elevated rights and then executes the real Xorg binary 3) The real Xorg binary does its thing This allows distributions to put the wrapper binary in a separate package, and will allow users to remove this package. IE the plan with Fedora is to make "legacy" drivers depend on the wrapper pkg, and since our default install contains some legacy drivers it will be part of the default install, but users can later yum remove it (which will also automatically remove the legacy driver packages as those won't work without it anyways). The wrapper is loosely modelled after the existing Debian Xwrapper, it uses the same config-file + config-file format, and also allows restricting Xserver execution (through the wrapper) to console users only. There also is a new needs_root_rights config file directive, which can be used to override the auto-detection the wrapper does. Hopefully this will allow Debian to replace their own wrapper with this upstream one. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit d35a02a767017f13db4bd4742eef49293d5a30ea Author: Rui Matos Date: Fri Mar 7 14:32:27 2014 -0800 xkb: Repurpose XkbCopyDeviceKeymap to apply a given keymap to a device This will also make it useful for cases when we have a new keymap to apply to a device but don't have a source device. Reviewed-by: Kristian Høgsberg Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 361f405d3c866bc4d22ef84975fe771691156336 Author: Rui Matos Date: Fri Mar 7 14:32:28 2014 -0800 xkb: Factor out a function to copy a keymap's controls onto another Reviewed-by: Kristian Høgsberg Signed-off-by: Peter Hutterer commit 81a4952d3dcab9ca3a1ee399c773f5ac352036c4 Merge: 96a28e9c9 795066477 Author: Keith Packard Date: Tue Mar 11 22:04:36 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit 795066477ee81b5b82e490eac8bed6b656d01f17 Author: Peter Hutterer Date: Wed Feb 26 07:54:56 2014 +1000 config: search for PnPID on all parents (#75513) The PnPID for a device may not be on the immediate parent, so search up the device tree until we find one. X.Org Bug 75513 Signed-off-by: Peter Hutterer Tested-by: Benjamin Tissoires commit 45fb3a934dc0db51584aba37c2f9d73deff9191d Author: Peter Hutterer Date: Wed Feb 26 16:20:08 2014 +1000 xkb: push locked modifier state down to attached slave devices Whenever the master changes, push the locked modifier state to the attached slave devices, then update the indicators. This way, when NumLock or CapsLock are hit on any device, the LED will light up on all devices. Likewise, a new keyboard attached to a master device will light up with the correct indicators. The indicators are handled per-keyboard, depending on the layout, i.e. if one keyboard has grp_led:num set, the NumLock LED won't light up on that keyboard. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 656841798c99bcd79da47c03ec666a48b855541f Author: Peter Hutterer Date: Wed Feb 26 16:16:10 2014 +1000 xkb: factor out state update into a function No functional changes Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit dda2468e579762dbd1fed2c75b5587d98f841e9c Author: Peter Hutterer Date: Wed Feb 26 16:03:19 2014 +1000 xkb: factor out the StateNotify flag check Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit fdb4ec86c29d85c1f68418a26e64bcc05b9c14ae Author: Peter Hutterer Date: Tue Mar 11 14:21:27 2014 +1000 xfree86: handle xorg.conf devices with logind Only devices from the config backend have their attributes set, devices from the xorg.conf only have Option "Device". That option is also set by the config backend, so use it. And since the config backend sets our major/minor but xorg.conf devices don't have that set, make sure we try to stat it first where needed. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 4754af9ddbd55c5637b56bd9f37d0d3414c839a8 Author: Peter Hutterer Date: Tue Mar 11 14:20:51 2014 +1000 config: only free odev->attrib_name for string types Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 96a28e9c914d7ae9b269f73a27b99cbd3c465ac8 Author: Eric Anholt Date: Thu Mar 6 18:50:07 2014 -0800 glx: Clear new FBConfig attributes to 0 by default. The visualSelectGroup wasn't getting set (since our DRI drivers don't use it), and and since it's the top priority in the sort order, you got random sorting of your visuals unless malloc really returned you new memory. This manifested as Xephyr -glamor rendering to a multisampled window on my system, which as you might guess was slightly lower performance than expected. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 2843a2f9b58a4aae2949111722c5c1bf3878674b Author: Eric Anholt Date: Tue Feb 25 16:56:54 2014 -0800 glamor: Use buffer_storage v2: - Make the default buffer size a #define. (by Markus Wick) - Fix the return offset for mapping with buffer_storage. (oops!) v3: - Avoid GL error at first rendering from unmapping no buffer. - Rebase on the glBindBuffer(GL_ARRAY_BUFFER, 0) change. v4: Rebase on Markus's vbo init changes. v5: Fix missing put_context() in the buffer_storage fallback path. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 9b86f7a1ab7904fbbe04283b6461a31470c77972 Author: Eric Anholt Date: Sun Jan 12 07:54:51 2014 -0800 glamor: Fix requested composite VBO size. The argument to setup_composte_vbo is the number of verts. v2: Drop the now-unused vert_stride value. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit d310d566b18e55bce27301e9ac78a7894d5194dd Author: Eric Anholt Date: Mon Jan 6 09:29:57 2014 +0800 glamor: Extract the streamed vertex data code used by Render. We should be uploading any vertex data using this kind of upload style, since it saves a bunch of extra copies of our vertex data. v2: - Add a simple comment about what the function does. - Use get_vbo_space()'s return in trapezoids, instead of dereffing glamor_priv->vb (by Markus Wick). - Fix the double-unmapping by moving put_vbo_space() outside of flush_composite_rects(). - Remove the rest of the composite_vbo_offset usage, and just always use get_vbo_space()'s return value. v3: - Fix failure to put_vbo_space in traps when no prims were generated. - Unbind the VBO from put_vbo_space(). Keeps callers from forgetting to do so. v4: - Split out some changes into the previous 3 commits while trying to track down a regression. - Fix regression due to rebase fail where glamor_priv->vbo_offset wasn't incremented. v5: - Fix GLES2 VBO sizing. - Add a comment about resize behavior. - Move glamor_vbo.c init code to glamor_vbo.c from glamor_render.c. (Derived from Markus's changes, but the GLES2 fix dropped almost all of the code in the functions). v6: - Drop the initial BufferData on GLES2 (it happens at put() time). - Don't forget to set vbo_offset to the size on GLES2. - Use char * instead of void * in the cast to return the vbo_offset. - Resize the default FBO to 512kb, to be similar to previous behavior. +1.66124% +/- 0.284223% (n=679) on aa10text. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit ffc8423077d8b5af36ab59f59e4e18109586aec9 Author: Eric Anholt Date: Thu Mar 6 17:05:31 2014 -0800 glamor: Track the next vertex offset as we go for AA traps. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit ca307fd18d4dfded04979903737ec5dd03487625 Author: Eric Anholt Date: Thu Mar 6 17:03:14 2014 -0800 glamor: Track the next vertex offset as we go for non-AA traps. v2: Use sizeof(float) instead of 4. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 03a33048a74d986e27668a4d01861ead0f8be76b Author: Eric Anholt Date: Thu Mar 6 16:57:46 2014 -0800 glamor: Track the next vertex offset as we go in render accel. I want to extract the VBO mapping code, and as part of that I need to get the global vbo_offset munging to stop. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 438d8aceec2d4af48917a7dfecacf11cd4f4b5ce Author: Eric Anholt Date: Thu Mar 6 13:29:08 2014 -0800 glamor: Move glamor_emit_composite_vert() to traps, where it's used. It's only used in the nonantialiased, triangle-based trapezoids path. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit bce5ec4f411134114c6ee2715f293a2250ee8800 Author: Eric Anholt Date: Tue Dec 24 12:14:04 2013 -0800 glamor: Don't forget to set GL_INVALIDATE_RANGE_BIT on GL_ARB_mbr. We don't need any current contents of the buffer, and this allows an implementation to make a temporary BO for a streamed upload if it wants to. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 25be6b384298a7769fedb6d9b5bdc370398c9c95 Author: Eric Anholt Date: Sun Jan 12 07:18:50 2014 +0800 glamor: Fix a mismatched glamor_get/put_context(). We don't call GL in this function any more, so we can just drop the get. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit bd09292debbb810db06b187d4e61c9416b5e565e Author: Eric Anholt Date: Fri Dec 27 14:03:26 2013 -0800 glamor: Add a note about the state of GL_ARB_map_buffer_range. GLES2 Xephyr is failing due to lack of glMapBuffer() with the read bits set, and I decided to see if we can just switch everything to glMapBufferRange(). I'm undecided, and it largely depends on whether we find people are interested in using glamor for the windows X server. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit ca507d215f54e878055de8da13877bc0225bece1 Author: Eric Anholt Date: Tue Dec 24 16:07:12 2013 -0800 glamor: Fix a spelling mistake in GLAMOR_PIXMAP_FBO_NOT_EXACT_SIZE. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 4e86f4236b32b61796d820714dc12457dbc92e28 Author: Eric Anholt Date: Mon Dec 23 18:16:01 2013 -0800 glamor: remove dead global variable. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 7f15e5aed79803fa6057fbfda7dfbacacc2e019d Author: Hans de Goede Date: Mon Mar 3 16:58:54 2014 +0100 Require video drivers to report that they support server managed fds This makes how we handle video drivers identical to what we do for input drivers, and this should make live easier for old non kms drivers. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit 76af81bdf8ade158d7cef718ff6cf31cbf641a9a Author: Hans de Goede Date: Mon Mar 3 16:07:16 2014 +0100 xf86platformBus: Make doPlatformProbe accept a NULL gdev argument And use it from xf86platformAddDevice too, instead of directly calling drvp->platformProbe. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit 749d25f6f0faed00a4cd906171ea6f96d76591e7 Author: Hans de Goede Date: Fri Mar 7 04:59:47 2014 -0500 systemd-logind: Fix vt-enter not working when using a legacy video driver If there is only a single non kms video device (tested with the vesa driver), then we will never get a resume signal for a drm node, so also call vtenter when we get a resume for an input device. Notes: 1) vtenter checks if it is ok to do the vtenter, so if there are kms video devices the calls for input device resumes are a nop 2) This assumes that there will always be at least one server event fd supporting input device. Since all non legacy input-drivers will be patched to supported server fds this seems a safe assumption. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit c6dea929a4951c3c048554a1ef54cf8143d9577a Author: Hans de Goede Date: Mon Mar 3 17:00:57 2014 +0100 config_odev_add*_attribute: Don't add the attribute to the list twice Don't do the xorg_list_append a 2nd time when updating existing attributes, while at it add a helper function for this to avoid code duplication. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 2f2967173ba0b0a4f7ab013edeaaf11e7c181beb Author: Hans de Goede Date: Mon Mar 3 09:51:36 2014 +0100 hashtabletest: Fix warning: format ‘%ld’ expects argument of type ... This fixes the following compiler warning: hashtabletest.c: In function ‘print_xid’: hashtabletest.c:15:5: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘XID’ [-Wformat=] printf("%ld", *x); ^ Signed-off-by: Hans de Goede Reviewed-by: Eric Anholt commit b972851ce47b5e3b681a212a43dd71aab94e7a1b Author: Dave Airlie Date: Mon Mar 10 08:58:37 2014 +1000 xserver: fix build since system-logind.h on tinderbox and irc Reviewed-by: Hans de Goede Reviewed-by: Matthieu Herrb Reviewed-by: Alan Coopersmith Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit 1c61d38528a573caadee2468ee59ea558c822e09 Merge: 5350ae1d3 bf3543739 Author: Keith Packard Date: Fri Mar 7 22:07:19 2014 -0800 Merge remote-tracking branch 'jwrdecoede/for-keith' commit 5350ae1d38f3c69a26421e0866ede0d2ccc3aea4 Author: Jon TURNEY Date: Fri Mar 7 15:59:10 2014 +0000 Fix xephyr build in --disable-glamor case It broke after commit 9fe052d90cca90fdf750d3a45b151be2ac7f0ebd "xephyr: Build support for rendering with glamor using a -glamor option." See http://tinderbox.x.org/builds/2014-03-07-0004/logs/xserver/#build Signed-off-by: Jon TURNEY Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 78e508c9379b3976ac8e76b7aaa90ba86ad4e443 Author: Andrew Eikum Date: Mon Dec 30 09:15:41 2013 -0600 dix: Clear any existing selections before initializing privates If there is a selection left over from a previous execution of the main loop, and that selection has privates allocated for it, the X server will crash. This is because dixResetPrivates() resets the privates refcounts to zero without accounting for the reference held by the selection object. When the selection is then deleted in InitSelections() after the call to dixResetPrivates(), the refcount for its privates type goes negative and bad things happen. To fix this, we should delete any existing selections before calling dixResetPrivates(). This will properly release the selection's privates and avoid the crash. A more thorough description of the problem and a test case to reproduce the crash is available at a previous mail: "Negative Selection devPrivates refcount?" By Andrew Eikum to xorg-devel on 10 Dec 2013 http://lists.freedesktop.org/archives/xorg-devel/2013-December/039492.html Signed-off-by: Andrew Eikum Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit da08316605b26830b4d8f8fb2d9e69471cdc80ab Author: Eric Anholt Date: Tue Dec 31 00:07:42 2013 -0800 glamor: Add support for DRI3. The render-nodes case is untested. v2: Add a flag for wayland to suppress the native DRI3 support. Wayland isn't running as a master itself, so it can't do the auth on its own and has to ask the compositor to do it for us. Dropped XXX about randr provider -- the conclusion from discussion with keithp was that if the driver's dri3_open for a provider on a different screen, that's a core dri3 bug. v3: Don't put quite so much under GLAMOR_NO_DRI3, and add a comment explaining what this is about. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit fb4a1e6ef6f80a7670e92cab2bc490d4afd80a9b Author: Eric Anholt Date: Mon Dec 30 18:49:46 2013 -0800 glamor: Rename the DRI-related pixmap functions. There was confusion over whether they should have egl in the name, and they had DRI3 in the name even though they're useful to have without DRI3. v2: Just rename glamor_name_from_pixmap for now -- I'd accidentally conflict-resolved in adding new parameters from a later commit. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 2d20f75b60276508424997d9fa8c5b97d8f1d92b Author: Eric Anholt Date: Fri Dec 27 22:19:07 2013 -0800 xorg: Connect up the glamor XV code, xorg DDX-only for now. Porting this code to be non-xorg-dependent is going to take significant hacking, so just dump it in the glamoregl module for the moment, so I can hack on it while regression testing. v2: Fix compiler warnings by adding #include dix-config.h at the top, don't try to auto-init (I'll try to fix the xv ABI later). v3: Fix last minute breakage of having reintroduced xf86ScrnToScreen (one of the compat macros). Just use the drawable's pScreen instead. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 8d1cca30638f8a12c09efee27e9dedd90322b40e Author: Eric Anholt Date: Fri Dec 27 16:44:15 2013 -0800 xorg: Build a glamor_egl module. This is not exposing the API we want long term, but it should get existing DDX drivers up and running while we massage the API into shape. v2: Use LIBADD instead of LDFLAGS to fix deps on libglamor.la, and use version 0.5.1 (the point it was forked from the external repo). Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit fa2e78788327c41bfd45b3de3c71bf9c26dcc85e Author: Eric Anholt Date: Fri Dec 20 10:41:43 2013 -0800 xephyr: Pass incoming XCB events to the Xlib event filter. This is the same thing that Qt ended up doing to get DRI2's event mangling to happen despite using an XCB event loop. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 9fe052d90cca90fdf750d3a45b151be2ac7f0ebd Author: Eric Anholt Date: Wed Dec 18 13:24:14 2013 -0800 xephyr: Build support for rendering with glamor using a -glamor option. v2: Avoid making the Ximage for the screen that we'll never use, and drive the screen pixmap creation for glamor ourselves. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard (v1) Reviewed-by: Adam Jackson commit b634e909895f6001e7d9543e1350b20c82c8c01c Author: Jon TURNEY Date: Thu Jun 27 23:56:23 2013 +0100 hw/xwin: More closely follow ICCCM for setting input focus In multiwindow mode, more closely follow ICCCM section 4.1.7 when setting X input focus to a window when the native Windows window acquires input focus: - If InputHint is FALSE, don't use XSetInputFocus() - If the window supports the WM_TAKE_FOCUS protocol, send a WM_TAKE_FOCUS message This helps JDK 1.7 clients acquire the focus correctly. Also, factor out checking client support for a given WM_PROTOCOLS protocol as a separate function. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0fc84a2bb6970f6b05a19cd8b32a7f3f7fd148b3 Author: Colin Harrison Date: Fri Feb 28 15:02:14 2014 +0000 hw/xwin: Remove unnecessary casts from malloc/realloc/calloc calls Remove unnecessary casts from malloc/realloc/calloc calls. This is the style used for the majority of X server code. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 94f709cfce62e716f8d3adea388625850de71e78 Author: Colin Harrison Date: Fri Feb 28 14:23:00 2014 +0000 hw/xwin: Add missing FORCEEXIT token to XWin configuration file lexer Somehow this was left out of commmit f3fad371cce0f3836514ad5b29e59fa1ca0627a7 Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 6432d44020443bbda90bd46ffcb572b51be803a1 Author: Colin Harrison Date: Fri Feb 28 14:21:46 2014 +0000 hw/xwin: Silence bell when volume is zero Allow the bell to be turned off with X server option '-f 0', or by 'xset b off'. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 7e37c4f727609d2d992ca46ffce56311c8d8225c Author: Colin Harrison Date: Fri Feb 28 14:21:06 2014 +0000 hw/xwin: Fix typo in comment 'i' before 'e' except after 'c' Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit d75195b62677f5b0f17bbe089b3aea5b295d5f2c Author: Colin Harrison Date: Fri Feb 28 14:20:48 2014 +0000 hw/xwin: Align parameter names in prototypes with definition A follow up to commits 2d9123fd, 451c5d91 and efe96a17, which changed the parameter name in the definition from index to i, to fix shadowing index() but didn't adjust the prototype declaration. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit e53568e2c5004a434a16e3971fb2cd0823e6487b Author: Jon TURNEY Date: Wed Jan 1 16:43:38 2014 +0000 hw/xwin: Just generate the WGL wrappers we need Just generate the WGL wrappers we need, rather than for everything in wgl.xml This avoids generating a lot of unused wrappers, and also avoids compilation requiring a wglext.h at least as new as wgl.xml Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit dec5e9899bfee2a83f8a64f975790ecd2390256d Author: Yaakov Selkowitz Date: Wed Apr 10 18:04:17 2013 +0100 hw/xwin: Fix implicit-function-declaration warning in XwinExtensionInit() when compiled with XWIN_GLX_WINDOWS defined InitOutput.c: In function ‘XwinExtensionInit’: InitOutput.c:170:9: error: implicit declaration of function ‘glxWinPushNativeProvider’ [-Werror=implicit-function-declaration] glxWinPushNativeProvider(); ^ InitOutput.c:170:9: warning: nested extern declaration of ‘glxWinPushNativeProvider’ [-Wnested-externs] Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit bf3543739db18c6cd52908f7c693cb64f43e3f23 Author: Hans de Goede Date: Sat Feb 1 13:21:15 2014 +0100 xf86OpenSerial: Add support server managed fds Try to get a server managed fd from the Options before trying to open the device node ourselves. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit d9a4059d400bf288aadd17c04885cb9b0fb93989 Author: Hans de Goede Date: Tue Jan 14 15:47:48 2014 +0100 config-udev: Don't try to add drm devices twice Before this commit we were trying to add most drm devices twice, once from xf86platformProbe() and once from config_udev_init(). This results in somewhat confusing messages in Xorg.log, ie: (II) xfree86: Adding drm device (/dev/dri/card0) Later followed by: (II) config/udev: Adding drm device (/dev/dri/card0) By filtering out duplicate drm devices we avoid these confusing messages. Signed-off-by: Hans de Goede Acked-by: Peter Hutterer commit 687afa3f6475060e6c460aa9496ba1a6a7982102 Author: Hans de Goede Date: Fri Jan 31 15:21:38 2014 +0100 systemd-logind: Add delayed input device probing With systemd-logind we cannot probe input devices while switched away, so if we're switched away, put the pInfo on a list, and probe everything on that list on VT-Enter. This is using an array grown by re-alloc, rather than a xorg_list since creating a new data-type to store a pInfo + list-entry just for this seems overkill. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit cac39219898f5e5a59ff8d8d6524f5fe0d111469 Author: Hans de Goede Date: Tue Jan 14 15:37:33 2014 +0100 systemd-logind: Hookup systemd-logind integration This commits makes the changes necessary outside of the systemd-logind core to make the server use systemd-logind managed fds for input devices and drm nodes. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 82863656ec449644cd34a86388ba40f36cea11e9 Author: Hans de Goede Date: Tue Jan 7 12:15:12 2014 +0100 systemd-logind: Add systemd-logind "core" This commits add the bulk of the systemd-logind integration code, but does not hook it up yet other then calling its init and fini functions, which don't do that much. Note the configure bits check for udev since systemd-logind use will only be supported in combination with udev. Besides that it only checks for dbus since all communication with systemd-logind is happening over dbus, so no further libs are needed. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 5fb641a29bfb4a33da964e1e9af523f3472015c6 Author: Hans de Goede Date: Mon Jan 13 12:03:46 2014 +0100 hotplug: Extend OdevAttributes for server-managed fd support With systemd-logind support, the xserver, rather than the drivers will be responsible for opening/closing the fd for drm nodes. This commit adds a fd member to OdevAttributes to store the fd to pass it along to the driver. systemd-logind tracks devices by their chardev major + minor numbers, so also add OdevAttributes to store the major and minor. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit a8d802cb019da0549da57576ba0cc2cef1c8a98c Author: Hans de Goede Date: Sun Feb 2 13:54:33 2014 +0100 OdevAttribute: Remove unowned flag from OdevAttributes head The OdevAttributes struct should just be a head of the attributes list, and not contain various unrelated flags. Instead add a flags field to struct xf86_platform_device and use that. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit bc9d17fb566d57eabe4a3372773654fcf6ae5b44 Author: Hans de Goede Date: Sun Feb 2 15:28:31 2014 +0100 OdevAttribute: Add support for integer attributes Add a couple of new functions for dealing with storing integer values into OdevAttributes. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie Reviewed-by: Peter Hutterer commit 350559dcdcd8b0de57801302e385e25debcb91f1 Author: Hans de Goede Date: Mon Feb 3 15:47:35 2014 +0100 OdevAttribute: config_odev_add_attribute: replace existing values If an attribute already exists replace its value rather than adding a duplicate attribute with the new value to the list. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie Reviewed-by: Peter Hutterer commit 10c64e80569bbd35e97916a067f553cab27454b5 Author: Hans de Goede Date: Sun Feb 2 11:25:34 2014 +0100 OdevAttribute: Add config_odev_get_attribute helper Add a config_odev_get_attribute helper, and replace the diy looping over all the attributes done in various places with calls to this helper. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie Reviewed-by: Peter Hutterer commit 3346166a6596115421702c1f7e2732215674ab8e Author: Hans de Goede Date: Mon Jan 13 11:57:38 2014 +0100 xf86Xinput: Modify API for server-managed fd support With systemd-logind support, the xserver, rather than the drivers will be responsible for opening/closing the fd for input devices. This commit adds a new capabilities field to the InputDriverRec and a XI86_DRV_CAP_SERVER_FD flag for drivers to indicate that they support server managed fds. This commit adds a new XI86_SERVER_FD flag to indicate to drivers when the server is managing the fd and they should not open/close it. Note that even if drivers declare they support server managed fds there is no guarantee they will actually get them. Since this changes the input driver ABI, this commit bumps it. systemd-logind tracks devices by their chardev major + minor numbers, since we are breaking ABI anyways also add major and minor fields for easy storage / retrieval of these. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 6b79f28f5cb259f2168ecc3034fe2161e969bf7d Author: Hans de Goede Date: Wed Jan 22 11:32:56 2014 +0100 linux: xf86OpenConsole: Don't detach from controlling tty when it is our vt Detaching from our controlling tty makes little sense when it is the same as the vt we're asked to run on. So automatically assume -keeptty in this case. This is useful to do because when not running as root the server can only make various VT related ioctls when it does not detach from the tty. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 701b7ab34984b0f9f0c357b0ff8b53c5132c6324 Author: Hans de Goede Date: Thu Jan 16 10:37:28 2014 +0100 linux: xf86OpenConsole remove root-rights check for keeptty option There is no reason why keeptty cannot be used without root-rights. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 98f59a33dfc2d47a57c68420f226dc0c17992164 Author: Dave Airlie Date: Fri Feb 28 12:04:30 2014 +1000 modesetting: fix cursor rendering with hotspots. older kernels report EINVAL not ENOSYS, doh. Signed-off-by: Dave Airlie commit 2029c028fcffbe1aa175ab75636ae954a211c82a Author: Adam Jackson Date: Tue Feb 25 09:06:55 2014 -0500 modesetting: Don't (brokenly) double-track software cursor Signed-off-by: Adam Jackson commit caf1dec2a76fbbd21259fe4cc809e24a55ff79b4 Author: David Sodman Date: Mon Feb 10 09:07:33 2014 -0800 V2: Add check for link from output to crtc before optimizing out a CrtcSet call The function RRCrtcSet call checks to see if the config being set is already configured, but, doesn't check that the selected outputs are connected to the crtc before skipping. This means that the following sequence will omit the final CrtcSet call to the driver: CRTC c1 connect to output o CRTC c2 connect to output o CRTC c1 connect to output o This change adds the check to ensure that each of the calls are made to the driver. Signed-off-by: David Sodman Reviewed-by: Stéphane Marchesin Signed-off-by: Keith Packard commit 249565a07d1d243e27440e2a5ecf4c95490903c6 Author: Alan Coopersmith Date: Sun Feb 9 23:13:51 2014 -0800 Fix test/os to work on Solaris Due to bad decisions made decades ago at AT&T, on SVR4 OS'es the signal() function resets the signal handler before calling the signal handler (equivalent to sigaction flag SA_RESETHAND). This is why the X server has a OsSignal() helper function in os/utils.c that uses the portable POSIX sigaction function to provide BSD/Linux semantics in a signal() style API, so we switch to use that in this test case, allowing it to pass on Solaris. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 0031f6b073c7a4cca553c1d3e185a63436a75cbe Author: Alan Coopersmith Date: Sun Feb 9 23:13:50 2014 -0800 Fix test/signal-logging to work on Solaris For some reason, Solaris libc sprintf() doesn't add "0x" to the %p output as glibc does, causing the test to fail for not matching the exact output. Since the 0x is desirable, we add it ourselves to the test string. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit e67f2d7e0f9189beb2907fa06cff5ecc7f35f922 Author: Matthieu Herrb Date: Sun Feb 9 11:20:59 2014 +0100 gcc 4.2.1 doesn't support #pragma GCC diagnostic ignored Signed-off-by: Matthieu Herrb Signed-off-by: Keith Packard commit 1940508a4af33d44a7a8ef24bbdcd1e31e228dab Merge: c85ea92af ddeca9274 Author: Keith Packard Date: Mon Feb 24 16:27:52 2014 -0800 Merge remote-tracking branch 'herrb/master' commit c85ea92af145c98a4a3fc6cf7b9eac796a48cc2e Author: Keith Packard Date: Mon Feb 24 09:51:39 2014 -0800 Bump to 1.15.99.901 Signed-off-by: Keith Packard commit 0840a303c47b9b10ba8e24e62956da0f1675e963 Merge: 0f10cfd4b 3d71df48e Author: Keith Packard Date: Mon Feb 24 09:40:23 2014 -0800 Merge remote-tracking branch 'anholt/glamor-pull-request' commit fac2bcf1da09fba8bc8b22631e31f3c5b2737efd Author: Dave Airlie Date: Mon Jan 20 11:06:42 2014 +1000 modesetting: try and use hotspot cursor support Signed-off-by: Dave Airlie commit 4aab7aa7c1a15af7211996fa30e17a645f120ff9 Author: Dave Airlie Date: Fri Feb 21 12:48:42 2014 +1000 modesetting: move closing fd to after we check outputs On something like cirrus, start X, then attempt to start a second X while the first is running, if fbdev is installed it'll fail hard. Signed-off-by: Dave Airlie commit 0f10cfd4b903d4db293ec47c8a9a0d8b33965803 Author: Peter Hutterer Date: Thu Feb 20 13:18:05 2014 +1000 Xi: check for invalid modifiers for XI2 passive grabs The other values are checked correctly, but if a modifier was outside the allowed range, it would go unnoticed and cause a out-of-bounds read error for any mask equal or larger than 256. The DetailRec where we store the grab masks is only sized to 8 * sizeof(Mask). Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit ec6a44612565e0716bd5b2e2b80a8d381691feb6 Author: Gaetan Nadon Date: Wed Feb 19 13:48:06 2014 -0500 test: remove source file from hashtabletest LDADD LDADD is for libraries and not for source code. Introduced in commit: ccb3e78124fb05defd0c9b438746b79d84dfc3ae Signed-off-by: Gaetan Nadon Signed-off-by: Peter Hutterer commit 31b0be69e5eea3d1c82d6610bd37bbdb4dca779c Author: Thierry Reding Date: Wed Feb 19 17:16:48 2014 +0100 test/input: Fix alignment assertion for doubles The code previously tried to compute the offset of a field in the valuator by subtracting the address of the valuator from the _value_ of the field (rather than the field's address). The correct way to do it would have been (note the &'s): assert(((void *) &v->axisVal - (void *) v) % sizeof(double) == 0); assert(((void *) &v->axes - (void *) v) % sizeof(double) == 0); That's essentially what the offsetof() macro does. Using offsetof() has the added benefit of not using void pointer arithmetic and therefore silencing a warning on some compilers. Signed-off-by: Thierry Reding Signed-off-by: Peter Hutterer commit 9368bdec1d37127e97411b684f0b1fce5ee97907 Author: Laércio de Sousa Date: Mon Feb 17 08:43:49 2014 +1000 Get rid of config/non-seat0.conf.multi-seat This file is deprecated by commits c73c36b53 and 46cf2a6093. Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3d71df48e70884deccb293cf1fcffbdba8efd94b Author: Eric Anholt Date: Fri Dec 27 14:21:05 2013 -0800 glamor: Move the EGL DRI3 code to GLAMOR_HAS_GBM. There's nothing dependent on the presence of DRI3 code in the server for this, but it does rely on GBM. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 80cdbb20f9dcdfdf3e77ecf5cdd7dfb1a87d1a83 Author: Eric Anholt Date: Fri Dec 27 13:21:21 2013 -0800 glamor: Fix linking of the gradient shaders on GLES2. GLES2 sensibly doesn't allow you to attach multiple shaders for the same stage to a single program. This means we have to attach the whole thing in one glShaderSource call. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 76bd0f994959f30a37d41eaf06f43f23c3b23faf Author: Eric Anholt Date: Fri Dec 27 13:09:25 2013 -0800 glamor: Don't bother keeping references to shader stages for gradients. They never get reattached to any other program, so saving them to unreference later is a waste of code. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 6e62cdf66d2f0baa4a26eff6f4917f73baf3b008 Author: Eric Anholt Date: Fri Dec 27 11:29:27 2013 -0800 glamor: Fix typo in setting v_position's attrib location. Assuming it was the first attribute assigned by the GL, it would have ended up with location 0 anyway. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit f8d384fa8f0fa2a3ac04c4ad21fb04400490e8e6 Author: Eric Anholt Date: Fri Dec 27 02:13:27 2013 -0800 glamor: Move shader precision stuff from build time to shader compile time. This is the last desktop-versus-ES2 build ifdef in core glamor. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 1adac62a7d9da099c779e65527ece611cf4d2f2c Author: Eric Anholt Date: Fri Dec 27 02:10:53 2013 -0800 glamor: Unifdef the picture-format-to-format-and-type functions. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 3747c260816a36352bb91ce06befcbffbbd747c7 Author: Eric Anholt Date: Fri Dec 27 16:12:15 2013 -0800 glamor: Move glamor_get_tex_format_type_from_pictformat to a .c file. A pair of 150 lines of inlined switch statements in a header file is crazy. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 0e4f3414189b1820443b35248e4c9e03f0c2e34e Author: Eric Anholt Date: Fri Dec 27 02:04:11 2013 -0800 glamor: Unifdef the cache format indices. We only ask for GL_RGB on desktop GL as far as I can see, but now if GLES2 did happen to ask for GL_RGB it would return a cache index instead of -1. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit d63283860a7c04a12838dead0dfd6d04fb73a093 Author: Eric Anholt Date: Fri Dec 27 01:23:15 2013 -0800 glamor: Pass pixmaps around to unifdef glamor_iformat_for_depth(). v2: Just pass in the PicturePtr to glamor_pict_format_is_compatible() (suggestion by keithp) Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit f3f4fc7a65589a200a086ea7b1527f91941bc19b Author: Eric Anholt Date: Fri Dec 27 01:17:10 2013 -0800 glamor: Add a screen argument to drop an ifdef from glamor_set_alu(). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 9553020b7184ed7a7ef3f02d60556d519ea3e769 Author: Eric Anholt Date: Wed Dec 25 11:39:13 2013 -0800 glamor: Drop a bunch of GLES2 ifdefs. Now that we're using epoxy, we can write code using both desktop and ES symbols and decide what to use at runtime. v2: Fix a spelling mistake (latter), since the lines were moved anyway (noticed by Rémi Cardona). Fix condition invert in glamor_set_composite_texture (caught by Michel Dänzer). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard (v1) Reviewed-by: Adam Jackson (v1) commit c3c8a5f36034b6a2ce48d1d42e3de5af36406c38 Author: Eric Anholt Date: Wed Dec 25 11:36:35 2013 -0800 glamor: yInverted is a boolean value, so use the Bool type. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 12cbfeed81d3ae73e10ee8a2b6619fb4f403b8f6 Author: Eric Anholt Date: Mon Dec 23 18:00:46 2013 -0800 glamor: Drop fixed function transformation matrix setup. gl_ModelViewProjection and friends aren't used in our shaders, so this setup didn't do anything. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 62965d278c347ff323f2262d767978794e32f841 Author: Eric Anholt Date: Mon Dec 23 17:50:46 2013 -0800 glamor: Drop useless glEnable/glDisable(GL_TEXTURE_2D) calls. Those calls are only for enabling texture handling in the fixed function pipeline, while everything we do is with shaders. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 4afe15d8bfd575c010ed1868697a7922a37ab378 Author: Eric Anholt Date: Wed Dec 18 15:27:52 2013 -0800 glamor: Put in a pluggable context switcher for GLX versus EGL. The GLX side just gets the context from the current state. That's also something I want to do for EGL, so that the making a context is separate from initializing glamor, but I think I need the modesetting driver in the server before I think about hacking on that more. The previous code was rather incestuous, along with pulling in xf86 dependencies to our dix code. The new code just initializes itself from the current state. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 781c692cf970642865f0e537f4905c43192f9935 Author: Eric Anholt Date: Wed Dec 18 13:10:24 2013 -0800 glamor: Rename glamor_get/put_dispatch to glamor_get/put_context. It used to be the thing that returned your dispatch table and happeend to set up the context, but now it just sets up the context. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 0373b3f4f7c7aec633468b37f9236a2734dbcc74 Author: Eric Anholt Date: Wed Dec 18 12:18:20 2013 -0800 glamor: Convert to using libepoxy. Libepoxy hides all the GL versus GLES2 dispatch handling for us, with higher performance. v2: Squash in the later patch to drop the later of two repeated glamor_get_dispatch()es instead (caught by keithp) Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f34dc7fa96457ea6a0703493d74e63cca357712e Author: Jeremy Huddleston Sequoia Date: Fri Feb 14 00:31:38 2014 -0800 XQuartz: pointer -> void * Fix build regression from 60014a4a98ff924ae7f6840781f768c1cc93bbab Signed-off-by: Jeremy Huddleston Sequoia commit 72237e0908527e9261b91c7db99f32d895947d8d Author: Keith Packard Date: Thu Feb 13 15:25:56 2014 -0800 DIST_SUBDIRS needs to include glamor, even if it isn't built Otherwise, glamor won't get cleaned for 'make distclean' Signed-off-by: Keith Packard commit 783991b1beeb71d91068601789d179d10eb8b544 Author: Gaetan Nadon Date: Thu Feb 13 17:36:34 2014 -0500 config: fails to create tarball as xorg-server.conf file removed Just need to update EXTRA_DIST Reviewed-by: Peter Hutterer Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 02fbae85e7aa17b213e1411fe558256998d367c4 Author: Alex Deucher Date: Wed Feb 12 13:06:51 2014 -0500 modesetting: query cursor size from the kernel Use new drm caps. This allows hw cursors to work correctly on gpus with non-64x64 cursors. Signed-off-by: Alex Deucher commit 30c3852bda7f60b0ffb1bb2f6ed8ba8800001b32 Author: Alan Coopersmith Date: Sun Feb 9 16:56:40 2014 -0800 Delete stray ; in struct _DeviceChangedEvent Caused Solaris Studio cc to complain in every file which included it: "../include/eventstr.h", line 179: warning: syntax error: empty member declaration Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 5300212ce8e9364ba26497605f3edc089af20130 Merge: ae796d43c 0b193b3ac Author: Keith Packard Date: Sun Feb 9 16:05:42 2014 -0800 Merge remote-tracking branch 'whot/for-keith' commit 0b193b3ac94e078d9291d1b1dfd4814e5f2d9e34 Author: Peter Hutterer Date: Thu Feb 6 07:59:07 2014 +1000 xfree86: use xnfstrdup in the Xorg -configure code Just for consistency, I'm pretty sure the code is generally not happy for malloc failures anyway. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit 7b1b7fb3be47672454837a3f7be2d1440433ec27 Author: Peter Hutterer Date: Wed Feb 5 15:12:22 2014 +1000 mi: fix printf warning about size_t format specifier mieq.c:290:26: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t' [-Wformat=] pnprintf supports size_t since 5ea21560dd071ea4ab87430000d087fd5fe1f092 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit ddeca927498c9df3b5e62c7bf05e31e2a3aeaa52 Author: Mark Kettenis Date: Sun Dec 15 14:31:10 2013 +0100 sync: Avoid ridiculously long timeouts On OpenBSD, passing a timeout longer than 100000000 seconds to select(2) will make it fail with EINVAL. As this is original 4.4BSD behaviour it is not inconceivable that other systems suffer from the same problem. And Linux, though not suffering from any 4.4BSD heritage, briefly did something similar: So avoid calling AdjustWaitForDelay() instead of setting the timeout to (effectively) ULONG_MAX milliseconds. Signed-off-by: Mark Kettenis Reviewed-by: Matthieu Herrb commit ae796d43c934ba378c9a618adc81c6729a14b2f8 Author: Keith Packard Date: Thu Feb 6 19:17:50 2014 -0800 ephyr: Repaint entire screen when colormap is updated Any time the colormap is changed, the entire screen needs to be repainted to match. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson Reviewed-by: Eric Anholt commit 9eecc9ac73aa06dca1420e0a89fb0cbd432a9bd7 Author: David Heidelberger Date: Fri Feb 7 02:06:04 2014 +0100 configure.ac: add missing "test" Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 08c7df9b0870fadf7b4655825459ff2e5a5c47da Author: Alan Coopersmith Date: Mon Feb 3 17:38:24 2014 -0800 __glGetProcAddress: explictly cast function pointers to void * Fixes Solaris Studio compiler warning & error: "glxext.c", line 557: warning: assignment type mismatch: pointer to void "=" pointer to function(void) returning void "glxext.c", line 559: error: operands have incompatible types: pointer to void ":" pointer to function(void) returning void Signed-off-by: Alan Coopersmith Signed-off-by: Keith Packard commit 76eedb039fc8d515a76c1df944fd5a85ac674019 Author: Eric Anholt Date: Mon Jan 27 11:36:08 2014 -0800 xfree86: Fix a compiler warning on 64-bit. asm/mtrr.h makes this an unsigned long on 32, but a u64 on 64. Cast it to a long to win. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 9f8f6657cdd3a5b166771695addb6fe76d93c378 Author: Eric Anholt Date: Mon Jan 27 11:36:07 2014 -0800 glx: Delete dead NV program string functions. These have been throwing a compiler warning about missing prototypes, since the generated code to define the prototypes stopped being generated (possibly because the code was dead). Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 0c774d53c5c1e8845e7da9b01814d7b98f621f51 Author: Eric Anholt Date: Mon Jan 27 11:36:06 2014 -0800 glx: Reduce compiler warnings by not requesting GL extension prototypes. They're not officially in the ABI, so you shouldn't use them anyway. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 87c4551c9cc9e382e6cfb59df1759d27c776abc8 Author: Eric Anholt Date: Mon Jan 27 11:36:05 2014 -0800 glx: Stop relying on libGL ABI bugs for glGetCompressedTexImage(). In theory, the linux libGL ABI exposes just GL 1.2 plus GLX 1.3. But, thanks to libglapi, we're letting glGetCompressedTexImageARB() be exposed too. The GLX code was inappropriately relying on it by using GL_GLEXT_PROTOTYPES. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit bf4f02337c97ffc3f7fbba9dba8ab72fa6c4a5fd Author: Jon TURNEY Date: Mon Jan 6 14:13:24 2014 +0000 glx: Remove left-over glthread.c Commit be668096 "glx: convert to direct GL dispatch (v2)" removes glthread.c from Makefile.am along with the rest of the dispatch table code, but doesn't remove glthread.c itself. Signed-off-by: Jon TURNEY Reviewed-by: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 7305153643622269e14f3564f7a8a66ecaf49f78 Author: Adam Jackson Date: Wed Feb 5 11:10:47 2014 -0500 configure: Don't add GLX_SYS_LIBS to XORG_SYS_LIBS libglx.so is linked against libGL.so, but Xorg itself should not be. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit c64130c13bd6914a998a8e8b808a6cedd18f9384 Author: Peter Hutterer Date: Wed Feb 5 15:10:27 2014 +1000 dix: fix a -Wshadow warning dispatch.c: In function 'SetVendorString': dispatch.c:481:29: warning: declaration of 'string' shadows a global declaration [-Wshadow] SetVendorString(const char *string) ^ dispatch.c:135:21: warning: shadowed declaration is here [-Wshadow] typedef const char *string; Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit 72967d6c153b0d1109df23967e1a05c3c397a1e0 Author: Peter Hutterer Date: Wed Feb 5 14:32:23 2014 +1000 xfree86: unconstify driver in the XF86ConfInputClassRec No const value is ever assigned to it, let's not pretend it's const. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit f14d6647c0883d4e7e4de7645d7a18e4d301845e Author: Peter Hutterer Date: Wed Feb 5 14:30:50 2014 +1000 xfree86: unconstify another string Only Xorg -configure uses a hardcoded value here, so let's not change the rest of the server for that. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit 46ae9d67e4118fa79bef0f9119d20559dfd6b6c0 Author: Peter Hutterer Date: Wed Feb 5 14:24:54 2014 +1000 xfree86: un-constify inp_driver/inp_identifier The only place this isn't allocated is during Xorg -configure where we just statically assing "mouse"/"kbd" and the identifiers for it. Everywhere else it's strdup'd and then free'd already. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit 93bf9544712a39f10557533993d8826b2b67fc9a Author: Peter Hutterer Date: Wed Feb 5 14:16:01 2014 +1000 xfree86: device name and driver are not const char Allocated in one place, freed in another. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit 25d10464f440b8b34594b7c988a99a830ea39a29 Author: Peter Hutterer Date: Fri Jan 24 18:16:54 2014 +1000 dix: fix button state check before changing a button mapping dev->button->down is a bitmask, not a normal array. Use the helper function to check, we technically allow the mapping to change after the physical button has been pressed (but not yet processed yet), so only check BUTTON_PROCESSED. From XSetPointerMapping(3): "If any of the buttons to be altered are logically in the down state, XSetPointerMapping returns MappingBusy, and the mapping is not changed." Reported-by: Ilja Van Sprundel Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 73926622b91fde01148727f26d6aad5e6827c1d2 Author: Peter Hutterer Date: Fri Jan 24 18:33:54 2014 +1000 include: make the various button array lengths more obvious No functional changes, just making a better case for why MAP_LENGTH is 256. "But can't we remove MAP_LENGTH then?" I hear you say? "Why, yes. Go for it!" Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 87ca80a7196949597113225405f3e4ee03bbee13 Author: Peter Hutterer Date: Fri Jan 24 18:32:54 2014 +1000 dix: prevent a driver from initializing or submitting buttons > MAX_BUTTONS The server internally relies on arrays with a MAX_BUTTONS maximum size (which is the max the core protocol can transport). Make sure a driver adheres to that. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 14fb6cf92c009d726f0a6b6e8b89cc48f2dd50eb Author: Peter Hutterer Date: Thu Jan 30 09:16:23 2014 +1000 Revert "xfree86/common: handle string constants in xf86Xinput configuration" This reverts commit 22592855e90d23013ba7f9e945d567725cb44bf3. What warning was this supposed to fix? Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit a553444b5841522836f7437ebb96e40be270fd8b Author: Peter Hutterer Date: Thu Jan 30 09:12:41 2014 +1000 Revert "xfree86/parser: make strings in xf86MatchGroup const" This reverts commit f71de60355cc76810657f40c7b5461af86b34bf7. What warnings? Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 45f1d527f39a296104f2fa79a774446e7e1560e0 Author: Peter Hutterer Date: Thu Jan 30 09:01:09 2014 +1000 input: un-constify dev->name Fallout from fecc7eb1cf66db64728ee2d68cd9443df7e70879, and reverts most of the rest of that patch. The device name is allocated and may even change during PreInit. The const warnings came from the test codes, the correct fix here is to fix the test code. touch.c: In function ‘touch_init’: touch.c:254:14: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] dev.name = "test device"; Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 675f215af291135ee3ece5414e4a5a2e89bf4ed3 Author: Peter Hutterer Date: Thu Jan 30 08:52:32 2014 +1000 Revert "os: xstrtokenize takes and returns const char * now" This reverts commit d0339a5c66846c9f14e3b584e34688520a0916ab. seriously, what the fuck? Are we making xstrdup() return a const char now too? Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit ce3df579e3f24a169189b288230959527e059080 Author: Peter Hutterer Date: Thu Jan 30 08:50:06 2014 +1000 input: un-constify InputAttributes Introduced in fecc7eb1cf66db64728ee2d68cd9443df7e70879 and reverts most of that but it's helpfully mixed with other stuff. InputAttributes are not const, they're strdup'd everywhere but the test code and freed properly. Revert the const char changes and fix the test up instead. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 2fc38d1e299587d25ca8225051e0ea9403164b15 Author: Peter Hutterer Date: Wed Jan 29 11:16:51 2014 +1000 xkb: add a call to init an XkbRMLVOSet from const chars Just forcing everything to const char* is not helpful, compiler warnings are supposed to warn about broken code. Forcing everything to const when it clearly isn't less than ideal. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 6307d60dd592f4b438f880d02bde9fd8d50ae264 Author: Peter Hutterer Date: Wed Jan 29 10:47:49 2014 +1000 Xi: remove superfluous cast. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 83e38eb73fd8c852513aac2da2975b4c01070ec2 Author: Arun Raghavan Date: Mon Jan 6 20:29:50 2014 +0530 edid: Add quirk for Sony Vaio Pro 13 The detailed timings are for a 15.6" display when max image size correctly reports 13.3". Signed-off-by: Arun Raghavan Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit bf83843b92ce21d11f6ff1a407ff3d014e017c9b Author: Hans de Goede Date: Thu Dec 19 14:10:18 2013 +0100 xf86Events: add Enable/DisableInputDeviceForVTSwitch functions Factor this code out into functions so that it can be re-used for the systemd-logind device pause/resume paths. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 48b489769e78fa20911630173ab708feecb0fb0e Author: Hans de Goede Date: Thu Dec 19 11:28:40 2013 +0100 xf86Events: refactor xf86VTLeave error handling Use kernel goto style error handling for xf86VTSwitchAway() failure. This makes it much easier to read the straight path. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 78f0667d6df9cc43a397d9f1490e540936a435d6 Author: Hans de Goede Date: Thu Dec 19 11:26:36 2013 +0100 xf86Events: split xf86VTSwitch into xf86VTLeave and xf86VTEnter functions Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 33cec8af55d829cd77b297ae356ed7a00ce8523c Author: Hans de Goede Date: Tue Dec 17 09:29:07 2013 +0100 dbus-core: Attempt to connect to dbus ASAP For systemd-logind integration we need the dbus connection to be available before enumerating input and gfx devices. Signed-off-by: Hans de Goede Reviewed-by: Daniel Stone commit 480590b90c3966536451d2a2fecc42a66082ed77 Author: Hans de Goede Date: Wed Dec 4 11:10:06 2013 +0100 dbus-core: Make dbus-core no longer mutually exclusive with udev With systemd-logind the dbus-core will be used for more then just config, so it should be possible to build it even when using a non dbus dependent config backend. This patch also removes the config_ prefix from the dbus-core symbols. Signed-off-by: Hans de Goede Reviewed-by: Daniel Stone commit c29454ae9d2e8e647732077fdfd97b351095f122 Author: Peter Hutterer Date: Thu Dec 12 12:48:57 2013 +1000 config: drop the dbus API This API has been disabled by default since 1.4, the first release it came in. There a no known users of it and even its direct replacement (HAL) has been superseeded by udev on supported platforms since 1.8. This code is untested, probably hasn't been compiled in years and should not be shipped. Signed-off-by: Peter Hutterer Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede Reviewed-by: Daniel Stone commit 46cf2a60934076bf568062eb83121ce90b6ff596 Author: Laércio de Sousa Date: Thu Dec 12 14:22:48 2013 -0200 xfree86: Keep a non-seat0 X server from touching VTs (#71258) Updated patch following Hans de Goede's advice. If -seat option is passed with a value different from seat0, X server won't call xf86OpenConsole(). This is needed to avoid any race condition between seat0 and non-seat0 X servers. If a non-seat0 X server opens a given VT before a seat0 one which expects to open the same VT, one can get an inactive systemd-logind graphical session for seat0. This patch was first tested in a multiseat setup with multiple video cards and works quite well. I suppose it can also make things like DontVTSwitch and -sharevts meaningless for non-seat0 seats, so it may fix bug #69477, too. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=71258 https://bugs.freedesktop.org/show_bug.cgi?id=69477 (maybe) See also: http://lists.x.org/archives/xorg-devel/2013-October/038391.html https://bugzilla.redhat.com/show_bug.cgi?id=1018196 Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede commit b3d3ffd19937827bcbdb833a628f9b1814a6e189 Author: Łukasz Stelmach Date: Mon Nov 25 11:54:07 2013 +0100 configure.ac: enable systemd socket activation in libxtrans Signed-off-by: Łukasz Stelmach Signed-off-by: Hans de Goede Acked-by: Peter Hutterer commit 435098a0dce6bca8870ec9725bf0af0969cd84fa Author: Alan Coopersmith Date: Tue Jan 28 20:27:52 2014 -0800 Add RANDR 1.4 requests & events to dix/protocol.txt Checked against randrproto.txt & randr.h Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit c1ac89c793614797e08d3d8e7fc9ba55be899130 Author: Alan Coopersmith Date: Tue Jan 28 20:27:51 2014 -0800 xf86DeleteScreen: move check for NULL pScrn before first dereference Flagged by cppcheck 1.62: [hw/xfree86/common/xf86Helper.c:220] -> [hw/xfree86/common/xf86Helper.c:231]: (warning) Possible null pointer dereference: pScrn - otherwise it is redundant to check it against null. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit e6733ae91b7be52930f22a87de15fa05819ef948 Author: Alan Coopersmith Date: Tue Jan 28 20:27:50 2014 -0800 On realloc failure, free font_path_string instead of leaking it Flagged by cppcheck 1.62: [dix/dixfonts.c:1792]: (error) Common realloc mistake: 'font_path_string' nulled but not freed upon failure Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 910b5b245425f0a866a703303b78768b0de5cb2b Author: Alan Coopersmith Date: Tue Jan 28 20:27:49 2014 -0800 Link libvgahw with $(PCIACCESS_LIBS) as well Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit da1660deeb9032ecca61f4bcdc9fc2eec2ada445 Merge: 0fbb3d711 9fc19168e Author: Keith Packard Date: Mon Jan 27 19:02:15 2014 -0800 Merge remote-tracking branch 'whot/for-keith' commit 0fbb3d711efec5222a57b45a70d28fc98380f3a1 Merge: 7ddef4f70 b98e49379 Author: Keith Packard Date: Mon Jan 27 14:11:09 2014 -0800 Merge remote-tracking branch 'anholt/glamor-reformat' Conflicts: Makefile.am Conflict caused by adding PSEUDORAMIX and GLAMOR directory defines in separate branches commit 7ddef4f7033c10b6e92866182d4475a4d49c5083 Author: Keith Packard Date: Wed Jan 22 14:30:28 2014 -0800 Add _XITYPEDEF_POINTER to dix-config.h Just like the pointer type from Xdefs.h, the Pointer type from XIproto.h collides with local declarations of variables using the same name. XIproto.h can use _XITYPEDEF_POINTER to avoid declaring the unnecessary pointer type. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 0b5a87f37d5dcd2ebff977a3b9a50a75ace93c83 Author: Keith Packard Date: Wed Jan 22 19:17:24 2014 -0800 pseudoramiX: Only compile on XQUARTZ and XWIN PseudoramiXExtensionInit() is not defined in extinit.h if it won't be used and we get a compiler warning when compiling the pseudoramiX code. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 61cb6c9aa95aa369573c4e02c023bbc33c7678c9 Author: Keith Packard Date: Wed Jan 22 19:16:36 2014 -0800 pseudoramiX: Add _X_ATTRIBUTE_PRINTF attributes to debug functions. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 9e45a1a030a5e70318441f33a132269a19a43df5 Author: Keith Packard Date: Fri Nov 15 18:00:53 2013 +0900 Warning fixes in glx Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit b98e49379c8d7cecce991207048489f51b10028c Author: Eric Anholt Date: Wed Dec 18 15:00:19 2013 -0800 glamor: Remove more out-of-tree compat code. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 40a8186f0f78b7c36ef7e3d902c53bdc9bb7c650 Author: Eric Anholt Date: Fri Dec 27 12:22:08 2013 -0800 glamor: Remove an extra copy of RegionNil(). Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit d26f5335151a9e962afa4bbf29ca5b94660a33ca Author: Eric Anholt Date: Wed Dec 18 11:35:53 2013 -0800 glamor: Hook the module back up to the build. For now we're just building an uninstalled library. The extra EGL stubs are required so that we can get the DIX building and usable without pulling in the xf86 DDX code in glamor_egl.c. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 54e78ec31e030d488765341a0c143c5a060c3768 Author: Eric Anholt Date: Wed Jan 22 15:03:26 2014 -0800 glamor: Convert use of the old "pointer" typedef to "void *". Reviewed-by: Keith Packard commit 3c3a4eeaa1f24b7534b332739158a2a36987ea6b Author: Eric Anholt Date: Wed Dec 18 11:45:33 2013 -0800 glamor: Silence warnings for non-debug builds. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 9af66851e2770bcd8408a0e5ddf8bb8ea816feaa Author: Eric Anholt Date: Fri Jan 24 10:58:04 2014 -0800 glamor: Disable definitions of GL extension prototypes to avoid warnings. We're not using the extension prototypes, since you have to dlsym them anyway. Disabling their definitions prevents them from being defined twice (once by gl.h, once by glext.h). Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong commit a7b8ce8b4207a93c0455a0b796cfc47917c04a9c Author: Eric Anholt Date: Wed Dec 18 11:41:33 2013 -0800 glamor: Drop xfree86 dependencies from this dix module. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 7759e4d090f56cdcad1c8a2acb2c1be20021de5d Author: Eric Anholt Date: Wed Dec 18 11:43:48 2013 -0800 glamor: Disable the XV code for now. We're going to want to make this DIX code instead of XF86 if at all possible, but for now just disable it so we can work on the rest of the build. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit b3acb47e98023da898ffc4b6a5bac38a78bd7727 Author: Adam Jackson Date: Wed Oct 30 11:30:23 2013 -0400 glamor: Use dix-config.h not project config.h v2: Also edit the one in glamor_egl.c (by anholt) v3: Also edit the one in glamor_eglmodule.c (by anholt) Signed-off-by: Adam Jackson Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 6cc0b7b01599b94af07e9fc8b16134f751ede077 Author: Adam Jackson Date: Wed Oct 30 11:05:40 2013 -0400 glamor/egl: Remove glapi awareness We only needed this because glx was directly bashing glapi tables. Since that's not the case anymore, we should just MakeCurrent like a real GL app. v2: Hand-resolve against rebase onto newer server (by anholt) Signed-off-by: Adam Jackson Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 0c5a7c208601110a0b36d24cdacb4d844af03f75 Author: Eric Anholt Date: Tue Dec 17 16:32:17 2013 -0800 glamor: Remove compat code for building out of tree. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 82efb90efba685678638f94804d773b59ca1643f Author: Adam Jackson Date: Wed Oct 30 09:56:46 2013 -0400 glamor: Remove copy of sna's compiler.h Xfuncproto.h has equivalents for these already. v2: Adjust a couple more likelies after the rebase (anholt) Signed-off-by: Adam Jackson Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 714926b090344a17a2f7aee9f4bc6aea4e45f48c Author: Eric Anholt Date: Thu Jan 9 18:23:39 2014 +0800 glamor: Fix up some indentation damage on header prototypes. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 7f6e865359c2d055db4eb7d82b4779b3d7c5d264 Author: Eric Anholt Date: Fri Dec 27 11:46:30 2013 -0800 glamor: Fix some indent damage of putting a ' ' after the '*' for pointers. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 5f57d436c391c51f3f90958b033f6ee3eb7a1136 Author: Eric Anholt Date: Tue Dec 24 15:59:14 2013 -0800 glamor: Fix some mangling of shader strings by indent. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit d84d71029ae9e462559d64eff7259e2cc7732fac Author: Eric Anholt Date: Wed Dec 18 11:59:07 2013 -0800 glamor: Apply x-indent.sh. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit e8e9a54c47deedbc13b8969ed29e16463b0314a0 Author: Eric Anholt Date: Wed Dec 18 11:56:15 2013 -0800 glamor: Touch up some code so indent doesn't get confused. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 9fc19168e7ca6308275bf8769d1ccb982f88465b Author: Alan Coopersmith Date: Fri Jan 24 23:42:49 2014 -0800 Check for calloc() failure in add_master() Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 76b3be75b62657e346731444736f7e4d200beb5b Author: Peter Hutterer Date: Fri Jan 24 16:51:02 2014 +1000 Xi: fix modifier offset in XIPassiveGrab swapping function The request is followed by mask_len 4-byte units, then followed by the actual modifiers. Also fix up the swapping test, which had the same issue. Reported-by: Alan Coopersmith Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit c1ce807d9f18f215332d7eeb844e8c640f71c53c Author: Keith Packard Date: Wed Jan 22 11:01:59 2014 -0800 dix: Praise clients which haven't run for a while, rather than idle clients A client which is ready, but hasn't run for a while, should receive the same benefit as one which has simply been idle for a while. Use the smart_stop_tick to see how long it has been since a client has run instead of smart_check_tick, which got reset each time a client was ready, even if it didn't get to run. Reported-by: Chris Wilson Signed-off-by: Keith Packard Tested-by: Chris Wilson commit 76b275d7acbfd6b28cb9e74fa4862faa6d08217d Author: Keith Packard Date: Sun Jan 12 10:53:31 2014 -0800 test/signal-formatting: Ignore compiler warnings The signal formatting tests intentionally include code which generates warnings with the current X server warning flags. Turn the compiler warnings off Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 12ea81792868c10a89a06ce9a9e8f707be283569 Author: Keith Packard Date: Sun Jan 12 10:44:22 2014 -0800 test/hashtabletest: Clean up -Wshadow errors Declare 'XID id' local to each scope it is used in, rather than having the first use be a function-wide declaration. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 7104f0f338fa96824a463331d6099a76ee3c21ac Author: Keith Packard Date: Sun Jan 12 10:42:37 2014 -0800 test/xi2: Clean up -Wshadow warnings protocol-common declares a bunch of pretty generic names; fix shadows of these names. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 92a9495800cf59b917c30d5fbaf4b7eca10d19cf Author: Keith Packard Date: Sun Jan 12 10:42:01 2014 -0800 kdrive/ephyr: Remove extra 'i' variable in ProcXF86DRIGetDrawableInfo Just re-use the top-level one Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 988877065486d0f25cc85be5be05f4523cc883c7 Author: Keith Packard Date: Sun Dec 15 01:57:09 2013 -0800 randr: Eliminate -Wshadow warnings Don't use rrScrPriv for nested screen private fetching. Eliminate a duplicate fetch of the randr screen private in rrCheckPixmapBounding. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit f46c487625e1ffbc78df5153128c68bd6bc41104 Author: Keith Packard Date: Sun Dec 15 01:56:36 2013 -0800 hw/xnest: Eliminate shadowed names Just rename stuff; nothing fancy here. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 1f3676a81ef2c52699bdfcf1fb9da7e4e79b00b7 Author: Keith Packard Date: Sun Dec 15 01:55:43 2013 -0800 hw/vfb: Rename screenInfo parameter to screen_info Avoid shadowing the global screenInfo value. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 89c0fa3d6c8ae67084a30395085db6d872d9d6de Author: Keith Packard Date: Sun Dec 15 01:55:06 2013 -0800 kdrive: Fix -Wshadow errors Just rename stuff to avoid conflicts. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 9c108b3ccdb4086002b83d9ad66f5619e9ec95bb Author: Keith Packard Date: Sun Dec 15 01:53:50 2013 -0800 exa: Fix -Wshadow warnings In exa_accel, there was a duplicate fetch of a pixmap private field. exa_render just had a regular shadowed value. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 04e320a4e4e1f46bf95e36078d93b4d18a0ef855 Author: Keith Packard Date: Sun Dec 15 01:52:58 2013 -0800 composite: Remove duplicate window pixmap fetch There's nothing between the previous fetch and this one that could cause the window pixmap to have changed. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 07b03e721e4dbec1a640c9b3bb8a2d5902587e63 Author: Keith Packard Date: Sun Dec 15 01:41:19 2013 -0800 xfree86: Fix -Wshadow warnings Just rename variables to eliminate -Wshadow warnings. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 3c94b89f149c2d63424faed0d44a6911393c3569 Author: Keith Packard Date: Sun Dec 15 01:40:04 2013 -0800 Xi: Use 'void *' instead of 'Pointer' (which is going away) There's no reason for XI to declare 'typedef char *Pointer' in a shared header file; assume it will eventually go away and stop using it here. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 08d0481e299c28b64a0db9bb0782ba2b551028fd Author: Keith Packard Date: Sun Dec 15 01:12:22 2013 -0800 os: Fix -Wshadow errors Rename variables to avoid shadowing globals Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 1487145b41390e689f8b03c1e8a2df70e00cf519 Author: Keith Packard Date: Fri Dec 13 11:25:45 2013 -0800 Add 'FONT_PATH_NAME_ELEMENT_CONST' to dix-config.h and xorg-server.h This signals to the fontsproto code that the X server has been fixed to allow the name member in a FontPathElement struct to be declared const to eliminate piles of warnings when assigning string constants to them. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 1ad8d12e7fcd7d55a37099d7426e3290297ba6d3 Author: Keith Packard Date: Fri Dec 13 11:24:00 2013 -0800 Ignore a couple of format-nonliteral warnings These are generated in code which uses sprintf as a convenient way to construct strings from various pieces. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 9ef53e2267ea3dd60651961f66c65e8b00b7d823 Author: Keith Packard Date: Wed Dec 11 11:55:37 2013 -0800 include: GetClientResolutions is declared in font.h No need to have a duplicate definition here. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 25ebb9dbc9df659dec2bf6c27654a5bad2d11f94 Merge: 409e8e29f 71baa466b Author: Keith Packard Date: Wed Jan 22 11:33:53 2014 -0800 Merge remote-tracking branch 'whot/for-keith' commit 409e8e29fbe16122ba5a4249256fc56e2e68ea93 Merge: 457bc8354 d6c8d7509 Author: Keith Packard Date: Wed Jan 22 11:32:35 2014 -0800 Merge remote-tracking branch 'dlespiau/20131216-4k' commit 457bc83549e58bb87de96bed02988db3275a7611 Author: Alan Coopersmith Date: Sat Jan 4 00:09:45 2014 -0800 If EAGAIN == EWOULDBLOCK, only need to check errno for one of them Solaris has: #define EWOULDBLOCK EAGAIN so checking (errno == EAGAIN || errno == EWOULDBLOCK) is overkill. This leads cppcheck 1.62 to complain: [xserver/os/io.c:365] -> [xserver/os/io.c:365]: (style) Same expression on both sides of '||'. [xserver/os/io.c:941] -> [xserver/os/io.c:941]: (style) Same expression on both sides of '||'. This quiets it, and reduces the number of calls Solaris Studio cc generates to the __errno() function to get the thread-specific errno value. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 044a6ef2ff5f2c83a80b11e747f62f48830b526b Merge: 0b932cf47 77df653ae Author: Keith Packard Date: Wed Jan 22 11:28:54 2014 -0800 Merge remote-tracking branch 'jeremyhu/master' commit 0b932cf47a4df8ea0f7488e285d218fe7c10dd77 Merge: 1d76b02fa 295d41fa2 Author: Keith Packard Date: Wed Jan 22 11:27:36 2014 -0800 Merge remote-tracking branch 'anholt/xserver-unifdef' commit 1d76b02fac79c0360ae201e4d1a8ba0e9a00e810 Merge: 771f390ef 4dd62d780 Author: Keith Packard Date: Wed Jan 22 11:22:35 2014 -0800 Merge remote-tracking branch 'anholt/glamor-external-rebase' commit 771f390efdf48cb7c44fe20857f06f8ffff3b2ce Author: Gaetan Nadon Date: Sat Dec 21 19:58:32 2013 -0500 autoconf: fix warning by replacing AC_WARN with AC_MSG_WARN A warning about the macro generating the warnings to the user... Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit c3819da87ff2e8c6292066f965c098704edc442c Author: Gaetan Nadon Date: Sat Dec 21 19:58:31 2013 -0500 xorg-tls: fix warning, replace AC_TRY_COMPILE with AC_COMPILE_IFELSE The code produced in the configure script is identical. Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 02d866a088a2fc60c6aaebe23c48b372f6b6aa9b Author: Gaetan Nadon Date: Sat Dec 21 19:58:30 2013 -0500 autoconf: fix warning, replace AC_TRY_COMPILE with AC_COMPILE_IFELSE The code produced in the configure script is identical. Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit e38c98fe74394a138ebadb29b1cfe1d4ea7f7071 Author: Gaetan Nadon Date: Sat Dec 21 19:58:29 2013 -0500 autoconf: fix warning, replace AC_TRY_LINK with AC_LINK_IFELSE The code produced in the configure script is identical. Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 4993590c90b1289171a2ca0e74d9c4310f5318c7 Author: Gaetan Nadon Date: Sat Dec 21 19:58:28 2013 -0500 autoconf: fix warning by replacing deprecated AC_HELP_STRING We can also make do without the workaround introduced in 2005. The 2.60 autoconf minimum version covers that now. Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 1d4dbc2f2b4d2acca2691c3c7464a45aac59d73f Author: Gaetan Nadon Date: Wed Dec 4 13:28:04 2013 -0500 libtool: bump minimum required version to 2.2 LT_PREREQ([2.2]) LT_INIT AC_CONFIG_MACRO_DIR([m4]) is recommended to locate local macros, which is fully used starting automake 1.14. ACLOCAL_AMFLAGS in Makefile.am is deprecated since automake 1.14. The comment is to prevent developers from removing the statement as suggested in 1.14 which would break earlier versions. Automake 1.14 is already in use by many. This patch works on versions prior and post 1.14 References: Building the X Window System from Source: http://www.x.org/wiki/Building_the_X_Window_System/#index2h3 Discussion on xorg minimum autotools requirements: http://lists.x.org/archives/xorg-devel/2013-October/038325.html Tested with autoconf 2.60, automake 1.10.3 and libtool 2.2 The same upgrade will be applied to libraries and drivers. Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 71baa466b1f6b02fe503f9a3089b7b9d61aa0f80 Author: Peter Hutterer Date: Mon Jan 13 17:00:23 2014 +1000 os: restrict display names to digits We call atoi() on the server's display to get the socket but otherwise use the unmodified display for log file name, xkb paths, etc. This results in Xorg :banana being the equivalent of Xorg :0, except for the log files being in /var/log/Xorg.banana.log. I'm not sure there's a good use-case for this behaviour. Check the display for something that looks reasonable, i.e. digits only, but do allow for :0.0 (i.e. digits, followed by a period, followed by one or two digits). Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 77df653ae3d8448be21221711851acde12c6bc1a Author: Jeremy Huddleston Sequoia Date: Wed Jan 1 11:10:41 2014 -0800 XQuartz: Avoid passing uninitialized pointers to X11ApplicationSetWindowMenu in AppleWMSetWindowMenu Signed-off-by: Jeremy Huddleston Sequoia commit 3bc608a361a01043b226fb9aaebf88f6fd852925 Author: Jeremy Huddleston Sequoia Date: Wed Jan 1 11:04:07 2014 -0800 XQuartz: Check for allocated memory before using it in AppleWMSetWindowMenu Signed-off-by: Jeremy Huddleston Sequoia commit 64327226ddfba8f0653615cd678d2d4336fb993d Author: Jeremy Huddleston Sequoia Date: Wed Jan 1 11:00:40 2014 -0800 XQuartz: Silence a clang static analysis warning about a memory leak It seems the alanyzer can't comprehend dixSetPrivate(). quartz.c:119:12: warning: Potential leak of memory pointed to by 'displayInfo' return quartzProcs->AddScreen(index, pScreen); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jeremy Huddleston Sequoia commit b2f6b3497c33a4897afae80a2cf69c596b9f81e8 Author: Jeremy Huddleston Sequoia Date: Wed Jan 1 10:55:10 2014 -0800 XQuartz: Silence a clang static analysis warning about a possible memory leak on exit stub.c:356:9: warning: Potential leak of memory pointed to by 'newargv' asl_log(aslc, NULL, ASL_LEVEL_ERR, ^~~~~~~ stub.c:356:9: warning: Potential leak of memory pointed to by 'newenvp' asl_log(aslc, NULL, ASL_LEVEL_ERR, ^~~~~~~ 2 warnings generated. Signed-off-by: Jeremy Huddleston Sequoia commit a03f096a85537d9e881cedaa6cb71aca43a97086 Author: Jeremy Huddleston Sequoia Date: Wed Jan 1 10:47:52 2014 -0800 XQuartz: Validate length in appledri before swapping Avoids potential memory corruption from bad requests Signed-off-by: Jeremy Huddleston Sequoia commit b3572c0d1ab7888ac26d6b2b8be6d1d19ed9af3f Author: Jeremy Huddleston Sequoia Date: Wed Jan 1 10:39:56 2014 -0800 XQuartz: Validate screen in AppleDRIQueryDirectRenderingCapable requests Return an error to the caller rather than crashing the server on invalid screens. Signed-off-by: Jeremy Huddleston Sequoia commit 959e8f23af7850fcaf40d6c67f5228241a36a9ab Author: Jeremy Huddleston Sequoia Date: Sun Dec 29 12:45:23 2013 -0800 XQuartz: Simplify hook_run to quiet static analyzer x-hook.c:96:9: warning: Called function pointer is an uninitalized pointer value (*fun[i])(arg, data[i]); ^~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Signed-off-by: Jeremy Huddleston Sequoia commit f79af1941776fd6f1ec26c50603fcc35ca7d514b Author: Jeremy Huddleston Sequoia Date: Sun Dec 29 12:41:18 2013 -0800 XQuartz: Mark applicationWillTerminate: noreturn X11Controller.m:938:1: warning: method 'applicationWillTerminate:' could be declared with attribute 'noreturn' [-Wmissing-noreturn,Semantic Issue] { ^ Signed-off-by: Jeremy Huddleston Sequoia commit ea80279e292e59a9fe9651489f03e9f2f39810d9 Author: Jeremy Huddleston Sequoia Date: Sun Dec 29 12:36:51 2013 -0800 XQuartz: Fix get_proc_address signature indirect.c:675:28: warning: incompatible pointer types passing 'glx_gpa_proc (*)(const char *)' to parameter of type 'glx_gpa_proc' (aka 'glx_func_ptr (*)(const char *)') [-Wincompatible-pointer-types,Semantic Issue] __glXsetGetProcAddress(&get_proc_address); ^~~~~~~~~~~~~~~~~ ../../../glx/glxserver.h:122:42: note: passing argument to parameter 'get_proc_address' here [Semantic Issue] void __glXsetGetProcAddress(glx_gpa_proc get_proc_address); ^ Signed-off-by: Jeremy Huddleston Sequoia commit 2e3ebec9520719a8e5c3c92390e83bcb5216f978 Author: Jeremy Huddleston Sequoia Date: Sun Dec 29 12:31:23 2013 -0800 XQuartz: Fix darwinfb.h header guard ./darwinfb.h:28:9: warning: '_DARWIN_FB_H' is used as a header guard here, followed by #define of a different macro [-Wheader-guard,Lexical or Preprocessor Issue] ^~~~~~~~~~~~ ./darwinfb.h:29:9: note: '_DARWIN_DB_H' is defined here; did you mean '_DARWIN_FB_H'? [Lexical or Preprocessor Issue] ^~~~~~~~~~~~ _DARWIN_FB_H Signed-off-by: Jeremy Huddleston Sequoia commit 9da6c0918f40359f28fe8889d5b7cae7efcc8377 Author: Jeremy Huddleston Sequoia Date: Sun Dec 29 12:22:55 2013 -0800 XQuartz: Silence some static analyzer warnings by annotating referencing counts Signed-off-by: Jeremy Huddleston Sequoia commit 2d2d49dab5c5718989de97d7227aac793479745e Author: Keith Packard Date: Sun Dec 29 15:18:28 2013 -0800 Clean up a few function prototypes to not place formals in /**/ This just removes the comment markers from around the formals in several function prototypes near where pointer -> void * changes were made. There are plenty more of these to fix. Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith commit 60014a4a98ff924ae7f6840781f768c1cc93bbab Author: Keith Packard Date: Sun Dec 15 01:05:51 2013 -0800 Replace 'pointer' type with 'void *' This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 93fa64e17d7bd600ebf18ecab85f5b2d17fe30ce Author: Keith Packard Date: Wed Dec 11 12:18:49 2013 -0800 Don't build dmx by default It's clearly un-loved, having piles and piles of warnings. If someone wants to fix it up to compile without warnings, we can re-enable it. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 319dff750f99a28a1544bcb81d52172c641ad1ca Author: Keith Packard Date: Wed Dec 11 12:18:16 2013 -0800 hw/xfree86: nobus.c shouldn't define a static function Having this function be static generates a compiler warning. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 7915791bac3ff609e94f355fbb637d7c570a5b32 Author: Keith Packard Date: Wed Dec 11 12:17:45 2013 -0800 kdrive/ephyr; Don't redeclare monitorResolution It's already declared in globals.h Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit aa47a4409660634d80c3423ad49b70ca929a8756 Author: Keith Packard Date: Wed Dec 11 12:16:51 2013 -0800 kdrive/ephyr: ddxUseMsg is supposed to return I'm not sure why ephyr thinks that ddxUseMsg shouldn't return, but it's not declared to exit. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 86d68825c2b75ea9e10954fec00b44b33b38d8b2 Author: Keith Packard Date: Wed Dec 11 11:55:01 2013 -0800 vfb: Remove unused pXWDCmap variable Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 7353ec7cb6fc235b03e59e35425201429c83ee72 Author: Keith Packard Date: Wed Dec 11 11:32:19 2013 -0800 xfree86: Switch int10 code to stdint types CARD32 is not type compatible with uint32_t and ends up generating a pile of warnings. Fix this by replacing all of the CARD* types with stdint types. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 93b15b1a47eb414338e8b229f25f11bdca099471 Author: Keith Packard Date: Wed Dec 11 11:31:46 2013 -0800 xfree86: Don't complain when the SDK dependency file doesn't exist yet It won't exist until the build is complete, so don't complain about it Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit eda935627116dd106b99dbcc95d90a723a2de330 Author: Keith Packard Date: Sat Nov 16 23:35:21 2013 -0800 xkb: Make XkbWriteCountedString take a const char * input parameter Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit d0339a5c66846c9f14e3b584e34688520a0916ab Author: Keith Packard Date: Sat Nov 16 23:34:59 2013 -0800 os: xstrtokenize takes and returns const char * now Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit c608560dbbac18837cb00ef0d774a66ea7706534 Author: Keith Packard Date: Sat Nov 16 23:33:59 2013 -0800 xfree86/vbe: Make VBEValidateModes take const char ** mode names are now const Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 3835e8b0a1cc7b1e971bcc3f9453422fec014b10 Author: Keith Packard Date: Sat Nov 16 23:33:18 2013 -0800 xfree86/shadowfb: GCFuncs and GCOps are now const Change GC private to match and fix resulting warnings Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit f71de60355cc76810657f40c7b5461af86b34bf7 Author: Keith Packard Date: Sat Nov 16 23:32:40 2013 -0800 xfree86/parser: make strings in xf86MatchGroup const and fix resulting warnings Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 2a93e75ff81b095bc9cdb80906e23ec705d52df5 Author: Keith Packard Date: Sat Nov 16 23:31:55 2013 -0800 xfree86/int10: mark printk as _X_ATTRIBUTE_PRINTF Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 7fe436a7b786ff02ed55cf9ed65edfd2fe07ac22 Author: Keith Packard Date: Sat Nov 16 23:31:06 2013 -0800 xfree86/fbdevhw: Fix warnings Unused fPtr variable. Deal with string constants. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 6990de00eb23478d9343660ad3981fb1d33f8be4 Author: Keith Packard Date: Sat Nov 16 23:30:29 2013 -0800 xfree86/exa: xf86GetOptValString returns const char * now fix exaDDXDriverInit to match. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 017307f0b41476c3c73a9414a7ce9eb42373c3f4 Author: Keith Packard Date: Sat Nov 16 23:29:30 2013 -0800 xfree86/dri: Mark DRIDrvMsg and dri_drm_debug_print _X_ATTRIBUTE_PRINTF And fix resulting warnings. v2: (Adam Jackson) Cast handles through uintptr_t to avoid size change warnings Signed-off-by: Keith Packard Reviewed-by: Ian Romanick Reviewed-by: Adam Jackson commit 22592855e90d23013ba7f9e945d567725cb44bf3 Author: Keith Packard Date: Sat Nov 16 23:28:48 2013 -0800 xfree86/common: handle string constants in xf86Xinput configuration Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 3a163d2af48a7cf8fd5c2db6ac68166a5fdbeb8d Author: Keith Packard Date: Sat Nov 16 23:28:16 2013 -0800 xfree86/common: Const GC funcs and ops in xf86VAarbiter Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 8a9aa44a45377d8953d11a0b035c86eb139283ba Author: Keith Packard Date: Sat Nov 16 23:26:19 2013 -0800 xfree86/config: Kludge around const strings defaultFontPath is now a const char * so that it can be initialized from a string constant. This patch kludges around that by inserting suitable casts to eliminate warnings. Fixing this 'correctly' would involve inserting some new variables and conditionals to use them. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 86647e7279163b13492d39ecb9c44414b752a61e Author: Keith Packard Date: Sat Nov 16 23:25:50 2013 -0800 config/udev: handle const strings Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit b7633c6ff2c273621df6c0fac9c269f8ab217a46 Author: Keith Packard Date: Sat Nov 16 23:24:03 2013 -0800 composite: Remove unused pScreen variables Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 5bc5684d4cb4905cd82fe1c036cc8a48c3c4868f Author: Keith Packard Date: Fri Nov 15 06:02:05 2013 -0800 test: Warning cleanup const char in test/xfree86.c. Cast values to (intmax_t) for %ju format in test/signal-logging.c. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit fecc7eb1cf66db64728ee2d68cd9443df7e70879 Author: Keith Packard Date: Fri Nov 15 06:00:44 2013 -0800 xi: More warning cleanup for input Lots more const char stuff. Remove duplicate defs of CoreKeyboardProc and CorePointerProc from test/xi2/protocol-common.c Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit af04cf6968b16cc9efd17905471047e7de62058a Author: Keith Packard Date: Fri Nov 15 05:55:38 2013 -0800 Xext: Clean up warnings in hashtable code Make keys const void * Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 00438c9f943b219ba33055969ae7f9ba07214b2a Author: Keith Packard Date: Fri Nov 15 05:41:54 2013 -0800 exa: Clean up warnings Declare GC ops/funcs as const. Use 'typeof' in the 'swap' macro to capture the right type. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 6e51645b4796fc3a02206fefd416b84beb2fcdf7 Author: Keith Packard Date: Fri Nov 15 05:28:47 2013 -0800 xkb: Clean up warnings Add const to lots of strings. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit abce3206cbc82f632abae5344e0ce46622e00f24 Author: Keith Packard Date: Fri Nov 15 05:19:24 2013 -0800 os: Clean up warnings Just const char stuff. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit a1cb69dc28fdbfbdfaf954e0bec221f759462399 Author: Keith Packard Date: Fri Nov 15 22:05:44 2013 +0900 Xext: Clean up warnings GC funcs and ops are const. Remove unused variables. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 2f6e8eb70d527541178433933d6230466421bd15 Author: Keith Packard Date: Fri Nov 15 22:02:58 2013 +0900 damage: Clean up warnings GC funcs and ops are const now, so all wrappers need to declare them as such. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit c706fb0db86d6946482700d65ad6803c4daaa6f9 Author: Keith Packard Date: Fri Nov 15 22:00:29 2013 +0900 Clean up warnings in mi. A coupel of unused variables, and some debug code with mis-matching printf format and variable types. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit d89b42bda46d36fc0879611cc3b3566957ce36d0 Author: Keith Packard Date: Fri Nov 15 21:57:05 2013 +0900 Clean up warnings in DIX As usual, mostly const char changes. However, filter_device_events had a potentially uninitialized value, 'raw', which I added a bunch of checks for. I suspect most of those are 'can't happen', but it's hard to see that inside the function. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit d6da9f23cca562fc0c6ae398665ab7fa770a4fa8 Author: Keith Packard Date: Fri Nov 15 18:07:54 2013 +0900 hw/xfree86: More const declarations for strings Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 644725ac5e28a00d8c24372f55ae7e7e2fe0cb2e Author: Keith Packard Date: Fri Nov 15 18:06:37 2013 +0900 Just remove dpms functsion from xf86.h Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit c85e26d59901fbf8c7a437cf934b51fa64160073 Author: Keith Packard Date: Fri Nov 15 17:55:15 2013 +0900 Bunch of DMX warning fixes Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 493d992501b586d95823e045d1dc994bd6c00d27 Author: Keith Packard Date: Fri Nov 15 17:43:46 2013 +0900 More warning fixes in hw/xfree86 Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit c78be3a4b714deb7ad75cacd54042ca1b51d6261 Author: Keith Packard Date: Fri Nov 15 17:36:26 2013 +0900 xfree86 warning reduction This gets the easy warnings, mostly constant string problems. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 1ce15ed5bae60a184c6bd9440e3c017488a5f415 Author: Keith Packard Date: Sat Nov 16 23:44:51 2013 -0800 Xext: _X_EXPORT DPMSSet and DPMSSupported These are needed by drivers, and it's better to export them from here rather than redefining them in hw/xfree86 and exporting them from there. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 1f407763be28745f18d224077d6b07b9431ee16b Author: Keith Packard Date: Sat Nov 16 23:43:49 2013 -0800 include: Make xkbrules structures all const char * This lets them be initialized with string constants Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit e1e01d2e33c632e395d7e396f73fba8ae606b15a Author: Keith Packard Date: Fri Nov 15 16:56:15 2013 +0900 xfree86/common: Warning fixes. Mostly const string handling. Also removes DPMS functiosn from Xext/dpmsproc.h Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 27b44949a3d2e34ac10e801bd8a8fc2c28791e7e Author: Keith Packard Date: Fri Nov 15 16:24:15 2013 +0900 hw/xfree86: Lots of constant string support Make lots of string pointers 'const char' so that we can use constant strings with them without eliciting warnings. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 6f77e2645ea36e324ccc664aae1d36464418bdea Author: Keith Packard Date: Fri Nov 15 13:40:30 2013 +0900 hw/xfree86: Make strings in DriverRec and ScrnInfoRec const This avoids compiler warnings when initializing with string constants. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt Reviewed-by: Adam Jackson commit e81902872176fa9848211fcd7a5eafa4f861a1b7 Author: Peter Hutterer Date: Thu Jan 9 15:29:23 2014 +1000 ephyr: don't allow a shift+ctrl keygrab if mod1 was enabled Xephyr wants ctrl+shift to grab the window, but that conflicts with ctrl+alt+shift key combos. Remember the modifier state on key presses and releases, if mod1 is pressed, we need ctrl, shift and mod1 released before we allow a shift-ctrl grab activation. Signed-off-by: Peter Hutterer commit b2d5ee2e3684951b611fd2068d57cc65fd8305a3 Author: Carlos Garnacho Date: Thu Jan 2 21:33:30 2014 +0100 Xi: Ensure DeviceChanged is emitted after grabs are deactivated When a grab on a slave device is deactivated, the master device must be checked, just in case there were events from other devices while the slave device was stolen away by the passive grab. This may introduce misbehaviors on mismatching valuators and device features later on UpdateDeviceState(). Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 863d2ad5c02cccde9a4d1a392a7cae78d001c8a9 Author: Alan Coopersmith Date: Mon Jan 6 17:10:40 2014 -0800 CheckPassiveGrabsOnWindow() needs to handle NULL return value from AllocGrab() CheckPassiveGrabsOnWindow() calls AllocGrab() which can fail and return NULL. This return value is not checked, and can cause NULL pointer dereferences. Signed-off-by: Alan Coopersmith Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 5493a67ec256d22a8a41597a345d8e1c54d6e335 Author: Alan Coopersmith Date: Mon Jan 6 17:10:39 2014 -0800 GrabDevice() needs to handle NULL return value from AllocGrab() GrabDevice() calls AllocGrab() which can fail and return NULL. This return value is not checked, and can cause NULL pointer dereferences. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 3a113815a0cc86d64789494e905da9778174f738 Author: Alan Coopersmith Date: Mon Jan 6 17:10:38 2014 -0800 If AllocGrab() fails to set up grab, don't copy to a NULL grab If either the initial calloc or the xi2mask_new fails, grab is NULL, but if a src grab is passed in, it was always being written to by CopyGrab (and if that failed, dereferenced again in teardown). Signed-off-by: Alan Coopersmith Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit a92c6406e7f6c0b74fb1cb9361ad904facc0f722 Author: Keith Packard Date: Thu Jan 9 11:10:11 2014 +0800 Bump release to 1.15.99.900 The merge window for 1.16 is open Signed-off-by: Keith Packard commit d6c8d7509727060b8e2358b9ed1c0e17b2ec3401 Author: Damien Lespiau Date: Wed Jul 31 19:16:45 2013 +0100 xfree86: Use the TMDS maximum frequency to prune modes Instead of only relying on the Range section, we can do better on HDMI to find out what is the max dot clock the monitor supports. The HDMI CEA vendor block adds a TMDS max freq we can use. This makes X not prune 4k resolutions on HDMI. v2: Replace X_INFO by X_PROBED in the message that prints the max TMDS frequency (Chris Wilson) Reviewed-by: Chris Wilson Signed-off-by: Damien Lespiau commit 95c2287465138ac251bf792f354cee3626e76b44 Author: Damien Lespiau Date: Wed Aug 7 15:16:21 2013 +0100 xfree86: Refactor xf86MonitorIsHDMI() using xf86MonitorFindHDMIBlock() Reviewed-by: Chris Wilson Signed-off-by: Damien Lespiau commit a279fb3ff3f3cfc41530aff1d9ff5620279348f6 Author: Damien Lespiau Date: Wed Jul 31 19:11:45 2013 +0100 xfree86: Add a xf86MonitorFindHDMIBlock() The HDMI CEA vendor specific block has some interesting information, such as the maximum TMDS dot clock. v2: Don't parse CEA blocks with invalid offsets, remove spurious brackets (Chris Wilson) v3: Fix the looping through the CEA data blocks, it had a typo using the wrong variable coming from the code it was ported from. Replace x << 16 + y << 8 + z by x << 16 | y << 8 | z (Chris Wilson) v4: Remove the stray ';' at the end of "if (*end == 0)". (Dominik Behr on IRC) Reviewed-by: Chris Wilson Signed-off-by: Damien Lespiau commit 295d41fa2aa97b74c1b9ffd7ef4ccf52f3e97dde Author: Eric Anholt Date: Mon Dec 16 10:52:19 2013 -0800 glx: unifdef swrast dri_interface.h values from Mesa 7.1. We can't remove all the ifdefs (__DRI_TEX_BUFFER_VERSION) because configure.ac is only checking for that version of Mesa in the absence of dri2. Reviewed-by: Ian Romanick commit 4ab1a2797ba366179f8a2e621334dd45df2a5a65 Author: Eric Anholt Date: Tue Nov 5 11:41:06 2013 -0800 glx: unifdef for DRI2 dri_interface.h things in mesa 9.2. Thanks to configure.ac's check, we know that we have a new enough dri_interface.h that we don't need to conditionalize all this code. Reviewed-by: Ian Romanick commit 2ea973e12f5d954211e1d10085a4c74581b43aca Author: Keith Packard Date: Fri Dec 27 09:50:55 2013 -0800 Bump version to 1.15.0 Signed-off-by: Keith Packard commit 2eb9915eea358f941702d3dad7434197991885c5 Author: Keith Packard Date: Thu Dec 12 15:48:08 2013 -0800 present: Set complete notify mode to Skip as needed Skipped present pixmap calls were not setting the mode to PresentCompleteModeSkip for skipped operations. Signed-off-by: Keith Packard commit e487babd525ef1bd016ec7b283fa08cf9e6c6f4f Author: Keith Packard Date: Thu Dec 12 14:52:35 2013 -0800 present: Don't abandon presents which are already queued for flip Presents which are not marked 'queued' and are in the window present list are waiting for the flip event; discarding those won't work very well (it'll end up trashing displayed content for the next frame), so skip over those when looking for duplicate frame presents Signed-off-by: Keith Packard commit ca3a5b2a8f9f627bbaa9883e16512a21c2a0b81d Author: Keith Packard Date: Thu Dec 12 14:17:40 2013 -0800 present: Handle PresentOptionAsync for copy mode Check for Async flag and execute immediately if set, otherwise wait for the next appropriate vblank before copying. Signed-off-by: Keith Packard commit a68df147421da21528b5be2d34678383922fa352 Author: Keith Packard Date: Thu Dec 19 14:31:07 2013 -0800 Bump version to 1.14.99.905 (1.15 RC5) Another week, another RC. This should be the last before 1.15 final Signed-off-by: Keith Packard commit 4b1ead9d3400acc3402c2480d7cc0527750c32f0 Merge: 4d6264614 929795d50 Author: Keith Packard Date: Thu Dec 19 14:14:59 2013 -0800 Merge remote-tracking branch 'whot/for-keith' commit 4dd62d7807b47efbc9065ae8f17f73e1ec6e9d26 Author: Gaetan Nadon Date: Tue Dec 10 11:13:32 2013 -0500 libglamoregl: remove -I$(top_srcdir)/src Automake always provide -I. It is at the beginning of the list of compiler options. Not needed either to find glamor_egl.c source. Signed-off-by: Gaetan Nadon Reviewed-by: Zhigang Gong commit 08c23ff8aefe80f2940ecb90adda27156084f57c Author: Gaetan Nadon Date: Tue Dec 10 11:13:31 2013 -0500 Make: remove cruft copied over from the X server makefiles In toplevel makefile: nostdinc: only xserver, no other X modules aclocaldir: no local macros to install xkb_path: xserver only "Gross hack": xserver only In src/makefile: SOLARIS_ASM_CFLAGS; server only XORG_INCS: undefined variable DIX_CFLAGS: undefined variable Signed-off-by: Gaetan Nadon Reviewed-by: Zhigang Gong commit b8055bd1f6c9dea0fe8f7a786d2a1522f5f32129 Author: Dave Airlie Date: Fri Dec 13 11:33:46 2013 +1000 glamor: fix leak in xv code. This loop needed to go one higher, not sure if this fixes the leak MrCooper was seeing on irc, but it fixes a leak. Signed-off-by: Dave Airlie Reviewed-by: Michel Dänzer Reviewed-by: Zhigang Gong commit 752a79562eb13f59fa54b4181d65367c8488c0a5 Author: Gaetan Nadon Date: Sun Dec 8 16:43:08 2013 -0500 Fix glamor_egl->egl_create_image_khr makes pointer from integer This is a warning, but a real problem can occur on some system. Reported-by: Fabio Pedretti Reviewed-by: Axel Davy Signed-off-by: Gaetan Nadon Reviewed-by: Zhigang Gong commit 7cfd9cc23270c0246d584e167fe14bf5af4571df Author: Axel Davy Date: Thu Dec 5 08:49:15 2013 +0100 Add DRI3 support to glamor This implements some DRI3 helpers to help the DDXs using glamor to support DRI3. Signed-off-by: Axel Davy Reviewed-by: Zhigang Gong commit 06ba3fdfd6162a64c149ea6fda85f9f56d7f3c31 Author: Zhigang Gong Date: Tue Nov 19 15:16:57 2013 +0800 Fixed some compilation warning/error or error checking. There is one compilation error ,cast int to pointer, when built without libgbm, reported by Gaetan Nadon. And some error checking after memory allocation, reported by Seth Arnold. There are still some similar issues in the largepixmap implementation. They are relatively more complicate due to the heavy usage of RegionXXX APIs which may allocate implicitly. Will fix them in the future. Signed-off-by: Zhigang Gong Tested-by: Gaetan Nadon commit a5321ea431376feca2dcd55cf04925dc492270fc Author: Axel Davy Date: Mon Nov 18 22:52:22 2013 +0100 Allow to create textured pixmaps from gbm_bo without using gem names This implements glamor_egl_create_textured_pixmap_from_gbm_bo, which is similar to glamor_egl_create_textured_pixmap, except it takes a gbm_bo as argument. Signed-off-by: Axel Davy Reviewed-by: Zhigang Gong commit 403004fe799f293bf299fe78da821635b19d9a1a Author: Fabio Pedretti Date: Mon Nov 4 12:08:42 2013 +0100 glamor: remove unused variable Reviewed-by: Zhigang Gong commit 842cd7eb4353492bc9c29439f975c3bd33445cbd Author: Maarten Lankhorst Date: Wed Nov 6 10:25:27 2013 +0100 fixup picture in SetWindowPixmap When creating a window with recordmydesktop running, the following may happen: create picture 0x1cd457e0, with drawable 0x1327d1f0 (SetWindowPixmap is called) destroy picture 0x1cd457e0, with drawable 0x1cd65820 Obtaining format for pixmap 0x1327d1f0 and picture 0x1cd457e0 ==7989== Invalid read of size 4 ==7989== at 0x8CAA0CA: glamor_get_tex_format_type_from_pixmap (glamor_utils.h:1252) ==7989== by 0x8CAD1B7: glamor_download_sub_pixmap_to_cpu (glamor_pixmap.c:1074) ==7989== by 0x8CA8BB7: _glamor_get_image (glamor_getimage.c:66) ==7989== by 0x8CA8D2F: glamor_get_image (glamor_getimage.c:92) ==7989== by 0x29AEF2: miSpriteGetImage (misprite.c:413) ==7989== by 0x1E7674: compGetImage (compinit.c:148) ==7989== by 0x1F5E5B: ProcShmGetImage (shm.c:684) ==7989== by 0x1F686F: ProcShmDispatch (shm.c:1121) ==7989== by 0x15D00D: Dispatch (dispatch.c:432) ==7989== by 0x14C569: main (main.c:298) ==7989== Address 0x1cd457f0 is 16 bytes inside a block of size 120 free'd ==7989== at 0x4C2B60C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==7989== by 0x228897: FreePicture (picture.c:1477) ==7989== by 0x228B23: PictureDestroyWindow (picture.c:73) ==7989== by 0x234C19: damageDestroyWindow (damage.c:1646) ==7989== by 0x1E92C0: compDestroyWindow (compwindow.c:590) ==7989== by 0x20FF85: DbeDestroyWindow (dbe.c:1389) ==7989== by 0x185D46: FreeWindowResources (window.c:907) ==7989== by 0x1889A7: DeleteWindow (window.c:975) ==7989== by 0x17EBF1: doFreeResource (resource.c:873) ==7989== by 0x17FC1B: FreeClientResources (resource.c:1139) ==7989== by 0x15C4DE: CloseDownClient (dispatch.c:3402) ==7989== by 0x2AB843: CheckConnections (connection.c:1008) ==7989== (II) fail to get matched format for dfdfdfdf The fix is to update the picture pointer when the window pixmap is changed, so it moves the picture around with the window rather than the pixmap. This makes FreePicture work correctly. Signed-off-by: Maarten Lankhorst Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71088 Reviewed-by: Zhigang Gong commit 2925db6616944c8d1e911caee0637a00e5586576 Author: Zhigang Gong Date: Sat Nov 2 00:08:11 2013 +0800 Fixed an incorrect printf format. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69573 Signed-off-by: Zhigang Gong commit 644e05562e401f192c93964be06c33fe92099089 Author: Brian Paul Date: Sat Oct 19 16:10:54 2013 -0600 Remove useless return statement Reviewed-by: Zhigang Gong commit 8c51eb8239247c98057eb9daf06c905a1dc0588c Author: Brian Paul Date: Sat Oct 19 16:10:53 2013 -0600 Remove redundant dispatch->glEnable(GL_TEXTURE_2D) The same call was already made a few lines earlier. Reviewed-by: Zhigang Gong commit 3bf1eb577e2d2b4d55d38b5a0043b0efb9abb385 Author: Brian Paul Date: Sat Oct 19 16:10:52 2013 -0600 Fix _glamor_set_spans() bug (re-used 'n' variable) n was used as a function parameter. But inside the for (i=1..n) loop, n got reassigned as REGION_NUM_RECTS() and then decremented to zero by the while loop. This caused the for loop to only iterate once instead of 'n' times. This patch renames the n parameter to numPoints. Found by code inspection. Untested. Reviewed-by: Zhigang Gong commit 2f62bd46cc002af57f8fe3246b9aea9e0c0bbcc9 Author: Grigori Goronzy Date: Wed Oct 2 00:37:57 2013 +0200 glamor_render: fix PictFilters Add Fast/Good/Best and appropriately map to Nearest and Bilinear. Additionally, add a fallback path for unsupported filters. Notably, this fixes window shadow rendering with Compiz, which uses PictFilterConvolution for some odd reason. Reviewed-by: Alex Deucher Reviewed-by: Zhigang Gong commit 5695708ecd2a26fcb9c05985c6758e719071995a Author: Grigori Goronzy Date: Wed Oct 2 00:37:56 2013 +0200 Use GL_STATIC_DRAW for element index buffer The buffer never changes anyway. Reviewed-by: Alex Deucher Reviewed-by: Zhigang Gong commit 8afa008ec4b393666bb3c506a711b4d50cc4e756 Author: Grigori Goronzy Date: Wed Oct 2 00:37:55 2013 +0200 Use glDrawRangeElements instead of glDrawElements This lets us explicitly specify the range of vertices that are used, which the OpenGL driver can use for optimization. Particularly, it results in lower CPU overhead with Mesa-based drivers. Reviewed-by: Alex Deucher Reviewed-by: Zhigang Gong commit 229601e080aefad21927c1449cd520733317858b Author: Zhigang Gong Date: Fri Sep 27 05:25:54 2013 +0800 Shoud return null subpixmap if we fail to get a valid map address. The patch is prepared by Raul Fernandes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86693 Signed-off-by: Zhigang Gong commit e3d1d4e3caaab8076eba89b58d037d24e203e506 Author: Dave Airlie Date: Mon Sep 23 06:42:24 2013 +0100 glamor: add initial Xv support This does YV12 and I420 for now, not sure if we can do packed without a GL extension. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher commit 39e95cd0f50cf471d8220d5428788d5be6a59d3f Author: Michel Dänzer Date: Fri Sep 20 10:41:10 2013 +0200 Reset traps_count and ptrap when necessary for the next trapezoid cliprect Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64912 Signed-off-by: Michel Dänzer Reviewed-by: He Junyan Reviewed-by: Zhigang Gong commit 61fca4342a65be2dbc7f890f2e67da56a50db978 Author: Michel Dänzer Date: Tue Sep 17 13:25:02 2013 +0200 Fix RegionContainsRect test for PutImage The return value of RegionContainsRect() is not a boolean but an enum indicating that the region contains the rectangle completely, partially or not at all. We can only take the PutImage fastpath when the region contatins the rectangle completely. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65964 Signed-off-by: Michel Dänzer Reviewed-by: Zhigang Gong commit 2ea618f2cf906fec9807b321f9e8ef3a4706c708 Author: Christian König Date: Mon Aug 26 14:57:47 2013 +0800 Use GBM_LIBS and GBM_CFLAGS Signed-off-by: Christian König Reviewed-by: Michel Dänzer commit 7e818f7d39cfef2701fe9cf95c7854ee8c9f3be6 Author: Armin K Date: Wed Mar 13 18:49:32 2013 +0100 First attempt to make libglamor.so shared versioned library As recommended by Michel in this thread reply: http://lists.freedesktop.org/archives/glamor/2013-March/000305.html v2: Correct shared library location in glamor.pc.in Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62259 Reviewed-by: Michel Dänzer commit b0318b6de7a2f8c5d9e75b55211dcc0b12f811fc Author: Armin K Date: Wed Mar 13 18:28:58 2013 +0100 Properly dist necesary headers Reviewed-by: Michel Dänzer commit fc179bb863778c03288bebaa258358ccbdb6aa0c Author: Armin K Date: Wed Mar 13 18:28:57 2013 +0100 Silence Automake 1.13 warnings warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') Reviewed-by: Michel Dänzer commit 97416e3f144606728a963aa2a337b1283e156ad2 Author: Michel Dänzer Date: Wed Mar 13 17:15:33 2013 +0100 glamoregl: Use xf86ScreenToScrn() Fixes crashes when glamor is used for a GPU screen with xserver 1.13 or newer. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57200#c17 Signed-off-by: Michel Dänzer Reviewed-by: Chris Wilson commit 4c5bfd529f6f182a3f0ac1b9bb5c3170a297f460 Author: Dave Airlie Date: Sat Dec 29 06:42:30 2012 +0000 glamor_utils: fix unlikely define use using a define across a split line expression is failure, compiling with warnings shows this up. Signed-off-by: Dave Airlie commit 6b954880c25af353dd4679cfdad6664b107d4df6 Author: Dave Airlie Date: Sat Dec 29 06:42:10 2012 +0000 glamor: add compiler.h This is also required for distchecking. Signed-off-by: Dave Airlie commit efbdc9e90f36494b07508aeaba40c9eb01eab398 Author: Dave Airlie Date: Sat Dec 29 06:28:17 2012 +0000 glamor: fix make distcheck part 1 This just adds the headers, then it falls over on the sdk_HEADERS as it overrides proper install paths by the looks of it. Signed-off-by: Dave Airlie commit 80f5e21daeed79654d6e1976f2766eb528f01d47 Author: Zhigang Gong Date: Tue Nov 13 10:08:02 2012 +0800 glamor_compositerects: Need to initialize region before fallback. As we need to call DamageRegionAppend even for fallback path, we must initialize the region before do that. Pointed by Igor Vagulin. https://bugs.freedesktop.org/show_bug.cgi?id=56940 Signed-off-by: Zhigang Gong commit 14e02f5132d7b4f50c8d9f8e5c6a0f285a3f3c14 Author: Michel Dänzer Date: Wed Oct 31 16:56:00 2012 +0100 Don't use glBlitFramebufferEXT for overlapping copies. According to the GL_EXT_framebuffer_blit spec, the result of doing so is undefined. But we need well-defined results. :) Signed-off-by: Michel Dänzer commit e846f48f489e33e270db682b1b6c8e6f03fdf313 Author: Zhigang Gong Date: Wed Aug 8 20:43:38 2012 +0800 Increase vbo size to 64K verts. This commit will benefit vertex stressing cases such as aa10text/rgb10text, and can get about 15% performance gain. Signed-off-by: Zhigang Gong Acked-by: Junyan commit b8f0a2188295f6cc2c997b6639b6928323eae617 Author: Zhigang Gong Date: Wed Aug 8 20:11:43 2012 +0800 Silence compilation warnings. After increase to gcc4.7, it reports more warnings, now fix them. Signed-off-by: Zhigang Gong Tested-by: Junyan He commit 50614451adafc816ae5ffbe9c2a97a58f493b927 Author: Zhigang Gong Date: Wed Aug 8 20:08:12 2012 +0800 glamor_largepixmap: Fixed a bug in repeat clipping. If the repeat direction only has one block, then we need to set the dx/dy to cover all the extent. This commit also silence some compilation warnings. Signed-off-by: Zhigang Gong commit 7eb434918bd7d58162c53fac9316aceda136cb6f Author: Michel Dänzer Date: Tue Aug 7 18:16:58 2012 +0200 Prefer KHR_surfaceless_context EGL extension over KHR_surfaceless_opengl/gles2. Current Mesa Git only advertises the former instead of the latter. Signed-off-by: Michel Dänzer Signed-off-by: Zhigang Gong commit 59653fa08a67a0694b3408407f5f92af99470739 Author: Michel Dänzer Date: Tue Aug 7 18:13:32 2012 +0200 Print space between name of missing EGL extension and 'required'. Signed-off-by: Michel Dänzer Signed-off-by: Zhigang Gong commit c3096c5a568c9c7b5f8a68ca882d866b8fb8e3ad Author: Junyan He Date: Tue Aug 7 05:01:59 2012 +0800 Fallback to pixman when trapezoid mask is big. The trapezoid generating speed of the shader is relatively slower when the trapezoid area is big. We fallback when the trapezoid's width and height is bigger enough. The big traps number will also slow down the render because of the VBO size. We fallback if ntrap > 256 Signed-off-by: Junyan He Reviewed-By: Zhigang Gong commit f62f4d53ef91ba05cc9456b1468cd1b24252454f Author: Zhigang Gong Date: Thu Aug 2 18:07:07 2012 +0800 glamor_glyphs: When dst arg point to a NULL buffer, dont't flush. This is a corner case, when we render glyphs via mask cache, and when we need to upload new glyphs cache, we need to flush both the mask and dest buffer. But we the dest arg may point to a NULL buffer at that time, we need to check it firstly. If the dest buffer is NULL. Then we don't need to flush both the dest and mask buffer. This commit fix a potential crash. Signed-off-by: Zhigang Gong commit e7af7cb76dade31b9e40cede7ac21d32bc95831c Author: Zhigang Gong Date: Wed Aug 1 18:27:29 2012 +0800 glamor_trapezoid: workaround a glsl like problem. It seems that the following statement cann't run as expected on SNB. bool trap_left_vertical = (abs(trap_left_vertical_f - 1.0) <= 0.0001); Have to rewrite it to another style to let the vertical edge trapezoid to be rendered correctly. Reviewed-by: Junyan He Signed-off-by: Zhigang Gong commit 5512c14e346a988f6eb8cdf9385a868ef705450c Author: Junyan He Date: Fri Jul 20 05:52:57 2012 +0800 Fix the problem of VBO leak. In some cases we allocate the VBO but have no vertex to emit, which cause the VBO fail to be released. Fix it. Signed-off-by: Junyan He commit 9f78e22fa62d8f1a08d6a0688e2eafba35206a3b Author: Junyan He Date: Fri Jul 20 05:52:50 2012 +0800 Just use the shader to generate trapezoid if PolyMode == Imprecise The precise mode of trapezoid rendering need to sample the trapezoid on the centre points of an (2*n+1)x(2*n-1) subpixel grid. It is computationally expensive in shader, and we use inside area ratio to replace it. The result has some difference, and we just use it if the polymode == Imprecise. Signed-off-by: Junyan He commit fe024a78220a6d61c6b1df89166da953b19b633a Author: Junyan He Date: Fri Jul 20 05:52:43 2012 +0800 Change the trapezoid render to use VBO. Because some uniform variables need to be set for every trapezoid rendering, we can not use vbo to render multi trapezoids one time, which have performance big loss. We now add attributes which contain the same value to bypass the uniform variable problem. The uniform value for one trapezoid will be set to the same value to all the vertex of that trapezoid as an attribute, then in FS, it is still a constant. Signed-off-by: Junyan He commit 9dff3378e5c39b346985924f9ab6291069cc7b6e Author: Zhigang Gong Date: Mon Jul 16 17:27:22 2012 +0800 Added the missed header file for xorg 1.13 compat. Signed-off-by: Zhigang Gong commit bc1b412b3b0bb716702ec89ae512f2b5ec62c17a Author: Zhigang Gong Date: Mon Jul 16 11:25:09 2012 +0800 Synch with xorg 1.13 change. As xorg 1.13 change the scrn interaces and remove those global arrays. Some API change cause we can't build. Now fix it. Signed-off-by: Zhigang Gong commit 4c27ca4700e4ba4ae19d77377a7776eb32f74647 Author: Zhigang Gong Date: Fri Jul 13 09:20:02 2012 +0800 gles2: Fixed the compilation problem and some bugs. Previous patch doesn't set the offset to zero for GLESv2 path. Now fix it. This patch also fix a minor problem in pixmap uploading preparation. If the revert is not REVERT_NORMAL, then we don't need to prepare a fbo for it. As current mesa i965 gles2 driver doesn't support to set a A8 texture as a fbo target, we must fix this problem. As some A1/A8 picture need to be uploaded, this is the only place a A8 texture may be attached to a fbo. This patch also enable the shader gradient for GLESv2. The reason we disable it before is that some glsl linker doesn't support link different objects which have cross reference. Now we don't have that problem. Signed-off-by: Zhigang Gong commit 006fe0e66df4b214ca5c50241b3cca22d31161df Author: Michel Dänzer Date: Thu Jul 12 18:57:06 2012 +0800 Stream vertex data to VBOs. Reviewed-by: Chris Wilson Signed-off-by: Zhigang Gong commit 551ca11c77d0524ceb37eb26caf0c25e4d7d806f Author: Michel D=C3=A4nzer Date: Wed Jul 11 15:01:15 2012 +0800 Fix translation of clip region for composite fallback. Fixes incorrectly clipped rendering. E.g. the cursor in Evolution composer windows became invisible. Signed-off-by: Michel Daenzer Signed-off-by: Zhigang Gong commit 88c317fb1e6a9056acab4a76c0ee0bf283e001ce Author: Zhigang Gong Date: Wed Jul 4 17:59:25 2012 +0800 glamor_glyphs: Don't merge extents for different lists. If we merge all lists's extent together, than we may have some fail overlap checking. Here is a simple: A E B F C D The first list has vertical "ABCD". And the second list has two char "EF". When detecting E, it can successfully find it doesn't overlap with previous glyphs. But after that, the original code will merge the previous extent with E's extent, then the extent will cover "F", so when detecting F, it will be treated as overlapped. We can simply solve this issue by not merge extent from different list. We can union different list's extent to a global region. And then do the intersect checkint between that region and current glyph extent, then we can avoid that fail checking. Signed-off-by: Zhigang Gong commit 32a7438bf79573100862ad91c5722d12623a8bf9 Author: Zhigang Gong Date: Tue Jul 3 18:24:07 2012 +0800 glamor_copyarea: Use blitcopy if current state is not render. Practically, for pure 2D blit, the blit copy is much faster than textured copy. For the x11perf copywinwin100, it's about 3x faster. But if we have heavy rendering/compositing, then use textured copy will get much better (>30%)performance for most of the cases. So we simply add a data element to track current state. For rendering state we use textured copy, otherwise, we use blit copy. Signed-off-by: Zhigang Gong commit 0706423bcfd7a589bab3b41fe9f13d0b636ecdef Author: Zhigang Gong Date: Tue Jul 3 18:11:12 2012 +0800 glamor_glyphs: Use cache picture to store mask picture if possible. By default, mask picture is newly created, and each time we need to clear the whole mask picture, and then composite glyphs to the mask picture and then composite the mask picture to destination. Testing results shows that the filling of the mask picture takes a big portion of the rendering time. As we don't really need to clear the whole region, we just need to clear the real overlapped region. This commit is to solve this issue. We split a large glyphs list to serval lists and each list is non-overlapped or overlapped. we can reduce the length of overlapped glyphs to do the glyphs_via_mask to 2 or 3 glyphs one time for most cases. Thus it give us a case to allocate a small portion of the corresponding cache directly as the mask picture. Then we can rendering the glyphs to this mask picture, and latter we can accumulate the second steps, composite the mask to the dest with the other non-overlapped glyphs's rendering process. It also make us implement a batch mask cache blocks clearing algorithm to avoid too frequently small region clearing. If there is no any overlapping, this method will not get performance gain. If there is some overlapping, then this algorithm can get about 15% performance gain. Signed-off-by: Zhigang Gong commit 4d1a2173f2e5a200d1535a4a459fffd75cd5f779 Author: Zhigang Gong Date: Wed Jun 27 12:53:40 2012 +0800 glamor_compositerects: Implement optimized version. Don't call miCompositeRects. Use glamor_composite_clipped_region to render those boxes at once. Also add a new function glamor_solid_boxes to fill boxes at once. Signed-off-by: Zhigang Gong commit dd7924339803b51332e3fe94d36eb48549e9d24d Author: Zhigang Gong Date: Tue Jun 26 20:00:21 2012 +0800 optimize: Use likely and unlikely. Signed-off-by: Zhigang Gong commit d5f03ba0109bc50e159c82d3d67cffa8fc174134 Author: Zhigang Gong Date: Tue Jun 26 19:56:27 2012 +0800 create_pixmap: use texture for large glyphs. As we only cache glyphs smaller than 64x64, we need to use texutre for the large glyphs. Signed-off-by: Zhigang Gong commit 90dd6ddbab864aa6c3add55c46a85d7db2c125f6 Author: Zhigang Gong Date: Tue Jun 26 17:19:16 2012 +0800 glamor_copyarea: Fixed a bug introduced by 996194... Default return value should be FALSE. Signed-off-by: Zhigang Gong commit b8dd2a597de455ae985302d1b93d865ef9f37c7b Author: Zhigang Gong Date: Tue Jun 26 16:24:32 2012 +0800 glamor_glyphs: Slightly performance tuning. As glamor_glyphs never fallback, we don't need to keep the underlying glyphs routines, just override the ps->glys Signed-off-by: Zhigang Gong commit 3873d412f018b975feaa000cb7ef337feaeee37d Author: Zhigang Gong Date: Tue Jun 26 15:39:24 2012 +0800 glamor_render: Don't allocate buffer for vbo each time. We can reuse the last one if the last one is big enough to contain current vertext data. In the meantime, Use MapBufferRange instead of MapBuffer. Testing shows, this patch brings some benefit for aa10text/rgb10text. Not too much, but indeed faster. Signed-off-by: Zhigang Gong commit 682f5d2989306856c0c193b0b4abd8c104a9ba92 Author: Zhigang Gong Date: Tue Jun 26 13:09:05 2012 +0800 glamor_largepixmap: Walkaround for large texture's upload. I met a problem with large texture (larger than 7000x7000)'s uploading on SNB platform. The map_gtt get back a mapped VA without error, but write to that virtual address triggers BUS error. This work around is to avoid that direct uploading. Signed-off-by: Zhigang Gong commit 37d4022f01483eefe06b5f12e13ca2ed4003c8f0 Author: Zhigang Gong Date: Mon Jun 25 23:24:37 2012 +0800 glamor_render: Optimize the two pass ca rendering. For the componentAlpha with PictOpOver, we use two pass rendering to implement it. Previous implementation call two times the glamor_composite_... independently which is very inefficient. Now we change the control flow, and do the two pass internally and avoid duplicate works. For the x11perf -rgb10text, this optimization can get about 30% improvement. Signed-off-by: Zhigang Gong commit 21916cf84f0cd9ada8701650d39b5cf67646eaf7 Author: Zhigang Gong Date: Mon Jun 25 16:37:22 2012 +0800 glamor_composite_glyph: Optimize glyphs with non-solid pattern. Signed-off-by: Zhigang Gong commit c1bd50d58d2c7b39e2b5c529bd86fde1ab14d8e6 Author: Zhigang Gong Date: Thu Jun 21 19:30:51 2012 +0800 glamor_glyphs: Detect fake or real glyphs overlap. To split a glyph's extent region to three sub-boxes as below. left box 2 x h center box (w-4) x h right box 2 x h Take a simple glyph A as an example: * __* *__ ***** * * ~~ ~~ The left box and right boxes are both 2 x 2. The center box is 2 x 4. The left box has two bitmaps 0001'b and 0010'b to indicate the real inked area. The right box also has two bitmaps 0010'b and 0001'b. And then we can check the inked area in left and right boxes with previous glyph. If the direction is from left to right, then we need to check the previous right bitmap with current left bitmap. And if we found the center box has overlapped or we overlap with not only the previous glyph, we will treat it as real overlapped and will render the glyphs via mask. If we only intersect with previous glyph on the left/right edge. Then we further compute the real overlapped bits. We set a loose check criteria here, if it has less than two pixel overlapping, we treat it as non-overlapping. With this patch, The aa10text boost fom 1660000 to 320000. Almost double the performance! And the cairo test result is the same as without this patch. Signed-off-by: Zhigang Gong commit ea4c22716ca1544e924c7462db6a2797afebff59 Author: Zhigang Gong Date: Thu Jun 21 19:29:06 2012 +0800 glamor_render: Don't fallback when rendering glyphs with OpOver. Signed-off-by: Zhigang Gong commit 7acbe895618837305cf4050731ccd1cd3bc11589 Author: Zhigang Gong Date: Thu Jun 21 19:27:07 2012 +0800 glamor_create_pixmap: Allocate glyphs pixmap in memory. As we have glyphs atlas cache, we don't need to hold each glyphs on GPU. And for the subsequent optimization, we need to store the original glyphs pixmap on system memory. Signed-off-by: Zhigang Gong commit 1e4fc85a71cc6498a7e11872026062fceb5bbdf1 Author: Zhigang Gong Date: Thu Jun 21 19:26:28 2012 +0800 glamor_fbo: fix a memory leak for large pixmap. Signed-off-by: Zhigang Gong commit 2122e60bf9027b63ddc59c0aa2a441af3687cb3a Author: Junyan He Date: Fri Jun 15 09:00:15 2012 +0800 Fix a bug for trapezoid clip We find in some cases the trapezoid will be render as a triangle and the left edge and right edge will cross with each other just bellow the top or over the bottom. The distance between the cross poind and the top or bottom is less than pixman_fixed_1_minus_e, so after the fixed converted to int, the cross point has the same value with the top or botton and the triangle should not be affected. But in our clip logic, the cross point will be clipped out. So add a logic to fix this problem. Signed-off-by: Junyan He commit 6ed418d17b5143f32b3b415103f3157a1b05e3db Author: Zhigang Gong Date: Fri Jun 15 13:31:30 2012 +0800 gles2_largepixmap: force clip for a non-large pixmap. One case we need force clip when download/upload a drm_texture pixmap. Actually, this is only meaningful for testing purpose. As we may set the max_fbo_size to a very small value, but the drm texture may exceed this value but the drm texture pixmap is not largepixmap. This is not a problem with OpenGL. But for GLES2, we may need to call glamor_es2_pixmap_read_prepare to create a temporary fbo to do the color conversion. Then we have to force clip the drm pixmap here to avoid large pixmap handling at glamor_es2_pixmap_read_prepare. Signed-off-by: Zhigang Gong commit c41d5c79e7d8772be38b77122817fb872f2d721d Author: Zhigang Gong Date: Fri Jun 15 09:03:42 2012 +0800 glamor_emit_composite_vert: Optimize to don't do two times vert coping. We change some macros to put the vert to the vertex buffer directly when we cacluating it. This way, we can get about 4% performance gain. This commit also fixed one RepeatPad bug, when we RepeatPad a not eaxct size fbo. We need to calculate the edge. The edge should be 1.0 - half point, not 1.0. Signed-off-by: Zhigang Gong commit 8656ddbbe7a38e5cd15e6d006bba19778e34e9e9 Author: Zhigang Gong Date: Fri Jun 15 08:46:24 2012 +0800 glamor_glyphs: Before get upload to cache flush is needed. When we can't get a cache hit and have to evict one cache entry to upload new picture, we need to flush the previous buffer. Otherwise, we may get corrupt glyphs rendering result. This is the reason why user-font-proxy may fail sometimes. Signed-off-by: Zhigang Gong commit 016995334e6acfad41574a9270b716db98ec697f Author: Zhigang Gong Date: Fri Jun 15 08:43:37 2012 +0800 copyarea: Cleanup the error handling logic. Should use ok rather than mixed ok or ret. Signed-off-by: Zhigang Gong commit b4a499b7db068117801770b7ab80416014822101 Author: Zhigang Gong Date: Tue Jun 12 18:21:10 2012 +0800 trapezoid: Fallback to sw-rasterize for largepixmap. Signed-off-by: Zhigang Gong commit 8f31aed48ca9412f8f5df9c3d47d938c7c90bccb Author: Junyan He Date: Tue Jun 5 03:21:03 2012 +0800 Use the direct render path for A1 Because when mask depth is 1, there is no Anti-Alias at all, in this case, the directly render can work well and it is faseter. Signed-off-by: Junyan He commit fa74a213ad175cb0920905a8011c62efdd348d45 Author: Junyan He Date: Mon Jun 4 07:52:05 2012 +0800 Add the trapezoid direct render logic We firstly get the render area by clipping the trapezoid with the clip rect, then split the clipped area into small triangles and use the composite logic to generate the result directly. This manner is fast but have the problem that some implementation of GL do not implement the Anti-Alias of triangles fill, so the edge sometimes has sawtooth. It is not acceptable when use trapezoid to approximate circles and wide lines. Signed-off-by: Junyan He commit 5f1560c84aa386bb12dc6ec3daeb93e0f63c09c2 Author: Junyan He Date: Mon Jun 4 07:22:27 2012 +0800 Modilfy the composite logic to two phases We seperate the composite to two phases, firstly to select the shader according to source type and logic op, setting the right parameters. Then we emit the vertex array to generate the dest result. The reason why we do this is that the shader may be used to composite no only rect, trapezoid and triangle render function can also use it to render triangles and polygens. The old function glamor_composite_with_shader do the whole two phases work and can not match the new request. Signed-off-by: Junyan He commit 0b0391765f3ca0192b00f4970c9453934d529397 Author: Junyan He Date: Mon Jun 4 03:18:40 2012 +0800 Add macro of vertex setting for triangle stripe Add macro of vertex setting for triangle stripe draw, and make the code clear. Signed-off-by: Junyan He commit bd180be619c2ef469ca40cf95023340c59960540 Author: RobinHe Date: Sat Jun 2 22:00:09 2012 +0800 Use shader to generate the temp trapezoid mask The old manner of trapezoid render uses pixman to generate a mask pixmap and upload it to the GPU. This effect the performance. We now use shader to generate the temp trapezoid mask to avoid the uploading of this pixmap. We implement a anti-alias manner in the shader according to pixman, which will caculate the area inside the trapezoid dividing total area for every pixel and assign it to the alpha value of that pixel. The pixman use a int-to-fix manner to approximate but the shader use float, so the result may have some difference. Because the array in the shader has optimization problem, we need to emit the vertex of every trapezoid every time, which will effect the performance a lot. Need to improve it. Signed-off-by: Junyan He commit 6dd81c5939197eb51bc31ffbc3e6f359f2aad191 Author: RobinHe Date: Sat Jun 2 21:52:25 2012 +0800 Create the file glamor_triangles.c Create the file glamor_trapezoid.c, extract the logic relating to trapezoid from glamor_render.c to this file. Signed-off-by: Junyan He commit bf38ee407ba1038a25efa58b8475bcf084a21042 Author: Zhigang Gong Date: Mon Jun 11 14:02:59 2012 +0800 Enable large pixmap by default. Signed-off-by: Zhigang Gong commit 8ca16754f7e95e47423183bbd5f72966b937f6c8 Author: Zhigang Gong Date: Mon Jun 11 13:05:48 2012 +0800 largepixmap: Fix the selfcopy issue. If the source and destination are the same pixmap/fbo, and we need to split the copy to small pieces. Then we do need to consider the sequence of the small pieces when the copy area has overlaps. This commit take the reverse/upsidedown into the clipping function, thus it can generate correct sequence and avoid corruption self copying. Signed-off-by: Zhigang Gong commit 5325c800f706f46085735d608f57d513da63cddf Author: Zhigang Gong Date: Mon Jun 11 11:42:46 2012 +0800 largepixmap: Support self composite for large pixmap. The simplest way to support large pixmap's self compositing is to just clone a pixmap private data structure, and change the fbo and box to point to the correct postions. Don't need to copy a new box. Signed-off-by: Zhigang Gong commit 1d2d858b8daacdd349084433a8af60d559fb6a9d Author: Zhigang Gong Date: Mon Jun 11 09:36:56 2012 +0800 largepixmap: Add transform/repeat/reflect/pad support. This commit implement almost all the needed functions for the large pixmap support. It's almost complete. Signed-off-by: Zhigang Gong commit 48916a23a92366128f5a1eeb08949d8d32383c32 Author: Zhigang Gong Date: Mon Jun 11 02:27:00 2012 +0800 glamor_getimage: should call miGetimage if failed to get sub-image. Signed-off-by: Zhigang Gong commit 56d6e7a85fbe8e50c38efda0f59f09aac52b769a Author: Zhigang Gong Date: Mon Jun 11 02:24:41 2012 +0800 glamor_putimage: Correct the wrong stride value. We should not use the destination pixmap's devkind as the input image data's stride. Signed-off-by: Zhigang Gong commit eb6f981ba4d3a4aff1b3651bdad3cd7a52233b41 Author: Zhigang Gong Date: Mon Jun 11 02:15:53 2012 +0800 largepixmap: Enable glamor_composite. Now we start to enable glamor_composite on large pixmap. We need to do a three layer clipping to split the dest/source/mask to small pieces. This commit only support non-transformation and repeat normal case. Signed-off-by: Zhigang Gong commit e96ea02010874a3a46f212f42134083bd29fefe3 Author: Zhigang Gong Date: Mon Jun 11 01:52:14 2012 +0800 largepixmap: Implement infrastructure for large pixmap. Added infrastructure for largepixmap, this commit implemented: 1. Create/Destroy large pixmap. 2. Upload/Download large pixmap. 3. Implement basic repeat normal support. 3. tile/fill/copyarea large pixmap get supported. The most complicated part glamor_composite still not implemented. Signed-off-by: Zhigang Gong commit ace35e408cd7a79c5215bbd0f14b624d8d949e34 Author: Zhigang Gong Date: Mon Jun 11 01:02:30 2012 +0800 glamor_largepixmap: first commit for large pixmap. This is the first commit to add support for large pixmap. The large here means a pixmap is larger than the texutre's size limitation thus can't fit into one single texutre. The previous implementation will simply fallback to use a in memory pixmap to contain the large pixmap which is very slow in practice. The basic idea here is to use an array of texture to hold the large pixmap. And when we need to get a specific area of the pixmap, we just need to compute/clip the correct region and find the corresponding fbo. We need to implement some auxiliary routines to clip every rendering operations into small pieces which can fit into one texture. The complex part is the transformation/repeat/repeatReflect and repeat pad and their comination. We will support all of them step by step. This commit just add some necessary data structure to represent the large pixmap, and doesn't change any rendering process. This commit doesn't add real large pixmap support. Signed-off-by: Zhigang Gong commit 4c174f4c9ce1514ef226e9de97e5c87a46a75524 Author: Junyan He Date: Tue May 15 10:08:03 2012 +0800 Fix the problem of x_source and y_source causing radial error The x_source and y_source cause some problem in gradient. The old way to handle it by recaulate P1 P2 to minus the x_source and y_source, but this causes problem in radial shader. Now we modify the manner to set the texture coordinates: (x_source, y_source) --> (x_source + width, y_source + height) to handle all the cases. Reviewed-by: Zhigang Gong Signed-off-by: Junyan He Signed-off-by: Zhigang Gong commit 553910d08b93ef80cc25fcbfd7876726778bc655 Author: Junyan He Date: Tue May 15 10:07:55 2012 +0800 Fix the problem of vertical and horizontal case error in linear gradient. 1. The vertical and horizontal judgement in linear gradient have problem when p1 point and p2 point distance is very small but the gradient pict have a transform matrix which will convert the X Y coordinates to small values. So the judgement is not suitable. Because this judgement's purpose is to assure the divisor not to be zero, so we simply it to enter horizontal judgement when p1 and p2's Y is same. Vertical case is deleted. 2. Delete the unused p1 p2 uniform variable. Reviewed-by: Zhigang Gong Signed-off-by: Junyan He Signed-off-by: Zhigang Gong commit 41aa93c393c8760aae357725db63fa4a8f798557 Author: Junyan He Date: Tue May 15 10:07:46 2012 +0800 Fix the problem of set the same stop several times. Some gradient set the stops at the same position, for example: firstly 0.5 to red color and then set 0.5 to blue. This kind of setting will cause the shader work not correctly because the percentage caculating need to use the stop[i] - stop[i-1] as dividend. The previous patch we just kill some stop if the distance between them is 0. But this cause the problem that the color for next stop is wrong. We now modify to handle it in the shader to avoid the 0 as dividend. Reviewed-by: Zhigang Gong Signed-off-by: Junyan He Signed-off-by: Zhigang Gong commit 09de37ec1c0543c8073f934274c84b3b7d5f31ae Author: Junyan He Date: Tue May 15 10:07:35 2012 +0800 Fix a bugy macro definition. The macro like "#define LINEAR_SMALL_STOPS 6 + 2" causes the problem. When use it to define like "GLfloat stop_colors_st[LINEAR_SMALL_STOPS*4];" The array is small than what we supposed it to be. Cause memory corruption problem and cause the bug of render wrong result. Fix it. Signed-off-by: Junyan He Signed-off-by: Zhigang Gong commit d900f553c2bb8d6e01529524fb7125918291c406 Author: Junyan He Date: Tue May 15 10:07:24 2012 +0800 Extract the gradient related code out. 1. Extract the logic of gradient from the glamor_render.c to the file glamor_gradient.c. 2. Modify the logic of gradient pixmap gl draw. Use the logic like composite before, but the gradient always just have one rect to render, so no need to set the VB and EB, replace it with just call glDrawArrays. 3.Kill all the warning in glamor_render.c Reviewed-by: Zhigang Gong Signed-off-by: Junyan He Signed-off-by: Zhigang Gong commit 81692804645394b43832c8ec586e8e67f3e4f606 Author: Zhigang Gong Date: Tue May 15 15:25:41 2012 +0800 glamor_set_destination_pixmap_priv_nc: set drawable's width x height. Previous implementation set the whole fbo's width and height as the viewpoint. This may increase the numerical error as we may only has a partial region as the valid pixmap. So add a new marco pixmap_priv_get_dest_scale to get proper scale factor for the destination pixmap. For the source/mask pixmap, we still need to consider the whole fbo's size. Signed-off-by: Zhigang Gong commit 7f55e48499ea7bed73cb1adeac00c480263583f8 Author: Zhigang Gong Date: Tue May 15 10:52:37 2012 +0800 Remove the texture cache code. Caching texture objects is not necessary based on previous testing. To keep the code simple, we remove it. Signed-off-by: Zhigang Gong commit c5b3c2cedc8b2e486b1e3727f288c42869310387 Author: Zhigang Gong Date: Tue May 15 10:42:41 2012 +0800 Added strict warning flags to CFLAGS. We miss the strict warning flags for a long time, now add it back. This commit also fixed most of the warnings after enable the strict flags. Signed-off-by: Zhigang Gong commit 6839996b0b0fe5f4e6ef28d1dfe527092d60d28a Author: Zhigang Gong Date: Sat Apr 28 18:23:09 2012 +0800 We should not call gradient finalization code if we disable it. Signed-off-by: Zhigang Gong commit 1035fc72b9017eb2466760133ca7bbc9155c8c46 Author: Zhigang Gong Date: Sat Apr 28 14:55:34 2012 +0800 Fixed all unused variables warnings. Signed-off-by: Zhigang Gong commit 33e11cd6149294060269ed693de67b135868e094 Author: Zhigang Gong Date: Sat Apr 28 14:54:38 2012 +0800 Fixed an uninitialized problem at gradient shader functions. Signed-off-by: Zhigang Gong commit c0f75c657f36642faea4ff8c51f7e4f6971c3d19 Author: Zhigang Gong Date: Sat Apr 28 14:51:27 2012 +0800 Fixed one typo bug when fixup a mask picture. Signed-off-by: Zhigang Gong commit 5c1f15fac26b86b6cb73776db1a644d6af570da7 Author: Zhigang Gong Date: Sat Apr 28 14:13:47 2012 +0800 Added some copyright and author information. Signed-off-by: Zhigang Gong commit 0d846d95699fadcddcc77b8d6e432e969467dab2 Author: Zhigang Gong Date: Sat Apr 28 13:43:39 2012 +0800 Added --enable-debug configuration option. For release version, we disable asserts. Signed-off-by: Zhigang Gong commit 503f8ec1a670e73f41314a5e94cdde8782d7cbab Author: Zhigang Gong Date: Sat Apr 28 13:42:48 2012 +0800 Remove unecessary header file. Signed-off-by: Zhigang Gong commit 9dfd10dc75efdf4c26b7ff46b55e4a2d2453803b Author: Zhigang Gong Date: Fri Apr 27 15:34:15 2012 +0800 glamor_render: Fix the repeat none for GLES2. As GLES2 doesn't support clamp to the border, we have to handle it seprately from the normal case. Signed-off-by: Zhigang Gong commit 9fcd123aed80430b220fc4141eaa3723d7cb611e Author: Zhigang Gong Date: Thu Apr 26 20:35:09 2012 +0800 glamor_blockhandler: Don't do glFinish every time. To do glfinish every time bring some performance overhead. Signed-off-by: Zhigang Gong commit 1f83411c9a69a44944fd8afe0c167cece60c1ecb Author: Zhigang Gong Date: Thu Apr 26 19:59:58 2012 +0800 glamor_copyarea: Return earlier if have zero nbox. Almost all callers will check whether the regions is empty before call to this internal API, but it seems the glamor_composite_with_copy may call into here with a zero nbox. A little weird, as the miComputeCompositeRegion return a Non-NULL, but the region is empty. Also remove a unecessary glflush. So let's check it here. Signed-off-by: Zhigang Gong commit 20cbaa61cdca41e61526a57f13475cb31e17e5dd Author: Zhigang Gong Date: Thu Apr 26 19:57:21 2012 +0800 glamor_render: Have to use eaxct size pixmap for transformation. Use partial texture as the pixmap for the transformation source/mask may introduce extra errors. have to use eaxct size. Signed-off-by: Zhigang Gong commit 6e50ee9c108e6d7ce4ebfcd08cfc97896e8e194e Author: Zhigang Gong Date: Thu Apr 26 18:31:07 2012 +0800 glamor_fbo: Added a threshold value for the fbo cache pool. Currently set it to 256MB. If cache pool watermark increases to this value, then don't push any fbo to this pool, will purge the fbo directly. Signed-off-by: Zhigang Gong commit 540846204cce9239233c5608a29bfe0607d77e44 Author: Zhigang Gong Date: Thu Apr 26 18:28:17 2012 +0800 Fixed a1 bug. It seems that mesa has bugs when uploading bitmap to texture. We switch to convert bitmap to a8 format and then upload the a8 texture. Also added a helper routine to dump 1bpp pixmap. Signed-off-by: Zhigang Gong commit 9f53cc1c3369fc61630b238f1b347a92fabf5a5a Author: Zhigang Gong Date: Wed Apr 25 22:35:12 2012 +0800 glamor_render.c: Fixed repeatPad and repeatRelect. We should use difference calculation for these two repeat mode when we are a sub region within one texture. Signed-off-by: Zhigang Gong commit 67cf3838e4acd788b0ce413dcbe9896e2ca20e56 Author: Zhigang Gong Date: Wed Apr 25 19:50:57 2012 +0800 gradient: Don't need fixup flag when creating pixmap. Gradient can use a larger texture/fbo directly, don't need an eaxct size texture. Signed-off-by: Zhigang Gong commit 8a85071edbd90780b286fa4b19205540fb276815 Author: Zhigang Gong Date: Wed Apr 25 18:58:16 2012 +0800 glamor_copyarea: Don't access a DRM only pixmap. As EGL image/gbm only support ARGB8888 image, we don't support other format. We may change the way to use gbm directly latter. But now, we have to face this limitation, and thus if a client create a 16bpp drawable, and call get texture from pixmap then a copy to here may occur and thus we have to force retur a TRUE without do nothing. Signed-off-by: Zhigang Gong commit 0b6867dddbed186c46048c610299ac0dde6a9ef0 Author: Zhigang Gong Date: Wed Apr 25 13:54:40 2012 +0800 Disable A8 texture format for GLES2. As PVR's GLES2 implementation doesn't support A8 texture as rendering target, we disable it for now. Signed-off-by: Zhigang Gong commit 6b664dda69afa6c47ca083739093fa15fc674380 Author: Zhigang Gong Date: Wed Apr 25 13:51:58 2012 +0800 gradient: Disable gradient for gles2. As PVR glsl compiler seems doesn't support external fragment function, and fails at compile gradient shader. Disable it for now. We may need to modify gradient shader to don't use external function. Signed-off-by: Zhigang Gong commit 686a322c76fa20ed45d5bbfc9742024300e83e7d Author: Junyan He Date: Wed Apr 18 08:04:26 2012 +0800 Fix the bug caused by gradient picture set the stops at the same percentage. Fix the bug caused by gradient picture set the stops at the same percentage. The (stops[i] - stops[i-1]) will be used as divisor in the shader, which will cause problem. We just keep the later one if stops[i] == stops[i-1]. Signed-off-by: Junyan He Signed-off-by: Zhigang Gong commit 3d96929596fd3a6da41aab5cb9d7fb1cf28b2a03 Author: Junyan He Date: Wed Apr 25 14:25:39 2012 +0800 Fix the problem of memory leak in gradient pixmap generating. Fix the problem of memory leak in gradient pixmap generating. The problem caused by we do not call glDeleteShader when destroy a shader program. This patch will split the gradient pixmap generating to three category. If nstops < 6, we will use the no array version of the shader, which has the best performance. Else if nstops < 16, we use array version of the shader, which is compiled and linked at screen init stage. Else if nstops > 16, we dynamically create a new shader program, and this program will be cached until bigger nstops. Signed-off-by: Zhigang Gong commit 05da99106b81465488c9879cfd709fd4f0c7b9e5 Author: Zhigang Gong Date: Wed Apr 25 11:59:47 2012 +0800 glamor_putimage: Optimize for direct uploading and fallback path. This commit optimize two cases: 1. When the clip contains the whole area, we can directly upload the texel data to the pixmap, and don't need to do one extra clipped copy. 2. At fallback path, we don't read back the whole pixmap, just need a sub region. Signed-off-by: Zhigang Gong commit ea70ebe0ac9fe5b3d0ad553f9aeb4d2829bf9a62 Author: Zhigang Gong Date: Wed Apr 25 11:56:43 2012 +0800 Fixed one potential texture size mismatch problem. There are two cases which we may use a wrong texture size. 1. A pixmap is modified by the client side after it created it. Then the pixmap's width may mismatch the original fbo/tex's size. Thus we need to check this condition when preparing upload the pixmap. 2. We provide two API to download/upload sub region of a textured pixmap. The caller may pass in a larger width then the original pixmap's size, this may happen at putimage and setspans. We need to validate the width and height when do the downloading/uploading. Signed-off-by: Zhigang Gong commit 08e8c00fe6a21741ff9f38652c2b9fd2310f1ce5 Author: Zhigang Gong Date: Wed Apr 25 09:27:06 2012 +0800 glamor_getimage: Don't fallback to miGetImage. As miGetImage is very inefficient, we don't fallback to it. If the format is not ZPixmap, we download the required sub- region, and then call fbGetImage to do the conversion. This way is much faster than previous. Signed-off-by: Zhigang Gong commit 9bcddff93b79fd8978426d9832a5edd60ac410c0 Author: Zhigang Gong Date: Fri Apr 13 18:15:49 2012 +0800 pending_op: Remove the pending operations handling. We have disabled this feature for a long time, and previous testing shows that this(pending fill) will not bring observed performance gain. Now remove it. Signed-off-by: Zhigang Gong commit 1761768f49a356f50645da53305e6b4bdef5c5f4 Author: Zhigang Gong Date: Sun Apr 15 23:50:09 2012 +0800 glamor_upload_pixmap: Use glTexImage2D for a fully update. Currently, intel's mesa dri driver will not check pbo for a TexSubImage2D. So we use glTexImage2D if we are a fully updating. Signed-off-by: Zhigang Gong commit 2806f1eaced851e4c88055c53d706f7beef8b555 Author: Zhigang Gong Date: Sun Apr 15 23:49:38 2012 +0800 glamor_setspans: Reuse glamor_upload_sub_pixmap. Signed-off-by: Zhigang Gong commit e15bc1207480d7d198862861d40af58903b4d0f0 Author: Zhigang Gong Date: Sun Apr 15 23:18:47 2012 +0800 code clean up. Remove unused variables. Signed-off-by: Zhigang Gong commit 65c5605c9693c8d30e597ac029be936495f23927 Author: Zhigang Gong Date: Sun Apr 15 23:16:51 2012 +0800 glamor_getspans: Reuse glamor_download_sub_pixmap. Signed-off-by: Zhigang Gong commit 68a5cc6f371e1f07ce176e154331dafaf5d9ef0e Author: Zhigang Gong Date: Sun Apr 15 19:46:09 2012 +0800 glamor_render: Don't download whole picture when fallback. Signed-off-by: Zhigang Gong commit e38eb675321dce1bbc39cbd177a6398de567dd79 Author: Zhigang Gong Date: Sun Apr 15 19:43:44 2012 +0800 glamor_put_sub_pixmap: Change to use glamor_upload_sub_pixmap. As the pixmap may be attached to a picture, we need to use glamor_upload_sub_pixmap to process it. glamor_copy_n_to_n will not consider the picture case. Signed-off-by: Zhigang Gong commit ff3d2c796363ea603ab92995091a967a3f8636d7 Author: Zhigang Gong Date: Sun Apr 15 17:09:06 2012 +0800 Fixed a stride problem for textured_drm pixmap. As a textured_drm pixmap has a drm bo attached to it, and it's the DDX layer to set it stride value. In some case, the stride value is not equal to PixmapBytePad(w, depth) which is used within glamor. Then if it is the case, we have two choice, one is to set the GL_PACK_ROW_LENGTH/GL_UNPACK_ROW_LENGTH when we need to download or upload the pixmap. The other option is to change the pixmap's devKind to match the one glamor is using when downloading the pixmap, and restore it to the drm stride after uploading the pixmap. We choose the 2nd option, as GLES doesn't support the first method. Signed-off-by: Zhigang Gong commit 70b71718e737872dfdbf4f6c7285d4260a099d17 Author: Zhigang Gong Date: Sun Apr 15 14:36:09 2012 +0800 glamor_putimage: Reuse copy area to do the clipped copy. If no clip set, we load the bits to the pixmap directly. Otherwise, load the bits to a temporary pixmap and call glamor_copy_area to do the clipped copy. Signed-off-by: Zhigang Gong commit e1be714312df8d596f6be268cb8a4e390e634c36 Author: Zhigang Gong Date: Sun Apr 15 10:30:02 2012 +0800 Fixed a unbalanced glamor_put_dispatch. Signed-off-by: Zhigang Gong commit bd53e24dc32206dc978d3dc2408e1832f5a803e7 Author: Zhigang Gong Date: Sun Apr 15 22:47:48 2012 +0800 glamor_pixmap_priv: Always return a valid private pixmap. If a pixmap doesn't have a private, then set its type to GLAMOR_MEMORY, and thus it will get a valid private. Signed-off-by: Zhigang Gong commit 420af44a3aaefd4848aa24a28c330cab36049078 Author: Zhigang Gong Date: Sat Apr 14 22:40:48 2012 +0800 Don't need to set GL_PACK_ROW_LENGTH/GL_UNPACK_ROW_LENGTH. We already adjust the stride of the pixmap, and keep the alignment as 4 should be ok to let the GL/GLES match the stride. Previous version has a unbalanced PACK ROW length seting, and is buggy, now fixed it. Signed-off-by: Zhigang Gong commit 18d69fb0142088f7df230ec876c7ce2b55a41ad9 Author: Zhigang Gong Date: Fri Apr 13 13:47:05 2012 +0800 glamor_gl: Use GL_ALPHA for depth 8 pixmap. Use GL_RGBA to represent a8 pixmap is not efficient. Signed-off-by: Zhigang Gong commit 428f2a3f58a91300835aaa083ac0b291ce394dd0 Author: Zhigang Gong Date: Fri Apr 13 13:45:42 2012 +0800 glamor_pixmap_ensure_fbo: Should allocate tex if we don't have one. Signed-off-by: Zhigang Gong commit cf0e206a0ff6538eb286c06098023b9e29b00c74 Author: Zhigang Gong Date: Wed Apr 11 18:59:27 2012 +0800 glamor_polylines: Don't fallback for non-solid fill. As glamor_fill/fbFill will handle non-solid fill correctly. We don't fallback it here. Signed-off-by: Zhigang Gong commit b5bd9a2d902d44834fc43199167d7dee71c9b709 Author: Zhigang Gong Date: Wed Apr 11 18:57:33 2012 +0800 glamor_upload/download: fix 1bpp bug. For A1 to A8's conversion, the stride is different for the source and destination. Previous implementation use the same stride, and may allocate less memory than required. Thus may crash the server when uploading a A1 pixmap. Now fix it. Tested-by: Peng Li Signed-off-by: Zhigang Gong commit b0e91f0f5a3a4f74800b89ed4003d300ae138151 Author: Zhigang Gong Date: Tue Apr 10 20:50:14 2012 +0800 glamor_pixmap_upload_texture: Support to upload a sub region of data. Just as the downloading side, we can upload an sub region data to a pixmap's specified region. The data could be in memory or in a pbo buffer. Signed-off-by: Zhigang Gong commit 3061f348ca2f05d88ca2391e1ad81ce8216d69f2 Author: Zhigang Gong Date: Tue Apr 10 10:40:17 2012 +0800 glamor_getimage: Use glamor_download_sub_pixmap_to_cpu to get image. Reduce the duplicate logic. Signed-off-by: Zhigang Gong commit 3a91f169122ea0556f628f11fb473b0feed7e44b Author: Zhigang Gong Date: Tue Apr 10 10:19:30 2012 +0800 glamor_polyfillrect: Fixed a potential bug if fallback at glamor_fill. We should advance the prect after we successfully excuted the glamor_fill. And if failed, we need to add the failed 1 box back to nbox. Although, this bug will never happen currently, as glamor_fill will never fallback. Signed-off-by: Zhigang Gong commit 1f657f72cacaa1170e7e55f4b5149c69492db6a5 Author: Zhigang Gong Date: Mon Apr 9 20:20:45 2012 +0800 glamor_polyfillrect: Optimize fallback path. Download/upload required region only. Signed-off-by: Zhigang Gong commit cea0fe3e1f49fc8d86f0cc653c8089f1ea2c9f1f Author: Zhigang Gong Date: Mon Apr 9 20:16:07 2012 +0800 fallback_optimize: Prepare for downloading/uploading subregion. Introduced two function glamor_get_sub_pixmap/glamor_put_sub_pixmap, can easily used to get and put sub region of a big textured pixmap. And it can use pbo if possible. To support download a big textured pixmap's sub region to another pixmap's pbo, we introduce a new type of pixmap GLAMOR_MEMORY_MAP. This type of pixmap has a valid devPrivate.ptr pointer, and that pointer points to a pbo mapped address. Now, we are ready to refine those glamor_prepare_access/glamor_finish_access pairs. Signed-off-by: Zhigang Gong commit d9dfc3d795b7e567d53cfeed61126164be36e233 Author: Zhigang Gong Date: Mon Apr 9 16:39:42 2012 +0800 glamor_download_sub_pixmap_to_cpu: New function to download subregion. Prepare to optimize the fallback path. We choose the important rendering pathes to optimzie it by using shader. For other pathes, we have to fallback. We may continue to optimize more pathes in the future, but now we have to face those fallbacks. The original fallback is very slow and will download/upload the whole pixmap. From this commit, I will refine it to just download/upload needed part. Signed-off-by: Zhigang Gong commit d96226ac6f34aa61fc00ad15ef58c1ed1253160e Author: Zhigang Gong Date: Mon Apr 9 15:57:05 2012 +0800 glamor_es2_pixmap_read_prepare: Just prepare the required region. Don't need to prepare the whole source pixmap. Signed-off-by: Zhigang Gong commit 3dbdd40c6ce4203619f2a3492029a444bb9217af Author: Zhigang Gong Date: Mon Apr 9 10:00:57 2012 +0800 glamor_color_convert: Let the caller to provide destination buffer. As we don't need to allocate new buffer when downloading pixmap to CPU, we change the prototype of the color converting function and let the caller to provide the buffer to hold the result. All the color conversion function supports store the result just at the same place of the source. Signed-off-by: Zhigang Gong commit 4dc6d4e84b4904540d7701cfc88a9c945464f833 Author: Zhigang Gong Date: Fri Apr 6 21:20:15 2012 +0800 glyphblt/polyops: Use miFunctions by default. Calling to miFunctions give some opportunities to jump to accelerated path, so we switch to call miFunctions rather than fallback to fbFunctions directly. commit 49e3b44aa813c98c05fcb10c19882e10d751580a Author: Zhigang Gong Date: Fri Apr 6 21:17:46 2012 +0800 glamor_set_alu: Added GXclear support at glamor_solid. We don't need to issue the glamor_fallback at the glamor_set_alu routine, as the caller may support GXclear or other most frequent Ops. Leave it to the caller to determine fallback or not. Signed-off-by: Zhigang Gong commit 3b8b2c77fc4449c7b63fd2597f73562b33dc1722 Author: Zhigang Gong Date: Fri Apr 6 21:15:12 2012 +0800 getimage: Enable getimage by default. Fixed one bug when calculate the coords, should consider the drawable's x and y. Now enable it by default. Most of the time, it should be more efficient than miGetImage. Signed-off-by: Zhigang Gong commit c6ce44d88134115b42edc76e1ee961b57bae86ff Author: Zhigang Gong Date: Fri Apr 6 17:01:57 2012 +0800 render: Enable more componentAlpha support. Actually only PictOpAtop,PictOpAtopReverse and PictOpXor can't be implemented by using single source blending. All the other can be easily support. Slightly change the code to support them. Consider those three Ops are not frequenly used in real application. We simply fallback them currently. PictOpAtop: s*mask*dst.a + (1 - s.a*mask)*dst PictOpAtopReverse: s*mask*(1 - dst.a) + dst *s.a*mask PictOpXor: s*mask*(1 - dst.a) + dst * (1 - s.a*mask) The two oprands in the above three ops are all reated to dst and the blend factors are not constant (0 or 1), it's hardly to convert it to single source blend. Now, the rendercheck is runing more smoothly. Signed-off-by: Zhigang Gong commit 3e9c35bdcbdb96a67c9f2a1ea76c382aaacca7e9 Author: Zhigang Gong Date: Fri Apr 6 11:02:36 2012 +0800 glamor_set_alu: Fallback for non GXcopy ops with GLES2. As GLES2 doesn't support LogiOps, we have to fallback here. GLES2 programing guide's statement is as below: "In addition, LogicOp is removed as it is very infrequently used by applications and the OpenGL ES working group did not get requests from independent software vendors (ISVs) to support this feature in OpenGL ES 2.0." So, I think, fallback here may not a big deal ;). Signed-off-by: Zhigang Gong commit 1a238e89f39fd5aeaf6975399971123cd3e15f24 Author: Zhigang Gong Date: Thu Apr 5 22:39:41 2012 +0800 glamor_putimage: Reuse the function in pixmap.c to do the uploading. We reuse glamor_upload_bits_to_pixmap_texture to do the data uploading to texture in putimage. Besides to avoid duplicate code, this also fixed the potential problem when the data format need extra reversion which is not supported by the finish shader, as glamor_upload_bits_to_pixmap_texture will handle all conditions. Tested-by: Junyan He Signed-off-by: Zhigang Gong commit 0650c7d4be6d4c21510c953543599aea32780f24 Author: Zhigang Gong Date: Thu Apr 5 22:31:44 2012 +0800 gles2: Added 1555/2101010 formats support. Added color conversion code to support 1555/2101010 formats,now gles2 can pass the render check with all formats. We use 5551 to represent 1555, and do the revertion if downloading/uploading is needed. For 2101010, as gles2 doesn't support reading the identical formats. We have to use 8888 to represent, thus we may introduce some accurate problem. But anyway, we can pass the error checking in render check, so that may not be a big problem. Signed-off-by: Zhigang Gong commit 3add3750658107bd18592a8672caa8bed0c8931c Author: Zhigang Gong Date: Thu Apr 5 21:53:44 2012 +0800 gles2: Fixed color conversion for the formats except 1555 and 2101010. This patch fixed two major problems when we do the color convesion with GLES2. 1. lack of necessary formats in FBO pool. GLES2 has three different possible texture formats, GL_RGBA, GL_BGRA and GL_ALPHA. Previous implementation only has one bucket for all the three formats which may reuse a incorrect texture format when do the cache lookup. After this fix, we can enable fbo safely when running with GLES2. 2. Refine the format matching method in glamor_get_tex_format_type_from_pictformat. If both revertion and swap_rb are needed, for example use GL_RGBA to represent PICT_b8g8r8a8. Then the downloading and uploading should be handled differently. The picture's format is PICT_b8g8r8a8, Then the expecting color layout is as below (little endian): 0 1 2 3 : address a r g b Now the in GLES2 the supported color format is GL_RGBA, type is GL_UNSIGNED_TYPE, then we need to shuffle the fragment color as : frag_color = sample(texture).argb; before we use glReadPixel to get it back. For the uploading process, the shuffle is a revert shuffle. We still use GL_RGBA, GL_UNSIGNED_BYTE to upload the color to a texture, then let's see 0 1 2 3 : address a r g b : correct colors R G B A : GL_RGBA with GL_UNSIGNED_BYTE Now we need to shuffle again, the mapping rule is r = G, g = B, b = A, a = R. Then the uploading shuffle is as below: frag_color = sample(texture).gbar; After this commit, gles2 version can pass render check with all the formats except those 1555/2101010. Signed-off-by: Zhigang Gong commit 55fdc7b196904a4e537f429d06d36081a0c9a60d Author: Zhigang Gong Date: Thu Apr 5 20:27:35 2012 +0800 glamor_utils: Added debug function to dump depth 15/16 pixmap. Signed-off-by: Zhigang Gong commit 57e29ebdc13d0ef145e4c70c1406af3229a92ad8 Author: Zhigang Gong Date: Fri Apr 6 11:14:21 2012 +0800 glamor_render: Disable gradient shader conversion due to bug. I found when enable the gradient shader, the firefox's tab's background has incorrect rendering result. Need furthr investigation, for now, just disable it. Signed-off-by: Zhigang Gong commit 7036cfdd0d29f4e13d432893a4f386cd3d632de7 Author: Zhigang Gong Date: Fri Mar 16 16:42:46 2012 +0800 glamor_fbo: Added one macro to disable fbo cache. Signed-off-by: Zhigang Gong commit 94186db527b33b2623eb26a7f1ae0c4c0fca66a4 Author: Zhigang Gong Date: Mon Mar 26 19:03:20 2012 +0800 glamor_fill: Should restore alu to GXcopy. Signed-off-by: Zhigang Gong commit 1f4486c10bb2201830af251eede8cc4dbb857953 Author: Junyan He Date: Fri Mar 23 04:06:06 2012 +0800 Add the feature for radial gradient using shader. Add the feature for radial gradient using shader. The transform matrix and the 4 type of repeat mode are supported. Less than 2/255 difference for every color component comparing to pixman's result. Extract the common logic of linear and radial's to another shader. Reviewed-by: Chris Wilson Reviewed-by: Zhigang Gong Signed-off-by: Zhigang Gong commit 1026327cdc90bc0c801a493b7b76b3efc5f33fe2 Author: Junyan He Date: Fri Mar 23 04:05:56 2012 +0800 Add the feature of generating linear gradient picture by using shader. Add the feature of generating linear gradient picture by using shader. This logic will replace the original linear gradient picture generating manner in glamor which firstly use pixman and then upload it to GPU. Compare it to the result generated by pixman, the difference of each color component of each pixel is normally 0, sometimes 1/255, and 2/255 at most. The pixman use fixed-point but shader use float-point, so may have difference. The feature of transform matrix and 4 types of repeat modes have been supported. The array usage in shader seems slow, so use 8 uniform variables to avoid using array when stops number is not very big. This make code look verbose but the performance improved a lot. We still have slightly performance regression compare to original pixman version. There are one further optimization opportunity which is to merge the gradient pixmap generation and the latter compositing into one shader, then we don't need to generate the extra texture, we can use the gradient value directly at the compositing shader. Hope that can beat pixman version. Will do that latter. Reviewed-by: Chris Wilson Reviewed-by: Zhigang Gong Signed-off-by: Zhigang Gong commit ccf5d7f52bae664f90d2c33c9fcff099a820575f Author: Junyan He Date: Fri Mar 23 04:05:48 2012 +0800 Prepare for modification of gradient using shader. Prepare for modification of gradient using shader. The gradient pixmaps now is generated by pixman and we will replace them with shader. Add structure fields and dispatch functions which will be needed. Some auxiliary macro for vertex convert. Reviewed-by: Chris Wilson Reviewed-by: Zhigang Gong Signed-off-by: Zhigang Gong commit a57bf66d492a0eec7b1f2a08b2f424835694e3fb Author: Junyan He Date: Mon Mar 26 13:51:13 2012 +0800 glamor_utils: Add some assistant functions to compare pixmaps/pictures. Reviewed-by: Chris Wilson Reviewed-by: Zhigang Gong Signed-off-by: Zhigang Gong commit cd75e85ff36827b8438d965750faab0615d01e86 Author: Junyan He Date: Mon Mar 5 08:24:20 2012 +0800 Fixup For list.h change in xorg Because the file list.h in xorg/include has changed the functions and struct names, adding xorg_ prefix before the original name. So Modify glamor_screen_private struct and the code which use list's functions in glamor_fbo.c. We hack at glamor_priv.h avoid the compile error when using old version xserver header file. Signed-off-by: Junyan He commit 213285f2b8c6578e01783a77d954ccc3ec313663 Author: Zhigang Gong Date: Fri Feb 17 16:56:05 2012 +0800 For DRI swap buffers. This commit added two APIs to support the DRI swap buffer. one is glamor_egl_exchange_buffers() which can swap two pixmaps' underlying KHRimages/fbos/texs. The DDX layer should exchange the DRM bos to make them consistent to each other. Another API is glamor_egl_create_textured_screen_ext(), which extent one more parameters to track the DDX layer's back pixmap pointer. This is for the triple buffer support. When using triple buffer, the DDX layer will keep a back pixmap rather then the front pixmap and the pixmap used by the DRI2 client. And during the closing screen stage, we have to dereference all the back pixmap's glamor resources. Thus we have to extent this API to register it when create new screen. Signed-off-by: Zhigang Gong commit 8012b030c3144b02af036107179c5b4c94567292 Author: Zhigang Gong Date: Fri Feb 17 16:26:59 2012 +0800 glamor_copyarea: Don't use GL_CLAMP_TO_BORDER when GLES2 enabled. We may need to modify all the shader to handle GL_CLAMP_TO_BORDER when using GLES2. XXX, for now, we just ignore them. Signed-off-by: Zhigang Gong commit 5ccf721d386a62f411d77bbc9a142e0c395162b3 Author: Zhigang Gong Date: Tue Feb 14 17:39:11 2012 +0800 glamor_fbo: Fix a bug when create No gl FBO pixmap. Need to get format before goto create a new fbo. Signed-off-by: Zhigang Gong commit ce634e84d4bb559f01203653c5ffd6397f4b0366 Author: Zhigang Gong Date: Sun Feb 12 09:18:51 2012 +0800 glamor_render: Only recalculate texture for repeat case. Slightly optimize the fragment shader, as if we are not repeat case and not exceed the valid texture range, then we don't need to recalculate the coords. Signed-off-by: Zhigang Gong commit 53387728ddc0c871821b68d728bb5f96a53ba227 Author: Zhigang Gong Date: Fri Feb 10 17:40:37 2012 +0800 glamor_tile/composite: Modify fs to re-calculate texture coords. Then we don't need to fixup the larger pixmap to the exact size, just need to let the shader to re-calculate the correct texture coords. Signed-off-by: Zhigang Gong commit 556adfa6b90f4c1ef12635cf78fa0bba046cf123 Author: Chris Wilson Date: Fri Feb 10 12:54:44 2012 +0000 Fixup glx support Renaming glamor_priv->dispatch and wrapping the access to the dispatch table with a function that also ensured the context was bound. dispatch = glamor_get_dispatch(glamor_priv); ... glamor_put_dispatch(glamor_priv); So that we catch all places where we attempt to call into GL withouta context. As an optimisation we can then do glamor_get_context(); glamor_put_context() around the rendering entry points to reduce the frequency of having to restore the old context. (Along with allowing the context to be recursively acquired and making the old context part of the glamor_egl state.) Reviewed-by: Zhigang Gong Signed-off-by: Zhigang Gong commit 430bc16ca03b3ea00255a4045c8e9fd11aea95ad Author: Zhigang Gong Date: Fri Feb 10 16:04:07 2012 +0800 GLX: Enable glx support. If we are using MESA as our GL library, then both xserver's GLX and glamor are link to the same library. As xserver's GLX has its own _glapi_get/set_context/dispatch etc, and it is a simplified version derived from mesa thus is not sufficient for mesa/egl's dri loader which is used by glamor. Then if glx module is loaded before glamoregl module, the initialization of mesa/egl/opengl will not be correct, and will fail at a very early stage, most likely fail to map the element buffer. Two methodis to fix this problem, first is to modify the xserver's glx's glapi.c to fit mesa's requirement. The second is to put a glamor.conf as below, to the system's xorg.conf path. Section "Module" Load "glamoregl" EndSection Then glamor will be loaded firstly, and the mesa's libglapi.so will be used. As current xserver's dispatch table is the same as mesa's, then the glx's dri loader can work without problem. We took the second method as it don't need any change to xorg.:) Although this is not a graceful implementation as it depends on the xserver's dispatch table and the mesa's dispatch table is the same and the context set and get is using the same method. Anyway it works. As by default, xserver will enable GLX_USE_TLS. But mesa will not enable it, you may need to enable that when build mesa. Three pre-requirements to make this glamor version work: 0. Make sure xserver has commit 66e603, if not please pull the latest master branch. 1. Rebuild mesa by enable GLX_USE_TLS. 2. Put the glamor.conf to your system's xorg.conf path and make sure it loaded prior to glx module. Preliminary testing shows indirect glxgears works fine. If user want to use GLES2 for glamor by using MESA, GLX will not work correctly. If you are not using normal MESA, for example PVR's private GLES implementation, then it should be ok to use GLES2 glamor and the GLX should work as expected. In this commit, I use gbm to check whether we are using MESA or non-mesa. Maybe not the best way. Signed-off-by: Zhigang Gong commit 0a8fb8563f3cecf2019d3a35d5a61ec2b3a069cd Author: Zhigang Gong Date: Fri Feb 10 15:34:43 2012 +0800 glamor_pixmap: Should bind unpack buffer to 0 after the uploading. Signed-off-by: Zhigang Gong commit e03ad27dfb885e58298e1fd2accac0b6ad409fce Author: Zhigang Gong Date: Sat Feb 11 07:37:17 2012 +0800 glamor_picture: Fix the wrong order of header file. Signed-off-by: Zhigang Gong commit bf24c2c06870dc38b21795f4f6fc51b053134181 Author: Zhigang Gong Date: Fri Feb 3 11:46:01 2012 +0800 glamor_dump_pixmap: Add helper routine to dump pixmap. For debug purpose only to dump the pixmap's content. As this function will call glamor_prepare_access/glamor_finish_access internally. Please use it carefully. Signed-off-by: Zhigang Gong commit 91891b3711b1fe1402bb7742c20e976fab63c6fe Author: Zhigang Gong Date: Fri Feb 3 11:44:51 2012 +0800 glamor_fill/tile: Fixed a tileX/tileY calculation bug. The previous's calculation is incorrect, now fix it and then we don't need to fallback at glamor_tile. Signed-off-by: Zhigang Gong Tested-by: Peng Li commit 39d9e6c693a4c3ad12c6569f1fd56e0a87b164d2 Author: Zhigang Gong Date: Fri Feb 3 11:21:37 2012 +0800 prepare_access: Don't use fbo after it was downloaded. We add a new gl_fbo status GLAMOR_FBO_DOWNLOADED to indicate the fbo was already downloaded to CPU. Then latter the access to this pixmap will be treated as pure CPU access. In glamor, if we fallback to DDX/fbXXX, then we fallback everything currently. We don't support to jump into glamor acceleration layer between a prepare_access/finish_access. Actually, fbCopyPlane is such a function which may call to acceleration function within it. Then we must mark the downloaded pixmap to another state rather than a normal fbo textured pixmap, and then stick to use it as a in-memory pixmap. Signed-off-by: Zhigang Gong Tested-by: Peng Li commit 1817b6c0cf20aa6fc1e1aa5b68e47473f341b85a Author: Zhigang Gong Date: Thu Feb 2 11:21:05 2012 +0800 glamor_eglmodule: Change module name according to normalize naming rule. As Xorg module loader will normalize module name which will remove '_' when we put "glamor_egl" to the configure file, then it will fail to find us. Signed-off-by: Zhigang Gong commit 1ab40028740efad1ba2ee16d425b0fbdd822c6ab Author: Zhigang Gong Date: Thu Feb 2 09:34:42 2012 +0800 Don't call dixSetPrivate directly. We may change the way to set/get those private data latter. consolidate to glamor_set_pixmap/screen_private is better than call those dixSetPrivate directly. Signed-off-by: Zhigang Gong commit bf7d79dc0ac2e97ed97e22c1d2c95e77bf959327 Author: Zhigang Gong Date: Tue Jan 31 18:16:58 2012 +0800 Refine CloseScreen and FreeScreen processes. This commit move the calling to glamor_close_screen from glamor_egl_free_screen to glamor_egl_close_screen, as this is the right place to do this. We should detach screen fbo and destroy the corresponding KHR image at glamor_egl_close_screen stage. As latter DDX driver will call DestroyPixmap to destroy screen pixmap, if the fbo and image are still there but glamor screen private data pointer has been freed, then it causes segfault. This commit also introduces a new flag GLAMOR_USE_EGL_SCREEN. if DDX driver is using EGL layer then should set this bit when call to glamor_init and then both glamor_close_screen and glamor_egl_close_screen will be registered correctly, DDX layer will not need to call these two functions manually. This way is also the preferred method within Xorg domain. As interfaces changed, bump the version to 0.3.0. Signed-off-by: Zhigang Gong Tested-by: Peng Li commit 97efbd25fed0f86338853d81b974b7f4deb9f1b4 Author: Chris Wilson Date: Fri Jan 27 13:22:13 2012 +0000 Use CLAMP_TO_BORDER in copy_n_to_n so we can sample outside of the source In order to reduce a composite operation to a source, we need to provide Render semantics for the pixel values of samples outside of the source pixmap, i.e. they need to be rgba(0, 0, 0, 0). This is provided by using the CLAMP_TO_BORDER repeat mode, but only if the texture has an alpha channel. Signed-off-by: Chris Wilson Reviewed-by: Zhigang Gong commit 864153bb9eeadb539ed5e9488b829c9f3f8b9482 Author: Chris Wilson Date: Fri Jan 27 13:22:12 2012 +0000 Do not reduce a composite to a copy if we need to sample outside of the source In order to maintain Render semantics, samples outside of the source should return CLEAR. The copy routines instead are based on the core protocol and expects the source rectangle to be wholly contained within the drawable and so does no fixup. Fixes the rendering of GTK icons. Signed-off-by: Chris Wilson Reviewed-by: Zhigang Gong commit 566cca59e14b223b8dcd045ccc2bbcf08d05b297 Author: Zhigang Gong Date: Sun Jan 29 14:14:36 2012 +0800 glamor-gles2: Fixup the pixmap before read back if it is not readable. Signed-off-by: Zhigang Gong commit 36ac9b7191a4bbbe4fb25ced9ee27d1e91308a15 Author: Zhigang Gong Date: Sat Jan 21 14:41:44 2012 +0800 glamor-fbo: Tweek the cache bucket calculation. And also reduce the expire count to 100 which should be good enough on x11perf and cairo-trace testing. Signed-off-by: Zhigang Gong commit a1de528c56ff1cfd05a04c4ad127456ec00707fd Author: Zhigang Gong Date: Sat Jan 21 13:22:14 2012 +0800 glamor_create_fbo: Concentrate the fbo size/depth checking. Concentrate checking the size/depth when creating fbo. Simply the pixmap creation and the uploading fbo/texture preparing. Also slightly change the uploading fbo's preparation. If don't need fbo, then a fbo only has valid texture should be enough to return. Signed-off-by: Zhigang Gong commit 1bfe5957117ba5916236caa021124734228e5aa9 Author: Zhigang Gong Date: Fri Jan 20 20:38:29 2012 +0800 glamor-pixmap-upload: Create a uploading fbo with a texture only. Just an initial implementation and disabled by default. When uploading a pixmap to a texture, we don't really want to attach the texture to any fbo. So add one fbo type which doesn't has a gl FBO attached to it. This commit can increase the cairo-trace's performance by 10-20%. Now the firefox-planet-gnome is 8.3s. SNA is still the best, only take 3.5s. Thanks for Chris to point out the A1 pixmap uploading bug. Signed-off-by: Zhigang Gong commit 6fb92e67b3f3dee38d8d440c8ab9f8cc5dcef9bc Author: Li Peng Date: Fri Jan 20 16:23:17 2012 +0800 glamor: check driver support GEM or not glamor calls DRM_IOCTL_GEM_FLINK to get a name for a buffer object. It only works for driver that support GEM, such as intel i915 driver. But for pvr driver who doesn't has GEM, we can't do it this way. According to Chris's comments, we check the has_gem as the following method: Here we just try to flink handle 0. If that fails with ENODEV or ENOTTY instead of ENOENT (or EINVAL on older kernels), set has_gem=0. Signed-off-by: Li Peng Reviewed-by: Zhigang Gong commit 68789b23e791d81c6987c755a56851961cbb262f Author: Zhigang Gong Date: Fri Jan 20 15:56:25 2012 +0800 glamor_gles2: Consolidate gles2 pixmap format readable check to one function. Signed-off-by: Zhigang Gong commit 3373d2c696028a9f2f637430c48b9de1a3776800 Author: Zhigang Gong Date: Fri Jan 20 12:10:06 2012 +0800 glamor_egl: Add support for the platform doesn't have gbm. Maybe we should use eglGetDisplayDRM to get display, but current PVR's driver is using eglGetDisplay. Signed-off-by: Peng Li Signed-off-by: Zhigang Gong commit 92671e3ac8cc955379085c143ee8cf8b37e760ec Author: Zhigang Gong Date: Fri Jan 20 11:58:34 2012 +0800 glamor_egl: Don't call eglDestroyImageKHR directly. Some implementation doesn't have it. Signed-off-by: Peng Li Signed-off-by: Zhigang Gong commit 125f317d90b69fa4d6f98da9badc1946f0a099ec Author: Peng Li Date: Fri Jan 20 11:52:18 2012 +0800 glamor_gl_dispatch: fix the dispatch initialization on GLES2. Some gles2 implementation doesn's support get_proc_address. And we also need to avoid get those missing functions pointers when we are GLES2. Signed-off-by: Peng Li Signed-off-by: Zhigang Gong commit 64fef665c9297ddd110b8472943f96b55db120ba Author: Zhigang Gong Date: Fri Jan 20 10:56:17 2012 +0800 glamor_render: Add non-Map/Unmap vertex array for GLES. As some GLES implementations' glMapOES /glUnmapOES is not so efficient, we implement the in memory vertex array for them. Signed-off-by: Zhigang Gong commit c244969b331e08679be9a9618d75fe5ee9cc9d86 Author: Zhigang Gong Date: Fri Jan 20 10:55:16 2012 +0800 glamor_init: Should set gl_flavor before sub-module intialization. Signed-off-by: Zhigang Gong commit 62e536535168827be76dafb1f5b5e0807c1d5ec9 Author: Zhigang Gong Date: Fri Jan 20 10:04:21 2012 +0800 glamor_composite: Fix one bug when we have too more vertices. Signed-off-by: Zhigang Gong commit 9c6fd931a63fb8a5300014265e4f1cacc746857a Author: Zhigang Gong Date: Fri Jan 20 09:59:44 2012 +0800 glamor-fbo-pool: Enable to reuse different size fbo/texture. Fixup three special cases, one is in tile and the other is in composite. Both cases are due to repeat texture issue. Maybe we can refine the shader to recalculate texture coords to support partial texture's repeating. The third is when upload a memory pixmap to texture, as now the texture may not have the exact size as the pixmap, we should not use the full rect coords. Signed-off-by: Zhigang Gong commit c7e79d6acff5abd7a327d5f4d6698ae5d7583834 Author: Zhigang Gong Date: Thu Jan 19 20:47:55 2012 +0800 glamor-fbo-pool: Implement fbo cache mechanism. We classify the cache according to the texture's format/width/height. As openGL doesn't allow us to change a texture's format/width/height after the internal texture object is already allocated, we can't just calculate the size and then according ths size to put the fbo to an bucket which is just like SNA does. We can only put the fbo to the corresponding format/width/height bucket. This commit only support the exact size match. The following patch will remove this restriction, just need to handle the repeat/tile case when the size is not exactly match. Should use fls instead of ffs when decide the width/height bucket, thanks for Chris to point this out. Signed-off-by: Zhigang Gong commit 2ff41008494e6c5909c058f1f80b4f66617dada1 Author: Zhigang Gong Date: Wed Jan 18 19:21:36 2012 +0800 glamor_fbo: Introduce glamor fbo to manage all the fb/tex. This is the first patch to implement a fbo/tex pool mechanism which is like the sna's BO cache list. We firstly need to decopule the fbo/tex from each pixmap. The new glamor_pixmap_fbo data structure is for that purpose. It's somehow independent to each pixmap and can be reused latter by other pixmaps once it's detached from the current pixmap. And this commit also slightly change the way to create a memory pixmap. We will not create a pixmap private data structure by default, instead we will crete that structure when a memory pixmap is attaching a fbo to it. Signed-off-by: Zhigang Gong commit ca2ddd33a114fe83584b5fa9f73b7534abdb96fa Author: Zhigang Gong Date: Wed Jan 18 17:12:32 2012 +0800 glamor_set_pixmap_texture/screen_pixmap: Remove useless parameters. As after we got a texture, no matter the texture is created on the glamor_create_pixmap or on the egl layer, we all already know the texture's width and height there. We don't need to pass them in. This commit also simply the glamor_egl_create_textured_screen to reuse the egl_create_textured_pixmap. And also remove the useless root image from the egl private structure. As now the root image is bound to the screen image, we don't take care it separately here. It will be freed at the screen closing. Signed-off-by: Zhigang Gong commit 15166bba973206dcb98121eb3932660529cfc997 Author: Zhigang Gong Date: Wed Jan 18 17:10:26 2012 +0800 Add debug message for all the uploading path. The previous message missed the texture restoring path. Signed-off-by: Zhigang Gong commit 994a9ff7f58161bf5651f83d810eb77b7718ab00 Author: Zhigang Gong Date: Wed Jan 18 17:07:25 2012 +0800 glamor_create_picture: Fix the format matching method. We should not simply set a TEXTURE_DRM pixmap to a separated texture pixmap. If the format is compatible with current fbo then it is just fine to keep it as TEXTURE_DRM type and we can safely fallback to DDX layer on it. Signed-off-by: Zhigang Gong commit 28fcd7cd01edfdf68c370e6c6ad0238d45477b3f Author: Zhigang Gong Date: Fri Jan 13 11:18:28 2012 +0800 Rearrange data structure and remove unused fileds. Signed-off-by: Zhigang Gong commit bdd72da0c525faf2aac38a7a8afa1cd88cd8dc1b Author: Zhigang Gong Date: Tue Jan 10 17:04:48 2012 +0800 Release previous textre/fb when bind a new texture to a pixmap. As we want to support DRI2 drawable which may create a new textured_drm to a pre-existing texture_only pixmap, we have to add this logical. Signed-off-by: Zhigang Gong Tested-by: He Junyan commit d7352d57b9ceb809d47c922ed8c820a44f8a0ee5 Author: Zhigang Gong Date: Tue Jan 10 15:24:36 2012 +0800 Add glFinish after glFlush. Signed-off-by: Zhigang Gong commit 8b943ce2030b02bb8d279ce2c284cb5d2910ced6 Author: Zhigang Gong Date: Mon Jan 9 12:50:39 2012 +0800 Set glamor's initial version to 0.2.0. Signed-off-by: Zhigang Gong commit 7329414bf2ca9873c04150a1d9386cf37f70b663 Author: Zhigang Gong Date: Mon Jan 9 07:16:06 2012 +0800 Silence a compilation warning. Signed-off-by: Zhigang Gong commit 069a6d1746ef4c180f48a75e655e5e06e33327b5 Author: Zhigang Gong Date: Mon Jan 9 07:11:26 2012 +0800 glamor_composite: Allocate VBO on demand. Use a fixed VBO is not efficient. Some times we may only has less than 100 verts, and some times we may have larger than 4K verts. We change it to allocate VBO buffer dynamically, and this can bring about 10% performance gain for both aa10text/rgb10text and some cairo benchmarks. Signed-off-by: Zhigang Gong commit 42a0261cb3065200887f81816b1bc3850593da4c Author: Zhigang Gong Date: Mon Jan 9 05:03:08 2012 +0800 glamor_getimage: Add the optimization path of getImage. This optimization will only call glReadPixels once. It should get some performance gain. But it seems it even get worse performance at SNB, disable it by default. Signed-off-by: Zhigang Gong commit 96085017c8da96e6d882c87b69186f5aba20131d Author: Zhigang Gong Date: Mon Jan 9 05:01:48 2012 +0800 Consolidate the choose of internal texture format to one function. Signed-off-by: Zhigang Gong commit a74596be0e7e02b43fb0db844b71b68f384ab599 Author: Zhigang Gong Date: Sun Jan 8 08:50:41 2012 +0800 Set filter to GL_NEAREST by default. This is the fastest filter and let's use it by default. Signed-off-by: Zhigang Gong commit 4cd07871a417b15b0382c07fecec497e93697a5d Author: Zhigang Gong Date: Sun Jan 8 08:45:08 2012 +0800 glamor-composite: Use glDrawElements to reduce the count of vertices. To split a rectangle (0,1,2,3) to two separated triangles need to feed 6 vertices, (0,1,2) and (0,2,3). use glDrawElements can reuse the shared vertices. Signed-off-by: Zhigang Gong commit 9dafd6fce547a6824c1de98d4309f8f2197ebbd0 Author: Zhigang Gong Date: Sun Jan 8 01:14:12 2012 +0800 glamor-composite: Optimize the computation of composite region. Computing the composite region at the composite_with_shader is very inefficient. As when we call to here from the glamor_glyph's temproary picture, we don't need to compute this region at all. So we move this computing out from this function and do that at the glamor_composite function. This can get about 5% performance gain for aa10text/rgb10text. Signed-off-by: Zhigang Gong commit 2511a00cdd576512f5d7f45707a4a725df2f4618 Author: Zhigang Gong Date: Thu Jan 5 14:26:01 2012 +0800 Fixed a configure bug. Should check the enable-glamor-gles2 before use the variable. And should include the config.h as the GLAMOR_GLES2 macro is defined there. Signed-off-by: Zhigang Gong commit a65e1c736aaa1bb2440a83c42c0410d9d9b58007 Author: Zhigang Gong Date: Wed Jan 4 14:40:24 2012 +0800 Reduce the double check of pixmap's private pointer. As we now add the checking to the Macro, we don't need to check the pointer outside the Macro. Signed-off-by: Zhigang Gong commit e1789893e5fe07fdbd8f21b7fa8a15f6db066592 Author: Zhigang Gong Date: Wed Jan 4 14:37:37 2012 +0800 get_spans: Check whether have a valid fbo before check format. If a pixmap is a pure in-memory pixmap, we do not need to check its format. Format checking has more overhead than checking FBO, so we change to check fbo firtly. Signed-off-by: Zhigang Gong commit 057f52a04d47e6ca5f6dead9c1bc71765d4c7ae8 Author: Zhigang Gong Date: Wed Jan 4 14:34:39 2012 +0800 Track all picture's drawable pict format. Even if a picture's pixmap is a pure in memory pixmap, we still need to track its format. The reason is we may need to upload this drawable to texture thus we need to know its real picture format. As to the MACRO to check whether a pixmap is a picture, we should check whether the priv is non-NULL before we touch its field. Signed-off-by: Zhigang Gong commit 8a4758a358e56b1db481607ff3f7e9375238e5d8 Author: Zhigang Gong Date: Wed Jan 4 13:11:52 2012 +0800 Need to check pixmap priv before touch its field. As now the pixmap may be allocated by DDX and doesn't have a valid pixmap private field. We must check pixmap private pointer before touch its field value. If a pixmap doesn't have a non-NULL private pointer, it doesn't have a valid FBO. Signed-off-by: Zhigang Gong commit 9264335347da641b2626a6b9f56aa05ab313239e Author: Zhigang Gong Date: Sat Dec 31 19:29:17 2011 +0800 Added more drawing functions. As we want to take over all the possible GC ops from the DDX layer, we need to add all the missed functions. This commit also fixed one bug at polylines. We simply drop the bugy optimized code now, as it did not consider of clip info. Signed-off-by: Zhigang Gong commit d42eb04c29d015fb1e4ed4e9ded4c0dd8bc7dc3c Author: Zhigang Gong Date: Sat Dec 31 19:27:33 2011 +0800 Remove useless output messages. Signed-off-by: Zhigang Gong commit fbccc4bbbc84a5459010d3238a00a0dd49111eec Author: Zhigang Gong Date: Sat Dec 31 19:20:10 2011 +0800 Fixed a rendering bug at fillspans. We should not change the points coords when loop for the clip rects. Change to use another variable to store the clipped coords and keep the original coords. This bug cause some XTS failures. Now fix it. Signed-off-by: Zhigang Gong commit 70b6341538cc11f074b02f9dd97d387418245d77 Author: Zhigang Gong Date: Sat Dec 31 19:14:06 2011 +0800 Fixed a bug at putImage. fbPutImage wants the input drawable is the target drawable rather than the backing pixmap. This bug cause some XTS failures, now fix it. Signed-off-by: Zhigang Gong commit 27c4c0457dac307500859ca7a14a1e58465d5e0b Author: Zhigang Gong Date: Tue Dec 27 16:44:17 2011 +0800 Remove the assertion which is not safe sometimes. The original version assumes that each drawable pixmap should have a valid private pixmap pointer. But this is not true after we create this libglamor. As the DDX layer may create a pure software drawable pixmap which doesn't have a private pixmap pointer. Signed-off-by: Zhigang Gong commit c65dc686228262894e0afc9fbe9fe6635d420e2f Author: Zhigang Gong Date: Tue Dec 27 16:42:32 2011 +0800 Export glamor_validate_gc to DDX. This is also a function which may direct access pixmaps which may be a glamor only pixmap and DDX doesn't know how to access it. We have to export this API to DDX driver and let the DDX driver use it to do the validation. Signed-off-by: Zhigang Gong commit f2809745fb641239be5b0281eac569c5b371e55e Author: Zhigang Gong Date: Fri Dec 23 16:21:44 2011 +0800 Flush gl operations when destroy an textured image. Before destroy an image which was attached to a texture. we must call glFlush to make sure the operation on that texture has been done. Signed-off-by: Zhigang Gong commit b36d264ec98440707ed3a94fab430e23d4a1582a Author: Zhigang Gong Date: Fri Dec 23 16:19:39 2011 +0800 Add a new API glamor_create_gc. As at ValidateGC stage, it may need to touch the pixmap directly, for example the tile pixmap. We must export this interface to DDX driver and let the DDX driver to route the processing to us. As this pixmap may be a texture only pixmap, and DDX don't know how to handle it. Signed-off-by: Zhigang Gong commit 3ba546b6998bf1c5d68ff0083017f804ffc48a93 Author: Zhigang Gong Date: Fri Dec 23 16:18:22 2011 +0800 Code cleanup. Remove useless code, and after a fbCreatePixmap, we do not need to modify its header there. Signed-off-by: Zhigang Gong commit 2583620c6cd6a6fedeb7082b526f2751eb6f75b4 Author: Zhigang Gong Date: Fri Dec 23 14:23:56 2011 +0800 Remove useless egl functions. We only need to create image fron external name rather than use drm_image_mesa to create drm image, so remove them. Signed-off-by: Zhigang Gong commit 7285f2e836c56c31a42b8c18a7ebd0e8a7d78fa1 Author: Zhigang Gong Date: Fri Dec 16 20:15:33 2011 +0800 Make sure the devPrivate.ptr of a textured pixmap is NULL. Just in case when wrongly fallback to DDX layer and cause random memory corruption. Pointed out by Chris. Signed-off-by: Zhigang Gong commit 5769d8603ddef6a8023f12bba1d3d3cde83e82d4 Author: Zhigang Gong Date: Fri Dec 16 15:04:33 2011 +0800 Export glamor_create_texture to DDX driver. If DDX failed to create textured pixmap from its BO's handle, it can turn to call this API to create a brand new glamor rather than fallback to pure in memory pixmap. Signed-off-by: Zhigang Gong commit 3f5d53b33978bdb848dd605a19d3fb4ea5f259e0 Author: Zhigang Gong Date: Fri Dec 16 15:02:54 2011 +0800 Correct the logic of glamor_egl_create_textured_pixmap. Discussed with Chris and found the previous logic is not good. Now change it in this commit, this API will just try to create a textured pixmap from the handle provided by DDX driver, if failed simply return FALSE without touch the pixmap. And the DDX driver can choose how to do next step. Signed-off-by: Zhigang Gong commit 8c7fcefb965bfdaaf0576347da20155d0415caa5 Author: Zhigang Gong Date: Tue Dec 13 22:48:34 2011 +0800 glamor-for-ddx: Exports all rendering/drawing functions. This commit exports all the rest rendering/drawing functions to the DDX drivers. And introduce some new pixmap type. For a pixmap which has a separated texture, we never fallback it to the DDX layer. This commit also adds the following new functions: glamor_composite_rects, glamor_get_image_nf which are needed by UXA framework. Just a simple wrapper function of miXXX. Will consider to optimize them next few weeks. This commit also Fixed a glyphs rendering bug pointed by Chris. Signed-off-by: Zhigang Gong commit f7539d9bff0a65b9430dcae8745bf5d4409a9f04 Author: Zhigang Gong Date: Mon Dec 12 09:58:03 2011 +0800 Enable texture dynamic uploading. commit 2d0ea392ec574efb96ac7a04ee72ba580417ba1e Author: Zhigang Gong Date: Mon Dec 12 09:49:06 2011 +0800 Call screen's method to create pixmap. As we may need to fallback to DDX's rendering path during the glyphs, we have to call screen's create pixmap method to create pixmap. Signed-off-by: Zhigang Gong commit 47e86eea563601c4e1e356f7267b935fcdd542f7 Author: Zhigang Gong Date: Mon Dec 12 09:48:04 2011 +0800 Fallback if the pixmap is drm only. Glamor can't do anything with a drm only pixmap. Signed-off-by: Zhigang Gong commit e3d16c9ebdffe8e5793ee253cf9f72b884b42805 Author: Zhigang Gong Date: Mon Dec 12 07:09:03 2011 +0800 Classfy glamor pixmap to different types. During the integration with intel driver, we introduce two new type of pixmap, one is TEXTURE_DRM, the other is DRM_ONLY. TEXTURE_DRM means we create a texture bind to the DRM buffer successfully. And then the texture and the external BO is consistent. DRM_ONLY means that we failed to create a texture from the external DRM BO. We need to handle those different types carefully, so we have to track them in the data structure. Signed-off-by: Zhigang Gong commit 36d424feaeec765d131c015df77d24db1a36fc38 Author: Zhigang Gong Date: Mon Dec 12 06:56:36 2011 +0800 Call glamor_create_pixmap directly in glamor rendering path. When glamor is rendering pixmaps, and needs to create some temporary pixmap, it's better to use glamor version create pixmap directly. As if goes to external DDX's create pixmap, it may create a external DRM buffer which is not necessary. All the case within glamor scope is to create a texture only pixmap or a in memory pixmap. Signed-off-by: Zhigang Gong commit 10ad332dedad2df13212dcd198d947a2f5c76862 Author: Zhigang Gong Date: Sun Dec 11 08:06:13 2011 +0800 Remove garbage file. Signed-off-by: Zhigang Gong commit 92fd83872f5509a2792338b4665dc2b3e1ed68cd Author: Zhigang Gong Date: Sun Dec 11 02:26:15 2011 +0800 Remove the access mode from private pixmap structure. Change the finish_access to pass in the access mode, and remove the access mode from the pixmap structure. This element should not be a pixmap's property. Signed-off-by: Zhigang Gong commit d135e879a6c8698bf21ae44a02315f370b961b14 Author: Zhigang Gong Date: Fri Dec 9 16:01:45 2011 +0800 Can't create KHR image if the depth is uncompatible. Currently, KHR image only support one color format ARGB32. For all other format, we have to fail to create corresponding image and texture here. Signed-off-by: Zhigang Gong commit b5630663cf9438383166f59cdfc7889571f2cd62 Author: Zhigang Gong Date: Fri Dec 9 15:58:19 2011 +0800 exports more rendering functions to DDX driver. Exports all necessary rendering functions to DDx drivers, including CopyArea, Glyphs, Composite, Triangles, .... Signed-off-by: Zhigang Gong commit b5480e64ac4a72bdc31e587ff9e51d67a1a0f11d Author: Zhigang Gong Date: Fri Dec 9 14:57:24 2011 +0800 Override create/destroy picture to track pict format. When create a piccture, we need to attach a pixmap to it. A pixmap only has a depth, which is not sufficant for glamor. As in openGL texture only has a few internal formats which is not sufficant to represent all the possible picture format. So we always transform the picture format to GL_RGBA. And when we need to read back the picture, we must know the original picture format. So we have to override create and destroy picture to track a pixmap's real picture format if it is attached to a picture. Signed-off-by: Zhigang Gong commit 7b2310834d83198fc88b5a5fb062cb1c9ee19ead Author: Zhigang Gong Date: Tue Nov 22 18:28:10 2011 +0800 Added a missed header file. Pointed by Chris, we must add xorg-server.h at the top of each file before we include any other xorg header files. Otherwise, it may cause incorrect XID length. This commit also fixes one compilation warning in X86_64 platform. Signed-off-by: Zhigang Gong commit 90eaac96aeb53b3e45b82dc7dd4e98778c8c9343 Author: Zhigang Gong Date: Tue Nov 15 20:17:18 2011 +0800 If caller is not using glamor screen, we can't register the block handler. Signed-off-by: Zhigang Gong commit 9ff39e53eb20673d42f42c94adb55bf9a9f1c285 Author: Zhigang Gong Date: Tue Nov 15 20:16:16 2011 +0800 Revert "Disable glamor_tile temporary." The previous corruption output is caused by GLAMOR/UXA flushing issue. Now get fixed. This reverts commit 0d2d3e4f051e48c3499e1c972e012803a8623526. commit 13ab4d59afb824f2a4c03280fffe79c6ba9aa26c Author: Zhigang Gong Date: Fri Nov 11 14:55:12 2011 +0800 Disable glamor_tile temporary. Enable glamor tile cause corrupted output. Need more investigation. Signed-off-by: Zhigang Gong commit 9b6a484df0724d72dd27ad620672e7a762a460df Author: Zhigang Gong Date: Fri Nov 11 10:26:00 2011 +0800 Add new version glamor_poly_fill_rect without internal fallback. If need fallback, this new version just returns FALSE without doing anything. It's the caller's responsibility to implement fallback method. Signed-off-by: Zhigang Gong commit ba1b3b53240b5d499791570ba9f598a4e421c719 Author: Zhigang Gong Date: Wed Nov 9 16:09:03 2011 +0800 Add new version glamor_fillspans without internal fallback. For the purpose of incrementally intergration of existing intel driver, for the GC operations we may don't want to use glamor's internal fallback which is in general much slower than the implementation in intel driver. If the parameter "fallback" is false when call the glamor_fillspans, then if glamor found it can't accelerate it then it will just return a FALSE rather than fallback to a slow path. Signed-off-by: Zhigang Gong commit b861aad8e2fcf6fe1fae4f26abb650bb4eb499c6 Author: Zhigang Gong Date: Wed Nov 2 13:44:50 2011 +0800 Initial version. Signed-off-by: Zhigang Gong commit 2dbbe2565052cc024ce0e98918ed34c1239b780a Merge: 4d6264614 7982eca62 Author: Eric Anholt Date: Wed Dec 18 11:21:07 2013 -0800 Merge branch 'glamor-gongzg-merge' commit 7982eca622bbc4b6a4845801a77da8a16138004a Author: Eric Anholt Date: Wed Dec 18 11:16:15 2013 -0800 Revert changes outside of glamor from the glamor branch. We want to merge the external glamor code to the xserver, with the internal history retained. However, we don't want a bunch of non-building changes along the way, so remove all the build system and support code outside of glamor for now. commit 4d62646142718024b0981eb4f1fd0131e829161f Merge: f4bfb14f5 81ba89d67 Author: Keith Packard Date: Mon Dec 16 09:27:57 2013 -0800 Merge remote-tracking branch 'jeremyhu/master' commit f4bfb14f53a939574da1f5995f0dad949898b86a Author: Adam Jackson Date: Thu Dec 12 10:57:40 2013 -0500 configure: Fix a typo near dri3/shmfence detection " is not the mate of ]. Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit 8248b4af31ef71ac03158871b77f20eb456dbe38 Author: Adam Jackson Date: Fri Dec 13 15:07:48 2013 -0500 glx: Add null pointer protection to __glGetProcAddress This can't happen when GLX is the backing window system, but can elsewhere. We may as well protect against it at a high level. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 128449dd6498a2f74c3770f89a9dae0f70e2b351 Author: Adam Jackson Date: Fri Dec 13 11:39:16 2013 -0500 present: Don't use the major/minor version from the protocol headers We want to advertise the version we implement, not the version the protocol headers happen to describe. Reviewed-by: Jasper St. Pierre < Signed-off-by: Adam Jackson commit ec6087bf070131bc3a26848fb9fb840f09b0e19d Author: Adam Jackson Date: Fri Dec 13 11:36:38 2013 -0500 dri3: Don't use the major/minor version from the protocol headers We want to advertise the version we implement, not the version the protocol headers happen to describe. Reviewed-by: Jasper St. Pierre < Signed-off-by: Adam Jackson commit e6fafd3de70d315130fb6e5732cfd02a5901b788 Author: Adam Jackson Date: Fri Dec 13 11:28:59 2013 -0500 dri3: Guard against buggy clients There's nothing to stop a client from sending these requests to screens without DRI3 support, and if they do, we'll crash. Let's not do that. Reviewed-by: Jasper St. Pierre < Signed-off-by: Adam Jackson commit 81ba89d6703a22178a153aa39478ba2d4bde262b Author: Jeremy Huddleston Sequoia Date: Fri Dec 13 01:39:44 2013 -0800 configure.ac: Add PRESENT_LIB to XQUARTZ_LIBS Undefined symbols for architecture x86_64: "_present_extension_init", referenced from: _staticExtensions in libXquartz.a(miinitext.o) "_present_register_complete_notify", referenced from: ___glXregisterPresentCompleteNotify in libglx.a(glxcmds.o) Signed-off-by: Jeremy Huddleston Sequoia commit d7c9235ee261b0f780320985233e00dec5e2689c Author: Jeremy Huddleston Sequoia Date: Sat Dec 7 01:36:33 2013 -0800 XQuartz: Use asl_log_descriptor to log stdout/stderr of child processes Signed-off-by: Jeremy Huddleston Sequoia commit ad8111d7c971ce448905c733d65ba0cfc72bdca4 Author: Jeremy Huddleston Sequoia Date: Sat Dec 7 01:14:37 2013 -0800 darwin: Don't leave stdin/stdout closed Signed-off-by: Jeremy Huddleston Sequoia commit 929795d50d788358d6269ce423f72c6cc40e334b Author: Peter Hutterer Date: Tue Dec 3 10:14:51 2013 +1000 dix: fix check for grab type Signed-off-by: Peter Hutterer commit 23394c7fea0f5c33333198c87ecfecc9f6c6a791 Author: Peter Hutterer Date: Tue Dec 3 08:36:45 2013 +1000 Xi: ungrab device when releasing a passive grab without ButtonReleaseMask (#71878) If an touch triggers an async button grab and that grab does not have the ButtonReleaseMask set, the TouchEnd is never delivered, deliveries is 0 and the grab is never deactivated. If the grab is pointer async and keyboard sync, the keyboard events are stuck in EnqueueEvent until some other pointer event terminates the grab. Change this to check for the number of listeners. If we're about to deliver a TouchEnd to a passive pointer grab, the number of listeners is already 1 - pointer grabs always accept so other listeners were removed. X.Org Bug 71878 Signed-off-by: Peter Hutterer commit c1d30b5bd7f90e68bc38404fd0cc32578d6d3018 Author: Ben Gamari Date: Thu Nov 21 21:24:20 2013 -0500 Xi: Don't ActivateEarlyAccept POINTER_REGULAR listeners Bug #71878 describes a bug resulting in the server ceasing to respond to keyboard input after a touch event. The problem might be the following: DeliverTouchBeginEvent tries to deliver an event to a listener of type LISTENER_POINTER_REGULAR, taking the following if branch, if (listener->type == LISTENER_POINTER_REGULAR || listener->type == LISTENER_POINTER_GRAB) { rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, grab, xi2mask); if (rc == Success) { listener->state = LISTENER_IS_OWNER; /* async grabs cannot replay, so automatically accept this touch */ if (dev->deviceGrab.grab && dev->deviceGrab.fromPassiveGrab && dev->deviceGrab.grab->pointerMode == GrabModeAsync) ActivateEarlyAccept(dev, ti); } goto out; } DeliverTouchEmulatedEvent succeeds. The deviceGrab meets all three of the conditions of the inner if, enters ActivateEarlyAccept which then fails due to, BUG_RETURN(ti->listeners[0].type != LISTENER_GRAB && ti->listeners[0].type != LISTENER_POINTER_GRAB); That is, despite listener->type == LISTENER_POINTER_REGULAR. With my non-existent knowledge of XINPUT, it seems like the solution here might be to only ActivateEarlyAccept when listener->type == LISTENER_POINTER_GRAB. Signed-off-by: Ben Gamari Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit fe07ec19e212a68076560d243a2a935c54589068 Author: Keith Packard Date: Tue Dec 10 11:27:47 2013 -0800 present: recursively set window pixmaps on flip Newly created windows inherit the pixmap of their parent, similarly, reparenting a tree inherits the pixmap of the destination tree. Making present preserve the invariant that unredirected windows always have the same pixmap as their parent ensures that the above cases work correctly. v2: name the recursive function to 'set_tree_pixmap' instead of 'set_window_pixmap' Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit b3533d0b212b6747a8f9a01931253d6bdb648ee2 Author: Keith Packard Date: Tue Dec 10 10:29:11 2013 -0800 Bump version to 1.14.99.904 (1.15 RC4) Signed-off-by: Keith Packard commit 9a4d7572fe3be16bb5aded5f48d4217fdf725b1d Author: Jon TURNEY Date: Thu Sep 27 18:59:45 2012 +0100 hw/xwin/glx: Rewrite WGL wrappers after Xserver conversion to direct GL dispatch v1: Rewrite by Marc Haesen of the WGL wrapper function generation script to use Khronos group XML. v2: Remove -dispatchheader option, since dispatch.h doesn't exist anymore, use the private glapi interface to construct the GL dispatch table for the native WGL thunks. v3: Rewrite to generate shims for the OpenGL 1.2.1 (GL 1.2 + GL_ARB_imaging +GL_ARB_multitexture + GL_ARB_texture_compression(?)) functions the server links directly with rather than libGL. These shims dispatch to either the mesa GL DLL, or a thunking DLL containing cdecl-to-stcall wrapper functions for the native GL DLL. Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit cb48877a3c4cfb1ae2248000fcd3443e3092bdaa Author: Jon TURNEY Date: Fri Dec 6 14:00:21 2013 +0000 glx: Consistently use ARB-suffixed names for ARB_multitexture functions At the moment we have a mix of ARB and non-ARB suffixed forms for ARB_multitexture functions e.g. glMultiTexCoord1fvARB and glMultiTexCoord1dv Consistently use the ARB-suffixed form, assuming that is present in all libGL which provide the OpenGL 1.2.1 ABI we expect to be able to directly link with. Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 1a021f57a1e75ab63e8f87704f0394162402c4d4 Author: Jon TURNEY Date: Sun Dec 1 22:25:46 2013 +0000 ephyr: Fix compilation when ./configure'd with --enable-debug /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessMouseMotion’: /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:946:188: error: ‘ephyrCurScreen’ undeclared (first use in this function) /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonPress’: /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:980:186: error: ‘ephyrCurScreen’ undeclared (first use in this function) /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonRelease’: /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:1007:186: error: ‘ephyrCurScreen’ undeclared (first use in this function) Fix ephyr compilation when ./configure'd with --enable-debug after commit 46cf6bf5692ef751ec9d17ae2292565d4b13f14b, some instances of ephyrCurScreen were not converted to screen->pScreen->myNum. v2: Don't use a trivial local variable which will be unused when ./configure'd with --disable-debug Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 875dbcef5bfcb6a94ef8456be6151e133408793f Author: Jon TURNEY Date: Fri Nov 29 14:29:20 2013 +0000 configure.ac: Link XWin with present extension if we are building with it enabled Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit e61e19959d9138d5b81b1f25b7aa3e257918170d Author: Adam Jackson Date: Tue Dec 3 13:45:43 2013 -0500 xquartz/glx: Convert to non-glapi dispatch CGL doesn't have anything like glXGetProcAddress, and the old code just called down to dlsym in any case. It's a little mind-warping since dlopening a framework actually loads multiple dylibs, but that's just how OSX rolls. Signed-off-by: Adam Jackson Reviewed-by: Jeremy Huddleston Sequoia commit a668aa0e41bc33ff2db7f9c53b6dc321a96926a9 Author: Adam Jackson Date: Tue Dec 3 15:03:13 2013 -0500 drisw: Wire up GetProcAddress Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 4fcdfeb7bc55d00d50d7f89788d9b929946ae3d9 Author: Adam Jackson Date: Tue Dec 3 15:02:57 2013 -0500 dri2: wire up GetProcAddress Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 47f00b3920be9d8df8b148263d744934f3a02cd4 Author: Adam Jackson Date: Tue Dec 3 15:01:44 2013 -0500 glx: Untangle the prototypes around the GetProcAddress thunk Signed-off-by: Adam Jackson Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Jon TURNEY commit c1fd143f2847ef425ec9891d9e1cba44a1bb007d Author: Adam Jackson Date: Tue Dec 3 13:11:52 2013 -0500 glx: Remove function stubs Now that we're calling non-1.2 ABI things by function pointer this is no longer needed. Signed-off-by: Adam Jackson Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Jon TURNEY commit 6b93e1f5ff39c6ac5b0d97d4245aeac9113eed8b Author: Adam Jackson Date: Tue Dec 3 13:11:09 2013 -0500 glx: Convert non-generated function pointer thunking Same concept as the generated code conversion. Signed-off-by: Adam Jackson Reviewed-by: Jon TURNEY commit c4567a376083eb7b142a7f003ddf8372d376ea86 Author: Adam Jackson Date: Tue Dec 3 12:40:24 2013 -0500 glx: Convert generated code function pointer thunking We're meant not to call these by name due to ABI. Rather than try to generate a bunch of little stub functions that do the lookup, just inline it all directly into the calling function. This does not cache results. That's fine, this is not a performance path, and if we're atop WGL then we effectively have to do this every time anyway because wglGetProcAddress results are context-dependent. Signed-off-by: Adam Jackson Jon TURNEY commit f69f4f417c6807405e45289b39a80f1b9a55f9e6 Author: Keith Packard Date: Tue Dec 10 07:09:17 2013 -0800 Depend on latest glproto (1.4.17) Signed-off-by: Keith Packard commit 576f3d36dd324bd0d16c9968f1ded5c5eead3569 Author: Adam Jackson Date: Mon Dec 9 13:16:01 2013 -0500 damageext: Die if we can't create the Xinerama resource type Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit f10f36d91db1b21c2ce5a531b4fa5f96fcbdc2f0 Author: Adam Jackson Date: Mon Sep 16 15:17:26 2013 -0400 damageext: Xineramify (v7) v7: Don't bother making resources for the backing listeners. [keithp] This is now slightly unlike how other resources are xineramified. We create N+1 internal damage listeners, one that's a real resource and reflects the protocol view, and then one per backend screen where the report function piles onto the protocol view. The internal listeners are not stored in the resource database directly, they just hang off the xinerama resource. We don't wrap Subtract at the dispatch level, but we do extend it for the Xinerama case to clip to the root window geometry. As a result of the N+1 design here, the damage reports we generate are not quite minimal. However they are indistinguishable from sequential rendering events happening before the client hears damage, and we don't need to add a post-dispatch callback just for this one extension. Add is probably (still) somewhat broken since it will only hit screen 0, but Add really only exists for DRI1's sake, and DRI1 disables itself with Xinerama enabled anyway. In the absence of a use case, I'm leaving it unwrapped under Xinerama; if someone wants to define how it ought to work, be my guest. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 808303fe5232ba0320ae5a4310b1ed1322e85f1d Author: Adam Jackson Date: Mon Nov 4 17:49:34 2013 -0500 fixes: Fix PanoramiXSetWindowShapeRegion for root windows (v2) Root windows in Xinerama are in the coordinate space of their root window pixmap, not in protocol space. v2: Only translate for root windows, sice the window shape is drawable-relative. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 5c10c7ea2129b70015e745523918d143cc29318d Author: Adam Jackson Date: Mon Nov 4 17:49:33 2013 -0500 fixes: Fix PanoramiXSetPictureClipRegion for root windows (v2) Root windows in Xinerama are in the coordinate space of their root window pixmap, not in protocol space. This fixes 'xcompmgr -n' when Xinerama is active. v2: Only translate for root windows, since the clip origin is drawable-relative. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 1dd839a425adc6e5a1dc377003ed86a374d81f0b Author: Adam Jackson Date: Thu Nov 7 13:59:30 2013 -0500 composite: Fix COW creation for Xinerama (v2) Say you have two 800x600 screens left/right of each other. A window that's 200x200 at +700+0 in protocol coordinate space will appear to be at -100+0 in the coordinate space of the right hand screen. Put another way: windows are in the coordinate space of their root window pixmap. We weren't doing this translation for the COW, so when rendering came in to it you'd see the top-left chunk of the COW on all screens. Cool effect and all, but wrong. v2: Only translate when Xinerama is active [keithp] Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 8dbe456abae1a32fb6c5c74fa456bc7301cccabe Author: Adam Jackson Date: Tue Oct 29 10:44:07 2013 -0400 xinerama: Export the screen region damageext wants this so it can intersect subtract requests against the root window geometry. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit c6d4c2a24140feee4ceae48c4c74fedcae9b68b3 Author: Adam Jackson Date: Fri Nov 15 15:13:31 2013 -0500 xfree86: Prefer fbdev to vesa On UEFI machines you'd prefer fbdev to grab efifb instead of vesa trying to initialize and failing in a way we can't unwind from. On BIOS machines this is harmless: either there is an fbdev driver and it'll probably be more capable, or there's not and vesa will kick in anyway. Reviewed-by: Alex Deucher Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 7b5d4f147fdef9edfeaa9c6565375111079efd11 Author: Adam Jackson Date: Tue Nov 5 10:12:28 2013 -0500 composite: Don't double-redirect if someone asks for backing store twice v2: Belt-and-suspenders the unredirection path [vsyrjala] Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a2b2c271e0ca87d3188ba2741b6db9bbbdc599f5 Author: Adam Jackson Date: Tue Nov 5 10:08:17 2013 -0500 composite: Automatically enable backing store support on the screen ... unless you explicitly disabled it with -bs on the command line, or with the corresponding thing in xorg.conf. v2: Drop a bogus hunk from compChangeWindowAttributes [vsyrjala] v3: s/TRUE/WhenMapped/ [jcristau] Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit e0cac005608a2e5618c7be59701318d684e0bb93 Author: Adam Jackson Date: Tue Nov 5 09:58:17 2013 -0500 bs: Set the screen's bs support level to WhenMapped Since we're using RedirectAutomatic to do this, we don't actually preserve contents when unmapped. v2: Don't say WhenMapped if Composite didn't initialize [vsyrjala] Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit b61ccd5d9d368f3fbbae27ce14ac02a3db1884c4 Author: Adam Jackson Date: Tue Nov 5 10:20:04 2013 -0500 smartsched: Tweak the default scheduler intervals A default timeslice of 20ms means a pathological client can ruin up to two frames per scheduler tick. And a fifth of a second is just insane. Pick two different numbers out of the hat. A 5ms slice means you can probably keep up with two or three abusive clients, and letting it burst to 15ms should give you about all the timeslice you need for a fullscreen game (that's doing server-side rendering for some reason). If you're running on a system with a 10ms granularity on SIGALRM, then this effectively changes the intervals to 10ms and 30ms. Which is still better, just not as better. I suspect this is about as good as we can do without actually going preemptive, which is an entire other nightmare. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 66310ea2893811614b3c3aade8992624a95a6ee7 Author: Adam Jackson Date: Fri Nov 8 09:22:37 2013 -0500 dri3: Disable when Xinerama is active Pretty sure this can't work. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 793fd5eefb0e417614d77fe1522c6548587fbd4e Author: Adam Jackson Date: Fri Nov 8 09:20:29 2013 -0500 dri2: Disable when Xinerama is active Would only work on ScreenRec 0, which means it's broken. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 2bf92108294805c5c6fef249c2f7de6ecf4975d8 Author: Adam Jackson Date: Fri Nov 8 09:06:59 2013 -0500 present: Disable when Xinerama is active Among much else Present depends on RANDR types, and RANDR isn't properly Xinerama-aware yet anyway. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit ac772cb187ddf7e04b8f4b3a071b90f18f4488d0 Author: Eric Anholt Date: Thu Nov 14 17:40:47 2013 -0800 glx: Fix incorrect use of dri_interface.h version defines in driver probing. If we extend __DRI_CORE or __DRI_SWRAST in dri_interface.h to allow a new version, it shouldn't make old server code retroactively require the new version from swrast drivers. Notably, new Mesa defines __DRI_SWRAST version 4, but we still want to be able to probe version 1 drivers, since we don't use any features beyond version 1 of the struct. Signed-off-by: Keith Packard Reviewed-by: Ian Romanick commit 6e926b18ca1b182253bac435a1d53caaff7ffff6 Author: Eric Anholt Date: Thu Nov 14 17:40:46 2013 -0800 glx: Fix incorrect use of dri_interface.h version defines in extensions. Those defines are so you can compile-time check "do I have a dri_interface.h that defines this new field of the struct?" You don't want the server to claim it implements the new struct just because you installed a new copy of Mesa. Signed-off-by: Keith Packard Reviewed-by: Ian Romanick commit 57a8ce927332e855dd29ff30210a211a907adb25 Author: Jon TURNEY Date: Fri Nov 29 12:26:43 2013 +0000 configure.ac: Fixup for "Require libpciaccess for int10" On 16/11/2013 01:00, Connor Behan wrote: > A --disable-pciaccess build will fail with an int10 module other than > stub. > > Signed-off-by: Connor Behan > --- > configure.ac | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/configure.ac b/configure.ac > index 5e621e0..a843770 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1822,6 +1822,9 @@ if test "x$XORG" = xyes; then > if test "x$CONFIG_UDEV_KMS" = xyes; then > AC_MSG_ERROR([Platform device enumeration requires libpciaccess]) > fi > + if test "x$INT10" != xstub; then > + AC_MSG_ERROR([Cannot build int10 without libpciaccess]) > + fi > fi > AC_MSG_RESULT([$PCI]) > This causes my build to fail where --disable-int10-module --disable-pciaccess is the default (as INT10 still has the default value 'x86emu') Signed-off-by: Jon TURNEY Reviewed-by: Jeremy Huddleston Sequoia Tested-by: Jeremy Huddleston Sequoia Signed-off-by: Keith Packard commit 653d33941b0808ef910aaa5f3aeab05d9c1a100b Author: Keith Packard Date: Tue Nov 26 12:18:12 2013 -0800 present: Report damage when flipping Limit damage to the 'update' region. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 5cf12c9569ac3d83fe1b7a8376c15f8f0b01655e Author: Keith Packard Date: Tue Nov 26 12:10:48 2013 -0800 present: Also set the root window pixmap when flipping This makes sure that things like software cursors continue to work while the screen is flipped. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 4aa77378de69efdc10bced6ba650b0ebff50c112 Author: Keith Packard Date: Tue Nov 26 12:06:57 2013 -0800 present: Clear target_crtc if driver lacks Present support If the driver doesn't have the necessary hooks for Present, then the target_crtc needs to be set to NULL to make sure the extension uses the present_fake code. Signed-off-by: Keith Packard Tested-by: Fredrik Höglund Reviewed-by: Adam Jackson commit 3dd5bfe540b295bb37a2c2fd0ba4a31fb217612b Author: Keith Packard Date: Thu Nov 21 22:48:31 2013 -0800 present: Send GLX_BufferSwapComplete events from present extension This allows GL to support the GLX_INTEL_swap_event extension. v2: Return GLX_BLIT_COMPLETE_INTEL for unknown swap types Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit cde86e68fcb716f34c90f5a16eb868870f5c85e4 Author: Keith Packard Date: Mon Nov 25 23:06:08 2013 -0800 present: Set window pixmap to flipped pixmap This makes other drawing to the window appear on the screen. Note that no child windows can be affected because only full-screen windows are eligible for flipping, and so we only need to set pixmap for the window itself. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 04e138846e128670d409798aa2e797c3c5503a47 Author: Keith Packard Date: Mon Nov 25 23:10:17 2013 -0800 present: Leave vblank on window list until flip complete If the window is destroyed, then we've got cleanup work to do, even if the vblank has already been executed -- we need to clear the window pointer so that we don't try to deliver events to it. Leaving it on the window list meant that when walking that list, we need to know whether the vblank is waiting to be executed or waiting for the flip to complete, so a new 'queued' flag was added to the vblank to distinguish between the two states. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit b121d62accb8c346b4e1b1bce99586e13712f04a Author: Keith Packard Date: Tue Nov 26 03:07:55 2013 -0800 present: Add a debug output line when skipping a pending present When an application provides two pixmaps for the same MSC, the previous one is skipped. This just dumps out some information at that point Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit ae24f5bf6b31c035af50e14727966055ed8767bd Author: Maarten Lankhorst Date: Tue Dec 3 17:01:28 2013 +0100 bump to 0.8.1 commit 59e324abd7cbda5d301b7b67125cd6d96684f000 Author: Thierry Reding Date: Tue Nov 26 17:08:03 2013 +0100 Properly identify DSI outputs Newer Linux kernels support DSI outputs. To be able to identify them properly, add DSI to the list of output names. Reviewed-by: Aaron Plattner Signed-off-by: Thierry Reding commit 190289f6393191bb3c58067ce1df994809475077 Author: Thierry Reding Date: Tue Nov 26 17:08:02 2013 +0100 Staticise and constify output names This array isn't used anywhere outside this file, so it can be made static. While at it, make the array const as well. Signed-off-by: Thierry Reding Reviewed-by: Aaron Plattner commit eafba23b34be31c141ddafb8380520ac9a0622ac Author: Keith Packard Date: Thu Nov 21 22:45:18 2013 -0800 miext/sync: Handle libxshmfence API change libxshmfence had an unfortunate 'int32_t' type for the mapped fence. That changed to exposing a 'struct shmfence' instead, which is nice and opaque and offers fine type checking across the API. This patch requires the newer version of the library and uses the new interface type. Signed-off-by: Keith Packard Reviewed-by: Julien Cristau commit b6d7ed4d787a652e8150532f384bfdf51760f3c2 Author: Keith Packard Date: Thu Nov 21 22:12:34 2013 -0800 miext: Move SyncShm FDs out of the way of clients Applications may end up allocating a bunch of shmfence objects, each of which uses a file descriptor, which must be kept open lest some other client ask for a copy of it later on. Lacking an API that can turn a memory mapping back into a file descriptor, about the best we can do is push the file descriptors out of the way of other X clients so that we don't run out of the ability to accept new connections. This uses fcntl F_GETFD to push the FD up above MAXCLIENTS. Signed-off-by: Keith Packard Reviewed-by: Julien Cristau commit cc63204926c6da83d9221c5f8c0dc8f5e2f2481d Author: Keith Packard Date: Wed Nov 13 14:16:33 2013 +0900 Xext: Use SHMDIR and O_TMPFILE when creating mapping files ShmCreateSegment asks for a file descriptor for a memory mapped file created by the X server. This patch uses O_TMPFILE where available, and also uses the SHMDIR directory to store the files, both for the O_TMPFILE and mkstemp cases. Signed-off-by: Keith Packard Reviewed-by: Julien Cristau commit 5a969f0928b84da5cfe0777dfb542caaacc915ad Author: Keith Packard Date: Wed Nov 13 12:17:10 2013 +0900 Select directory for MIT-SHM temp files at configure time By default, this looks through a list of directories to find one which exists, but can be overridden with --with-shared-memory-dir=PATH This patch doesn't actually do anything with this directory, just makes it available in the configuration Signed-off-by: Keith Packard Reviewed-by: Julien Cristau commit d695cb7fb6bb8fd159a332d902673edbbd2237d7 Author: Alan Coopersmith Date: Mon Nov 25 22:19:34 2013 -0800 Xdmx: Initialize DMX extension even if not built with GLX support dmxAddExtensions takes an argument to determine if it should just initialize the DMX extension, or both DMX & GLX, but if GLX wasn't compiled in, the entire call was #ifdef'ed out, leaving the DMX extension unavailable. Signed-off-by: Alan Coopersmith Reviewed-by: Julien Cristau Signed-off-by: Keith Packard commit bd70def07754357d26b86c287037eb3884631daf Author: Connor Behan Date: Fri Nov 15 17:00:40 2013 -0800 configure.ac: Require libpciaccess for int10 A --disable-pciaccess build will fail with an int10 module other than stub. Signed-off-by: Connor Behan Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit a575c1dc64c10bc88bd0e963ebb8ab137f59a078 Author: Connor Behan Date: Fri Nov 15 17:00:20 2013 -0800 configure.ac: Require libpciaccess for platform bus support There is currently no reason to build with --enable-config-udev-kms and --disable-pciaccess but anyone who tries this should know that the build will fail. Signed-off-by: Connor Behan Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 361dfe74eaa2f1eddb54abdecca1d8b1b3f58704 Author: Connor Behan Date: Fri Nov 15 17:00:00 2013 -0800 configure.ac: Add whitespace near PCI configuration Signed-off-by: Connor Behan Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 80481267662c8687e73081237913fa561e7a6561 Author: Keith Packard Date: Sat Nov 23 22:22:37 2013 -0800 Bump release to 1.14.99.903 (1.15 RC3) Signed-off-by: Keith Packard commit f1604002a32b7f098c2a16b4a8649c694af570c8 Author: Keith Packard Date: Mon Nov 18 22:36:17 2013 -0800 miext: Ensure xshmfence is only called when driver supports it This provides a place for drivers to insert their own FD-based SyncFence implementations, and prevents applications from using DRI3 SyncFence creation functions unless the driver has some support for them. Signed-off-by: Keith Packard Tested-by: Fredrik Höglund commit 037566c57caff93fd7717f385d4b532b81f19c77 Author: Keith Packard Date: Mon Nov 18 22:33:27 2013 -0800 Xext: Recover from miSyncInitFenceFromFD failure without crashing miSyncDestroyFence must not be called unless miSyncInitFence has been invoked, so if miSyncInitFenceFromFD fails, we must free the fence manually. Signed-off-by: Keith Packard Tested-by: Fredrik Höglund commit e7000534a456fdf9cd4eaada3193846c8525f740 Author: Chris Wilson Date: Sat Oct 5 08:47:03 2013 +0100 glx/glxdri2: Unwrap EnterVT/LeaveVT upon CloseScreen In a similar spirit to commit d75e8146c414bfd512ba5dbd4a83acb334bbe19b Author: Keith Packard Date: Mon Jul 12 16:01:34 2010 -0700 Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998 we need to unwrap our pScrn->EnterVT/LeaveVT hooks around server regeneration or else we cause an infinite recursion on the next VT switch afterwards. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1235516 Signed-off-by: Chris Wilson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 6d5883bd7e5b765f8f0548501b825d9e56840799 Author: Keith Packard Date: Sat Nov 23 16:19:46 2013 -0800 xnest: Ignore GetImage() error in xnestGetImage() (v3) (I found an amended version of this patch and applied the difference here - keithp) v3: Don't call Xsync before restoring error handler as any errors generated by XGetImage() should be processed when this call returns as suggested by Jamey Sharp Signed-off-by: Egbert Eich Reviewed-by: Jamey Sharp commit 6403cbb143c67872ca9c58e3116ae7942def0ae1 Author: Keith Packard Date: Tue Nov 19 22:13:54 2013 -0800 present: When unflipping, copy to flip window rather than screen unflip happens after the clip lists have been updated, so instead of smashing the whole screen and drawing over other windows, just draw to the original flip window; it'll have the right clip list and so the copy will work just fine. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 8bdd2ccc776ded3f527596b5009ef25129aa3287 Author: Keith Packard Date: Mon Nov 11 18:03:42 2013 -0800 present: Block for wait_fence in present_execute Pend presentation until wait_fence is also triggered by having the SyncFence trigger invoke present_execute once triggered. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit e5a188cb919edee2e3a03054276bce0db02f7b62 Author: Keith Packard Date: Sat Nov 9 12:36:47 2013 -0800 present: Signal destroyed flip window with vblank->window == NULL This eliminates dereferencing freed window pointers when there is a flip for that window in progress. The flip will complete, and then immediately get undone (as we can't stop an in-progress flip). Remove the vblank->window_destroyed field as we can signal this with vblank->window == NULL instead. Change check to vblank->window == NULL in: present_flip_notify Add check for vblank->window == NULL in: present_vblank_notify present_execute present_flip_notify was also using vblank->window->drawable.pScreen, so stop doing that and use vblank->screen instead. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit a5bcc4f7b9499caf8993f0a6ef96088553399ca3 Author: Keith Packard Date: Sat Nov 9 12:33:02 2013 -0800 present: Ignore event_id 0 from driver vblank notify We use event_id 0 to mean 'no such event'; if a driver sends us that event_id, make sure we don't accidentally match it. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 4f3c37a1f17ffcfbbff71d217e1caad3d0148c90 Author: Keith Packard Date: Thu Nov 7 14:17:12 2013 -0800 present: Round fake MSC computations intead of truncating If the timer fired too early, we'd sometimes mis-compute the MSC for fake vblanks. Rounding the computation to the nearest MSC fixes this nicely. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit da9997f89f14ab619f244d5b2e80a423b028c789 Author: Peter Hutterer Date: Tue Nov 19 08:07:09 2013 +1000 configure: allow for --enable-libunwind and --disable-libunwind Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit a307ac27382dd0c377cd1a436cb25cb5aaa54416 Author: Keith Packard Date: Fri Nov 15 13:39:52 2013 +0900 Handle new DamageUnregister API which has only one argument API change in 1.15 Signed-off-by: Keith Packard commit d6ffce4b0e2376e1f8f04ee70b323a6aea3e517e Author: Keith Packard Date: Fri Nov 15 13:26:36 2013 +0900 Clean up compiler warnings. Add const to any immutable string pointers. Rename 'range' to 'prop_range' to avoid redefined warning. Eliminate some unused return values. Signed-off-by: Keith Packard commit 29240e5cbf6e7f875b128fc7bfc4d56b2350835a Merge: 0492deb8f 8ff7e32c3 Author: Keith Packard Date: Thu Nov 14 17:02:04 2013 +0900 Merge remote-tracking branch 'whot/for-keith' commit 0492deb8f8238b7782e5a706ec6219d88aa1091d Author: Adam Jackson Date: Tue Oct 29 12:09:27 2013 -0400 mieq: Bump default queue size to 512 Based on some bugzilla scraping I did around November 2012. Of xserver bugs in Red Hat bugzilla with an EQ size message in the log, the distribution looked like: String | Matches ------------------------------------- Increasing EQ size to 512 | 460 Increasing EQ size to 1024 | 52 Increasing EQ size to 2048 | 6 Increasing EQ size to 4096 | 0 Most of the "512" ones appear to be mostly harmless, some relatively expensive path in either rendering or resource destruction simply taking too long due to external pressures like paging or CPU contention. So let's raise the initial queue size, both to reduce the number of spurious abrt reports and to drop fewer events in all but the most pathological cases. Signed-off-by: Adam Jackson Reviewed-by: Jasper St. Pierre Signed-off-by: Keith Packard commit d1440783a7367ff0d0c47d256bbca3b3cf8a5034 Author: Dave Airlie Date: Tue Oct 29 12:09:26 2013 -0400 xfree86: return NULL for compat output if no outputs. With outputless GPUs showing up we crash here if there are not outputs try and recover with a bit of grace. Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit d7ee27e5e415778240919082c83a65226c6f17e6 Author: Dan Horák Date: Tue Oct 29 12:09:25 2013 -0400 test: build the touch test only when building Xorg Reviewed-by: Adam Jackson Signed-off-by: Dan Horák Signed-off-by: Keith Packard commit 8ff7e32c3ef7b0c13c4ab9664f651e9782d35a85 Author: Peter Hutterer Date: Wed Nov 13 17:14:11 2013 +1000 include: export key_is_down and friends VNC needs key_is_down to check if a key is processed as down before it simulates various key releases. Make it available, because I seriously can't be bothered thinking about how to rewrite VNC to not need that. Signed-off-by: Peter Hutterer Acked-by: Keith Packard commit 0ba7fc8472f1227fd1cd51bd58048f164b8ea1ab Author: Alan Coopersmith Date: Tue Nov 12 14:46:04 2013 -0800 Stop including inline assembly .il file for Solaris Studio builds Since all the inb/outb/etc. use in the X server itself (except for xf86SlowBcopy) has been replaced by calls to libpciaccess, we no longer need to pass inline assembly files to replace the gcc inline assembly from hw/xfree86/common/compiler.h when building Xorg itself. The .il files are still generated and installed in the SDK for the benefit of drivers who may use them. Binary diff of before and after showed that xf86SlowBcopy was the only function changed across the Xorg binary and all modules built in the Xserver build, it just calls the outb() function now instead of having the outb instructions inlined, making it a slightly slower bcopy. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 550baf38f6096658f0bcf0ad647c4fedf93132f2 Author: Peter Hutterer Date: Fri Oct 4 10:55:52 2013 +1000 kdrive: fix cursor jumps on CursorOffScreen behavior This patch fixes cursor jumps when there is a grab on the Xephyr window and the pointer moves outside the window. So on two side-by-side 640x480 screens, a coordinate of 0/481 triggers KdCursorOffscreen. If the delta between two screens is 0, they share the same offset for that dimension. When searching for the new screen, the loop always rules out the current screen. So we get to the second screen, trigger the conditions where dy <= 0 and decide that this new screen is the correct one. The result is that whenever KdCursorOffScreen is called, the pointer jumps to the other screen. Change to check for dy < 0 etc. so that the cursor stays on the same screen if there is no other screen at the target location. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit a94d945065177d73f3ee8dc0b9147264ba281136 Author: Peter Hutterer Date: Tue Oct 29 14:24:41 2013 +1000 kdrive: modify ephyr events to use POINTER_DESKTOP and scale them to that A multi-head Xephyr instance has the pointer stuck on one screen because of bad coordinate calculation. The coordinates passed to GetPointerEvents are per-screen, so the cursor gets stuck on the left-most screen by default. Adjust and mark the events as POINTER_DESKTOP, so the DIX can adjust them accordingly. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d66832a3b8a8675f1e5f3656dcb1bbe95598f0ea Author: Keith Packard Date: Thu Nov 14 13:21:54 2013 +1000 kdrive: handle WxH as valid geometry spec If a screen size was specified as WxH, the loop returned early and kdOrigin was never advanced. Thus, screen->origin was always 0 (or whatever was given at the -origin commandline flag). If a screen size was given with a bit depth (WxHxD), kdOrigin would always advance by the current screen, offsetting the next screen. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c8c5105c1d5c093675d7f571f158147f22f7572b Author: Peter Hutterer Date: Tue Oct 29 14:33:56 2013 +1000 ephyr: xcb_connect returns an error, not NULL Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 2aa67ccef6ad8f51deb94b66defc668ddb7d226c Author: Keith Packard Date: Thu Nov 14 10:26:20 2013 +0900 Update to version 1.14.99.902 1.15 RC2 Signed-off-by: Keith Packard commit 9309d2a009a6a3b6090fc377fc7a3eded1a34dc0 Author: Keith Packard Date: Wed Nov 13 07:01:45 2013 +0900 xext: Fix shmint.h to not use headers outside of sdk_HEADERS shmint.h is part of sdk_HEADERS, and so can't use anything not included in sdk_HEADERS. busfault.h includes dix-config.h which is not. Leave the use of struct busfault in shmint.h and move the include of busfault.h to shm.c. protocol-versions.h is not part of sdk_HEADERS, so instead of using that, just use XTRANS_SEND_FDS to choose whether to expose the fd passing requests directly. Reported-by: Julien Cristau Signed-off-by: Keith Packard Tested-by: Knut Petersen Reviewed-by: Julien Cristau v2: also avoid using protocol-versions.h commit 4a251f5883b042cd902c192060a0be2b11148f2b Author: Jeremy Huddleston Sequoia Date: Fri Nov 8 14:55:33 2013 -0800 xfree86: Fix build without libpciaccess Regression fix from commit 04ab07ca19236d6c9a947e065fb69b0dd0d16639 Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Connor Behan commit 5b02d5b7aaabf1ba8dcbdfe4525b7995b4e79f92 Author: Alan Coopersmith Date: Thu Nov 7 21:08:56 2013 -0800 Enable XTRANS_SEND_FDS on Solaris too. Requires passing through the __EXTENSIONS__ and _XOPEN_SOURCE defines in order to expose the msg_control members in struct msghdr. Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson commit c4c154d18ef42dc550f2675a9ee88e07b1ca6bed Author: Alan Coopersmith Date: Thu Nov 7 21:05:33 2013 -0800 Avoid conflicts with Solaris defines that clash with our names When building on Solaris with _XOPEN_SOURCE set to a recent XPG release, and other core headers start including , which has a bunch of unfortunately named macros such as "CS", "ES", etc. for x86 & x64 registers which clash with existing variable & struct member names in Xorg - so #undef these so they don't interfere with our use. (Yes, have filed a bug against the system headers for exposing these, but this solves the problem for building on existing releases.) Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson commit d7f9be0f8541368bf1a095ad1fbe7f38be6d3d15 Author: Keith Packard Date: Mon Nov 11 15:48:41 2013 -0800 Proper spelling of MAP_ANONYMOUS is MAP_ANON. The former doesn't exist on BSD and the latter is available everywhere AFAIK (checked Solaris and Linux). You also might want to wrap that line ;). Reported-by: Mark Kettenis Signed-off-by: Keith Packard commit fc84166e65c35ad75f566b135dcfc305ad5a2fde Author: Keith Packard Date: Thu Nov 7 15:18:28 2013 -0800 Get rid of the rest of the FD passing code when XTRANS_SEND_FDS isn't set req_fds and SetReqFds in include/dixstruct.h ReadFdFromClient, WriteFdToClient and the FD flushing in os/io.c Signed-off-by: Keith Packard commit a239e6faf3fce848ac0d10c48f8e817db68a493c Merge: 43e5a43fa f70a8bf37 Author: Keith Packard Date: Mon Nov 11 15:26:12 2013 -0800 Merge remote-tracking branch 'jeremyhu/master' commit 43e5a43fa8994e50cf01dd954118f4ef2c4e7933 Author: Adam Jackson Date: Thu Nov 7 12:01:41 2013 -0500 present: Don't try to initialize when building without present support There's a --disable-present, so it'd be nice if it worked. Signed-off-by: Adam Jackson Reviewed-by: Jasper St. Pierre Reviewed-by: Mark Kettenis Signed-off-by: Keith Packard commit 0822a23e048b12c98c654e8b6af711c5f2c97141 Author: Keith Packard Date: Thu Nov 7 03:19:42 2013 -0800 present: Change debug output a bit to help diagnose missing vblank signals Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 20bb49ae9ba11d3dccfba191483cd682d9c9d96c Author: Keith Packard Date: Wed Nov 6 23:56:26 2013 -0800 Present: Check for window/fence destroyed when idling pixmaps A client destroying objects in the middle of an unflip can end up having the screen flip window or fence set to NULL in the unflip notify path. Check for these and don't try to use those objects. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 41da295eb50fa08eaacd0ecde99f43a716fcb41a Author: Keith Packard Date: Sun Nov 3 13:12:40 2013 -0800 Trap SIGBUS to handle truncated shared memory segments If a client passes a section of memory via file descriptor and then subsequently truncates that file, the underlying pages will be freed and the addresses invalidated. Subsequent accesses to the page will fail with a SIGBUS error. Trap that SIGBUS, figure out which segment was causing the error and then allocate new pages to fill in for that region. Mark the offending shared segment as invalid and free the resource ID so that the client will be able to tell when subsequently attempting to use the segment. Signed-off-by: Keith Packard v2: Use MAP_FIXED to simplify the recovery logic (Mark Kettenis) v3: Also catch errors in ShmCreateSegment Conflicts: include/dix-config.h.in include/xorg-config.h.in commit 719e880d7698d92f9b854b217ef9680aaa446f2e Author: Keith Packard Date: Wed Nov 6 23:22:51 2013 -0800 Require libXtrans version 1.3.2 This has the FD passing support included Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit bee2ec54049377e0033d49abff20d7bd069c62aa Author: Keith Packard Date: Sun Nov 3 10:08:15 2013 -0800 Xext: Enable MIT-SHM FD-passing request definitions only when possible Check to see if xtrans FD passing is available and use that to advertise the appropriate version of the SHM extension Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith commit ea8acfe3e2f74a46c3f1e91809b4b99af18502b7 Author: Keith Packard Date: Wed Nov 6 23:06:28 2013 -0800 Require xextproto version 7.2.99.901 This includes the MIT-SHM FD passing requests Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith commit 914672fefacc15386041e7c2bc3beed4faf45e9d Author: Keith Packard Date: Thu Nov 7 14:20:26 2013 -0800 Remove dix-config.h config variables from xorg-config.h xorg-config.h includes dix-config, so there's no need to duplicate. Signed-off-by: Keith Packard commit 7aad79c5a582ece301d950bd65f0bcb4b9956e86 Author: Keith Packard Date: Wed Nov 6 23:05:46 2013 -0800 Make XTrans FD passing support optional. Define only on Linux Until other operating systems have a libXtrans port for FD passing, disable this on non-Linux systems. Note that this define affects how libXtrans gets built into the X server, which is why it need only define the symbol Signed-off-by: Keith Packard commit f70a8bf3714d89bccaad36841ef9149e91ad3bba Author: Jeremy Huddleston Sequoia Date: Sun Nov 10 11:40:27 2013 -0800 XQuartz: Don't sleep forever on exit if usleep() returns an error Signed-off-by: Jeremy Huddleston Sequoia commit ebcc1c214c466582d7b92826b4860256fd9c582a Author: Jeremy Huddleston Sequoia Date: Sun Nov 10 11:26:49 2013 -0800 XQuartz: Update Info.plist copyright years Signed-off-by: Jeremy Huddleston Sequoia commit 81c123ea2dd833864f7ba217791e59acca0f7c97 Author: Jeremy Huddleston Sequoia Date: Mon Nov 4 12:13:45 2013 -0800 configure.ac: Move GLX section after DRI The GLX section of configura.ac checks the state of DRI2, so it needs to be after DRI2=auto is resolved. Also reset libgl requirement to 7.1.0 in non-dri2 case. Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Adam Jackson commit ab4b1fb38a61feb73d8336cc7a3399eb9d3d25be Author: Andreas Schwab Date: Thu Aug 15 12:03:42 2013 +0200 ARM64: Add support for aarch64 Signed-off-by: Andreas Schwab Reviewed-by: Mark Kettenis Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 8fcf82cbf015609e00b3feb9bc567133c7aee5cf Author: Keith Packard Date: Tue Nov 5 18:39:11 2013 -0800 Use $GL_LIBS instead of -lGL for linking -lGL presumes that the GL library is in the system path, while $GL_LIBS is auto-detected. Signed-off-by: Keith Packard commit f348935e7d2c84a438aba08eee2f2c4e0dc77d20 Author: Keith Packard Date: Tue Nov 5 18:37:12 2013 -0800 Link with xshmfence, reference miSyncShmScreenInit in sdksyms This gets the server to link with xshmfence again, and also ensures that the miSyncShm code is linked into the server with the reference from sdksyms. Signed-off-by: Keith Packard commit 5f1e832694e57986c0185048a941b3af51b2f85f Author: Julien Cristau Date: Tue Nov 5 07:08:21 2013 -0800 os: Actually use the computed clockid in GetTimeInMicros The selection of which clock to use for this function was not actually getting used when fetching the final clock value. Reported-by: Julien Cristau Signed-off-by: Keith Packard commit 903a058370645ea075ea98d380fd565efb6160c9 Author: Keith Packard Date: Mon Nov 4 19:01:26 2013 -0800 hw/xfree86: Link libdri3 only when DRI3 is defined Don't attempt to link non-existant libraries... Signed-off-by: Keith Packard commit aaf0e29619196a283fee7ead2020a91032d84f48 Author: Keith Packard Date: Sun Nov 3 09:56:02 2013 -0800 Disable DRI3 and sync fence FD functions if xshmfence isn't available Make sure the server can build when the xshmfence library isn't present Signed-off-by: Keith Packard commit 33c85beed521c9db140cadd8c5aa9992398ee1fe Author: Keith Packard Date: Fri Nov 1 01:01:58 2013 -0700 Set version to 1.14.99.901 (1.15 RC1) Signed-off-by: Keith Packard commit 9db1d66f6d2c6857de220d8f1c08965962fe1416 Author: Keith Packard Date: Fri Nov 1 01:43:59 2013 -0700 Add dri3 and present directorys to distribution Signed-off-by: Keith Packard commit 977e2644b1d9e13b44debcb9a372bbc832ee32a3 Merge: 66c5ee0ff f36f5a65f Author: Keith Packard Date: Fri Nov 1 00:34:18 2013 -0700 Merge remote-tracking branch 'whot/for-keith' commit 66c5ee0ff4690e630a69656331fd9d545c99c26c Author: Egbert Eich Date: Wed Aug 14 18:18:56 2013 +0200 config/APM: Add option to disable building of APM support on Linux APM support in the Xserver was used to restore the console mode prior to a power management event. This was to ensure the mode upon suspend/resume was one that the system firmware or kernel could deal with. APM support is now largely obsolete, KMS drivers don't require a mode restoration anyhow. Therefore it should be possible to disable this feature. (small modification by keithp - move test for XF86PM flag after check for APM, then move XF86PM flag to xorg-config.h.in) Signed-off-by: Egbert Eich Tested-by: Keith Packard Signed-off-by: Keith Packard commit f36f5a65f639b6524191d888d5bf89e73027156c Author: Peter Hutterer Date: Wed Oct 30 15:40:58 2013 +1000 sync: fix corner-case in triggering idle alarms ProcessInputEvent() resets the device idle times. If idle time was higher than the lower bracket, this should trigger an event in the idle time wakeup handler. If processing is slow, the idle time may advance past the lower bracket between the reset and the time the BlockHandler is called. In that case, we'd never schedule a wakeup to handle the event, causing us to randomly miss events. Ran tests with a neg transition trigger on 5ms with 200 repeats of the test and it succeeded. Anything below that gets a bit tricky to make sure the server sees the same idle time as the client usleeps for. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit f994d99539192a10a8c83047e11991f52e0ca677 Author: Egbert Eich Date: Wed Aug 14 18:18:39 2013 +0200 config/ACPI: Add option to disable building of ACPI support on Linux ACPI support in the Xserver was used to restore the console mode prior to a power management event. This was to ensure the mode upon suspend/resume was one that the system firmware or kernel could deal with. The feature depended on acpid to be running. Most of this functionality is now take over by systemd, KMS drivers don't require a mode restoration anyhow. Therefore it should be possible to disable this feature under some circumstances. Tested-by: Keith Packard Signed-off-by: Keith Packard commit 2aa5092b88174cb9988076ae96298217c97ad75f Author: Egbert Eich Date: Mon Aug 12 18:21:33 2013 +0200 DDX/Randr: Avoid server crash when xrandr SetConfig is called while switched away A call to Xrandr SetScreenConfig (for randr 1.1) causes the Xserver to crash when xf86SetViewport() which does not check if the hardware is accessible. Wrap accesses to xf86SetViewport() with if (vtSema) { ... } to avoid that. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 508e05777aba823c93a2417cc26d18c9f061ca26 Author: Egbert Eich Date: Mon Aug 12 18:20:36 2013 +0200 DDX/Events: Distinguish between Input- and GeneralHandlers in xf86VTSwitch() When enabling/disabling input handlers in xf86VTSwitch() we treat Input- and GeneralHandlers equally. The result is that after a VT switch the masks for EnabledDevices and AllSockets are equal and the distiction between both types is lost. Signed-off-by: Egbert Eich Reviewed-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 0cb33ce34081d7d123ec565582d7d19bdb3964ad Author: Egbert Eich Date: Sat Oct 5 08:02:28 2013 +0200 DDX/modes: Add a sanity check when using screen sizes from EDID EDID sometimes lies about screen sizes. Since the screen size is used by clients to determine the DPI a wrong ration will lead to terrible looking fonts. Add a sanity check for the h/v ratio cutting off at 2.4. This would still accept the cinemascope aspect ratio as valid. Also add message suggesting to add a quirk table entry. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 41d4beb2616ceb3f1a1b8694733e85bae70de59a Author: Egbert Eich Date: Wed Aug 14 11:50:26 2013 +0200 DDX/DPMS: Call dixSaveScreens() also when screen is turned on DMPS calls dixSaveScreens() when turned off but not when turned on. In most cases this is irrelevant as DPMS is done when a key is hit in which case dixSaveScreens() will be called to unblank anyhow. This isn't the case if we use xset (or the DPMS extension directly) to unblank. Check screenIsSaved to make sure the state needs to be changed before calling dixSaveScreens(). Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 623c4147650d0404cfbea0f9b7df66dc7d928e00 Author: Søren Sandmann Pedersen Date: Mon Oct 21 17:11:56 2013 -0400 ephyr: Ensure stride of private framebuffer is multiple of 4 The fb layer of X can't deal with strides that are not a multiple of 4, so when Xephyr allocates its own framebuffer it should make sure to align it. This fixes crashes and rendering corruption when Xephyr runs in a depth that is different from the host X server and its screen size is not a multiple of 4 / depth. (This is particularly easy to trigger if you use the -resizeable option). Reviewed-by: Eric Anholt Signed-off-by: Soren Sandmann Reviewed-by: Adam Jackson commit 97cf53cc2ad7ecfdd495133bad31d0ec7d939326 Author: Søren Sandmann Pedersen Date: Mon Oct 21 16:58:54 2013 -0400 ephyr: hostx_screen_init(): Fix bits_per_pixel and bytes_per_line When the depth of the Xephyr server matches that of the host X server, Xephyr simply uses the buffer associated with the XImage as its framebuffer. In this case, it is correct to get the bits_per_pixel and bytes_per_line values returned from hostx_screen_init() from the XImage. However, when the depth doesn't match the host, Xephyr uses a private framebuffer that is periodically copied to the XImage. In this case, the returned values of bits_per_pixel and bytes_per_line should be those of the private framebuffer, not those of the XImage. Reviewed-by: Eric Anholt Signed-off-by: Soren Sandmann Reviewed-by: Adam Jackson commit 55246b67b755d4c1039d54971fe3f77ea60d604e Author: Søren Sandmann Pedersen Date: Tue Oct 8 17:45:40 2013 -0400 xf86AddBusDeviceToConfigure(): Store device in DevToConfig[i].pVideo After fc3ab84d the pVideo field in DevToConfig[i] is no longer initialized, so it's always NULL. This causes the duplicate finding algorithm in the beginning of the function to not work anymore as it is based on this field. The symptom of this bug is that X -configure reports Number of created screens does not match number of detected devices. Configuration failed. Server terminated with error (2). Closing log file. rather than producing a working config file. This patch fixes that bug by initializing the field before calling xf86PciConfigureNewDev(). Cc: tvignatti@gmail.com Signed-off-by: Soren Sandmann Reviewed-by: Adam Jackson commit 95bf478b78e466002c382bcde7d4d62591e9215d Merge: abf5d5ac1 bb745f2b4 Author: Keith Packard Date: Thu Oct 31 18:18:19 2013 -0700 Merge remote-tracking branch 'jeremyhu/master' commit abf5d5ac12437ebe156b4dd500c2acd69eea3654 Author: Jeremy Huddleston Sequoia Date: Thu Oct 31 08:57:56 2013 -0700 miext/damage: Partial revert of "Only wrap into the GC ops chain if there's a listener (v3)" Fixes regression from: 4dc2a76740d921c824a4d8193f39dd373475f02a http://lists.x.org/archives/xorg-devel/2013-May/036241.html https://trac.macports.org/ticket/38993 Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit e4636072949a76477fe7c9d54662a0b3536b1372 Merge: 17ed7ac1f 5c5c1b779 Author: Keith Packard Date: Thu Oct 31 17:05:48 2013 -0700 Merge remote-tracking branch 'keithp/dri3' commit 17ed7ac1fe7426d66f688087c09da5ff1dbb41d3 Author: Adam Jackson Date: Thu Oct 31 18:39:22 2013 -0400 glx: Lie about GLX_Y_INVERTED_EXT Well, that was lame. The problem with reporting y inversion honestly is that libGL asks the driver _its_ opinion of Y inversion, which it just fabricates from whole cloth. So then when libGL goes to compare the driver's idea of fbconfigs with that of the server - a fairly dumb idea to begin with - nothing matches, and direct rendering fails, and sadness. So until the DRI drivers are fixed we should just continue to lie about Y inversion. GLX_DONT_CARE is what libGL would make up for that attribute if we hadn't sent it, so just send that instead. Signed-off-by: Adam Jackson Tested-by: Keith Packard Signed-off-by: Keith Packard commit 5c5c1b77982a9af7279a90bc3c2be48adaa9c778 Author: Keith Packard Date: Thu Jul 11 16:11:57 2013 -0700 present: Add Present extension Provides both a software implementation using timers and driver hooks to base everything on vblank intervals. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 563138298868f62501875d3016f03469dcffaad0 Author: Keith Packard Date: Tue Apr 9 19:59:39 2013 -0700 dri3: Add DRI3 extension Adds DRM compatible fences using futexes. Uses FD passing to get pixmaps from DRM applications. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit fdec793cdc2ef9a6ea66b311cb1068a7bd4a3be3 Author: Keith Packard Date: Thu Jan 17 13:46:55 2013 -0800 Add support for MIT-SHM AttachFd request This passes a file descriptor from the client to the server, which is then mmap'd Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 9fd35daa3160fd36f00ed354bfcbefefa1353cce Author: Keith Packard Date: Thu Jan 17 13:43:02 2013 -0800 Add interfaces to get FDs from clients over the socket This adds two interfaces: void SetReqFds(ClientPtr client, int req_fds) Marks the number of file descriptors expected for this request. Call this before any request processing so that any un-retrieved file descriptors will be closed automatically. int ReadFdFromClient(ClientPtr client) Reads the next queued file descriptor from the connection. If this request is not expecting any more file descriptors, or if there are no more file descriptors available from the connection, then this will return -1. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 264fc3abe5f18341d0cf9ddb6766e10e4154e447 Author: Keith Packard Date: Thu Oct 31 13:01:46 2013 -0700 misync: Don't smash custom screen sync functions There was a check to avoid smashing custom functions, but the sense was backwards causing it to always smash them, and also not set them otherwise. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 2d96948ab5c952b68875ac63844cf7d778d4bf63 Author: Keith Packard Date: Thu Jul 11 16:10:34 2013 -0700 os: Add GetTimeInMicros 64-bit higher resolution current time value. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 0c33f47281c36726848daf513fb0483cdea57bff Author: Keith Packard Date: Thu Jul 11 16:09:34 2013 -0700 Add swapll to byte swap 64-bit datatypes Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 26f013ba45b08a02bb028a461af68288a86fadb1 Author: Keith Packard Date: Thu Jul 11 16:08:41 2013 -0700 Add a RegionDuplicate function This allocates a new region structure and copies a source region into it in a single API rather than forcing the caller to do both steps themselves. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit d25c217964eb1fe54c3a54bca4cac7f47b4b9fdf Author: Keith Packard Date: Mon Jan 14 14:24:36 2013 -0800 Clean up a couple of warnings in os/ Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 7710f2b927ec8e3c631f72d66d494b523377b48e Author: Keith Packard Date: Fri Jan 18 21:43:40 2013 -0800 Xext: Move MIT-SHM 'ShmDesc' to shmint.h This data structure is required to use shared memory objects in any extension. That includes the Xv extension, which (before this patch) duplicated the definition of this structure in its own code. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit e8961b718d82f1c081ec110d8d962f64e8406b82 Author: Peter Hutterer Date: Tue Oct 22 14:24:52 2013 +1000 os: use a constant for backtrace array size Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit f12a9ed870017f35cf6d2a82b1405e843aae42ac Author: Peter Hutterer Date: Tue Oct 29 15:24:11 2013 +1000 configure: remove a comment 94ed0ba1b5043ad9fc33b42756af447d5ab15bbd moved backtracing into the DIX, so this comment is outdated. since no-one noticed and it's easier to just grep than update file references, remove the comment. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit bb745f2b45768d0936f3960951e1a5cee8b03194 Author: Jeremy Huddleston Sequoia Date: Thu Oct 31 08:50:57 2013 -0700 XQuartz: Bump bundle version to 2.7.6 Signed-off-by: Jeremy Huddleston Sequoia commit 2eedf42c229e2251035d716a96b654222155cd51 Author: Adam Jackson Date: Thu Oct 31 09:23:52 2013 -0400 dri: Fix GLX_Y_INVERTED_EXT fbconfig attribute We're Y-inverted from GL's coordinates, so this is correct. gnome-shell doesn't seem to check this - somewhat reasonable since the only server that answered the other way around was Xglx - but kwin does, and upside-down hilarity ensues. Tested-by: maelcum on #xorg-devel Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 902ff0b3497d202b86bf9a411e17db7b694d6eaa Author: Adam Jackson Date: Tue Oct 29 12:58:14 2013 -0400 xfree86: Bump video/input/extension ABIs for 1.15 Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau Signed-off-by: Keith Packard commit 899451ae595f5f51a500295c624bf7ad14aca602 Author: Keith Packard Date: Wed Oct 30 08:54:24 2013 -0700 kdrive/ephyr: Don't discard one-time driver structure at server reset KdScreenInfo is constructed at server startup time, and not re-generated at server reset time. Freeing the 'driver' element at reset time means this information is lost, and the server crashes pretty quickly afterwards. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 85ae44f07fa21b4a48d95d736dc8135bd4f751d0 Author: Michal Srb Date: Wed Oct 30 13:33:51 2013 +0200 randr: deliver Output and Crtc events of attached output providers. Consider all attached output providers when looking for changed outputs and crtcs. Reviewed-by: Dave Airlie Signed-off-by: Michal Srb Signed-off-by: Keith Packard commit a9ca93dcf9a711b3d60fbad31cbd44e0c82b6f42 Author: Michal Srb Date: Wed Oct 30 13:33:50 2013 +0200 randr: send RRResourceChangeNotify event Send RRResourceChangeNotify event when provider, output or crtc was created or destroyed. I.e. when the list of resources returned by RRGetScreenResources and RRGetProviders changes. Reviewed-by: Dave Airlie Signed-off-by: Michal Srb Signed-off-by: Keith Packard commit 4b39ea8a918fe6117bf34dc1cba67a4e56d0d1fb Author: Michal Srb Date: Wed Oct 30 13:33:49 2013 +0200 randr: send RRProviderChangeNotify event Send RRProviderChangeNotify event when a provider becomes output source or offload sink. Reviewed-by: Dave Airlie Signed-off-by: Michal Srb Signed-off-by: Keith Packard commit 1470c0a132806fb2ce817515ad4ddfe66eb7c98f Merge: 04ab07ca1 9f4afe7e8 Author: Keith Packard Date: Tue Oct 29 21:00:13 2013 -0700 Merge remote-tracking branch 'whot/for-keith' commit 9f4afe7e835cf9c513387ae01eaf8b7a6ba4aac9 Author: Gaetan Nadon Date: Mon Oct 28 18:32:36 2013 -0400 config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES Fix Automake warning: AC_OUTPUT should be used without arguments. www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Files Signed-off-by: Gaetan Nadon Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit e16dea72d6f45dd6d7788362bb7dbe76263719b1 Author: Peter Hutterer Date: Wed Oct 23 15:16:25 2013 +1000 dmx: queue button events with a flags of 0 Setting POINTER_SCREEN with a unset valuator mask causes a jump to 0/0. Set the flags to 0 so we don't generate any motion on a button event. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 04ab07ca19236d6c9a947e065fb69b0dd0d16639 Author: Connor Behan Date: Thu Oct 17 18:26:28 2013 -0700 xfree86: Find primary entity when bus types are nominally different As of server 1.13, systems with DRM and Udev will have BUS_PLATFORM as their primary bus type. However, drivers not implementing a platformProbe function will still create entities of type BUS_PCI. We need to account for this when checking for the primary entity. Signed-off-by: Connor Behan Acked-by: Tormod Volden Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit b32a4c91ccd479638c2bd2c0143b6ea170c717d1 Merge: be6680967 c671e935e Author: Keith Packard Date: Tue Oct 29 09:37:30 2013 -0700 Merge remote-tracking branch 'idr/glx-float-fbconfig' commit be6680967a479eedbcab2fe1718c5f981e1029c7 Author: Adam Jackson Date: Wed Jul 10 10:00:46 2013 -0400 glx: convert to direct GL dispatch (v2) We now expect to be linked against something that provides the GL API, instead of manually grubbing about in the DRI driver's dispatch table. Since the GLX we expose calls GL functions that are meant to be looked up dynamically, also add a way to thunk through to GetProcAddress. This includes a refresh of the generated sources, which requires a correspondingly new Mesa. The GetProcAddress stubs are at the moment merely enough to make this link against Mesa 9.2, but should really be provided for everything not in the OpenGL 1.2 ABI. v2: Explicitly hide the GetProcAddress stubs so we can't conflict with libGL symbols; fix leading tab/space issues [anholt] Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 8aacf47e1778d8b72811b025a82452b933d3c1f2 Author: Adam Jackson Date: Fri Oct 4 12:58:19 2013 -0400 glx: Remove DRI1 AIGLX (v2) Mesa doesn't ship DRI1 drivers as of 8.0, which is about 18 months and three releases ago. The main reason to have wanted DRI1 AIGLX was to get a GLX compositor working, but DRI1's (lack of) memory management API meant that the cost of a GLX compositor was breaking direct GLX apps, which isn't a great tradeoff. Of the DRI1 drivers Mesa has dropped, I believe only mga stands to lose some functionality here, since it and only it has support for NV_texture_rectangle. Since that's required for every extant GLX compositor I know of, I conclude that anybody with a savage, say, would probably not notice AIGLX going away, since they wouldn't be running a GLX compositor in the first place. In the future we'd like to use GL in the server in a more natural way, as just another EGL client, including in the GLX implementation itself. Since there's no EGL implemented for DRI1 drivers, this would already doom AIGLX on DRI1 (short of entirely forking the GLX implementation, which I'm not enthusiastic about). v2: Remove DRI1 from AIGLX conditionals in configure.ac [anholt] Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 7f5adf73a0f9a951a6df201532b4031d38054369 Author: Adam Jackson Date: Wed Oct 2 17:38:05 2013 -0400 glx: Simplify glXDestroyContext We can just free the resource unconditionally here. ContextGone (which FreeResourceByType will call) already does: cx->idExists = GL_FALSE; if (!cx->currentClient) { __glXFreeContext(cx); } Reviewed-by: Ian Romanick Signed-off-by: Adam Jackson commit 53653f4889dcaea0cf67f8a4180af71eeb4b2f6b Author: Adam Jackson Date: Mon Aug 5 15:46:11 2013 -0400 glx: Fix a corner case in DrawableGone Losing the drawable does not change our notion of current client. Since the GL under us doesn't understand having a current context without current drawables (sigh), we do still need to loseCurrent so that we re-bind the context on the next request. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65030 Reviewed-by: Ian Romanick Signed-off-by: Adam Jackson commit 276d8057aa7f6e36c9c874257a6383f416c5cedd Author: Adam Jackson Date: Sat Aug 3 09:47:55 2013 -0400 glx: Fix memory leak in context garbage collection (v2) I broke this, back in: commit a48dadc98a28c969741979b70b7a639f24f4cbbd Author: Adam Jackson Date: Mon Mar 21 11:59:29 2011 -0400 glx: Reimplement context tags In that, I changed the glx client state to not explicitly track the list of current contexts for the client (since that was what we were deriving tags from). The bug was that I removed the code for same from glxClientCallback without noticing that it had the side effect of effectively de-currenting those contexts, so that ContextGone could free them. So, if you had a client exit with a context still current, the context's memory would leak. Not a huge deal for direct clients, but viciously bad for indirect, since the swrast context state at the bottom of Mesa is like 15M. Fix this by promoting Bool isCurrent to ClientPtr currentClient, so that we have a back-pointer to chase when walking the list of contexts when ClientStateGone happens. v2: Explicitly call __glXFreeContext on the ClientStateGone path. Our current context might be one we got from EXT_import_context and whose creating client has since died. Without the explicit call, the creating client's FreeClientResources would not free the context because it's still current, and the using client's FreeClientResources would not free the context because it's not an XID it created. This matches the logic from a48dadc. Reviewed-by: Ian Romanick Signed-off-by: Adam Jackson commit 75b362763cca8b6139582ad85e3b58f0b2e30a1c Author: Adam Jackson Date: Tue Oct 8 15:02:44 2013 -0400 glx: Only take a Pixmap reference if creating the GLXPixmap succeeded Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 4292a39c8014f9f4920bed3001802e4a3e523c5e Author: Peter Hutterer Date: Mon Oct 28 12:10:10 2013 +1000 Xi: fix logic error when calculating emulated motion events gcc -Wlogical-op exevents.c: In function 'DeliverEmulatedMotionEvent': exevents.c:1480:13: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op] The relevant snippet of exevents.c: 1479 if (ti->listeners[0].type != LISTENER_POINTER_REGULAR || 1480 ti->listeners[0].type != LISTENER_POINTER_GRAB) 1481 return; This condition was always true, causing dropped motion events. Reported-by: Alan Coopersmith Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit c671e935e7c44d4711ba9588ee96cb9796b879e6 Author: Daniel Czarnowski Date: Mon Oct 21 19:48:38 2013 +0200 glx: Enable GLX_ARB_fbconfig_float for DRI2 drivers v2 (idr): Maintain sort order of extension list. Fixed rebase error (comment header for initializeExtensions was in front of __glXDRIinvalidateBuffers). Re-write commit message. Signed-off-by: Daniel Czarnowski Signed-off-by: Ian Romanick Reviewed-by: Ian Romanick commit ccc8bb1153ec669f7540a174a81a8ec0e0d6dd67 Author: Daniel Czarnowski Date: Wed Oct 23 12:53:59 2013 +0200 glx: Handle float config types in glxConvertConfigs Replaces old use of floatMode attribute with new, extended range of values in __DRI_ATTRIB_RENDER_TYPE. Also adds new conditions, where the float modes support requires it. Enables support for not only float configs, but packed float configs as well. v2 (idr): Whitespace and formatting fixes. Refactor render type vs. pbuffer checking to a separate function that includes a quote from the spec. Re-write commit message. Fix compiler warnings: glxdricommon.c: In function 'glxConvertConfigs': glxdricommon.c:212:35: warning: pointer targets in passing argument 3 of 'core->getConfigAttrib' differ in signedness [-Wpointer-sign] glxdricommon.c:212:35: note: expected 'unsigned int *' but argument is of type 'int *' glxdricommon.c:230:35: warning: pointer targets in passing argument 3 of 'core->getConfigAttrib' differ in signedness [-Wpointer-sign] glxdricommon.c:230:35: note: expected 'unsigned int *' but argument is of type 'int *' Signed-off-by: Daniel Czarnowski Signed-off-by: Ian Romanick Reviewed-by: Ian Romanick commit 4e5eb15b4cc170499cf87e6633c1737f0b1c514b Author: Daniel Czarnowski Date: Mon Oct 21 19:57:53 2013 +0200 glx: Correctly set render type enum The type specified is bits, but the context wants an enum. v2 (idr): Fix various whitespace and formatting problems. Rename convFBconfRenderTypeBits2CtxRenderType to renderTypeBitsToRenderTypeEnum. Re-write commit message. Signed-off-by: Daniel Czarnowski Signed-off-by: Ian Romanick Reviewed-by: Ian Romanick commit eabb523aa45f3d8940cadac197ef1225fbfd5c56 Author: Daniel Czarnowski Date: Mon Oct 21 19:45:35 2013 +0200 glx: Allow float renderType in glXCreateContextAttribsARB This enables GLX_RGBA_FLOAT_TYPE_ARB and GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT as valid renderType parameters to glXCreateContextAttribsARB. v2 (idr) : Use C-style comments and fix word wrapping. Re-write commit message. Signed-off-by: Daniel Czarnowski Signed-off-by: Ian Romanick Reviewed-by: Ian Romanick commit 7ecfab47eb221dbb996ea6c033348b8eceaeb893 Author: Eric Anholt Date: Tue Oct 22 14:22:04 2013 -0700 glx: Add support for the new DRI loader entrypoint. This is going to be exposed (and not the old entrypoint) for some DRI drivers once the megadrivers series lands, and the plan is to eventually transition all drivers to that. Hopefully this is unobtrusive enough to merge to stable X servers so that they can be compatible with new Mesa versions. v2: typo fix in the comment Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 83bb366e71ef41165998eed2934208f84714a37e Author: Strake Date: Thu Oct 17 23:20:20 2013 -0500 unbreak KdEnableInput pi = ki = 0 here, so not follow them. Signed-off-by: Strake Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8db4121a3c7104548fd4a138ac1d1bdea5fd22d9 Author: Keith Packard Date: Fri Oct 18 17:31:01 2013 -0700 Update to version 1.14.99.3 Signed-off-by: Keith Packard commit e3220d7bae4548bf64e5879c981ad070ac1f78f7 Merge: 73b2660d7 2523a445a Author: Keith Packard Date: Fri Oct 18 17:22:52 2013 -0700 Merge commit '2523a445a09a75a8baf642608d099a5e12d5437f' This is merging the commits along Peter's for-keith branch, without also merging in the spurious merge at the top of that branch. commit f8662a133690773692dfa392ecfa3b8b56af8fa9 Merge: 7cf1b595c 2523a445a Author: Peter Hutterer Date: Fri Oct 18 16:50:12 2013 +1000 Merge branch 'xsync-transition-bug-59644' into for-keith commit 2523a445a09a75a8baf642608d099a5e12d5437f Author: Peter Hutterer Date: Thu Oct 17 12:02:27 2013 +1000 sync: split updating and triggering a counter up Now that the brackets are always the nearest change points (regardless of transition) we need to update the counters whenever we check for any updates. Otherwise we end up with a situation where counter->value is out of date and an alarm doesn't trigger because we're still using the value from last time something actually triggered. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit e57ec99b03b2ad840c384a97ab2766ce9da0f5cc Author: Peter Hutterer Date: Wed Oct 16 16:31:15 2013 +1000 sync: always set the brackets (#59644) The current code sets bracket_greater to the first trigger after the current value, and bracket_less to the last trigger before the current value. For example, the idle timer with three negative and three positive transitions would set this: nt1 nt2 nt3 |--------|------|--|------- idle --|---|--|-----> t pt1 pt2 pt3 bracket_less == nt2 bracket_greater == pt2 This is an optimization so we can skip code paths in the block/wakeup handlers if the current value doesn't meet any of the trigger requirements. Those handlers largely do a if (bracket_less is less than current value && bracket_greater is greater than current value) return, nothing to do However, unless the bracket values are updated at the correct time, the following may happen: nt |--------------|---------- idle ------|--------> t pt In this case, neither bracket is set, we're past the pos transition and not yet at the neg transition. idle may now go past nt, but the brackets are not updated. If idle is then reset to 0, no alarm is triggered for nt. Likewise, idle may now go past pt and no alarm is triggered. Changing an alarm or triggering an alarm will re-calculate the brackets, so this bug is somewhat random. If any other client triggers an alarm when the brackets are wrongly NULL, the recalculation will set them this bug may not appear. This patch changes the behavior, so that the brackets are always the nearest positive or negative transitions to the current counter value. In the example above, nt will trigger a wakeup and a re-calculation of the brackets, so that going past it in the negative direction will then cause the proper alarm triggers. Or, in Keith's words: Timer currently past a positive trigger No bracket values, because no trigger in range Timer moves backwards before the positive trigger Brackets not reset, even though there is now a trigger in range Timer moves forward past the positive trigger Trigger doesn't fire because brackets not set Setting the LT bracket in this case will cause everything to get re-evaluated when the sync value moves backwards before the trigger value. X.Org Bug 59644 Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit 06b87aa528d7a739ba20101a1f83b1a428691a01 Author: Peter Hutterer Date: Wed Oct 16 10:08:46 2013 +1000 sync: if the idle time was reset, force alarms to trigger (#70476) The time between the idle reset and the IdleTimeWakeupHandler to be called is indeterminate. Clients with an PositiveTransition or NegativeTransition alarm on a low threshold may miss an alarm. Work around this by keeping a reset flag for each device. When the WakeupHandler triggers and the reset flag is set, we force a re-calculation of everything and pretend the current idle time is zero. Immediately after is the next calculation with the real idle time. Relatively reproducible test case: Set up a XSyncNegativeTransition alarm for a threshold of 1 ms. May trigger, may not. X.Org Bug 70476 Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit efc1035ca958f2c9d266338a308518a0834b1773 Author: Peter Hutterer Date: Wed Oct 16 09:36:01 2013 +1000 dix: provide accessor methods for the last device event time And now that we have the accessors, localize it. No functional changes, just preparing for a future change. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit b7c9bd9cf276e92a73be57ff2ed32b47a80f13fb Author: Peter Hutterer Date: Wed Oct 16 09:21:47 2013 +1000 sync: supply the counter from IdleTimeBlockHandler The main idletime counter has an initialized deviceid, might as well be supplying it properly. Without this, we'd only ever check the XIAllDevices counter, so the wait would never be adjusted for the device-specific triggers. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit 2efe49c1029f959fe80879bcf50df42e8b80451d Author: Peter Hutterer Date: Wed Oct 16 13:01:01 2013 +1000 sync: always call BracketValues when recalculating upper/lower brackets Both ServertimeBracketValues and IdleTimeBracketValues copy the value into there SysCounter privates. Call it for a NULL set as well, so we don't end up with stale pointers and we can remove the block/wakeup handlers. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit 5c7cfd4c6978834551848e1be62af240102e39b5 Author: Peter Hutterer Date: Tue Oct 15 10:11:20 2013 +1000 sync: compress two if statements No functional changes, just merges a > and == condition into a >= condition. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit 73b2660d7273d175d279d22f8ca0c3932a14ff1c Author: Alan Coopersmith Date: Mon Sep 16 21:47:16 2013 -0700 Avoid use-after-free in dix/dixfonts.c: doImageText() [CVE-2013-4396] Save a pointer to the passed in closure structure before copying it and overwriting the *c pointer to point to our copy instead of the original. If we hit an error, once we free(c), reset c to point to the original structure before jumping to the cleanup code that references *c. Since one of the errors being checked for is whether the server was able to malloc(c->nChars * itemSize), the client can potentially pass a number of characters chosen to cause the malloc to fail and the error path to be taken, resulting in the read from freed memory. Since the memory is accessed almost immediately afterwards, and the X server is mostly single threaded, the odds of the free memory having invalid contents are low with most malloc implementations when not using memory debugging features, but some allocators will definitely overwrite the memory there, leading to a likely crash. Reported-by: Pedro Ribeiro Signed-off-by: Alan Coopersmith Reviewed-by: Julien Cristau commit 8afe20d4e34adcfd29bdf43a01d55335ea2c5dba Author: Alan Coopersmith Date: Mon Sep 16 21:45:29 2013 -0700 Update GLX dependencies now that DRI & DRI2 are builtins, not modules Signed-off-by: Alan Coopersmith commit 2704bdb24a2c7bac65b90e05f1a68438b34ecf58 Author: Alan Coopersmith Date: Tue Sep 3 22:53:28 2013 -0700 DMX glxproxy: Don't allocate & copy data just to free it unused Two functions in the DMX glxproxy code loop over all the backend screens, starting at the highest numbered and counting down to the lowest. Previously, for each screen, the code would allocate a buffer large enough to read the reply from the backend, copy that reply into the buffer, and then if it wasn't the final screen, free it. Only the buffer from the final screen is used, to pass on to the client in the reply. This modifies it to just immediately discard the responses from the screens as we loop through it, only doing the allocate & copy work for the one buffer we pass back to the client. Signed-off-by: Alan Coopersmith Reviewed-by: Alex Deucher commit 6c06c268adbab63ebe7490489aa030724cbdc54b Author: Alan Coopersmith Date: Sun Aug 18 18:02:49 2013 -0700 Skip damage calls if DamageCreate fails in exa functions Fixes parfait errors such as: Null pointer dereference (CWE 476): Write to null pointer pDamage at line 1833 of miext/damage/damage.c in function 'DamageRegister'. Function DamageCreate may return constant 'NULL' at line 1775, called at line 232 of exa/exa_migration_mixed.c in function 'exaPrepareAccessReg_mixed'. Constant 'NULL' passed into function DamageRegister, argument pDamage, from call at line 237. Null pointer introduced at line 1775 of miext/damage/damage.c in function 'DamageCreate'. Null pointer dereference (CWE 476): Write to null pointer pDamage at line 1833 of miext/damage/damage.c in function 'DamageRegister'. Function DamageCreate may return constant 'NULL' at line 1775, called at line 104 of exa/exa_mixed.c in function 'exaCreatePixmap_mixed'. Constant 'NULL' passed into function DamageRegister, argument pDamage, from call at line 109. Null pointer introduced at line 1775 of miext/damage/damage.c in function 'DamageCreate'. Checks are similar to handling results of other calls to DamageCreate. [ This bug was found by the Parfait 1.3.0 bug checking tool. http://labs.oracle.com/pls/apex/f?p=labs:49:::::P49_PROJECT_ID:13 ] Signed-off-by: Alan Coopersmith commit 7cf1b595c8c8f9776a39559d2878cf90af3f2859 Author: Peter Hutterer Date: Wed Sep 4 15:34:29 2013 +1000 dix: only deliver for the current grab type Use the grabtype to determine which type of event to send - all other events are pointless and may result in erroneous events being delivered. Signed-off-by: Peter Hutterer commit 78944d62ffc7fec6f75b6f514ab7a139ba9bc77b Author: Peter Hutterer Date: Wed Sep 4 15:34:28 2013 +1000 dix: don't attempt to deliver an event for a different grabtype For an active grab, grab->eventMask can be either the core or the XI1 mask. With the overlap of event filters, calling DeliverOneGrabbedEvent(XI1) for a ProximityOut event will trigger if the client has selected for enter events - the filter is the same for both. Thus, we end up delivering a proximity event to a client not expecting one. Signed-off-by: Peter Hutterer commit 6159811a1aaf848016dbfa7bde68df097027870c Author: Peter Hutterer Date: Wed Sep 4 15:34:27 2013 +1000 include: change grabtypes to start at 1 Avoid erroneous detection of an unset grabtype as CORE Signed-off-by: Peter Hutterer commit be6ea80b79b3d6eb97106ea142e01acbdf059995 Author: Peter Hutterer Date: Wed Sep 4 15:34:26 2013 +1000 dix: only allow button and key events to freeze a sync'd pointer If a client calls XAllowEvents(SyncPointer) it expects events as normal until the next button press or release event - that freezes the device. An e.g. proximity event must thus not freeze the pointer. As per the spec, only button and key events may do so, so narrow it to these cases. Signed-off-by: Peter Hutterer commit 93a27b2dd0d7ed51120f42456a91a7c59902ebc2 Author: Michele Baldessari Date: Sun Sep 15 19:30:38 2013 +0100 Xephyr: restore cursor visibility Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69388 Commit c100211034ab69ce453a1644fb61c6808d7e3eda (dix: only show the cursor if a window defines one (#58398)) broke the default cursor behaviour in Xephyr (unless run with -retro). Restore the default cursor visibility so that '-retro' or '-host-cursor' are not needed to have a visible cursor. Signed-off-by: Michele Baldessari Reviewed-by: Peter Hutterer as of ba387cf21f7d95987211f75d8024601e7d64e322 "ephyr: Use host (HW) cursors by default." this only applies if -sw-cursor is given on the cmdline. Signed-off-by: Peter Hutterer commit 70efc799cbeec26f19831b3b14c0d4646198a077 Author: Michele Baldessari Date: Sun Sep 15 19:56:34 2013 +0100 Fix Xephyr compilation when DEBUG is enabled When DEBUG is enabled Xephyr compilation fails: ephyrdriext.c:343:133: error: 'is_ok' undeclared (first use in this function) EPHYR_LOG("leave. is_ok:%d\n", is_ok); Just reemove bogus is_ok variable. Signed-off-by: Michele Baldessari Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5ac4bfca64bd75474e550b26bc1195a5ca245752 Author: Adam Jackson Date: Tue Sep 10 14:18:18 2013 -0400 input: calloc minimization for xi2mask_new There's no reason to do this as (nmasks + 2) callocs, and it's a surprisingly hot path. Turns out you hit this ~once per passive grab, and you do a few bajillion passive grab changes every time you enter or leave the overview in gnome-shell. According to a callgrind of Xorg with gnome-shell-perf-tool run against it: Ir before: 721437275 Ir after: 454227086 Signed-off-by: Adam Jackson Reviewed-by: Jasper St. Pierre Signed-off-by: Peter Hutterer commit 44d502c6f1d03a9e548f0941cde0228b6fde8394 Author: Jon TURNEY Date: Sun Oct 6 16:45:52 2013 +0100 hw/xwin: Fix for "glx: Remove screen number from __GLXconfig" Fix compilation after commit c3c976f54c3c282d6fa6c8360688e036bc43d210 "glx: Remove screen number from __GLXconfig" Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Adam Jackson commit 6a9bd103cb993e873cb82664b677ceed73c0bd85 Merge: ea3b7db4b 8aae28e3c Author: Keith Packard Date: Mon Oct 7 17:29:38 2013 -0700 Merge remote-tracking branch 'jeremyhu/master' commit ea3b7db4b747f883ef7b8b524ee13bf8a63add14 Author: Emil Velikov Date: Mon Oct 7 18:29:25 2013 +0100 configure.ac: Include missing proto declarations in SDK_REQUIRED_MODULES Commits a1d41e311c21e, 7d859bd87834d & 3ed2c6e11298c made extinit.h require the XF86 Big Font, XRes & ScrnSaver proto headers, but failed to add them to the SDK_REQUIRED_MODULES so pkg-config would find them for driver builds. Signed-off-by: Emil Velikov Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 8aae28e3cbdd49bfa8d940a4a517c94a53b94f86 Author: Jeremy Huddleston Sequoia Date: Sun Oct 6 09:20:45 2013 -0700 XQuartz: Dont't set screen on __GLXConfig Fixes regression introduced by c3c976f54c3c282d6fa6c8360688e036bc43d210 Signed-off-by: Jeremy Huddleston Sequoia commit c5f8eb968efa970201712105a1ac880b517e7b6d Author: Jeremy Huddleston Sequoia Date: Sun Oct 6 09:18:15 2013 -0700 rootless: Use miCopyRegion instead of fbCopyRegion Fixes regression introduced by e657635dbe6b92875b0e88370557c2cbab673a49 Signed-off-by: Jeremy Huddleston Sequoia commit ccbe17b1c6da1ad9d085fc8133cdd15dc7004a4a Author: Pino Toscano Date: Wed Aug 28 17:15:03 2013 +0200 os: move for any !win32 system It is needed in IPv6 configurations (for inet_pton) also when SIOCGIFCONF is not defined. Signed-off-by: Pino Toscano Acked-by: Samuel Thibault Signed-off-by: Julien Cristau commit c079b8e675dd2762c9e07fe5d8c07612299dceb7 Author: Pino Toscano Date: Wed Aug 28 17:04:48 2013 +0200 xfree86/hurd: include Needed for using get_privileged_port. Signed-off-by: Pino Toscano Acked-by: Samuel Thibault Signed-off-by: Julien Cristau commit f0659a7f68a5a334879af01a6a63742eab1bf5de Author: Keith Packard Date: Fri Oct 4 16:44:46 2013 -0700 Bump version to 1.14.99.2 Signed-off-by: Keith Packard commit f2d149b6d10edea7233d93c7e19f71decf11dc62 Author: Keith Packard Date: Fri Oct 4 16:43:41 2013 -0700 kdrive/ephyr: Remove duplicate ephyrExtensions and ephyrExtensionInit decls These were duplicated when GLX support was re-added on two different branches. Signed-off-by: Keith Packard commit e0a678f0596f3547b98d74d5f0438b484b059458 Author: Gaetan Nadon Date: Sat Sep 28 15:26:38 2013 -0400 xfree86: add a comment as to why the logdir is created Without the logdir, the xserver will write the content of the log file on the terminal stating that it cannot be written and will stop. Refer to https://bugs.freedesktop.org/show_bug.cgi?id=3889 Reviewed-By: Matt Dew Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 5bdbf2dba3f7da4a593b286020eab0c7857e940c Author: Gaetan Nadon Date: Sat Sep 28 15:26:37 2013 -0400 xfree86: Use $(MKDIR_P) for better code portability Still true that we should not use the lower case $(mkdir_p) version. However, remove the 2005 comment as the MKDIR_P is widely used now. Reviewed-By: Matt Dew Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit b8cfb0dc8426754b477b561bc158b8a24c143ddf Author: Gaetan Nadon Date: Sat Sep 28 15:26:36 2013 -0400 Uninstall X link and CYGWIN libXorg.exe.a in local install targets It is our duty to uninstall any files and/or directories that we installed through install-data-local and install-exec-hook. Currently the X symbolic link to Xorg remains on disk after running make uninstall. Note the exception for logdir which is usually shared by other modules. Reviewed-By: Matt Dew Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 35a528e49269c3df75486cc606e51a8c1c083c06 Author: Gaetan Nadon Date: Sat Sep 28 15:26:35 2013 -0400 Xorg binary: use install-exec-hook rather than install-exec-local The former was explicitly designed to execute additional code after the binary has been installed. The latter can be executed in any order, hence it's current dependency on install-binPROGRAMS as a workaround. The CYGWIN libXorg.exe.a target is an installation target rather than a post-installation one, so it should not be done as a hook. It does not depend on the Xorg executable being installed. Automake: "These hooks are run after all other install rules of the appropriate type, exec or data, have completed. So, for instance, it is possible to perform post-installation modifications using an install hook". "With the -local targets, there is no particular guarantee of execution order; typically, they are run early, but with parallel make, there is no way to be sure of that". Reviewed-by: Eric Anholt Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit a1d87576a30008253eb0cc92b44c9718f6665062 Author: Gaetan Nadon Date: Sat Sep 28 15:26:34 2013 -0400 Use $(LN_S) provided by AC_PROG_LN_S macro to create links For better code portability. Reviewed-By: Matt Dew Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 28c8e1910797970dbf1d40794f1804a8fcc812bc Author: Gaetan Nadon Date: Sat Sep 28 15:26:33 2013 -0400 The Xorg binary is missing the extension $(EXEEXT) in the makefile This is not a problem on UNIX platforms, but on CYGWIN it creates a broken link to Xorg rather than a link to Xorg.exe. From the CYGWIN log on tinderbox, we can see that the executable Xorg.exe is installed correctly. We can see the command used to create the link: (cd /jhbuild/install/[...]/install/bin && rm -f X && ln -s Xorg X) Note that the "relink" makefile target correctly appends $(EXEEXT) to Xorg. Reviewed-By: Matt Dew Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit f3b529bf25db2700addbafc7aa4fc5b126ba9929 Merge: 4399bd383 abc2bfca1 Author: Keith Packard Date: Fri Oct 4 14:04:48 2013 -0700 Merge remote-tracking branch 'anholt/ephyr-fixes' commit 4399bd38326b81f7b92365346504d7c6354772a9 Author: Gaetan Nadon Date: Mon Sep 30 13:30:46 2013 -0400 miext/shadow: missing c2p_core.h breaks "make distcheck" target. Reviewed-by: Julien Cristau Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 9ccb4a63982942fdce19609d2cadbd8e51708462 Merge: 5d2ec6933 da5e20127 Author: Keith Packard Date: Fri Oct 4 13:54:55 2013 -0700 Merge remote-tracking branch 'whot/for-keith' commit 5d2ec6933f6bb5116666ca1bfb07f0f20bf2a0b5 Merge: 7d3d4ae55 6ee4d9f94 Author: Keith Packard Date: Fri Oct 4 13:50:04 2013 -0700 Merge remote-tracking branch 'ajax/xserver-next' commit da5e20127a5b6e11a47eb6e61f3ea87b056cdf5f Author: Gaetan Nadon Date: Thu Sep 19 19:13:35 2013 -0400 test: add new os executable to .gitignore Signed-off-by: Gaetan Nadon Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c73c36b537f996574628e69681833ea37dec2b6e Author: Laércio de Sousa Date: Wed Sep 18 13:42:17 2013 -0300 xserver: enable InputClass option "GrabDevice" by default for non-seat0 seats (#69478) This patch contributes to fill the remaining gaps which make systemd-multi-seat-x wrapper still necessary in some multiseat setups. This also replaces previous evdev patch that does the same thing for that particular driver. When option "-seat" is passed with an argument different from "seat0", option "GrabDevice" for input devices is enabled by default (no need of enabling it in xorg.conf's "InputClass" section). Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69478 Signed-off-by: Laércio de Sousa Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 160c2db32d0b9ee5316a44179a6af4f4722e3d0a Author: Peter Hutterer Date: Wed Sep 18 16:04:44 2013 +1000 dmx: provide enough space for axis mappings relmap/absmap is used as a evdev-axis-to-x-axis mapping. ABS_X maps to axis 0, ABS_Y to 1, etc. skipping over non-existing axes so that the third bit set in the ABS_* range is axis 2, and so on. This requires us to actually have enough space to have all the ABS_*/REL_* range. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 7d3d4ae55dd6ee338439e2424ac423b1df80501b Author: Keith Packard Date: Fri Sep 20 14:43:41 2013 -0500 damage: Must translate initial window damage by window offset Damage is reported relative to the drawable origin, but the window borderClip is absolute. Translate the region by the window position before reporting damage to adjust. Reported-by: Adam Jackson Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 8010d3a48bd0b224dcb0883e39c2351ad364d846 Author: Jeremy Huddleston Sequoia Date: Sun Sep 15 08:10:33 2013 -0700 XQuartz: pbproxy: Fix build with -DDEBUG Signed-off-by: Jeremy Huddleston Sequoia commit 39c548da0cf0522ad246630605b96751ab6d39c0 Author: Jeremy Huddleston Sequoia Date: Sun Sep 15 08:07:44 2013 -0700 XQuartz: Fix build with moved pseudoramiX Regression from: e716baedc4d8e52a60f43ef21aba771b340d8c8b Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Jon TURNEY commit 6ee4d9f94ae2cc27c39381d7554134d9b4807a65 Author: Adam Jackson Date: Tue Jul 9 11:19:11 2013 -0400 glx: Fill in some missing attributes from DoGetFBConfigs Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit b257fabff00ae925bb7e70364dd1d738634087c9 Author: Adam Jackson Date: Thu Jul 4 10:31:40 2013 -0400 glx: Remove a dead comment Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit abd086502123086ce3d1fba25c159bb022d2750f Author: Adam Jackson Date: Mon Jul 8 17:01:13 2013 -0400 glx: Catch another failure case in drawable creation Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c3c976f54c3c282d6fa6c8360688e036bc43d210 Author: Adam Jackson Date: Mon Jul 8 12:28:56 2013 -0400 glx: Remove screen number from __GLXconfig Not used. There's no real reason to match against this instead of matching against fbconfig or visual ID anyway. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 1d1484e9bd55d1fa8316b1574754f28d5d31a076 Author: Adam Jackson Date: Mon Jul 8 12:09:13 2013 -0400 glx: Remove pixmapMode from __GLXconfig This has never been filled in with anything meaningful afaict, and you can't get to it from the client in any event. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 34e6e60105796ad015469c10921c5ff09acf7eb0 Author: Adam Jackson Date: Tue Jul 2 12:33:36 2013 -0400 glx: Remove support for NV_vertex_program and NV_fragment_program Mesa doesn't implement these anymore, never really did outside of swrast anyway. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit acf14c1de766c4ea206cd7ce7f25b780a589d33c Author: Adam Jackson Date: Tue Jul 2 10:35:19 2013 -0400 glx: realloc style fix in RenderLarge Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 9ebf739a6864c9ec38bf72f63ef2e3b9cd1951db Author: Adam Jackson Date: Tue Jul 2 10:30:40 2013 -0400 glx: Eliminate a small malloc from QueryContext No reason to have that be a failure path. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit b99f7975407f111b99d772cd28224d7dc1b34fe4 Author: Adam Jackson Date: Fri Nov 9 18:05:27 2012 -0500 glx: Handle failure to create the pixmap backing the pbuffer We happen not to sanitize the width/height we pass to CreatePixmap here, oops. It's not exploitable, but it's certainly a crash, so let's just throw BadAlloc instead. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 22fbfdcb31f335c22053a0e29f0e73c03cd70a76 Author: Adam Jackson Date: Fri Nov 9 17:52:12 2012 -0500 glx: Implement GLX_PRESERVED_CONTENTS drawable attribute We back pixmaps with pbuffers so they're never actually clobbered. Say so when asked. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 2e20b8382cdf37ae5a2802f85b8f06a370f9645d Author: Adam Jackson Date: Fri Nov 9 17:12:49 2012 -0500 glx: Implement GLX_FBCONFIG_ID in GetDrawableAttributes Required by GLX 1.4, section 3.3.6, "Querying Attributes". Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 0d76191baeee005982754ac18ca995742e32d8c1 Author: Adam Jackson Date: Fri Nov 9 17:10:57 2012 -0500 glx: Implement GLX_{WIDTH,HEIGHT} in GetDrawableAttributes Required by GLX 1.4, section 3.3.6, "Querying Attributes". Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d11f13e383dda1e9cabe32793d261d46edc44418 Author: Adam Jackson Date: Fri Nov 9 17:07:20 2012 -0500 glx: Compute number of attributes in GetDrawableAttributes on the fly This doesn't have any effect yet, but is needed to properly build the reply for pbuffers. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 468b57324f838144d79e3a9d85a0bde853578c4b Author: Adam Jackson Date: Fri Nov 9 16:48:16 2012 -0500 glx: Style fixes Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 2b181ad0952851f47f23dcb1a36471685313c13e Author: Adam Jackson Date: Fri Nov 9 16:33:54 2012 -0500 glx: Pull GLX vendor string out of __GLXscreen Given how we're currently implementing GLX this can't meaningfully vary per-screen. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit b9c489cf13e1ad35b7d9bea9de8d85e929374d17 Author: Adam Jackson Date: Wed Oct 31 10:05:24 2012 -0400 glx: Remove unused bits from the context struct Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit f579cc85c29f52b575c62e6ae1e16eb87c506bd3 Author: Adam Jackson Date: Thu Jul 4 10:08:40 2013 -0400 glxproxy: Don't track GLCLientm{aj,in}orVersion Basically just a port of 62f06b0d to glxproxy. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit e549ffb5f19cf044bc3e2d368a6f081f8b84bfaa Author: Adam Jackson Date: Tue Oct 30 18:20:43 2012 -0400 dmx/glx: Remove unused __glXNop Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d962b8ed272d4a8921c0dadf16cd926484e30d10 Author: Adam Jackson Date: Thu Aug 22 16:42:23 2013 -0400 damageext: Style fix Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c90add0f1ce0c85aea7a60635de765848d778266 Author: Adam Jackson Date: Wed Aug 21 11:57:24 2013 -0400 damage: Remove "post-rendering" hooks This is a revert of 974db58f5b730c3770ee461665a02dd4334d1dea. There are no consumers of this API, we must not need it. Reviewed-by: Chris Wilson Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 0f3f8e4295d4c05f33b93e0ffd2f6f8cd5759bf7 Author: Adam Jackson Date: Wed Aug 21 11:13:11 2013 -0400 damage: Don't rewrite Text ops to GlyphBlt ops There's no particularly good reason to, and it breaks Xnest. Bugzilla: http://bugs.freedesktop.org/2454 Reviewed-by: Chris Wilson Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d08966227e7d567df8d26eebc80f35f886e59a4a Author: Adam Jackson Date: Mon Aug 26 14:03:51 2013 -0400 damage: Simplify DamageUnregister You can only register one drawable on a given damage, so there's no reason to require the caller to specify the drawable, the damage is enough. The implementation would do something fairly horrible if you _did_ pass mismatched drawable and damage, so let's avoid the problem entirely. v2: Simplify xf86RotateDestroy even more [anholt] Reviewed-by: Chris Wilson Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 28708a045de7d9043d20fb06b61c44a46eb5526b Author: Adam Jackson Date: Mon Aug 26 13:52:14 2013 -0400 damage: Implicitly unregister on destroy There's no reason not to, and it simplifies quite a few callers. Reviewed-by: Chris Wilson Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit e657635dbe6b92875b0e88370557c2cbab673a49 Author: Adam Jackson Date: Thu Oct 18 14:24:23 2012 -0400 fb: Remove unused compatibility wrappers Originally added in early 2009, not being used elsewhere anymore. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit e4b15125bb06c97f1f34f7074fcdb597e718399c Author: Adam Jackson Date: Thu Oct 18 14:24:22 2012 -0400 mipointer: Remove deprecated miPointerCurrentScreen The only remaining use was in some debugging code in DMX. Reviewed-by: Peter Hutterer Reviewed-by: Mark Kettenis Signed-off-by: Adam Jackson commit b5d66b9513a0f1e13f5c5bc9e0958f4eac9bf6c3 Author: Adam Jackson Date: Thu Oct 18 14:24:21 2012 -0400 xfree86: Remove deprecated unimplemented xf86MapReadSideEffects Reviewed-by: Peter Hutterer Reviewed-by: Mark Kettenis Signed-off-by: Adam Jackson commit abbd85742a390e18497b96902a0c0d976739e3bd Author: Adam Jackson Date: Thu Oct 18 14:24:20 2012 -0400 dix: FIXES is not optional It's already not optional at configure time, this just makes it so at build time too. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit dff81687f5eac3eac9b49f58d4654cc30add2547 Author: Adam Jackson Date: Thu Oct 18 14:24:19 2012 -0400 vbe: Don't try to load the ddc submodule DDC is built into the server now. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit bb82191bcfa8042f8d98ec8b1c6616dc31d2c5c8 Author: Adam Jackson Date: Thu Oct 18 14:24:18 2012 -0400 misprite: Delete some dead private storage Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 3639ab4ce25dc82a3f8592b7322198f1d2aca5f9 Author: Adam Jackson Date: Tue Oct 16 14:56:25 2012 -0400 dri2: Don't bother with xf86LoaderCheckSymbol("DRI2Connect") The DRI2 code is now built-in to the server, even for Xorg. The only thing this could protect against is trying to run a libglx built with DRI2 support against an Xorg built without it, which is firmly in "doctor it hurts when I do this" territory. Reviewed-by: Peter Hutterer Reviewed-by: Ian Romanick Signed-off-by: Adam Jackson commit 13b507409f9e01adebba50e7eb801b52e52692ba Author: Adam Jackson Date: Tue Oct 16 14:56:23 2012 -0400 list: Avoid using X types In particular, Bool. This is not an ABI break: /usr/include/X11/Xdefs.h:typedef int Bool; Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit dbe10ef0e35659ee0e5db73f29670a3894a3e3f5 Author: Adam Jackson Date: Tue Oct 16 14:56:22 2012 -0400 dbe: Fold the window private private into the window private Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 1489637d567b0034a916f88079b5f360e7fce99c Author: Adam Jackson Date: Tue Oct 16 14:56:21 2012 -0400 dbe: Fold midbe reset into dix Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 44d770750069486a8452fb2384f9b85745268e61 Author: Adam Jackson Date: Tue Oct 16 14:56:20 2012 -0400 dbe: Drop the unused idiom support Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 8cce0cf4d378f6fa52bc2cd277737b8986ab683c Author: Adam Jackson Date: Tue Oct 16 14:56:19 2012 -0400 damage: Remove the 'damage window' resource type. Note that the existing code never actually creates a resource of this type, so it can't possibly do anything. This is clearly meant to track window destruction and clean up any associated Damages, but that's already handled by miext/damage's DestroyWindow wrapper. Previous discussion: http://lists.freedesktop.org/archives/xorg-devel/2011-March/020847.html Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit e674815e0a217ac01ec2d6a8517f8466b27fb39f Author: Adam Jackson Date: Tue Oct 16 14:56:18 2012 -0400 dmx: Remove ShadowFB support This has been listed as deprecated ever since DMX was merged. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 19d3a7cb5db3188210830efa746987ba50d839e9 Author: Adam Jackson Date: Tue Oct 16 14:56:17 2012 -0400 dix: Remove a dead parameter from DoGetImage Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 4dca026880da90cff9734cf5787c5b57c02e7310 Author: Adam Jackson Date: Tue Oct 16 14:56:16 2012 -0400 mipointer: Remove EnqueueEvent from miPointerScreenFuncRec No DDX overrode this, and we never actually called through that slot anyway. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit ad076dc6e82019defa422500710b3b42c6309e39 Author: Adam Jackson Date: Tue Oct 16 14:56:15 2012 -0400 mipointer: Flatten calls to mieqSwitchScreen No DDX was overriding this. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit e2b14a1d3bb27e86ff1d7aaf59af850d06263ef5 Author: Adam Jackson Date: Tue Oct 16 14:56:14 2012 -0400 os: Factor out some common code in input buffer handling Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 65fca558848acd907483d3c85c7cd4db5560f1b4 Author: Radek Doulik Date: Tue Aug 13 08:45:47 2013 +0200 xnest: Ignore GetImage() error in xnestGetImage() When an Xnest instance is not viewable it will crash when a client in that instance calls GetImage. This is because the Xnest server will itself receives a BadMatch error. This patch ignores the error. The application which has requested the image will receive garbage - this however is fully legal according to the specs as obscured areas will always contain garbage if there isn't some sort of backing store as discussed in https://bugs.freedesktop.org/show_bug.cgi?id=9488 The applied patch is a version from Dadek Doulik. v2: Call XSync() before changing error handlers as suggested by Daniel Stone . Reviewed-by: Daniel Stone Signed-off-by: Egbert Eich commit b902c8abb6d03e68c93e13881a350523b5ac900c Author: Michal Srb Date: Tue Aug 6 16:56:53 2013 +0200 Xnest: Implement xnestModifyPixmapHeader Xnest variant of ModifyPixmapHeader that creates new Pixmap in parent X server if it's size is modified from 0x0 to anything bigger. xnestCreatePixmap doesn't create pixmap in parent X server if it has dimensions 0x0. If it is later resized and accessed, Xnest will be aborted with BadDrawable error from parent X server because it will use XID 0. This happens with ScratchPixmap, for example as used from XaceCensorImage. Applications using XACE crash Xnest. Reviewed-by: Adam Jackson commit 132507eba93e4dfd466d5c30c9b818cdc6f8536e Author: Peter Harris Date: Mon Jul 15 19:44:45 2013 -0400 security: Don't count RetainPermanent clients twice If a RetainPermanent client is subsequently killed by a KillClient request, the reference count is decremented twice. This can cause the server to prematurely kill other clients using the same Authorization. Reviewed-by: Adam Jackson Signed-off-by: Peter Harris commit 20c2a3bcb11b5baf564e2c73a477ba23f5ae2b10 Author: Peter Harris Date: Mon Jul 15 19:44:29 2013 -0400 mi: Avoid stack smash when drawing dashed lines X.org Bug 54013 Reviewed-by: Adam Jackson Signed-off-by: Peter Harris commit 9bf46610a9d20962854016032de4567974e87957 Author: Chris Wilson Date: Fri Jun 21 22:58:31 2013 +0100 os: Immediately queue initial WriteToClient If we immediately put the WriteToClient() buffer into the socket's write queue, not only do we benefit from sending the response back to client earlier, but we also avoid the overhead of copying the data into our own staging buffer and causing extra work in the next select(). The write is effectively free as typically we may only send one reply per client per select() call, so the cost of the FlushClient() is the same. shmget10: 26400 -> 110000 getimage10: 25000 -> 108000 shmget500: 3160 -> 13500 getimage500: 1000 -> 1010 The knock-on effect is that on a mostly idle composited desktop, the CPU overhead is dominated by the memmove in WriteToClient, which is in turn eliminated by this patch. Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit ceffb34774d44ada83cc1994d20c8d65b46bd555 Author: Laurent Carlier Date: Sat Jun 8 00:43:56 2013 +0200 ephyr: restore GLX support It was removed since version 1.13 Signed-off-by: Sebastien Bacher Acked-by: Daniel Stone commit f37972f4a67b49ba9649310a6778bd1bf31e0130 Author: Keith Packard Date: Wed Apr 24 14:58:27 2013 -0700 miext/sync: Fix multi-screen support in SyncFence initialization miSyncSetup was checking to see if the screen private key had been registered, and if so, skipping the setup of the provided screen. Instead, it should register the private index only once, but then initialize the screen unless it has already been initialized. This latter step allows drivers to initialize the sync private structures before the Sync extension itself is initialized. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 1c8beedfe4343377fa3504f8ab71430cc137b22c Author: Adam Jackson Date: Wed Aug 21 14:12:52 2013 -0400 randr: Fix a copypasta bug in CRTC confinement Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 47ff382d1fce25a8b097d45b79489e891f1f1228 Merge: 6f89ae3e6 3752a8158 Author: Keith Packard Date: Mon Sep 9 15:13:42 2013 -0700 Merge remote-tracking branch 'jturney/master' commit 6f89ae3e64c4dfeea508813e546c10ba1da3ea8e Author: Thomas Klausner Date: Wed Sep 4 20:06:07 2013 +0200 Fix typo in configure warning. Signed-off-by: Thomas Klausner Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 47218a6e09549781fd61dbf5e0d3d5c81da64323 Author: Thomas Klausner Date: Wed Sep 4 20:05:51 2013 +0200 Fix bug in cursor handling. CreateCursor (Xlib call XCreatePixmapCursor) with a non-bitmap source pixmap and a None mask is supposed to error out with BadMatch, but didn't. From der Mouse , changed following comments by Alan Coopersmith . Signed-off-by: Thomas Klausner Reviewed-by: Jasper St. Pierre Signed-off-by: Peter Hutterer commit 1110b71e360195aab040d835b54540ab558638c5 Author: Chris Clayton Date: Wed Sep 4 15:42:04 2013 +1000 kdrive: fix build error on gcc 4.8 for out-of-bounds array access I'm getting a error building xorg-server-1.14.1.902 with thelatest snapshot of gcc-4.8: input.c:225:43: error: array subscript is above array bounds [-Werror=array-bounds] This is because kdNumInputFds can become equal to KD_MAX_INPUT_FDS in KdRegisterFd(). This means that in KdUnregisterFd(), kdInputFds[j + 1] can be beyond the end of the array. Signed-off-by: Chris Clayton Reviewed-by: Keith Packard Signed-off-by: Peter Hutterer commit abc2bfca16adcd1e5657d4ce54f4e1335d5ed53f Author: Sebastien Bacher Date: Fri Aug 23 21:21:44 2013 +0200 kdrive: initialize GLX for xephyr Like commit ac1a60e7b6f06fd075cc5bf55d6bc67206a01d29, re-add initialization of GLX after it was accidentally dropped from non-Xorg servers in 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86. Signed-off-by: Sebastien Bacher Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62346 Reviewed-by: Eric Anholt Reviewed-by: Adam Jackson Reviewed-by: Julien Cristau Signed-off-by: Eric Anholt commit aa5534ec6931ffcc81cca76b98785d57de8e0e52 Author: Eric Anholt Date: Fri Aug 23 11:23:00 2013 -0700 ephyr: Do grab/ungrab for ctrl+shift, not just shift+ctrl. Given that the window title says "ctrl+shift", having pressing those keys in that order not ungrab you is fairly mean. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Reviewed-by: Julien Cristau commit 5cc15e1c427bacd73db7381df3474a23f7616624 Author: Eric Anholt Date: Fri Aug 23 11:19:17 2013 -0700 ephyr: Flush the X connection when updating the window title. Otherwise when you're doing the ctrl-shift mouse grab thing, you don't know what state you're in until the next rendering occurs. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Reviewed-by: Julien Cristau commit ba387cf21f7d95987211f75d8024601e7d64e322 Author: Eric Anholt Date: Fri Aug 23 11:17:14 2013 -0700 ephyr: Use host (HW) cursors by default. Unless you're working on the sw cursor rendering code, you surely want to have real hardware cursors. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Reviewed-by: Julien Cristau commit 0f5a2f13dc284dd5f0f28e2c4323b2e08d253a7d Author: Eric Anholt Date: Fri Aug 23 11:04:22 2013 -0700 ephyr: Garbage collect some DOA host window clipping code. Introduced in 79782726617d4b5a4f9b376f21936d035fc870e1 but never used. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 090de17d361dc9828203a2562565d6499998db46 Author: Eric Anholt Date: Fri Aug 23 10:56:22 2013 -0700 ephyr: Garbage collect some dead XV clipping code. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 347d0fa6961c2b3dc4efd4e7cca8ef98cd3ea06e Author: Eric Anholt Date: Fri Aug 23 10:44:23 2013 -0700 ephyr: Remove the helper libs for each of the optional components. Note that EXTRA_DIST was always unnecessary, because automake notices conditional compile of source files and includes them. Copyright header is added because git noted that this was a 61% rewrite. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 74dff87790dbb3dcb23634f1e8cd54018e5ddc9d Author: Eric Anholt Date: Fri Aug 23 10:40:52 2013 -0700 ephyr: Remove the remaining bits of host/server XV split. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 2f994dfe9d1add9ea8cb9c88ddb0d15843854788 Author: Eric Anholt Date: Fri Aug 23 10:14:36 2013 -0700 ephyr: Remove the host/server split of the actual XV video operations. I suspect there's more cleanup possible in ephyrHostXVPutImage() by sticking a bunch of the args in the port priv earlier. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 0b7ce74315213ccd31802847e5a83e67090ded14 Author: Eric Anholt Date: Fri Aug 23 10:01:23 2013 -0700 ephyr: Remove another host/server split for XV image formats. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 1dcc28bcb402d7286d18b41b469062a5c176d7eb Author: Eric Anholt Date: Thu Aug 22 17:00:41 2013 -0700 ephyr: Remove the host/server split for video encodings. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 28a37757e11068b4594f4128a0d64c6bc9a53ee0 Author: Eric Anholt Date: Thu Aug 22 17:26:21 2013 -0700 ephyr: Remove the host/server split for XV formats. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 41134d393a37dd5b971b018a3888fbfea0b9c736 Author: Eric Anholt Date: Thu Aug 22 17:21:37 2013 -0700 ephyr: Remove the host/server split for XV attributes. v2: Fix leaks of xcb replies (caught by Julien) Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 1342a93c49beb6e4924534304119d57fa587ad0f Author: Eric Anholt Date: Thu Aug 22 17:26:08 2013 -0700 ephyr: Remove the host/server split for XV adaptors. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit fad79d2e3e53de4f25b3d1dd7accb558464a4a46 Author: Eric Anholt Date: Sun Aug 18 20:08:32 2013 +0200 ephyr: Refactor XV adaptor feature detection. This obviously wanted a helper function beforehand, but even more so now that we have XCB. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 7a9c311add62026972419ef0b04a55680072bfeb Author: Eric Anholt Date: Sun Aug 18 20:02:53 2013 +0200 ephyr: Remove some pointless indirection in the XV code. Now that we have XCB on the server side, we don't need to split these functions out. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 46cf6bf5692ef751ec9d17ae2292565d4b13f14b Author: Eric Anholt Date: Sun Aug 18 18:38:29 2013 +0200 ephyr: Move event processing into ephyr.c. No more extra event structure to translate between hostx.c and ephyr.c! Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 847c856effde482c13cdefcdca8176cee3bf67c4 Author: Eric Anholt Date: Sun Aug 18 17:28:08 2013 +0200 ephyr: Move the host screen info into the kdrive screen private. We can include xcb bits from the same place as server headers, so there's no need to hide them any more. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 8dadc78e233f341f1ecb8d404de03d98ab210620 Author: Eric Anholt Date: Sun Aug 18 16:45:06 2013 +0200 ephyr: Rename and use the proper type for what was host_screen->info. Now that we can include server headers in talking to host X, we don't need to hide any more. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 18d836f6dde46bcac8b794d34f76032688c28851 Author: Eric Anholt Date: Sun Aug 18 14:12:45 2013 +0200 ephyr: Expose a single function for detecting extensions. v2: Fix trying to include xcb-dri in the non-dri-build case (Noted by Julien) Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 3aacb22d6473480c31fb08f0b2527747dbf5be57 Author: Eric Anholt Date: Sun Aug 18 14:01:53 2013 +0200 ephyr: Drop dead ephyrHostAtomToLocal code. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 4aaad0bfbcef018eb36839b1d034c3f60022694a Author: Julien Cristau Date: Wed Oct 20 20:10:43 2010 +0200 Xephyr: we're not using Xlib anymore, no need to undef _XSERVER64 Drop obsolete comments about interaction between Xlib code and that macro, and stop undefining it. Signed-off-by: Julien Cristau Reviewed-by: Eric Anholt commit 0fc2f9f04a44599f598380d4df992bec60c0e3a1 Author: Julien Cristau Date: Sat Sep 25 16:05:07 2010 +0200 Xephyr: handle errors in event loop Signed-off-by: Julien Cristau Reviewed-by: Eric Anholt Reviewed-by: Mikhail Gusarov commit 3309a73c826f02c4b2e14180a3254546314ec323 Author: Julien Cristau Date: Fri Jun 25 14:20:57 2010 +0100 Xephyr: drop remaining Xlib dependency Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit 7da2174cf93f59b7e0372a6dc9d37a510076e187 Author: Julien Cristau Date: Mon Jun 21 14:39:03 2010 +0100 Xephyr: move glx code to xcb v2: Rebase on master, notably adding XCB for X_GLXvop_MakeCurrentReadSGI (anholt). v3: Fix use-after-free (caught by Julien). Reviewed-by: Mikhail Gusarov (v1) Signed-off-by: Julien Cristau Signed-off-by: Eric Anholt commit 19c2699b954e2978301c4449dfccc7ca40bf6ae6 Author: Julien Cristau Date: Wed Jun 23 18:36:00 2010 +0100 Xephyr: remove unused DRI1 code Reviewed-by: Mikhail Gusarov Signed-off-by: Julien Cristau commit 68b7db19e8d3c1ac55a811327d3058f4c8fb45ec Author: Julien Cristau Date: Sun Jun 20 00:07:08 2010 +0100 Xephyr: move ephyrdri over to xcb Require new xcb-xf86dri to get fixed GetDrawableInfo. Reviewed-by: Mikhail Gusarov Signed-off-by: Julien Cristau commit aea119cd05807ed77336f96a40f8e4607c6ce169 Author: Julien Cristau Date: Sun Jun 20 11:13:26 2010 +0100 Xephyr: use xcb-xv instead of libXv v2: Massive, conflict-filled rebase. I think I resolved everything right, but this host xv code makes my eyes bleed. Touch-tested XV after the rebase (anholt). Reviewed-by: Mikhail Gusarov (v1) Signed-off-by: Julien Cristau Signed-off-by: Eric Anholt commit 3ea75a59d5fec3c4099388724942e216f2344328 Author: Julien Cristau Date: Mon Jun 21 17:20:32 2010 +0100 Xephyr: use xcb for event handling v2: Rebase on indentation changes, squash in a simpler variant of the later event compression patch, fix server hang or segfault on window close by reimplementing the x_io_error_handler in the new XCB event loop (anholt). Reviewed-by: Mikhail Gusarov (v1) Signed-off-by: Julien Cristau Signed-off-by: Eric Anholt commit ff26845252889f7cc3258a0d3aa116189acc6aae Author: Julien Cristau Date: Thu Jun 24 23:45:16 2010 +0100 Xephyr: some more hostx.c xcb-ification Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit 9b55f76a265aab0d9943a40208a38800e5782ba5 Author: Julien Cristau Date: Thu Jun 24 23:35:15 2010 +0100 Xephyr: move HostX.visual to xcb Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit 126312fb4a6e06024a306341e675163108426390 Author: Julien Cristau Date: Thu Jun 24 23:26:48 2010 +0100 Xephyr: replace XKeycodeToKeysym with xcb-keysyms Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit 8543d3fdfd47d2a0423f3ef8e7429c23c5d6b053 Author: Julien Cristau Date: Thu Jun 24 23:17:32 2010 +0100 Xephyr: delete unused hostx_get_extension_info function v2: Also remove the prototype (anholt) Reviewed-by: Mikhail Gusarov (v1) Signed-off-by: Julien Cristau Signed-off-by: Eric Anholt commit d72c11b9df4a98fd80cb6635d34964483e33bc41 Author: Julien Cristau Date: Mon Jun 21 14:25:11 2010 +0100 Xephyr: delete unused proxy code Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit a71ea3f96769da157dde82a591e43264820772ac Author: Julien Cristau Date: Sun Jun 20 23:34:54 2010 +0100 Xephyr: xcb-ify visual list construction Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit ac2b0348c00d692ec1bd8d6c8ab99e9198e755a7 Author: Julien Cristau Date: Sun Jun 20 23:34:39 2010 +0100 Xephyr: xcb-ify pointer/keyboard grab Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit 1f93e6b350d1b9a058009052a666a2e8796708cb Author: Julien Cristau Date: Sun Jun 20 23:34:03 2010 +0100 Xephyr: no need for XDisplayKeycodes Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit 73398e5bf61c30e69a40a19a1057c2263fbb91ef Author: Julien Cristau Date: Thu Jun 24 23:00:38 2010 +0100 Xephyr: use xcb-shape instead of XShape* Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit a2b73da78de4e627965213d24a6c33f243a60eb6 Author: Julien Cristau Date: Sun Jun 20 00:05:40 2010 +0100 Xephyr: start converting hostx.c over to xcb v2: Dropped the hostx_load_keymap changes, now that that function is gutted (anholt). Reviewed-by: Mikhail Gusarov (v1) Signed-off-by: Julien Cristau Signed-off-by: Eric Anholt commit 762606b4cdfb57c5202ae128ce4dbb8afe172d4e Author: Julien Cristau Date: Fri Jun 25 17:59:13 2010 +0100 Xephyr: stop loading the host's keymap This isn't used anywhere. v2: Rebase to the top of the patch series (anholt) Reviewed-by: Mikhail Gusarov (v1) Signed-off-by: Julien Cristau Signed-off-by: Eric Anholt commit 3752a815800626ae93f64a856f5889aa6636344e Author: Marc Haesen Date: Sat Aug 10 17:38:38 2013 +0100 hw/xwin: Remove unnecessary and incorrect HWND casts Signed-off-by: Marc Haesen Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 34932cef6cc800fbdf2f375506057ed8cd1e07f6 Author: Jon TURNEY Date: Mon Apr 1 13:43:00 2013 +0100 hw/xwin: Fix compilation of winauth.c with -Werror=implicit-function-declaration /jhbuild/checkout/xorg/xserver/hw/xwin/winauth.c: In function ‘MitGenerateCookie’: /jhbuild/checkout/xorg/xserver/hw/xwin/winauth.c:87:5: error: implicit declaration of function ‘MitAddCookie’ [-Werror=implicit-function-declaration] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 2a08554a0bf80b862c15676c31ecd463b616518c Author: Jon TURNEY Date: Mon Jun 17 23:54:01 2013 +0100 hw/xwin: Remove unused extern g_fUseUnicode from winclipboardwndproc.c Signed-off-by: Jon TURNEY Reviewed-by: Marc Haesen commit 69401f38a697c941ea58351028f4cd4b810f9188 Author: Jon TURNEY Date: Mon Jun 17 18:37:26 2013 +0100 hw/xwin: Remove unneeded forward declaration of winProcessXEventsTimeout() Remove unneeded forward declaration of winProcessXEventsTimeout(), the actual definition immediately follows. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 9c45a1ad44f12ac25e1c3b7a18a3bceb85a2cf38 Author: Jon TURNEY Date: Mon Jun 17 16:58:47 2013 +0100 hw/xwin: Remove prototype for non-existent winDeinitClipboard() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit acc46fc217352b94f77a6b5b14808ea89875a2a1 Author: Jon TURNEY Date: Mon Jun 17 00:40:13 2013 +0100 hw/xwin: Remove unused externs from winclipboardwrappers.c Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit fcc7767f8cd6c318861b1060ef6a3936750a0dd2 Author: Jon TURNEY Date: Mon Jun 10 17:31:12 2013 +0100 hw/xwin: Remove unused winProcQueryTreeOrig variable Unused since 47c7b6d3e626497747ae2780f259a15b8e6c846f "Remove no-longer needed tricks used to prevent the clipboard client from being killed" Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 8fa882a980abea6f05b4b59447a187aea2c793a1 Author: Jon TURNEY Date: Sat Aug 10 12:41:07 2013 +0100 hw/xwin: Fix ARGB cursor conversion on x86_64 Fix erroneous use of unsigned long * for lpBits in winXCursorToHCURSOR() which leads to ARGB cursors being vertically streched on x86_64 by interleaving blank rows of pixels. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 4bfb2dce5eea4923eaf86eca33b96087b28235f5 Author: Jon TURNEY Date: Sun Apr 7 23:59:44 2013 +0100 hw/xwin: Fix an issue in winSetSpansNativeGDI() identifed by -Warray-bounds The BITMAPINFO local only has room for a single RBGQUAD in bmiColors, but we access two (black and white for a mono-color DIB). Fix by changing to a dynamic allocation big enough for a BITMAPINFO and a RGBQUAD. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 784c006adb22c6693ad30dd0b1b05369cfaa7b5e Author: Jon TURNEY Date: Sat Aug 10 11:55:23 2013 +0100 hw/xwin: Fix -Warray-bounds warning in winXCursorToHCURSOR() Rewrite winXCursorToHCURSOR() so access to BITMAPINFO bmiColors member doesn't trigger an -Warray-bounds warning. Note that the underlying storage is allocated as a BITMAPV4HEADER, so has sufficent room for the extra RGBQUADs bmiColors after the BITMAPINFO bmiHeader. wincursor.c: In function 'winSetCursor': wincursor.c:293:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:294:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:295:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:296:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:297:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:298:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:299:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:300:24: error: array subscript is above array bounds [-Werror=array-bounds] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 41d03c9ccce665b919b180bbb819b78c750aa325 Author: Marc Haesen Date: Fri Aug 2 18:19:22 2013 +0100 hw/xwin: Correct size of _WINDOWSWM_NATIVE_HWND property on x86_64 Use the correct size of a HWND on x86_64 in XChangeProperty() and XGetWindowProperty() calls for the _WINDOWSWM_NATIVE_HWND property. Signed-off-by: Marc Haesen Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 390cfec10ef7d52391f890c7593ac82a7d77d856 Author: Colin Harrison Date: Fri Aug 9 16:48:12 2013 +0100 hw/xwin: Correct winprefs.c function signatures for x64. Correct SetupRootMenu(), SetupSysMenu(), HandleCustomWM_INITMENU() and HandleCustomWM_COMMAND() function signatures which use unsigned long parameters, where just a specific HWND or HMENU handle type should have been used. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY Reviewed-by: Marc Haesen commit e716baedc4d8e52a60f43ef21aba771b340d8c8b Author: Jon TURNEY Date: Sat Mar 31 14:42:45 2012 +0100 Move pseudoramiX code where it can be shared between Xwin and Xquartz Move pseudoramiX code to a separate top-level directory. Link Xwin and Xquartz with libPseudoramiX I'm not sure moving this to a top-level directory is appropriate, but I'm not sure where else it fits. Future work: pseudoramiX can probably be consolidated with the rrxinerama code (which I think provides fake xinerama data when real XINERAMA is disabled and we only have one screen) v2: fix distcheck Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit ce0217b98261dcf8b20cfb743831965dda1950ec Author: Jon TURNEY Date: Sat Aug 10 12:35:55 2013 +0100 hw/xwin: Fix winglobals.h for MinGW64 build Include pthread.h in winglobals.h to fix build with latest MinGW64 headers In file included from winmultiwindowicons.c:47:0: winglobals.h:92:1: error: unknown type name ‘pthread_mutex_t’ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit b27756dbe6a1be4633ec47a8fe92a4c217f68f93 Author: Jon TURNEY Date: Sun Aug 11 12:15:11 2013 +0100 hw/xwin: Fix inclusion of shlobj.h in MinGW64 build Fix build with latest MinGW64 headers by wrapping Status type in shlobj.h as well In file included from InitOutput.c:51:0: /usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:1231:44: error: expected identifier or ‘(’ before ‘int’ /usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:1248:44: error: expected identifier or ‘(’ before ‘int’ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 94d4e29aedc69431fa9b299ca1b67947173d7a24 Author: Peter Hutterer Date: Mon Aug 26 15:51:46 2013 +1000 Xi: allow for XIAllowEvent requests larger than XI < 2.2 size (#68554) XIAllowEvents changed length in XI 2.2 (for the touchid). A bug in libXi causes libXi to always use the new request length if the server supports 2.2, regardless of the client's XIQueryVersion request. The server takes the client's XIQueryVersion request into account though, resulting in a BadLength error if a 2.[0,1] client calls XIAllowEvents on a XI 2.2+ server. Can't fix this in libXi, so work around this in the server. X.Org Bug 68554 Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson commit 82939e02392cbb880313fe92957091ff89ce2f2b Author: Peter Hutterer Date: Fri Aug 16 15:30:59 2013 +1000 dix: check for grab type before checking XI2 mask if the grab type isn't XI2, grab->xi2mask is random. That random data may have the enter/leave mask set, leading to events sent to the client that the client can't handler. Source of these errors: _xgeWireToEvent: Unknown extension 131, this should never happen. Simplest reproducer: Start Xephyr, press button inside window, move out. As the pointer leaves the Xephyr window, the errors appear. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson commit 16894df1ffb6fe21bf723dd954578e8d934799ca Author: Peter Hutterer Date: Fri Aug 16 10:55:09 2013 +1000 Xi: replace loop with memset Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson commit 8f2292b683f591052da2fe94fb3831a3c9a5aa61 Author: Peter Hutterer Date: Fri Aug 16 11:05:49 2013 +1000 include: wrap EMASKSIZE in parentheses Otherwise things like EMASKSIZE * foo will yield interesting results. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson commit d803f296c616ccf55711cf0af9e7d3eae2edda16 Author: Peter Hutterer Date: Fri Aug 23 09:04:01 2013 +1000 test: fix the gcc diagnostics pragma pop without push restores the commandline options. The proper way is to push, then ignore, then pop. And while we're at it, change the pop argument to a comment - pop ignores the argument, but be proper about it. Signed-off-by: Peter Hutterer commit 05ea6307fa4f0bee3d3bf536396059f3906791a0 Author: Egbert Eich Date: Fri Aug 16 19:52:16 2013 +0200 DIX/Xi: Pass correct client to CheckDeviceGrabAndHintWindow() If we have a client which has registered for a DeviceButton grab be sure to pass this to CheckDeviceGrabAndHintWindow(). Since the order of clients is arbitrary there is no guarantee that the last client in the list is the one that belongs to this class. Signed-off-by: Egbert Eich Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit e01a3f65d3e6d92f92ef2992b338cc9625bde082 Author: Eric Anholt Date: Sat Aug 17 14:50:37 2013 +0200 ephyr: Fix warning about XID vs unsigned long * by changing function args There's no reason to pass the data back out to the caller, since the caller was dropping it on the floor. The original data is a CARD32, so no need to mess with weird unsigned longs. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit f1cefe020bd21c07dfcc9f204e79939499abbd35 Author: Eric Anholt Date: Sat Aug 17 14:38:08 2013 +0200 ephyr: Drop is_ok logging. The only cases that lead to !is_ok are already EPHYR_LOG_ERROR, and it fixes set-but-unused compiler warnings. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 77c7a2014e3942b55c0b78308edf02eab33f2e60 Author: Eric Anholt Date: Sat Aug 17 14:36:09 2013 +0200 kdrive: Fix const cast warnings in arguments processing. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 7107937e473a3557c37d719cb100b2e9b09075dd Author: Eric Anholt Date: Sat Aug 17 13:11:17 2013 +0200 kdrive: Fix const cast warnings in driver name handling. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 56c405d46a86853771a0b808da4c8a9ef626960c Author: Eric Anholt Date: Sat Aug 17 13:07:23 2013 +0200 kdrive: Fix a few easy cast warnings. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit a9c48a07eea50468fa47ab178cdd91edb0b5727f Author: Eric Anholt Date: Sat Aug 17 13:06:23 2013 +0200 kdrive: Drop dead code. This is unused as of the introduction of a helper in e7150db5350bc2113ff4126019b489847a4dc217 Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 873ae962bdb7559c952b5955ba262285701982a8 Author: Eric Anholt Date: Sat Aug 17 13:01:57 2013 +0200 ephyr: Fix dead code warning. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 34af2eebe19e2f8afe35a5614d4d44fa4fd89d6b Author: Eric Anholt Date: Sat Aug 17 13:01:32 2013 +0200 ephyr: Fix const-cast warnings for setting window title. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 7edf5066db48434739ac64e0576fbb4fdf0f37f9 Author: Eric Anholt Date: Sat Aug 17 12:54:33 2013 +0200 ephyr: Fix const cast warnings in ephyrhostvideo. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit fe7463b8ce0de301c2f82b108c93963424f77219 Author: Julien Cristau Date: Sat Jul 27 12:09:07 2013 +0200 dix: add missing include for DeleteWindowFromAnySelections Fixes build error with XACE disabled: window.c:886:5: error: implicit declaration of function 'DeleteWindowFromAnySelections' [-Werror=implicit-function-declaration] DeleteWindowFromAnySelections(pWin); ^ Debian bug#701372 Reported-by: Matthias Klose Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 6a49f8836a649322d38a364d9ae084be40fb2305 Author: Keith Packard Date: Sat Aug 17 12:17:36 2013 +0200 Add .dir-locals.el Enforce X.org style with an emacs configuration file Signed-off-by: Keith Packard commit f67d022523c59a27f3bf8791aa9ca6624318b1fd Merge: 5a36cdd91 9680f6a12 Author: Keith Packard Date: Tue Aug 6 07:12:12 2013 +0200 Merge commit '9680f6a12d642c2e4bfa09bf459d678214059d74' commit 5a36cdd91530d27627e39159a89b53f9fbb75280 Author: Alan Coopersmith Date: Mon Aug 5 20:46:45 2013 -0700 Allow disabling XFree86-DGA, DRI, VidModeExtension extensions Code to recognize these in extension enable/disable options was wrapped in #ifdef XorgLoader, but that's not defined when building miinitext.c since the great module merge of 1.13. Change to an #ifdef that is defined. Signed-off-by: Alan Coopersmith Reviewed-by: Robert Hooker Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 9680f6a12d642c2e4bfa09bf459d678214059d74 Author: Peter Hutterer Date: Tue Aug 6 13:14:56 2013 +1000 xfree86: de-duplicate some AM_CPPFLAGS Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit bbef8e46f2fed8f823ee4b97e96c3fcee28f3b75 Author: Peter Hutterer Date: Tue Aug 6 13:08:13 2013 +1000 Replace INCLUDES with AM_CPPFLAGS newer automake gets quite noisy about this. hw/xfree86/ddc/Makefile.am:7: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') and many more of these. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit c218ba8423a73a7a643cb17789db8a1dd0901ca6 Author: Julien Cristau Date: Fri Aug 2 20:07:36 2013 +0200 xfree86: improve check for posix saved ids Replace hardcoded SVR4 || linux || CSRG_BASED with an autoconf check and the _POSIX_SAVED_IDS macro. Suggested-by: Mark Kettenis Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis . Signed-off-by: Peter Hutterer commit 930c6ff15d437dfb0f897e8cb4253abba70819cc Author: Julien Cristau Date: Fri Aug 2 23:46:00 2013 +0200 test: include dix-config.h in hashtabletest.c Missing _XSERVER64 define caused inconsistent sizeof(XID) between the test and hashtable code, leading to test failures on 64bit big endian archs like s390x or ppc64. Signed-off-by: Julien Cristau Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit b6e5c4669e0db391966deb397e8c975ec7f0124d Author: Maarten Lankhorst Date: Tue Jul 30 15:31:24 2013 +0200 test/xi2: fix protocol-xiqueryversion test The old code was broken and allowed setting client version >= XIVersion, this was fixed in the previous patch, but updating the value for XIVersion broke the tests, so fix the tests too. Signed-off-by: Maarten Lankhorst Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 500e844a24962c9e70abb3d614f1973013b2de73 Author: Maarten Lankhorst Date: Tue Jul 30 14:45:21 2013 +0200 Xi: Clamp XIClient maximal version to XIVersion Do not allow setting client version to an arbitrary value >= XIVersion. Fixes a test error with test/xi2/protocol-xiqueryversion.c, introduced by commit 4360514d1c "Xi: Allow clients to ask for 2.3 and then 2.2 without failing" Signed-off-by: Maarten Lankhorst Reviewed-by: Keith Packard Signed-off-by: Peter Hutterer commit e1ab8f239bdc6af17ef6cd0e9c6187c4e2e2f5bc Author: Dave Airlie Date: Wed Jul 31 11:35:44 2013 +1000 xfree86/man: document AutoAddGPU This at least mentions AutoAddGPU and hints at when you might want to disable it. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher Signed-off-by: Peter Hutterer commit 836daf4c7a276108a9f950e524828744aeda0a3c Author: Dave Airlie Date: Wed Jul 31 11:24:48 2013 +1000 modesetting: change output names for secondary GPUs if we are a secondary GPU modify the output name to avoid clashes. Signed-off-by: Dave Airlie commit ff38bbe81ace85bf675bbaa0a9ca5f3b32ede449 Merge: bdd1e22cb 4360514d1 Author: Keith Packard Date: Thu Jul 25 22:50:27 2013 -0700 Merge remote-tracking branch 'whot/for-keith' commit 4360514d1cc8e3132f93f56172d291074e8c770f Author: Keith Packard Date: Wed Jul 10 22:42:55 2013 -0700 Xi: Allow clients to ask for 2.3 and then 2.2 without failing This allows different sub-systems within the same application to request different Xi versions without either getting old behaviour everywhere or simply failing with a BadValue. Signed-off-by: Keith Packard Signed-off-by: Peter Hutterer commit bdd1e22cbde9ea2324e4e1991c9e152f22f88151 Author: Aaron Plattner Date: Tue Apr 30 14:14:23 2013 -0700 xfree86: detach scanout pixmaps when detaching output GPUs Commit 8f4640bdb9d3988148e09a08d2c7e3bab1d538d6 fixed a bit of a chicken-and-egg problem by detaching GPU screens when their providers are destroyed, which happens before CloseScreen is called. However, this created a new problem: the GPU screen tears down its RandR crtc objects during CloseScreen and if one of them is active, it tries to detach the scanout pixmap then. This crashes because RRCrtcDetachScanoutPixmap tries to get the master screen's screen pixmap, but crtc->pScreen->current_master is already NULL at that point. It doesn't make sense for an unbound GPU screen to still be scanning out its former master screen's pixmap, so detach them first when the provider is destroyed. Signed-off-by: Aaron Plattner Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 3d8756631070c440cefa31b35fea3d407f187810 Author: Peter Hutterer Date: Mon Jul 22 13:43:07 2013 +1000 dix: set the valuator mask to ensure XI 1.x events have data XI 1.x only allows for first + num valuators, so if a device sends data for valuators 0 and 2+ only (i.e. valuator 1 is missing) we still need to get the data for that from somewhere. XI 1.x uses the hack of an unset valuator mask to get the right coordinates, i.e. we set the value but don't set the mask for it so XI2 events have the right mask. For an absolute device in relative mode, this broke in b28a1af55cf, the value was now always 0. This wasn't visible on the cursor, only in an XI 1.x client. The GIMP e.g. sees jumps to x/0 every few events. Drop the condition introduced in b28a1af55cf, data in valuators is always absolute, regardless of the mode. Signed-off-by: Peter Hutterer commit 4fb686d6a6777950f0e0d55b848cd2af4cbad372 Author: Peter Hutterer Date: Wed Jul 24 11:50:00 2013 +1000 dix: check the xi2mask, not the grab type for touch listeners grab->type is only non-zero for passive grabs. We're checking an active grab here, so we need to check if the touch mask is set on the grab. Test case: grab the device, then start two simultaneous touches. The grabbing client won't see the second touchpoints because grab->type is 0 and the second touch is not an emulating pointer. Signed-off-by: Peter Hutterer commit 43ac0491e36cdbb716b5c9d39c97d0aba3bebd75 Author: Jon TURNEY Date: Mon Apr 8 01:28:36 2013 +0100 hw/xwin: Fix numerous 64-bit format/type cast issues with debug printing of pointers Numerous pieces of debug output cast a pointer to an int and then use a "%08x" printf format. Use "%p" format for 64-bit portability. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e95bb97073ca77193e4c51bd1504403fbe245533 Author: Colin Harrison Date: Tue Jun 25 21:34:43 2013 +0100 hw/xwin: Fix possible crash in winMultiWindowGetClassHint Fix a possible crash in winMultiWindowGetClassHint() when an application doesn't null terminate the WM_CLASS property class name (which is an ICCCM conformance bug in the application) (Reported for running the contiki cooja simulator in multiwindow mode, although it seems that many Java clients may have this problem, see [1]) Based on a patch by Marc Haesen. v2: Avoid using strnlen() which is missing on MinGW v3: Align with Xming patch [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6961123 Signed-off-by: Colin Harrison Reviewed-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY commit 4bc375aa2f08bd092f60d3e358d345fc9a0d3637 Author: Jon TURNEY Date: Tue Jun 18 19:21:02 2013 +0100 hw/xwin: Remove obsolete WIN_XEVENTS_SHUTDOWN Remove obsolete WIN_XEVENTS_SHUTDOWN. This event is never generated. (I think the idea was to listen for WM_DELETE_WINDOW, but that's not a very useful thing to do for a hidden window.) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 2663203cd6994166e107e796c4724a4ed3b59370 Author: Jon TURNEY Date: Tue Jun 18 18:03:05 2013 +0100 configure.ac: Check for python at configure time when building XWin with AIGLX Check for python at configure time when building XWin with AIGLX, it's used to generate the wrapper code for native GL functions. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9fe360bf2be5c959fb21835955ef550098ccbbf0 Author: Jon TURNEY Date: Sun Jun 16 00:07:57 2013 +0100 hw/xwin: Avoid a null dereference if CreateDIBSection() fails in NetWMToWinIconAlpha() Avoid a null dereference of DIB_pixels if CreateDIBSection() fails in NetWMToWinIconAlpha() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 71b5f56302bbd8be62f63f0dd62cbcd33aab3ac5 Author: Jon TURNEY Date: Thu Feb 21 17:12:17 2013 +0000 hw/xwin: Handle WM_MOUSEHWHEEL Handle WM_MOUSEHWHEEL tilt wheel messages, similarly to WM_MOUSEWHEEL scroll wheel messages, to generate X button 6 and 7 presses and releases. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit cf9c777ee094d660e0c95559373fd23ee910362e Author: Jon TURNEY Date: Thu Feb 21 17:10:45 2013 +0000 hw/xwin: Map extra mouse buttons 1 and 2 to X buttons 8 and 9 Map extra mouse buttons 1 and 2 to X buttons 8 and 9, as conventional, leaving X buttons 6 and 7 for tilt wheel. Also add button labels for buttons 6, 7, 8 and 9 and change btn_labels in from a dynamic allocation to a fixed one of the required size for all the labels we use. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c9d7b9516f4a04cb9012c6c1e9466491a468aa07 Author: Jon TURNEY Date: Tue Feb 19 14:38:40 2013 +0000 hw/xwin: Remove unneeded WM_XBUTTON message defines Remove unneeded WM_XBUTTON message defines, they have been provided by w32api for a long time now. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5dccfc63f9c7056e7cd30884e1d3ccea86a2f419 Author: Jon TURNEY Date: Mon Dec 17 22:38:00 2012 +0000 hw/xwin: Change winTranslateKey() to return it's result as it's return value Change winTranslateKey() to return it's result as it's return value, and change it's uses as well. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9b4cec76f1d7792d4bf64fa069ea6b64bc42da0d Author: Oliver Schmidt Date: Mon Nov 5 15:05:32 2012 +0000 hw/xwin: Consider left and right modifier keys independently on gaining focus Handle left and right ctrl and shift keys independently Assume that all modifiers are cleared when all keys are released on focus lost, as internalKeyState doesn't record which modifier key was pressed. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 235149d0b4af9097e47b3af0ba56d4eb0179518c Author: Jon TURNEY Date: Mon Apr 5 14:22:39 2010 +0100 hw/xwin: Remove an extra '\n' from some log messages Remove an extra '\n' from internal client IOError log messages Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c7aa9f7578e721b0c9e565e7a085b6aeb30bf2ac Author: Jon TURNEY Date: Sat Feb 4 17:04:11 2012 +0000 hw/xwin: _NET_WM_STATE is ATOM[] not ATOM _NET_WM_STATE is ATOM[] not ATOM, a list of window state hints, so check all of the atoms, not just the first one See EWMH specifcation, section "Application Window Properties" v2: Actually use [] on the returned atom data Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 682ccac90b18f293520f77db5b163fcb40328e2b Author: Jon TURNEY Date: Wed Aug 31 21:35:14 2011 +0100 hw/xwin: Improve WM_ENDSESSION handling using separate messaging window thread Currently, WM_ENDSESSION just calls GiveUp() to set the DE_TERMINATE flag. But for the X server to exit cleanly, we also need the X server dispatch loop to be unblocked so it can notice that DE_TERMINATE has been set and exit, removing it's lock file and any unix domain socket. It appears that the system will terminate the process when the last UI thread in that process returns from processing WM_ENDSESSION for the last top-level window. Since WM_ENDSESSION appears to sent by the system via SendMessage() (synchronously) and the wndproc is called to process it in the message thread for that window (the X server thread), we can't easily terminate the X server dispatch loop from inside the WM_ENDSESSION message processing. So, create a messaging window, a hidden, top-level window, with a separate thread to catch this message, and process it by calling GiveUp() and then blocking on a mutex until the X server dispatch loop exits. Also, notice when this is a shutdown cancel WM_ENDSESSION message and take no action. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 15febb05d77cc7e7185c942f35459838f75cfdc0 Author: Jon TURNEY Date: Mon Sep 3 15:19:43 2012 +0100 Allow DDX to provide a main() XQuartz already conditionally renames main() as dix_main() so it can provide it's own main(). This isn't the ideal way of doing this, as it prevents libdix built this way from being useful with any other DDX. So instead, always name that function dix_main(), and also provide a stub main() which just calls dix_main(), which can be overriden in the DDX. Add a main() to XWin (XQuartz already has one, of course). It's no longer neccessary to link XWin and XQuartz with libmain. v2: Remove unneeded stub main hw/xwin/InitOutput.c Signed-off-by: Jon TURNEY Reviewed-by: Julien Cristau Reviewed-by: Colin Harrison commit d5ebe20f9ba9569351c4a41449866679fd60ba45 Merge: 21ea7ebb6 33f7e6078 Author: Keith Packard Date: Mon Jul 22 20:34:41 2013 -0700 Merge remote-tracking branch 'alanc/master' commit 21ea7ebb6a1ad56f3060747af0df235ca6ff27fa Author: Peter Hutterer Date: Fri Jul 19 08:56:38 2013 +1000 dix: scale y back instead of x up when pre-scaling coordinates The peculiar way we handle coordinates results in relative coordinates on absolute devices being added to the last value, then that value is mapped to the screen (taking the device dimensions into account). From that mapped value we get the final coordinates, both screen and device coordinates. To avoid uneven scaling on relative coordinates, they are pre-scaled by screen ratio:resolution:device ratio factor before being mapped. This ensures that a circle drawn on the device is a circle on the screen. Previously, we used the ratio to scale x up. Synaptics already does its own scaling based on the resolution and that is done by scaling y down by the ratio. So we can remove the code from the driver and get approximately the same behaviour here. Minor ABI bump, so we can remove this from synaptics. Signed-off-by: Peter Hutterer Tested-by: Emmanuel Benisty commit 33f7e60785f12770ce10558c2ca7ce1323eefc59 Author: Thomas Klausner Date: Fri Jul 12 08:21:19 2013 +0200 Fix typo in header guard. Signed-off-by: Thomas Klausner Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit ddc52b9cbae017f04c7a232af4e8b16c9f96823d Author: Alan Coopersmith Date: Fri Jul 5 22:43:17 2013 -0700 Xephyr: Use _XEatDataWords (from Xlib 1.6) instead of _XEatData Simplifies code and reduces risk of overflow from converting length field in X replies from words to bytes. One call to _XEatData is left in ephyrHostGLXGetStringFromServer where it's already been checked for overflow, and other values have been subtracted from it to reduce the size of data remaining to be eaten. Signed-off-by: Alan Coopersmith commit a3d43edf71847f4b486f971405d2b457f81b73d1 Author: Alan Coopersmith Date: Fri Jul 5 22:35:32 2013 -0700 glxproxy: Use _XEatDataWords (from Xlib 1.6) instead of _XEatData Reduces risk of overflow from converting length field in X replies from words to bytes. (Also seems to be what several calls were already incorrectly passing to _XEatData.) Signed-off-by: Alan Coopersmith commit 87b0cabc145a9b5f6faffdfb544ce1c647b8ab72 Author: Alan Coopersmith Date: Fri Jul 5 22:32:10 2013 -0700 glxproxy: Use _XReadPad instead of _XEatData to clean up the slop Xlib already provides a function to eat padding bytes after the data read, so use it instead of calculating it ourselves. Signed-off-by: Alan Coopersmith commit 1cb182cbdc11fc1c97507c57875f1d2453f27328 Author: Alan Coopersmith Date: Mon Apr 15 08:41:14 2013 -0700 Xephyr: integer overflow in XF86DRIGetClientDriverName() clientDriverNameLength is a CARD32 and needs to be bounds checked before adding one to it to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Julien Cristau commit 20644e53b385c54d73242c86a7d3f981d18a3843 Author: Alan Coopersmith Date: Mon Apr 15 08:39:03 2013 -0700 Xephyr: integer overflow in XF86DRIOpenConnection() busIdStringLength is a CARD32 and needs to be bounds checked before adding one to it to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Julien Cristau commit c37ceda76bf9ec6f5166122e864663e10f106546 Author: Alan Coopersmith Date: Sun Apr 14 10:50:50 2013 -0700 Xephyr: integer overflow in ephyrHostGLXGetStringFromServer() reply.length & reply.size are CARD32s and need to be bounds checked before multiplying or adding to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith commit 5fbd8c45b46ab93522e417240aa770466c30b735 Author: Alan Coopersmith Date: Sun Apr 14 09:45:26 2013 -0700 Xdmx: integer overflow in GetGLXFBConfigs() numFBConfigs & numAttribs are CARD32s and need to be bounds checked before multiplying by structure sizes to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith commit c89bcd12f4fc7233830a8dbe7863c312f657da3c Author: Alan Coopersmith Date: Sun Apr 14 09:33:57 2013 -0700 Xdmx: integer overflow in GetGLXVisualConfigs() numVisuals & numProps are both CARD32 and need to be bounds checked before multiplying by structure sizes to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith commit 74469895e39fa38337f59edd64c4031ab9bb51d8 Author: Peter Hutterer Date: Mon Jul 15 13:06:28 2013 +1000 dix: allow a ConstantDeceleration between 0 and 1 (#66134) A constant deceleration of x simply means (delta * 1/x). We limited that to values >= 1.0f for obvious reasons, but can also allow values from 0-1. That means that ConstantDeceleration is actually a ConstantAcceleration, but hey, if someone needs it... X.Org Bug 66134 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 0e3be0b25fcfeff386bad132526352c2e45f1932 Author: Peter Hutterer Date: Fri Jul 12 14:10:10 2013 +1000 dix: UpdateTouchesForGrab must only free the listener grab if it is non-NULL If a client calls XIGrabDevice in response to a ButtonPress event (regular event selection), the device will have a grab, but listener->grab is NULL. Check for that, to avoid logspam. [ 26293.863] (EE) BUG: triggered 'if (!pGrab)' [ 26293.863] (EE) BUG: grabs.c:256 in FreeGrab() [ 26293.863] (EE) [ 26293.863] (EE) Backtrace: [ 26293.864] (EE) 0: /usr/bin/Xorg (FreeGrab+0x54) [0x45d3fc] [ 26293.864] (EE) 1: /usr/bin/Xorg (UpdateTouchesForGrab+0x135) [0x447d4e] [ 26293.864] (EE) 2: /usr/bin/Xorg (ActivatePointerGrab+0x1ba) [0x447f3d] [ 26293.864] (EE) 3: /usr/bin/Xorg (GrabDevice+0x3e6) [0x4503bc] [ 26293.864] (EE) 4: /usr/bin/Xorg (ProcXIGrabDevice+0x1f9) [0x5981b1] [ 26293.865] (EE) 5: /usr/bin/Xorg (ProcIDispatch+0x78) [0x58aa17] [ 26293.865] (EE) 6: /usr/bin/Xorg (Dispatch+0x30d) [0x43347e] [ 26293.865] (EE) 7: /usr/bin/Xorg (main+0x61d) [0x498175] [ 26293.865] (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x3df5621b75] [ 26293.865] (EE) 9: /usr/bin/Xorg (_start+0x29) [0x423a19] [ 26293.866] (EE) 10: ? (?+0x29) [0x29] [ 26293.866] (EE) Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 24cbb47ca80cd7a47749ece0ff3a98657ddf3ae3 Author: Peter Hutterer Date: Fri Jul 12 12:17:47 2013 +1000 config: provide example configuration for multi-seat setups Seats other than seat0 need custom configuration. Provide that with a default configuration file so we can share it across distros. This file intentionally does not end in .conf so it won't get picked up by the server after a normal installation. gdm, or whatever starts up the servers will have to explicitly specifiy this config file. This file replaces the one currently written by systemd's multi-seat-x binary: http://cgit.freedesktop.org/systemd/systemd/tree/src/login/multi-seat-x.c CC: Lennart Poettering Signed-off-by: Peter Hutterer Reviewed-by: Dan Nicholson commit 791121e00692e12cb4c38c8d018bd72eb5081eb7 Author: François Tigeot Date: Mon Jul 15 21:54:26 2013 +0200 Fix mouse header include on DragonFly and FreeBSD * __FreeBSD_kernel_version doesn't exist anymore * The removed check was for FreeBSD versions from before September 2000 which are no longer supported anyway * Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66045 Signed-off-by: François Tigeot Signed-off-by: Peter Hutterer commit 59a6d3f1eb03010ab831b32b03706a1d6143c732 Author: Jon TURNEY Date: Thu Nov 8 13:41:13 2012 +0000 os: Remove any old logfile before trying to write to it If we are not backing up logfiles, remove the old logfile before trying to write a new logfile, as otherwise the operation may fail if the previous logfile was created by a different user. This change is useful when: - The DDX doesn't use the logfile backup mechanism (i.e. not Xorg) - The DDX is run by a non-root user, and then by a different non-root user - The logfile directory doesn't have the restricted-deletion flag set Signed-off-by: Jon TURNEY Acked-by: Yaakov Selkowitz Reviewed-by: Yaakov Selkowitz Signed-off-by: Peter Hutterer commit 8eeaa74bc241acb41f1d3ed64971e0b01e794776 Author: Peter Hutterer Date: Tue Jul 9 13:27:19 2013 +1000 dix: when ungrabbing an active grab, accept pointer grabs (#66720) Ungrabbing a device during an active touch grab rejects the grab. Ungrabbing a device during an active pointer grab accepts the grab. Rejection is not really an option for a pointer-emulated grab, if a client has a button mask on the window it would get a ButtonPress emulated after UngrabDevice. That is against the core grab behaviour. X.Org Bug 66720 Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit a2d6932ad48f2cbfcc4c5fb8272e47106d08ac78 Author: Julien Cristau Date: Mon Jul 1 19:39:30 2013 +0200 xkb: don't call atoi(NULL) when parsing argv If the -ardelay or -arinterval options have no argument, there's no point trying to read it. See http://www.forallsecure.com/bug-reports/feb3db57fc206d8df22ca53a6907f74973876272/ Reported-by: Alexandre Rebert Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Peter Hutterer commit 77e51d5bbb97eb5c9d9dbff9a7c44d7e53620e68 Author: Eric Anholt Date: Mon Jun 17 15:51:19 2013 -0700 Revert "DRI2: re-allocate DRI2 drawable if pixmap serial changes" This reverts commit 3209b094a3b1466b579e8020e12a4f3fa78a5f3f. After a long debug session by Paul Berry, it appears that this was the commit that has been producing sporadic failures in piglit front buffer rendering tests for the last several years. GetBuffers may return fresh buffers with invalid contents at a couple reasonable times: - When first asked for a non-fake-front buffer. - When the drawable size is changed, an Invalidate has been sent, and obviously the app needs to redraw the whole buffer. - After a glXSwapBuffers(), GL allows the backbuffer to be undefined, and an Invalidate was sent to tell the GL that it should grab these appropriate new buffers to avoid stalling. But with the patch being reverted, GetBuffers would also return fresh invalid buffers when the drawable serial number changed, which is approximately "whenever, for any reason". The app is not expecting invalid buffer contents "whenever", nor is it valid. Because the GL usually only GetBuffers after an Invalidate is sent, and the new buffer allocation only happened during a GetBuffers, most apps saw no problems. But apps that do (fake-)frontbuffer rendering do frequently ask the server for the front buffer (since we drop the fake front allocation when we're not doing front buffer rendering), and if the drawable serial got bumped midway through a draw, the server would pointlessly ditch the front *and* backbuffer full of important drawing, resulting in bad rendering. The patch was originally to fix bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28365 Specifically: To reproduce, start with a large-ish display (i.e. 1680x1050 on my laptop), use the patched glxgears from bug 28252 to add the -override option. Then run glxgears -override -geometry 640x480 to create a 640x480 window in the top left corner, which will work fine. Next, run xrandr -s 640x480 and watch the fireworks. I've tested with an override-redirect glxgears, both with vblank sync enabled and disabled, both with gnome-shell and no window manager at all, before and after this patch. The only problem observed was that before and after the revert, sometimes when alt-tabbing to kill my gears after completing the test gnome-shell would get confused about override-redirectness of the glxgears window (according to a log message) and apparently not bother doing any further compositing. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Chris Wilson Tested-by: Chris Wilson Signed-off-by: Keith Packard commit 227015d6544115258b74c31b700f9bd163540e24 Merge: d9005d58c 80054fcaf Author: Keith Packard Date: Tue Jun 18 10:53:08 2013 -0700 Merge remote-tracking branch 'jturney/master' commit 951d2f83fc65a136717fb8090510d053e3f3a6c0 Author: Maarten Lankhorst Date: Wed Jun 12 14:11:53 2013 +0200 bump to 0.8.0 Signed-off-by: Maarten Lankhorst commit 525ac7fb9a0d639253fc5d6556db3edb7239f932 Author: Maarten Lankhorst Date: Wed Jun 12 14:05:19 2013 +0200 modesetting: probe only succeeds if connectors are detected This will prevent modesetting being used for outputless intel or nvidia cards. Signed-off-by: Maarten Lankhorst commit d4791dd97b85ddac1295761bf6ab4f10c08346d7 Author: Dave Airlie Date: Tue Jun 11 10:29:25 2013 +1000 modesetting: fix adjust frame crash When SDL called this it was totally broken, actually hook up to the underlying drmmode function. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64808 Thanks to Peter Wu for harassing me. Signed-off-by: Dave Airlie commit 80054fcafb095aff76f6df00d348c7fd85e8ddbc Author: Jon TURNEY Date: Sat Mar 30 19:44:14 2013 +0000 hw/xwin: Update manifest to target all architectures, not just x86 Update manifest to target all architectures, not just x86 Also: Write explicit dependencies for Xwin.rc. XWin.exe.manifest and X.ico are included the resource compiler output, so add a dependency on them to cause it to be recompiled if they change. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 689e7ad9b0fccd582cd63796cc90a999f141f589 Author: Jon TURNEY Date: Sun Mar 31 18:36:37 2013 +0100 hw/xwin: Win32 Windows properties are of pointer type HANDLE, not an integer type Win32 Windows properties are of pointer type HANDLE, not an integer type, but we use the Windows property WINDOW_WID_PROP to store the X window XID. Add appropriate casts to show it doesn't matter that an XID is smaller than a pointer on 64-bit build. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e1a0945e8d4a3858838a14e64022524efd73c905 Author: Jon TURNEY Date: Sun Mar 31 18:35:35 2013 +0100 hw/xwin: winMultiWindowGetTransientFor() returns an XID not a WindowPtr winMultiWindowGetTransientFor() accesses the WM_TRANSIENT_FOR property, which is an X window XID (which we compare with WINDOW_WID_PROP) and not a WindowPtr. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit be201ac257687355bf0916d7c525d598ed9b1282 Author: Jon TURNEY Date: Sat Mar 30 19:47:16 2013 +0000 hw/xwin: Change winIconIsOverride() to take a HICON parameter Change winIconIsOverride() to take a HICON parameter, so some unneccessary casts, which weren't portable to 64-bit Cygwin, can be removed. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit fc40f9a92cf5981bccc45bbc0b959cc06c5accc2 Author: Jon TURNEY Date: Sat Mar 30 19:41:06 2013 +0000 hw/xwin: Fix uses of CreateDialogParam() for 64-bit builds Fix uses of CreateDialogParam() to be more strictly correct, for 64-bit builds dwInitParam parameter is LPARAM, not int Return type of DLGPROC is INT_PTR, not WINBOOL Also: Reporting the value of g_hDlgDepthChange is completely uninteresting, we are just interested in GetLastError() if it is NULL Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b542976846eb5d4c82910272af32ec8298da4177 Author: Jon TURNEY Date: Sat Mar 30 19:40:31 2013 +0000 hw/xwin: deprecated interface cygwin_conv_to_win32_path() doesn't exist in 64-bit cygwin The deprecated interface cygwin_conv_to_win32_path() doesn't exist in 64-bit cygwin, but both the ID_ABOUT_CHANGELOG control and the referenced file who's path we are converting haven't existed for a while, so just remove this unused, cygwin-specific code. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5a47c6420cfe298143310938f08cc36a503e8d3d Author: Jon TURNEY Date: Mon Apr 8 01:27:26 2013 +0100 hw/xwin: Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute() to an integer Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute() to an integer: Since HINSTANCE is a pointer type, use INT_PTR rather than int. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d9005d58c0413dcc3a99150c13d05163881cf782 Author: Peter Hutterer Date: Tue Jun 4 14:39:33 2013 +1000 config: add a quirks file for devices needing special configuration This is the fedora quirks file configuring the special handling some devices need. Rather than keeping this distro-specific add it to the tree so we can share these quirks. Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp commit 04ce6f6f6c880281e42c9ebf21d6f980ddae79b4 Author: Maarten Lankhorst Date: Thu May 30 11:23:07 2013 +0200 dix: add missing dixFreeRegistry define Fixes a build failure on debian's udeb builds. Signed-off-by: Maarten Lankhorst Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c21344add2fc589df83b29be5831c36a372201bd Author: Peter Hutterer Date: Mon May 27 13:46:49 2013 +1000 dix: remove logspam in RefCursor() This shouldn't have been in the patch Reported-by: Colin Harrison Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit cb3018d8a15add48efb3335e1f79b66378166008 Merge: c76a1b343 6589f3b55 Author: Keith Packard Date: Thu May 23 19:58:46 2013 -0600 Merge remote-tracking branch 'whot/unreviewed' commit c76a1b343d6a56aa9529e87f0eda8d61355d562b Merge: 891123ce9 9a5ad6533 Author: Keith Packard Date: Thu May 23 19:58:36 2013 -0600 Merge remote-tracking branch 'whot/touch-grab-race-condition-56578-v3' commit 891123ce9dac5e52685b9a921b33d8279ba52956 Merge: 7e97166c4 49521edaf Author: Keith Packard Date: Thu May 23 10:30:15 2013 -0600 Merge remote-tracking branch 'whot/for-keith' commit 6589f3b55e335eef6c658c8ba1fe15a062f7e31c Author: Peter Hutterer Date: Tue May 14 08:31:19 2013 +1000 dix: devices must have valuators before touch is initialized Signed-off-by: Peter Hutterer commit 756ab88d93542f0589c9bf46f40ccc57df64f0fd Author: Peter Hutterer Date: Fri Apr 26 15:10:08 2013 +1000 dix: fix device scaling to use a [min,max[ range. defmin/defmax are screen coords and thus use a min-inclusive, max-exclusive range. device axes ranges are inclusive, so bump the max up by one to get the scaling right. This fixes off-by-one coordinate errors if the coordinate matrix is used to bind the device to a fraction of the screen. It introduces an off-by-one scaling error in the device coordinate range, but since most devices have a higher resolution than the screen (e.g. a Wacom I4 has 5080 dpi) the effect of this should be limited. This error manifests when we have numScreens > 1, as the scaling from desktop size back to screen size drops one device unit. Signed-off-by: Peter Hutterer commit 5cc2c96f824dbb28b9f8da61efc41596f8bd0561 Author: Peter Hutterer Date: Sat Mar 9 20:43:51 2013 +1000 dix: pre-scale x by the screen:device:resolution ratio commit 61a99aff9d33728a0b67920254d2d4d79f80cf39 dix: pre-scale relative events from abs devices to desktop ratio (#31636) added pre-scaling of relative coordinates coming from absolute devices to undo uneven scaling based on the screen dimensions. Devices have their own device width/height ratio as well (in a specific resolution) and this must be applied for relative devices as well to avoid scaling of the relative events into the device's ratio. e.g. a Wacom Intuos4 6x9 is in 16:10 format with equal horiz/vert resolution (dpi). A movement by 1000/1000 coordinates is a perfect diagonal on the tablet and must be reflected as such on the screen. However, we map the relative device-coordinate events to absolute screen coordinates based on the axis ranges. This results in an effective scaling of 1000/(1000 * 1.6) and thus an uneven x/y axis movement - the y axis is always faster. So we need to pre-scale not only by the desktop dimenstions but also by the device width/height ratio _and_ the resolution ratio. Signed-off-by: Peter Hutterer commit 9a5ad65330693b3273972b63d10f2907d9ab954a Author: Peter Hutterer Date: Wed May 15 19:01:11 2013 +1000 Abstract cursor refcounting Too many callers relied on the refcnt being handled correctly. Use a simple wrapper to handle that case. Signed-off-by: Peter Hutterer commit 35c2e263db01b2b61354298e5e85aa3cae8ac317 Author: Peter Hutterer Date: Tue May 14 14:51:31 2013 +1000 dix: call UpdateDeviceState() for emulated TouchEndEvents ProcessTouchEvents() calls UDS for all touch events, but if the event type was switched to TouchUpdate(pending end) UDS is a noop. Daniel Drake found this can cause stuck buttons if a touch grab is activated, rejected and the touch event is passed to a regular listener. This sequence causes the TouchEnd to be changed to TouchUpdate(pending end). The actual TouchEnd event is later generated by the server once it is passed to the next listener. UDS is never called for this event, thus the button remains logically down. A previous patch suggested for UDS to handle TouchUpdate events [1], however this would release the button when the first TouchEvent is processed, not when the last grab has been released (as is the case for sync pointer grabs). A client may thus have the grab on the device, receive a ButtonPress but see the button logically up in an XQueryPointer request. This patch adds a call to UDS to TouchEmitTouchEnd(). The device state must be updated once a TouchEnd event was sent to the last grabbing listener and the number of grabs on the touchpoint is 0. [1] http://patchwork.freedesktop.org/patch/13464/ Signed-off-by: Peter Hutterer commit 8b9dc2628115dcb3f3601ad19b1ae157df21b9ee Author: Peter Hutterer Date: Tue May 14 07:46:25 2013 +1000 dix: devices must have valuators before touch is initialized Signed-off-by: Peter Hutterer commit fd5ea0237db6d725a48f76b706135df9d3246b82 Author: Peter Hutterer Date: Mon May 13 15:22:12 2013 +1000 Xi: fix warning - remove unused 'rc' Signed-off-by: Peter Hutterer commit 481702101b86fff003430e952dc65fb41eb56400 Author: Peter Hutterer Date: Fri May 3 15:07:58 2013 +1000 dix: fix cursor refcounting The cursor is referenced during CopyGrab(), thus doesn't need to be handled manually anymore. It does need to be refcounted for temp grabs though. The oldGrab handling in ProcGrabPointer is a leftover from the cursor in the grab being refcounted, but the grab itself being a static struct in the DeviceIntRec. Now that all grabs are copied, this lead to a double-free of the cursor (Reproduced in Thunderbird, dragging an email twice (or more often) causes a crash). Signed-off-by: Peter Hutterer commit 49521edaf8930b335afac2185209e26e7000820b Author: Peter Hutterer Date: Wed May 15 08:51:51 2013 +1000 ephyr: add -resizeable to the man page Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 7a4bbfd9f2ce7aad23148ba01bb3f1071da606a3 Author: Peter Hutterer Date: Wed May 15 08:46:38 2013 +1000 ephyr: fix typo in man page Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 7e97166c4fc38076b6224e4dbdd632b43444149f Author: Geert Uytterhoeven Date: Tue May 14 13:04:53 2013 +0200 Shadow: Switch the Amiga/Atari bitplane code to the canonical X.Org license Also add my name to the list of authors in COPYING Reviewed-by: Alan Coopersmith Signed-off-by: Geert Uytterhoeven Signed-off-by: Keith Packard commit 3093f78d17e48a506aab170a9089cd10e21af299 Author: Peter Hutterer Date: Fri May 3 15:02:05 2013 +1000 dix: free the old grab when activating a new grab A client may call XIGrabDevice twice, overwriting the existing grab. Thus, make sure we free the old copy after we copied it. Free it last, to make sure our refcounts don't run to 0 and inadvertantly free something on the way. Signed-off-by: Peter Hutterer commit 2566bdd8bc996cccde77b846819808c6239a89d2 Author: Peter Hutterer Date: Wed Apr 24 14:46:06 2013 +1000 Xi: check for HAS_ACCEPTED only for grab listeners If we have one listener left but it's not a grab, it cannot be in LISTENER_HAS_ACCEPTED state. Signed-off-by: Peter Hutterer commit 5b00fc52270e9cfdfe7ac1838a21defe50fc3d31 Author: Peter Hutterer Date: Wed Apr 24 14:40:31 2013 +1000 Move TouchListenerGone call to CloseDownClient TouchListenerGone cleans up if a client disappears. Having this in FreeGrab() triggers cyclic removal of grabs, emitting wrong events. In particular, it would clean up a passive grab record while that grab is active. Move it to CloseDownClient() instead, cleaning up before we go. Signed-off-by: Peter Hutterer commit 34c9b39d9937c2e19c2dffc9748605f90d40f965 Author: Peter Hutterer Date: Wed Apr 24 12:53:52 2013 +1000 dix: remove all listeners when freeing a touch Signed-off-by: Peter Hutterer commit 395124bd2782823de37e5c5b2f15dba49cff05f6 Author: Peter Hutterer Date: Wed Apr 17 20:15:35 2013 +1000 dix: always copy grabs, don't reference them Introduced in xorg-server-1.13.99.901-2-g9ad0fdb. Storing the grab pointer in the listener turns out to be a bad idea. If the grab is not an active grab or an implicit grab, the pointer stored is the one to the grab attached on the window. This grab may be removed if the client calls UngrabButton or similar while the touch is still active, leaving a dangling pointer. To avoid this, copy the grab wherever we need to reference it later. This is also what we do for pointer/keyboard grabs, where we copy the grab as soon as it becomes active. Reported-by: Maarten Lankhorst Signed-off-by: Peter Hutterer commit 925e35122ebad877395bcf13676e9dbeb254bdfa Author: Peter Hutterer Date: Tue Apr 23 15:52:18 2013 +1000 dix: AllocGrab can copy if an argument is passed in Signed-off-by: Peter Hutterer commit 4980bcef9973ba1f90f53028f061669ee5d2661b Author: Peter Hutterer Date: Tue Apr 23 15:46:04 2013 +1000 dix: freeing a null grab is a bug, complain if doing so Signed-off-by: Peter Hutterer commit ccfa0f2d5de557546815a5e4f59552e2af46b578 Author: Peter Hutterer Date: Tue Apr 23 15:39:32 2013 +1000 dix: use a temporary variable for listeners[0] no functional changes Signed-off-by: Peter Hutterer commit 5363433a5cc64e2f83859aa1c32a89e5e1ddf9e4 Author: Peter Hutterer Date: Thu Apr 18 10:32:11 2013 +1000 dix: drop DeviceIntRec's activeGrab struct Obsolete since 4bc2761ad5ec2d0668aec639780ffb136605fbc8. This struct existed so copying a passive grab could be simply done by activeGrab = *grab and thus have a copy of the GrabPtr we'd get from various sources but still be able to check device->grab for NULL. Since 4bc2761 activeGrab is a pointer itself and points to the same memory as grabinfo->grab, leaving us with the potential of dangling pointers if either calls FreeGrab() and doesn't reset the other one. There is no reader of activeGrab anyway, so simply removing it is sufficient. Note: field is merely renamed to keep the ABI. Should be removed in the future. Signed-off-by: Peter Hutterer commit 7dbf61817d3bd4b1fc71710677e56c5d8cfcdb4e Author: Peter Hutterer Date: Wed Apr 17 20:14:56 2013 +1000 dix: use a tmp variable for the to-be-removed touch listener No functional changes. Signed-off-by: Peter Hutterer commit a71a283934406d870bcd8dc376eb1c9ce1c8bbb4 Author: Peter Hutterer Date: Wed Apr 17 20:13:34 2013 +1000 dix: invert a loop condition Change the single if condition in the loop body to a if (!foo) continue; and re-indent the rest. No functional changes. Signed-off-by: Peter Hutterer commit 5174b1f98204beee79eba74c4cda5f2be0a60a8f Author: Peter Hutterer Date: Thu Feb 28 11:02:40 2013 +1000 dix: XAllowEvents() on a touch event means accepting it A sync grab is the owner once it gets events. If it doesn't replay the event it will get all events from this touch, equivalent to accepting it. If the touch has ended before XAllowEvents() is called, we also now need to send the TouchEnd event and clean-up since we won't see anything more from this touch. Signed-off-by: Peter Hutterer commit e7f79c48b0faea910dc881034c00eb807fcd6210 Author: Peter Hutterer Date: Fri Mar 1 12:52:35 2013 +1000 dix: move EmitTouchEnd to touch.c No functional changes, this just enables it to be re-used easier. Signed-off-by: Peter Hutterer commit 0eb9390f6048049136347d5a5834d88bfc67cc09 Author: Peter Hutterer Date: Fri Mar 1 10:41:01 2013 +1000 Xi: Don't emit a TouchEnd event to a frozen device EmitTouchEnd calls DeliverTouchEvents directly instead of through public.processInputProc. If a device is frozen, the TouchEnd is processed while the device is waiting for a XAllowEvents and thus ends the touch point (and the grab) before the client decided what to do with it. In the case of ReplayPointer, this loses the event. This is a hack, but making EmitTouchEnd use processInputProc breaks approximately everything, especially the touch point is cleaned up during ProcessTouchEvents. Working around that is a bigger hack than this. Signed-off-by: Peter Hutterer commit a7d989d335f903ffd8b168cd2beeb82c78d30c21 Author: Peter Hutterer Date: Thu Feb 28 13:07:26 2013 +1000 Xi: use public.processInputProc to replay the touch history If a device is frozen in results to a grab, we need to enqueue the events. This makes things complicated, and hard to follow since touch events are now replayed in the history, pushed into EnqueueEvent, then replayed later during PlayReleasedEvents in response to an XAllowEvents. While the device is frozen, no touch events are processed, so if there is a touch client with ownership mask _below_ the grab this will delay the delivery and potentially screw gesture recognition. However, this is the behaviour we have already anyway if the top-most client is a sync pgrab or there is a sync grab active on the device when the TouchBegin was generated. (also note, such a client would only reliably work in case of ReplayPointer anyway) Signed-off-by: Peter Hutterer commit 214d11d3fcdac51fc7afbf3770516ec14f9e13c1 Author: Peter Hutterer Date: Wed Feb 27 15:05:54 2013 +1000 Xi: when punting to a new owner, always create TouchEnd events If a touch is pending_finish and we just punted it to the next owner, that client must receive a TouchEnd event. If we just punted to the last owner and that owner not a touch grab, we need to end the touch since this is the last event to be sent, and the client cannot accept/reject this. Signed-off-by: Peter Hutterer commit 026627fe19aad007544eccf209f0dea05e67a7a7 Author: Peter Hutterer Date: Fri Mar 1 09:15:37 2013 +1000 Xi: save state for early acceptance Delivering an event changes the state to LISTENER_IS_OWNER and we thus lose the information of early acceptance. Signed-off-by: Peter Hutterer commit d905348134c80f19793eefb761731b00559ddf3a Author: Peter Hutterer Date: Thu Feb 28 15:28:46 2013 +1000 Xi: if a passive async grab is activated from an emulated touch, accept Async grabs cannot replay events, they cannot reject, so we can do an early accept here. Signed-off-by: Peter Hutterer commit 8b0d21044956f3810199d5e2f38ce33069e97be7 Author: Peter Hutterer Date: Thu Feb 28 13:04:36 2013 +1000 Xi: fix lookup in ActivateEarlyAccept ActivateEarlyAccept() can only be called from a grabbing client, so we can ignore the rest. And it's easy enough to get the client from that since 9ad0fdb135a1c336771aee1f6eab75a6ad874aff. Signed-off-by: Peter Hutterer commit d08bae297f9d7651edb1923d6b0d6b14b3d674fc Author: Peter Hutterer Date: Thu Feb 28 13:08:27 2013 +1000 Xi: update the core listener state if we delivered the touch event If a TouchBegin is sent to a core client, that client is now the owner. By the time the TouchEnd is being processed, the client cannot replay anymore, so we can assume that this is the final touch end and we can clean up the touch record. Note: DeliverTouchEmulatedEvent is called for all listeners and immediately bails out if the client is not the owner and thus shouldn't yet get the event. Thus, check the return code. Signed-off-by: Peter Hutterer commit 81554d274f04951c55ea7f2e38d0455e2025e08d Author: Peter Hutterer Date: Mon Feb 25 11:21:07 2013 +1000 Xi: if we delivered a TouchEnd to a passive grab, end it ef64b5ee97099618cf2e2cbbd3e471095695ae24 (which introduced the TOUCH_CLIENT_ID check) has a wrong assumption that generated touch events (TOUCH_CLIENT_ID) should not terminate passive grabs. This is untrue, a TouchEnd may be generated in response to a TouchReject higher up. If we _deliver_ an event to a client, terminate the passive grab. This requires us to count the actually delivered events too (first hunk). Signed-off-by: Peter Hutterer commit 363b6387da6e669099a2da3861c73a29808295a6 Author: Peter Hutterer Date: Wed Feb 13 11:26:11 2013 +1000 dix: don't prepend an activated passive grab to the listeners If the device is currently grabbed as the result of a passive grab activating, do not prepend that grab to the listeners (unlike active grabs). Otherwise, a client with a passive pointer grab will prevent touch grabs from activating higher up in the window stack. Signed-off-by: Peter Hutterer commit 9cc45c18ad1511adf3fb163dd4cefbef106edb23 Author: Peter Hutterer Date: Wed Feb 13 10:49:23 2013 +1000 Xi: not having an ownership mask does not mean automatic acceptance If we only have a single touch-grabbing client, setting the client as owner would clean up the touch once the TouchEnd was processed. If the client then calls XIAllowTouches() it will receive a BadValue for the touch ID (since the internal record is already cleaned up). Signed-off-by: Peter Hutterer commit 2f1aedcaed8fd99b823d451bf1fb02330c078f67 Author: Peter Hutterer Date: Thu May 9 14:30:50 2013 +1000 input: print warnings if drivers don't initialize properly If drivers supply incorrect values don't just quietly return False, spew to the log so we can detect what's going on. All these cases are driver bugs and should be fixed immediately. Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 8a88b0ab52ba375ae84463a90503db88af10e368 Author: Peter Hutterer Date: Thu May 9 14:30:49 2013 +1000 dix: don't overwrite proximity/focus classes InitPointerClassDeviceStruct/InitKeyboardDeviceStruct allocate a proximity/focus class, respectively. If a driver calls InitFocusClassDeviceStruct or InitProximityClassDeviceStruct beforehand, the previously allocated class is overwritten, leaking the memory. Neither takes a parameter other than the device, so we can simply skip initialising it if we already have one. Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 34b0d07ebf4a7874fe7fd336bef5bbdd8debda1c Author: Peter Hutterer Date: Fri May 10 09:44:29 2013 +1000 dix: reset the OsBuffers after killing all clients ==21860== 24 bytes in 1 blocks are still reachable in loss record 85 of 397 ==21860== at 0x4C2B3F8: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==21860== by 0x61ED93: AllocateOutputBuffer (io.c:1037) ==21860== by 0x61E15A: WriteToClient (io.c:764) ==21860== by 0x457B30: ProcQueryExtension (extension.c:275) ==21860== by 0x43596B: Dispatch (dispatch.c:432) ==21860== by 0x425DAB: main (main.c:295) Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 67c66606c760c263d7a4c2d1bba43ed6225a4e7c Author: Robert Morell Date: Thu May 9 13:09:02 2013 -0700 os: Reset input buffer's 'ignoreBytes' field If a client sends a request larger than maxBigRequestSize, the server is supposed to ignore it. Before commit cf88363d, the server would simply disconnect the client. After that commit, it attempts to gracefully ignore the request by remembering how long the client specified the request to be, and ignoring that many bytes. However, if a client sends a BigReq header with a large size and disconnects before actually sending the rest of the specified request, the server will reuse the ConnectionInput buffer without resetting the ignoreBytes field. This makes the server ignore new X clients' requests. This fixes that behavior by resetting the ignoreBytes field when putting the ConnectionInput buffer back on the FreeInputs list. Signed-off-by: Robert Morell Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit ddc11397a56c745b5d1fb377e9d9b1fcc73802c8 Author: Peter Hutterer Date: Mon Feb 27 18:36:39 2012 +1000 dix: delete all callbacks before reset DeleteCallbackManager() introduced for better symmetry in the caller, they do the same thing. ==20085== 24 bytes in 1 blocks are still reachable in loss record 11 of 103 ==20085== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) ==20085== by 0x43A097: CreateCallbackList (dixutils.c:837) ==20085== by 0x43A1D3: AddCallback (dixutils.c:869) ==20085== by 0x4B1736: GEExtensionInit (geext.c:209) ==20085== by 0x41C8A8: InitExtensions (miinitext.c:389) ==20085== by 0x5AC918: main (main.c:208) ==2042== 8 bytes in 1 blocks are still reachable in loss record 2 of 97 ==2042== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) ==2042== by 0x4C2A657: realloc (vg_replace_malloc.c:525) ==2042== by 0x4802F5: XNFrealloc (utils.c:1095) ==2042== by 0x43A17A: CreateCallbackList (dixutils.c:855) ==2042== by 0x43A1EF: AddCallback (dixutils.c:870) ==2042== by 0x4B1752: GEExtensionInit (geext.c:209) ==2042== by 0x41C8A8: InitExtensions (miinitext.c:389) ==2042== by 0x5AC9E4: main (main.c:208) ==2042== Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 6993f8b459e25b1a7a0a03e209688a28ce6c2c56 Author: Peter Hutterer Date: Wed Apr 24 14:59:11 2013 +1000 Xi: free barrier code at reset time ==29423== 16 bytes in 1 blocks are definitely lost in loss record 73 of 328 ==29423== at 0x4A06B6F: calloc (vg_replace_malloc.c:593) ==29423== by 0x5987C0: XIBarrierInit (xibarriers.c:908) ==29423== by 0x58F370: XInputExtensionInit (extinit.c:1300) ==29423== by 0x4F33C3: InitExtensions (miinitext.c:337) ==29423== by 0x4997DB: main (main.c:208) Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 042c6d861f7bb7038ddcdd6b59766fd9094d0e52 Author: Peter Hutterer Date: Tue Apr 30 15:44:37 2013 +1000 os: Use ErrorFSigSafe from FatalError and it's friends Backtrace logging etc. is already sigsafe, but the actual FatalError message in response is not yet, leading to amusing logs like this: (EE) Segmentation fault at address 0x0 (EE) BUG: triggered 'if (inSignalContext)' (EE) BUG: log.c:499 in LogVMessageVerb() (EE) Warning: attempting to log data in a signal unsafe manner while in signal context. Please update to check inSignalContext and/or use LogMessageVerbSigSafe() or ErrorFSigSafe(). The offending log format message is: Fatal server error: Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d9848fb4b182ca21bacf28ed7410d1a502cb000e Author: Peter Hutterer Date: Thu Feb 14 16:24:53 2013 +1000 os: complain about unsupported pnprintf directives Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d903d17d7f006fa333265b8476063b189c20d082 Author: Peter Hutterer Date: Thu Feb 14 16:19:34 2013 +1000 os: support %c in pnprintf Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 58ef34ee6d0f68aa28f6f1a26e56f49ec85ed9bf Author: Peter Hutterer Date: Thu Feb 14 16:13:22 2013 +1000 os: support %% in pnprintf Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 5ea21560dd071ea4ab87430000d087fd5fe1f092 Author: Peter Hutterer Date: Thu Feb 14 15:34:32 2013 +1000 os: support pnprintf length modifiers for integers Mainly for %ld, smaller than int is propagated anyway, and %lld isn't really used. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d3d4af5f9e505d444b6c82c6ea238206433fd24b Author: Peter Hutterer Date: Mon Feb 27 18:59:45 2012 +1000 dix: reset the registry before quitting Heaps of these: ==2042== 15,360 bytes in 120 blocks are still reachable in loss record 94 of 97 ==2042== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) ==2042== by 0x4C2A657: realloc (vg_replace_malloc.c:525) ==2042== by 0x45FB91: double_size (registry.c:65) ==2042== by 0x45FC97: RegisterRequestName (registry.c:85) ==2042== by 0x460095: RegisterExtensionNames (registry.c:179) ==2042== by 0x460729: dixResetRegistry (registry.c:334) ==2042== by 0x5AC992: main (main.c:201) Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 6f44d672aa34d343f63f0ea81ad58154a66b57ec Author: Peter Hutterer Date: Mon Feb 27 17:17:41 2012 +1000 xkb: free XkbRulesUsed and XkbRulesDflt on extension cleanup ==2547== 1 bytes in 1 blocks are still reachable in loss record 1 of 111 ==2547== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) ==2547== by 0x64D1551: strdup (strdup.c:43) ==2547== by 0x4802FB: Xstrdup (utils.c:1113) ==2547== by 0x585B6C: XkbSetRulesUsed (xkbInit.c:219) ==2547== by 0x58700F: InitKeyboardDeviceStruct (xkbInit.c:595) ==2547== by 0x419FA3: vfbKeybdProc (InitInput.c:74) ==2547== by 0x425A3D: ActivateDevice (devices.c:540) ==2547== by 0x425F65: InitAndStartDevices (devices.c:713) ==2547== by 0x5ACA57: main (main.c:259) and a few more of the above. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 623981ddaeb8836f3b0939e527c0e943f9c4e974 Author: Peter Hutterer Date: Fri Feb 1 09:06:20 2013 +1000 If neither HAL nor udev backends are enabled, warn the user If both are missing, input device hotplugging will not work out of the box. While we still have a DBus-API or the user may want to set AAD off all the time, the most likely source of this is misconfiguration (i.e. lack of the udev/hal devel packages). Message printed last to make it more obvious to the user. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit dce40e2266200421647044ec7e856656d2ef952d Author: Peter Hutterer Date: Tue Feb 26 12:34:21 2013 +1000 Xi: always return BadMatch for XTest devices ChangeDeviceControl requests The only controls that still do something are DEVICE_RESOLUTION and DEVICE_ENABLE. XTest devices have no resolution to change, and they cannot be disabled. So skip the lot, and prevent a crash in the DDX when it's trying to de-reference pInfo->control_proc on device with no pInfo struct. Likewise, don't allow setting device mode or the valuators. XTest pointers are always relative, they don't have a mode. Test cases: xts5/XI/ChangeDeviceControl (1/10) xts5/XI/SetDeviceValuators (1/6) and a few others Reported-by: Knut Petersen Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 23d1bc69f305edd5a6e2cfec3dfc84befda0881c Author: Peter Hutterer Date: Thu Mar 14 11:07:57 2013 +1000 dix: send the current axis value in DeviceChangedEvents (#62321) X.Org Bug 62321 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 27b11f5c19d67e2f6784d86cb7df86bbab3b58bb Author: Peter Hutterer Date: Fri Feb 15 11:19:10 2013 +1000 Xi: fix comment - XI2 grabs aren't keysym grabs Comment dates back to a pre-release version of XI2 that supported keysym grabs. That never made it into a release, it was ditched before. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 2746c681639f9512e6e45fb8d0151b996b6aff7f Merge: 1e6cf8ec2 9878e097a Author: Keith Packard Date: Mon May 6 10:52:40 2013 -0700 Merge remote-tracking branch 'alanc/master' commit 1e6cf8ec20d07b73a11116564aba71b4e4291dcd Merge: dbfeaf706 5860408a1 Author: Keith Packard Date: Mon May 6 10:20:21 2013 -0700 Merge remote-tracking branch 'jturney/unused-but-set-variable-warning-fix' commit dbfeaf70623a83e1a3f3255c94d52e0e04702837 Author: Aaron Plattner Date: Tue Apr 30 14:30:18 2013 -0700 xfree86: don't enable anything in xf86InitialConfiguration for GPU screens There's no point in turning on outputs connected to GPU screens during initial configuration. Not only does this cause them to just display black, it also confuses clients when these screens are attached to a master screen and RandR reports that the outputs are already on. Also, don't print the warning about no outputs being found on GPU screens, since that's expected. Signed-off-by: Aaron Plattner Reviewed-by: Dave Airlie commit 5860408a19d956f8cebb7ae39cfdbfcebd5e6360 Author: Jon TURNEY Date: Wed Apr 3 18:43:26 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in ProcWindowsWMFrameGetRect() /jhbuild/checkout/xorg/xserver/hw/xwin/winwindowswm.c: In function ‘ProcWindowsWMFrameGetRect’: /jhbuild/checkout/xorg/xserver/hw/xwin/winwindowswm.c:322:12: error: variable ‘ir’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit bcfd523c150b34e9304d174ba812160c611f270d Author: Jon TURNEY Date: Wed Apr 3 18:34:38 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winMWExtWMUpdateWindowDecoration() /jhbuild/checkout/xorg/xserver/hw/xwin/winwin32rootlesswindow.c: In function ‘winMWExtWMUpdateWindowDecoration’: /jhbuild/checkout/xorg/xserver/hw/xwin/winwin32rootlesswindow.c:189:11: error: variable ‘dwStyle’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit fbf819c24dc080f166cff29bf46b0feb604c6b8c Author: Jon TURNEY Date: Wed Apr 3 16:40:35 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winHotKeyAltTabPrimaryDD() /jhbuild/checkout/xorg/xserver/hw/xwin/winpfbdd.c: In function ‘winHotKeyAltTabPrimaryDD’: /jhbuild/checkout/xorg/xserver/hw/xwin/winpfbdd.c:518:20: error: variable ‘rcSrc’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 7dae1e59ce6077f475c04a41fa00096a74114064 Author: Jon TURNEY Date: Wed Apr 3 16:33:39 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winMinimizeWindow() when built !XWIN_MULTIWINDOWEXTWM /jhbuild/checkout/xorg/xserver/hw/xwin/winmultiwindowwindow.c: In function ‘winMinimizeWindow’: /jhbuild/checkout/xorg/xserver/hw/xwin/winmultiwindowwindow.c:813:20: error: variable ‘pScreenInfo’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b284666f09b77f9c2f048fee22015a353152a57f Author: Jon TURNEY Date: Wed Apr 3 16:27:45 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winClipboardProc() /jhbuild/checkout/xorg/xserver/hw/xwin/winclipboardthread.c: In function ‘winClipboardProc’: /jhbuild/checkout/xorg/xserver/hw/xwin/winclipboardthread.c:88:25: error: variable ‘atomClipboardManager’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d414a09bb7f8d4440b36cbc6f0b4ca0eaefe5cbf Author: Jon TURNEY Date: Wed Apr 3 16:25:54 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winWindowProc() /jhbuild/checkout/xorg/xserver/hw/xwin/winwndproc.c: In function ‘winWindowProc’: /jhbuild/checkout/xorg/xserver/hw/xwin/winwndproc.c:65:22: error: variable ‘s_hInstance’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 7726102671690eb28138d032c8398ac903b97606 Author: Jon TURNEY Date: Wed Apr 3 16:24:08 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winCopyWindowNativeGDI() /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.c: In function ‘winCopyWindowNativeGDI’: /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.c:131:15: error: variable ‘pwinRoot’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b9a2566a6e2f56a0335cd4a089b2066c06a67455 Author: Jon TURNEY Date: Wed Apr 3 16:50:38 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winFinishScreenInitFB() /jhbuild/checkout/xorg/xserver/hw/xwin/winscrinit.c:264:11: error: variable ‘pbits’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c97fbd39adbc0a8cb8537f40b12c091aee29221a Author: Jon TURNEY Date: Wed Apr 3 16:18:27 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winIsFakeCtrl_L() /jhbuild/checkout/xorg/xserver/hw/xwin/winkeybd.c:331:17: error: variable ‘lastMessage’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit cdb74fe17dcb3b5a9c61951f897deaf07f86775f Author: Jon TURNEY Date: Wed Apr 3 16:16:06 2013 +0100 hw/xwin: Fix unused-but-set-variable warnings in windialog.c /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c: In function ‘winChangeDepthDlgProc’: /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c:432:22: error: variable ‘s_pScreen’ set but not used [-Werror=unused-but-set-variable] /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c: In function ‘winAboutDlgProc’: /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c:564:22: error: variable ‘s_pScreen’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit f2fd8ec3725a61abbc831f0a9ec28fa2b7020c47 Author: Dave Airlie Date: Wed Jan 9 12:52:13 2013 +1000 gpu: call CreateScreenResources for GPU screens I didn't think we needed this before, but after doing some more work with reverse optimus it seems like it should be called. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 8fcb9d91b69abc72ddef31b9f2e8585580c6cad2 Author: Dave Airlie Date: Wed Jan 9 12:52:08 2013 +1000 dix: allow pixmap dirty helper to be used for non-shared pixmaps this allows the pixmap dirty helper to be used for reverse optimus, where the GPU wants to copy from the shared pixmap to its VRAM copy. [airlied: slave_dst is wrong name now but pointless ABI churn at this point] Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 16077b81c502e04d77f81f683e0c213b9fe75393 Author: Dave Airlie Date: Wed Jan 9 12:52:03 2013 +1000 xf86crtc: don't use scrn->display for gpu screens scrn->display is a property of the main screen really, and we don't want to have the GPU screens use it for anything when picking modes or a front buffer size. This fixes a bug where when you plugged a display link device, it would try and allocate a screen the same size as the current running one (3360x1050 in this case), which was too big for the device. Avoid doing this and just pick sizes based on whats plugged into this device. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit f0d0d75bfe62553dde353f89e46ff13dd863fbe8 Author: Dave Airlie Date: Wed Jan 9 12:51:55 2013 +1000 dix/gpu: remove asserts for output/offload from same slave We should have no problem allowing output/offload from the same slave, I asserted here, but in order to implement reverse optimus this makes perfect sense. (reverse optimus is intel outputting to nvidia). Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 9d26e8eaf5a2d7c3e65670ac20254c60f665c463 Author: Dave Airlie Date: Wed Jan 9 14:26:35 2013 +1000 randr: report changes when we disconnect a GPU slave When we disconnect an output/offload slave set the changed bits, so a later TellChanged can do something. Then when we remove a GPU slave device, sent change notification to the protocol screen. This allows hot unplugged USB devices to disappear in clients. Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit b724324252d13ff95f62eebd12d125b194d2ccc2 Author: Dave Airlie Date: Wed Jan 9 14:25:43 2013 +1000 randr: only respected changed on the protocol screen We don't want to know about changes on the non-protocol screen, we will fix up setchanged to make sure non-protocol screens update the protocol screens when they have a change. Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit b3f70f38edebac87afe9351538365292f1aaaff3 Author: Dave Airlie Date: Wed Jan 9 14:29:47 2013 +1000 randr: make SetChanged modify the main protocol screen not the gpu screen When SetChanged is called we now modify the main protocol screen, not the the gpu screen. Since changed stuff should work at the protocol level. Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit f9c8248b8326ad01f33f31531c6b2479baf80f02 Author: Dave Airlie Date: Wed Jan 9 14:23:57 2013 +1000 randr: don't directly set changed bits in randr screen Introduce a wrapper interface so we can fix things up for multi-gpu situations later. This just introduces the API for now. Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit 451ba4bd41b82acd4aec6236ba121e00cfeb311b Author: Chris Wilson Date: Thu Jan 10 03:26:33 2013 +0000 hw/xfree86: Only report SetDesiredModes() failed if at least one modeset fails commit 6703a7c7cf1a349c137e247a0c8eb462ff7b07be Author: Keith Packard Date: Tue Jan 8 20:24:32 2013 -0800 hw/xfree86: Require only one working CRTC to start the server. changed the logic to try to set the mode on all connected outputs rather than abort upon the first failure. The return error code was then tweaked such that it reported success if it set a mode on any crtc. However, this confuses the headless case where we never enable any crtcs and also, importantly, never fail to set a crtc. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59190 Signed-off-by: Chris Wilson Also-written-by: Maarten Lankhorst Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 9878e097a7de2f86eff0dcfd9fe5d83b162197ec Author: Alan Coopersmith Date: Wed Apr 24 15:24:31 2013 -0700 Only call xf86platformVTProbe() when it's defined Fixes build on non-udev systems, since XSERVER_PLATFORM_BUS is only defined in configure.ac if $CONFIG_UDEV_KMS is true. Signed-off-by: Alan Coopersmith Reviewed-by: Dave Airlie commit e779402d531625ba4ed5d628d06c6b1e06b2ec7b Author: Keith Packard Date: Thu Apr 25 09:02:31 2013 -0700 shadow: Define c2p_unsupported Just make this call BUG_WARN(1) to indicate that something unexpected happened Signed-off-by: Keith Packard commit 2b361fbda536f0125e4b87a6d455acc58f4e8690 Author: Alan Coopersmith Date: Sun Feb 10 10:24:59 2013 -0800 sparcPromPathname2Node: free name when returning error, instead of leaking it Reported with other leaks found by cppcheck in bugzilla #50281 https://bugs.freedesktop.org/show_bug.cgi?id=50281 Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 174ccd84931ece5a92a09c4a1d6a47e0958ebf7e Author: Alan Coopersmith Date: Sun Feb 10 10:24:59 2013 -0800 xf86SbusCmapLoadPalette: Delay malloc until needed, avoiding leak on error Reported with other leaks found by cppcheck in bugzilla #50281 https://bugs.freedesktop.org/show_bug.cgi?id=50281 V2: check for malloc failure Signed-off-by: Alan Coopersmith commit 6bca0184d167388cd417d113031317990489987d Author: Alan Coopersmith Date: Sun Feb 10 10:18:02 2013 -0800 dmxVDLRead: if we opened a file, close it instead of leaking it Reported with other leaks found by cppcheck in bugzilla #50281 https://bugs.freedesktop.org/show_bug.cgi?id=50281 Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 8c5ff2e93f73b24adff741b25fc1e31b2f5dd0ac Author: Alan Coopersmith Date: Sun Feb 10 10:24:59 2013 -0800 __glXDRIscreenProbe: free screen when DRI2Connect fails, instead of leaking it Reported with other leaks found by cppcheck in bugzilla #50281 https://bugs.freedesktop.org/show_bug.cgi?id=50281 V2: goto existing error handler, instead of replicating more of it here Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 9567fa9a7269765bc59ac71b931e16df261d794d Author: Alan Coopersmith Date: Sun Feb 10 10:24:59 2013 -0800 __glXDRIscreenCreateContext: free context on failure, instead of leaking it Reported with other leaks found by cppcheck in bugzilla #50281 https://bugs.freedesktop.org/show_bug.cgi?id=50281 Signed-off-by: Alan Coopersmith Reviewed-by: Ian Romanick commit 7ab98bafc9a3426fd40f8ae693430491333ba4fc Merge: 53da26afb 5ab260317 Author: Keith Packard Date: Wed Apr 24 14:14:45 2013 -0700 Merge remote-tracking branch 'geertu/master' commit 53da26afb76bcce70b91c5df23d25e7e85c010cf Merge: 5ece86e92 d8d3c78b6 Author: Keith Packard Date: Wed Apr 24 10:27:19 2013 -0700 Merge remote-tracking branch 'whot/for-keith' commit 5ece86e921a1df457a9baab6a2357ccda4ad6957 Merge: ef0a726bc 22cab8a28 Author: Keith Packard Date: Wed Apr 24 10:23:51 2013 -0700 Merge remote-tracking branch 'airlied/for-keithp-gpu-vt-owner' commit ef0a726bc8d5c415244cb4f86d664938b0127a5d Author: Jeremy White Date: Thu Mar 21 10:58:42 2013 -0500 Eliminate the use of xf86Rename.h Signed-off-by: Jeremy White Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 2b539239e465faa9e8c6d96f1c6f00e593d46c18 Author: Keith Packard Date: Wed Apr 24 10:11:03 2013 -0700 Bump to 1.14.99.1 Snapshot with fix for CVE-2013-1940. Signed-off-by: Keith Packard commit d8d3c78b6ebdf63836951d2dbd2d3d621ff26da2 Author: Andreas Müller Date: Tue Apr 16 14:30:43 2013 +0200 dixstruct.h: fix segfaults - char is unsigned for ARM and PowerPC architectures see ARM related bug reports [1-3] [1] https://github.com/archlinuxarm/PKGBUILDs/issues/446I [2] http://www.raspberrypi.org/phpBB3/viewtopic.php?t=38568&p=321673 [3] http://lists.linuxtogo.org/pipermail/openembedded-core/2013-April/037805.html Signed-off-by: Andreas Müller Reviewed-by: Mark Kettenis Signed-off-by: Peter Hutterer commit 7d722796c678532e8c5897c673c43184da353f44 Author: Peter Hutterer Date: Wed Apr 17 19:47:42 2013 +1000 dix: plug memory leak in freeing TouchClass ==15562== 1,800 bytes in 1 blocks are definitely lost in loss record 298 of 330 ==15562== at 0x4A06B6F: calloc (vg_replace_malloc.c:593) ==15562== by 0x4312C7: InitTouchClassDeviceStruct (devices.c:1644) Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 5ab260317ad3b2aafff31a97df21620db52eacd1 Author: Geert Uytterhoeven Date: Sun Mar 10 21:04:19 2013 +0100 Xfbdev: Wire up Amiga afb4 and afb8 support Add support for Amiga-style bitplanes, with 4 or 8 bits per pixel. Signed-off-by: Geert Uytterhoeven Acked-by: Keith Packard commit 672bc5bb38918304cf68114a1112cd48651a5e83 Author: Geert Uytterhoeven Date: Sun Mar 10 17:17:26 2013 +0100 Xfbdev: Wire up Atari iplan2p4 and iplan2p8 support Add support for Atari-style interleaved bitplanes, with 2 bytes interleave and 4 or 8 bits per pixel. Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit 95a3c7536c1a4afe97aaf955980034cc69af9c2f Author: Geert Uytterhoeven Date: Sun Mar 10 17:17:26 2013 +0100 Xfbdev: Force shadowfb for frame buffers with non-packed pixels Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit 0e808110df216649e05503baecd06cd5a3e50421 Author: Geert Uytterhoeven Date: Sun Mar 10 17:17:26 2013 +0100 Xfbdev: Reject unsupported frame buffer types Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit cfd10576812c36f5844805eb95ed1f2d093d1691 Author: Geert Uytterhoeven Date: Sun Mar 10 21:03:44 2013 +0100 Shadow: Add support for Amiga afb8 Add support for Amiga-style bitplanes, with 8 bits per pixel. Signed-off-by: Geert Uytterhoeven Acked-by: Keith Packard commit a1b8e7f1e6118b611ba9d332b8763ee2b44f550c Author: Geert Uytterhoeven Date: Wed Mar 27 09:37:02 2013 +0100 Shadow: Add support for Amiga afb4 Add support for Amiga-style bitplanes, with 4 bits per pixel. Signed-off-by: Geert Uytterhoeven Acked-by: Keith Packard commit d7181e567d1629c387b834da7eecdf618d14718e Author: Geert Uytterhoeven Date: Sun Mar 10 17:16:17 2013 +0100 Shadow: Add support for Atari iplan2p8 Add support for Atari-style interleaved bitplanes, with 2 bytes interleave and 8 bits per pixel. Signed-off-by: Geert Uytterhoeven Acked-by: Keith Packard commit 3f7506b0fca72b2462b85bc4f613de809ae95859 Author: Geert Uytterhoeven Date: Sun Mar 10 21:01:02 2013 +0100 Shadow: Add support for Atari iplan2p4 Add support for Atari-style interleaved bitplanes, with 2 bytes interleave and 4 bits per pixel. Signed-off-by: Geert Uytterhoeven Acked-by: Keith Packard commit 87af9ab7d52578b0ea315fc4f8dfd906d19755fb Author: Geert Uytterhoeven Date: Sun Mar 10 17:15:05 2013 +0100 Shadow: Add c2p core Add Chunky-to-Planar core functionality, to be used by the Atari and Amiga (interleaved) bitplanes code. Signed-off-by: Geert Uytterhoeven Acked-by: Keith Packard commit 4ee2566c3e420a717be36f79126a14e15edac30f Author: Geert Uytterhoeven Date: Tue Mar 12 18:10:40 2013 +0100 Xfbdev: Treat 1 bpp pseudocolor as monochrome miCreateDefColormap() only preallocates black and white pixels if depth > 1. Hence override the visual, so fbdevCreateColormap() takes care of it. Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit 6dfb94a891ed445f47832ba1364fcbf1de018f4a Author: Geert Uytterhoeven Date: Tue Mar 12 14:16:10 2013 +0100 Xfbdev: Add support for monochrome visuals Monochrome supports StaticGray, with hardcoded black and white pixels. Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit 1049b32166760bdc00106625e213d31a8fc60bad Author: Geert Uytterhoeven Date: Tue Mar 12 14:19:25 2013 +0100 Xfbdev: Handle unset fix.line_length Older frame buffer devices may not fill in fix.line_length, in which case it must be calculated by the application. Signed-off-by: Geert Uytterhoeven commit 5c509c360d97bea78ef461596ab4b7bde69020ac Author: Geert Uytterhoeven Date: Fri Feb 22 13:21:28 2013 +0100 Xfbdev: Make char *fbdevDevicePath const This fixes: hw/kdrive/fbdev/fbdev.c: In function 'fbdevInitialize': hw/kdrive/fbdev/fbdev.c:41:25: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit b08afbc53c1d583c3913b92e67db44823077b112 Author: Geert Uytterhoeven Date: Tue Mar 12 15:20:00 2013 +0100 KDrive: Bail out if screen initialization failed Else we may get a segmentation fault later. Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit e7045c9dd208a1afe36526ab21ef15f8b01c8bd2 Author: Geert Uytterhoeven Date: Sat Feb 23 20:09:22 2013 +0100 test/input: Fix double-aligned test in dix_valuator_alloc() on m68k On m68k, doubles are not 64-bit aligned, just like on i386 and sh. Signed-off-by: Geert Uytterhoeven commit 8bb0616cc2799c2c34448da6337ea8cb9438cda7 Author: Geert Uytterhoeven Date: Fri Feb 22 21:10:07 2013 +0100 miext/shadow/shpacked.c: Remove unused PickBit() define Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f Author: Dave Airlie Date: Wed Apr 10 16:09:01 2013 +1000 xf86: fix flush input to work with Linux evdev devices. So when we VT switch back and attempt to flush the input devices, we don't succeed because evdev won't return part of an event, since we were only asking for 4 bytes, we'd only get -EINVAL back. This could later cause events to be flushed that we shouldn't have gotten. This is a fix for CVE-2013-1940. Signed-off-by: Dave Airlie Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit ddc149beaf708e84fb5573c4322d4f859c517917 Author: Peter Hutterer Date: Mon Feb 27 18:50:46 2012 +1000 Stop the shouting Meanwhile, here in the future lowercase letters have been invented. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 27356a45b4f6bad4d0bbf356e6d976d0c8dd257b Author: Peter Hutterer Date: Mon Feb 27 17:22:16 2012 +1000 dix: only allocate unused classes for master devices Slave devices don't need these and the matching code in CloseDevice() has a IsMaster() condition on freeing these, causing a leak. ==16111== 384 bytes in 4 blocks are definitely lost in loss record 72 of 105 ==16111== at 0x4C28BB4: calloc (vg_replace_malloc.c:467) ==16111== by 0x42AEE2: AllocDevicePair (devices.c:2707) ==16111== by 0x4BAA27: AllocXTestDevice (xtest.c:617) ==16111== by 0x4BA89A: InitXTestDevices (xtest.c:570) ==16111== by 0x425F5E: InitCoreDevices (devices.c:690) ==16111== by 0x5ACB2D: main (main.c:257) Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 98b94c36d6b1d286bbd4cb414e54b4b95a1484b0 Author: Maarten Lankhorst Date: Mon Apr 15 16:53:48 2013 +0200 dix: copy event in TouchConvertToPointerEvent correctly Fixes reading random memory read beyond the end of original event. sizeof device_event: 424 sizeof internal_event: 2800 Signed-off-by: Maarten Lankhorst Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 4bff442ec5aa4b93a3f5c11782d4b7b9d1ae13ac Author: Knut Petersen Date: Tue Feb 26 07:52:59 2013 +0100 Never try to execute BellProcPtr NULL. This prevents xts XI/XDeviceBell-2 test from segfaulting the server. Signed-off-by: Knut Petersen Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9003399708936481083424b4ff8f18a16b88b7b3 Author: Rui Matos Date: Sat Apr 13 04:22:54 2013 +0200 Xi: fix swapped grab mode args for keyboard devices in XIGrabDevice The protocol says that the grab_mode argument applies to the device being grabbed and paired_device_mode to the paired master device. GrabDevice() however takes in a pointer mode and a keyboard mode and so we have to swap the values according the type of device being grabbed. Signed-off-by: Rui Matos Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d16284687ddeffde32a561b8c67b2e2e3d66aeaa Author: Bryce Harrington Date: Wed Apr 10 23:05:40 2013 -0700 xfree86: Revert workaround for drm race condition. Revert 70739e817b2d64bc020ea491f23a3574bdb6155e and mostly revert c31eac647a9ecf0fb20dc98266cadf0ba923ba14. Further investigation shows the encountered race condition is between lightdm and plymouth-splash, as implemented in the Ubuntu distribution within the limitations of upstart's job coordination logic, and can (and should) be fixed within those limiations. Not in xserver itself. This leaves some of the diagnostic improvements from the recent patch series, in case others run into a similar situation. Signed-off-by: Bryce Harrington Signed-off-by: Peter Hutterer commit 131f883f85b9b734e5e5652f16ba1d3b5f4de12f Author: Peter Hutterer Date: Fri Apr 12 09:14:53 2013 +1000 xfree86: change a log message This path is technically executed through config/udev, but having two messages in the form "config/udev: Adding drm device" makes it appear as if the udev filters are wrong and it's trying to add the same device twice. In fact, it's only one device, only added once, but a duplicate log message. Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 22cab8a28a433d03a4e6ba97f9a160271d73cb52 Author: Dave Airlie Date: Wed Apr 10 16:32:15 2013 +1000 xf86: don't hotplug output devices while VT switched. We don't want to hotplug output devices while we are VT switched, as we get races between multiple X servers on the device open, and drm device master status. This just queues device opens until we return from VT switch. Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie commit 5b359cf6135ca173d8f65cb92926332f07f91efe Author: Dave Airlie Date: Wed Apr 10 16:32:11 2013 +1000 xf86: use new xf86VTOwner interface in a few places This replaces some previous uses of direct xf86Screens[0] accesses. Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie commit d61ea1f64db45201c1a2b39c39293c5768d98092 Author: Dave Airlie Date: Wed Apr 10 16:32:02 2013 +1000 xfree86: add VT owner interface This is just a simple interface to avoid accessing x86Screens[0] directly. Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie commit 7347f39f94d8cebbf73ce1a2f94d1abdaf7ff383 Author: Maarten Lankhorst Date: Tue Apr 9 11:19:07 2013 +0200 Xi: Do not handle ET_TouchOwnership in ProcessTouchEvent The event struct is different, causing memory corruption on 1.13 and 1.14, as can be witnessed in https://bugs.freedesktop.org/show_bug.cgi?id=56578 Signed-off-by: Maarten Lankhorst Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit dbba50a1280cbda9ecff6f37884b4c5756c30bab Author: Keith Packard Date: Tue Apr 9 16:23:19 2013 -0700 Xi: Use correct destination when swapping barrier events Write the swapped values to the destination rather than the source. Signed-off-by: Keith Packard Reviewed-by: Jasper St. Pierre Signed-off-by: Peter Hutterer commit b86b3d10bb2fee1a922b8831e8bb415c339f3d99 Author: Peter Hutterer Date: Mon Mar 4 07:58:41 2013 +1000 dix: don't set non-exisiting flags on touch events Unlike pointer/keyboard events, the flags field for ET_Touch* is a set of server-internal defines that we need to convert to XI protocol defines. Currently only two of those defines actually translate to the protocol, so make sure we don't send internal garbage down the wire. No effect to current clients since they shouldn't look at undefined bits anyway. Signed-off-by: Peter Hutterer commit ecf62755086fd65898998d5a509aee5f29a9583d Author: Jeremy White Date: Thu Mar 21 10:58:57 2013 -0500 Define prototypes for hw/xfree86/modes/xf86Modes.c only in xf86Modes.h. This removes a large number of redundant declaration warnings. Signed-off-by: Jeremy White Reviewed-by: Robert Morell Signed-off-by: Keith Packard commit e13f29984251dbbe6076264ed710c2922312eed1 Author: Bryce Harrington Date: Tue Mar 19 12:12:46 2013 -0700 xfree86: Be verbose if waiting on opening the drm device Signed-off-by: Bryce Harrington Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit 70739e817b2d64bc020ea491f23a3574bdb6155e Author: Bryce Harrington Date: Tue Mar 19 12:12:45 2013 -0700 xfree86: Fix race condition failure opening drm. If other processes have had drm open previously, xserver may attempt to open the device too early and fail, with xserver error exit "Cannot run in framebuffer mode" or Xorg.0.log messages about "setversion 1.4 failed". In this situation, we're receiving back -EACCES from libdrm. To address this we need to re-set ourselves as the drm master, and keep trying to set the interface until it works (or until we give up). See https://bugs.launchpad.net/ubuntu/+source/libdrm/+bug/982889 Signed-off-by: Bryce Harrington Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit c31eac647a9ecf0fb20dc98266cadf0ba923ba14 Author: Bryce Harrington Date: Tue Mar 19 12:12:44 2013 -0700 xfree86: Keep trying to set interface on drm for 2 seconds. And if we've had to delay booting due to not being able to set the interface, fess up. Signed-off-by: Bryce Harrington Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit d1cc210de8c13f2db9f6f284ecc652305c28801e Author: Bryce Harrington Date: Tue Mar 19 12:12:43 2013 -0700 xfree86: Provide more details on failure Signed-off-by: Bryce Harrington Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit f059d0dabc553a5f748d86de9115da00be5997d5 Author: Bryce Harrington Date: Tue Mar 19 12:12:42 2013 -0700 xfree86: Track error code and add label for error handling. Signed-off-by: Bryce Harrington Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit 4d7052bd7bbf49b573dc4d34ad14e7f058a0d884 Author: Bryce Harrington Date: Tue Mar 19 12:12:41 2013 -0700 xfree86: (Cleanup) Close fd if drm interface 1.4 could not be set. Signed-off-by: Bryce Harrington Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit c64fa9a2961f82719cc7734a4222f31297a2e593 Author: Maarten Lankhorst Date: Wed Apr 3 12:08:44 2013 +0200 support 32 bpp pixmaps when 24 bpp fb is used. Fixes background corruption in ubuntu. Signed-off-by: Maarten Lankhorst commit 8928f8fa0bb154ce437af703ff702016f0dcf127 Author: Geert Uytterhoeven Date: Mon Mar 18 21:38:10 2013 +0100 kdrive/fbdev: revive randr new screen size logic hw/kdrive/fbdev/fbdev.c: In function 'fbdevRandRSetConfig': hw/kdrive/fbdev/fbdev.c:470:19: warning: variable 'newheight' set but not used [-Wunused-but-set-variable] hw/kdrive/fbdev/fbdev.c:470:9: warning: variable 'newwidth' set but not used [-Wunused-but-set-variable] Signed-off-by: Geert Uytterhoeven Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 808c87bff710263f5a7b3c12a7e7fec54672fecd Author: Peter Hutterer Date: Mon Mar 25 14:51:58 2013 +1000 Revert "kdrive: fix "set but not used" warnings" Partial revert of commit 4149ee8ec0193acbf3812c7ee2627b93b9a89997, better fix coming up. Signed-off-by: Peter Hutterer commit 3a9a6c972e4bc88dc3dde9399df3b0cda759cd70 Author: Maarten Lankhorst Date: Wed Mar 27 10:33:46 2013 +0100 bump version to 0.7.0 commit ac4c2abe985ce6816a3389c41eb23462c6ac2486 Author: vdb@picaros.org Date: Thu Mar 7 16:07:31 2013 +0100 xserver: add monitor Option "ZoomModes" [v2] Section "Monitor" Identifier "a21inch" Option "PreferredMode" "1600x1200" Option "ZoomModes" "1600x1200 1280x1024 1280x1024 640x480" EndSection The option's effect is to search for and mark once each named mode in the output modes list. So the specification order is free and the zoom modes sequence follows the order of the output modes list. All marked modes are available via the Ctrl+Alt+Keypad-{Plus,Minus} key combination. See also http://bugs.freedesktop.org/show_bug.cgi?id=17954. This option has its use for combined monitor and television setups. It allows for easy switching between 60 Hz and 50 Hz modes even when a monitor refuses to display the input signal. (Includes a few minor changes suggested by Aaron for v2) Signed-off-by: Servaas Vandenberghe Reviewed-by: Aaron Plattner Signed-off-by: Keith Packard commit 862bc2836835b93f4b2cfd2de6ca344f65484a00 Author: Maarten Lankhorst Date: Tue Mar 26 15:19:52 2013 +0100 modesetting: return null for get_modes if output could not be retrieved Signed-off-by: Maarten Lankhorst commit 6b79a8791d35bbd1a13ebdec1c582f66c559c039 Author: Maarten Lankhorst Date: Tue Mar 26 15:19:33 2013 +0100 modesetting: clean up leaks Signed-off-by: Maarten Lankhorst commit 2967391c6d35f03121afa8003e0fb94b62495129 Author: Peter Hutterer Date: Thu Feb 28 10:43:05 2013 +1000 Xi: add a comment to make a condition a bit clearer The commit message to 676447190190d8546165e21be242cf16dd69f5ae explains it, but that doesn't stop the WTF moment when reading the code. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 2fdde2c40d83695438b6f5615f98bd7ae801b43d Author: Peter Hutterer Date: Mon Feb 25 15:21:32 2013 +1000 dix: update coords for touch events in PlayReleasedEvents Note: this is only hit for #ifdef PANORAMIX Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 697071ab2b7f8910e01ed74618138538291cd1e8 Author: Peter Hutterer Date: Thu Feb 28 10:30:15 2013 +1000 Xi: compress two if statements with the same body We do the same thing here, compress them into one body. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 11bead1fa205a1353e6a33c6024c7e8ace80be7c Author: Peter Hutterer Date: Mon Feb 25 11:13:52 2013 +1000 dix: fix a comment Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit fc504a44d12d537d4e07f659f1863f200a0272ad Author: Peter Hutterer Date: Fri Mar 1 08:26:06 2013 +1000 Xi: use a temp variable for the new listener Instead of accessing ti->listener[0] all the time. No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 9978b57b8d94f061d72a67b99a02b0ba16a11429 Author: Peter Hutterer Date: Fri Mar 1 08:43:58 2013 +1000 Xi: return !Success from DeliverTouchEmulatedEvent if we didn't deliver All callers currently ignore the new value, so this patch has no effect. Inverse call graph: DeliverTouchEmulatedEvent DeliverEmulatedMotionEvent Ignores value DeliverTouchBeginEvent DeliverTouchEvent DeliverTouchEvents Ignores value DeliverTouchEndEvent DeliverTouchEvent DeliverTouchEvents Ignores value Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 1754973206c09a901747e71d4abdf666293da59e Author: Aaron Plattner Date: Wed Feb 20 17:27:16 2013 -0800 modesetting: match PCI class 3, any subclass If a device is not primary, the PCI device match fails because the xf86-video-modesetting driver looks specifically for a PCI class match of 0x30000 with a mask of 0xffffff. This fails to match, for example, a non-primary Intel VGA device, because it is reported as having a class of 0x38000. Fix that by ignoring the low 16 bits of the class in the pci_id_match table. Signed-off-by: Aaron Plattner Reviewed on IRC by Adam Jackson commit cc3d1a5a6120e721a46c67446ba68f5596055633 Author: Piotr Dziwinski Date: Sat Feb 23 13:14:45 2013 +0100 glx: fix uninitialized var in __glXDRIscreenProbe Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59825 Signed-off-by: Piotr Dziwinski Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit c2ede8f92f0d6f15b1b2a04889cb54cd1728780b Merge: 190b03215 7050aae69 Author: Keith Packard Date: Mon Mar 18 11:26:24 2013 -0700 Merge remote-tracking branch 'whot/for-keith' commit 190b0321510b99d4738915f540cea5c0c51e07e2 Author: Zack Rusin Date: Thu Feb 14 15:06:57 2013 -0800 GLX/DRI2: Do not expose INTEL_swap_event without swap control Swap events depent on the implementation of ScheduleSwap. By unconditionally enabling GLX_INTEL_swap_event we're breaking the system with drivers that don't support it because the apps are forever stuck waiting for an event that will never be delivered. So lets enable the extension only if the hooks it depends on are actually there. Signed-off-by: Zack Rusin Reviewed-by: Ian Romanick Signed-off-by: Keith Packard commit 116f020102fd6c2a603069a639b113dfa31b48b7 Merge: cf89aa537 0f537da72 Author: Keith Packard Date: Mon Mar 18 11:18:58 2013 -0700 Merge remote-tracking branch 'whot/next' commit cf89aa53748b964f9d9eceaa12a7d6f1a076d1ee Author: Tomasz Lis Date: Mon Mar 11 10:21:28 2013 +0100 Full support of sRGB capable fbconfigs. Changes to correctly initialize the sRGB capability attribute and transfer it between XServer and the client. Modifications include extension string, transferring visual config attribs and fbconfig attribs. Also, attribute is initialized in the modules which do not really use it (xquartz and xwin). This version advertises both ARB and EXT strings, and initializes the capability to default value of FALSE. It has corrected required GLX version and does not influence swrast. The sRGB capable attribute is attached only to those configs which do have this capability. Both ARB and EXT versions share the same GLX extension enabling bit. Signed-off-by: Tomasz Lis Reviewed-by: Ian Romanick Signed-off-by: Keith Packard commit 679ccecd8bc6d797e99f3b707f8041b727ca7a49 Author: Keith Packard Date: Mon Mar 18 10:01:20 2013 -0700 Bump release to 1.14.99.0 Get us off the release number so that we don't conflict with the stable branch. Signed-off-by: Keith Packard commit beb1715e96b649a0903fa61f30dd1eb69411da2f Author: Colin Walters Date: Wed Jan 4 22:37:06 2012 +0000 autogen.sh: Implement GNOME Build API http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson commit 7050aae69c2a55dfdbb5c6af7882307e90ba4275 Author: Robert Morell Date: Tue Mar 12 09:40:16 2013 -0700 list.h: Make xorg_list_init inline Otherwise this file is emitted in every unit that includes it. Signed-off-by: Robert Morell Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 31595b528645a7e4903eb81da0fc332d78407f25 Author: Robert Morell Date: Tue Mar 12 09:37:43 2013 -0700 configure.ac: Require inputproto 2.3 This picks up support for Xi pointer barriers in the protocol. Signed-off-by: Robert Morell Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3ac2e61705432951f9e1b96b42b4214e7f748f94 Author: Peter Hutterer Date: Sat Mar 9 17:12:53 2013 +1000 xfixes: ifdef PanoramiXFixes* (#62015) Fixes build failure with --disable-xinerama introduced by 482e0cb cursor: Move pointer barrier code over to XI Reason is new include order: sdksyms.sh includes xfixes.h, which previously did not include xfixesint.h. As of 482e0cb xfixes.h includes xibarriers.h which includes xfixesint.h X.Org Bug 62015 Signed-off-by: Peter Hutterer Tested-by: Daniel Martin commit 5047810a4c20fab444b8c6eb146c55dcdb0d4219 Author: Aaron Plattner Date: Wed Mar 6 09:40:28 2013 -0800 fb: Rename wfbDestroyGlyphCache Renaming this function was missed in commit 9cbcb5bd6a5360a128d15b77a02d8d3351f74366, so both libfb.so and libwfb.so define functions named fbDestroyGlyphCache. Signed-off-by: Aaron Plattner Reviewed-by: Søren Sandmann Signed-off-by: Keith Packard commit 103b77c59e3638a45179bf6d7908f5c738d2d872 Author: Keith Packard Date: Tue Mar 5 22:31:17 2013 -0800 Version bumped to 1.14 Signed-off-by: Keith Packard commit 0f537da72d414ed84e3cd14e3bb7e08565136bd7 Author: Andreas Wettstein Date: Sun Mar 3 20:25:44 2013 +0100 xkb: Fixes to LatchMods/LatchGroup The main problem this patch addresses is that if a latch is put on multi-level key with a Latch/Lock/Set, it is possible that after all keys are released, still base modifiers are set, which typically will make the keyboard unusable. To see how it happens (without the patch), assume that key AltGr sets Mod5 when pressed by itself, and latches Mod3 when pressed together with Shift. Now press Shift, then AltGr and release both keys in reverse order. Mod3 is now latched, and the LatchMods filter remains active as the second filter. Now press AltGr; Mod5 base modifier gets set, and the SetMods filter will become active as the first filter. Release AltGr: First, the SetMods filter will set clearMods to Mod5, then the LatchMods filter will overwrite clearMods with Mod3. Result: the Mod5 base modifier will remain set. This example becomes practically relevant for the revised German standard layout (DIN 2137-1:2012-06). Other changes implement the latch behaviour more accurately according to the specification. For example, releasing a modifier latching key can at the same time clear a locked modifier, promote another modifier that is latched to locked, and latch a third modifier. Overall, what the code does should be straightforward to compare what the XKB protocol specification demands, see the table in section 6.3. Finally, releasing a key no longer cancels a latch that has not become pending yet. In my opinion, the specification is not clear; it speaks of "operating" a key, which the patch effectivly interprets as "press" rather than "press or release". From my experience, using the latter interpretation makes latches on higher levels practically unusable. In the example given above, one would have to release AltGr always before Shift to get the Mod3-Latch. The practical relevance of latches on higher levels is once more given by the revised German standard layout. Signed-off-by: Andreas Wettstein Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit eadda231091aa6feb68207ee22f6bc3a390d4556 Author: Peter Hutterer Date: Fri Feb 15 11:19:09 2013 +1000 xephyr: fix "set but not used warnings" ephyrvideo.c: In function 'ephyrPutVideo': ephyrvideo.c:1009:42: warning: variable 'drw_h' set but not used ephyrvideo.c:1009:31: warning: variable 'drw_w' set but not used ephyrvideo.c:1009:20: warning: variable 'drw_y' set but not used ephyrvideo.c:1009:9: warning: variable 'drw_x' set but not used ephyrvideo.c: In function 'ephyrGetVideo': ephyrvideo.c:1058:42: warning: variable 'drw_h' set but not used ephyrvideo.c:1058:31: warning: variable 'drw_w' set but not used ephyrvideo.c:1058:20: warning: variable 'drw_y' set but not used ephyrvideo.c:1058:9: warning: variable 'drw_x' set but not used ephyrvideo.c: In function 'ephyrPutStill': ephyrvideo.c:1107:42: warning: variable 'drw_h' set but not used ephyrvideo.c:1107:31: warning: variable 'drw_w' set but not used ephyrvideo.c:1107:20: warning: variable 'drw_y' set but not used ephyrvideo.c:1107:9: warning: variable 'drw_x' set but not used ephyrvideo.c: In function 'ephyrGetStill': ephyrvideo.c:1156:42: warning: variable 'drw_h' set but not used ephyrvideo.c:1156:31: warning: variable 'drw_w' set but not used ephyrvideo.c:1156:20: warning: variable 'drw_y' set but not used ephyrvideo.c:1156:9: warning: variable 'drw_x' set but not used Signed-off-by: Peter Hutterer Reviewed-by: Robert Morell commit 4149ee8ec0193acbf3812c7ee2627b93b9a89997 Author: Peter Hutterer Date: Fri Feb 15 11:19:08 2013 +1000 kdrive: fix "set but not used" warnings kinput.c: In function 'KdEnqueueKeyboardEvent': kinput.c:1845:16: warning: variable 'ctrl' set but not used kinput.c:1844:17: warning: variable 'keyc' set but not used kinput.c: In function 'KdEnqueuePointerEvent': kinput.c:1887:12: warning: variable 'ms' set but not used kxv.c: In function 'KdXVDisable': kxv.c:1181:19: warning: variable 'ScreenPriv' set but not used mouse.c: In function 'ps2SkipInit': mouse.c:444:9: warning: variable 'skipping' set but not used mouse.c: In function 'ps2Init': mouse.c:473:10: warning: variable 'waiting' set but not used mouse.c:472:9: warning: variable 'skipping' set but not used fbdev.c: In function 'fbdevRandRSetConfig': fbdev.c:468:19: warning: variable 'newheight' set but not used fbdev.c:468:9: warning: variable 'newwidth' set but not used Signed-off-by: Peter Hutterer Reviewed-by: Robert Morell commit 44fc062f85df7288c17d2d64b73aa4957b91fd6d Author: Peter Hutterer Date: Mon Feb 18 14:57:58 2013 +1000 os: document pnprintf as sigsafe snprintf Signed-off-by: Peter Hutterer commit c100211034ab69ce453a1644fb61c6808d7e3eda Author: Peter Hutterer Date: Tue Dec 18 14:12:40 2012 +1000 dix: only show the cursor if a window defines one (#58398) e02f864fdf "Suppress cursor display until the first XDefineCursor() request" disabled cursor display a priori unless -retro is given. On a plain server, caling XFixesHideCursor() and XFixesShowCursor() would show the default root cursor, despite no client actually defining a cursor. Change the logic, disable CursorVisible by default and only enable it from the window's CWCursor logic. If no window ever defines a cursor, said cursor stays invisible. X.Org Bug 58398 Signed-off-by: Peter Hutterer Tested-by: Bastien Nocera Reviewed-by: Daniel Martin commit 6238bd68bd71323f8b4f1808f34dabe2ae447fe3 Author: Aaron Plattner Date: Tue Mar 5 13:04:46 2013 -0800 DPMS: include GPU screens in DPMS code Otherwise, displays driven by GPU screens remain on all the time. Signed-off-by: Aaron Plattner Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit dd4ab8b572956f9457616869d6e383c8ed964c73 Author: Peter Hutterer Date: Tue Mar 5 10:14:29 2013 +1000 Xi: force dtime to 0 on the first BarrierHit dtime to the previous event is 0 on the first BarrierHit event. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre Signed-off-by: Keith Packard commit 604169af8b67afc74a292cdb9070a3a1f2d7c536 Merge: 8f4640bdb 6ea59dc2d Author: Keith Packard Date: Mon Mar 4 21:09:59 2013 -0800 Merge commit '6ea59dc2d8887102bfd8d7c838d2e7ab17645aec' commit 6ea59dc2d8887102bfd8d7c838d2e7ab17645aec Author: Jasper St. Pierre Date: Sun Mar 3 04:50:55 2013 -0500 xibarriers: Remove accidental use of the comma operator Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit bd58ebe4cf3b0ce60f87fb26a3715f774dabd349 Author: Daniel Martin Date: Thu Dec 20 13:50:17 2012 +0100 ephyr: Fix crash on 24bpp host framebuffer Use bytes_per_line and bits_per_pixel from the created XImage to fix https://bugzilla.redhat.com/show_bug.cgi?id=518960 Signed-off-by: Daniel Martin Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8f4640bdb9d3988148e09a08d2c7e3bab1d538d6 Author: Dave Airlie Date: Wed Jan 9 12:58:28 2013 +1000 randr: cleanup provider properly So in the cold plug server shutdown case, we reap the resources before we call CloseScreen handlers, so the config->randr_provider is a dangling pointer when the xf86CrtcCloseScreen handler is called, however in the hot screen unplug case, we can't rely on automatically reaped resources, so we need to clean up the provider in the xf86CrtcCloseScreen case. This patch provides a cleanup callback from the randr provider removal into the DDX so it can cleanup properly, this then gets called by the automatic code for cold plug, or if hot unplug it gets called explicitly. Fixes a number of random server crashes on shutdown Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58174 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=891140 Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit 3ec35c45ca17f5ed6fd02c50fc49ae7b8d128dcb Author: Dave Airlie Date: Wed Jan 9 12:53:14 2013 +1000 xf86: actually set the compat output in the failure case The previous fix for the previous fix, didn't fully work, If we don't set compat_output we end up doing derferences of arrays with -1, leading to valgrind warnings. Reviewed-by: Chris Wilson Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit da8ee26023fc2868fe970471195a5f3c86fb574b Author: Dave Airlie Date: Wed Jan 9 12:51:45 2013 +1000 xfree86/hotplug: cleanup properly if the screen fails to initialise Due to another bug, the modesetting/udl driver would fail to init properly on hotplug, when it did the code didn't clean up properly, and on removing the device the server could crash. Found in F18 testing. Signed-off-by: Dave Airlie Reviewed-by: Aaron Plattner commit e21e183059df5975e7086850d1931edb2c1bbd06 Author: Marcin Slusarz Date: Thu Feb 21 09:02:44 2013 +1000 os: use libunwind to generate backtraces Libunwind generates backtraces much more reliably than glibc's "backtrace". Before: 0: /opt/xserver/bin/X (0x400000+0x18ce36) [0x58ce36] 1: /opt/xserver/bin/X (xorg_backtrace+0x9) [0x58d119] 2: /opt/xserver/bin/X (0x400000+0x190d69) [0x590d69] 3: /lib64/libpthread.so.0 (0x7fb904268000+0x10a90) [0x7fb904278a90] 4: /lib64/libc.so.6 (ioctl+0x7) [0x7fb902fbf987] 5: /usr/lib64/libdrm.so.2 (drmIoctl+0x28) [0x7fb90405ffa8] 6: /usr/lib64/libdrm.so.2 (drmCommandWrite+0x1b) [0x7fb90406235b] 7: /usr/lib64/libdrm_nouveau.so.2 (nouveau_bo_wait+0x89) [0x7fb902009719] 8: /opt/xserver/lib/xorg/modules/drivers/nouveau_drv.so (0x7fb90220e000+0x76f3) [0x7fb9022156f3] 9: /opt/xserver/lib/xorg/modules/libexa.so (0x7fb9019c7000+0xbae0) [0x7fb9019d2ae0] 10: /opt/xserver/bin/X (0x400000+0x17d2b3) [0x57d2b3] 11: /opt/xserver/bin/X (0x400000+0xc9930) [0x4c9930] 12: /opt/xserver/bin/X (0x400000+0x3a81a) [0x43a81a] 13: /opt/xserver/bin/X (0x400000+0x3d6a1) [0x43d6a1] 14: /opt/xserver/bin/X (0x400000+0x2c2ca) [0x42c2ca] 15: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x7fb902f019b5] 16: /opt/xserver/bin/X (0x400000+0x2c60d) [0x42c60d] 17: ?? [0x0] After: 0: /opt/xserver/bin/X (OsSigHandler+0x39) [0x590d69] 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x7fb904278a8f] 2: /lib64/libc.so.6 (ioctl+0x7) [0x7fb902fbf987] 3: /usr/lib64/libdrm.so.2 (drmIoctl+0x28) [0x7fb90405ffa8] 4: /usr/lib64/libdrm.so.2 (drmCommandWrite+0x1b) [0x7fb90406235b] 5: /usr/lib64/libdrm_nouveau.so.2 (nouveau_bo_wait+0x89) [0x7fb902009719] 6: /opt/xserver/lib/xorg/modules/drivers/nouveau_drv.so (nouveau_exa_download_from_screen+0x1a3) [0x7fb9022156f3] 7: /opt/xserver/lib/xorg/modules/libexa.so (exaGetImage+0x1f0) [0x7fb9019d2ae0] 8: /opt/xserver/bin/X (miSpriteGetImage+0x173) [0x57d2b3] 9: /opt/xserver/bin/X (compGetImage+0xb0) [0x4c9930] 10: /opt/xserver/bin/X (ProcGetImage+0x55a) [0x43a81a] 11: /opt/xserver/bin/X (Dispatch+0x341) [0x43d6a1] 12: /opt/xserver/bin/X (main+0x3ba) [0x42c2ca] 13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x7fb902f019b5] 14: /opt/xserver/bin/X (_start+0x29) [0x42c60d] 15: ? (?+0x29) [0x29] Signed-off-by: Marcin Slusarz Reviewed-by: Peter Hutterer Tested-by: Knut Petersen commit 75815dbb373d5a74d57cbec9d469f9f88a8ee3ef Author: Chris Wilson Date: Mon Dec 3 13:25:19 2012 +0000 Add missing GTF modes A fixed-mode output device like a panel will often only inform of its preferred mode through its EDID. However, the driver will adjust user specified modes for display through use of a panel-fitter allowing greater flexibility in upscaling. This is often used by games to set a low resolution for performance and use the panel fitter to fill the screen. v2: Use the presence of the 'scaling mode' connector property as an indication that a panel fitter is attached to that pipe. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55564 commit e27b2e61632b220ddc36d0d0387581a9f4774f21 Author: Peter Harris Date: Tue Feb 19 16:08:52 2013 -0500 xkb: Set nIndicators in XkbGetIndicatorMap Xlib doesn't use this value (it computes it from the reply length instead) which is why nobody has noticed yet. But the spec http://www.x.org/releases/X11R7.7/doc/kbproto/xkbproto.html says that it should be set. Signed-off-by: Peter Harris Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3aac7a59dc6ef2d8bbf46ba5d37acdf6013e9450 Author: Daniel Martin Date: Tue Dec 11 17:23:55 2012 +0100 ephyr: Add -resizeable option With this option passed, ephyr windows can be resized like normal windows on the fly, without the need of an explicit parent window. Signed-off-by: Daniel Martin Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f9198e278becec158b570204cf9fc1de822ac76b Author: Peter Hutterer Date: Mon Feb 27 16:43:10 2012 +1000 dix: FreeAllAtoms() on reset ==5712== 6 bytes in 1 blocks are still reachable in loss record 17 of 585 ==5712== at 0x4A074CD: malloc (vg_replace_malloc.c:236) ==5712== by 0x3D1DE885B1: strndup (strndup.c:46) ==5712== by 0x41CB71: MakeAtom (atom.c:121) ==5712== by 0x55AE3E: XIGetKnownProperty (xiproperty.c:401) ==5712== by 0x4251C9: AddInputDevice (devices.c:312) ==5712== by 0x42AC0C: AllocDevicePair (devices.c:2657) ==5712== by 0x425E6E: InitCoreDevices (devices.c:677) ==5712== by 0x5ACA05: main (main.c:257) Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 88517ced1fa2e621be2d05a319b522b3111da516 Merge: 82425c66e 73974dd7e Author: Peter Hutterer Date: Fri Feb 15 11:58:52 2013 +1000 Merge branch 'master' of git+ssh://people.freedesktop.org/~alanc/xserver into next commit 82425c66e7a8c436b5be7ad44880dd4be6c1f06a Author: Peter Hutterer Date: Thu Feb 14 10:21:47 2013 +1000 xfree86: remove redundant declaration of inputInfo xf86Cursor.c:19:18: warning: redundant redeclaration of 'inputInfo' [-Wredundant-decls] In file included from xf86Cursor.c:18:0: ../../../include/inputstr.h:614:57: note: previous declaration of 'inputInfo' was here Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 6133c417595a9c8fc158b0d68fd4a7a2c58fdc47 Author: Peter Hutterer Date: Thu Feb 14 10:15:33 2013 +1000 xkb: remove unused variable 'names' xkb.c: In function '_XkbSetNamesCheck': xkb.c:3987:18: warning: variable 'names' set but not used [-Wunused-but-set-variable] Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 63d00c6b146d7f5fb80f20f19066088059042a5e Author: Peter Hutterer Date: Thu Feb 14 10:13:53 2013 +1000 Xext: rename two shadowing variables panoramiX.c: In function 'PanoramiXCreateConnectionBlock': panoramiX.c:599:10: warning: declaration of 'disableBackingStore' shadows a global declaration [-Wshadow] In file included from ../include/windowstr.h:60:0, from panoramiX.c:47: ../include/opaque.h:56:52: warning: shadowed declaration is here [-Wshadow] panoramiX.c: In function 'PanoramiXConsolidate': panoramiX.c:834:19: warning: declaration of 'pScreen' shadows a previous local [-Wshadow] panoramiX.c:813:15: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 8bbea9f48f43e54c55c8b60ea36bda3134a86af2 Author: Peter Hutterer Date: Thu Feb 14 10:09:53 2013 +1000 Xext: renaming shadowing variable xvdisp.c: In function 'ProcXvStopVideo': xvdisp.c:712:11: warning: declaration of 'rc' shadows a previous local [-Wshadow] xvdisp.c:705:17: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 7b79a2e4a11b5c5f0ebaa495828725e235d2b08e Author: Peter Hutterer Date: Thu Feb 14 10:06:55 2013 +1000 fb: drop two unneeded shadowing variables fbpict.c: In function 'fbGlyphs': fbpict.c:188:6: warning: declaration of 'x' shadows a previous local [-Wshadow] fbpict.c:111:9: warning: shadowed declaration is here [-Wshadow] fbpict.c:188:9: warning: declaration of 'y' shadows a previous local [-Wshadow] fbpict.c:111:12: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Soren Sandmann Reviewed-by: Mark Kettenis commit 858d8b19b3a5bb59e5c5f9a9e68adce2495b5e31 Author: Peter Hutterer Date: Thu Feb 14 10:04:06 2013 +1000 xfree86: drop unused prevSIGIO Unused as of 5d309af2ed93e91c7d72f548a11052051efbb40f Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 592d35aef0a8089a344543cf5a425e0537c0431b Author: Peter Hutterer Date: Thu Feb 14 10:02:02 2013 +1000 randr: fix "set but unused" warnings rrcrtc.c: In function 'RRCrtcDetachScanoutPixmap': rrcrtc.c:366:9: warning: variable 'ret' set but not used [-Wunused-but-set-variable] rrcrtc.c: In function 'rrCheckPixmapBounding': rrcrtc.c:505:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable] rrcrtc.c:445:9: warning: unused variable 'i' [-Wunused-variable] Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 90642948cc78834d95f7a3bddaac7ff77b68ed7e Merge: 9a35d4240 eda7dbff5 Author: Keith Packard Date: Thu Feb 14 11:05:48 2013 -0800 Merge remote-tracking branch 'jeremyhu/master' commit 9a35d4240e2aa91ac104f0f9f86f83ff9a2d3d04 Author: Peter Hutterer Date: Thu Feb 14 16:31:13 2013 +1000 os: fix pnprintf OOB buffer read for unterminated length modifiers Format strings with length modifiers but missing format specifier like "%0" will read one byte past the array size. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit eda7dbff5a9f35fefe1e3dedacb82daadbf5945e Author: Jeremy Huddleston Sequoia Date: Sat Feb 9 20:53:02 2013 -0800 XORG_TLS: Pick the first option that works (ie: prefer __thread) Signed-off-by: Jeremy Huddleston Sequoia commit 5da82f872daf25939a8fa04f1561b01f0315a623 Author: Jeremy Huddleston Sequoia Date: Sat Feb 9 20:40:10 2013 -0800 os: Ensure is included in strndup.c Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit 67eaf4b46f678bc904f47dfcab6655e170d843e0 Author: Jeremy Huddleston Sequoia Date: Sat Feb 9 20:34:33 2013 -0800 XQuartz: Ensure is included in capabilities.c Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit 955d434f4d755d00a24ae4068b9957765989d672 Author: Keith Packard Date: Wed Feb 13 21:39:37 2013 -0800 Update to version 1.3.99.902 (1.14 RC2) Signed-off-by: Keith Packard commit 7115f6c709898a5124b67e19c61dc01334471358 Author: Aaron Plattner Date: Wed Jan 23 16:58:47 2013 -0800 randr: unref the provider shared pixmap the appropriate number of times When an RandR shared pixmap is created in rrCreateSharedPixmap, it has a refcnt of 1. Then, PixmapShareToSlave bumps the refcnt to 2. However, there's no corresponding PixmapUnshareFromSlave where the refcnt can be decreased again, and there's no convenient common place where the refcnt can be decremented when the slave pixmap is destroyed. Fix this by just unreffing the pixmap twice in RRCrtcDetachScanoutPixmap. Signed-off-by: Aaron Plattner Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit da92690107d90061205340d4cdc98b73b59db9b2 Author: Aaron Plattner Date: Mon Feb 11 14:31:56 2013 -0800 xf86: use nt_list_for_each_entry_safe to walk InputHandlers in xf86Wakeup This is necessary when the input handler deletes itself from the list. Bug found by Maarten Lankhorst, this patch uses the list macros instead of open-coding the fix. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit d0a14877872b6a33172fb8c8f335792a28b9499b Author: Bryce Harrington Date: Fri Feb 8 15:56:02 2013 -0800 xfree86: Man page shouldn't say Device is mandatory anymore man xorg.conf states that the 'Device' identifier is required in the 'Screen' section, yet current xserver defaults properly and boots up fine without it. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=20742 Signed-off-by: Bryce Harrington Signed-off-by: Keith Packard commit 5e91054aa070ea09b61325b7ec479d767b02730e Author: Bryce Harrington Date: Fri Feb 8 15:56:01 2013 -0800 xfree86: Use fbdev/vesa driver on Oaktrail, Medfield, CDV rather than -intel Instead of defaulting to -intel for Oaktrail, Medfield, and CDV chips, default to -fbdev. For Poulsbo (only), attempt to use -psb if it's installed, and fallback to fbdev otherwise. All other Intel chips should use -intel. This fixed an issue where -intel would load on these chips and cause a boot failure. Newer -intel drivers avoid the boot hang, but it's still the wrong driver to load, so why take chances. The patch was originally created by Stefan Dirsch for OpenSUSE. We have included it in our stable release (Ubuntu "quantal" 12.10) since December. ref: https://bugzilla.novell.com/show_bug.cgi?id=772279 ref: https://bugs.launchpad.net/ubuntu/+bug/1069031 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60514 Signed-off-by: Bryce Harrington Signed-off-by: Keith Packard commit c1602d1c17967bdd4db9db19b3a9c0dfca6a58aa Author: Dave Airlie Date: Tue Feb 5 07:46:06 2013 -0800 randr: bump advertised RandR version to 1.4 Signed-off-by: Dave Airlie Reviewed-by: Aaron Plattner Tested-by: Aaron Plattner Signed-off-by: Keith Packard commit 9f79e93b6b3416055d08a0e8f9f16d5fd0649e36 Author: Peter Hutterer Date: Wed Jan 30 03:20:07 2013 +0000 Short-cut the input device cleanup process during AbortServer() If we're about to abort, we're already in the signal handler and cannot call down to the default device cleanup routines (which reset, free, alloc, and do a bunch of other things). Add a new DEVICE_ABORT mode to signal a driver's DeviceProc that it must reset the hardware if needed but do nothing else. An actual HW reset is only required for some drivers dealing with the HW directly. This is largely backwards-compatible, hence the input ABI minor bump only. Drivers we care about either return BadValue on a mode that's not DEVICE_{INIT|ON|OFF|CLOSE} or print an error and return BadValue. Exception here is vmmouse, which currently ignores it and would not reset anything. This should be fixed if the reset is required. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b58221f9da8c549d979215271359c6cd88b5568a Author: Peter Hutterer Date: Fri Feb 8 14:52:02 2013 +1000 dix: support the transformation matrix for relative devices. The transformation matrix we previously stored was a scaled matrix based on the axis ranges of the device. For relative movements, the scaling is not required (or desired). Store two separate matrices, one as requested by the client, one as the product of [scale . matrix . inv_scale]. Depending on the type of movement, apply the respective matrix. For relative movements, also drop the translation component since it doesn't really make sense to use that bit. Input ABI 19 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b173eb2ae3349c557db1ff9e424fa540b8289bb2 Author: Keith Packard Date: Fri Feb 8 08:57:43 2013 -0800 os: Round fraction in pnprintf %f format Truncating the fraction part leads to a test failure where -1203.30 is printed as -1203.29. Round this to the nearest value instead by adding 0.5 before converting to an integer Signed-off-by: Keith Packard commit 509b3c3dc82e7abce1900d5e1cddd90f23be5a87 Author: Carlos Garnacho Date: Wed Feb 6 14:07:22 2013 +0100 dix: Set focus field on XI2 crossing events Set on DeviceEnterLeaveEvent() the xXIEnterEvent->focus field similarly to how the CoreEnterLeaveEvent() function above does for core events. This fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=677329 reported to GTK+, where focus handling on window managers with sloppy focus or no window manager present was broken due to this field being always set to FALSE. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3e4be4033aed78b2bb3a18d51f0963989efd1af3 Author: Peter Hutterer Date: Fri Jan 25 11:47:32 2013 +1000 dix: when shutting down slave devices, shut down xtest devices last XTest devices are the first ones in the list, being initialised together with the master devices. If we disable the devices in-order and a device has a button down when being disabled, the XTest device is checked for a required button release (xkbAccessX.c's ProcessPointerEvent). This fails if the device is already NULL. Instead of putting the check there, disable the devices in the reverse order they are initialised. Disable physical slaves first, then xtest devices, then the master devices. Testcase: shut down server with a button still held down on a physical device Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 0d5bb882600ee7734af034fbea935a79d21d1e70 Merge: b33fcb149 61a99aff9 Author: Peter Hutterer Date: Fri Feb 8 14:10:52 2013 +1000 Merge branch 'ptraccel-fixes' into for-keith commit 61a99aff9d33728a0b67920254d2d4d79f80cf39 Author: Peter Hutterer Date: Fri Jan 11 14:22:07 2013 +1000 dix: pre-scale relative events from abs devices to desktop ratio (#31636) Absolute devices may send relative events depending on the mode (synaptics by default, wacom per option). The relative events are added to the previous position, converted into device coordinates and then scaled into desktop coordinates for pointer movement. Because the device range must be mapped into the desktop coordinate range, this results in uneven scaling depending dimensions, e.g. on a setup with width == 2 * height, a relative movement of 10/10 in device coordinates results in a cursor movement of 20/10 (+ acceleration) Other commonly user-visible results: * the touchpad changing acceleration once an external monitor as added. * drawing a circle on a wacom tablet in relative mode gives an ellipsis in the same ratio as the desktop dimensions. Solution: pre-scale the incoming relative x/y coordinates by width/height ratio of the total desktop size. Then add them to the previous coordinates and scale back with the previous mapping, which will undo the pre-scaling and give us the right movement. X.Org Bug 31636 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit a6ba2b79ae8ad0fdee3f208d5e030b012df48785 Author: Peter Hutterer Date: Fri Jan 11 08:53:24 2013 +1000 dix: unify prefix for ptraccel debugging in DebugAccelF macro If we're already using our own custom macro, might as well use it properly. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 0d7d79406011169ad95e23c6e937f6d15a5ec3cc Author: Peter Hutterer Date: Fri Jan 11 08:52:08 2013 +1000 dix: use BUG_RETURN_VAL for an error message Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit a0c38ea6cbad61edcfefff0e5dd6330edb706f13 Author: Peter Hutterer Date: Fri Jan 11 08:49:15 2013 +1000 dix: add some more info to a ptraccel debug msg Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 95125a7c0cbbbae40216a0497acdd863ddc645ed Author: Peter Hutterer Date: Thu Jan 10 13:19:27 2013 +1000 dix: fix ptraccel debugging printfs This is mostly sigsafe code, so use sigsave printf. And update some fields to double that used to be int. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit b33fcb149710a28fd8767b2307a97bf367de695e Author: Andreas Wettstein Date: Tue Jan 29 21:49:20 2013 +0100 xkb: Fix repeat behaviour of redirect and message actions The redirect and the message action filter functions implicitly assumed that when they receive an event for the same keycode they were activated for, that this is the a release of the key that activated the filter. This is not true if the key autorepeats. Due to the incorrect assumption, the effective key repeat rate was effectively halved. Signed-off-by: Andreas Wettstein Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8571c648a79444bcee9a0fe6e395129116372f49 Author: Peter Hutterer Date: Sat Jan 26 15:53:08 2013 +1000 Xext: if a root window is given in XTestFakeInput, move to that For absolute events, if the client specifies a screen number offset the coordinates by that. And add a new flag so we know when _not_ to add the screen offset in GPE. Without this offset and the flag, GPE would simply add the offset of the current screen if POINTER_SCREEN is set. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 9fd6cb89539fde44a41ae5183c89ef9c8831c8dd Author: Peter Hutterer Date: Tue Jan 29 15:13:44 2013 +1000 Xext: pass the current screen to miProcessDeviceEvent() from xtest calls Not passing in a screen means we skip the screen crossing updates, so a xtest event that changes between ScreenRecs won't do so until the next physical event comes in or never, whichever comes earlier. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit a191dbfe850ed9c6440346f59cb0078e0e844edc Author: Sybren van Elderen Date: Tue Jan 29 15:43:57 2013 +1000 dix: when scaling from desktop coord, take the total desktop size (#51904) Scaled is already in desktop coordinates, take the total width into account, not just the current screen's width. Fixes Xdmx pointer position calculation. X.Org Bug 51904 Signed-off-by: Sybren van Elderen Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 1cb19803f0f8dfd1e0fb9d189afe2262e24a0be5 Author: Peter Hutterer Date: Tue Jan 29 12:51:15 2013 +1000 include: fix typo in list description Signed-off-by: Peter Hutterer commit 3d35dfcf5bad1b0a028fbecd65cb6cf6ebf12503 Author: Ted Felix Date: Tue Jan 29 16:36:48 2013 +1000 xfree86: bail on misformed acpi strings (#73227) If acpid sends a string in a format that we can't parse, bail out instead of potentially dereferencing a NULL-pointer. X.Org Bug 73227 Signed-off-by: Ted Felix Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit fdc451588816c4bc798d54e56316530e9066be80 Author: Peter Hutterer Date: Tue Jan 29 11:01:29 2013 +1000 Xi: limit valuator copy to valuator array size (#59939) mask[(MAX_VALUATORS + 7)/8] is larger than data[MAX_VALUATORS], so static code checkers think we may be running OOB on the data array. Mask is initialized to 0, so this should not happen, but change it anyway to shut up code analyzer noise. X.Org Bug 59939 Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 48bc30c5413a1be0039fa77affcbbb4fe677479f Author: Alan Coopersmith Date: Tue Jan 29 10:24:32 2013 +1000 Xext: avoid null-pointer dereference in XTestFakeInput (#59937) dv is still NULL at this point, so return firstValuator instead (which is the same value dv->firstValuator would be once initialized) X.Org Bug 59937 Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 1058fcf57fdcb94d92e7b5f4483b347853d5f8e6 Author: Peter Hutterer Date: Sat Jan 26 14:13:33 2013 +1000 dmx: don't include dmx-config.h from xdmxconfig (#37502) dmx-config.h is a server header which includes dix-config.h. That again defines a bunch of server-specifics, including setting the size of XID to 32 bit. libX11 uses unsigned long (8 bits on x86_64). XGCValues thus ends up being 16 bytes smaller in xdmxconfig than in the library, causing garbage to be sent to the server. X.Org Bug 37502 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit ac34281b8a487640c61f258ae45a6f17a4fb3cc0 Author: Dave Airlie Date: Thu Feb 7 12:24:20 2013 +1000 modesetting: provide dummy hooks for shadow Since in some wierd cases the server can call these without checking they exist. Signed-off-by: Dave Airlie commit 73974dd7ea9ca4d4cdd5464cb813088a6ee9770b Author: Alan Coopersmith Date: Sun Jan 27 15:42:02 2013 -0800 Avoid memory leak in ddc resort() if find_header() fails Call find_header first, returning on failure before calling malloc. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit b1129a1f1771c9d1653cc15aae94a614f081638a Author: Alan Coopersmith Date: Sun Jan 27 14:00:54 2013 -0800 xf86XvMCScreenInit: Avoid leak if dixRegisterPrivateKey fails Found by parfait 1.1 memory analyser: Memory leak of pointer 'pAdapt' allocated with malloc((88 * num_adaptors)) at line 162 of hw/xfree86/common/xf86xvmc.c in function 'xf86XvMCScreenInit'. 'pAdapt' allocated at line 158 with malloc((88 * num_adaptors)). Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 563db909bcf965b6103c1807bf9f00ede957077d Author: Alan Coopersmith Date: Sun Jan 27 13:55:50 2013 -0800 Avoid memory leak on realloc failure in localRegisterFreeBoxCallback Also avoids leaving invalid pointers in structures if realloc had to move them elsewhere to make them larger. Found by parfait 1.1 code analyzer: Memory leak of pointer 'newCallbacks' allocated with realloc(((char*)offman->FreeBoxesUpdateCallback), (8 * (offman->NumCallbacks + 1))) at line 328 of hw/xfree86/common/xf86fbman.c in function 'localRegisterFreeBoxCallback'. 'newCallbacks' allocated at line 320 with realloc(((char*)offman->FreeBoxesUpdateCallback), (8 * (offman->NumCallbacks + 1))). newCallbacks leaks when newCallbacks != NULL at line 327. Memory leak of pointer 'newPrivates' allocated with realloc(((char*)offman->devPrivates), (8 * (offman->NumCallbacks + 1))) at line 328 of hw/xfree86/common/xf86fbman.c in function 'localRegisterFreeBoxCallback'. 'newPrivates' allocated at line 324 with realloc(((char*)offman->devPrivates), (8 * (offman->NumCallbacks + 1))). newPrivates leaks when newCallbacks == NULL at line 327. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 08f75d3a9661c6c32800e1b4f150626200b889d9 Author: Alan Coopersmith Date: Sun Jan 27 13:50:30 2013 -0800 Avoid NULL pointer dereference in xf86TokenToOptinfo if token not found Reported by parfait 1.1 code analyzer: Error: Null pointer dereference (CWE 476) Read from null pointer 'p' at line 746 of hw/xfree86/common/xf86Option.c in function 'xf86TokenToOptName'. Function 'xf86TokenToOptinfo' may return constant 'NULL' at line 721, called at line 745. Null pointer introduced at line 721 in function 'xf86TokenToOptinfo'. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit c1c01e350834a23161b33bd34b2fa9c01d02a65b Author: Alan Coopersmith Date: Sun Jan 27 13:10:08 2013 -0800 Make xf86ValidateModes actually copy clock range list to screen pointer Our in-house parfait 1.1 code analysis tool complained that every exit path from xf86ValidateModes() in hw/xfree86/common/xf86Mode.c leaks the storeClockRanges allocation made at line 1501 with XNFalloc. Investigating, it seems that this code to copy the clock range list to the clockRanges list in the screen pointer is just plain insane, and according to git, has been since we first imported it from XFree86. We start at line 1495 by walking the linked list from scrp->clockRanges until we find the end. But that was just a diversion, since we've found the end and immediately forgotten it, and thus at 1499 we know that storeClockRanges is NULL, but that's not a problem since we're going to immediately overwrite that value as the first thing in the loop. So we move on through this loop at 1499, which takes us through the linked list from the clockRanges variable, and for every entry in that list allocates a new structure and copies cp to it. If we've not filled in the screen's clockRanges pointer yet, we set it to the first storeClockRanges we copied from cp. Otherwise, as best I can tell, we just drop it into memory and let it leak away, as parfait warned. And then we hit the loop action, which if we haven't hit the end of the cp list, advances cp to the next item in the list, and then just for the fun of it, also sets storeClockRanges to the ->next pointer it has just copied from cp as well, even though it's going to overwrite it as the very first instruction in the loop body. v2: rewritten using nt_list_* macros from Xorg's list.h header Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 89badba082c81d20fe35cb064c16e131ff288ca3 Author: Alan Coopersmith Date: Sun Jan 27 12:08:47 2013 -0800 Free keymap on error in Xephyr's hostx_load_keymap Found by parfait 1.1 code analyser: Memory leak of pointer 'keymap' allocated with XGetKeyboardMapping(HostX.dpy, min_keycode, ((max_keycode - min_keycode) + 1), &host_width) at line 861 of hw/kdrive/ephyr/hostx.c in function 'hostx_load_keymap'. 'keymap' allocated at line 845 with XGetKeyboardMapping(HostX.dpy, min_keycode, ((max_keycode - min_keycode) + 1), &host_width). Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 48b94651205b175760904e448f94111d1ab85e13 Author: Alan Coopersmith Date: Sun Jan 27 11:20:45 2013 -0800 Stop leaking overlayWin in PanoramiXCompositeGetOverlayWindow error paths Found by parfait 1.1 code analyzer: Error: Memory leak (CWE 401) Memory leak of pointer 'overlayWin' allocated with malloc(72) at line 806 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'. pointer allocated at line 794 with malloc(72). leaks when rc != 0 at line 804. at line 816 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'. pointer allocated at line 794 with malloc(72). leaks when pOc == NULL at line 815. at line 825 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'. pointer allocated at line 794 with malloc(72). leaks when cs->pOverlayWin == NULL at line 822 and compCreateOverlayWindow(pScreen) == 0 at line 823. at line 834 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'. pointer allocated at line 794 with malloc(72). leaks when rc != 0 at line 832. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit f4a9332ad149ed15353a9c482563bdd042d0b403 Author: Alan Coopersmith Date: Sun Jan 27 10:06:42 2013 -0800 Handle failure to create counter in init_system_idle_counter Check for NULL pointer (which can be returned for multiple reasons) before trying to dereference it to add privates. To avoid memory leak in error path, delay malloc of privates until we're ready to add them. In case we do return NULL up through SyncInitDeviceIdleTime, handle the possibility of getting NULL passed back down to SyncRemoveDeviceIdleTime. As reported by parfait 1.1: Error: Null pointer dereference (CWE 476) Read from null pointer 'idle_time_counter' at line 2764 of xserver/Xext/sync.c in function 'init_system_idle_counter'. Function 'SyncCreateSystemCounter' may return constant 'NULL' at line 952, called at line 2756. Null pointer introduced at line 952 in function 'SyncCreateSystemCounter'. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 7fe5e6dfa5c1e71d8b7540b28c1d508687a2fbee Author: Jasper St. Pierre Date: Wed Jan 23 13:11:55 2013 -0500 protocol-versions: Bump minor version of XI This was accidentally excluded when we added barriers. Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 70b127c9f1c53bdb42f078265e67f76b464deae2 Author: Aaron Plattner Date: Thu Jan 10 17:01:17 2013 -0800 config/udev: fix "removing GPU device" format string mistake udev.c: In function 'device_removed': udev.c:270:9: warning: format '%d' expects argument of type 'int', but argument 3 has type 'const char *' [-Wformat] Signed-off-by: Aaron Plattner Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 605dfc6804a05ff2bda5692fec26c37344fd95cb Author: Dave Airlie Date: Tue Jan 22 07:39:53 2013 +1000 xserver: fix build regression since 91ab237358c6e33da854914d3de493a9cbea7637 inputstr, double defines TouchListener typedef, maybe some gcc handles it, but not all. fixes tinderbox Reported-by: Jon TURNEY Signed-off-by: Dave Airlie Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 069d8ed3eb659c48dd2b0f8b7b8c11f092fdb362 Merge: 591c06277 d6dcde7a0 Author: Keith Packard Date: Sun Jan 20 15:58:38 2013 -0800 Merge remote-tracking branch 'jturney/xserver-next' commit 591c06277bb120ab9615633f2d28addbd3a2aa5f Merge: 6703a7c7c fa6ab7d9b Author: Keith Packard Date: Sun Jan 20 15:52:26 2013 -0800 Merge remote-tracking branch 'whot/for-keith' commit cde7cbe9674e8a771f9a4e646c1772a46a8230fb Author: Peter Hutterer Date: Thu Jan 10 13:20:12 2013 +1000 os: add support for %f to pnprintf This is the lazy man's %f support. Print the decimal part of the number, then append a decimal point, then print the first two digits of the fractional part. So %f in sigsafe printing is really %.2f. No boundary checks in place here. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 20def57632583aef095ca18792c7fce16d2d9004 Author: Peter Hutterer Date: Thu Jan 10 13:24:05 2013 +1000 os: silently ignore length modifiers in pnprintf Until we have support for them, ignore any length modifiers so we don't need to update all callers. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit f53b2012f39085d866f267dda1442a48ace3c5a5 Author: Peter Hutterer Date: Thu Jan 17 16:19:51 2013 +1000 test/signal-logging: simplify tests using sprintf Ever looked at your own code and thought 'WTF was I thinking?'. yeah, that. Instead of passing in the expected string just use sprintf to print the number for us and compare. In the end we're just trying to emulate printf behaviour anyway. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d6dcde7a03bb38c17ffc4ec5f0ca1c161e54569f Author: Jon TURNEY Date: Sat Feb 11 12:22:17 2012 +0000 hw/xwin: Stop assuming WS_EX_APPWINDOW style in WM_SHOWWINDOW Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 56e94403f8f9182e05428d895a983371c7737d2a Author: Jon TURNEY Date: Wed Jan 9 20:15:01 2013 +0000 hw/xwin: Use ITaskBarList interface to ensure show-on-taskbar state is updated correctly Use ITaskBarList interface to ensure that the taskbar notices if the window has changed it's style in a way which affects if the taskbar shows it or not. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c94d1cb0a49106f44714f4511720a197cc549164 Author: Jon TURNEY Date: Thu Jan 10 14:35:56 2013 +0000 hw/xwin: Ensure full styling is applied when the window is mapped Move styling update code from WM_WM_HINTS_EVENT to a function UpdateStyle(), which is also invoked from WM_WM_MAP3, so everything which needs to be done to style the window happens when it is mapped (Otherwise, the appearance of the window is sensitive to the timing of the notification of the windows appearance hint properties being set relative to window creation. e.g. see [1]) [1] http://sourceware.org/ml/cygwin-xfree/2012-06/msg00004.html Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit ef61f8cacc84080c9156675f9ce26a27e8a90ac1 Author: Jon TURNEY Date: Sat Mar 31 18:45:28 2012 +0100 hw/xwin: Make sure that WM_WM_HINTS_EVENT does nothing for override-redirect windows Future work: It looks like this code could be rationalized quite a lot: It might make sense to pull the checking for override-redirect up out of UpdateIcon() and UpdateName() and consolidate WM_WM_MAP2 and WM_WM_MAP3 Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3628559e594fcbdfcc14b1e8fa60aa841f184e19 Author: Jon TURNEY Date: Sun Feb 5 11:25:39 2012 +0000 hw/xwin: Add a new WM_WM_HINTS_EVENT event to update window style Add a new WM_WM_HINTS_EVENT event to update window style if any of the properties which affect window style change Check PropertyNotify events for any of the window properties which we consider to decide on the window style, and update the window style by sending a WM_WM_HINTS_EVENT message to the WM. This allows the styling of the window to change during it's lifetime. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 066ecbd11d516ea68d7ebc7470232d01c5717546 Author: Jon TURNEY Date: Thu Jan 10 14:37:45 2013 +0000 hw/xwin: Move reshape code from winUpdateWindowPosition() to the map event handler Move reshape code, which was only used when handling a map event, from winUpdateWindowPosition(), to put it explicitly in the map event handler. Remove 'reshape' parameter from winUpdatePosition(). (Note that there's no handling of the ShapeNotify event to notice when the window shape changes, instead we hook the screen SetShape procedure and reshape the native window then) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 852d1fb042f4160fe023a015f1c9a34126bf911a Author: Ryan Pavlik Date: Sat Dec 1 16:58:40 2012 +0000 hw/xwin: Add missing include xwin-config.h to winglobals.h winglobals.h checks if RELOCATE_PROJECTROOT is defined to see if a declaration of g_fLogFileChanged is needed, so must include xwin-config.h Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit ab686ce029208abf970a4bcd1435bf8411a44de9 Author: Ryan Pavlik Date: Wed Oct 26 17:03:25 2011 -0500 include: Add RELOCATE_PROJECTROOT to xwin-config.h header RELOCATE_PROJECTROOT is AC_DEFINED in configure.ac, but currently has no effect as it doesn't appear in any AC_CONFIG_HEADER header. When packaged for Windows, we do not have a unix-style filesystem tree, where file needed by the X server can be found in fixed, absolute paths under the prefix (PROJECTROOT). Instead, the filesystem tree containing files needed by the X server and clients will be installed with the directory containing the X server executable as the root directory of that tree. (Typically, this will be in the Program Files directory, which does not have a fixed name, as it can be moved, localized, or added to to indicate x86 or x64 binaries) So, RELOCATE_PROJECTROOT is used to make a native Windows build of the X server look for various files (fonts, xkb data) in locations relative to the X server rather than at absolute paths, by translating those paths at run-time. Additionally the XKEYSYMDB, XERRORDB, XLOCALEDIR env vars checked by libX11 are set appropriately for clients started by the X server. Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit fa6ab7d9b2d7fd8184f1e068360607845f5c33ab Merge: adde4e644 0e1ab433f Author: Peter Hutterer Date: Fri Jan 11 14:58:17 2013 +1000 Merge branch 'pointer-emulation-fixes-56558-v2' into for-keith commit adde4e64480315dc5b47a727ee37d86f5cd8584f Author: Peter Hutterer Date: Thu Jan 10 10:33:05 2013 +1000 dix: typo fix in comment Signed-off-by: Peter Hutterer commit 05ed095dd8d6cf939b4ebd9a59d70ce32705df7c Author: Benjamin Tissoires Date: Wed Jan 9 19:32:19 2013 +0100 dix: fix error logging occuring in signal context of GetTouchEvents GetTouchEvents is usually called in a signal context. Calling ErrorF for the error messages leads to X complaining about log: (EE) BUG: triggered 'if (inSignalContext)' (EE) BUG: log.c:484 in LogVMessageVerb() (EE) Warning: attempting to log data in a signal unsafe manner while in signal context. Please update to check inSignalContext and/or use LogMessageVerbSigSafe() or ErrorFSigSafe(). The offending log format message is: %s: Attempted to start touch without x/y (driver bug) Signed-off-by: Benjamin Tissoires Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f4a58469a298c226668fd8dce375bf22331c902d Author: Peter Hutterer Date: Wed Jan 9 13:58:56 2013 +1000 xfree86: don't access the old input handler after freeing it Introduced in 323869f3298cbbfe864af9404a8aed1bf7995d79 Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 205cfbd6d9824fb9a67c21b19bc8f1e66c9df4d2 Author: Dave Airlie Date: Sat Jan 5 18:35:42 2013 +1000 xf86: bump input ABI version to 19 The changes to miPointerSetPosition interface from int->double breaks the SIS driver build, so time to bump this. Signed-off-by: Dave Airlie Signed-off-by: Peter Hutterer commit ad3bc571348a7007a2960bf87ae739397c5511ee Author: Peter Hutterer Date: Tue Jan 8 11:19:09 2013 +1000 xfree86: update the device state for all DGA events (#59100) DGA only handles master devices but it does intercept slave device events as well (since the event handlers are per event type, not per device). The DGA code must thus call into UpdateDeviceState to reset the button/key state on the slave device before it discards the remainder of the event. Test case: - Passive GrabModeSync on VCP - Press button - Enable DGA after ButtonPress - AllowEvents(SyncPointer) - Release button The button release is handled by DGAProcessPointerEvent but the device state is never updated, so the slave ends up with the button permanently down. And since the master's button state is the union of the slave states, the master has the button permanently down. X.Org Bug 59100 Reported-by: Steven Elliott Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit c5f2818edbec2f87383baa6c6be5c389b73ca6f9 Author: Peter Hutterer Date: Tue Jan 8 10:13:53 2013 +1000 xfree86: set event->detail for DGA pointer events Reported-by: Steven Elliott Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 519d183d78e0b0eaf47a473e94f5d8611baf8463 Author: Peter Hutterer Date: Mon Jan 7 10:44:33 2013 +1000 Fix two typos "requires an string value" Signed-off-by: Peter Hutterer commit 4e13dd90144dde47550aceea4db4b4329e531279 Author: Peter Hutterer Date: Wed Aug 22 10:34:07 2012 +1000 dix: don't filter RawEvents if the grab window is not the root window (#53897) If a XI2.1+ client has a grab on a non-root window, it must still receive raw events on the root window. Test case: register for XI_ButtonPress on window and XI_RawMotion on root. No raw events are received once the press activates an implicit grab on the window. X.Org Bug 53897 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit a2037d7080ae64ea55f7d76971716346aa3ec6d3 Author: Jon TURNEY Date: Wed Nov 28 22:25:35 2012 +0000 hw/xwin: Fix MinGW build of winSetAppModelID.c Add missing #include In file included from /jhbuild/checkout/xorg/xserver/hw/xwin/winSetAppUserModelID.c:31:0: /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:140:11: error: expected declaration specifiers or ‘...’ before ‘pthread_t’ /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:141:11: error: expected declaration specifiers or ‘...’ before ‘pthread_t’ /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:142:11: error: expected declaration specifiers or ‘...’ before ‘pthread_mutex_t’ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit f57100bb36eae3b4d75f3c315973405f705b8de6 Author: Jon TURNEY Date: Tue Feb 23 13:38:48 2010 +0000 hw/xwin: Process one Windows message per wakeup, rather than all of them. De-queuing Windows messages and X events happens in the same thread of execution. Draining the windows message queue can lead to the X event queue overflowing if lots of those windows messages cause X events (e.g. if a keyboard macro program has just dumped thousands of keypresses into the Windows message queue). See the mailing list thread [1] for more details. Processing one Windows message per wakeup, rather than all of them gives the X server a chance to do stuff as well after each message. [1] http://cygwin.com/ml/cygwin-xfree/2010-01/msg00056.html Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e30e1ea98720acc583f34c830a1c1b7e3e88f694 Author: Jon TURNEY Date: Mon Dec 17 22:38:25 2012 +0000 hw/xwin: Fix some comments in winkeybd.c Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 6f4a48f8a55bc54b6d3e9d80734be05750c024de Author: Jon TURNEY Date: Thu Apr 1 15:08:26 2010 +0100 hw/xwin: Bring the X screen window to the front on a single left-click on the tray icon Bring the X screen window to the front on a single left click on the tray icon, like the comment says we do Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 6703a7c7cf1a349c137e247a0c8eb462ff7b07be Author: Keith Packard Date: Tue Jan 8 20:24:32 2013 -0800 hw/xfree86: Require only one working CRTC to start the server. Instead of requiring every mode set to complete successfully, start up as long as at least one CRTC is working. This avoids failures when one or more CRTCs can't start due to mode setting conflicts. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 34a571c5b9781025897ba5e5c5e2a34ae5262266 Author: Dave Airlie Date: Wed Jan 9 13:04:00 2013 +1000 modesetting: bump to 0.6.0 commit 8650ff14a52047173fa32f12f22ec6f4e38ff433 Author: Dave Airlie Date: Wed Jan 9 12:48:30 2013 +1000 modesetting: fix crashes caused by udev race conditions So the kernel removes the device, and the driver processes the first udev event, and gets no output back from the kernel, so it check and don't fall over. This fixes a couple of crashes seen when hotplugging USB devices. Signed-off-by: Dave Airlie commit 0e1ab433f4048b3367bb2f01d16cd00502538e4d Author: Peter Hutterer Date: Fri Jan 4 12:26:58 2013 +1000 dix: remove already-moved hunk Should've been removed in bc1f90a615018c05994fae3e678dd2341256cd82a, but got left here due to a botched rebase. Fixes stray button events sent to clients after deactivating an async pointer grab on a pointer-emulating-touch. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 32a6d8a6b59c42f8d65002d7ca1cafb1957b656f Author: Peter Hutterer Date: Thu Dec 20 16:25:43 2012 +1000 dix: check for the right device's xi2 mask events.c: In function 'DeactivatePointerGrab': events.c:1524:51: warning: 'dev' may be used uninitialized in this function [-Wuninitialized dev is unset when we get here, the device to check is "mouse". Introduced in ece8157a59751b3ed492fb2e1eb8d5f20221e195. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit f59499b5d05fde83813709e9848152951592120d Author: Peter Hutterer Date: Tue Oct 30 12:44:08 2012 +1000 dix: add resource type to touch listeners Instead of guessing what resource type the listener is and what property to retrieve, store the resource type in the listener directly. Breaks XIT test cases: TouchGrabTestMultipleTaps.PassiveGrabPointerEmulationMultipleTouchesFastSuccession Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56557 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Reviewed-by: Chase Douglas commit 9ad0fdb135a1c336771aee1f6eab75a6ad874aff Author: Keith Packard Date: Tue Nov 27 11:21:17 2012 -0800 input: Record grab pointer in TouchListener This places a pointer to the grab related to a TouchListener directly in the TouchListener structure rather than hoping to find the grab later on using the resource ID. Passive grabs have resource ID in the resource DB so they can be removed when a client exits, and those resource IDs get copied when activated, but implicit grabs are constructed on-the-fly and have no resource DB entry. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 91ab237358c6e33da854914d3de493a9cbea7637 Author: Keith Packard Date: Tue Nov 27 11:21:16 2012 -0800 input: Pull TouchListener declaration to top-level No reason to have a struct declared inside another struct Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3578cc3c2e1b5cb8eb191e2d12ad88e1bc9e6e1e Author: Andreas Wettstein Date: Wed Dec 19 18:13:21 2012 +0100 xkb: Do not use base group as an array index. The base group is not brought into range and, therefore, using it as an array index crashed the X server. Also, at this place, we should ignore locked groups, but not latched groups. Therefore, use sum of base and latched groups, brought into range. Reproducible with: key { type= "ONE_LEVEL", symbols[Group1]= [ NoSymbol ], actions[Group1]= [ LatchGroup(group=-1, clearLocks) ] }; And hitting F7 will exceed the group level and access arbitrary memory. Signed-off-by: Andreas Wettstein Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit df746a73410b892a4d41a2934cf9cd2e8ad7ba51 Author: Carlos Garnacho Date: Wed Dec 19 18:42:39 2012 +0100 render: Unwrap early on the animated cursor BlockHandler The loop above the previous call may end up triggering other handlers attaching to the same function slot, so unwrapping the handler after that could leave the just attached handler in a dangling but not unset state. This issue was most visible on the XO, where destroying a window with an animated cursor set and running would trigger this inconsistent state, never calling the miSpriteBlockHandler again after the animated cursor is unset. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0fbd779a82919d5dbf8776be9b57a76c0eae6b14 Author: Carlos Garnacho Date: Wed Dec 19 18:42:38 2012 +0100 mi: Ensure pointer emulating touch events update the sprite Different miPointerSpriteFuncRec implementations do a varying business at ultimately calling miPointerUpdateSprite(), this particularly fails when using the plain mi sprite on touch events, where the sprite is just moved/updated on cursor changes. So, ensure miPointerUpdateSprite() is called generically for pointer emulating touch events as with regular motion events. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8b328d4ee3873bc0a7a34f2cb9d301827244b98c Author: Aaron Plattner Date: Fri Dec 21 07:37:33 2012 -0800 dix: Make small bitfields that store enums unsigned Commit 31bf81772e146af79b0c456aae2159eba8b0280f changed the clientState field from a signed int to a signed int 2-bit bitfield. The ClientState enum that is expected to be assigned to this field has four values: ClientStateInitial (0), ClientStateRunning (1), ClientStateRetained (2), and ClientStateGone (3). However, because this bitfield is signed, ClientStateRetained becomes -2 when assigned, and ClientStateGone becomes -1. This causes warnings: test.c:54:10: error: case label value exceeds maximum value for type [-Werror] test.c:55:10: error: case label value exceeds maximum value for type [-Werror] The code here is a switch statement: 53 switch (client->clientState) { 54 case ClientStateGone: 55 case ClientStateRetained: 56 [...] 57 break; 58 59 default: 60 [...] 61 break; 62 } It also causes bizarre problems like this: client->clientState = ClientStateGone; assert(client->clientState == ClientStateGone); // this assert fails Also change the signedness of nearby bitfields to match. Signed-off-by: Aaron Plattner Reviewed-by: Alex Deucher Reviewed-by: Colin Harrison Signed-off-by: Keith Packard commit 8f4820be7a2e0f6e286ddc85c4b75bccdbe8a730 Author: Peter Hutterer Date: Thu Dec 20 12:44:16 2012 +1000 test/xi2: fix compiler warning protocol-xiwarppointer.c: In function ‘ScreenSetCursorPosition’: protocol-xiwarppointer.c:71:53: warning: declaration of ‘screen’ shadows a global declaration [-Wshadow] Signed-off-by: Peter Hutterer commit bd91b05b631f13afd1f7a9d6cbc4f0c5408b523a Author: Keith Packard Date: Wed Dec 19 12:47:35 2012 -0800 Update to version 1.13.99.901 (1.14 RC1) Signed-off-by: Keith Packard commit 2a0b544f5c09f79e4ab04ea8103a5ecf59ee2e7b Merge: 0eb1559eb ba4bb3bc1 Author: Keith Packard Date: Wed Dec 19 12:26:00 2012 -0800 Merge remote-tracking branch 'jeremyhu/master' commit 0eb1559eb29d11e63c2b33e317590a88d86fe313 Merge: 386e4d76b ea1d76d1b Author: Keith Packard Date: Wed Dec 19 12:21:31 2012 -0800 Merge remote-tracking branch 'yselkowitz/master' I checked this patch with diff -w to check that it only affected whitespace. commit 386e4d76baaffe226d2d561ff936509454eb0ac2 Merge: 014a5c8a9 9ff2e8315 Author: Keith Packard Date: Wed Dec 19 12:17:59 2012 -0800 Merge remote-tracking branch 'alanc/master' commit 014a5c8a9d86f2f992183bff9106354fac2c3b0e Merge: f793b5fd3 2eefa5d6e Author: Keith Packard Date: Wed Dec 19 12:09:31 2012 -0800 Merge remote-tracking branch 'whot/barriers' Conflicts: Xi/xichangehierarchy.c Small conflict with the patch from Xi: don't use devices after removing them Was easily resolved by hand. Signed-off-by: Keith Packard commit 9ff2e831517875f96477862f979abff394e8d551 Author: Alan Coopersmith Date: Tue Dec 18 00:41:08 2012 -0800 EnableDisableExtensionError: Use ARRAY_SIZE rather than sentinel d785368e0e converted the other miinitext functions to use ARRAY_SIZE, and removed the sentinel, but missed EnableDisableExtensionError so passing an invalid extension name could cause the server to walk off the end off the list looking for a sentinel that wasn't there. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit ba4bb3bc1b87eb57cc34d2ad1f302c9d2a15c847 Author: Jeremy Huddleston Sequoia Date: Tue Dec 18 01:29:12 2012 -0800 XQuartz: Don't add the 15bit visual any more Mountain Lion only supports 32bit backing stores, so don't use 15bit visuals until libXplugin adapts Signed-off-by: Jeremy Huddleston Sequoia commit c298f9c42ec05486ac88fc91a84739d7c3e3ea9e Author: Jeremy Huddleston Sequoia Date: Tue Dec 18 01:28:02 2012 -0800 XQuartz: Revert some unfortunate auto-indenting mishaps with our super-nested for-loops Signed-off-by: Jeremy Huddleston Sequoia commit 07a91fa6c6d535f3f05d4c3bd9c4d2b8c382c475 Author: Rob Clark Date: Wed Dec 5 23:21:27 2012 +0000 hw/dmx: fix build without GLX Fixes this compile break that showed up on arm recently: dmxinit.c:746:26: error: 'glxSupported' undeclared (first use in this function) dmxinit.c:746:26: note: each undeclared identifier is reported only once for each function it appears in Signed-off-by: Rob Clark Reviewed-by: Alex Deucher commit 5692a1e8f5befd3698134b1a5516a4dadda00115 Author: Alan Coopersmith Date: Thu Dec 6 16:15:50 2012 -0800 Support compilers with alternate spellings of typeof The AC_C_TYPEOF adds a #undef typeof to its autogenerated config.h.in template, but b8ab93dfbc7f292 didn't copy that to dix-config.h.in when HAVE_TYPEOF was, so the macro could claim typeof support but not make it work, when used with compilers like Solaris Studio 12.1 which only recognize it as __typeof__. Signed-off-by: Alan Coopersmith Acked-by: Peter Hutterer commit f793b5fd3eb16a2ada130367c2ffebeede69a322 Author: Peter Hutterer Date: Tue Dec 11 13:36:02 2012 +1000 dix: don't copy the wrong event mask when activating a passive grab GrabMask is a union of core, XI1 and XI2 masks. If a XI2 grab is activated, the value is a random pointer value, using it as mask has unpredictable effects. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre Reviewed-by: Keith Packard commit dd3242c87a0a58cba055eb99c0c3fcf03153e4b8 Author: Peter Hutterer Date: Fri Dec 14 11:34:15 2012 +1000 dix: don't allow overriding a grab with a different type of grab (#58255) If a client has a core grab, don't allow re-grabbing with type XI2, etc. This was the intent of the original commit xorg-server-1.5.99.1-782-g09f9a86, but ineffective. X.Org Bug 58255 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 2eefa5d6e870c57ac6a5930883d8cfe3a3882a43 Author: Peter Hutterer Date: Thu Dec 13 14:42:32 2012 +1000 Xi: if a MD is removed, send a barrier leave event (if applicable) Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit e2423b627ef7e4d08ea0685af5e771ddd2b511ce Author: Peter Hutterer Date: Thu Dec 13 14:04:13 2012 +1000 Xi: don't store the window pointer in barriers, store the window ID When a client shuts down and resources are being freed, the window may have been freed already, so accessing it to get the window ID is bad. Plus, we never care about the window anyway other than for stuffing it into the event. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit f71c2f895c9e2f9d0d42feaac2a3e1d2deb71f67 Author: Peter Hutterer Date: Wed Dec 12 15:41:32 2012 +1000 Xi: fix per-device barrier handling Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 58bff17e43a80eb21b3ff6d4bb1596230e61f707 Author: Peter Hutterer Date: Thu Dec 13 11:49:54 2012 +1000 Xi: don't use devices after removing them RemoveDevice() frees the DeviceIntPtr, we shouldn't use the pointer after that Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 3420a7778c7d5eaa638327f31dd460554c257bb1 Author: Peter Hutterer Date: Wed Dec 12 11:02:19 2012 +1000 xfree86: print message to the log when zapping the server Signed-off-by: Peter Hutterer Reviewed-by: Aaron Plattner Signed-off-by: Keith Packard commit 6d508b81857edaed03c7ee06410434ea56d9b701 Merge: d982d8774 bb6f3514c Author: Keith Packard Date: Mon Dec 17 11:45:45 2012 -0800 Merge remote-tracking branch 'whot/for-keith' I've looked at these patches, but I can't say I've actually reviewed them... commit d982d877436377597b8ed04bca1438d2edaf53ee Merge: da3eaf6bd 6b4aa8a35 Author: Keith Packard Date: Mon Dec 17 10:56:12 2012 -0800 Merge remote-tracking branch 'airlied/for-keithp' commit da3eaf6bdbd7ce3bebf2c490cbe2448b4c402dba Author: Dave Airlie Date: Mon Dec 17 15:40:17 2012 +1000 glx/dri2: initialise api to avoid indirect rendering failing randomly Running glxinfo under indirect rendering would randomly fail against the intel driver, as it would create a context with no attribs, and then the api value would be passed to the driver uninitialised. Signed-off-by: Dave Airlie Reviewed-by: Keith Packard Reviewed-by: Ian Romanick Signed-off-by: Keith Packard commit cc10ac8f0e07854647e1fd7cc70b7e9f8d919fd1 Author: Peter Hutterer Date: Mon Dec 10 11:00:46 2012 +1000 Xi: fix swapping for barrier events Protocol events don't contain pointers, so it's easier to copy everything over, then swap in-place. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 151d44149a09dd125e25b3d94f22a609f0221548 Author: Peter Hutterer Date: Mon Dec 10 10:53:49 2012 +1000 Xi: swap sequence number and evtype in barrier events Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit d4065493b211e90b46f9d4178f23f347afd8043f Author: Peter Hutterer Date: Mon Dec 10 11:02:32 2012 +1000 tests/xi2: at protocol conversion test for barrier events Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 938187f2fec006daf4cc677df26d5b0b6999b54b Author: Peter Hutterer Date: Fri Dec 7 15:55:59 2012 +1000 Require inputproto 2.2.99.1 Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 78376a9217058aa66e52a0399fc2be469d70ce32 Author: Peter Hutterer Date: Fri Dec 7 09:26:13 2012 +1000 mi: rename mipointer's internal event list Avoid name shadowing warnings, change the event list to a more specific name. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 88a2cccc37cac4e171f9bfc020017ddfa66ae417 Author: Peter Hutterer Date: Fri Dec 7 09:11:13 2012 +1000 Xi: if the device is currently grabbed, flag the barrier event Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 353aa515922e1095047161ec47a2722772218f20 Author: Peter Hutterer Date: Thu Dec 6 15:09:27 2012 +1000 Xi: deliver barrier events as grabbed events where necessary If the grab_window is the barrier window and the client owns the grab, deliver as normal grabbed event (respecting owner_events). Otherwise, deliver as usual. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 3b161401700a2d916da0f81f99b39e75fdbe78df Author: Peter Hutterer Date: Thu Dec 6 14:13:26 2012 +1000 dix: ignore barrier events in FixUpEventFromWindow Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit a1eeb6fbecf0bd9665a9158b27c273e83b3ab351 Author: Peter Hutterer Date: Thu Dec 6 13:25:29 2012 +1000 dix: handle barrier events properly when converting to core/XI 1.x Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 1b83775f6712a7e48c49a3411a87103e8e906e67 Author: Peter Hutterer Date: Thu Dec 6 12:39:04 2012 +1000 dix: skip delivery if it's not the right pointer barrier client Only deliver to the client that created the barrier, not to other clients. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit c50db6faba4ee1c27b735c6e9c98a4276ba3c7ff Author: Peter Hutterer Date: Thu Dec 6 12:58:55 2012 +1000 Xi: fill in barrier root x/y after clamping to RandR outputs x/y for barrier events should contain the actual pointer position. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 21a15f9a04ec0a6c8f654eef943561e98db2475d Author: Peter Hutterer Date: Mon Dec 3 10:41:16 2012 +1000 Pass the event list through to the pointer barrier code to return it Instead of having the pointer barrier code enqueue events separately from GetPointerEvents, pass the event list through and let it add to it. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 707b4dc61f18960611409ef5ad8947be189f7296 Author: Jasper St. Pierre Date: Tue Nov 27 15:31:52 2012 -0500 barriers: Support line and ray barriers This allows clients to add barriers that extend to the edge of the screen. Clients are encouraged to use these instead of precise coordinates in these cases to help prevent pointer leaks. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 0a5a0d7c242add4d79721c1b90073b603a475534 Author: Jasper St. Pierre Date: Tue Nov 27 14:29:52 2012 -0500 barriers: Replace complex intersection test with simpler math Since barriers are axis-aligned, we can do the intersection test with simple interpolation rather than line-segment intersection. This also helps us out in the future when we want the barriers to extend to be rays and lines rather than just segments. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 6401317bdcf58b2717214ac65c8f47b0c384a7db Author: Jasper St. Pierre Date: Sun Dec 9 19:45:48 2012 -0500 barriers: Send an XI_BarrierLeave event when a barrier is destroyed This ensures that we always complete an event sequence. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 207e8dee00dd26ff4363edb72058b48b8a76b824 Author: Jasper St. Pierre Date: Sun Dec 9 19:44:13 2012 -0500 barriers: Clean up code Rename a variable. This is to make the diff in the next commit cleaner. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 7fabecd8e3efe76caeb740d905a02ae4256e3246 Author: Jasper St. Pierre Date: Wed Dec 5 19:58:05 2012 -0500 barriers: Send a BarrierLeave event when we leave the hitbox Additionally, add flags when the pointer is released. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit dac9e13a6c874f3b99ba4cf9085ed0e63beb0871 Author: Jasper St. Pierre Date: Mon Nov 26 20:37:56 2012 -0500 barriers: Increment event ID on hit box leave We eventually want to send a new notify event on hitbox leave, which signifies the dawn of a new barrier event ID, so it's convenient if we can put the code here. Signed-off-by: Jasper St. Pierre Reviewed-by: Jasper St. Pierre commit e3a734d081ebda4460e6c1eb7dcdd0f7c10ba9b4 Author: Jasper St. Pierre Date: Sat Nov 24 21:42:56 2012 -0500 barriers: Add a couple pixels of elbow room for the hit detection Pointers (and the hands that drive them) aren't very precise, and the slightest amount of nudging to either side might be enough to reset the event ID, making clients think they have an entirely new hit. Allow for a slightly bigger "hit box" before these barriers get reset. Signed-off-by: Jasper St. Pierre Reviewed-by: Jasper St. Pierre commit 3b2fbcfa6c75ab072926ab9659adf785b324ce28 Author: Jasper St. Pierre Date: Thu Nov 8 01:17:40 2012 -0500 barriers: Add support for edge cases when releasing barriers If we release a barrier, we want to ensure that we block all other barriers afterwards, rather than capping the limit to the two nearest barriers. Signed-off-by: Jasper St. Pierre Reviewed-by: Jasper St. Pierre commit a1ee26e624e6a7030ecb37a608190cb8e3d1f65b Author: Peter Hutterer Date: Thu Dec 6 12:06:28 2012 +1000 barriers: Don't allow releasing the pointer on other client's barriers Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 2884b249294e3e8fc749bbb81e2a897314fa0818 Author: Peter Hutterer Date: Thu Dec 6 11:59:53 2012 +1000 barriers: Don't allow destroying other client's barriers Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit e130a46ab45839f91b29ee75bf19a597dfe3da28 Author: Jasper St. Pierre Date: Thu Nov 1 16:06:40 2012 -0400 Add support for XI2.3: Pointer barrier events and releases. This adds support for clients that would like to get a notification every time a barrier is hit, and allows clients to temporarily release a barrier so that pointers can go through them, without having to destroy and recreate barriers. Based on work by Chris Halse Rogers Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 85a37ddcc2ff49adaec4075532b60e7d015f901c Author: Jasper St. Pierre Date: Sun Dec 9 22:48:18 2012 -0500 barriers: Reindent the constrainment hook This is to make future diffs much cleaner. Best viewed with -w. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 97da74c80e8b8eb03f7c1e34180cf5cd343bd608 Author: Jasper St. Pierre Date: Sun Dec 9 22:19:14 2012 -0500 barriers: Switch to finding the nearest barrier client When we add events, we eventually want to add more state to the PointerBarrierClient, so return one of these instead of the dummy public structure that's not very interesting. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 7e16dd3628334a5991b6713d778a46c1ce3b8b78 Author: Jasper St. Pierre Date: Sat Nov 24 19:39:47 2012 -0500 barriers: Switch to an explicit hook for barrier constrainment Rather than riding on the ConstrainCursorHarder hook, which has several issues, move to an explicit hook, which will help us with some RANDR interaction issues. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 2868a93945f043e1efd897d56543fe673e341faf Author: Jasper St. Pierre Date: Sun Dec 9 18:41:52 2012 -0500 barriers: Don't loop over the server to destroy a barrier This is completely pointless as far as I can tell. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 482e0cb35225dc3b0664f9429db19c61b0c98ef6 Author: Jasper St. Pierre Date: Thu Nov 1 14:14:13 2012 -0400 cursor: Move pointer barrier code over to XI In order to send events to specific windows associated with the barrier, we need to move the code that handles barriers to somewhere where it's easier to construct and send events. Rather than duplicating XSync with its XSyncSelectAlarm, re-use the existing XI infrastructure. For now, just move a bunch of code over, rename some things, and initialize the new structures, but still consider it a separate codebase. Pointer barrier requests are still handled by XFixes, so this is a weird intermediate state. It's unknown whether we'll add explicit requests to pointer barriers inside XI. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit bb6f3514ca17d993c1af380e8d4480d61e5bbcae Merge: f961c3a3b 08da994a0 Author: Peter Hutterer Date: Wed Dec 12 17:25:28 2012 +1000 Merge branch 'stack-smash-on-touchpoint' into for-keith commit f961c3a3b9dfbe1201da317c24797ba7f979731e Merge: 36740d02b 39f19b3f3 Author: Peter Hutterer Date: Wed Dec 12 17:25:23 2012 +1000 Merge branch 'touch-selection-conflict-fixes' into for-keith commit 39f19b3f3b8c9b714e70e339dfb0083ff629ab2a Author: Peter Hutterer Date: Tue Nov 20 11:48:31 2012 +1000 Xi: fix touch event selction conflicts (#57301) There are limits on which client may select for touch events on a given window, with restrictions being that no two clients can select on the same device, but narrower selections are allowed, i.e. if one client has XIAllDevices, a second client may still select for device X. The current code had a dependency on which client selected first and which device, resulting in inconsistencies when selecting for events. Fix that, responding with the right errors regardless of who selected what first. X.Org Bug 57301 Signed-off-by: Peter Hutterer commit a7c97d737ef0d14ec97869082decd049637cfe7a Author: Peter Hutterer Date: Tue Nov 20 11:38:39 2012 +1000 dix: split xi2_mask_isset into a per-device function For touch selection conflicts, we need to check not only if the mask is set for the device, but if it is set for only that specific device (regardless of XIAll*Devices) Signed-off-by: Peter Hutterer commit 08da994a08bb74afae81176c56fb525d0439274b Author: Peter Hutterer Date: Mon Nov 26 12:33:29 2012 +1000 dix: add FIXME, TouchRemovePointerGrab does nothing Signed-off-by: Peter Hutterer commit 00def5144557cfe8bf535f926212a8e084dc7cf6 Author: Peter Hutterer Date: Mon Nov 26 14:55:13 2012 +1000 Xi: if a TouchEnd appears on a actively grabbing client, always accept Once the TouchEnd appears on the device, the touch is done. If the client still has a pointer grab, accept it to avoid clients with TouchOwnership selections to wait indefinitely for the actual touch event. Signed-off-by: Peter Hutterer commit ece8157a59751b3ed492fb2e1eb8d5f20221e195 Author: Peter Hutterer Date: Mon Nov 26 15:14:19 2012 +1000 dix: when deactivating pointer-only grabs, don't emulate TouchEnd events A client with a pointer grab on a touch device must reject the touch when detactivating the grab while the touch is active. However, such a rejecting must not trigger a ButtonRelease event to be emulated and sent to the client. Set the grabbing listener's state to HAS_END, so we simply skip delivery to that client. Signed-off-by: Peter Hutterer commit bc1f90a615018c05994fae3e678dd2341256cd82 Author: Peter Hutterer Date: Mon Nov 26 12:23:54 2012 +1000 dix: only reject active grabs on ungrab and do it before actually ungrabbing An active grab ungrabbing is the same as rejecting the grab, since the client is no longer interested in those events. So reject any touch grab, but do so before actually deactivating since we're interested in the TouchEnd for the current grabbing client. A passive grab otoh is _not_ like rejecting a grab, since it deactivates automatically when the touch ends. Signed-off-by: Peter Hutterer commit 146f48c2934fc85ec095496da5c8f0102bc7f5b5 Author: Peter Hutterer Date: Thu Nov 22 13:49:34 2012 +1000 dix: don't call ProcessInputEvents() when accepting/rejecting touches TouchListenerAcceptReject may be called during normal event processing, but ProcessInputEvents is not reentrant and calling it here smashes the event queue. Signed-off-by: Peter Hutterer commit ead21f9426122536adfb4787ac181008ae83cd4b Author: Peter Hutterer Date: Mon Nov 19 16:16:10 2012 +1000 Xi: fix typo "mechansims" → "mechanisms" Signed-off-by: Peter Hutterer commit 6b4aa8a359822cc70666de3b18744f05dd9b5f45 Author: Dave Airlie Date: Wed Dec 12 12:56:46 2012 +1000 Revert "xf86: Fix non-PCI configuration-less setups" This reverts commit 76d9c62eb2be2010a19bf36285012d086cdd180b. This breaks multi-GPU setups here, so lets drop it for now. Signed-off-by: Dave Airlie commit 785af88ab0120036e0ce3d0139f3c560ff71e10b Author: Dave Airlie Date: Wed Sep 26 16:16:40 2012 +1000 dri1: fix dri1 startup since 459c6da0f907ba33d733c7e62a116184ba2f14e5 This commit regresses dri1 since it moves the drmSetServerInfo from being called at module load time to extension init time. However DRIScreenInit relies on this being called before it gets control. This patches moves the call into DRIScreenInit and seems to work here. Signed-off-by: Dave Airlie commit 36740d02b9ca117f1404e077367fbbbe271a17d6 Author: Daniel Martin Date: Fri Dec 7 19:38:55 2012 +0100 xfixes: Fix minor number in QueryVersion Due to a typo the major version number was passed as minor version to version_compare(). Regression-from: ffd4874798ba54f86acac75779a15b4babeaa5f3 Signed-off-by: Daniel Martin Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit b34cffd27b9ef46e1dd477219cbb90e36d5609e3 Author: Peter Hutterer Date: Mon Dec 3 11:39:08 2012 +1000 include: fix comment Signed-off-by: Peter Hutterer commit ea1d76d1b68c7cbcedcaa1f967c5027e0cc1c7a2 Author: Yaakov Selkowitz Date: Mon Nov 5 23:50:58 2012 -0600 Fix formatting of address operators The formatter confused address operators preceded by casts with bitwise-and expressions, placing spaces on either side of both. That syntax isn't used by ordinary address operators, however, so fix them for consistency. Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 5daa442fe15d9a87112a2def673c99a5f2506dcf Author: Peter Hutterer Date: Tue Dec 4 15:28:14 2012 +1000 xkb: only post a XTest release if the XTest device has the button down Signed-off-by: Peter Hutterer commit c4fee9d2ecd6fdd4c05b04c9f02b23f10f2938b8 Author: Peter Hutterer Date: Tue Dec 4 15:03:37 2012 +1000 xkb: always post XTest button up when the physical button released (#28808) Regression introduced by commit 2decff6393a44b56d80d53570718f95354fde454 xkb: ProcesssPointerEvent must work on the VCP if it gets the VCP XTest buttons must be released when a physical button is released. This was fixed in 14327858391ebe929b806efb53ad79e789361883, but 2decff6393a44b56d80d53570718f95354fde454 changed a condition that this code didn't get triggered anymore. "dev" for pointer events is now always the VCP which doesn't have a xkbi struct. So move this condition out and always trigger the XTest released for button events. Signed-off-by: Peter Hutterer Tested-by: Frank Roscher commit b51a1bd2766e7dc975ca8f1cacc3f8bd0e1a68a3 Merge: e9ea96d6a ce6b65292 Author: Keith Packard Date: Fri Nov 30 09:31:46 2012 -0800 Merge remote-tracking branch 'whot/for-keith' commit e9ea96d6a88f197928c82b008953f1810de6f792 Author: Dave Airlie Date: Fri Nov 30 20:54:38 2012 +1000 randr: call RRProviderInit in the proper place. No idea where this got lost across development cycles, but its definitely missing. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=57448 Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit ce6b6529290f7d42717aad3fd8a83aaaaf8962de Merge: 6e18599d6 3b9f1c701 Author: Peter Hutterer Date: Thu Nov 29 14:49:22 2012 +1000 Merge branch 'high-resolution-touch-devices' into for-keith commit 6e18599d691036eca6ff082c17727d9ffb926984 Author: Sybren van Elderen Date: Tue Nov 27 19:27:10 2012 +0100 hw/dmx: add update_desktop_dimensions() call The Xdmx server did not update the desktop dimensions when computing screen origins. Signed-off-by: Sybren van Elderen Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 59d70b30e93f8be93db9e873423353f7e4419811 Author: Peter Hutterer Date: Fri Nov 23 10:05:02 2012 +1000 dix: use pixman for fp1616 conversions Signed-off-by: Peter Hutterer Reviewed-by: Søren Sandmann > commit 2c4388a00ec308bc2d48ba751ff510cd5c1b2384 Author: Peter Hutterer Date: Tue Jun 26 10:30:35 2012 +1000 xkb: fill in keycode and event type for slow keys enablement eventType is set for the type that triggered a XkbControlsNotify event. Technically, SlowKeys is triggered by a timer which doesn't have a matching core event type. So we used to use 0 here. Practically, the timer is triggered by a key press + hold and cancelled when the key is released before the timeout expires. So we might as well set KeyPress (keycode) in the ControlsNotify to give clients a chance to differ between timer-triggered SlowKeys and client-triggered ones. This is a chance in behaviour, though I suspect with little impact. Signed-off-by: Peter Hutterer Acked-by: Daniel Stone commit 2dc6d9228456cbc274a1fcea478258e5ae4dc629 Author: Peter Hutterer Date: Thu Nov 15 14:00:57 2012 +1000 When resetting device idle time, reset XIAll(Master)Devices too (#56649) When the screen saver is forcibly deactivated, the idle time counter is reset for all devices but not for the fake XIAllDevices and XIAllMasterDevices. XScreenSaverQueryInfo uses XIAlldevices to fill the "idle" field, thus returning the wrong value. Regression introduced in commit 6aef209ebc2e54f5465da505a780f7b4cc273ee0 Author: Peter Hutterer Date: Mon Mar 12 13:51:02 2012 +1000 Change lastDeviceIdleTime to be per-device X.Org Bug 56649 Signed-off-by: Peter Hutterer Tested-by: Giacomo Perale Reviewed-by: Keith Packard commit a51b2c3913fc8556f6bd1c76805d045fc424c4bb Author: Jasper St. Pierre Date: Tue Nov 20 14:50:41 2012 -0500 cursor: Revise edge cases for the pointer moving towards barriers Since barriers block the invisible line between pixels, that means that we need to explicitly check the boundaries, or else we'll have a potential off-by-one error. This fixes issues when trying to move down or right across a barrier and having the pointer visibly bounce. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0b198248ecfbcb7e7c61688145be4005366da23d Author: Thierry Reding Date: Thu Nov 8 14:28:10 2012 +0100 Remove call to miInitializeBackingStore() Recent versions of the X server no longer provide this function, which has been obsolete for over 2 years now. Signed-off-by: Thierry Reding Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 739d6c067a9167226ce248aa82997bfc2cca7259 Author: Thierry Reding Date: Thu Nov 8 14:28:09 2012 +0100 build: Put m4 macros in m4 subdirectory This silences a warning from libtoolize when running the autogen.sh script. Signed-off-by: Thierry Reding Signed-off-by: Dave Airlie commit 1712a45422a63f11b2146541279616fcfda09ec6 Merge: e54f71a2c 338bec300 Author: Keith Packard Date: Wed Nov 28 07:54:13 2012 -0800 Merge remote-tracking branch 'jturney/mingw-patches' commit 338bec30054bb5d41cb6fdb5d37439f3c8124cad Author: Yaakov Selkowitz Date: Fri Nov 9 12:19:31 2012 -0600 hw/xwin: Fix for MinGW-w64 DirectDraw headers mingw-w64 headers handle NONAMELESSUNION earlier than mingw.org's, so it must be defined before including any headers. It also provides a ddraw.h, so use it. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Keith Packard commit fb170498abc746a850864b59db2ddcba7ee29215 Author: Jon TURNEY Date: Tue Nov 13 13:22:44 2012 +0000 dix/dispatch.c, os/utils.c: Disable smart scheduler on WIN32 setitimer() and SIGALRM aren't available on WIN32, so smart scheduler code cannot be built. Provide only stubs for smart scheduler timer code, and disable smart scheduler by default. Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Tested-by: Yaakov Selkowitz Reviewed-by: Keith Packard commit b20d2998cd9a1320ef0e45ab6b741c7e25f646e0 Author: Ryan Pavlik Date: Thu Nov 3 19:25:57 2011 -0500 os/osinit.c: no getpgrp() and setpgrp() on WIN32 Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Tested-by: Yaakov Selkowitz Reviewed-by: Keith Packard commit 2c712d094a49de0b96e2e9f5bcc1043b54ad0f61 Author: Yaakov Selkowitz Date: Sun Oct 14 23:05:30 2012 -0500 hw/xwin: use raise() instead of kill() MinGW doesn't have kill(), so use raise() instead Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Keith Packard commit 98d5acc1213b2ec71c2a7bd3a3b77a1b5536e963 Author: Jon TURNEY Date: Fri Aug 17 13:43:29 2012 +0100 os/utils.c: Fix compilation of OsBlockSIGIO when SIGIO isn't defined Fix compilation of OsBlockSIGIO with -Werror=return-type when SIGIO isn't defined. /jhbuild/checkout/xorg/xserver/os/utils.c: In function 'OsBlockSIGIO': /jhbuild/checkout/xorg/xserver/os/utils.c:1248:1: error: control reaches end of non-void function [-Wreturn-type] v2: Shuffle around to avoid writing unreachable code Signed-off-by: Jon TURNEY Tested-by: Yaakov Selkowitz Reviewed-by: Keith Packard commit 8e2bac0a69173b51e17a39d70e1d154b47fd0139 Author: Ryan Pavlik Date: Fri Apr 20 13:46:21 2012 +0100 os/osinit.c, os/utils.c: Exclude sigaction code when building for MinGW MinGW doesn't have sigaction, so this patch is needed for building. No attempt is made to actually install the fatal error signal handler, as MinGW will simply terminate the process rather than deliver a fatal signal. Also avoid using strsignal Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Tested-by: Yaakov Selkowitz Reviewed-by: Keith Packard commit e54f71a2c7a1677a5c5032d1e7dc099d5204144b Author: Chris Wilson Date: Sat Nov 10 10:26:08 2012 +0000 xf86: select a fake output for headless servers Following commit 37d956e3ac9513b74078882dff489f9b0a7a5a28 Author: Keith Packard Date: Mon Sep 10 11:14:20 2012 +1000 xf86: fix compat output selection for no output GPUs headless servers can no longer startup as we no longer select a compat output for the fake framebuffer. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56343 Signed-off-by: Chris Wilson Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 76d9c62eb2be2010a19bf36285012d086cdd180b Author: Thierry Reding Date: Wed Oct 17 12:06:47 2012 +0200 xf86: Fix non-PCI configuration-less setups For non-PCI video devices, such as those found on many ARM embedded systems, the X server currently requires the BusID option to specify the full path to the DRM device's sysfs node in order to properly match it against the probed platform devices. In order to allow X to start up properly if either the BusID option was omitted or no configuration is present at all, the first video device is used by default. Signed-off-by: Thierry Reding Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit d50a94568e06a06df682a0028579d37a7b209d15 Merge: 87b60efb8 cf05db8dd Author: Keith Packard Date: Tue Nov 27 15:14:26 2012 -0800 Merge remote-tracking branch 'daniels/master' commit 87b60efb859d86fd9e96306112bc5453a549fa69 Author: Colin Harrison Date: Sun Sep 2 22:39:32 2012 +0100 hw/xwin: Don't spam MotionNotify events when the mouse hasn't moved Don't spam MotionNotify events when the mouse hasn't moved, when polling the mouse position outside any X window (Test with 'xev -root' after mouse polling has started.) Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 886f4c389266bf759414f15a5e25e50b5935dc9d Author: Jon TURNEY Date: Mon Jun 25 15:58:21 2012 +0100 hw/xwin: Don't log all fbConfigs and GL/WGL extensions Don't log all fbConfigs and GL/WGL extensions, unless verbose logging is requested Log the number of pixelFormats which gave rise to the fbConfigs Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9b10f20f472e6b0d6114fb61c88906e349e47f2b Author: Jon TURNEY Date: Fri Feb 10 13:36:46 2012 +0000 hw/xwin: Use pre-computed extent of damage for creating GDI region When -clipupdates option is specified, use the pre-computed extent of damage, rather than computing a GDI region which combines all the individual boxes in the damage. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3ab95a2a5c848e8ce4c39be243fd5e2ac6bb1c1a Author: Jon TURNEY Date: Fri Feb 24 15:32:26 2012 +0000 hw/xwin: Ensure we own the clipboard before checking the format of it's contents Ensure we own the clipboard before checking the format of it's contents, this prevents the contents from changing underneath us. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a4f357c620ae9e2270316197a61fb8e1d5183a51 Author: Colin Harrison Date: Mon Apr 9 15:48:08 2012 +0100 hw/xwin: Disable minimize button on window with skip-taskbar state If a window has had its taskbar button removed, disable its minimize button to prevent it becoming lost Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit a2983452ee1e2051ab54cded7a3a7735be020db6 Author: Jon TURNEY Date: Wed Jul 8 17:48:03 2009 +0100 hw/xwin: Process _NET_WM_STATE_SKIP_TASKBAR hint in multiwindow mode. Set WS_EX_TOOLWINDOW style to hide window from Alt-Tab switcher Use ITaskBarList interface to ensure that the taskbar notices if the window has changed it's style in a way which affects if the taskbar shows it or not Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit de759cc38ccc8a7811923eb9620f01301aedc10e Author: Jon TURNEY Date: Sun Feb 5 17:57:04 2012 +0000 hw/xwin: Add a simple interface to the ITaskbarList COM interface Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 19d875187a113ca7772a770767ea2ceb2ade5a43 Author: Jon TURNEY Date: Wed Jan 4 17:40:14 2012 +0000 hw/xwin: Enable RANDR resize by default Also fix erroneous use of '--resize' not '-resize', and document '-noresize' in man page Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 444580673221bf3f89dfa3cbc518b5ed4ecabc23 Author: Yaakov Selkowitz Date: Sat Dec 31 22:11:18 2011 -0600 hw/xwin: Enable AIGLX by default Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 11bb32e561b3f1c657a99b3902f9beea786babbb Author: Oliver Schmidt Date: Sun Jan 8 20:30:02 2012 +0000 hw/xwin: Restore non-latching modifier key state when an X window gains focus In multiwindow mode, the state of the modifier keys was lost when a window is created (or raised) and focus moved to that window. For example: In window A Ctrl + some key opens a window B, then in window B Ctrl + some other key triggers the next action. However after the opening of window B the Ctrl key has to be released and pressed again. If the user keeps the Ctrl key held down when the window B is opened, the next key press X will be interpreted as X and not as Ctrl+X. Extended the function winRestoreModeKeyStates in winkeybd.c to consider not only the latching modifier keys but also the modifiers Ctrl, Shift, Alt/AltGr by using the Windows function GetAsyncKeyState. A combined Ctrl+AltGr modifier state cannot be restored correctly, as Windows always fakes a Ctrl-L when AltGr is pressed. Signed-off-by: Oliver Schmidt Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 47291d0b7d7bfee74156f83badae15a0818c68ad Author: Jon TURNEY Date: Mon Nov 5 14:54:51 2012 +0000 hw/xwin: Give our logical xor operator a more logical name Also, rather than a comment about why we need a logical operator, let's have a comment about what we are doing to the keyboard state... Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 8aa27ae82109e4fab0ff3ed86ad1d152438a2585 Author: Tobias Häußler Date: Mon Jul 18 14:48:23 2011 +0100 hw/xwin: Add correct taskbar grouping of X windows on Windows 7 I created a small patch for XWin that adds correct grouping of taskbar icons when 'Always combine, hide labels' is set in the taskbar properties. It uses the new taskbar APIs introduced in Windows 7 to set an application id for each window. The id is based on the X11 class hints. v2: Add file to _SOURCES to fix distcheck v3 : Fix compilation with mingw-w64 w32api headers Include propkey.h, propsys.h rather than defining necessary stuff ourselves v4: Fix up names taskbar->propertystore, AppID->AppUserModelID, etc. Link directly with ole32 for PropVariantClear(), prototyping it if neccessary. v5: Put winSetAppUserModelID()-related code in a separate file. Drop a superfluous assign to hr of ignored HRESULT of SetValue() Signed-off-by: Tobias Häußler Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit f3aef7f9561d2723da0d1438a8b276b77a1e672e Author: Jon TURNEY Date: Sun Sep 2 16:04:25 2012 +0100 hw/xwin: Fix function name in log message Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 127a7068b75258d396776cc101aba0bef10a5cef Author: Jon TURNEY Date: Thu Apr 14 23:10:23 2011 +0100 hw/xwin: Allow XScreenSaverSuspend() to effect Windows screen saver or monitor power off Reset the idle timer in the block handler if screenSaverSuspended is set. This isn't quite a complete solution. We should also set the block timeout to something less than the idle timer timeout to ensure we will reset the idle timer before it times out if we are blocking. The idle timer timeout is presumably the first one to expire of the screen saver activation or monitor low power or power down timeout, depending on configuration. Unfortunately this is probably not straightforward to do. Whilst SystemParametersInfo(SPI_GETSCREENSAVETIMEOUT) is portable, apparently SPI_GETLOWPOWERTIMEOUT and SPI_GETPOWEROFFTIMEOUT are not supported by Windows versions 6.0 or later, and the interface for discovering equivalent value is complex. This doesn't matter in the case where a media player or similar application is the one making the XScreenSaverSuspend() requests, as it will be continuously drawing, causing the X server to become unblocked often. In the case where slide show presentation application or similar is the one making the XScreenSaverSuspend() request, this might be a problem. Since "Powerpoint is Evil" [1], I think we'll leave it like this till someone complains :-) [1] http://www.edwardtufte.com/tufte/books_pp v2: conditionalize on SCREENSAVER Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 190f165317c4a58adf38e3e32acfe7cf04850e91 Author: Jon TURNEY Date: Mon Nov 5 13:02:46 2012 +0000 hw/xwin: Avoid logging an extra blank line if BUILDERSTRING is empty Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit ef9dbea24f5ce7e1e400463ab2a333076d98a28e Author: Jon TURNEY Date: Wed Aug 31 20:57:05 2011 +0100 hw/xwin: Report which drawing engines are being enabled when checking for support Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5824166256c8e96c91e225f4ccb2b094b8fb045b Author: Jon TURNEY Date: Fri Mar 12 14:38:51 2010 +0000 hw/xwin: Show any fatal error message Report the fatal error message in the dialog we pop up, rather than just referring the user to the logfile. v2: Do this a better way since the "Pass the FatalError message to OsVendorFatalError" patch has landed, and OsVendorFatalError() now gets passed the fatal error message Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit cf05db8ddec948d907915e1c9569d743e8771def Author: Sjoerd Simons Date: Tue Oct 30 17:02:58 2012 +0100 Ephyr: Find the right host screen when embedded When Xephyr is embedded into another application (e.g. in xoo), the input events may come from the parent Window instead of our own. So make sure we find the host screen in that case as well instead of crashing. Signed-off-by: Sjoerd Simons Reviewed-by: Daniel Stone commit ac1a60e7b6f06fd075cc5bf55d6bc67206a01d29 Author: Raphael Kubo da Costa Date: Fri Nov 16 19:51:58 2012 +0200 vfb: Initialize the GLX extension again. This should fix a regression in the 1.13.0 release: commit 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86 removed a code path used by Xvfb and made it use the default one when initializing extensions. However, this meant the GLX extension was not initialized anymore since it is not part of the `staticExtensions' array. Since it is not possible to just add it to that array after commit aad428b8e21c77397c623b78706eb64b1fea77c9, adopt an approach similar to xwin's and xquartz's and initialize the extension from vfb's `InitOutput'. Signed-off-by: Raphael Kubo da Costa Reviewed-by: Daniel Stone commit 353b14ea77324b3f7b3ea29d6f03618fd9916d5f Author: Daniel Stone Date: Mon Nov 19 15:00:22 2012 +1100 DMX: Add DMX and GLX extensions Unfortunately this also got lost in the extmod fallout, leaving the DMX server not exposing the DMX or GLX extensions. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer commit 3556d43010f0a37bf30aa2e0ceee9a8bbcad311d Author: Daniel Stone Date: Mon Nov 19 15:29:34 2012 +1100 Constify extensions in LoadExtension users Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer commit db83830eef38a86a471378121213162da180537d Author: Daniel Stone Date: Mon Nov 19 15:28:07 2012 +1100 Constify argument to LoadExtension Since we never modify it. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer commit 3b9f1c701787965246638c1a6fd99fb2b6078114 Author: Yuly Novikov Date: Mon Nov 19 21:04:57 2012 -0500 dix: Save touchpoint last coordinates before transform. #49347 DDXTouchPointInfoRec.valuators used to store axis values after transform. This resulted in Coordinate Transformation Matrix being applied multiple times to the last coordinates, in the case when only pressure changes in the last touch event. Changed DDXTouchPointInfoRec.valuators to store values before transform. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=49347 Signed-off-by: Yuly Novikov Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d0fd592fc7be1706084923f43fa057e50122562c Author: Thomas Jaeger Date: Sat Oct 13 23:18:50 2012 -0400 Simplify GetTouchEvents With only one callee left, we are free to assume that !(flags & TOUCH_CLIENT_ID) Signed-off-by: Thomas Jaeger Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit fe59774c55e5d423633405e0869c22f4ce382548 Author: Thomas Jaeger Date: Sat Oct 13 23:08:27 2012 -0400 Don't use GetTouchEvents in EmitTouchEnd As before GetTouchEvents causes unwanted side effects. Add a new function GetDixTouchEnd, which generates a touch event from the touch point. We fill in the event's screen coordinates from the MD's current sprite position. Signed-off-by: Thomas Jaeger Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit cc79107a5b60d2926e16ddbee04149e8d5acc969 Author: Thomas Jaeger Date: Sat Oct 13 22:51:24 2012 -0400 Don't use GetTouchEvents when replaying events GetTouchEvents has plenty of side effects such as moving the pointer or updating the master device, which we don't want to happen when replaying. The only reason for calling it was to generate a DCCE event, but GetTouchEvents doesn't even do that right (we might need a DCCE event even when replaying a master event, or clients could interpret valuator data incorrectly). This discussion is moot at the moment anyway, since DeliverTouchEvents doesn't appear to deliver DCCE events. Signed-off-by: Thomas Jaeger Reviewed-by: Peter Hutterer [Added call to processInputProc instead of direct call to DeliverTouchEvents] Signed-off-by: Peter Hutterer commit 90b177e5cbb9047453af426d2abfe9c0514fe866 Author: Thomas Jaeger Date: Sat Oct 13 22:43:26 2012 -0400 Update the MD's position when a touch event is received Signed-off-by: Thomas Jaeger Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 6a6c3afe71ac82a93d9fd0034dd5bbdcf0eae1ea Merge: 14c9e245b 6f145084d Author: Keith Packard Date: Sun Nov 18 21:50:20 2012 -0800 Merge remote-tracking branch 'whot/for-keith' commit 6f145084d5b9ca4a023dfc538a69bbf30edeac4a Author: Adam Jackson Date: Fri Nov 16 13:46:32 2012 -0500 linux: Prefer ioctl(KDSKBMUTE, 1) over ioctl(KDSKBMODE, K_OFF) K_OFF is a slightly broken interface, since if some other process (cough, systemd) sets the console state to K_UNICODE then it undoes K_OFF, and now Alt-F2 will switch terminals instead of summoning the Gnome "run command" dialog. KDSKBMUTE separates the "don't enqueue events" logic from the keymap, so doesn't have this problem. Try it first, then continue falling back to older methods. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=859485 Tested-by: Josh Boyer Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0ff1c77b17062a3a3ff520709ef719316bc1d8bb Author: Peter Hutterer Date: Fri Nov 16 14:21:47 2012 +1000 xfixes: let PointerBarrierClient->device_ids point to allocated memory "Fixed" up Jasper's original patch [1] to use pointers instead of zero-length arrays but didn't actually set the pointer to anywhere. [1] 9a536820f6174befb22431bab375ef1af0a1ec29 Signed-off-by: Peter Hutterer Reviewed-By: Jasper St. Pierre commit aa9a9ad08b8a6e7e95de7c2bf45d93dd50f9ca87 Author: Daniel Martin Date: Wed Nov 7 11:31:01 2012 +0100 Xi: Fix modifier swapping in XIPassiveGrabDevice XIPassiveGrabDevice uses a list of uint32_t as modifier sets. The ModifierInfo struct represents the current modifier states and is therefor used in XIQueryPointer and various events. Signed-off-by: Daniel Martin Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit aa9da5eae109154edf740a5c1eee4bf98e8fbd4f Author: Thomas Jaeger Date: Sat Oct 13 22:39:27 2012 -0400 remove init_event The function is identical to init_device_event from inpututils.c with the first two arguments swapped. Signed-off-by: Thomas Jaeger Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 710065da37b68a9ec7a0c9dc995247f39e3d01e9 Author: Daniel Stone Date: Mon Nov 5 15:58:25 2012 +1100 XKB: Remove component listing support No-one uses this - not xkbcomp, not GNOME, not KDE. The preferred way to deal with component listing (which gives you RMLVO rather than KcCGST) is to use the XML files on the client side. Indeed, a couple of hours after making this commit, it emerged that all *.dir files built with xkbcomp 1.1.1 (released two years ago) and later have been catastrophically broken and nearly empty. So I think that's reasonable proof that no-one uses them. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit fd214aabf77c44ba0ca3fd438f0c3c8eb22c7211 Author: Peter Hutterer Date: Tue Nov 6 10:27:25 2012 +1000 input: drop FP1616 macro The double_to_f1616() functions do the same thing, and they're tested. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 14c9e245bae2447f0e57a3ea4daa8d2085fa8b8f Author: Jeremy Huddleston Sequoia Date: Sat Nov 17 11:52:10 2012 -0500 XQuartz: Opt-in to NSSupportsAutomaticGraphicsSwitching http://xquartz.macosforge.org/trac/ticket/668 Signed-off-by: Jeremy Huddleston Sequoia commit 011f8458805e443ac9130865d2840a929a00cabf Merge: 54ba26cb1 b4e44b285 Author: Keith Packard Date: Mon Nov 5 17:16:07 2012 -0800 Merge remote-tracking branch 'whot/for-keith' commit b4e44b285ed0eee1d06514215a4b01d54f40094b Author: Carlos Garnacho Date: Wed Oct 31 19:29:45 2012 +0100 Xi: Set modifier mask on touch events Button mask should be out-of-band with the emulated pointer events as touch devices don't truly have "buttons". Even though, it's handy to have the modifier mask from the paired keyboard on touch events. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 863f32c930d71073ee5f78452b78bd459d024867 Author: Carlos Garnacho Date: Wed Oct 31 19:32:57 2012 +0100 Xi: Update the device after delivering the emulated pointer event(#56558) Ensure emulated pointer events contain the state that applies before the event was processed, so the device state must be updated after delivering such emulated events. Co-authored-by: Peter Hutterer Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9a536820f6174befb22431bab375ef1af0a1ec29 Author: Jasper St. Pierre Date: Sat Nov 3 20:23:46 2012 -0400 cursor: Fix up implementation for per-device barriers Support multiple mast devices being specified as a parameter to the barrier. This should implement all parts of the XFixes specification, minus the existing non-specification detail where specifying no devices is the same as specifying XIAllDevices. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 944213bbc7099f1e0238f39973653d459efdc2c9 Author: Jasper St. Pierre Date: Sat Nov 3 20:23:45 2012 -0400 cursor: Clean up barrier finding code a bit The current code manually unrolls the loop, by finding a barrier, clamping it, and then repeaing the code. Since we want to modify both passes of the loop to support device-specific barriers, make it into an actual loop. Signed-off-by: Jasper St. Pierre Signed-off-by: Peter Hutterer commit 1536bc2d213713af45541a15b5e49c552d8d0592 Author: Jasper St. Pierre Date: Sat Nov 3 20:23:44 2012 -0400 cursor: Clean up pointer barrier creation code a tiny bit This will make it much simpler when we add more error paths to the code that constructs pointer barrier clients. Signed-off-by: Jasper St. Pierre Signed-off-by: Peter Hutterer commit 04c885de715a7c989e48fc8cf2e61db2b401de2d Author: Jasper St. Pierre Date: Sat Nov 3 20:23:43 2012 -0400 cursor: CreatePointerBarrier has a variable request length Support this, and swap the devices in the SProc as well. Don't actually do anything with the devices just yet -- specifying any should still emit a BadImplementation. Based on a patch by Peter Hutterer Signed-off-by: Jasper St. Pierre Signed-off-by: Peter Hutterer commit d74b63f95fc622afe83c53580f1b55346d55fa7a Author: Jasper St. Pierre Date: Sat Nov 3 20:23:42 2012 -0400 cursor: Fix a minor unused variable warning Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit aad65415bff12c6860c19beac42e4165e598a40f Author: Peter Hutterer Date: Thu Oct 11 13:02:27 2012 +1000 dix: don't allow disabling XTest devices Disabling a XTest device followed by an XTest API call crashes the server. This could be fixed elsewhere but disabled devices must not send events anyway. The use-case for disabled XTest devices is somewhat limited, so simply disallow disabling the devices. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 5b7384a3154a95a805b040e1910e276b52aada96 Author: Alexey Ten (Lynn) Date: Tue Oct 23 12:32:31 2012 +0400 Apply partial matches for option (#25873) Rules which match star (*) and option, like one below, should be applied layout[2] option = symbols * misc:typo = +typo(base) This is port of patch from #19563 (https://bugs.freedesktop.org/19563) because here we have own copy of maprules.c X.Org Bug 25873 Signed-off-by: Alexey Ten (Lynn) Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 54ba26cb1f9c59559cc3c449abeb31b2ce23bdba Author: Yaakov Selkowitz Date: Mon Oct 29 22:37:37 2012 -0500 os: Add libnettle as a choice of SHA1 implementation libnettle is smaller than libgcrypt, currently being released more frequently, and has replaced the latter in gnutls-3.x (which is used by TigerVNC, so they can avoid pulling in two crypto libraries simultaneously). Signed-off-by: Yaakov Selkowitz Reviewed-by: Julien Cristau commit 2ff56033de2b493a11d2bdf411b7057b1b3a22d7 Author: Yaakov Selkowitz Date: Tue Oct 16 02:11:59 2012 -0500 Xi: fix fprint format warning exevents.c: In function 'ProcessTouchEvent': exevents.c:1601:20: warning: too many arguments for format Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit d631dbe9b6a1faa4cd18ab7a4a0276db02b84b77 Author: Yaakov Selkowitz Date: Sat Oct 27 21:50:01 2012 -0500 Xext: fix shadow warnings Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 20cf7918ed954a932a4cc404b3d0c4ca87a6ae16 Author: Yaakov Selkowitz Date: Tue Oct 16 21:08:52 2012 -0500 Xext: fix redundant redeclaration warnings panoramiX.c:595:13: warning: redundant redeclaration of 'CreateConnectionBlock' ../include/dix.h:167:23: note: previous declaration of 'CreateConnectionBlock' was here xres.c:193:13: warning: redundant redeclaration of 'ResExtensionInit' ../include/extinit.h:109:13: note: previous declaration of 'ResExtensionInit' xtest.c:60:12: warning: redundant redeclaration of 'DeviceValuator' ../Xi/exglobals.h:61:12: note: previous declaration of 'DeviceValuator' was here Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 89447e1b50d2fb0e046102664045d1f9d4efc542 Author: Yaakov Selkowitz Date: Mon Oct 15 01:33:05 2012 -0500 Xext: fix unused variable warnings in xf86bigfont.c These were rendered unused by commit 2c7c520cfe0df30f4bc3adba59d9c62582823bf8. Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 344eea237fc07dedfd733d14f95ed0ad26bb5f81 Author: Yaakov Selkowitz Date: Tue Oct 16 02:04:34 2012 -0500 xkb: fix shadow warnings Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 7f1d74e8a906210eafc637df81ded62c3adff748 Author: Yaakov Selkowitz Date: Tue Oct 16 02:06:54 2012 -0500 render: fix shadow warnings Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 8e86123998d26d26f0f60dcbb9836c38e5a4c3a5 Author: Yaakov Selkowitz Date: Tue Oct 16 01:19:12 2012 -0500 randr: export more provider property symbols These were added as part of commit 66d92afeaeed9f4a19267d95a1f81b9bf27162a5 but never declared or exported. Fixes warnings: rrproviderproperty.c:255:1: warning: no previous prototype for 'RRPostProviderPendingProperties' rrproviderproperty.c:327:1: warning: no previous prototype for 'RRConfigureProviderProperty' Signed-off-by: Yaakov Selkowitz Reviewed-by: Dave Airlie Reviewed-by: Peter Hutterer commit f02e27e4fcc34413b2051e5a01edc92172fa8612 Author: Yaakov Selkowitz Date: Tue Oct 16 02:16:17 2012 -0500 mi: fix shadow warnings mibitblt.c: In function 'miGetImage': mibitblt.c:617:20: warning: declaration of 'pt' shadows a previous local mibitblt.c:609:17: warning: shadowed declaration is here mispans.c: In function 'miFillUniqueSpanGroup': mispans.c:456:33: warning: declaration of 'i' shadows a previous local mispans.c:382:9: warning: shadowed declaration is here mispans.c:488:17: warning: declaration of 'i' shadows a previous local mispans.c:382:9: warning: shadowed declaration is here Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 1fe30c00679bd36a6355b48b94b87564d528ff28 Author: Yaakov Selkowitz Date: Tue Oct 16 02:21:04 2012 -0500 fb: fix shadow warnings fbblt.c: In function 'fbBlt': fbblt.c:76:16: warning: declaration of 'src' shadows a previous local fbblt.c:52:13: warning: shadowed declaration is here fbblt.c:77:16: warning: declaration of 'dst' shadows a previous local fbblt.c:52:19: warning: shadowed declaration is here fbbltone.c: In function 'fbBltPlane': fbbltone.c:742:13: warning: declaration of 'w' shadows a previous local fbbltone.c:725:9: warning: shadowed declaration is here Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit e8d45f301845f70b76407577b92363934ca4f19e Author: Yaakov Selkowitz Date: Tue Oct 16 20:54:56 2012 -0500 dix: fix shadow warnings dispatch.c: In function 'ProcCopyArea': dispatch.c:1608:5: warning: declaration of 'rc' shadows a previous local dispatch.c:1604:9: warning: shadowed declaration is here dispatch.c: In function 'ProcCopyPlane': dispatch.c:1647:5: warning: declaration of 'rc' shadows a previous local dispatch.c:1643:9: warning: shadowed declaration is here events.c: In function 'GetClientsForDelivery': events.c:2030:68: warning: declaration of 'clients' shadows a global declaration ../include/dix.h:124:28: warning: shadowed declaration is here events.c: In function 'DeliverEventToWindowMask': events.c:2113:19: warning: declaration of 'clients' shadows a global declaration ../include/dix.h:124:28: warning: shadowed declaration is here events.c: In function 'EventSuppressForWindow': events.c:4420:12: warning: declaration of 'free' shadows a global declaration Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 1aa783754e21a263b0973516850656b13fd18f0d Author: Yaakov Selkowitz Date: Tue Oct 16 14:06:30 2012 -0500 dix: fix redundant redeclaration warnings in dixfont These functions are already declared in . Redeclaring them just for _X_EXPORT causes tons of warnings throughout xserver, but they need to be declared somewhere to be picked up by sdksyms.sh. Doing so in a private header limits the warnings to sdksyms.c; fixing those as well would require changes to fontsproto. Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 27c5966de35d4726dd9795b4828d4236851f6a88 Author: Yaakov Selkowitz Date: Mon Oct 15 01:25:17 2012 -0500 xfree86: os-support: fix old-style function definition warnings Signed-off-by: Yaakov Selkowitz Reviewed-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 64b961bb21369aaea694d883f361a36bc23b19b9 Author: Yaakov Selkowitz Date: Wed Oct 24 23:57:11 2012 -0500 macros: clarify documentation Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 04f980ead5e9af066143a921e0a0e98f26f28ee5 Merge: a194630f7 a4941ce49 Author: Keith Packard Date: Mon Nov 5 08:45:21 2012 -0800 Merge remote-tracking branch 'jturney/mingw-w64-w32api' commit a4941ce4961f254ac31e2cef6dd0863866246bab Author: Jon TURNEY Date: Tue Aug 21 15:31:16 2012 +0100 hw/xwin: Wrap 'Status' when including ddraw.h Status is #defined as an alias for a type in xkbsrv.h, which conflicts with it's use as a parameter name in rpcdce.h This fixes compilation with MinGW-w64 w32api headers (The MinGW-w64 w32api headers actually provide a ddraw.h, so this fix tries to do things in a way which will still work if our private copy of ddraw.h is eventually removed) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 57bbf6e2aead6cce76a9f5d43829b58868a26059 Author: Jon TURNEY Date: Mon Oct 29 14:35:45 2012 +0000 hw/xwin: Remove pointless winFinishCreateWindowsWindowDDNL() Remove pointless winFinishCreateWindowsWindowDDNL() and the useless DirectDraw surface pointers in the window privates Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5bc4c53d23d02d3d7297a8f00a92b6e4d5e0d6fe Author: Jon TURNEY Date: Tue Sep 4 17:28:16 2012 +0100 hw/xwin: Link with libdxguid rather than defining the DirectX GUIDs ourselves Decruftify by linking with libdxguid rather than defining the DirectX GUIDs ourselves. This fixes compilation with MinGW-w64 w32api headers, which do not provide GUID_SECT (which only ever did anything for gcc prior to 2.95, anyhow) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a194630f7f7b287cb4ea4a459df0745f4c0d4c1a Merge: 74a313042 d511a3016 Author: Keith Packard Date: Thu Nov 1 13:38:54 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit d511a3016a79c50cb38e7504d4831a9ae128e422 Author: Benjamin Tissoires Date: Fri Oct 26 16:27:34 2012 +0200 Add missing labels for multitouch valuators ABS_MT_DISTANCE exists since kernel v2.6.38, ABS_MT_TOOL_X|Y appeared in v3.6. Signed-off-by: Benjamin Tissoires Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit ced56f322ead10d1bc93fcd1f8e0ec3ae51292a3 Author: Carlos Garnacho Date: Thu Oct 25 15:03:50 2012 +0200 Sync TouchListener memory allocation with population in TouchSetupListeners() The allocated TouchListener array may fall short by 1 if hitting the worst case situation where there's an active grab, passive grabs on each window in the sprite trace and event selection for touch in one of the windows. This may lead to memory corruptions as the array is overflown. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 74a3130426d7e1b456e45daa517769cd3e4b58c0 Merge: 1ca096d5e f32ad6dd3 Author: Keith Packard Date: Mon Oct 29 09:09:16 2012 -0700 Merge remote-tracking branch 'jturney/master' commit 1ca096d5e07221025c4c4110528772b7d94f15ee Author: Michel Dänzer Date: Mon Oct 29 12:57:54 2012 +0100 EXA: Track source/mask pixmaps more explicitly for Composite fallback regions. In particular, make sure pExaScr->src/maskPix are cleared when the corresponding pictures aren't associated with drawables, i.e. solid or gradient pictures. Without this, we would in some cases associate the source/mask region with unrelated pixmaps from previous Composite fallbacks, resulting in random corruption. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47266 Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit f32ad6dd314a587c301b7f1a6e4ee74e5d8cc06c Author: Ryan Pavlik Date: Fri Oct 21 12:32:49 2011 -0500 os/utils.c: Provide only stubs for Lock/UnlockServer on WIN32 MinGW and MSVC lack the POSIX functions to compile the lock file code. Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit 74735c5ebff15db8891808068fe8569d8ccde9e7 Author: Colin Harrison Date: Sat Feb 18 20:37:19 2012 +0000 hw/xwin: fmemopen is available on cygwin but not MinGW This is a follow-up to commit 0659437f5ec0e3f646373394f5f9c5461e2170f3. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit 748be9da20a8bf3dd99701a95eac7ee3895a28de Author: Jon TURNEY Date: Tue May 1 20:08:41 2012 +0100 doc: Update documentation about Windows platforms support a bit Update what c-extensions says about Windows platforms support a bit: - Document that MinGW Win32 gets let off being POSIX-compilant - Document the minimum Windows version supported Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 760be785eb49fed4652950fb55dc07b0a41d87de Author: Peter Hutterer Date: Wed Oct 24 11:20:54 2012 +1000 xfree86: remove unused variable sigstate Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit e7cd5cce740e653000fb1192b600268dcf77dde2 Author: Peter Hutterer Date: Thu Oct 18 15:11:31 2012 +1000 dix: fix zaphod screen scrossing (#54654) POINTER_SCREEN coordinates are screen-relative. For a Zaphod setup, the coordinates after a screen crossing are already relative to the new screen's origin. Add that offset to the coordinates before re-setting. regression introduced by commit bafbd99080be49a17be97d2cc758fbe623369945 Author: Peter Hutterer Date: Wed Aug 8 11:34:32 2012 +1000 dix: work around scaling issues during WarpPointer (#53037) X.Org Bug 54654 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 676447190190d8546165e21be242cf16dd69f5ae Author: Peter Hutterer Date: Wed Oct 17 14:13:29 2012 +1000 Xi: don't deliver TouchEnd to a client waiting for TouchBegin (#55738) If a client is still waiting for the TouchBegin, don't deliver a TouchEnd event. X.Org Bug 55738 Signed-off-by: Peter Hutterer Tested-by: Thomas Jaeger Reviewed-by: Keith Packard commit 3018f9c1e5109680dcf69b8f2d7807696a473bde Author: Peter Hutterer Date: Fri Oct 12 13:48:27 2012 +1000 Xi: set xChangeDeviceControlReply.status to Success by default If the status is other than Success, the code will set it to the required value. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 2decff6393a44b56d80d53570718f95354fde454 Author: Peter Hutterer Date: Thu Oct 11 16:03:33 2012 +1000 xkb: ProcesssPointerEvent must work on the VCP if it gets the VCP For button release events, the current code picks the VCK. Because that has a XKB struct, it thinks this is a PointerKeys event and proceeds to send the release event through the XTest pointer. That has no effect in normal operation as the button is never down and an attempt is silently discarded (normal event processing continues with the VCP). On server shutdown, the XTest device is already removed, leading to a null-pointer derefernce when the device is checked for whether buttons are down (XkbFakeDeviceButton → button_is_down(xtest pointer)). The current state has only worked by accident, the right approach here is to handle the VCP's event as such and not switch to the keyboard. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit cc1d8fa8a4ef2e34e9837a44945094fd77e40a0b Author: Yaakov Selkowitz Date: Sun Oct 14 23:38:20 2012 -0500 Configure fixes for MinGW As for Cygwin, define FD_SETSIZE for uses of select() to be correct. Link with libpthread. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY commit 53830281b4da096f9c13107d73ec9c76ff1d14cc Merge: abc2ef590 9cbcb5bd6 Author: Keith Packard Date: Fri Oct 26 18:04:34 2012 -0700 Merge remote-tracking branch 'sandmann/for-keithp' commit abc2ef590c7cb33ebe21726f83b7347406975f95 Merge: 0e85e5e62 c5396ec05 Author: Keith Packard Date: Fri Oct 26 17:11:58 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 9cbcb5bd6a5360a128d15b77a02d8d3351f74366 Author: Søren Sandmann Pedersen Date: Wed May 30 05:19:08 2012 -0400 Use new pixman_glyph_cache_t API that will be in pixman 0.28.0 This new API allows glyphs to be cached in a data structure in pixman, and entire glyph strings to be composited in one go. Also bump pixman dependency to 0.27.2. Results from the cairo peformance test suite running against Xvfb with a screen size of 1680x1050@32bpp: Speedups ======== xlib firefox-talos-gfx 12416.63 -> 3603.93 3.45x speedup ██▌ xlib xfce4-terminal-a1 1727.57 -> 1048.85: 1.65x speedup ▋ xlib evolution 1370.49 -> 869.34: 1.58x speedup ▋ xlib gnome-terminal-vim 1832.83 -> 1251.94: 1.46x speedup ▌ xlib poppler 1519.70 -> 1204.05: 1.26x speedup ▎ xlib firefox-planet-gnome 6982.55 -> 5598.16: 1.25x speedup ▎ xlib ocitysmap 1142.77 -> 1071.53: 1.07x speedup ▏ No slowdowns were reported. Results of x11perf -aa10text: Before: 8000000 reps @ 0.0007 msec (1450000.0/sec) 8000000 reps @ 0.0007 msec (1460000.0/sec) 8000000 reps @ 0.0007 msec (1460000.0/sec) 8000000 reps @ 0.0007 msec (1470000.0/sec) 8000000 reps @ 0.0007 msec (1480000.0/sec) 40000000 trep @ 0.0007 msec (1460000.0/sec) After: 32000000 reps @ 0.0002 msec (4910000.0/sec) 32000000 reps @ 0.0002 msec (4830000.0/sec) 32000000 reps @ 0.0002 msec (4890000.0/sec) 32000000 reps @ 0.0002 msec (4830000.0/sec) 32000000 reps @ 0.0002 msec (4900000.0/sec) 160000000 trep @ 0.0002 msec (4870000.0/sec) Version 2: Destroy the glyph cache at server regen time Acked-by: Aaron Plattner Reviewed-by: Keith Packard Signed-off-by: Soren Sandmann commit c5396ec05a5c6cab6608ba677f703c5227b1de13 Author: Thierry Reding Date: Wed Oct 17 12:11:49 2012 +0200 xf86: Fix build against recent Linux kernel Recent Linux kernels reworked the linux/input.h header file, which is now part of the "user-space API". The include guard therefore has an additional additional _UAPI prefix. Instead of adding another case to the #ifdef, drop any include guard checks and instead always undefine the BUS_* definitions on Linux. Signed-off-by: Thierry Reding Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7d89eb4978a6649be22747c3de2886781e311647 Author: Colin Walters Date: Wed Jan 4 17:37:06 2012 -0500 autogen.sh: Honor NOCONFIGURE=1 (Also while we have the patient open, use exec instead of hanging around uselessly in waitpid) http://people.gnome.org/~walters/docs/build-api.txt Reviewed-by: Adam Jackson Signed-off-by: Colin Walters Signed-off-by: Peter Hutterer commit c0a752d2864872023216005375a6a1973fadeffe Author: Lionel Elie Mamane Date: Tue Oct 9 03:17:49 2012 +0200 dix: fix Ungrab action #55785 UngrabAllDevices(Bool kill_client): If we are not going to kill the client (kill_clients false), we need to deactivate grabs of active clients, too. (If we are going to kill the client, no need to deactivate the grab, as this will be done as part of the client kill.) Fixes: X.Org Bug 55785 Signed-off-by: Lionel Elie Mamane Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3b67cd26149eb991b5f015061a818af65369e668 Author: Chase Douglas Date: Thu Jun 7 14:12:06 2012 -0700 End physically active touches when device is disabled Otherwise: * We can't end the touches while device is disabled * New touches after enabling the device may erroneously be mapped to old logical touches Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0e85e5e62819c9e516d6e19836f9f5d7a5d53e87 Author: Colin Harrison Date: Thu Oct 11 18:05:47 2012 +0100 hw/xwin: Fix no return value warning in winClipboardProc() winclipboardthread.c: In function ‘winClipboardProc’: winclipboardthread.c:415:9: warning: ‘return’ with no value, in function returning non-void winclipboardthread.c:424:13: warning: ‘return’ with no value, in function returning non-void Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 51ed6a7d46c6cc19eb9aaf838be41eb57fd8230a Author: Colin Harrison Date: Thu Oct 11 17:57:37 2012 +0100 hw/xwin: Remove unused variable in winmultiwindowwm.c winmultiwindowwm.c: In function ‘UpdateName’: winmultiwindowwm.c:522:14: warning: unused variable ‘pszName’ [-Wunused-variable] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 5886b1dc4d2ce12a238a2e3600fdb576abc6e419 Author: Colin Harrison Date: Thu Oct 11 17:56:11 2012 +0100 hw/xwin: Remove unused variables in winwindow.c winwindow.c: In function ‘winCreateWindowNativeGDI’: winwindow.c:62:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] winwindow.c: In function ‘winDestroyWindowNativeGDI’: winwindow.c:85:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] winwindow.c: In function ‘winPositionWindowNativeGDI’: winwindow.c:108:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] winwindow.c: In function ‘winChangeWindowAttributesNativeGDI’: winwindow.c:213:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] winwindow.c: In function ‘winUnmapWindowNativeGDI’: winwindow.c:241:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] winwindow.c: In function ‘winMapWindowNativeGDI’: winwindow.c:265:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 08b33882f34fed0c23d54ff7361efc5833868a4b Author: Colin Harrison Date: Thu Oct 11 17:52:11 2012 +0100 hw/xwin: Remove unused variables in winvalargs.c winvalargs.c: In function ‘winValidateArgs’: winvalargs.c:62:10: warning: unused variable ‘fImplicitScreenFound’ [-Wunused-variable] winvalargs.c:60:9: warning: unused variable ‘iMaxConsecutiveScreen’ [-Wunused-variable] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 7e665f1a21468118dababdbf6d8573f1ce1ebd47 Author: Colin Harrison Date: Thu Oct 11 17:50:42 2012 +0100 hw/xwin: Remove unused variables in winwindowswm.c winwindowswm.c: In function ‘ProcWindowsWMQueryVersion’: winwindowswm.c:85:9: warning: unused variable ‘n’ [-Wunused-variable] winwindowswm.c: In function ‘SProcWindowsWMQueryVersion’: winwindowswm.c:565:9: warning: unused variable ‘n’ [-Wunused-variable] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit e893d570aa3e9ae8df6a30ac4adaf0949a2fc733 Author: Jon TURNEY Date: Thu Oct 11 19:36:13 2012 +0100 Use X_ATTRIBUTE_PRINTF where suggested for os.h InitOutput.c: In function ‘OsVendorInit’: InitOutput.c:630:29: warning: assignment left-hand side might be a candidate for a format attribute [-Wmissing-format-attribute] winprocarg.c: In function ‘ddxProcessArgument’: winprocarg.c:231:29: warning: assignment left-hand side might be a candidate for a format attribute [-Wmissing-format-attribute] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e59cc83bcdca6b64c1bfb2de395d741757f615f6 Author: Jon TURNEY Date: Thu Oct 11 19:35:19 2012 +0100 hw/xwin: Use X_ATTRIBUTE_PRINTF where suggested for winmsg.c winmsg.c: In function ‘winVMsg’: winmsg.c:47:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winDrvMsg’: winmsg.c:56:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winMsg’: winmsg.c:66:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winDrvMsgVerb’: winmsg.c:77:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winMsgVerb’: winmsg.c:87:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winErrorFVerb’: winmsg.c:97:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winDebug’: winmsg.c:107:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winTrace’: winmsg.c:117:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3d6e6a394ea2d5dcb77aa706f751423315d8a7ed Author: Jon TURNEY Date: Thu Oct 11 19:32:24 2012 +0100 hw/xwin: Use X_ATTRIBUTE_PRINTF where suggested for winerror.c Also, fix the typoed name OsVenderVErrorF (sic), so it actually gets prototyped and remove redundant declarations of it's prototype. winerror.c: In function ‘OsVendorVErrorF’: winerror.c:56:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winerror.c: In function ‘winMessageBoxF’: winerror.c:104:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 13fb6b36b8742a79b9768944eee6d1ad66d7e4d9 Author: Jon TURNEY Date: Thu Oct 11 16:20:35 2012 +0100 hw/xwin: Use char strings in winClipboardUNIXtoDOS for consistency with the rest of the clipboard code winclipboardxevents.c: In function ‘winClipboardFlushXEvents’: winclipboardxevents.c:575:13: warning: passing argument 1 of ‘winClipboardUNIXtoDOS’ from incompatible pointer type winclipboard.h:102:2: note: expected ‘unsigned char **’ but argument is of type ‘char **’ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit fa36a7cd488e4f7fb91beed8a87764b8e0c1a72f Author: Jon TURNEY Date: Thu Oct 11 15:51:39 2012 +0100 hw/xwin: Fix warning about discarding const in initializing winKBLayouts winlayouts.h:46:5: warning: initialization discards qualifiers from pointer target type winlayouts.h:46:5: warning: initialization discards qualifiers from pointer target type winlayouts.h:46:5: warning: initialization discards qualifiers from pointer target type [repeated for each layout] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0ea65df8a5f97a6fe5225226493aa01380080d2f Author: Jon TURNEY Date: Thu Sep 27 17:23:43 2012 +0100 hw/xwin: Fix some of the warnings in generated gl wrapper code Fix some of the warnings in generated gl wrapper code: - glWinResolveHelper takes a const char * argument - ensure formal parameter names don't collide with reserved names or shadow global declarations (e.g. near, far, index (from string.h), remainder (from math.h), pointer (from Xdefs.h) by postpending a '_'. generated_gl_wrappers.c:13:3: warning: passing argument 2 of 'glWinResolveHelper' discards qualifiers from pointer target type glwrap.c:70:1: note: expected 'char *' but argument is of type 'const char *' [repeated many times] generated_gl_wrappers.c: In function 'glVertexAttrib1dARBWrapper': generated_gl_wrappers.c:6884:47: warning: declaration of 'index' shadows a global declaration [-Wshadow] generated_gl_wrappers.c:6886:3: warning: passing argument 2 of 'glWinResolveHelper' discards qualifiers from pointer target type [repeated many times] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit f7f0739311927ad177dece7119272481b75b73b4 Author: Colin Harrison Date: Tue Oct 19 23:42:53 2010 +0100 hw/xwin: Warning fix in ProcWindowsWMFrameSetTitle() winwindowswm.c: In function ‘ProcWindowsWMFrameSetTitle’: winwindowswm.c:514: error: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness If you're going to stick random casts into your code, at least use the goddammed right ones. :-) Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 97c9ed026a7f7efe5fca02c188bcbdbcd7c594e9 Author: Jon TURNEY Date: Wed Jan 25 19:01:55 2012 +0000 hw/xwin: Fix shadowed local variable i in HandleCustomWM_COMMAND() Fix shadowed local variable i in HandleCustomWM_COMMAND() Also, fds are meant to be representable as an int winprefs.c: In function ‘HandleCustomWM_COMMAND’: winprefs.c:346:23: error: declaration of ‘i’ shadows a previous local winprefs.c:322:7: error: shadowed declaration is here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b55d0b92fc536793a877f6073754801a7c3c2dd5 Author: Jon TURNEY Date: Wed Jan 25 18:56:22 2012 +0000 hw/xwin: Fix shadowed local variables in winLoadCursor() Move shadowed local variables x and y to the places they are used wincursor.c: In function ‘winLoadCursor’: wincursor.c:212:11: error: declaration of ‘x’ shadows a previous local wincursor.c:166:7: error: shadowed declaration is here wincursor.c:212:14: error: declaration of ‘y’ shadows a previous local wincursor.c:166:10: error: shadowed declaration is here wincursor.c:228:11: error: declaration of ‘x’ shadows a previous local wincursor.c:166:7: error: shadowed declaration is here wincursor.c:228:14: error: declaration of ‘y’ shadows a previous local wincursor.c:166:10: error: shadowed declaration is here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a8c9c3699e6dfde29eeec058d903740a499dcf3b Author: Jon TURNEY Date: Thu Oct 11 19:11:36 2012 +0100 hw/xwin/glx: Fix using Mask as a formal parameter shadows a global typedef of the same name Fix using Mask as a formal parameter shadows the typedef of the same name from X.h indirect.c: In function 'GetShift': indirect.c:1629:14: warning: declaration of 'Mask' shadows a global declaration [-Wshadow] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 47df98c7851fd9e97a54f0b4950340506d4a9244 Author: Jon TURNEY Date: Wed Jan 25 19:17:16 2012 +0000 hw/xwin: Fix using screenInfo as a formal parameter to InitOutput() shadows a global declaration Using screenInfo as a formal parameter to InitOutput() shadows a global declaration of screenInfo. Change the formal parameter name from screenInfo to pScreenInfo, as everywhere else uses. InitOutput.c: In function ‘InitOutput’: InitOutput.c:891:25: error: declaration of ‘screenInfo’ shadows a global declaration ../../include/scrnintstr.h:570:19: error: shadowed declaration is here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 97e9c34687f7dc05ee0bdef097a19e7623fb59a3 Author: Jon TURNEY Date: Wed Jan 25 19:07:49 2012 +0000 hw/xwin: Fix using menu as a formal parameter shadows a global variable of the same name Using menu as a formal parameter shadows a global variable of the same name winprefsyacc.y: In function ‘SetRootMenu’: winprefsyacc.y:286:20: error: declaration of ‘menu’ shadows a global declaration winprefsyacc.y:55:19: error: shadowed declaration is here winprefsyacc.y: In function ‘SetDefaultSysMenu’: winprefsyacc.y:293:26: error: declaration of ‘menu’ shadows a global declaration winprefsyacc.y:55:19: error: shadowed declaration is here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit efe96a17bd741f222ccb226d306b5c1dc1f25ade Author: Jon TURNEY Date: Wed Jan 25 18:54:57 2012 +0000 hw/xwin: Fix using index as a formal parameter shadows index() Using index as a formal parameter shadows index() from strings.h winallpriv.c: In function ‘winInitCmapPrivates’: winallpriv.c:119:45: error: declaration of ‘index’ shadows a global declaration Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 451c5d9175cdeb36fd614502ff0317f968490dfc Author: Jon TURNEY Date: Wed Jan 25 19:09:12 2012 +0000 hw/xwin: Fix using index as a formal parameter in winscrinit.c shadows index() Using index as a local variable shadows index() from strings.h winscrinit.c: In function ‘winFinishScreenInitFB’: winscrinit.c:274:28: error: declaration of ‘index’ shadows a global declaration winscrinit.c: In function ‘winFinishScreenInitNativeGDI’: winscrinit.c:623:35: error: declaration of ‘index’ shadows a global declaration Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 21faee4b383a12bef58f300b4ad1a3bd34d6de2d Author: Jon TURNEY Date: Wed Jan 25 19:05:42 2012 +0000 hw/xwin: Fix using index as a local variable shadows index() Using index as a local variable shadows index() from strings.h winprefs.c: In function ‘LoadImageComma’: winprefs.c:574:7: error: declaration of ‘index’ shadows a global declaration Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 2d9123fd0c89c1a72e7281e56985196bc53507bf Author: Jon TURNEY Date: Wed Jan 25 18:59:21 2012 +0000 hw/xwin: Fix using index as a formal parameter in winmonitors.c shadows index() Fix using index as a local variable shadows global declaration of index() from strings.h winmonitors.c: In function ‘QueryMonitor’: winmonitors.c:59:23: error: declaration of ‘index’ shadows a global declaration Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5b0435dbdaa47404629800e4e9c5a6952a7bb260 Author: Jon TURNEY Date: Wed Jan 25 18:53:02 2012 +0000 hw/xwin: Fix using system as a local variable in winCheckMount() shadows system() Using system as local variable in winCheckMount() shadows the global declaration of system() from stdlib.h InitOutput.c: In function ‘winCheckMount’: InitOutput.c:296:10: error: declaration of ‘system’ shadows a global declaration Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 17d84c743d6b52f32c4ca0341aebaff972522945 Author: Jon TURNEY Date: Wed Jan 25 17:18:12 2012 +0000 hw/xwin: Remove obsolete redundant declarations of winPushPixels() winPushPixels() and winpushpxl.c was removed in it's entirety in commit f31bd087e8a7f65cd588bd1d022bb18e72b2a60c "Death to mfb" wingc.c:37:1: error: redundant redeclaration of ‘winPushPixels’ win.h:1104:1: note: previous declaration of ‘winPushPixels’ was here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit f06b468d96afd323e28645dde44170ab367da4f1 Author: Jon TURNEY Date: Wed Jan 25 17:09:18 2012 +0000 hw/xwin: Fix redundant declarations in winmultiwindowwm.c winmultiwindowwm.c:139:14: error: redundant redeclaration of ‘display’ ../../include/opaque.h:52:14: note: previous declaration of ‘display’ was here winmultiwindowwm.c:140:13: error: redundant redeclaration of ‘ErrorF’ ../../include/os.h:558:13: note: previous declaration of ‘ErrorF’ was here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3e8269177ee01fe107830032b60a8d311d4b4b0e Author: Jon TURNEY Date: Wed Jan 25 17:08:17 2012 +0000 hw/xwin: Fix redundant declarations in winclipboardwrappers.c Fix redundant declarations in winclipboardwrappers.c. Also remove obsolete winProcQueryTree() prototype. winclipboardwrappers.c:64:12: error: redundant redeclaration of ‘g_iNumScreens’ winglobals.h:33:12: note: previous declaration of ‘g_iNumScreens’ was here winclipboardwrappers.c:67:13: error: redundant redeclaration of ‘g_fXdmcpEnabled’ winglobals.h:45:13: note: previous declaration of ‘g_fXdmcpEnabled’ was here winclipboardwrappers.c:75:27: error: redundant redeclaration of ‘winProcEstablishConnectionOrig’ winglobals.h:66:27: note: previous declaration of ‘winProcEstablishConnectionOrig’ was here winclipboardwrappers.c:76:27: error: redundant redeclaration of ‘winProcQueryTreeOrig’ winglobals.h:67:27: note: previous declaration of ‘winProcQueryTreeOrig’ was here winclipboardwrappers.c:77:27: error: redundant redeclaration of ‘winProcSetSelectionOwnerOrig’ winglobals.h:68:27: note: previous declaration of ‘winProcSetSelectionOwnerOrig’ was here winclipboardwrappers.c:56:5: warning: redundant redeclaration of ‘winProcEstablishConnection’ [-Wredundant-decls] winclipboardwrappers.c:52:5: note: previous declaration of ‘winProcEstablishConnection’ was here winclipboardwrappers.c:57:5: warning: redundant redeclaration of ‘winProcSetSelectionOwner’ [-Wredundant-decls] winclipboardwrappers.c:54:5: note: previous declaration of ‘winProcSetSelectionOwner’ was here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0975fa0b391d7b8d7e8a127ebf7a863e53fcab7d Author: Jon TURNEY Date: Wed Jan 25 17:06:27 2012 +0000 hw/xwin: Fix redundant declaration in winclipboardthread.c winclipboardthread.c:51:22: error: redundant redeclaration of ‘serverGeneration’ ../../include/misc.h:362:22: note: previous declaration of ‘serverGeneration’ was here winclipboardthread.c: In function ‘winClipboardProc’: Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 4a1da00c495706e0fbcec2b30aef3ad7acf5b703 Author: Jon TURNEY Date: Wed Jan 25 17:05:25 2012 +0000 hw/xwin: Fix redundant declaration in winclipboardinit.c In file included from winclipboardinit.c:35:0: winclipboard.h:81:13: error: redundant redeclaration of ‘ErrorF’ ../../include/os.h:558:13: note: previous declaration of ‘ErrorF’ was here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 30f31b80f0105676359105c895bc195b9f3e704c Author: Jon TURNEY Date: Wed Jan 25 16:48:45 2012 +0000 hw/xwin: Fix various warnings in code generated by lex/yacc Remove various redundant declarations. Instruct lex not to generate code which isn't going to be used, thus avoiding some unused function warnings. Note that bison <2.5 expects stdlib.h to define _STDLIB_H if it's been included, and avoids prototyping free/malloc in that case. Some stdlib.h (e.g. newlib) may not match precisely (e.g. defining _STDLIB_H_), so we define it after including stdlib.h to be sure, and avoid a redudant declaration warning for those symbols. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 4231b9541c6fd26f43b605ecc9dd76622dd786f7 Author: Jon TURNEY Date: Wed Jan 25 16:38:49 2012 +0000 hw/xwin: Fix redundant declaration in winprefs.c winprefs.c:63:14: error: redundant redeclaration of ‘display’ ../../include/opaque.h:52:14: note: previous declaration of ‘display’ was here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 70087c55fffc3cbc52f550418e6b1230bbb1b3b3 Author: Jon TURNEY Date: Wed Jan 25 16:36:40 2012 +0000 hw/xwin: Fix redundant declaration warnings in winmonitors.c Include xwin-config.h so HAVE_STRLCPY and HAVE_STRNDUP are defined, so duplicate declarations of strlcpy(), strlcat() and strndup() aren't made by os.h In file included from ../../include/misc.h:111:0, from ../../include/screenint.h:51, from ../../include/scrnintstr.h:51, from win.h:157, from winmonitors.c:31: ../../include/os.h:491:15: error: redundant redeclaration of ‘strlcpy’ /usr/include/string.h:86:35: note: previous declaration of ‘strlcpy’ was here ../../include/os.h:492:15: error: redundant redeclaration of ‘strlcat’ /usr/include/string.h:85:35: note: previous declaration of ‘strlcat’ was here ../../include/os.h:496:15: error: redundant redeclaration of ‘strndup’ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9904c8fe75c96cf84d8885aa95f2743c1b25ea37 Author: Jon TURNEY Date: Wed Jan 25 16:09:59 2012 +0000 hw/xwin: Remove completely unused winregistry.c Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a69429a17bf4630f6e26f61630a1c2b287202627 Author: Jon TURNEY Date: Fri Sep 7 14:58:06 2012 +0100 Fix 'make distcheck' for hw/xwin Add some missing header files to _SOURCES so they get distributed properly Signed-off-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit 1d9fd7ffb03ff6e44f3a8736a94e4558203ce607 Author: Jon TURNEY Date: Thu Sep 6 13:51:38 2012 +0100 Fix compilation of Xorg DDX without XF86VIDMODE Fix compilation of Xorg DDX without XF86VIDMODE since 6e74fdda, by putting xf86vmode.c back under the XF86VIDMODE automake conditional it was accidentally taken out of. Signed-off-by: Jon TURNEY Tested-by: Yaakov Selkowitz Reviewed-by: Daniel Stone commit 25741b1aa3a0fb39cb842a43ab52935673cfdefa Author: Jon TURNEY Date: Sun Sep 2 15:17:05 2012 +0100 hw/xwin: Only add GLX extension once. Using of LoadExtension() to add GLX onto to the end of the list of extensions on every server regeneration leads to hilarious consequences (i.e. crashing) after the first regeneration :-) Possibly xf86ExtensionInit() and QuartzExtensionInit() need a similar fix. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Tested-by: Colin Harrison commit 7ceb85481280fecbf033f147f0f7834cad3890c6 Author: Jon TURNEY Date: Sun Sep 2 14:55:25 2012 +0100 Correct description of -displayfd option in man page. A display number, not a port number, is written to the specified fd. Signed-off-by: Jon TURNEY Reviewed-by: Alan Coopersmith commit 4b7f00346daed20c96f3e8ea13ae411858a5424b Author: Peter Hutterer Date: Wed Oct 10 13:33:48 2012 +1000 dix: fix crash on shutdown if a disabled device is still grabbed (XI1 grab) A disabled device doesn't have a sprite (less so a sprite->win) and triggers a NULL-pointer dereference on shutdown when all active grabs are released as part of the cleanup. Fix this by checking for sprite being non-null and setting the focus window to the NullWindow if it is. The rest of the patch just attempts to make things more readable. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 0c7109f3215378bb3ed6c00c71129a63ffb4e787 Author: Denys Vlasenko Date: Mon Oct 8 14:18:02 2012 +1000 os: fix typo in OsSigHandler() error message Recieved → Received Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0a75bd640b3dc26b89d9e342999a7f4b7e98edbf Author: Peter Hutterer Date: Wed Oct 3 13:12:27 2012 +1000 xfree86: add xf86UpdateDesktopDimensions() This call is required for external drivers (specifically NVIDIA) that do not share the xfree86 infrastructure to update the desktop dimensions. Without it, the driver would update the ScreenRecs but not update the total dimensions the input code relies on for transformation. This call is a thin wrapper around the already-existing internal call and should be backported to all stable series servers, with the minor ABI bump. Signed-off-by: Peter Hutterer CC: Andy Ritger Reviewed-by: Aaron Plattner commit 09f1e5b15b769e1122f0a8d7cae0820038992312 Author: Julien Cristau Date: Sun Oct 7 18:40:35 2012 +0200 Revert "kinput: allocate enough space for null character." This reverts commit 531785dd746d64ef7f473a83ca73bb20e74b6fca. The above commit breaks Xephyr option parsing. Andrzej writes: Xephyr -retro -keybd evdev,,device=/dev/input/event2,xkbrules=evdev,xkbmodel=evdev,xkblayout=pl -mouse evdev,,device=/dev/input/event1 :3 results in: Pointer option key (device=) of value (/dev/input/event1) not assigned! Kbd option key (device=) of value (/dev/input/event2) not assigned! Kbd option key (xkbrules=) of value (evdev) not assigned! Kbd option key (xkbmodel=) of value (evdev) not assigned! Kbd option key (xkblayout=) of value (pl) not assigned! The effect of the patch is that the "key=value" pairs are parsed in such a way that the key is added an "equals" sign to it and we end up with keys like "device=" instead of "device". This in turn has effect on KdParsePointerOptions and KdParseKbdOptions: the key does not match any choice presented in the "switch" statement, and so "Pointer/Kbd option key (...) of value (...) not assigned!" happens, making all "key=value" options inaccessible to the user. Reverting the patch makes them available again. Reference: http://bugs.debian.org/689246 Reported-by: Andrzej Pietrasiewicz Signed-off-by: Julien Cristau Cc: Dave Airlie Reviewed-by: Søren Sandmann Signed-off-by: Keith Packard commit 7f9d78d8ffb1a312f9b3d69c05323f601571e162 Author: Keith Packard Date: Thu Oct 4 22:51:06 2012 -0700 os: Don't re-declare ConnectionInputPtr and ConnectionOutputPtr They're declared in osdep.h, so don't redeclare them in io.c as well. Keeps the compiler happier. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit d5bf6f95f31037bd49b11348b500c3c13b7e0c99 Author: Keith Packard Date: Thu Oct 4 14:42:37 2012 -0700 Fix FlushClient to write extraBuf when provided (regression fix) In commit: commit 092c57ab173c8b71056f6feb3b9d04d063a46579 Author: Adam Jackson Date: Fri Jun 17 14:03:01 2011 -0400 os: Hide the Connection{In,Out}put implementation details Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson the check for an empty output buffer was moved from one calling location into the FlushClient implementation itself. However, this neglected the possibility that additional data, in the form of 'extraBuf' would be passed to FlushClient from other code paths. If the output buffer happened to be empty at that time, the extra data would never be written to the client. This is fixed by checking the total data to be written, which includes both pending and extra data, instead of just the pending data. Signed-off-by: Keith Packard Reviewed-by: Julien Cristau commit 8367dd9736d74eca971da345c2bf559ce5bbf649 Merge: 36c18bb81 7998e2615 Author: Keith Packard Date: Thu Oct 4 13:08:35 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 36c18bb81be619df712778bcb99dd6f1fa38701a Author: Stephan Schreiber Date: Wed Aug 29 20:03:58 2012 +0200 int10: fix pci_device_read_rom usage I noticed that the build-in int10 driver always reports "Unable to retrieve all of segment 0x0C0000." even though the entire BIOS data is retrieved with success. The associated code is in hw/xfree86/int10/generic.c, in the function xf86ExtendedInitInt10(): if (pci_device_read_rom(pInt->dev, vbiosMem) < V_BIOS_SIZE) { xf86DrvMsg(screen, X_WARNING, "Unable to retrieve all of segment 0x0C0000.\n"); } The function pci_device_read_rom() is from libpciaccess; its return value is not a size but an error status code: 0 means success. If pci_device_read_rom() returns 0 for success, the warning is generated. The proposed patch corrects the evaluation of the return value of pci_device_read_rom() and of the supplied BIOS size. Debian bug#686153 Signed-off-by: Julien Cristau Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 4bf3eac5fe20fb203b917a486f69514c55be595a Author: Adam Jackson Date: Thu Sep 27 17:12:19 2012 -0400 configure: Stop using AM_MAINTAINER_MODE All this does is make it so editing configure.ac or Makefile.am doesn't rebuild the makefiles. Which is just stupid. v2: Remove --enable-maintainer-mode from autogen.sh Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Reviewed-by: Dan Nicholson Reviewed-by: Peter Hutterer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 262679d436941580485a10e30938974958f7d588 Author: Keith Packard Date: Thu Oct 4 11:42:22 2012 -0700 Set version to 1.14 development branch (1.13.99.0) Signed-off-by: Keith Packard commit f179b13b91c8891254d31345ee04e773839e6b87 Merge: 4dd5989d1 3d2b768ef Author: Keith Packard Date: Thu Oct 4 11:39:46 2012 -0700 Merge remote-tracking branch 'daniels/master' commit 7998e26159893674be69183a73a89a53f5608d58 Author: Jason Gerecke Date: Fri Sep 28 15:03:42 2012 -0700 Fix additional gcc -Wwrite-strings warning in xf86 ddx Commit 09e4b78f missed a case. Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f64254d85e731d0b4369d871a9a735b03f283ba6 Author: Peter Hutterer Date: Thu Aug 23 15:00:24 2012 +1000 mi: drop two useless conditions in miPointerSetPosition pDev cannot be NULL here since fill_pointer_events is the only caller. And if the screen is NULL, then the device tries to send events before it is fully initialised. That certainly shouldn't happen and would be a bug elsewhere. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 314776eb369ca2e438907795ae030dd743c281fc Author: Daniel Stone Date: Fri Sep 7 18:30:23 2012 +0100 Touch: Fix duplicate TouchBegin selection with virtual devices Given the following scenario: 1) client A selects for TouchBegin on window W for device D 2) client B selects for TouchBegin on window W for XIAllDevices 3) client C selects for TouchBegin on window W with device E Step 3 will fail with BadImplementation, because attempting to look up XIAllDevices or XIAllMasterDevices with dixLookupDevices doesn't work. This should succeed (or, if it was selecting for device D, fail with BadAccess as it would be a duplicate selection). Fix this by performing the appropriate lookup for virtual devices. Signed-off-by: Daniel Stone Cc: Peter Hutterer Cc: Chase Douglas Signed-off-by: Peter Hutterer commit 3e6358ee6c33979329b78fe2097a1fdf76fb69cd Author: Daniel Drake Date: Fri Sep 7 21:48:35 2012 -0400 Xi: Don't check for TOUCH_END, it's never set This flag is never set, so checking for it here means that we'll never release the simulated mouse button press after the user touches (and releases) the touchscreen for the first time. Fixes a problem where the XO laptop touchpad became totally unusable after touching the screen for the first time (since X then behaved as if the mouse button was held down all the time). Signed-off-by: Daniel Drake Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit 9d6b8365702e4648e793fea21ad22f7174558680 Author: Peter Hutterer Date: Fri Sep 28 11:49:29 2012 +1000 dix: fix crash on XI 1.x grabs on disabled devices. (#54934) If the device is disabled, the sprite window is NULL and dereferencing crashes the server. This is only triggered for XI 1.x grabs (ProcXGrabDevice) as XI2 grabs would trigger another code path, creating a sprite for the disabled device as if detaching it (which is wrong and fixed with this patch too). Grabbing a disabled device doesn't make sense as it won't send events anyway. However, the protocol specs do not prohibit it, so we need to keep it working. Luckily, oldWin is only used for focus out events, which aren't necessary given that the device is disabled. X.Org Bug 54934 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 3d2b768efae9936c6929c2bc13c7a1acc074ecd3 Author: Daniel Stone Date: Fri Sep 7 18:17:46 2012 +0100 Touch: Fix duplicate TouchBegin selection with virtual devices Given the following scenario: 1) client A selects for TouchBegin on window W for device D 2) client B selects for TouchBegin on window W for XIAllDevices 3) client C selects for TouchBegin on window W with device E Step 3 will fail with BadImplementation, because attempting to look up XIAllDevices or XIAllMasterDevices with dixLookupDevices doesn't work. This should succeed (or, if it was selecting for device D, fail with BadAccess as it would be a duplicate selection). Fix this by performing the appropriate lookup for virtual devices. Signed-off-by: Daniel Stone Reviewed-by: Chase Douglas commit e3903a9383351b061b1a99dfc653ca50de764ec4 Author: Frederic Plourde Date: Wed Sep 12 10:48:32 2012 -0400 Add glXCreateNewContext support in Xephyr #54798 Similar to how we intercept and pass through CreateContext, also pass through newer CreateNewContext requests. Fixes Clutter → Xephyr → VirtualBox. Signed-off-by: Frederic Plourde Reviewed-by: Daniel Stone commit 11afebc92ce1a7462ff2886286504425b1c8f0ba Author: Daniel Stone Date: Fri Sep 7 18:10:35 2012 +0100 Xephyr: GLX: Support MakeContextCurrent and MakeCurrentReadSGI We need to pass these requests through to the host server in the same way we do glXMakeCurrent. Generalise the existing MakeCurrent submission into once that will send MakeCurrent, MakeContextCurrent or MakeCurrentReadSGI, depending on the request and the host server's capabilities, and add decoding/hijack support for incoming MakeContextCurrent and MakeCurrentReadSGI requests. Fixes Clutter → Xephyr → VirtualBox. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Reviewed-by: Ian Romanick commit 4dd5989d15465f3f3480b521d4e36673972fa24a Merge: 0b02150c2 506e3437c Author: Keith Packard Date: Mon Sep 24 11:43:01 2012 -0700 Merge remote-tracking branch 'ajax/server-1.14-abi-churn' commit 0b02150c27e98f996e10d7489f9f67a30e4e3497 Author: Yufeng Shen Date: Mon Sep 24 14:03:31 2012 -0400 dix: fix scale_to_desktop for edge ABS events Scale_to_desktop() converts ABS events from device coordinates to screen coordinates: [dev_X_min, dev_X_max] -> [screen_X_min, screen_X_max] [dev_Y_min, dev_Y_max] -> [screen_Y_min, screen_Y_max] An edge ABS event with X = dev_X_max (e.g., generated from the edge of a touchscreen) will be converted to have screen X value = screen_X_max, which, however, will be filterd out when xserver tries to find proper Window to receive the event, because the range check for a Window to receive events is window_X_min <= event_screen_X < window_X_max Events with event_screen_X = screen_X_max will fail the test get and rejected by the Window. To fix this, we change the device to screen coordinates mapping to [dev_X_min, dev_X_max] -> [screen_X_min, screen_X_max-1] [dev_Y_min, dev_Y_max] -> [screen_Y_min, screen_Y_max-1] Reviewed-by: Chase Douglas Reviewed-by: Jeremy Huddleston Sequoia Signed-off-by: Yufeng Shen Signed-off-by: Keith Packard commit 7722bcbab2507d263c7685b15cccbfdd52fc3a24 Merge: 4dc2a7674 f54987de9 Author: Keith Packard Date: Sun Sep 23 16:04:13 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 4dc2a76740d921c824a4d8193f39dd373475f02a Author: Adam Jackson Date: Thu Sep 20 17:57:00 2012 -0400 miext/damage: Only wrap into the GC ops chain if there's a listener (v3) before after Operation -------- ----------------- ----------------- 1148346.9 1191807.5 ( 1.04) PutImage 10x10 square 2091666.1 2180983.0 ( 1.04) ShmPutImage 10x10 square v3: In miDamage{R,Unr}egister, bump the serial number of the affected drawable (and all children if it's a window) so subsequent drawing against the damage will trigger another ValidateGC pass and we wrap in/out correctly. Spotted by Aaron Plattner. Signed-off-by: Adam Jackson Reviewed-by: Aaron Plattner Signed-off-by: Keith Packard commit ad0156c369a40762df6b70780358ce14e5f2c9b1 Author: Adam Jackson Date: Thu Sep 20 11:16:26 2012 -0400 dix: Remove MapUnmapEventsEnabled and friends This hack was added to suppress events generated by Composite's internal unmap/map cycle on redirection state change. Since that cycle was removed in 193ecc8b4, these can go. Signed-off-by: Adam Jackson Reviewed-by: Ville Syrjälä Signed-off-by: Keith Packard commit 387b1ac33ca63d27e42d4f61cf248bafb7c43c17 Author: Adam Jackson Date: Thu Sep 20 11:16:25 2012 -0400 dix: Factor out DeliverUnmapNotify Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit d20cc0fca4e36ad9bdbda8950c4466b1976e70a1 Author: Adam Jackson Date: Thu Sep 20 11:16:24 2012 -0400 dix: Factor out DeliverMapNotify Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 63843cb70030812bb3a311b2e8dfb0d1b0a75176 Author: Adam Jackson Date: Thu Sep 20 11:16:23 2012 -0400 dix: Factor out MaybeDeliverMapRequest Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit dab7a1ec7fd97e07405e0b01dc1f1ec6e5fc2e7c Author: Adam Jackson Date: Thu Sep 20 11:16:22 2012 -0400 dix: Fix some indentation Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 3d1051aecbb1955084804133cacd12c7f696833a Author: Peter Hutterer Date: Thu Sep 20 05:56:39 2012 +1000 dix: set the device transformation matrix The property handler is registered after setting the property, so dev->transform remains as all-zeros. That causes pixman_f_transform_invert() to fail (in transformAbsolute()) and invert remains as garbage. This may then cause a cursor jump to 0,0. Since the axes are not yet initialized here and we need to allow for drivers changing the matrix, we cannot use the property handler for matrix initialization, essentially duplicating the code. Triggered by the fix to (#49347) in 749a593e49adccdf1225be28a521412ec85333f4 https://bugzilla.redhat.com/show_bug.cgi?id=852841 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Signed-off-by: Keith Packard commit 1cb0261ef54b7dd6a7ef84e1c3959e424706228b Author: Daniel Martin Date: Thu Sep 6 00:38:26 2012 +0200 dix: Delete mibstore.h Since Nov 2010 (commit c4c4676) the only purpose of mibstore.h was to define an empty function (miInitializeBackingStore()) for backward compatibility. Time to say goodbye. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 08a9ed2524679ed939fa0ad466ee3faf905b8ac4 Author: Daniel Martin Date: Thu Sep 6 00:38:25 2012 +0200 dix: Remove refs to mi backing store from docs Remove any reference to mibstore.h and miInitializeBackingStore() from the documentation. Reviewed-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 76d8739b1f4ed07b874ae56a492d1e0aa0fd9b04 Author: Daniel Martin Date: Thu Sep 6 00:38:24 2012 +0200 dix: Remove #includes of mibstore.h Remove more backing store leftovers. Reviewed-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 056fd15deaa85d3ed936df9a3b2e0cdcfa599da8 Author: Daniel Martin Date: Thu Sep 6 00:38:23 2012 +0200 dix: Delete mibstore.c The only reference to mibstore.c was removed with commit c4c4676. Remove the file itself too. Reviewed-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit f54987de97720200ee94eba1c7a737d4ad8c55c8 Author: Jeremy Huddleston Sequoia Date: Thu Sep 20 21:11:21 2012 -0700 XQuartz: Add some verbose logging to debug xp_lock_window being unbalanced Signed-off-by: Jeremy Huddleston Sequoia commit 25d26875bc9bd6fd23ae1b5280f015abf1b033b7 Author: Jeremy Huddleston Sequoia Date: Thu Sep 20 21:49:40 2012 -0700 XQuartz: Avoid a possible deadlock with DRI on OS X 10.7.5 and OS X 10.8.2 http://bugs.winehq.org/show_bug.cgi?id=31751 Signed-off-by: Jeremy Huddleston Sequoia commit 506e3437c73e5ae935ff7c056d7808fbb0c7e614 Author: Adam Jackson Date: Thu Sep 20 14:22:48 2012 -0400 dix: Fix types in WindowOptRec No reason for these to be 64 bits on LP64. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 092c57ab173c8b71056f6feb3b9d04d063a46579 Author: Adam Jackson Date: Fri Jun 17 14:03:01 2011 -0400 os: Hide the Connection{In,Out}put implementation details Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit e2c7d70e5ddb8b17676a13ceebfbb87d14d63243 Author: Adam Jackson Date: Fri Jun 17 13:43:38 2011 -0400 dix: Extend initial connection handshake for forwarding proxies Forwarding proxies like sshd will appear to be local, even though they aren't really. This leads to weird behaviour for extensions that truly require running under the same OS services as the client, like MIT-SHM and DRI2. Add two new legal values for the initial connection's byteOrder field, 'r' and 'R'. These act like 'l' and 'B' respectively, but have the side effect of forcing the client to be treated as non-local. Forwarding proxies should attempt to munge the first packet of the connection accordingly; older servers will reject connections thusly munged, so the proxy should fall back to passthrough if the munged connection attempt fails. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 31bf81772e146af79b0c456aae2159eba8b0280f Author: Adam Jackson Date: Thu Sep 20 14:00:09 2012 -0400 dix: Repack ClientRec Pick smaller types where possible, including bitfielding some Bools and small enums, then shuffle the result to be hole-free. 192 -> 128 bytes on LP64, 144 -> 96 bytes on ILP32. Signed-off-by: Adam Jackson commit ff8e3ad8074cd2c8bed49b39c40c2b4892118270 Author: Adam Jackson Date: Thu Sep 20 13:16:59 2012 -0400 dix: Pull client-is-local flag up to the ClientRec Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 3f7bc222638d5d38324ecbc8c2c4e39af17d110e Author: Adam Jackson Date: Thu Jun 16 17:40:24 2011 -0400 os: Repack ConnectionOutput for LP64 Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit d01921ec18c21f21d377b60626cc2d3418b84a7c Merge: 70e576687 245e7e036 Author: Keith Packard Date: Thu Sep 20 17:26:48 2012 +0200 Merge remote-tracking branch 'ajax/ioperm' commit 5109c7f6581b3e4e23700bfd03b4daf0ba97630e Author: Adam Jackson Date: Thu Sep 20 11:19:39 2012 -0400 xfree86: Bump video ABI to 14 Signed-off-by: Adam Jackson commit 245e7e0361b18766583ae391a2ac1231bb1a1f84 Author: Adam Jackson Date: Tue Jun 26 14:32:31 2012 -0400 xfree86: Change the semantics of driverFunc(GET_REQUIRED_HW_INTERFACES) This is a really awkward interface, since we're calling it well before the driver knows what device it's going to drive. Drivers with both KMS and UMS support therefore don't know whether to say they need I/O port access or not, and have to assume they do. With this change we now call it only to query whether port access might be needed; we don't use that to determine whether to call a driver's probe function or not, instead we call them unconditionally. If the driver doesn't check whether port access was enabled, they might crash ungracefully. To accomodate this, we move xorgHWAccess to be explicitly intentionally exported (sigh xf86Priv.h) so that drivers can check that before they attempt port access. v2: Move initial xf86EnableIO() nearer the logic that determines whether to call it, suggested by Simon Farnsworth. Reviewed-by: Alex Deucher Reviewed-by: Simon Farnsworth Signed-off-by: Adam Jackson commit d88fb00d791c2b19cf9dd244276838aba3a6b442 Author: Adam Jackson Date: Tue Jun 26 13:15:45 2012 -0400 linux: Make failure to iopl non-fatal We load the driver list, then enable I/O, then call driver probe based on whether I/O enable succeeded. That's bad, because the loaded security policy might forbid port access. We happen to treat that as fatal for some reason, which means even drivers that don't need I/O access (like kms and fbdev) don't get the chance to run. Facepalm. How about we just make that non-fatal instead, that sounds like a much better plan. Reviewed-by: Alex Deucher Reviewed-by: Simon Farnsworth Signed-off-by: Adam Jackson commit 048674a6aeb61149a1b5f6b0bc3762ddf57f38ee Author: Adam Jackson Date: Tue Jun 26 13:12:45 2012 -0400 linux: Refactor xf86{En,Dis}ableIO Pull platform methods into their own sections for legibility, and rewrite the ifdefs to be more concise. Reviewed-by: Alex Deucher Reviewed-by: Simon Farnsworth Signed-off-by: Adam Jackson commit 70e5766874a919039678bb2ed75f2ccea0cb4345 Author: Dave Airlie Date: Mon Aug 27 15:22:44 2012 +1000 xf86: fix multi-seat video device support. (v2) If we are not seat 0 the following apply: don't probe any bus other than platform don't probe any drivers other than platform assume the first platform device we match on the bus is the primary GPU. This just adds checks in the correct places to ensure this, and with this X can now start on a secondary seat for an output device. v2: fix Seat0 macros Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 37d956e3ac9513b74078882dff489f9b0a7a5a28 Author: Keith Packard Date: Mon Sep 10 11:14:20 2012 +1000 xf86: fix compat output selection for no output GPUs This should work properly with dynamic outputs. Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit e0b92f5f86f8ce71ab4c80e9902e51e2525f9705 Author: Dave Airlie Date: Thu Sep 13 18:44:06 2012 +1000 config/udev: ignore change on drm devices for input devices we handle change like remove/add, but for drm devices we get change events when we hotplug outputs, so lets just ignore change at this level, and let the drivers handle it. We may in the future want to route driver udev from here instead. Reported-by: Timo Aaltonen Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 10672a5abe7d4e924844d7e41c86c24d6367a52b Author: Dave Airlie Date: Mon Sep 10 14:48:37 2012 +1000 xf86/platform: scan pci after probing devices This solves a race if we are trying to dynamically power off secondary GPUs. Its not the greatest fix ever but it probably as good as we can do for now. The GPU probing causes the devices to be powered up, then when we scan the PCI bus we get the correct information from the kernel, rather than a bunch of 0xff due to the device being powered off. drop gratuitous '&'. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit e47ad8a0aec7662970e7f81e6ee487330bf094c1 Author: Dave Airlie Date: Mon Sep 17 11:48:14 2012 +1000 modesetting: remove alloca usage again this slipped back in. Signed-off-by: Dave Airlie commit 22746df15b5f75dc85f5cf5b73932eb8a44cb89b Author: Dave Airlie Date: Thu Sep 6 16:33:54 2012 +1000 dri2: invalidate drawable after sharing pixmap After we share the pixmap, the backing storage may have changed, and we need to invalidate and buffers pointing at it. This fixes GL compositors and prime windows lacking contents initially. Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie commit f8eb8c1cb4f453bdbe6a81815be8ecefba2084aa Author: Alon Levy Date: Tue Aug 28 11:46:47 2012 +1000 modesetting: add virtual connector support [airlied: also make sure we don't crash in future.] Signed-off-by: Alon Levy Signed-off-by: Dave Airlie commit 5eb697d88f0735e98fe9a97770ddda83202b1597 Author: Maarten Lankhorst Date: Thu Sep 13 08:45:14 2012 +0200 bump version to 0.5.0 commit f0bad69edd57facd6cffde8cb0863d1a735e2492 Author: Keith Packard Date: Wed Sep 5 14:45:08 2012 -0700 Version bumped to 1.13 Signed-off-by: Keith Packard commit 856f80c8d7f22b979c72d9c70b70187df6004a03 Merge: 0db936a5b b8ab93dfb Author: Keith Packard Date: Wed Sep 5 11:02:58 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 0db936a5b7125d9b73633733cb34e5e4b72f01e8 Author: Dave Airlie Date: Mon Sep 3 15:09:36 2012 +1000 xf86: call enter/leave VT for gpu screens as well Otherwise we can't do fast user switch properly for multiple GPUs. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 18deac48db0d2387242461025904eb28a0f71fac Author: Dave Airlie Date: Mon Aug 27 15:17:21 2012 +1000 config/udev: respect seat for hotplugged video devices. This respects the seat tag for hotplugged video devices at X start. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit ec740cffeba59216f4293fba829097654cde3b11 Author: Dave Airlie Date: Mon Aug 27 15:15:19 2012 +1000 config/udev: add wrapper around check if server is not seat 0 this is a simple clean-up that is useful to stop further propogation of this construct. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 49ec57d5094be0dd2b67435ac7bb04ead780f36d Author: Dave Airlie Date: Fri Aug 24 13:23:01 2012 +1000 dix: free default colormap before screen deletion If we don't free this here, it gets freed later in the resource cleanups, however it then looks up up pmap->pScreen, which we freed already in this function. So free the default colormap when we should. This fixes a bug after a couple of hotplug cycles when you try to exit the X server and it crashes. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 20f601a0fbc01a4f8ab85e54ee45f78f7817cdb5 Author: Dave Airlie Date: Fri Aug 24 12:56:18 2012 +1000 xf86/crtc: don't free config->name This is set by pre_init not screen init, so if we free it here and then recycle the server, we lose all the providers. I think we need to wrap FreeScreen here to do this properly, will investigate for 1.14 most likely, safer to just leak this on server exit for now. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit b8ab93dfbc7f292b5bfe7e9113e1af824ccbd1a8 Author: Jeremy Huddleston Sequoia Date: Tue Aug 28 10:06:51 2012 -0700 list: Use offsetof() and typeof() to determine member offsets within a structure Some compilers have difficulty with the previous implementation which relies on undefined behavior according to the C standard. Using offsetof() from (which most likely just uses __builtin_offsetof on modern compilers) allows us to accomplish this without ambiguity. This fix also requires support for typeof(). If your compiler does not support typeof(), then the old implementation will be used. If you see failures in test/list, please try a more modern compiler. v2: Added fallback if typeof() is not present. Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer commit 148583d62b84832369e9df39b3e527b99ca96761 Author: Peter Hutterer Date: Wed Aug 29 09:11:35 2012 +1000 tests: move GCC diagnostics pragma outside of function This is a a gcc 4.6+ feature. signal-logging.c:210: error: #pragma GCC diagnostic not allowed inside functions Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit c75c947b6e9bc725821b28835f3667c4aabef9ee Author: Jeremy Huddleston Sequoia Date: Tue Aug 28 12:43:55 2012 -0700 test/list: Fix test_xorg_list_del test We never use child[2], so it's state is undefined. This issue seems to have existed since the test was first written: 92788e677be79bd04e5ef140f4ced50ad8b1bf8e Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer commit 486038fe16957b39d39842365c5409c494c9a8df Author: Jeremy Huddleston Sequoia Date: Mon Aug 27 22:35:51 2012 -0700 XQuartz: Bump Info.plist version to 2.7.4 Signed-off-by: Jeremy Huddleston Sequoia commit b90b3f6eac34616c46ab693fafbf6b73a04f407b Author: Jeremy Huddleston Sequoia Date: Mon Aug 27 17:15:19 2012 -0700 test: Make os test more compliant sighandler_t is not UNIX. Regression from: 7f09126e068015db54c56bb982b8f91065375700 Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer commit a557edca6152ad09c685a00e01534c35a1f00f2e Merge: 6619f5c0e 24ffcfcde Author: Keith Packard Date: Mon Aug 27 08:06:09 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 24ffcfcded6b4b024958801e8a6cecad36d9a3e3 Author: Peter Hutterer Date: Mon Aug 20 10:28:26 2012 +1000 os: fix typo, fsync when WIN32 is _not_ defined Introduced in 164b38c72fe9c69d13ea4f9c46d4ccc46566d826 Reported-by: Jon TURNEY Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d53e6e02a2595ced1882f5fcd34d08ea039b3b85 Author: Peter Hutterer Date: Thu Aug 16 13:54:42 2012 +1000 mi: don't check for core events in miPointerSetPosition (#53568) As of 81cfe44b1ed0de84ad1941fe2ca74bebef3fc58d, miPointerSetPosition now returns the screen pointer of the device. This broke floating slave devices, as soon as a motion event was submitted, miPointerSetPosition returned NULL, crashing the server. dev->coreEvents is only false if the device is a floating slave, in which case it has a sprite. X.Org Bug 53568 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 6619f5c0e1086b57888ff7146e8ed5897b50d440 Author: Keith Packard Date: Tue Aug 21 13:46:34 2012 -0700 Relase 1.12.99.905 RC with updated ABI version numbers. Signed-off-by: Keith Packard commit bafbd99080be49a17be97d2cc758fbe623369945 Author: Peter Hutterer Date: Wed Aug 8 11:34:32 2012 +1000 dix: work around scaling issues during WarpPointer (#53037) In WarpPointer calls, we get input in screen coordinates. They must be scaled to device coordinates, and then back to screen coordinates for screen crossing and root coordinates in events. The rounding errors introduced (and clipping in core/XI 1.x events) can lead to the actual position being different to the requested input coordinates. e.g. 200 scales to 199.9999, truncated to 199 in the event. Avoid this by simply overwriting the scaled screen coordinates with the input coordinates for the POINTER_SCREEN case. X.Org Bug 53037 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 1ebba43052d68d874148e63c9ae38489ddfc5ec1 Author: Peter Hutterer Date: Wed Aug 15 14:49:04 2012 +1000 os: don't block signal-unsafe logging, merely warn about it. Throw an error into the log file, but continue anyway. And after three warnings, stop complaining. Not all input drivers will be fixed in time (or ever) and our printf implementation is vastly inferior, so there is still a use-case for non-sigsafe logging. This also adds more linebreaks to the message. CC: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4912b4adb666dad96b832ab2d7caaae49808723e Author: Peter Hutterer Date: Mon Aug 13 14:44:44 2012 +1000 os: add support for %d and %i to pnprintf The mouse driver uses %i in some debug messages Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 7f8c39c8b5ef89153ecd84d16331e96d8feb18ef Author: Peter Hutterer Date: Mon Aug 13 14:24:36 2012 +1000 Add FormatInt64 to convert signed integers in signal-safe manner Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 36c1d92ec0ef0f3927034a12d4cb79dcc22bd185 Author: Peter Hutterer Date: Mon Aug 13 12:24:39 2012 +1000 test: add a few tests for signal-safe logging Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b69536b475118a8787c1726355b504207bf83f8f Author: Peter Hutterer Date: Mon Aug 13 11:15:54 2012 +1000 test: assert from signal-safe number conversion Throw an assert when the conversion fails instead of just returning. Asserts are more informative. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 3e091e1075dc29120e54ab2ef110b04ce7383ffd Author: Aaron Plattner Date: Fri Aug 17 11:26:05 2012 -0700 xfree86: Bump extension ABI to 7.0 Commit 9d457f9c55f12106ba44c1c9db59d14f978f0ae8 added an array of DevPrivateSetRec structures in the middle of the ScreenRec, which throws off extension modules trying to call things like pScreen->DestroyPixmap. Signed-off-by: Aaron Plattner Signed-off-by: Keith Packard commit ac616d8ed5a634c6b32775eb7b071a13c575fd97 Author: Jeremy Huddleston Sequoia Date: Thu Aug 16 19:09:42 2012 -0700 XQuartz: Use asl_log_descriptor for children as well This change is #if'd out due to a bug in asl_log_descriptor, but it is left here as reference to be enabled in the future. Signed-off-by: Jeremy Huddleston Sequoia commit ad123071e54d890d36d1373f59b8a6eb4937e936 Author: Jeremy Huddleston Sequoia Date: Thu Aug 16 13:02:28 2012 -0700 XQuartz: Use asl_log_descriptor on Mountain Lion Signed-off-by: Jeremy Huddleston Sequoia commit 7c3d2e4828deb4e8ec38e8ef88d6f92b2d931033 Author: Jeremy Huddleston Sequoia Date: Thu Aug 16 19:42:54 2012 -0700 XQuartz: console_redirect: Properly zero-out the tail of the array on realloc() We forgot to multiply by sizeof(), so it wasn't fully zeroed out. Signed-off-by: Jeremy Huddleston Sequoia commit a32e01802ff1c938c0afe0cc007a273b9ada8610 Author: Jeremy Huddleston Sequoia Date: Thu Aug 16 15:43:34 2012 -0700 XQuartz: console_redirect: Set the correct location for reading into the buffer Prior to this change, it was possible that a large message would have some of its data prepended to subsequent messages due to our not incorrectly setting the location to write into the buffer. Signed-off-by: Jeremy Huddleston Sequoia commit e3d7d5d18e3281677890064679af459e1af108cf Author: Adam Jackson Date: Thu Jul 19 22:15:10 2012 +0000 Implement ->driverFunc Copied from fbdev, makes it so we can run without iopl. Signed-off-by: Adam Jackson commit ad5fe2d9614959b68bf71e23abf7e5abac9c2734 Merge: 16d8da5ca 99b94af1f Author: Keith Packard Date: Wed Aug 15 13:29:17 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 16d8da5ca99211bd180f532d78d7c5943d38c8ad Author: Paul Berry Date: Tue Jul 31 15:15:56 2012 -0700 glx: Skip multisampled configs when matching pre-existing X visuals. In __glXScreenInit() we generate the set of GLX visuals in two steps: first we match each pre-existing X visual with a corresponding FBConfig, then we generate a new X visual to correspond to all the remaining FBConfigs. The first step is used for the two default 24-bit visuals (true color and direct color) and for the 32-bit visual. If windowsystem multisampling is enabled in Mesa, we need to ensure that none of these three visuals gets matched to a multisampled config. Fixes a bug with windowsystem multisampling in gnome-shell. If the X server happens to match up a multisampled FBConfig to the 32-bit visual, gnome-shell will try to use it to read pixels from alpha-blended windows (such as gnome-terminal), resulting in no window appearing on screen. Reviewed-by: Ian Romanick Reviewed-by: Chad Versace Signed-off-by: Keith Packard commit 99b94af1ffbef7047f88e7d6c594242d172bec02 Author: Jeremy Huddleston Date: Wed Aug 15 10:28:16 2012 -0700 XQuartz: Fix build regression for GlxExtensionInit quartz.c:153:6: error: use of undeclared identifier 'GlxExtensionInit'; did you mean 'GEExtensionInit'? [Semantic Issue] {GlxExtensionInit, "GLX", &noGlxExtension}, Regression-from: aad428b8e21c77397c623b78706eb64b1fea77c9 Signed-off-by: Jeremy Huddleston commit c0540b4c8db676d18a9a09828f1590b0b16f9ebc Author: Keith Packard Date: Tue Aug 7 17:49:48 2012 -0700 Kludge -- Call RandR screen before cleaning up xf86 crtcs The core RandR screen cleanup now involves cleaning up any GPU screen associations, and those call down into DDX to clean up the driver. If the pointers from the xf86 structures back to the core randr structures are set to NULL at that point, bad things happen. This patch "knows" that the core RandR close screen is underneath the xf86 randr close screen function, and so makes sure it gets called first. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 288b87e42cbb5db34cda848143655e84af8455da Author: Keith Packard Date: Tue Aug 7 17:49:47 2012 -0700 Close GPU screens before core screens This should make cleaning up the GPU screens easier as the core screens they are associated with will still be around. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 19772670e3041fe1c7f5bbf32fa039a6d8245ccb Author: Keith Packard Date: Tue Aug 7 17:49:46 2012 -0700 Only free Render filter names on last screen close Hotplugging screens causes the render filter names to get freed while still in use; wait for the last core screen to be closed before freeing them. That only happens at server reset, when we want them to be freed. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 863d528a9f76d0e8f122aebf19f8564a4c67a938 Author: Simon Schubert <2@0x2c.org> Date: Sun Aug 12 09:40:16 2012 -0700 fb: reorder Bresenham error correction to avoid overshoot. When fbBresSolid draws a line, it can happen that after the last pixel, the Bresenham error term overflows, and fbBresSolid paints another pixel before adjusting the error term. However, if this happens on the last pixel (len=0), this extra pixel might overshoot the boundary, and, in rare cases, lead to a segfault. Fix this issue by adjusting for the Bresenham error term before drawing the main pixel, not after. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24274 Signed-off-by: Simon Schubert <2@0x2c.or> Tested-by: Mitch Davis Signed-off-by: Matt Turner Signed-off-by: Keith Packard commit c22c936b35cee60609041ccb7ee52c00b0634d7b Author: Keith Packard Date: Tue Aug 7 16:04:25 2012 -0700 Release 1.12.99.904 Closing the non-critical bug window for 1.13 Signed-off-by: Keith Packard commit f94ec283efc922106e7ea1d85771950c66ee8f3b Author: Keith Packard Date: Tue Aug 7 16:18:21 2012 -0700 Distribute include/glx_extinit.h This changed should have been in aad428b8e21c77397c623b78706eb64b1fea77c9 Signed-off-by: Keith Packard commit 9ca67de8feab59fcf7d6e3fdec8d8a7cfbb21651 Author: Julien Cristau Date: Sat Jul 14 16:07:51 2012 +0200 Bump glproto requirement to 1.4.16 Signed-off-by: Julien Cristau Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 02f94b2d446f6700f791f318c551ac835af8445a Merge: 360fa7736 7f09126e0 Author: Keith Packard Date: Mon Aug 6 16:52:12 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 360fa7736b214cae3ccd39feb4dc87b9e7e9734c Merge: 2100e7238 ac09a4a09 Author: Keith Packard Date: Mon Aug 6 16:42:34 2012 -0700 Merge remote-tracking branch 'airlied/for-keithp' commit 2100e72388a3dc174093d80c9723f021b4614d17 Merge: 4a6f42dda c37c65052 Author: Keith Packard Date: Mon Aug 6 16:40:54 2012 -0700 Merge remote-tracking branch 'alanc/master' commit 7f09126e068015db54c56bb982b8f91065375700 Author: Peter Hutterer Date: Fri Aug 3 15:36:34 2012 +1000 os: don't unconditionally unblock SIGIO in OsReleaseSignals() Calling OsReleaseSignal() inside the signal handler releases SIGIO, causing the signal handler to be called again from within the handler. Practical use-case: when synaptics calls TimerSet in the signal handler, this causes the signals to be released, eventually hanging the server. Regression introduced in 08962951de. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit cb306a8f174bec9ded95191b91797f59250e6808 Author: Peter Hutterer Date: Tue Jul 31 16:09:38 2012 +1000 dix: make sure the mask is set for emulated scroll events (#52508) If a device has smooth scrolling axes, but submits scroll button events, we convert those to motion events and update the valuators. For legacy button events, the valuator mask is likely unset though, causing add_to_scroll_valuator() to return early, leaving us with an empty mask. That again skipped the rest of the code and no events were generated. Fix it by making sure that the scroll valuator in the mask is at least initialized to 0. Broke evdev wheel emulation, introduced by 54476b5e4461ff523e935961affabcf0de12c556. X.Org Bug 52508 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4a6f42dda00ba3b5616f8a86f0d4c9a652c7d9d4 Author: Adam Jackson Date: Mon Jul 23 16:34:28 2012 -0400 sync: Fix logic error from b55bf248581dc66321b24b29f199f6dc8d02db1b That commit adds two hunks, and I _think_ they're backwards. It adds code to modify bracket_greater on NegativeTransition triggers, and bracket_less on PositiveTransition triggers. That breaks symmetry with the surrounding code; the code as of this commit could probably be simplified further. I can't keep the sync trigger rules in my head for more than about five minutes at a time, so I'm sending this on for more eyes. RHEL 6.3's xserver is shipping with b55bf248 reverted: https://bugzilla.redhat.com/show_bug.cgi?id=748704#c33 And there appear to be some upstream reports of the same issue: https://bugzilla.gnome.org/show_bug.cgi?id=658955 So I'd like to get this sorted out. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 454d0e3a1bb14d7f2579ccb5e513cec5686160e7 Author: Dave Airlie Date: Thu Jul 26 12:56:51 2012 +1000 randr: fix xinerama output for output slaves This fixes the xinerama geometry when output slaves are enabled. Tested with xdpyinfo -ext XINERAMA before after slave added. Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit ac09a4a091a43188241365152e1244fd8fd93ee7 Author: Dave Airlie Date: Fri Aug 3 16:43:22 2012 +1000 dri2: fix master pixmap free and reset pointer These are two minor changes, one to reset the pointer to NULL, after freeing the pixmaps, one to make sure we use the right API for the master pixmap, though I doubt it'll ever really matter. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher commit 64623ef90db649e89345f71871affe7a9606f6ea Author: Dave Airlie Date: Fri Aug 3 16:42:44 2012 +1000 dri2: free slave pixmap on app exit When the drawable disappears we need to free the prime master/slave combos. This fixes a leak after a prime app is run. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher commit 1a465fef9bc21142eecca3999f0761a3c0501a09 Author: Dave Airlie Date: Fri Aug 3 16:41:45 2012 +1000 pixmap: have slave pixmap take a reference on master pixmap Since the free routines free the master pixmap then the slave, we should be taking a reference when we bind them together. Fixes a use-after-free when resizing a primed gears. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher commit c37c65052f674cd58894ad0b9ec22928a62c624e Author: Alan Coopersmith Date: Mon Jul 16 21:12:06 2012 -0700 Make indentation of dix/tables.c much more consistent and readable Signed-off-by: Alan Coopersmith Acked-by: Daniel Stone commit 9f7ef7f7f0566f6319d8328ce0a1e6d0fa866720 Author: Alan Coopersmith Date: Mon Jul 16 20:53:00 2012 -0700 Fix up formatting of initializers for arrays of structs The indenter seems to have gotten confused by initializing arrays of structs with the struct defined inline - for predefined structs it did a better job, so match that. Signed-off-by: Alan Coopersmith commit c7b7abfaa068042e396d19538215402cfbb4f1e4 Author: Alan Coopersmith Date: Sat Jul 14 11:21:15 2012 -0700 RRModeCreate: plug memory leak of newModes if AddResource fails Reported by parfait 1.0: Error: Memory leak (CWE 401) Memory leak of pointer 'newModes' allocated with realloc(((char*)modes), ((num_modes + 1) * 8)) at line 93 of randr/rrmode.c in function 'RRModeCreate'. pointer allocated at line 82 with realloc(((char*)modes), ((num_modes + 1) * 8)). Error: Memory leak (CWE 401) Memory leak of pointer 'newModes' allocated with malloc(8) at line 93 of randr/rrmode.c in function 'RRModeCreate'. pointer allocated at line 84 with malloc(8). Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 1eb7be863353be2cf3e83738253eb60c5fe49d19 Author: Alan Coopersmith Date: Sat Jul 14 09:29:52 2012 -0700 rrproperty.c: free newly allocated prop in more error paths Reported by parfait 1.0: Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with RRCreateOutputProperty(property) at line 220 of randr/rrproperty.c in function 'RRChangeOutputProperty'. 'prop' allocated at line 154 with RRCreateOutputProperty(property). prop leaks when pending != 0 at line 160. Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with RRCreateOutputProperty(property) at line 346 of randr/rrproperty.c in function 'RRConfigureOutputProperty'. 'prop' allocated at line 334 with RRCreateOutputProperty(property). at line 350 of randr/rrproperty.c in function 'RRConfigureOutputProperty'. 'prop' allocated at line 334 with RRCreateOutputProperty(property). Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 42e655de4d95cb108aec50efec6bbdb709bb13d7 Author: Alan Coopersmith Date: Tue Jul 10 23:29:53 2012 -0700 rrproviderproperty.c: free newly allocated prop in more error paths Reported by parfait 1.0: Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with RRCreateProviderProperty(property) at line 221 of randr/rrproviderproperty.c in function 'RRChangeProviderProperty'. 'prop' allocated at line 155 with RRCreateProviderProperty(property). prop leaks when pending != 0 at line 161. Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with RRCreateProviderProperty(property) at line 345 of randr/rrproviderproperty.c in function 'RRConfigureProviderProperty'. 'prop' allocated at line 333 with RRCreateProviderProperty(property). at line 349 of randr/rrproviderproperty.c in function 'RRConfigureProviderProperty'. 'prop' allocated at line 333 with RRCreateProviderProperty(property). Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 94b514d5e4b376d05e106eb3853da511256e8545 Merge: 7d87545ba 732890004 Author: Keith Packard Date: Mon Aug 6 15:13:17 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 7d87545ba7395ade507cca7bdca7052b26ed18d8 Merge: ad707a7dc 988d7ace1 Author: Keith Packard Date: Mon Aug 6 15:11:13 2012 -0700 Merge remote-tracking branch 'jturney/master' commit ad707a7dcc65c30e030c7600b54f734090e56a91 Merge: 5a51cb86f 884f51e97 Author: Keith Packard Date: Mon Aug 6 15:08:01 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 5a51cb86f39a6809305c403beea54c3625e36259 Author: Keith Packard Date: Tue Jul 10 23:09:47 2012 -0700 xfree86: When xf86CrtcCloseScreen is called, the randr CRTCs are gone The RandR CRTC structures are freed when their resource IDs are destroyed during server shut down, which is before the screen is closed. Calling back into RandR with stale pointers just segfaults the server. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie Tested-by: Knut Petersen commit 1bf81af4a6be1113bcc3b940ab264d5c9e0f0c5d Author: Rui Matos Date: Mon Jul 30 14:32:12 2012 -0400 xf86RandR12: Don't call ConstrainCursorHarder() if panning is enabled Panning is at odds with CRTC cursor confinement. This disables CRTC cursor confinement as long as panning is enabled. Fixes regression introduced in 56c90e29f04727c903bd0f084d23bf44eb1a0a11. Reviewed-by: Adam Jackson Signed-off-by: Rui Matos Signed-off-by: Keith Packard commit ff56f88616aa63797384c2c484b2bd0f194df96a Author: Adam Jackson Date: Mon Jul 30 14:32:11 2012 -0400 randr: Fix up yet another corner case in preferred mode selection Let's say - purely for the sake of argument, mind you - that you had a server GPU with anemic memory bandwidth, and you walked up to it and plugged in a monitor that was 1920x1080 because that's what happened to be on the crash cart. Say the memory bandwidth is such that anything larger than 1280x1024 gets filtered away. Now you're in trouble, because the established timings section includes a 720x400 mode because that's what DOS 80x25 is, and that happens to just about match the physical aspect ratio. Instead let's reuse the logic from the existing aspect-match path: pick the larger mode of either the physical aspect ratio or 4:3. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 531785dd746d64ef7f473a83ca73bb20e74b6fca Author: Dave Airlie Date: Mon Jul 30 14:32:10 2012 -0400 kinput: allocate enough space for null character. This code wasn't allocating enough space and was assigning the NULL one past the end. Pointed out by coverity. Reviewed-by: Jeremy Huddleston Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit 8843aed82e7d69422e7763a35832a2be8f26723f Author: Vic Lee Date: Mon Jul 30 14:32:09 2012 -0400 ephyr: Resize screen automatically when parent window is resized Bugzilla: https://bugs.freedesktop.org/25804 Reviewed-by: Adam Jackson Signed-off-by: Vic Lee Signed-off-by: Keith Packard commit b46bbafae6d0a8b3f2f7853d5c1475fc223b1ed6 Author: Adam Jackson Date: Mon Jul 30 14:32:08 2012 -0400 ephyr: Fix up some bizarre formatting Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 7328900042b9c1312aed48753fd6054e64613e4c Author: Alan Coopersmith Date: Mon Jul 30 23:37:06 2012 -0700 XIChangeDeviceProperty: free newly allocated prop when SetProperty fails Reported by parfait 1.0: Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with XICreateDeviceProperty(property) at line 774 of Xi/xiproperty.c in function 'XIChangeDeviceProperty'. 'prop' allocated at line 700 with XICreateDeviceProperty(property). prop leaks when handler != NULL at line 768 and handler->SetProperty != NULL at line 769 and checkonly != 0 at line 772 and rc != 0 at line 772. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 4dbbcdf64563cb95f83c04b2442cb7e868384264 Author: Daniel d'Andrada Date: Thu Jul 26 17:31:57 2012 -0300 Do sent TouchEnd to listeners that don't own an accepted touch When the owner of a touch accepts it, the other listeners must receive a TouchEnd. Even though there's code implementing the logic above in ProcessTouchOwnershipEvent(), DeliverTouchEndEvent() was refusing to send those TouchEnd events in this situatuation. Signed-off-by: Daniel d'Andrada Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit 02d91ccb0955252153206061a44340f051077624 Author: Peter Hutterer Date: Thu Jun 21 15:42:17 2012 +1000 test: always add DIX_LIB and OS_LIB on XORG builds With --disable-xorg, We also disabled a bunch of tests because of their perceived reliance on a DDX. The cause was libtool missing some object files that never ended up in libxservertest.la. Only the xfree86 test has a true dependency on XORG. DIX_LIB was pointing to dix.O (instead of libdix.la) when DTRACE_SPECIAL_OBJECTS was defined. libdix.la should be part of XSERVER_LIBS but dix.O is not a recognised libtool object, so it got skipped for libxservertest.a. Only in the XORG case would we add DIX_LIB and OS_LIB manually, thus forcing linkage with the dtrace-generated objects. Fixing this by packaging up the dtrace-generated files as part of libdix.la/libos.la doesn't work for Solaris (and possible others), so simply always force linkage against the DIX_LIB/OS_LIB in the case of dtrace objects. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit 988d7ace19a009991a4528e783d1a94c2444c66a Author: Jon TURNEY Date: Thu Jul 5 09:38:44 2012 +0100 glx: Do not report the GLX_INTEL_swap_event extension for indirect swrast Commit 84956ca4 bogusly adds GLX_INTEL_swap_event to the extensions reported by swrast. "DRI2 supports this now - and already enables it explicitly - but drisw does not and should not. Otherwise toolkits like clutter will only ever SwapBuffers once and wait forever for an event that's not coming." (A similar bug for direct swrast is already fixed in mesa commit 25620eb1) (Note that this may be papering over the cracks somewhat, as if we do report GLX_INTEL_swap_event, some clutter apps fail with GLXBadDrawable calling GLXChangeDrawableAttributes to change the setting of GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK in the GLX_EVENT_MASK, apparently after the drawable is destroyed, which suggests a bug with GLXDrawable lifetimes) Signed-off-by: Jon TURNEY Reviewed-by: Jeremy Huddleston Sequoia commit fd3d45c137bb849aa9030d732ea9277292e01d3d Author: Jon TURNEY Date: Thu Jul 5 09:34:24 2012 +0100 glx: Don't note GLX_INTEL_swap_event as being required by GLX 1.4, it isn't. Don't note GLX_INTEL_swap_event as being required by GLX 1.4, it isn't. (This data is not currently used in the server) (A similar change is made in mesa commit d3f7597bc9f6d5) Signed-off-by: Jon TURNEY Reviewed-by: Jeremy Huddleston Sequoia commit a8464dfa28dea78201e3e4398eb3bcb745e10087 Author: Colin Harrison Date: Sun Jul 22 13:15:02 2012 +0100 os: Fix TMP fall-back in Win32TempDir() Fix Win32TempDir() in the case where we fell back to checking the TMP environment variable. It looks like this has been wrong since forever. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit f6e7b82acadfca8239edc0f7e72cd0f3f9cfc2c4 Author: Marc Haesen Date: Sat Jul 21 21:18:44 2012 +0100 hw/xwin: Fixes to pixelFormat <-> fbConfig conversion in WGL mode Fix FIXME in fbConfigToPixelFormat() to correctly populate RGBA-mask shift parameters. Also request colourindex pixelFormats correctly. Now that they are requested correctly, don't skip colorindex visuals when converting pixelFormats to fbConfigs. Populate transparent colour information when converting pixelFormat from DescribePixelFormats() to a fbConfig. Signed-off-by: Marc Haesen Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 45c432871d6a244e9e558a6a4e7c36e90764135e Author: Jon TURNEY Date: Sat Jul 21 14:13:37 2012 +0100 hw/xwin: Introduce winProcessXEventsTimeout() to the concept of fractions of a second Oh this is terrible. Currently we only compute the select timeout in whole seconds. This means if we have less than 1 second remaining, we select with a timeout of 0 (i.e. poll) which causes the task to spin, burning 100% CPU for the remaining timeout (and possibly preventing the process we are waiting for from running :S) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 23cd4d0174194e10721d2e465fd1a1c52f001520 Author: Jon TURNEY Date: Sat Jul 21 12:33:05 2012 +0100 hw/xwin: Fix winUpdateWindowPosition() not to assume WS_EX_APPWINDOW style Also improve it's debug output a bit Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 527cf13135cfd279733060e0028bbfbe02be5167 Author: Jon TURNEY Date: Sat Jul 21 14:09:16 2012 +0100 hw/xwin: Make winOverrideIcon() thread-safe for icon data access winOverrideIcon() is called from the internal WM client thread. Accessing server-internal data structures to get icon data or window hints is not safe, as there is no lock to ensure we do not collide with these data structures being updated in the server thread. Rewrite so the internal client thread uses X client calls to obtain this data safely We used to also set the icon inside the server when the window was initially created. For simplicity, we simply send a message to the internal WM to update the icon when the window is created (rather than writing different icon update code which can work in the server thread for that one case...) extwm mode used to do the icon update in the server. I'm not sure that actually made much sense. Let's assume the external WM client can do it instead... v2 Make sure that WM_WM_ICON_EVENT does nothing for override-redirect windows v3 Reinstate check that native window actually has expected properties for an X window before trying to update it's icon; some auxiliary windows owned by the XWin process don't, which would cause a crash v4 Various fixes to pixmap icon conversion: - remove left-over malloc in winScaleXimageToWindowsIcon causing a memory leak - don't recalculate DDBitmap stride in winScaleXimageToWindowsIcon, when we already have worked it out - properly check that XGetWindowProperty(NET_WM_ICON) returned some data - don't try to retrieve WM_HINTS icon_mask if it isn't set - restore accidentally dropped calculation of effBpp, stride, maskStride of output DDBitmap - make sure imageMask is zero-initalized before we use it to mask the DDBitmap v5 Remove a left-over unused variable v6 Avoid XDestroyImage(NULL) crash if XGetImage failed for icon_pixmap Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 2677d89823b851fea31036f51589985bb86864b7 Author: Jon TURNEY Date: Sun Jul 22 17:38:55 2012 +0100 hw/xwin: Also update icon when _NET_WM_ICON property changes _NET_WM_ICON property is also considered to decide on the window icon, so also send a WM_WM_ICON_EVENT message to the WM if the PropertyNotify event is for _NET_WM_ICON property Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a07541f1ffc28c57a762beefb96c7bf0ac40b0a4 Author: Jon TURNEY Date: Sun Jul 22 16:15:12 2012 +0100 hw/xwin: Rename WM_WM_HINTS_EVENT to WM_WM_ICON_EVENT WM_WM_HINTS_EVENT only updates the icon, so rename it to WM_WM_ICON_EVENT Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 2a47c91eb382d1ff0fb009a39efa7dc9c6fd5112 Author: Jon TURNEY Date: Fri Jul 20 13:51:35 2012 +0100 hw/xwin: Refactor Xutf8TextPropertyToString() from GetWindowName() as a separate utility function Simplify GetWindowName() by moving UTF-8 to wchar conversion out to it's call site. This allows us to do extra processing on the window name in future. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 884f51e9770c9ccd3b38a14ea393ea2c7a5ef235 Author: Jeremy Huddleston Sequoia Date: Wed Aug 1 18:46:08 2012 -0700 XQuartz: Fix xp_window_bring_all_to_front linking on OS versions with older libXplugin Found-by: Tinderbox Signed-off-by: Jeremy Huddleston Sequoia commit b4c2358e0a388730f1beda5d3a12e79755208ce6 Author: Jeremy Huddleston Sequoia Date: Wed Aug 1 18:45:43 2012 -0700 pbproxy: Fix a warning about a bad method prototype x-selection.m:1502:1: warning: method has no return type specified; defaults to 'id' [-Wmissing-method-return-type,Semantic Issue] - init ^ (id) 1 warning generated. Signed-off-by: Jeremy Huddleston Sequoia commit f193907f1b2f8d17dac9b59b7e93ddbb0f4e31ca Author: Jon TURNEY Date: Fri Jun 22 14:56:22 2012 +0100 Fix pseudoramiX.c compilation without darwin.h Signed-off-by: Jon TURNEY Reviewed-by: Jeremy Huddleston Sequoia commit 067931ccce592e319baffa26d4f7380d8d924537 Author: Jon TURNEY Date: Mon Jul 23 12:16:36 2012 +0100 hw/xquartz: Various fixes for pseudoramiX.c Various fixes, applied to panoramiX.c in commit 2b266eda, also need applying to pseudoramiX.c: Fix panoramiX request and reply swapping Set window and screen values in panoramix replies Prevent buffer overrun in ProcPanoramiXGetScreenSize These fixes seem to be necessary in order to compile pseudoramiX.c with gcc pseudoramiX.c: In function 'ProcPseudoramiXGetState': pseudoramiX.c:221:56: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap pseudoramiX.c: In function 'ProcPseudoramiXGetScreenCount': pseudoramiX.c:250:62: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap pseudoramiX.c: In function 'ProcPseudoramiXGetScreenSize': pseudoramiX.c:283:56: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap pseudoramiX.c:284:57: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap Signed-off-by: Jon TURNEY Reviewed-by: Jeremy Huddleston Sequoia commit aad428b8e21c77397c623b78706eb64b1fea77c9 Author: Dave Airlie Date: Thu Jul 26 09:54:08 2012 +1000 glx: drop GLX_LIBS from X server and workaround sdksyms. We've had reports of two copies of the GLX bits, one in the server and one in libglx.so causing problems, I didn't understand why the X server needed a copy so drop it, however then we have to fix a missing GlxExtensionInit that comes from sdksyms, so work around it by moving that one declaration into a header that sdksyms doesn't scan. Thanks to Jon Turney for debugging the actual problem. (copyright header from extinit.h that seems most appropriate put on top). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52402 Tested-by: Peter Hutterer Reviewed-by: Daniel Stone Tested-by: Jon TURNEY Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit afa53fe7cffd430cf11f25ca818cb955a78c0c1c Author: Keith Packard Date: Wed Jul 25 14:29:48 2012 -0700 Version 1.12.99.903 (1.13 RC3) Signed-off-by: Keith Packard commit 98e3f3fde35ca805d44ee38394bfd86058f9f4b8 Author: Adam Jackson Date: Thu Jul 19 15:00:05 2012 -0400 doc: Drop XAA references from xorg.conf man page Signed-off-by: Adam Jackson Reviewed-by: Dave Airlie Reviewed-by: Alan Coopersmith Reviewed-by: Alex Deucher Reviewed-by: Daniel Stone Acked-by: Aaron Plattner Signed-off-by: Keith Packard commit dea928477bf835a13b2bd2b16c0dbaaf5468130c Author: Adam Jackson Date: Thu Jul 19 15:00:04 2012 -0400 xfree86: Drop some dead XAA decls from SDK headers Signed-off-by: Adam Jackson Reviewed-by: Dave Airlie Reviewed-by: Alan Coopersmith Reviewed-by: Alex Deucher Reviewed-by: Daniel Stone Acked-by: Aaron Plattner Signed-off-by: Keith Packard commit a44a379a2a4c198dbd6ffd6cc0db376f8fb64327 Author: Adam Jackson Date: Thu Jul 19 15:00:03 2012 -0400 cw: Remove XAA was the only consumer. Signed-off-by: Adam Jackson Reviewed-by: Dave Airlie Reviewed-by: Alan Coopersmith Reviewed-by: Alex Deucher Reviewed-by: Daniel Stone Acked-by: Aaron Plattner Signed-off-by: Keith Packard commit 20b4d90f32b3ca5def5be2fdf04a91ae6c47f125 Merge: 83df16953 fd228d318 Author: Keith Packard Date: Wed Jul 25 13:52:35 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit fd228d318428d0d9dea52ca560a9b66660dd2d02 Author: Jeremy Huddleston Date: Wed Jul 25 11:40:33 2012 -0700 XQuartz: Call xp_window_bring_all_to_front if available in libXplugin Signed-off-by: Jeremy Huddleston commit 83df169538bddcf3a61e2c5e02a4f3e10af93b60 Author: Aaron Plattner Date: Fri Jul 20 00:59:20 2012 -0700 dix: don't use "new" as a parameter name "new" is a reserved word in C++. Signed-off-by: Aaron Plattner Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 02811f1a9cc35c5f82accb0459cb3910165e7e45 Author: Dave Airlie Date: Thu Jul 19 14:12:59 2012 +1000 modesetting: add output slave support. This allows the driver to operate as an output slave. It adds scan out pixmap, and the capability checks to make sure they available. Signed-off-by: Dave Airlie commit fa171c5a81b1c226b5da54f35e6726d9c8e13afb Author: Dave Airlie Date: Tue Jun 5 14:43:21 2012 +0100 modesetting: add platform bus support commit 709dbc68cdea9d282ba318c1cbc76614e98f41c4 Author: Dave Airlie Date: Wed Jul 25 15:38:34 2012 +1000 modesetting: fix warning about close being undefined. Signed-off-by: Dave Airlie commit 71b86ea8dd69f21d090edd4f61698ad11b952d5e Author: Dave Airlie Date: Wed Jul 25 15:33:52 2012 +1000 modesetting: drop useless xf86PciInfo include Signed-off-by: Dave Airlie commit 3b7f313b3d74f9df876152c55d55cbb339bf2d02 Author: Jeremy Huddleston Date: Tue Jul 24 00:32:30 2012 -0700 XQuartz: Fix runtime regressions introduced by extension loading changes * GLX is now loaded * PseudoramiX loading is back in miinitext. It needs to be loaded before RandR. Regression-from: 27a624bee66d2797eacf90317054207dcf248028 Regression-from: 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86 Signed-off-by: Jeremy Huddleston commit 0d64e881a31d89d28f2ded9b8e83e93632870a16 Author: Jeremy Huddleston Date: Mon Jul 23 23:16:29 2012 -0700 XQuartz: Build fix for __GLXscreen::createContext changes Regression-from: 96d74138b1c0273e88933220d99a893858b649cd Signed-off-by: Jeremy Huddleston commit 77de2994774e7be24a0bad521180628feb1027c6 Author: Keith Packard Date: Tue Jul 17 15:47:39 2012 -0700 Bump to version 1.12.99.902 Signed-off-by: Keith Packard commit beeea70495a8d5c4afc1b1eb2cc06a24ab1a986d Merge: 6e438a0e1 691028029 Author: Keith Packard Date: Tue Jul 17 12:17:39 2012 -0700 Merge remote-tracking branch 'alanc/master' commit 6e438a0e183f5a6c22070746c038af53d5b935ca Merge: 5884e7ded 75966a418 Author: Keith Packard Date: Tue Jul 17 12:12:53 2012 -0700 Merge remote-tracking branch 'jturney/master' commit 75966a4186955f3a4625e93796145036c5986d2e Author: Keith Packard Date: Fri Jul 13 14:36:25 2012 -0700 xwin: Clean up os wrappers for System, Popen and Pclose on Windows Popen and Pclose are never used on Windows, so don't bother to even try to define them. System(s) was defined as system(s), but the two users of that function are in xkb, which carefully redefines that as Win32System. Move Win32System and Win32TempDir to os/utils.c, renaming Win32System to be just System, which simplifies the xkb code Signed-off-by: Keith Packard Reviewed-by: Jon TURNEY commit 6910280297ab610100dd8e7fbe5bb5cc08968f2f Author: Alan Coopersmith Date: Sat Jul 14 10:54:36 2012 -0700 Use C99 designated initializers in DRI2GetParam replies DRI2GetParam was going through review in parallel with main batch of C99 initialization changes - sync up now that both have landed. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit a6c5b8d3ee053cadf685b0e4de96407ad6df4dd4 Author: Alan Coopersmith Date: Sat Jul 14 10:50:41 2012 -0700 Use C99 designated initializers in RandR 1.4 extension Events RandR 1.4 was going through review in parallel with main batch of C99 initialization changes - sync up now that both have landed. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit ada04ef0ca8a1213e865ba2c000ccd6ed6d0e371 Author: Alan Coopersmith Date: Sat Jul 14 10:45:29 2012 -0700 Use C99 designated initializers in RandR 1.4 extension Replies RandR 1.4 was going through review in parallel with main batch of C99 initialization changes - sync up now that both have landed. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit fb73f7f40fa46458990038332017d4496caa0691 Author: Alan Coopersmith Date: Sat Jul 14 10:02:52 2012 -0700 Fix two more C99 initialization mistakes using members of same struct Similar to 34cf559bcf99dad, use temporary variables instead of referencing members of the struct being initialized in the middle of the initialization. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 5884e7dedecdd82ddbb037360cf9c85143e094b5 Author: Aaron Plattner Date: Mon Jul 16 17:40:31 2012 -0700 xf86: Re-export extension disable flags These flags were unexported by commit a1d41e311c21eb6627caa0d168e070ceaf90806f, which moved the declarations around and lost the _X_EXPORT attributes in the process. Since drivers need these and it's late in the release cycle, just re-export them for now. Signed-off-by: Aaron Plattner Reviewed-by: Andy Ritger Signed-off-by: Keith Packard commit 357ec54f46d31ff77c441c15c322152e04f89a11 Author: Jon TURNEY Date: Wed Mar 14 13:58:32 2012 +0000 hw/xwin: Refer to xkeyboard-config man page for XKB configuration option values Also polish the keyboard configuration text a bit Include man section number in references to setxkbmap Consistently refer to 'manual page' rather using both that and 'man page' Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5940580f8c12145c1ef4c3eee898676b48d95879 Author: Jörg Mensmann Date: Tue Apr 17 10:48:19 2012 +0100 hw/xwin: Fix command line arguments for multiple monitors. Moving Xwin to a certain monitor using "-screen 0 @2" would fail, printing "ddxProcessArgument - screen - Querying monitors failed". This happened since commit 3ead1d810b0e157078db39712e02ea6dc85216d8, because EnumDisplayMonitor() returns FALSE if its callback function returns FALSE (which is not clearly documented), and QueryMonitor() would then also return FALSE. Moving back to the old behaviour, where the return value of EnumDisplayMonitors() is ignored. Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 18801f5e5a98d80f4811ade8c98df65175b1935a Author: Jon TURNEY Date: Fri Feb 10 09:27:16 2012 +0000 hw/xwin: Remove unused WindowExposuresProcPtr storage in screen private We don't wrap the WindowExposures screen function Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 8fd30859c293035fe505da76d8d7e64131bd5bc0 Author: Jon TURNEY Date: Fri Feb 10 13:25:32 2012 +0000 hw/xwin: Remove long obsolete README for hw/xwin Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3568d4af4ff2490e79286d242916e81afed57b58 Author: Jon TURNEY Date: Thu Feb 23 22:32:09 2012 +0000 hw/xwin: Remove a pointless OS version check in winInstallKeyboardHookLL() Checking for OS later than NT4 SP3 (which we didn't do correctly anyhow, just checking for NT) is pointless when other code in hw/xwin assumes at least NT 5.0 Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0ed0d3979050c4ee7bef64441d50c494d58d93b0 Author: Jon TURNEY Date: Thu Jul 5 22:08:38 2012 +0100 hw/xwin: Remove winClipboardDetectUnicodeSupport() This code for detecting if the Windows clipboard can support unicode is long obsolete. All NT versions of Windows support unicode clipboard, so any version of Windows we can run on must support unicode clipboard. The -nounicodeclipboard flag to disable use of unicode on the clipboard is retained. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c98471fad7d85fc9d9959b1c48edd90415f7bf15 Author: Jon TURNEY Date: Thu Jul 5 18:00:06 2012 +0100 hw/xwin: Consolidate duplicated code as getHwnd() function Consolidate code to find the native HWND of an X window, stored in the _WINDOWSWM_NATIVE_HWND property, duplicated in UpdateName() and PreserveWin32Stack() as getHwnd() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit df7636dddb4981e14ee7d128c43bb08bdf6a8727 Author: Jon TURNEY Date: Thu Jul 5 14:20:52 2012 +0100 hw/xwin: Correct function name in log message Correct function name in log message winInitializeDefaultScreens -> winInitializeScreenDefaults Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9cdd3ed07425b222e8197b9a2f57ec1525c6fd54 Author: Jon TURNEY Date: Fri Mar 16 12:56:45 2012 +0000 hw/xwin: Tidy up some more pointless output which is always emitted It's not very useful to log lines like the below when the About.. dialog is used winAboutDlgProc - WM_COMMAND - IDOK or IDCANCEL winAboutDlgProc - WM_CLOSE Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit eb5b4d8d809712053701f057a35bbf5348ac9059 Author: Colin Harrison Date: Thu Jul 5 14:03:44 2012 +0100 hw/xwin: RANDR resize didn't occur when screen window was maximized or restored In windowed mode, with option -resize, RANDR resize was missing when the screen window was maximized or restored. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 7e07d61857c5d2ee6e3c36c81b51bb4fe378b5a0 Author: Jon TURNEY Date: Thu Jul 5 14:01:03 2012 +0100 hw/xwin: Bug fixes for screen sizing when the screen window is on a non-primary monitor There is a bug that when the -screen option is used to specify a monitor for the screen window to be located on, but no explicit size is specified (and the -multiplemonitors option isn't specified), the screen window size is always constrained to fit the work area of the primary monitor (rather than the work area of the specified monitor) This gives incorrect results if you want a screen the same size as your non-primary monitor (e.g. by using -screen 0 @2) and your non-primary monitor is larger than your primary monitor. (This can be worked around by specifying -multiplemonitors and an explicit screen size the same size as the monitor (e.g. -multiplemonitors -screen 0 1600x1200@2)) Fix to use work area for the monitor specified for the screen, rather than the primary monitor work area (unless -multiplemonitors is used, in which case we continue to use the virtual desktop work area instead) Also fix the adjustment for an autohide taskbar, so that it is only done if the taskbar is on the same monitor as the screen (or -multiplemonitors is used) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 090856b55b5895ce07f36ddebe6d8f7cb86c1826 Author: Jon TURNEY Date: Thu Jul 5 13:19:02 2012 +0100 hw/xwin: Tidy up some pointless output which is always emitted Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9fe9c5f868886abf671b3be3964af1965dd92472 Author: Jon TURNEY Date: Sun Feb 13 18:52:52 2011 +0000 hw/xwin: Don't bother reporting XORG_VERSION_CURRENT Don't bother reporting XORG_VERSION_CURRENT, when we also report the version number broken down into it's components XORG_VERSION_MAJOR, XORG_VERSION_MINOR, etc. as well. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d5977e5bd2c8ee77db08d5f948f266c9661b9fb5 Author: Dave Airlie Date: Fri Jul 13 00:28:19 2012 +1000 xf86: include xf86platformBus.h in xf86AutoConfig.c This fixes an implicit declaration, xf86AutoConfig.c:202:5: error: implicit declaration of function 'xf86PlatformMatchDriver' [-Werror=implicit-function-declaration] xf86AutoConfig.c:202:5: warning: nested extern declaration of 'xf86PlatformMatchDriver' [-Wnested-externs] Signed-off-by: Dave Airlie Reviewed-by: Keith Packard commit afa3b9ccd27ff9c58f536cb3b727e85feb6a6f6a Author: Bartosz Brachaczek Date: Fri Jul 6 02:52:40 2012 +0200 glx: Fix checking GL version Signed-off-by: Bartosz Brachaczek Reviewed-by: Ian Romanick Signed-off-by: Dave Airlie commit 743ccf6fa0a9a4579d6de6d10e2e6040640772d9 Author: Dave Airlie Date: Thu Jul 12 19:09:15 2012 +1000 glx/dri2: don't return NULL in a function with no return. Reported by gcc. Reviewed-by: Ian Romanick Reviewed-by: Matt Turner Signed-off-by: Dave Airlie commit d1a00c26becdc2490ab4660abf108eca09c30d23 Author: Dave Airlie Date: Thu Jul 12 19:05:41 2012 +1000 glx/dri2: use correct define from dri attribs. Looks like idr renamed this and pushed the wrong one. Reviewed-by: Ian Romanick Reviewed-by: Matt Turner Signed-off-by: Dave Airlie commit c62205adcd48d497450655d0136f8ca5bd5cbae7 Author: Dave Airlie Date: Thu Jul 12 19:04:13 2012 +1000 glx/dri2: fix incorrect == vs = glxdri2.c:486: warning: statement with no effect Reviewed-by: Ian Romanick Reviewed-by: Matt Turner Signed-off-by: Dave Airlie commit defca4c192bd7f4af2b273c7cb1fe8665888772a Author: Dave Airlie Date: Thu Jul 12 18:52:34 2012 +1000 glx/dri2: fix typo in the notification reset for robustness. Reviewed-by: Ian Romanick Reviewed-by: Matt Turner Signed-off-by: Dave Airlie commit d1cae6bb804f7dfc889fd3c5d5eb116f4baf5149 Author: Dave Airlie Date: Thu Jul 12 18:51:52 2012 +1000 glx: pass screen into the convert function when robustness is enabled, this is required. Reviewed-by: Ian Romanick Signed-off-by: Dave Airlie commit ea74e381ae91f45ec195a5505262e2e5a3c0e1c9 Author: Dave Airlie Date: Fri Jul 13 00:47:24 2012 +1000 xtest: add extinit.h for SyncExtensionInit This adds the decl for SyncExtenionInit. Signed-off-by: Dave Airlie Tested-by: Keith Packard Signed-off-by: Keith Packard commit 746193a7f10f11cccae05c98b933aadf58fc7375 Merge: a2d082953 2b74949ad Author: Keith Packard Date: Thu Jul 12 15:10:51 2012 -0700 Merge remote-tracking branch 'jturney/xwin-extmod-removal-fixes' commit a2d0829531249e24dbca25fc20ed30a2bb2d8ed8 Author: Michel Dänzer Date: Thu Jul 12 13:16:37 2012 +0200 glx: Free DRI2 drawable reference to destroyed GLX drawable. Otherwise the reference can lead to use after free in __glXDRIinvalidateBuffers(). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50019 Signed-off-by: Michel Dänzer Reviewed-by: Kristian Høgsberg Signed-off-by: Keith Packard commit 8a87acc9e57be740e3bd252567622246051a0723 Author: Michel Dänzer Date: Thu Jul 12 13:16:36 2012 +0200 dri2: Add DRI2CreateDrawable2. Same as DRI2CreateDrawable, except it can return the DRI2 specific XID of the DRI2 drawable reference to the base drawable. Signed-off-by: Michel Dänzer Reviewed-by: Kristian Høgsberg Signed-off-by: Keith Packard commit 2b74949ad02bd916c3ac502db3f28057f12a8117 Author: Jon TURNEY Date: Thu Jul 12 00:36:43 2012 +0100 Restore GLX extension to XWin - Add an XwinExtensionInit(), similar in spirit to QuartzExtensionInit() and xf86ExtensionInit() - Load the GLX extension (I'm guessing XQuartz needs this adding somewhere as well) - Also, since we now have a proper place to install the native GL provider where it will take priority over the the swrast provider, do so Signed-off-by: Jon TURNEY Reviewed-by: Daniel Stone Reviewed-by: Colin Harrison commit 656e5fea6c9ca15f932889edcc590dd01c881945 Merge: 8b820f221 1720cd9ba Author: Keith Packard Date: Thu Jul 12 08:26:35 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 8b820f221ad54eb96a16c7060048abc8824371b6 Author: Daniel Stone Date: Wed Jul 11 17:31:53 2012 +0100 sdksyms: Fix build with --disable-xv I hate this [redacted] script. Signed-off-by: Daniel Stone Tested-by: Keith Packard Signed-off-by: Keith Packard commit 06ac7937fc37cdf073b77386bed47e14cff23628 Author: Jon TURNEY Date: Thu Jul 12 12:37:05 2012 +0100 Restore extern to the declaration of __glXDRISWRastProvider b86aa74 dropped the 'extern' from the declaration of __glXDRISWRastProvider This turns out to be important to me, as without it, the final link only gets the tentative definition of __glXDRISWRastProvider implied by the declaration, and not the proper one from glxdriswrast.c, presumably because nothing else references anything in the object that file generates. Signed-off-by: Jon TURNEY Reviewed-by: Daniel Stone Reviewed-by: Colin Harrison commit bcbf95b1bafa6ffe724768b9309295e2fdb4b860 Author: Jon TURNEY Date: Thu Jul 12 00:36:10 2012 +0100 Revert bogus GlxPushProvider() in commit a1d41e3 a1d41e3 "Move extension initialisation prototypes into extinit.h" also includes a change to GlxExtensionInit to install the swrast GLX provider. Since b86aa74 "GLX: Insert swrast provider from GlxExtensionInit" already does this (correctly, by installing the swrast provider at the end of the chain, rather than at the beginning), and since this would seem to have the effect of making the swrast provider the most preferred provider, I'm guessing this wasn't intended. Signed-off-by: Jon TURNEY Reviewed-by: Daniel Stone Reviewed-by: Colin Harrison commit 1720cd9badf21e5d6b2c6c929e609ab3b0b92fd2 Author: Jeremy Huddleston Date: Wed Jul 11 23:54:27 2012 -0700 XQuartz: Re-add prototype for DRIExtensionInit Regression from: a1d41e311c21eb6627caa0d168e070ceaf90806f Signed-off-by: Jeremy Huddleston CC: Daniel Stone commit 1a64d3cc9c319d5e9ab2365b60469fb5b83407fc Author: Jeremy Huddleston Date: Wed Jul 11 23:49:59 2012 -0700 XQuartz: Fix build failure due to incorrect PseudoramiXExtensionInit prototype pseudoramiX.c:129:1: error: conflicting types for 'PseudoramiXExtensionInit' [Semantic Issue] PseudoramiXExtensionInit(int argc, char *argv[]) ^ ../../include/extinit.h:175:13: note: previous declaration is here extern void PseudoramiXExtensionInit(void); ^ Signed-off-by: Jeremy Huddleston commit 228f8bfe81890770f1ba109a0acca1c81a2ffee9 Author: Jeremy Huddleston Date: Wed Jul 11 23:49:33 2012 -0700 XQuartz: Silence an unused-variable warning Signed-off-by: Jeremy Huddleston commit deb08658e2a6b1647a7213a316c6f3019bcdce48 Author: Maarten Lankhorst Date: Wed Jul 11 16:27:46 2012 +0200 xfree86: Strip dangling pointers from desiredMode Based on the original patch by Chris Wilson, which was a better fix than mine. We stash a copy of the desiredMode on the crtc so that we can restore it after a vt switch. This copy is a simple memcpy and so also stashes a references to the pointers contained within the desiredMode. Those pointers are freed the next time the outputs are probed and mode list rebuilt, resulting in us chasing those dangling pointers on the next mode switch. ==22787== Invalid read of size 1 ==22787== at 0x40293C2: __GI_strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==22787== by 0x668F875: strdup (strdup.c:42) ==22787== by 0x5DBA00: XNFstrdup (utils.c:1124) ==22787== by 0x4D72ED: xf86DuplicateMode (xf86Modes.c:209) ==22787== by 0x4CA848: xf86CrtcSetModeTransform (xf86Crtc.c:276) ==22787== by 0x4D05B4: xf86SetDesiredModes (xf86Crtc.c:2677) ==22787== by 0xA7479D0: sna_create_screen_resources (sna_driver.c:220) ==22787== by 0x4CB914: xf86CrtcCreateScreenResources (xf86Crtc.c:725) ==22787== by 0x425498: main (main.c:216) ==22787== Address 0x72c60e0 is 0 bytes inside a block of size 9 free'd ==22787== at 0x4027AAE: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==22787== by 0x4A547E: xf86DeleteMode (xf86Mode.c:1984) ==22787== by 0x4CD84F: xf86ProbeOutputModes (xf86Crtc.c:1578) ==22787== by 0x4DC405: xf86RandR12GetInfo12 (xf86RandR12.c:1537) ==22787== by 0x518119: RRGetInfo (rrinfo.c:202) ==22787== by 0x51D997: rrGetScreenResources (rrscreen.c:335) ==22787== by 0x51E0D0: ProcRRGetScreenResources (rrscreen.c:475) ==22787== by 0x513852: ProcRRDispatch (randr.c:493) ==22787== by 0x4346DB: Dispatch (dispatch.c:439) ==22787== by 0x4256E4: main (main.c:287) Signed-off-by: Maarten Lankhorst Reported-by: Zdenek Kabelac Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36108 Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit 59c2c4f645b4d782599c274f4bc752de9623d308 Author: Daniel Stone Date: Tue Jul 10 09:10:22 2012 +0100 AllocDevicePair: Ensure XKB privates are initialised Since we call directly into XKB and may be doing so before the extension has been initialised, make sure its privates are set up first. XTest had a hack to do this itself, but seems cleaner to just make sure we do it in AllocDevicePair. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit f937c3d50157a9a42d2f2f10590b6b139ce18a29 Author: Daniel Stone Date: Tue Jul 10 09:10:21 2012 +0100 Sync: Always initialise system counter list Sync is designed to let you add system counters before the extension has been initialised, which means the system counter list may well be full of bees. Make sure it's initialised before we add to it, to avoid the risk of fatal injury. Signed-off-by: Daniel Stone Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 34cf559bcf99dad550527b5ff53f247f0e8e73ee Author: Keith Packard Date: Tue Jul 10 15:58:48 2012 -0700 ProcGetPointerMapping uses rep.nElts before it is initialized In: commit d792ac125a0462a04a930af543cbc732f8cdab7d Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in dix Replies the initializer for the .length element of the xGetPointerMappingReply structure uses the value of rep.nElts, but that won't be set until after this initializer runs, so we get garbage in the length element and clients using it will generally wedge. Easy to verify: $ xmodmap -pp Fixed by creating a local nElts variable and using that. Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith commit 44bd27cdd13b6e6c4e6fd3873361e3308ef25ffe Author: Keith Packard Date: Tue Jul 10 01:14:13 2012 -0700 Version 1.12.99.901 (1.13 RC1) Signed-off-by: Keith Packard commit 6e12cb147da58bd12a158807b2cd5afac32ae70f Merge: 532fbc29c 023127915 Author: Keith Packard Date: Tue Jul 10 00:52:11 2012 -0700 Merge branch 'local-fixes' commit 532fbc29c900469ef4867ccb7eabb953019dcab5 Author: Daniel Stone Date: Tue Jul 10 02:03:38 2012 +0100 GE: Remove unused RT_GECLIENT Remove remnants of an earlier experiment which had the GE extension handling event delivery directly. Nothing's used the resource since, so purge it. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 0e70b333d4846b166bf4a0a0c5d1a80623ba08dc Author: Daniel Stone Date: Tue Jul 10 02:03:37 2012 +0100 XFree86: os-support: Remove unused xf86MakeNewMapping No drivers used this, so it got unexported, and now it's so unused it got culled during the link. Take the poor function out behind the shed and put it out of its misery. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Acked-by: Peter Hutterer Signed-off-by: Keith Packard commit 43f2393746c44e9d35be6a2a3555205f8e1b4ddf Author: Daniel Stone Date: Tue Jul 10 02:03:36 2012 +0100 Xinerama: Reset Composite request vector on close Similar (identical) to how it interacts with Render and XFixes, also call PanoramiXCompositeReset() to restore the Composite dispatch table to how it was when it started, on reset. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Acked-by: Peter Hutterer Signed-off-by: Keith Packard commit 766a403bc7ff249fdc6b9049329b633e73738329 Author: Daniel Stone Date: Tue Jul 10 02:03:35 2012 +0100 XvMC: Remove unused XvMCGeneration I wonder if this even works across multiple generations. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Acked-by: Peter Hutterer Signed-off-by: Keith Packard commit 7cef23a6dd7a5d76983cf20979e845ea6ae63a10 Author: Daniel Stone Date: Tue Jul 10 02:03:34 2012 +0100 Render: Remove unused glyphDepths No-one has used this since 0a71e154. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Acked-by: Peter Hutterer Signed-off-by: Keith Packard commit 65011064d7e70aed59fb716f9ed3d76d196244ce Author: Daniel Stone Date: Tue Jul 10 02:03:33 2012 +0100 Xi: Remove dead Device{Enter,Leave}WindowMask These were an unused remnant of earlier MPX work; their only users got cleared out in dc153271, but the mask declarations remained. Remove them, and move DevicePropertyNotify's mask up to be contiguous with the rest of the range. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit fadfc2947075c832cd1107d2c0866ad13fa756c4 Author: Daniel Stone Date: Tue Jul 10 02:03:32 2012 +0100 GLX: Remove unused noGlxVisualInit No-one ever did anything with this variable except assign its default value to it. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Acked-by: Peter Hutterer Reviewed-by: Ian Romanick Signed-off-by: Keith Packard commit 06e4ba8b26fb974bdd84144b3e002f0f7589e7f7 Author: Daniel Stone Date: Tue Jul 10 02:03:31 2012 +0100 XKB: Geom: Remove unused code These codepaths were never called by anyone. Shame there weren't more of them. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit e191e296e6e7861978ea4a0ae9aa7b780e52732b Author: Daniel Stone Date: Mon Jul 9 20:04:15 2012 +0100 Remove XAA Commit 0c6987df in June 2008 disabled XAA offscreen pixmaps per default, as they were broken, leaving XAA only able to accelerate operations directly on the screen pixmap and nowhere else, eliminating acceleration for basically every modern toolkit, and any composited environment. So, it hasn't worked for over four years. No-one's even come close to fixing it. RIP. Signed-off-by: Daniel Stone Reviewed-by: Dave Airlie Reviewed-by: Alex Deucher commit 66362441867f68dac97de33744bd0ca478fb65d3 Author: Daniel Stone Date: Tue Jul 10 02:03:29 2012 +0100 Remove last renmants of XFree86LOADER define Not to be confused with XFree86Loader or XorgLoader. Which are both now dead too. Signed-off-by: Daniel Stone Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit a15dac550918c55b08bbe0007f068cc5096ebaa1 Author: Daniel Stone Date: Tue Jul 10 02:03:28 2012 +0100 Remove unused setupFunc from extensions setupFunc was used as an early callback for half-modular extensions such as Xv, XvMC and DGA to set up hooks between the core server and the modular component. Now we've rid ourselves of that, we can also bin setupFunc. Signed-off-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Keith Packard commit 710318e803c6d5c6b8ae170d38c8253f5d780472 Author: Daniel Stone Date: Tue Jul 10 02:03:27 2012 +0100 Replace NO_HW_ONLY_EXTS with Xorg DDX test Turns out the only thing we use NO_HW_ONLY_EXTS for is to check whether or not we're building inside the Xorg DDX. Replace it with an XorgLoader test instead, and remove all its users. Signed-off-by: Daniel Stone Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86 Author: Daniel Stone Date: Tue Jul 10 02:03:26 2012 +0100 Unify miinitext.c Rather than having a non-Xorg and an Xorg-specific path which basically just duplicated each other for no reason, we could ... just have one. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 147967f67d4976a87ed07fe11b59b174907f5d43 Author: Daniel Stone Date: Tue Jul 10 02:03:25 2012 +0100 Remove Xorg-specific extensions from non-Xorg miinitext miinitext.c had a completely separate codepath for non-Xorg servers, which included tests for Xorg-specific extensions such as XFree86-VidMode, which were external even to the Xorg DDX. So we can just remove them, and the associated #undefs. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 27a624bee66d2797eacf90317054207dcf248028 Author: Daniel Stone Date: Tue Jul 10 02:03:24 2012 +0100 Quartz: Move PseudoramiX initialisation to DDX As PseudoramiX is a DDX-specific extension, move its loading and initialisation to hw/xquartz. This creates a QuartzExtensionInit() similar in spirit to xf86ExtensionInit. Signed-off-by: Daniel Stone Acked-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Signed-off-by: Keith Packard commit 79d14d9fc3d92ba866864d3a5910a8c6c8e9b64f Author: Daniel Stone Date: Tue Jul 10 02:03:23 2012 +0100 Move the remnants of loadext.c to miinitext.c There was nothing XFree86-specific or loader-specific about this, aside from using xf86MsgVerb instead of ErrorF. Signed-off-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Keith Packard commit a089af3477dd01a831b89c06f982679c60e42975 Author: Daniel Stone Date: Tue Jul 10 02:03:22 2012 +0100 Loader: Move ExtensionModule types to DIX In preparation for gutting loadext.c, move the ExtensionModule struct to the DIX, and unexport ExtensionModuleList (why, why, why, why was this ever exported in the first place, tbqh). Signed-off-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Keith Packard commit 8171108602556446f12c1cfbc37c6abf3b0195eb Author: Daniel Stone Date: Tue Jul 10 02:03:21 2012 +0100 Loader: Remove extension initialisation sorting Extensions could previously declare initialisation dependencies on other extensions, which would then get nicely sorted by the loader. We only had one user for this, GLX, which had one pointless (Composite) and one possibly useful dependency (DBE). As DBE is now a built-in, it will always be sorted by GLX, so we no longer have any users for it. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit d52ab85c7ef5058dcbd8a75eb84058908dc22906 Author: Daniel Stone Date: Tue Jul 10 02:03:20 2012 +0100 GLX: Remove extension init dependencies GLX was the only user of extension init order dependencies, using them to depend on Composite, which has always been built-in anyway, and DBE, which is now built-in. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 2fba9445a0357f67641e41ac334b5529c37774a2 Author: Daniel Stone Date: Tue Jul 10 02:03:19 2012 +0100 Add static extensions before those in modules Make sure we add static extensions before anything in a module. This is more or less a no-op at the moment, but will come in handy later when extension dependency sorting is removed. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 9a953e0e9dcb8a8e43cc27ffaef460268fbe1916 Author: Daniel Stone Date: Tue Jul 10 02:03:18 2012 +0100 Move DRI2 from external module to built-in Instead of keeping a tiny amount of code in an external module, just man up and build it into the core server. v2: Fix test/Makefile.am to only link libdri2.la if DRI2 is set Signed-off-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Keith Packard commit b8a3267c36e2e335b888bd4f2ef2f2c477cdfdce Author: Daniel Stone Date: Tue Jul 10 02:03:17 2012 +0100 DRI2: Remove prototype for DRI2DestroyDrawable DRI2DestroyDrawable() was still being _X_EXPORTed, but hasn't existed since 1da1f33f last year. Signed-off-by: Daniel Stone Reviewed-by: Cyril Brulebois Reviewed-by: Jamey Sharp Reviewed-by: Ian Romanick Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 7025a909bfe4d1f5518ec6fc5f89e2c3fb6501fd Author: Daniel Stone Date: Tue Jul 10 02:03:16 2012 +0100 XFree86: DRI: Don't use per-target CFLAGS AM_CFLAGS will suffice, given we only have one target in this directory. Signed-off-by: Daniel Stone Reviewed-by: Cyril Brulebois Signed-off-by: Keith Packard commit 459c6da0f907ba33d733c7e62a116184ba2f14e5 Author: Daniel Stone Date: Tue Jul 10 02:03:15 2012 +0100 Move DRI1 from external module to built-in Rather than building the tiny amount of code required for XFree86-DRI as an external module, build it in if it's enabled at configure time. v2: Fix test/Makefile.am to only link libdri.la if DRI is set Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard fixup for DRI1 move Signed-off-by: Keith Packard commit b905d87ba0a9b045ea41bb1ad36a4f9f1170a1b8 Author: Daniel Stone Date: Tue Jul 10 02:03:14 2012 +0100 Xext: Only build one library Now that libXextmodule.la is both empty and unused, we can just build the one libXext.la for everyone, rather than having Xorg be special and unique. Signed-off-by: Daniel Stone Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit a7a2f9f66ddc27df96557093f3dd266e24eb653b Author: Daniel Stone Date: Tue Jul 10 02:03:13 2012 +0100 Remove the last remnants of extmod extmod was originally a big pointless module. Now it's an empty, pointless module. This commit makes it unexist. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 6e74fdda42fb4bd80fd48e1ae6471bffbb837804 Author: Daniel Stone Date: Wed Jun 22 00:28:18 2011 +0100 Move XFree86-VidMode from extmod to built-in As with DGA, move VidMode from being part of extmod to a built-in part of the server, if compiled as such. This is initialised from xf86ExtensionInit rather than miinitext because it's wholly dependent on the Xorg DDX. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 60f53e3012be795eee741ecd4be858552c5e86c8 Author: Tomas Carnecky Date: Tue Jul 10 02:03:11 2012 +0100 DGA: Remove excessive module-induced indirection The DGA event base used to have to be passed through a function pointer, as the code was cleaved in two with half in a module, and half in the core server. Now that's not the case, just access DGAEventBase directly. v2: Deal with Alan's event initialization cleanups Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 7a5880bc3b47e1f90a638f056ad4d40be6931977 Author: Daniel Stone Date: Tue Jul 10 02:03:10 2012 +0100 Move DGA from extmod to built-in Rather than leave DGA languishing in extmod, move it to be a built-in extension. As it's quite specific to the Xorg DDX, just move it sideways to the rest of the DGA code in hw/xfree86/common, and initialise it from xf86ExtensionInit, rather than miinitext. Signed-off-by: Daniel Stone Acked-by: Keith Packard Signed-off-by: Keith Packard commit 6fb481d1251626456914d0012d6ca5a342bfdf71 Author: Daniel Stone Date: Tue Jul 10 02:03:09 2012 +0100 Move SELinux from extmod to built-in Instead of letting it languish in extmod just because we want to configure bits of it from xf86, move XSELinux to the builtin part of Xext, and do its configuration from xf86ExtensionInit. Signed-off-by: Daniel Stone Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 5d92ee4081a23a6b4d1f9ba2a98985f539f99312 Author: Tomas Carnecky Date: Tue Jul 10 02:03:08 2012 +0100 Xv: Remove excessive module-induced indirection Xv used to call XvScreenInit and co. through function pointers, as XvScreenInit may have been sitting on the other side of a module boundary from xf86XvScreenInit. Why this was so is a mystery, but make it not so any more. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Acked-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 2e6c5f959153cdcea4bcf719621ebec408250f54 Author: Daniel Stone Date: Tue Jul 10 02:03:07 2012 +0100 XFree86: sdksyms: Remove unused -DXorgLoader We no longer have anything in the tree that checks for XorgLoader. This was a fairly monumental hack: xvdi.h used to hide all its functions behind #ifndef XorgLoader, solely to avoid sdksyms.sh picking up its symbols, as it was previously a module rather than built-in. This is no longer the case, so we can remove the define. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 7a11b817e770cd2196814f1ac6264c6d87b76c6a Author: Tomas Carnecky Date: Tue Jul 10 02:03:06 2012 +0100 Move Xv and XvMC from extmod to built-in Always build these extensions into the core server, rather than letting them languish in extmod. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 7d859bd87834dd79c7fa3792075496ece698c082 Author: Tomas Carnecky Date: Tue Jul 10 02:03:05 2012 +0100 Move XRes from extmod to built-in Always build XRes support into the core server, rather than letting it languish in extmod. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit ba21fc29587e4f11320b88a70433beb1fe22cdf3 Author: Tomas Carnecky Date: Tue Jul 10 02:03:04 2012 +0100 Move DPMS from extmod to built-in Always build DPMS support into the core server, rather than letting it languish in extmod. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 3ed2c6e11298c4299042cfe4578f6cc02e441d58 Author: Tomas Carnecky Date: Tue Jul 10 02:03:03 2012 +0100 Move MIT-SCREEN-SAVER from extmod to built-in If we've built MIT-SCREEN-SAVER support, then just build it into the main binary, rather than leaving it in extmod. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit b8c9ab0fea0be299d9f48ac0c4ed0474104a7556 Author: Tomas Carnecky Date: Tue Jul 10 02:03:02 2012 +0100 Move RECORD from external module to built-in Rather than languishing in its own special module, move RECORD into the core server. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit bf61bf69b2b4f9e9993ca771de100079c7696bea Author: Tomas Carnecky Date: Tue Jul 10 02:03:01 2012 +0100 Move DBE from an external module to built-in If DBE support is compiled in the server, just man up and build it into the server, rather than having it as an external module. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit d785368e0e171080fea5447c87e81c93f515ff21 Author: Daniel Stone Date: Tue Jul 10 02:03:00 2012 +0100 miinitext: Use ARRAY_SIZE rather than sentinel NULL sentinels are totally lame. v2: numExtensionModules isn't public, so keep using the provided sentinal - Keith Packard Signed-off-by: Daniel Stone Reviewed-by: Stéphane Marchesin Signed-off-by: Keith Packard commit f48d8f58b39af0036365368d6ac35319d6d856d5 Author: Daniel Stone Date: Tue Jul 10 02:02:59 2012 +0100 extmod: Use ARRAY_SIZE rather than sentinel When the array gets down to size zero (which it does in later patches), gcc complains that the index is out of bounds. Avoid this by using ARRAY_SIZE on extensionModules instead. Signed-off-by: Daniel Stone Reviewed-by: Stéphane Marchesin Signed-off-by: Keith Packard commit d35884da2f5a250ff6dd5131dc23ac629eccdd0c Author: Daniel Stone Date: Tue Jul 10 02:02:58 2012 +0100 Add xf86ExtensionInit for DDX extension configuration xf86ExtensionInit is called after configuration file parsing, so it can perform the two parts of extension initialisation currently done by extmod: enabling and disabling of extensions through an 'omit' option, and SELinux configuration. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 4170e4e1f8e879394c896c490d9f08a38ecfdefd Author: Daniel Stone Date: Tue Jul 10 02:02:57 2012 +0100 Loader: Drop EXTERN_MODULE flag EXTERN_MODULE was used to specify that we shouldn't worry about modules lacking a ModuleData object. It was also completely unused. *shrug* Signed-off-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit a1d41e311c21eb6627caa0d168e070ceaf90806f Author: Daniel Stone Date: Tue Jul 10 02:02:56 2012 +0100 Move extension initialisation prototypes into extinit.h Create extinit.h (and xf86Extensions.h, for Xorg-specific extensions) to hold all our extension initialisation prototypes, rather than duplicating them everywhere. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit b86aa74cafddf9bca5addfeb458a23f46ddcf132 Author: Daniel Stone Date: Tue Jul 10 02:02:55 2012 +0100 GLX: Insert swrast provider from GlxExtensionInit Rather than making poor old miinitext.c do it, including making DMX have fake symbols just to keep it happy. Signed-off-by: Daniel Stone Reviewed-by: Stéphane Marchesin Signed-off-by: Keith Packard commit 13552a5c4701097a1507a99ed8366ab1438844b6 Author: Daniel Stone Date: Tue Jul 10 02:02:54 2012 +0100 Reorder extension initialisation for non-Xorg Reorder static extension initialisation in miinitext for non-Xorg servers to match Xorg's order. Tested with Xephyr; checked that the extension list was identical before and after. Signed-off-by: Daniel Stone Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 5079db78aea8fa42e781dd876c1ee1c31571b3ae Author: Tomas Carnecky Date: Tue Jul 10 02:02:53 2012 +0100 Replace INITARGS with void INITARGS was a hardcoded define to void. Since knowing the function signature for your extensions is kinda useful, just replace it with a hardcoded void, but leave the define there for API compatibility. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Cyril Brulebois Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit bddb8c6cbe52ba9923b1d36d01f5ac9391b0ec0e Author: Daniel Stone Date: Tue Jul 10 02:02:52 2012 +0100 Xinerama: Fix ExtensionInit prototype Huh, so I guess INITARGS used to be int argc, char *argv then. Either way, it's now void, so fix that ... Signed-off-by: Daniel Stone Reviewed-by: Cyril Brulebois Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit eb9661fef9f59587f898371f97a0952ac14d125f Author: Daniel Stone Date: Tue Jul 10 02:02:51 2012 +0100 Make extension.h self-contained, remove C++ externs externsion.h required bits from Xfuncproto.h and dixstruct.h, but included neither; fix that. It also had _XFUNCPROTOBEGIN and _XFUNCPROTOEND wrappers, which is a bit pointless for a server-only library, as it's only needed for C++. Signed-off-by: Daniel Stone Reviewed-by: Cyril Brulebois Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 854c1fa4a1e90288d1e2f3777fac3e1a9acb1235 Author: Daniel Stone Date: Tue Jul 10 02:02:50 2012 +0100 Add a common ARRAY_SIZE macro to dix.h Does what it says on the box, replacing those from Xi/ and glx/. Signed-off-by: Daniel Stone Reviewed-by: Cyril Brulebois Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 67953d6975ef2ee573b95e7641aaf3d72e9f8379 Author: Daniel Stone Date: Tue Jul 10 02:02:49 2012 +0100 Xorg: Link XKB DDX library after core server libs libxorgxkb.a contains a number of libraries which are used by XKB action code to call back into the DDX, e.g. for VT switching, termination, grab breaking, et al. Make sure libxkb.a comes first in the link order, so it can mark XkbDDX* as used in order for the linker to not discard them. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 656af2c7e73d948338683675e14cd827b46a97c4 Author: Daniel Stone Date: Tue Jul 10 02:02:46 2012 +0100 Don't make failure to -nolisten fatal If failing to disable a protocol specified by -nolisten failed, we'd throw a FatalError and bomb startup entirely. From poking at xtrans, it looks like the only way we can get a failure here is because we've specified a protocol name which doesn't exist, which probably doesn't constitute a security risk. And it makes it possible to start gdm even though you've built with --disable-tcp-transport. Signed-off-by: Daniel Stone Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit dc0c2dd92d5eb314582ea10830678753824375d9 Author: Daniel Stone Date: Tue Jul 10 02:02:45 2012 +0100 Xext: Add hashtable.h to sources to fix distcheck Signed-off-by: Daniel Stone Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit ad4092cf7d59a89b1b2922440eef65be5c0c5ebd Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 Replace padlength tables with inline functions from misc.h Adds new function padding_for_int32() and uses existing pad_to_int32() depending on required results. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Reviewed-by: Peter Hutterer Tested-by: Daniel Stone commit 2b1c1300cc23912ee1c59f8dde938dd4d7287f4a Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 ephyrGLXQueryServerString: Stop making an unused copy of server_string ephyrGLXQueryServerString() carefully allocated a buffer padded to the word-aligned string length for sending to the client, copied the string to it, and then forgot to use it, potentially reading a few bytes of garbage past the end of the server_string buffer. Since WriteToClient already handles the necessary padding, just send it the actual length of the original server_string, and don't bother making a padded copy. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 7a29f6878284e2d65e69fcd157aa9ec01d21b3c0 Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 Initialize padding bits to 0 in ErrorConnMax() Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit bed610fcae41ddfe21fa9acde599b17d1d15f5d1 Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 Set padding bytes to 0 in WriteToClient Clear them out when needed instead of leaving whatever values were present in previously sent messages. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 1622dd8ab24d2fe7b9908110eb237774d4e03568 Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 Use C99 designated initializers in dix registry Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 9805cedf7b0f76d3b75f94e956c4cc2dcf0d8b64 Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 Use C99 designated initializers in extension Events Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 0af79b124e1317c36d1613d28755c5a8ce612e2a Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 Use C99 designated initializers in dix Events Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 483266a583b0fd8a552303f318a71502ce3ff1d2 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in xf86 extension Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 14501fd33ee89acf9fc1d908003ed62f383d8bae Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in Xephyr Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit e4e827ec36fd20b7aea608db09790f76fb87e519 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in dmx Replies v2: fix in __glXGetVisualConfigs to not re-declare local 'reply' variable Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone Fixup for Use C99 designated initializeres in dmx Replies Signed-off-by: Keith Packard commit bd6f948c41865c2c9d3fba1000bf5f7458d3afc1 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in randr Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit a406bd07593edb69285cf2fd91a6af4a5d956817 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in xkb Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 26efa09d0c7ee2f6a18547205c84be75376e688b Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in glx Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit cc5f09c86f7bea23b7546c3491b2c52ce8100a71 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in various extension Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 2f5caeaddb3616dc9ff57d784f7feba589c536e7 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in Xinput Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 6a721e3af5e11bae1d59ca551a02470f35d9e844 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in Xext Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit d792ac125a0462a04a930af543cbc732f8cdab7d Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in dix Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 69fa5630b5902aaad267fc67d0da4ca93625886a Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in SendErrorToClient Let the compiler worry about 0-filling the rest of the fields, instead of memsetting the whole struct and then going back to overwrite some of the fields. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit cdf5bcd420e5bcf4a4a24a275d3133a4e16ce41e Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 Use calloc to zero fill buffers being allocated for replies & events Ensures padding bytes are zero-filled Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit ef0f701c9245b0373eb0c7a84dd804af4738bb29 Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 xf86dga2.c & xf86vmode.c: Move REQUEST_SIZE_MATCH checks before using stuff Seems silly waiting to check if the client failed to send us enough bytes until after we've already tried using them. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 2e739a8870d91fbac7f536ffa8f6d2cee0f66cec Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 ProcRRListOutputProperties: skip atom walk if the list is empty pAtoms is only allocated if numProps was non-zero, so move the walk through the property list to copy atoms to it inside the if (numProps) Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 15bc13c8d088e05f14c7262348e0066929c29251 Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 ProcRRGetScreenInfo: swap configTimestamp as well Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 3a013b8816bc0bb765c99e8a2bf2ea536dc62c3b Author: Jaroslav Šmíd Date: Mon Jul 9 19:12:42 2012 -0700 Bug 51375: Xorg doesn't set status for RRGetOutputInfo https://bugs.freedesktop.org/show_bug.cgi?id=51375 https://bugs.freedesktop.org/attachment.cgi?id=63397 Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 5b86c072d1d586ce040d8831a05cf97ff8b17821 Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 Use temporary variables instead of parts of reply structures When passing variable pointers to functions or otherwise doing long sequences to compute values for replies, create & use some new temporary variables, to allow for simpler initialization of reply structures in the following patches. Move memsets & other initializations to group with the rest of the filling in of the reply structure, now that they're not needed so early in the code path. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit c2fb1a7b2ab58d70b38ee03ab2fdeb4e7183a356 Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 ProcQueryKeymap: rework logic around permission to copy key states Always initialize to zero, and then if permission is granted, copy the current key state maps, instead of always copying and then zeroing out if permission was denied. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit dccb0858d71341e1258800b37d1bb78c0115838d Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 Core events: invert check for permission to copy key states Always initialize to zero, and then if permission is granted, copy the current key state maps. Use memcpy instead of memmove for the copy, since we're always copying to a newly allocated event on the stack, so guaranteed not to overlap with the device map structure. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit db69212df8a0bf09140368356d2d430c54afe346 Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 Rework reply initialization in ProcGetProperty & NullPropertyReply Don't need to pass an empty reply to NullPropertyReply, let it make it's own. Move reply initialization code in remaining replies in ProcGetProperty to group with the rest of the fields. (Prepares for coming C99 designated initializer conversion.) Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 6be74a9080e30fc502421cd438cd0c73fb8eb0b0 Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 Fix more poorly indented/wrapped comments & code Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 789d64e19a3b3d98b88bc80f677e0c37bfb5c631 Author: Alan Coopersmith Date: Sun May 13 00:03:35 2012 -0700 Remove unneccesary casts from WriteToClient calls Casting return to (void) was used to tell lint that you intended to ignore the return value, so it didn't warn you about it. Casting the third argument to (char *) was used as the most generic pointer type in the days before compilers supported C89 (void *) (except for a couple places it's used for byte-sized pointer math). Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 023127915e6922bc53e4c768de760d8a4f25c07c Author: Keith Packard Date: Mon Jul 9 16:34:39 2012 -0700 Reliably reset signals at server init time Each DDX currently calls OsReleaseSIGIO in case it was suspended when the server regen started. This causes a BUG to occur if SIGIO was *not* blocked at that time. Instead of relying on each DDX, make the OS layer reliably reset all signal state at server init time, ensuring that signals are suitably unblocked and that the various signal state counting variables are set back to zero. Signed-off-by: Keith Packard commit d6756e0298e660a0aca58d75bcf79471ce07a634 Author: Keith Packard Date: Mon Jul 9 16:33:11 2012 -0700 xfree86: In InitOutput, only call OsReleaseSIGIO if OsBlockSIGIO was called Otherwise, OsReleaseSIGIO will complain, or perhaps something worse will happen (if SIGIO actually needs to be blocked here). Signed-off-by: Keith Packard commit ea8b04507e5464e4817791db516a20cfed2a6724 Author: Keith Packard Date: Mon Jul 9 16:30:24 2012 -0700 privates: Resize GPU screen-specific privates too When allocating new global privates, make sure the gpu screens get their private offsets updated. This only affects GPU screens that enumerate before the non-GPU screens, which generally requires that the related device be present when the system boots so that it can get an earlier DRM filename. Signed-off-by: Keith Packard commit d1c639c006526b8cab14dac582508f3f54848967 Author: Keith Packard Date: Mon Jul 9 16:29:04 2012 -0700 Add 'install-headers' target in the top-level Makefile This target recursively locates directories with sdk headers and installs them all. Useful when you want to build a complete new X server and drivers without having to install the X server before the drivers are actually working. Signed-off-by: Keith Packard commit 329db3292223cccd4887062956622285c45a1523 Author: Dave Airlie Date: Sat Jul 7 10:10:08 2012 +0100 dri2/prime: allocate prime id at screen allocation time Add a static mask of prime id and allocate them at screen time, if the driver supports the prime interfaces and is a gpu screen. This is instead of them changing due to user controlled randr commands, as suggested by Keith. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 30298012162de7f76e8a4c7b0362e98703f80011 Author: Dave Airlie Date: Tue Jun 26 10:20:52 2012 +0100 dri2: add initial prime support. (v1.2) This adds the initial prime support for dri2 offload. The main thing is when we get a connection from a prime client, we stored the information and mark all drawables from that client as prime. We then create all buffers for that drawable on the prime device dri2screen. Then DRI2UpdatePrime is provided which drivers can call to get a shared pixmap which they can use as the front buffer. The driver is then responsible for doing the back->front copy to the shared buffer. prime requires a compositing manager be run, but it handles the case where a window get un-redirected by allocating a new pixmap and pointing the crtc at it while the client is in that state. Currently prime can't handle pageflipping, so always does straight copy swap, v1.1: renumber on top of master. v1.2: fix auth on top of master. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 234022cfb3ad2a1b16ab7981ce69f9cd5ba0fbeb Author: Dave Airlie Date: Sat Jul 7 10:20:58 2012 +0100 configure: bump dri2proto to 2.8 This is required for the prime macros. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit c41922940adbc8891575b3321fadf01ff4cb5854 Author: Dave Airlie Date: Tue Jun 26 10:00:21 2012 +0100 dix/randr: add a hook into screen to replace scanout pixmap For DRI2 in some offload cases we need to set a new pixmap on the crtc, this hook allows dri2 to call into randr to do the necessary work to set a pixmap as the scanout pixmap for the crtc the drawable is currently on. This is really only to be used for unredirected full screen apps in composited environments. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit e2fd447e76c4a1233374c9d8fa9cae54a55dad50 Author: Dave Airlie Date: Thu Jul 5 15:50:56 2012 +0100 xf86: add callback for offloak sink setting support. This adds support for setting the offload sink to the xf86 ddx. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 22f02120eb4092e1c283f81c8040f178693ff0a4 Author: Dave Airlie Date: Tue Jun 26 09:53:54 2012 +0100 xf86: store scanout pixmap in the xf86 struct as well. This is so we can tell the scanout pixmap has changed between calls to the crtc set function. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 426bc0a28edbe0e9153f692a02dd25f744ffa034 Author: Dave Airlie Date: Thu Jul 5 15:41:38 2012 +0100 randr: add hooks for offload sink provider protocol This adds the protocol handler and associated providers handling for the offload slaves, it allows two providers to be connected as offload sink/source. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 12905dfaf01088a00f4a0a78cffba03329e7b724 Author: Dave Airlie Date: Sat May 26 13:11:01 2012 +0100 dix/xf86: initial offload slave tracking (v1.1) add the linked list and provider hooks. v1.1: add another assert in the add path. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit a7c01da54ab43f9d29333ccbd79dfc001f9dc5e3 Author: Dave Airlie Date: Thu Jul 5 20:34:54 2012 +0100 xf86: make sure rotate calcs are done on the right screen boundaries This fixes a segfault where this code believes we are outside the screen boundaries on a slave device, but we aren't. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit cc02f4ef3e407be794132d004c947c9a4e14f4c2 Author: Dave Airlie Date: Tue Jun 19 16:01:16 2012 +0100 xf86/cursor: fallback to sw cursor if we have slaves present. Current USB devices have no hw rendered cursors, so we need the master GPU to render the cursor, so whenever we plug in a slave device, fallback to sw rendered cursors. Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 98686512cbe1affb75222a63136854af79f1411b Author: Dave Airlie Date: Thu Jul 5 15:50:24 2012 +0100 xf86: add output source setting callback (v2) This adds support for the randr callback for setting the output source for a device. v2: drop root clip change on detach Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 4c92eb00f97f7b8258de8e366226880382cc9ce9 Author: Dave Airlie Date: Thu Jul 5 15:41:22 2012 +0100 randr: add output source setup This adds the output sources to the associated list and adds the protocol handler for the randr SetProviderOutputSource. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit bec4cb72c55bb6dee09c65c0844af201067a090f Author: Dave Airlie Date: Thu May 24 15:47:22 2012 +0100 randr: hook up output slave to screen resources return When the client asks for the screen resources list, it will now get a list of crtc/outputs for the master + all attached slaves, this will let randr configure all attached slave devices properly. Keith asked I merge the two functions, but not just yet, the current multi screen code doesn't handle primary yet properly, will fix it up later. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 88bc02bfaae2c15a30c606d34cf7940e6ad5ea14 Author: Dave Airlie Date: Mon Jun 18 14:11:24 2012 +0100 xf86/crtc: add new interface to detach slave crtcs This will detach any scanout pixmaps attached to slave crtcs. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 9b8217f9ef6279fff6628631d18497bed0343ef9 Author: Dave Airlie Date: Thu Jun 14 15:24:46 2012 +0100 dix/pixmap: track dirty pixmaps in server. (v4) This adds two functions for drivers to use directly to keep a linked list of slave pixmaps to do damage tracking on and keep updated. It also adds a helper function that drivers may optionally call to do a simple copy area damage update. v2: use damage.h not damagestr.h, fixes ephyr build. v3: address ajax review: use slave_dst, drop unused dst member. v4: check DamageCreate return, add SourceValidate comment, add a comment addressing possible optimisation possibility Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit c5cc2a8243c5e6bf454af989b7512ec7e20fc3f2 Author: Dave Airlie Date: Tue May 29 14:41:39 2012 +0100 randr: check the screen size bounds against the master The master contains the complete screen size bounds, so check the width/height against it. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 26d848cb916c8a85f2c69d2aeb004665ba07bf00 Author: Dave Airlie Date: Tue May 29 14:35:24 2012 +0100 randr: fix tellchanged to work with slave scanouts Tell changed need to tell only for the master pixmap, however it gets called from various places for slave screens, so convert to telling clients about changes on the master screen. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 4bf0192d810e01c89a1903cc4bc5e639fc13a547 Author: Dave Airlie Date: Tue May 29 14:37:11 2012 +0100 randr: fixup constrain to work with slave screens. Current code constrains the cursor to the crtcs on the master device, for slave outputs to work we have to include their crtcs in the constrain calculations. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 2ed3f64d9d453628ab5c03b8aee006093019c933 Author: Dave Airlie Date: Wed Jun 20 12:37:26 2012 +0100 xf86: add initial scanout pixmap support (v2) Add the simple passthrough interface for drivers to use, so they can set scanout pixmaps. v2: detach scanout pixmap properly. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit f2da2c12042d3447b1c954e7301632d174a08b4f Author: Dave Airlie Date: Wed Jun 20 12:37:12 2012 +0100 randr: add initial scanout pixmap support (v3) When randr notices a crtc configuration request for a slave device, it checks if the slave allocated pixmap exists and is suitable, if not it allocates a new shared pixmap from the master, shares it to the slave, and starts the master tracking damage to it, to keep it updated from the current front pixmap. If the resize means the crtc is no longer used it will destroy the slave pixmap. This adds the concept of a scanout_pixmap to the randr_crtc object, and also adds a master pixmap pointer to the pixmap object, along with defining some pixmap helper functions for getting pixmap box/regions. v2: split out pixmap sharing to a separate function. v3: update for void * Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 0b0e7148925e1f835d4f4f06e402a97023531828 Author: Dave Airlie Date: Thu May 24 16:03:31 2012 +0100 exa: pixmap sharing infrastructure (v3) This just adds exa interfaces for mixed exa so drivers can share and set shared pixmaps up correctly. v2: update for passing slave screen. v3: update for void * Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit fd6c1bf0a3efced3ad4623dbd4716230a5f2419e Author: Dave Airlie Date: Thu May 24 16:03:19 2012 +0100 dix: pixmap sharing infrastructure (v3) This is a hooks for pixmap sharing and tracking. The pixmap sharing ones get an integer handle for the pixmap and use a handle to be the backing for a pixmap. The tracker interface is to be used when a GPU needs to track pixmaps to be updated for another GPU. v2: pass slave to sharing so it can use it to work out driver. v3: use void * as per keithp's suggestion. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 382dd45bb88fa92764bf0ecd655cb9890eb84960 Author: Dave Airlie Date: Thu May 24 15:39:05 2012 +0100 dix: add ability to link output slave gpus to the current gpu (v1.1) Just add the interfaces to attach/detach output slaves, and a linked list to keep track of them. Hook up the randr providers list to include these slaves. v1.1: add another assert to the add path. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 05d2472cd242293a5fa205efff5734a3380072b4 Author: Dave Airlie Date: Thu Jun 14 15:03:02 2012 +0100 xf86dga: handle DGAAvailable for gpu screens. (v2) v2: Split out DGAAvailable into two interfaces, one for calls from protocol decoding and one for internal usage, after discussion with ajax and keithp. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 3cbc4c10b52896324fe14d2ab56bd54577c9294c Author: Dave Airlie Date: Wed Jun 13 14:35:49 2012 +0100 randr: expose unattached providers to the clients. This provides the unattached provider list to the clients. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit d0e138c3f3e58ef127dad6c6aef48b1713b5ce58 Author: Dave Airlie Date: Wed Jun 13 14:32:05 2012 +0100 dix: attach unbound screens to protocol screen 0 (v2) This is the default attachment, unbound gpu screens get attached to the 0 protocol screen. detach on hotunplug. v2: detach after tearing down crtc/outputs. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 4caad34c932115dc0a9fd9c2995ebb2d38b9359c Author: Dave Airlie Date: Wed Jun 13 14:27:42 2012 +0100 dix: add unattached list for attaching screens to initially. (v1.1) This list is meant for attaching unbound gpu screens to initially, before the client side rebinds them. v1.1: add another assert in the add path. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 9b5cf2ed76b00937af12304e0e8dbd60df62067e Author: Dave Airlie Date: Wed Jun 13 14:17:06 2012 +0100 xfree86: add framework for provider support in ddx. (v4) This adds the framework for DDX provider support. v2: as per keithp's suggestion remove the xf86 provider object and just store it in the toplevel object. v3: update for new protocol v4: drop devPrivate, free name Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 66d92afeaeed9f4a19267d95a1f81b9bf27162a5 Author: Dave Airlie Date: Wed Jun 13 14:03:04 2012 +0100 randr: add provider object and provider property support (v6) This adds the initial provider object and provider property support to the randr dix code. v2: destroy provider in screen close v2.1: fix whitespace v3: update for latest rev of protocol + renumber after 1.4 tearout. v4: fix logic issue, thanks Samsagax on irc v5: keithp's review: fix current_role, fix copyrights, fix master reporting crtc/outputs. v6: port to new randr interface, drop all set role bits for now v7: drop devPrivate in provider, not needed, add BadMatch returns for NULL SetProviderOffloadSink and SetProviderOutputSource, drop the old typedef. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 44eae69f1df2d00e0c9f1ea8d3c4fae06bcacfbc Author: Dave Airlie Date: Thu Jul 5 21:11:16 2012 +0100 configure: bump randrproto min requirements to 1.4.0 Needed to build latest randr stuff. Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 4d24192bd24fb20d16d0054d77bffda883faeb79 Merge: 7c9d8cbd3 74b786f7c Author: Keith Packard Date: Fri Jul 6 12:17:17 2012 -0700 Merge remote-tracking branch 'airlied/for-keithp-stage1' commit 7c9d8cbd368cac53e7aed9308292614337db3be2 Author: Torsten Kaiser Date: Fri Jul 6 12:10:25 2012 -0700 xfree86: EDID Est III parsing skips some modes This loop needs to count from 7 to 0, not only from 7 to 1. The current code always skips the modes {1152, 864, 75, 0}, {1280, 1024, 85, 0}, {1400, 1050, 75, 0}, {1600, 1200, 70, 0} and {1920, 1200, 60, 0}. Signed-off-by: Torsten Kaiser Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 0b3abacb6430e6593c4358420ba457d8149bd32b Author: Torsten Kaiser Date: Fri Jul 6 12:06:13 2012 -0700 xfree86: EDID Est III parsing can walk off end of array Using -O3 gcc notes that m could reach beyound the end of the EstIIIModes array, if the last bits of the 11s byte where set. Fix this, by extending the array to cover all possible bits from est. https://bugs.freedesktop.org/show_bug.cgi?id=45623 Signed-off-by: Torsten Kaiser Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 74b786f7cee5723468bba251a2155a65770b2ad4 Author: Dave Airlie Date: Tue Jun 5 17:45:03 2012 +0100 xfree86: add autoAddGPU option (v2) This option is to stop the X server adding non-primary devices as gpu screens. v2: fix per Keith's suggestion. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit ef6686480ad1de6582b9ef5d13e5d4ffb3b3918c Author: Dave Airlie Date: Tue Jun 5 17:30:39 2012 +0100 xfree86: add platform bus hotplug support (v3) This provides add/remove support for platform devices at xfree86 ddx level. v2: cleanup properly if no driver found. v3: load the modesetting driver before checking driver list. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit b27cf30995e05da11e827ec41060051673336a7b Author: Dave Airlie Date: Tue Jun 5 17:29:56 2012 +0100 xserver/config: add udev/drm hotplug callbacks. (v2) This adds callbacks into the ddx for udev gpu hotplug. v2: fix some strncmp returns. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 53b66c084fbf5bf47f8121632fabdc39b9fe8337 Author: Dave Airlie Date: Tue Jun 5 17:18:10 2012 +0100 xfree86: add DDX gpu screen support. (v3) This just adds the structures and interfaces required for adding/deleteing gpu screens at the DDX level. The platform probe can pass a new flag to the driver, so they can call xf86AllocateScreen and pass back the new gpu screen flag. It also calls the gpu screens preinit and screeninit routines at startup. v2: fix delete screen use after free. v3: split out pScrn into separate patch Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 726d467b534a30d8cbaafb858339c638c9f83195 Author: Dave Airlie Date: Mon Jun 25 11:51:26 2012 +0100 xf86: cleanup helper code to use a pointer. (v1.1) This is in preparation for gpu screens in here, just use a pScrn pointer to point at the new screen. suggested by Keith. v1.1: fix spacing as suggested by Aaron. Reviewed-by: Keith Packard Reviewed-by: Aaron Plattner Signed-off-by: Dave Airlie commit 9d179818293b466ec6f1777f0b792e1fbbeb318c Author: Dave Airlie Date: Tue Jun 5 17:09:38 2012 +0100 dix: introduce gpu screens. (v5) This patch introduces gpu screens into screenInfo. It adds interfaces for adding and removing gpu screens, along with adding private fixup, block handler support, and scratch pixmap init. GPU screens have a myNum that is offset by GPU_SCREEN_OFFSET (256), this is used for logging etc. RemoveGPUScreen isn't used until "xfree86: add platform bus hotplug support". v2: no glyph pictures for GPU screens for now. v3: introduce MAXGPUSCREENS, fix return value check v4: fixup myNum when renumbering screens (ajax) v5: drop cursor privates for now. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 3478af3374abffa0c226ee077fda1fcfc0751e74 Author: Dave Airlie Date: Tue Jun 5 17:01:21 2012 +0100 screen: split out screen init code. (v2) This is a precursor for reusing this code to init gpu screens. v2: fixup int check as per Keith's review. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit cf66471353ac5899383b573a3cfca407e90d501e Author: Dave Airlie Date: Tue May 8 14:26:47 2012 +0100 xfree86: use udev to provide device enumeration for kms devices (v10) On Linux in order for future hotplug work, we are required to interface to udev to detect device creation/removal. In order to try and get some earlier testing on this, this patch adds the ability to use udev for device enumeration on Linux. At startup the list of drm/kms devices is probed and this info is used to load drivers. A new driver probing method is introduced that passes the udev device info to the driver for probing. The probing integrates with the pci probing code and will fallback to the pci probe and old school probe functions in turn. The flags parameter to the probe function will be used later to provide hotplug and gpu screen flags for the driver to behave in a different way. This patch changes the driver ABI, all drivers should at least be set with a NULL udev probe function after this commit. v2: rename to platform bus, now with 100% less udev specific, this version passes config_odev_attribs around which are an array of id/string pairs, then the udev code can attach the set of attribs it understands, the OS specific code can attach its attrib, and then the core/drivers can lookup the required attribs. also add MATCH_PCI_DEVICES macro. This version is mainly to address concerns raised by ajax. v3: Address comments from Peter. fix whitespace that snuck in. rework to use a linked list with some core functions that xf86 wraps. v4: add free list, fix struct whitespace. ajax this address most of your issues? v5: drop probe ifdef, fix logic issue v6: some overhaul after more testing. Implement primaryBus for platform devices. document hotplug.h dev attribs - drop sysname attrib fix build with udev kms disabled make probing work like the PCI probe code, match against bus id if one exists, or primary device. RFC: add new bus id support "PLAT:syspath". we probably want to match on this a bit different, or use a different property maybe. I was mainly wanting this for use with specifying usb devices in xorg.conf directly, but PLAT:path could also work I suppose. v6.1: add missing noop platform function v7: fix two interactions with pci probing and slot claiming, prevents pci and platform trying to load two drivers for same slot. v8: test with zaphod mode on -ati driver, fixup resulting issue clean up common probe code into another function, change busid matching to allow dropping end of strings. v9: fix platform probing logic so it actually works. v9.1: fix pdev init to NULL properly. v10: address most of Keith's concerns. v4 was thanks to Reviewed-by: Adam Jackson v5 was Reviewed-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 2c52d776a42a28bb3e1463edf0cfe0672d0c08a9 Author: Dave Airlie Date: Tue Jun 19 16:01:08 2012 +0100 xf86: cursor code got mangled by indenting This fixes some really ugly code that got mangled by the indenting. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 9e4b8b74b008dd72d1da7074bd7ecae677cefd20 Author: Keith Packard Date: Thu Jul 5 11:31:55 2012 -0700 privates: Allow device privates to be allocated after server start This will permit midispcur to allocate its privates for hotplug outputs Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 493ad833233707b0a42e5fbdd957a24fc6e52917 Author: Keith Packard Date: Thu Jul 5 11:31:29 2012 -0700 dix: Allocate device privates separate from devices This will allow device privates to be resized. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit f38b2b628322f4d763b0c7f8387d5ab0472a7d2b Author: Keith Packard Date: Thu Jul 5 11:15:18 2012 -0700 mi: Don't save midispcur rendering resources for each cursor Instead, only save them for the most recently drawn cursor. This saves a bunch of storage for idle cursors. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 7651176b0093cf3a4cff2277f6918a7d0451af41 Author: Keith Packard Date: Tue Jul 3 16:12:59 2012 -0700 Use screen-specific privates for exa pixmap and gc privates Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 7ca32f1c282cb6d4d7255f118a1e2e6f54e6b3fa Author: Keith Packard Date: Tue Jul 3 16:05:42 2012 -0700 Use new screen-specific privates for fb window and gc privates This ensures that only screens using fb will have this space allocated. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 9d457f9c55f12106ba44c1c9db59d14f978f0ae8 Author: Keith Packard Date: Tue Jul 3 15:45:09 2012 -0700 Add screen-specific privates. Screen-specific privates areas are only allocated for objects related to the target screen; objects allocated for other screens will not have the private space reserved. This saves memory in these objects while also allowing hot-plug screens to have additional private allocation space beyond what the core screens are using. Drivers are encouraged to switch to this mechanism as it will reduce memory usage in multi-GPU environments, but it is only required for drivers which will be loaded after the server starts, like modesetting. Objects providing screen-specific privates *must* be managed by the screen-specific private API when allocating or initializing privates so that the per-screen area can be initialized properly. The objects which support screen-specific privates are: Windows Pixmaps GCs Pictures Extending this list to include Colormaps would be possible, but require slightly more work as the default colormap is created before all colormap privates are allocated during server startup, and hence gets a bunch of special treatment. Of particular note, glyphs are *not* capable of supporting screen-specific privates as they are global objects, not allocated on a screen-specific basis, and so each driver must be able to see their privates within the glyph. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit ed6daa15a7dcf8dba930f67401f4c1c8ca2e6fac Author: Ian Romanick Date: Wed Jul 4 15:21:09 2012 -0700 glx/dri2: Enable GLX_ARB_create_context_robustness If the driver supports __DRI2_ROBUSTNESS, then enable GLX_ARB_create_cotnext_robustness as well. If robustness values are passed to glXCreateContextAttribsARB and the driver doesn't support __DRI2_ROBUSTNESS, existing drivers will already generate the correct error values (so that the correct GLX errors are generated). Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 90aa2486e394c0344aceb2a70432761665a79333 Author: Ian Romanick Date: Wed Jul 4 15:21:08 2012 -0700 glx: Allow attributes and flags from GLX_ARB_create_context_robustness The assumtion is that if the underlying provider (e.g., glxdri2.c) doesn't support this extension, it will generate BadMatch for these flags and attributes. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit aef0b4593e165634ca7fa0745882dad12a54ebed Author: Ian Romanick Date: Wed Jul 4 15:21:07 2012 -0700 glx: Track the reset notification strategy for a context Also require that the reset notification for a new context and the other context in the share group match. There isn't yet any way to specify a non-default reset notification strategy, but that will come. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit f8198285cfc4704bc4d56922e5a2e99030a83778 Author: Ian Romanick Date: Wed Jul 4 15:21:06 2012 -0700 glx: Add extension string tracking for GLX_ARB_create_context_robustness Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 4ffbc984eac8a15925094614021de30dc8084e65 Author: Ian Romanick Date: Wed Jul 4 15:21:05 2012 -0700 glx: Reject creations of indirect contexts with unsupportable versions. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 41d5120eaf2bdf308eb904cac9b5027b003fea8d Author: Ian Romanick Date: Wed Jul 4 15:21:04 2012 -0700 glx: Implement GLX_EXT_create_context_es2_profile This patch builds on the infrastucture put in place for GLX_ARB_create_context_profile. If GLX_CONTEXT_ES2_PROFILE_BIT_EXT is specified and the requested version is 2.0, create a context with the __DRI_API_GLES2 API. This change assumes that any DRI2 driver can handle (possibly by saying "no seeing an API setting other than __DRI_API_OPENGL or __DRI_API_OPENGL_CORE. This allows enabling the extension any time GLX_ARB_create_context (and GLX_ARB_create_context_profile) is enabled. v2: Clean up some comments. Note that our behavior for GLX_CONTEXT_ES2_PROFILE_BIT_EXT w/version != 2.0 matches NVIDIA's. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit cef0b808d3152a20cd98d32457dde08bd5434e7c Author: Ian Romanick Date: Wed Jul 4 15:21:03 2012 -0700 glx: Implement GLX_ARB_create_context_profile Most of the infrastructure was already in place. This just adds: * Validate values specified with the GLX_CONTEXT_PROFILE_MASK_ARB attribute. * Select a DRI2 "api" based on the setting of GLX_CONTEXT_PROFILE_MASK_ARB. * Enable GLX_ARB_create_context_profile extension. This change assumes that any DRI2 driver can handle (possibly by saying "no") seeing an API setting other than __DRI_API_OPENGL. This allows enabling this extension any time GLX_ARB_create_context is enabled. Also, the validation code in __glXDisp_CreateContextAttribsARB is structured in a very verbose manner (using a switch-statement) to ease the addition of GLX_EXT_create_context_es2_profile. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 09a8a169d5929665778ae33e58e345fe1192b64c Author: Ian Romanick Date: Wed Jul 4 15:21:02 2012 -0700 glx: Implement GLX SetClientInfo2ARB protocol The protocol is almost identical to SetClientInfoARB. The only difference is the GL versions include an extra 4 bytes for the supported profile. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 167993254a5cbe11a1f44fad1e8ae042089c1619 Author: Peter Hutterer Date: Thu Jul 5 16:17:56 2012 +1000 list.h: don't crash when removing an element from a NULL list Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 8aa6d49d46dacc31a85023d0159c1fb67401df73 Author: Ian Romanick Date: Wed Jul 4 15:21:01 2012 -0700 glx: Don't request prototypes for GL extension functions The server does not want GL extension prototypes. It never links with anything that could possibly provide implementations of these functions. It *is* the provide, and it does not provde these symbols. All this does is create hundreds of warnings like: incude/GL/glext.h:5570:45: warning: redundant redeclaration of 'glMultTransposeMatrixd' [-Wredundant-decls] include/GL/gl.h:1940:45: note: previous declaration of 'glMultTransposeMatrixd' was here I believe this was necessary back before the AIGLX days, but that was a long, long time ago. The warnings recently showed up with the addition of -Wredundant-decls to the CWARNFLAGS. v2: Update the commit message, no code changes. Signed-off-by: Ian Romanick Cc: Adam Jackson Cc: Dave Airlie Acked-by: Keith Packard Signed-off-by: Keith Packard commit 258abbf823f753757e4dddc13ef495f4024680db Author: Michal Srb Date: Thu Jun 28 17:17:12 2012 +0200 Look for ModuleData only in appropriate library LoaderSymbol calls dlsym with RTLD_DEFAULT pseudo handle making it search in every loaded library. In addition glibc adds NODELETE flag to the library containing the symbol. It's used in doLoadModule to locate ModuleData symbol, the module's library gets the flag and is kept in memory even after it is unloaded. This patch adds LoaderSymbolFromModule function that looks for symbol only in library specified by handle. That way the NODELETE flag isn't added. This glibc behavior doesn't seem to be documented, but even if other implementations differ, there is no reason to search ModuleData symbol outside the module's library. Signed-off-by: Michal Srb Reviewed-by: Daniel Stone v2: Switch LoaderSymbolFromModule arguments order. Correct description. Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit d84f0f823eeeecdf0498aadd3fbb1d11dabc0837 Merge: 12bfb4cf1 d04dfe3f7 Author: Peter Hutterer Date: Wed Jul 4 21:23:48 2012 +1000 Merge branch 'sigio-vt-switch-issues' into for-keith Conflicts: test/Makefile.am Signed-off-by: Peter Hutterer commit 12bfb4cf1bebb66d2c2eb76b93c18a2915b865e5 Author: Peter Hutterer Date: Tue Jun 26 09:19:33 2012 +1000 Xi: extend PropagateMask to EMASKSIZE Number of devices is 2 + MAXDEVICES, with index 0 and 1 reserved for XIAll{Master}Devices. At the current size, PropagateMask would be overrun in RecalculateDeviceDeliverableEvents(). Found by Coverity. Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit a9c09f8f8e2a97e4bfe927bc4c7f29b04ee3403a Author: Peter Hutterer Date: Mon Jun 25 14:24:11 2012 +1000 dix: fix memory leak in TouchEventHistoryReplay Don't leak if ti->history is NULL. Found by coverity. Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 55ff20eb37f00a3ad07b5acff19d4497ab513a97 Author: Peter Hutterer Date: Mon Jun 25 14:22:31 2012 +1000 dix: fix dereference before null check Found by Coverity. Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit e3f47be9fbc489e3eb5832445924810b2ff300f7 Author: Peter Hutterer Date: Mon Oct 24 10:01:26 2011 +1000 xfree86: fix use-after-free issue in checkInput *dev is the condition of the while loop we're in, reset to NULL after freeing Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 252a69b592001b34714d0fe7508e1898883f9d01 Author: Peter Hutterer Date: Wed Jun 20 14:25:54 2012 +1000 xkb: use local variable instead of casting arg No functional changes. Signed-off-by: Peter Hutterer commit d04dfe3f754ad3a5f158057175cbd44319c1ae51 Author: Peter Hutterer Date: Fri Jun 22 15:18:53 2012 +1000 Drop custom sigio block/unblock functions from kdrive, ephyr and dmx Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 5d309af2ed93e91c7d72f548a11052051efbb40f Author: Peter Hutterer Date: Fri Jun 22 14:56:25 2012 +1000 xfree86: drop ddx-specific SIGIO blocking The hooks are left for this cycle, we can drop it next cycle once the drivers that need it (e.g. wacom) have been updated. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit ff67135bec3ecea8cebeb46b42ece0a6671e231d Author: Peter Hutterer Date: Fri Jun 22 13:09:35 2012 +1000 xfree86: use OsBlockSIGIO from the ddx We can ignore the "wasset" argument now since the DIX will keep proper refcounting. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 6bf356ef2831baeccd7a650ed3fde0831e33c6c0 Author: Peter Hutterer Date: Fri Jun 22 13:02:40 2012 +1000 os: add OsBlockSIGIO and OsReleaseSIGIO Let the dix be in charge of changing the sigprocmask so we only have one entity that changes it. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 24525d96a3b9dba67eb75042500b2f208a2cc246 Merge: 4cd91bd4c 35e3d2291 Author: Keith Packard Date: Mon Jul 2 22:35:39 2012 -0700 Merge branch 'sigsafe-logging-varargs' This merge includes a minor fixup for '%p' arguments; must cast to uintptr_t instead of uint64_t as we use -Werror=pointer-to-int-cast which complains when doing a cast (even explicitly) from a pointer to an integer of different size. commit 35e3d229150395a222a0f53318daf5dbeb8f6eb6 Author: Peter Hutterer Date: Thu May 24 14:04:42 2012 +1000 Bump to ABI_XINPUT_VERSION 18 The input ABI hasn't changed, but input drivers need something to hook on if they want to log from within signal handlers and the input ABI is the simplest way of doing so. Signed-off-by: Peter Hutterer commit 541934168dbeb17059542bb5a1da8eba7995fa05 Author: Peter Hutterer Date: Mon May 28 10:10:30 2012 +1000 xfree86: constify InputDriverPtr->driverName and default_options Already treated as const anyway by all drivers. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit c66089d2206bafc01307a8327ff6089edcb4ed2d Author: Peter Hutterer Date: Mon May 28 09:57:33 2012 +1000 xfree86: constify InputInfoPtr->type_name This corresponds to XListInputDevice(3)'s "type" field (after being converted to an Atom). Input drivers use the XI_KEYBOARD and similar defines, even Wacom which falls out of the common defines uses constant strings here. The use-case for having this non-const is small. Input ABI break technically, since we never freed this information anyway it is not a noticable change. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit 505c8a2b2cae0318db1148417ec850d54b38f7df Author: Chase Douglas Date: Mon Apr 9 09:41:38 2012 -0700 Log in OsVendorFatalError() in a signal safe manner The function can be called from a fatal signal handler. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d51aebdbf99a9f240f7c318a70ba40e61cd43049 Author: Chase Douglas Date: Mon Apr 9 08:30:50 2012 -0700 Log in LoaderUnload() in a signal safe manner The function may be called from a fatal signal handler. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c3e1168778ec20beeac9979dc57e36400c70dd63 Author: Chase Douglas Date: Mon Apr 9 08:28:17 2012 -0700 Log in UnloadModuleOrDriver() in a signal safe manner The function may be called from a fatal signal handler. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 89e3ac07aca1def155299aff6f7a57ccafb68fd7 Author: Chase Douglas Date: Mon Apr 9 08:23:32 2012 -0700 Log safely in fatal signal handler While we probably don't need to be signal safe here since we will never return to the normal context, the logging signal context check will cause unsafe logging to be unhandled. Using signal safe logging here resolves the issue. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 6fd5add005d0660b591d808583d1a6c6a85f1277 Author: Chase Douglas Date: Fri Apr 6 16:17:41 2012 -0700 Log mieq enqueue overflow in a signal safe manner Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7f4a69b628a6246855054a0b94d6d6dd14e8842c Author: Chase Douglas Date: Fri Apr 13 16:01:38 2012 -0700 Log messages in TouchBeginDDXTouch() in a signal-safe manner Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f752226e40890643df213a62f0c96e6a0243e754 Author: Chase Douglas Date: Fri Apr 6 10:21:14 2012 -0700 Log messages in GetTouchEvents() in a signal safe manner Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 82d1c6b310eaa5095eed9ee4ea958261a46a78e1 Author: Chase Douglas Date: Fri Apr 6 08:32:28 2012 -0700 Warn when attempting to log in a signal unsafe manner from signal context Also, print out the offending message format. This will hopefully help developers track down unsafe logging. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 512bec06be6c79ca263da9de8f40430b8095b57b Author: Chase Douglas Date: Mon Apr 16 09:47:42 2012 -0700 Make BUG_WARN* signal safe Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0fa5217836cf7fd3872fccc9f3ff9ff32426c25b Author: Chase Douglas Date: Fri Apr 6 16:09:05 2012 -0700 Print backtrace in a signal-safe manner Backtraces are often printed in signal context, such as when a segfault occurs. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer os: print offset as unsigned int, not long unsigned int pnprintf() takes unsigned int for %u Signed-off-by: Peter Hutterer commit ac20815d5235e7a8e7b331365aabf5a489fc5e34 Author: Chase Douglas Date: Tue Jun 5 15:39:41 2012 +1000 Add ErrorFSigSafe() alternative to ErrorF() ErrorF() is not signal safe. Use ErrorSigSafe() whenever an error message may be logged in signal context. [whot: edited to "ErrorFSigSafe"] Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 164b38c72fe9c69d13ea4f9c46d4ccc46566d826 Author: Chase Douglas Date: Fri Apr 6 08:28:40 2012 -0700 Add LogMessageVerbSigSafe() for logging messages while in signal context [whot: edited to use varargs, squashed commit below] Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer os: fix vararg length calculation Make %u and %x sizeof(unsigned int), %p sizeof(void*). This is printf behaviour and we can't guarantee that void* is uint64_t anyway. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4cd91bd4c6325b2e617ca90a725f02ac124c2372 Author: Alan Coopersmith Date: Sat May 12 10:11:33 2012 -0700 Enable no-undefined symbols mode in Solaris builds if -z parent is in ld The Solaris linker recently added a -z parent flag for easier checking of symbol definitions in plugins against the program that loads them. If that's present, this enables it, along with -z defs to error on undefined symbols to alert us if any modules call symbols that won't be found at runtime. This builds upon, and requires, the recent Cygwin work to build Xorg. It moves a couple more modules to be after the Xorg binary in the build order so that they can find the binary to check against, much as the Cygwin changes did (these would be modules built on Solaris but not Cygwin). v2: This version only sets the flags for the xorg-server build itself, and does not yet export them in xorg-server.pc to the drivers, since most of the drivers are not ready to build with -no-undefined yet. Signed-off-by: Alan Coopersmith Reviewed-by: Yaakov Selkowitz commit d31942e15c619e9355ef8183223f9165902a9d56 Author: Alan Coopersmith Date: Sat May 12 10:10:49 2012 -0700 Add pixman to module dependencies for pixman_region_* functions Signed-off-by: Alan Coopersmith Reviewed-by: Yaakov Selkowitz commit 339f38ef380d750c4c7afd60331a559845e4184e Author: Alan Coopersmith Date: Sat May 12 10:09:41 2012 -0700 Build tda9885.c functions into fi1236 to avoid libtool relinking problems Signed-off-by: Alan Coopersmith Reviewed-by: Yaakov Selkowitz commit a00066d2916b6910429cc1c7feedafbaee0d4750 Author: Alan Coopersmith Date: Thu Jun 28 15:15:53 2012 -0700 Add dixGetGlyphs to replace GetGlyphs from libXfont to simplify linking No other Xfont consumer used it, and this saves us from having to link callers against libXfont for one simple function when doing -no-undefined symbols builds. The function is given a new name to avoid clashing with existing libXfont binaries, but a #define is provided to preserve the API so we don't have to fix all the callers at the same time. Signed-off-by: Alan Coopersmith Reviewed-by: Yaakov Selkowitz commit 212b9803238d2de2e77cbe5de62d3f616ae50daf Author: Aaron Plattner Date: Fri Jun 29 13:33:58 2012 -0700 randr: Fix REQUEST vs. REQUEST_SIZE_MATCH mismatch ProcRRGetScreenSizeRange uses REQUEST(xRRGetScreenSizeRangeReq) followed by REQUEST_SIZE_MATCH(xRRGetScreenInfoReq). This happens to work out because both requests have the same size, so this is not a functional change, just a cosmetic one. Signed-off-by: Aaron Plattner Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 957bf959fb577b292a3e4f6bb67740ca09e7aeb9 Author: Dave Airlie Date: Wed Jun 27 14:36:04 2012 +0100 dix/render: consolidate window format matching code. This code existed in 3 different forms, perhaps it should be consolidated. Reviewed-by: Keith Packard Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit a7b97b0fa85d695ae19d194cfa3267159d149e5d Author: Christopher James Halse Rogers Date: Thu Jun 28 12:07:11 2012 +1000 dri2: Fix authentication for < v8 clients (v2). The legacy logic was embarassingly wrong; AuthMagic should return errno, so returning FALSE only when AuthMagic returns nonzero is exactly wrong. v2: Match drmAuthMagic by returning -EINVAL rather than EINVAL Fix trailing whitespace https://bugs.freedesktop.org/show_bug.cgi?id=51400 Signed-off-by: Christopher James Halse Rogers Tested-by: Chris Wilson Reviewed-by: Michel Dänzer Tested-by: Knut Petersen Signed-off-by: Keith Packard commit 8b4f0a4fdd6c15f49458bc3a8c3135b8c389240d Merge: 59294a217 d642e7128 Author: Keith Packard Date: Thu Jun 28 10:38:26 2012 -0700 Merge remote-tracking branch 'jturney/master' commit 59294a2179bd5bb996693af004b470932df00ac6 Merge: 855003c33 191b63065 Author: Keith Packard Date: Thu Jun 28 10:11:44 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 855003c333a0ead1db912695bc9705ef2b3144b4 Author: Keith Packard Date: Thu Jun 21 18:45:18 2012 -0700 randr: Catch two more potential unset rrScrPriv uses Ricardo Salveti found one place where the randr code could use the randr screen private data without checking for null first. This happens when the X server is running with multiple screens, some of which are randr enabled and some of which are not. Applications making protocol requests to the non-randr screens can cause segfaults where the server touches the unset private structure. I audited the code and found two more possible problem spots; the trick to auditing for this issue was to look for functions not taking a RandR data structure and where there was no null screen private check above them in the call graph. Signed-off-by: Keith Packard commit 32603f57ca03b6390b109960f8bb5ea53ac95ecb Author: Ricardo Salveti de Araujo Date: Thu Jun 21 00:55:53 2012 -0300 randr: first check pScrPriv before using the pointer at RRFirstOutput Fix a seg fault in case pScrPriv is NULL at ProcRRGetScreenInfo, which later calls RRFirstOutput. Signed-off-by: Ricardo Salveti de Araujo Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit cf196efa05bbefdeb43f6e6bcc5f6d9080fea715 Author: Dave Airlie Date: Fri Jun 22 15:24:43 2012 +0100 modesetting 0.4.0: bump configure.ac commit 30ab80ef5421fea9d9dd0779aa138892ff62bd6e Author: Dave Airlie Date: Fri Jun 22 15:26:28 2012 +0100 modesetting: pci probing requires interface version 1.4 Set the drm interface version to 1.4 so we get the bus id correctly. Signed-off-by: Dave Airlie commit d642e7128790ec6b709df8d1a91333ab87598077 Author: Yaakov Selkowitz Date: Thu Jun 21 20:01:49 2012 +0100 configure.ac: link XWIN with GLX_SYS_LIBS Link XWIN with GLX_SYS_LIBS, just like all the other DDXs Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9f1edced9abc066f0ba47672d006fe50fb206371 Author: Peter Hutterer Date: Fri Jun 15 10:00:51 2012 +1000 xfree86: always enable SIGIO on OsVendorInit (#50957) Drivers call xf86InstallSIGIOHandler() for their fd on DEVICE_ON. That function does not actually enable the signal if it was blocked to begin with. As a result, if one vt-switches away from the server (SIGIO is blocked) and then triggers a server regeneration, the signal remains blocked and input devices are dead. Avoid this by always unblocking SIGIO when we start the server. X.Org Bug 50957 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 4ba340cfaa8d430c808566495f8deda0ff1b4424 Author: Keith Packard Date: Thu Jun 21 18:42:46 2012 -0700 randr: Clean up compiler warnings about unused and shadowing variables set but not used variables shadowing a previous local A hidden problem was that the VERIFY_RR_* macros define local 'rc' variables, any other local definitions for those would be shadowed and generate warnings from gcc. I've renamed the other locals 'ret' instead of 'rc'. Signed-off-by: Keith Packard commit 191b630656ba206ad78b7803c3a76f7d9567d9d8 Author: Peter Hutterer Date: Thu Jun 21 11:25:24 2012 +1000 include: document _XkbErrCode2 macros Why sending the number of the (implementation-dependent) error statement to the client is a good idea is a bit beyond me, but at least document it so we can all share the despair. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 7100118c8d3314d73bfef0a262af56686b227055 Author: Peter Hutterer Date: Mon Jun 18 11:28:52 2012 +1000 AC_SUBST the GLX_SYS_LIBS libxservertest needs -lpthread from glxapi.c's pthread_once() call. Usually this would be pulled in by the XORG_LIBS but not when building without Xorg. This commit has no visible effect on the current tree, preparation for test cleanups. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 014ad46f1b353a95e2c4289443ee857cfbabb3ae Author: Peter Hutterer Date: Thu Jun 21 14:26:15 2012 +1000 os: print newline after printing display name Much easier for scripts that try to read the display value off the file descriptor. Plus, this restores the behaviour we had for this patch in Fedora since server 1.6 (April 2009). Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie Reviewed-by: Chase Douglas commit e1f86a7c77ed49e001ea42ef76ab83e87dbdf126 Author: Sergei Trofimovich Date: Mon Jun 18 01:13:21 2012 +0300 test/.gitignore: add hashtabletest Signed-off-by: Sergei Trofimovich Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c9bbf8fe574591c8e191eeef20f8994781718772 Author: Jon TURNEY Date: Thu Jun 21 19:38:55 2012 +0100 hw/xwin/glx: Fix glxWinCreateContext() function pointer mismatch Fix glxWinCreateContext() function signature to align with commit 96d74138 "glx: Extend __GLXscreen::createContext to take attributes", which added more parameters to the screen createContext function for implementing GLX_ARB_create_context indirect.c: In function 'glxWinScreenProbe': indirect.c:683:36: warning: assignment from incompatible pointer type Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 6e85660c7503c7e88e24003562444dffde6c88ff Author: Jon TURNEY Date: Mon Mar 5 23:07:56 2012 +0000 hw/xwin/glx: Update gen_gl_wrappers.py for the current glx/dispatch.h Fix the code generator for the dispatch table initialization after the whitespace/coding style changes to glx/dispatch.h Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit cb638ed9c81f07d8603b07db395e31a41fed8685 Author: Jon TURNEY Date: Thu Jun 21 18:55:57 2012 +0100 hw/xwin/glx: Blacklist 'GDI generic' GL renderer If the native GL renderer is the GDI generic renderer (as can happen if we are in safe mode, or the video driver is VGA, or we have hybrid graphics which hasn't noticed that xwin requires 3d acceleration), don't use it. It's not accelerated and we will probably get better conformance and perfomance from swrast. Fix so we don't install screen function wrappers in glxWinScreenProbe unless we are succesful. Also, move fbConfig dumping to after GLX version has been determined from extensions Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 8c24d20933ba9c2ef0e9a81815c3be23fa896aea Author: Jon TURNEY Date: Thu Jun 21 18:05:24 2012 +0100 hw/xwin/glx: Fix glxLogExtensions to handle a null string without crashing Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c08c7c8f655d7721c1e02bfeeb965b6379f72553 Author: Jon TURNEY Date: Fri Jun 24 13:32:10 2011 +0100 hw/xwin/glx: Create a new dispatch table rather than modifying the existing one Create a new dispatch table rather than modifying the existing one struct _glapi_table is not a complete type after including glapi.h, so we use glapi_get_dispatch_table_size() to determine it's size (alternatively, we could include glapitable.h, to complete the type) This could possibly be written to use _glapi_create_table_from_handle() instead, but that requires making all the wrapper functions exports Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3ef3ce069d52dcfa932c90ccd30854a8d9daa15a Merge: a0c8716cd ff541e0a1 Author: Keith Packard Date: Thu Jun 21 08:52:34 2012 -0700 Merge remote-tracking branch 'alanc/master' commit 704b847abfd29e9adde27127a15a963414f8bcf4 Author: Chase Douglas Date: Fri Apr 6 10:13:45 2012 -0700 Add FormatUInt64{,Hex}() for formatting numbers in a signal safe manner Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit bc85c81687a24aea738094ff11f4448fb3b3afbb Author: Chase Douglas Date: Fri Apr 6 08:03:09 2012 -0700 Save log file file descriptor for signal context logging None of the FILE based functions are signal safe, including fileno(), so we need to save the file descriptor for when we are in signal context. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d3725549f0276487fba1d419094209d18e86669f Author: Chase Douglas Date: Fri Apr 6 07:43:57 2012 -0700 Add global variable inSignalContext This will be used for checking for proper logging when in signal context. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit a0c8716cdca139059e7aec8a3cb75726dd37a4a1 Author: Peter Hutterer Date: Thu Jun 21 13:45:06 2012 +1000 kdrive: adjust BlockHandler/WakeupHandler to new API Missing API update caused Xephyr to crash on startup, garbage memory dereference when accessing timeout. Introduced in 1f0e8bd5eb1a5539689cfc4f5a6b86b530907ec5 kdrive.c:868:27: warning: assignment from incompatible pointer type kdrive.c:869:28: warning: assignment from incompatible pointer type Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit ff541e0a1f84bd98966148793f35afeaf71c271b Author: Alan Coopersmith Date: Wed Jun 13 21:20:51 2012 -0700 Remove obsolete tab stop comments from hw/xfree86/parser/*.c Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 687536b1044a3297f6b9a45f6a2d2987daa7be59 Author: Alan Coopersmith Date: Tue Jun 12 22:38:46 2012 -0700 Fix some overly indented/poorly line wrapped comments in dix/events.c Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Keith Packard commit 93a378aad4a4a03f37ddafccfedeb9d6e2be2a6a Author: Alan Coopersmith Date: Tue Jun 12 22:29:51 2012 -0700 OtherClientGone: Remove unreachable return statement Now that FatalError is marked as _X_NORETURN, the compilers know we can't get here, and the return statement added to make them happy in the past now makes them unhappy. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Keith Packard commit 3f97284b10c250457888902debd4d793cb4544d4 Author: Christopher James Halse Rogers Date: Wed Jun 20 13:53:53 2012 +1000 dri2: Pass a ScreenPtr through to the driver's AuthMagic function. (v3) xwayland drivers need access to their screen private data to authenticate. Now that drivers no longer have direct access to the global screen arrays, this needs to be passed in as function context. v2: Don't break ABI v3: Paint the bikeshed blue; drop fd from AuthMagic2ProcPtr prototype Signed-off-by: Christopher James Halse Rogers Reviewed-by: Kristian Høgsberg Signed-off-by: Keith Packard commit dae317e7265007b38012244722e3b3a06e904ed5 Author: Andy Ritger Date: Thu Jun 14 09:15:37 2012 -0700 randr: Don't recurse into mieqProcessInputEvents() from RRTellChanged(). Call UpdateCurrentTimeIf(), not UpdateCurrentTime(), from RRTellChanged(). The latter calls ProcessInputEvents(), which can trigger a recursion into mieqProcessInputEvents(). The former omits the call to ProcessInputEvents(). Signed-off-by: Andy Ritger Reviewed-by: Jeremy Huddleston Signed-off-by: Keith Packard commit 54476b5e4461ff523e935961affabcf0de12c556 Author: Peter Hutterer Date: Thu Jun 7 16:52:20 2012 +1000 dix: if the scroll valuator reaches INT_MAX, reset to 0 Too much scrolling down may eventually trigger an overflow of the valuator. If this happens, reset the valuator to 0 and skip this event for button emulation. Clients will have to figure out a way to deal with this, but a scroll event from (close to) INT_MAX to 0 is a hint of that it needs to be ignored. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 8dc70acbf3d82611ac9ec1ec2a52edcc01934850 Merge: ffb47a123 b59adc9c2 Author: Keith Packard Date: Thu Jun 14 13:04:29 2012 -0700 Merge remote-tracking branch 'alanc/master' commit ffb47a123ddd1233fb4229cf23483652065c5e82 Merge: db9d2b8a5 b840ba5f5 Author: Keith Packard Date: Thu Jun 14 13:01:17 2012 -0700 Merge remote-tracking branch 'idr/GLX_ARB_create_context' commit db9d2b8a508ab812e5c717a41310faad81879b09 Author: Dave Airlie Date: Thu Jun 7 15:01:59 2012 +0100 xserver: fix build on arm tinderbox Rob Clark got an ARM tinderbox up and running, and this code is built there but not here, this should fix it, though I hope that code never gets executed. Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit 6d86b64dbaef5a16712fd1fdc3157f716d238877 Merge: 812786f4d 4c68f5d39 Author: Keith Packard Date: Thu Jun 14 11:05:22 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit b59adc9c2427e5efac3513c20992723e23f92691 Author: Alan Coopersmith Date: Thu Jun 7 20:58:01 2012 -0700 Make stub version of fbdevHWAdjustFrame match new prototype in fbdevhw.h Removed flags argument to match api rework in commit 1f0e8bd5eb1a55 Signed-off-by: Alan Coopersmith Reviewed-by: Dave Airlie commit 4c68f5d395c66f28b56e488cb3cd12f36820357b Author: Peter Hutterer Date: Wed May 9 09:21:28 2012 +1000 dix: disable all devices before shutdown f3410b97cf9b48a47bee3d15d232f8a88e75f4ef introduced a regression on server shutdown. If any button or key was held on shutdown (ctrl, alt, backspace are usually still down) sending a raw event will segfault the server. The the root windows are set to NULL before calling CloseDownDevices(). Avoid this by disabling all devices first when shutting down. Disabled devices won't send events anymore. Master keyboards must be disabled first, otherwise disabling the pointer will trigger DisableDevice(keyboard) and the keyboard is removed from the inputInfo.devices list and moved to inputInfo.off_devices. A regular loop through inputInfo.devices would thus jump to off_devices and not recover. Signed-off-by: Peter Hutterer Acked-by: Chase Douglas Reviewed-by: Chase Douglas commit 9c0e820216cd1631f75b037b7908d55ac091692c Author: Peter Hutterer Date: Thu May 10 12:55:44 2012 +1000 Xi: drop forced unpairing when changing the hierarchy Devices are unpaired as needed on DisableDevice now. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e433d1046c222f9d969c2c28a4651ff9097614f4 Author: Peter Hutterer Date: Thu May 10 12:42:59 2012 +1000 dix: disable non-sprite-owners first when disabling paired devices If a sprite-owner is to be disabled but still paired, disable the paired device first. i.e. disabling a master pointer will disable the master keyboard first. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit df1704365e700d3cf1d36a241bdfc479159a8df7 Author: Peter Hutterer Date: Thu May 10 15:33:15 2012 +1000 dix: free the sprite when disabling the device Disabled devices don't need sprites (they can't send events anyway) and the device init process is currently geared to check for whether sprite is present to check if the device should be paired/attached. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e57d6a89027c55fef987cdc259668c48a8b4ea1b Author: Peter Hutterer Date: Thu May 10 15:32:20 2012 +1000 dix: move freeing the sprite into a function Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 46adcefb0e08515195d8e49985a4e210395700b3 Author: Peter Hutterer Date: Thu May 10 12:10:12 2012 +1000 dix: return early from DisableDevice if the device is already disabled Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 076f9d3a6660fa7fef4ae9decaffd2feebdd32c4 Author: Peter Hutterer Date: Thu May 10 12:20:37 2012 +1000 dix: drop client argument from PairDevices - unused This is a leftover from early MPX days where any keyboard could be paired with any pointer (before the device hierarchy). Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit d034605f3914e41e0d636eafff9278be1c041b2c Author: Peter Hutterer Date: Thu May 10 14:13:20 2012 +1000 dix: rename shadowing loop variable in TouchResizeQueue second 'i' shadows the function-wide one, rename to 'j' Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit a86f3ef511db16be5ddc723bf14e770dad23ee45 Author: Peter Hutterer Date: Thu May 10 11:55:21 2012 +1000 dix: change "still paired warning" to use BUG_RETURN_VAL Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4bcf43919a14cd2cd20af4099cd213ce25792edb Author: Peter Hutterer Date: Thu May 10 15:32:47 2012 +1000 dix: use BUG_RETURN_VAL for pairing errors Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Alan Coopersmith commit 642569fc79a1814acca1c8f529539b054bf36907 Author: Peter Hutterer Date: Thu May 10 12:11:57 2012 +1000 Replace a few BUG_WARN with BUG_RETURN_VAL Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 11ecfb8884b7c4def0863a57868a6b9fa1b63ae5 Author: Peter Hutterer Date: Thu May 10 11:48:05 2012 +1000 include: add BUG_RETURN_* macros Helper functions to avoid things like if (foo) { BUG_WARN(foo); return 1; } Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Alan Coopersmith commit ff41753b1bee414b16c0f1e8d183776e87c94065 Author: Peter Hutterer Date: Wed Jun 6 14:38:49 2012 +1000 xkb: warn if XKB SlowKeys have been automatically enabled Slow keys are enabled when the XKB AccessX features are generally enabled (ctrls->enabled_ctrls & XkbAccessXKeysMask) and either shift key is held for 8 seconds. For the unsuspecting user this appears as if the keyboard suddenly stops working. Print a warning to the log, so we can later tell them "told you so". Signed-off-by: Peter Hutterer Reviewed-by: Dan Nicholson commit f20a532ba3c7b7d74530f3906c7bacf016bb8faf Author: Alan Coopersmith Date: Sun May 20 00:00:59 2012 -0700 Fix statement not reached warning in _DMXXineramaActive Signed-off-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 1be317c4e5d99d11a124ad4e7a90a5dcae591e20 Author: Alan Coopersmith Date: Wed May 23 19:27:23 2012 -0700 Provide prototypes for Mmio functions for Solaris Studio on SPARC Actual inline implementations are provided via external *.il files generated from *.S files in hw/xfree86/os-support/solaris Fixes missing prototype warnings that xorg-macros has recently elevated to build-breaking errors. Signed-off-by: Alan Coopersmith Signed-off-by: Henry Zhao Reviewed-by: Dave Airlie commit 812786f4d4306cb16f8ed57fa4a1a32bb1d13fe3 Author: Dave Airlie Date: Tue Jun 5 19:55:52 2012 +0100 xwin: fixup block/wakeup handlers These got missed out in the api changeover. Reported-by: Colin Harrison Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit 3cbaf621782fb5f5679acf9104571d3ae2b48b72 Author: Dave Airlie Date: Tue Jun 5 17:54:02 2012 +0100 xfree86: fix new warnings introduced in rebase. Spotted these in tinderbox: xf86xv.c: In function 'xf86XVScreenInit': xf86xv.c:282: warning: assignment from incompatible pointer type xf86xv.c: In function 'xf86XVCloseScreen': xf86xv.c:1275: warning: assignment from incompatible pointer type xf86xv.c: In function 'xf86XVAdjustFrame': xf86xv.c:1366: warning: assignment from incompatible pointer type Missed removing one flags. Signed-off-by: Dave Airlie Tested-by: Keith Packard Signed-off-by: Keith Packard commit ec79187d9a23ba30eafc7ba225049559e6bcb78d Author: Dave Airlie Date: Tue Jun 5 14:41:18 2012 +0100 modesetting: workaround kernel bug reporting 0x0 as valid mins It reports these but then you can't create a 0 sized bo. Signed-off-by: Dave Airlie commit 1f0e8bd5eb1a5539689cfc4f5a6b86b530907ec5 Author: Dave Airlie Date: Tue Jun 5 13:22:18 2012 +0100 api: rework the X server driver API to avoid global arrays. This is a squash merge containing all the API changes, as well as the video ABI bump. Its been squashed to make bisection easier. Full patch log below: commit b202738bbf0c5a1c1172767119c2c71f1e7f8070 Author: Aaron Plattner Date: Mon May 14 15:16:11 2012 -0700 xfree86: Bump video ABI to 13.0 The ABI was broken by changes to convert from screen index numbers to ScreenPtr / ScrnInfoPtr in various structures and function signatures. Signed-off-by: Aaron Plattner Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 3d5f7d9f8d408bcad3f83277d255f25d3b0edbf3 Author: Dave Airlie Date: Thu May 24 10:56:57 2012 +0100 xf86: xf86ClearEntityListForScreen should take a pScrn When adding GPU screens this make life easier. (also fix comment, as pointed out by Alan) Reviewed-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit afee8b5ab4501597ecc1ade34124d7ca227ab055 Author: Dave Airlie Date: Thu May 24 07:07:32 2012 +0100 xf86i2c: add pscrn for drivers to use This just adds a pScrn pointer into the struct for the drivers to use instead of scrnIndex. Mostly scrnIndex is used for logging, but some drivers use it to lookup xf86Screens, so let them stash a pScrn instead. Removing the scrnIndex is a bit more involved and I'm not sure its worth the effort. Doing i2c in the X server is legacy code as far as I'm concerned. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit ea5092f1f679691d187f1eee9427e6057beec56e Author: Dave Airlie Date: Wed May 23 19:25:20 2012 +0100 dix/gc: consolidate GC object creation in one place The standard GC create and scratch GC create were 90% the same really, and I have a need in the future for creating GC objects without the other bits, so wanted to avoid a third copy. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 3d91482ea9b4883e64e496f2768168e0ffa21ba1 Author: Dave Airlie Date: Wed May 23 10:24:06 2012 +0100 xf86: add a define to denote the new non-index interfaces are being used This can be used by drivers to provide compatible APIs. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 37c3ae3e6cd4f3dedc72f371096d6743f8f99df3 Author: Dave Airlie Date: Wed May 23 15:09:12 2012 +0100 dix: make Create/Free scratch pixmaps take a ScreenPtr While technically an API/ABI change I doubt anyone uses it, but it helps in splitting screens up. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 75f2062a3fe94f04764ecc7d2ff2fbbeccb9da60 Author: Dave Airlie Date: Wed May 23 14:57:55 2012 +0100 xf86/xv: remove scrnIndexfrom xf86FindXvOptions. Move this interface to taking an ScrnInfoPtr. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit f80c2374f40ea7b2ee0556e2e76cc07406f3d843 Author: Dave Airlie Date: Wed May 23 14:53:59 2012 +0100 xf86: make xf86DeleteScreen take a ScrnInfoPtr (v2) stop passing indices into this function. v2: drop flags argument. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 58824e414f35682435f15bfe6c4b656bd90b9235 Author: Dave Airlie Date: Wed May 23 14:48:09 2012 +0100 xf86: fix xf86IsScreenPrimary interface to take a pScrn (API/ABI) Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 6b4fc1f9d391bcdf7ca288766e49bce60f4635cd Author: Dave Airlie Date: Tue Apr 10 14:18:59 2012 +0100 xserver: convert block/wakeup handlers to passing ScreenPtr (ABI/API) (v2) Instead of passing an index, pass the actual ScreenPtr. This allows more moving towards not abusing xf86Screens + screenInfo. v2: drop the blockData/wakeupData args as per ajax's suggestion., fix docs. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 790d003de20fb47674420a24dadd92412d78620d Author: Dave Airlie Date: Wed Apr 11 09:53:14 2012 +0100 xf86/common: remove some more pScrn->pScreen uses remove some more conversions that appeared after api cleanups. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit aac85e18d1dd093f2cad6bd29375e40bd7af0b8f Author: Dave Airlie Date: Tue Apr 10 16:34:53 2012 +0100 ddc: change API to take ScrnInfoPtr (v2) This removes all xf86Screens usage from ddc code, it modifies the API for some functions to avoid taking indices. v2: address Alan's comments about dropping DDC2Init parameter. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit fe3f57b6eaf6860a33876a54f9439f69578f03a5 Author: Dave Airlie Date: Tue Apr 10 16:31:26 2012 +0100 vbe: don't use index for VBEInterpretPanelID (API) Remove use of xf86screens from vbe module. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit abf1965f4ed91529036d3fdb470d6a3ce6f29675 Author: Dave Airlie Date: Tue Apr 10 16:25:11 2012 +0100 int10/vbe: don't use xf86Screens. (ABI) (v3) Pass the ScrnInfoPtr instead of the index in the int10 struct. This saves us using it to dereference xf86Screens. v2: address Alan's comment to fix struct alignment. v3: squash in all the int10 fixes, test the vm86 code builds, after comments by Keith. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 23cca612b4fb5efc33683c7624b803b457387e3d Author: Dave Airlie Date: Tue Apr 10 15:30:18 2012 +0100 xserver: drop index argument to ScreenInit (ABI/API) (v2) This drops the index argument, its the same as pScreen->myNum, and its the last major index abuse I can find. v2: address Alan's review - update docs, fix xwin/xnest/darwin Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 40d360e2d7e832407f3ed64e3a02c27ecc89a960 Author: Dave Airlie Date: Tue Apr 10 15:23:01 2012 +0100 xf86: migrate PointerMoved from index to ScrnInfoPtr (ABI/API) This migrates PointerMoved from an index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit aa60a2f38679d0eeb979a9c2648c9bc771409bf9 Author: Dave Airlie Date: Tue Apr 10 15:20:46 2012 +0100 xf86: migrate PMEvent to a ScrnInfoPtr (ABI/API) This migrates the PMEvent from index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit d3f28ef44371ed4a039ffc5dd7eb6408d1269ba2 Author: Dave Airlie Date: Tue Apr 10 15:18:30 2012 +0100 xf86: migrate SetDGAMode from index to ScrnInfoPtr (ABI/API) This migrates the SetDGAMode callback from an index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit baf5e4818a74f2b68c3dfdcc56f54322351039a0 Author: Dave Airlie Date: Tue Apr 10 15:14:11 2012 +0100 xf86: migrate ChangeGamma from index to ScrnInfoPtr (ABI/API) (v2) This migrates the ChangeGamma interface to avoid passing a index. v2: fix xf86RandR12.c + xf86cmap.c call Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 51e5f90ada929d6b23176090badbb42fdb3fa550 Author: Dave Airlie Date: Tue Apr 10 15:11:09 2012 +0100 xf86/exa: migrate index to screen types for EnableDisableFBAccess (ABI/API) The EXA interface migrates to ScreenPtr, and the xf86 interface migrated to ScrnInfoPtr. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 94f1f21d17e86f96d4a54292a399160950087675 Author: Dave Airlie Date: Tue Apr 10 15:02:11 2012 +0100 xf86: migrate ValidMode callback to ScrnInfoPtr (ABI/API) This migrates the ValidMode to passing a ScrnInfoPtr instead of an index. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 3f8f18198fed4f39ec805b508a3482e91eea26b2 Author: Dave Airlie Date: Tue Apr 10 14:59:46 2012 +0100 xf86: migrate SwitchMode to taking ScrnInfoPtr (ABI/API) (v2) This migrate the SwitchMode interface to take a ScrnInfoPtr instead of an index. v2: drop flags. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit d06a038a5c49328ab3a8d969d24f9fcd22c63202 Author: Dave Airlie Date: Tue Apr 10 14:50:37 2012 +0100 xf86: move AdjustFrame to passing ScrnInfoPtr (ABI/API) (v2) This converts AdjustFrame code paths to passing a ScrnInfoPtr instead of an integer index. v2: drop flags args. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 53d2f8608ffd4090d08e7d5cf2e92fb954959b90 Author: Dave Airlie Date: Tue Apr 10 14:41:27 2012 +0100 xf86: modify FreeScreen callback to take pScrn instead of index. (ABI/API) (v2) Another index->pScrn conversion. v2: drop flags arg. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 60db37c0b247052e0f5c54b1921fe58a3609c2e3 Author: Dave Airlie Date: Tue Apr 10 14:35:41 2012 +0100 xf86: change EnterVT/LeaveVT to take a ScrnInfoPtr (ABI/API break) (v2) This modifies the EnterVT/LeaveVT interfaces to take a ScrnInfoPtr instead of an index into xf86Screens. This allows dropping more public dereferences of the xf86Screens and screenInfo. v2: drop flags args as suggested by Keith, fix docs. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 06729dbbc804a20242e6499f446acb5d94023c3c Author: Dave Airlie Date: Tue Apr 10 14:04:59 2012 +0100 xserver: remove index from CloseScreen (API/ABI breakage) This drops the index from the CloseScreen callback, its always been useless really, since the pScreen contains it. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 12f9aaff38ac2cf528387ce610e41fbd448698e2 Author: Chase Douglas Date: Fri Apr 6 12:44:07 2012 -0700 test/touch: Initialize device name Without this change, the test will segfault when we switch to signal- safe logging. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 3476eb38063473a7a5fcd78e2095e284118de839 Merge: 78f0d9cdc 42ae2e819 Author: Keith Packard Date: Sun Jun 3 20:24:24 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 42ae2e8199fe875319978249963de7499607988b Author: Siddhesh Poyarekar Date: Tue May 29 10:17:50 2012 +0530 xkb: Allocate size_syms correctly when width of a type increases The current code seems to skip syms with width less than type->num_levels when calculating the total size for the new size_syms. This leads to less space being allocated than necessary during the next phase, which is to copy over the syms to the new location. This results in an overflow leading to a crash. Signed-off-by: Siddhesh Poyarekar Signed-off-by: Peter Hutterer commit 88c767edb01ed7efb19ffe3a453e16107b27130b Author: Michal Suchanek Date: Wed May 23 11:22:05 2012 +0200 Fix crash for motion events from devices without valuators A WarpPointer request may trigger a motion event on a device without valuators. That request is ignored by GetPointerEvents but during smooth scroll emulation we dereference dev->valuators to get the number of axes. Break out early if the device doesn't have valuators. Signed-off-by: Michal Suchanek Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit e07c945ab992b1b1acdd9f5554e0688f744e4769 Author: Dave Airlie Date: Fri Jun 1 12:34:42 2012 +0100 modesetting: bump to latest X server compat api. Signed-off-by: Dave Airlie commit 78f0d9cdc441a575e15e5f7200ce74750d2f7ad2 Author: Chad Versace Date: Wed May 2 16:18:49 2012 -0700 dri2: Add DRI2GetParam request (v2) Bump dri2proto dependency to 2.7. Bump DRI2INFOREC_VERSION to 7. This new protocol request effectively allows clients to perform feature detection on the DDX. The request was added in DRI2 protocol 1.4. If I had DRI2GetParam in June 2011, when I was implementing support in the Intel DDX and Mesa for new hardware that required a new DRI2 attachment format, then I could have avoided a week of pain caused by the necessity to write a horrid feature detection hack [1] in Mesa. In the future, when the work begins to add MSAA support to the Intel DDX, having a clean way to do feature detection will allow us to avoid revisiting and expanding that hack. [1] mesa, commit aea2236a, function intel_verify_dri2_has_hiz v2: If driver doesn't define ds->GetParam, dont' crash. Fall back to default behavior, per keithp. Reviewed-by: Keith Packard Reviewed-by: Eric Anholt (v1) Reviewed-by: Ian Romanick (v1) Signed-off-by: Chad Versace commit 594b4a4f0601066d09e49a84c5af8c2eb6f07240 Author: Peter Hutterer Date: Thu May 24 13:34:11 2012 +1000 Xext: include dix-config.h silences In file included from ../include/misc.h:111:0, from hashtable.c:2: ./include/os.h:559:1: warning: redundant redeclaration of 'strndup' [-Wredundant-decls] Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit d348ab06aae21c153ecbc3511aeafc8ab66d8303 Author: Julien Cristau Date: Fri May 11 21:31:50 2012 +0200 Xvfb: destroy the screen pixmap in CloseScreen Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit e4153c1d9138ed40de1c615525066a0f5bb599dc Author: Julien Cristau Date: Fri May 11 21:31:49 2012 +0200 Xi: make stub DeleteInputDeviceRequest call RemoveDevice DeleteInputDeviceRequest is called from CloseDownDevices on reset, so call RemoveDevice to avoid leaking devices in Xvfb/Xnest/Xwin. Signed-off-by: Julien Cristau Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit b840ba5f54de5b00a7700ca49e51308b8cc66f92 Author: Ian Romanick Date: Fri Dec 16 14:44:55 2011 -0800 glx: Implement protocol for glXCreateContextAttribsARB Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Reviewed-by: Christopher James Halse Rogers commit 23612a63fc12be13442a63193a19f883d7a87e5d Author: Ian Romanick Date: Fri Dec 16 14:42:51 2011 -0800 glx: Make several functions available outside the glxcmds.c compilation unit validGlxScreen, validGlxFBConfig, validGlxContext, and __glXdirectContextCreate will soon be used by createcontext.c. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Reviewed-by: Christopher James Halse Rogers commit cd5689cac5ed722e9dc1a3fab9a260b798062ee6 Author: Ian Romanick Date: Sat Dec 10 15:15:18 2011 -0800 glx: Use one function to add a context to all global tables Instead of having separate __glXAddContextToList and AddResource functions, just have one function that does both steps. Signed-off-by: Ian Romanick Reviewed-by: Jesse Barnes Reviewed-by: Christopher James Halse Rogers commit c1d91ab37025d3e0df7e8f647fb21816fe0e8420 Author: Ian Romanick Date: Sat Dec 10 15:11:57 2011 -0800 glx: Initialize remaining context fields There is no reason to assume the screen's context allocated initialized these fields, so don't. Signed-off-by: Ian Romanick Reviewed-by: Jesse Barnes Reviewed-by: Christopher James Halse Rogers commit 0db76e5f771fb964e67de716a254850a38e02f19 Author: Ian Romanick Date: Sat Dec 10 15:09:57 2011 -0800 glx: Initialize all context fields together v2: Fix whitespace error noticed by Christopher James Halse Rogers. Signed-off-by: Ian Romanick Reviewed-by: Jesse Barnes Reviewed-by: Christopher James Halse Rogers commit befa76d251eb5de85edb621056eed52784722bc7 Author: Ian Romanick Date: Fri Dec 9 17:28:21 2011 -0800 glx: Implement GLX SetClientInfoARB protocol v2: Bump glproto version to 1.4.15. This patch uses structure names that only exist in that glproto version and later. Noticed by Christopher James Halse Rogers. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Reviewed-by: Christopher James Halse Rogers commit 8b8cd6f6f4dbf9d058ace638221f31801da7df9f Author: Ian Romanick Date: Mon Dec 5 13:52:01 2011 -0800 glx: Optionally call DRI2 createContextAttribs from __glXDRIscreenCreateContext Signed-off-by: Ian Romanick Reviewed-by: Christopher James Halse Rogers commit 0a9226376c9a44c3b50baad25f2b7d2b9fecb708 Author: Ian Romanick Date: Mon Dec 5 13:48:19 2011 -0800 glx: Add tracking for GLX_ARB_create_context and GLX_ARB_create_context_profile The formatting of the extension data table was mangled by indent. This patch also undoes that and adds approripate control comments so that indent won't do it again. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Reviewed-by: Christopher James Halse Rogers commit 96d74138b1c0273e88933220d99a893858b649cd Author: Ian Romanick Date: Mon Dec 5 10:56:07 2011 -0800 glx: Extend __GLXscreen::createContext to take attributes The attributes will be used for glXCreateContextAttribsARB additions in follow-on patches. v2: Add missing 'int *error' parameters noticed by Christopher James Halse Rogers. v3: Remove redundant 'int err;' declaration noticed by Christopher James Halse Rogers. This was supposed to be in v2, but I missed it. v4: Add comma missing from additions in v2. Ugh. Signed-off-by: Ian Romanick Reviewed-by: Jesse Barnes Reviewed-by: Christopher James Halse Rogers commit 62f06b0dcde13cb87bc3d0c5ff86d8db7e3ff0ef Author: Ian Romanick Date: Fri Dec 2 21:14:46 2011 -0800 glx: Don't track GLClientmajorVersion or GLClientminorVersion Nothing uses these fields anywhere in the server. Signed-off-by: Ian Romanick Reviewed-by: Jesse Barnes Reviewed-by: Christopher James Halse Rogers commit 724176a87afdb9a79ce6307214bc2e869530aef3 Author: Ian Romanick Date: Mon Dec 5 10:55:20 2011 -0800 glx: Fix mishandling of shared contexts Signed-off-by: Ian Romanick Reviewed-by: Eric Anholt Reviewed-by: Christopher James Halse Rogers commit 1c01090f6485cb82c2511fb461e66ff15a097358 Author: Dave Airlie Date: Wed May 23 11:31:39 2012 +0100 modesetting: fix make distcheck add missing compat header file. Signed-off-by: Dave Airlie commit ef47a1b3bfec33d4031af2e01bdd46d634be2f51 Author: Dave Airlie Date: Wed May 23 11:21:55 2012 +0100 modesetting: convert to new scrn conversion APIs. Generated with util/modular/x-driver-screen-scrn-conv.sh Signed-off-by: Dave Airlie commit 3e46d578d8c40c95343278db0a66c931e85247c7 Author: Dave Airlie Date: Wed May 23 11:21:39 2012 +0100 modesetting: add compat header file Signed-off-by: Dave Airlie commit 2d4fda4b09e67e47d3e6fc4743fc6e81bfe40f28 Author: Marcin Slusarz Date: Mon May 21 21:39:43 2012 +0200 xfree86: fix mouse wheel support for DGA clients xf86-input-evdev (since "smooth scrolling" support was added) can send mouse motion and wheel events in one batch, so we need to handle it properly. Otherwise mouse wheel events which come with motion events are lost and separate mouse wheel events are handled through non-DGA path. Signed-off-by: Marcin Slusarz Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9bc53d8cb04af2be3feeebb1b10774c2d599a76b Author: Michal Srb Date: Tue May 22 21:19:40 2012 -0700 dri2: SProcDRI2Connect - send the response. The swapped implementation of DRI2Connect is always responding with empty device and driver values. However the response was only prepared and never sent (also had undefined .type member), causing e.g. glxinfo get stuck waiting for response when started remotely from machine with different endianity. Signed-off-by: Michal Srb Reviewed-by: Jeremy Huddleston Tested-by: Michel Dänzer Signed-off-by: Keith Packard commit 457fc77691b2df66f6dd3ba10ce7c1b61b9b42a3 Merge: 2e237c838 5a3a98fcb Author: Keith Packard Date: Tue May 22 10:32:29 2012 -0700 Merge remote-tracking branch 'alanc/master' commit 2e237c838fe1780c2fcbd2306f35fd15b6747831 Author: Dave Airlie Date: Wed Apr 11 10:02:25 2012 +0100 xf86: reimplement XF86SCRNINFO macro using new functions. This macro did lookups via privates but we can just use the ScreenToScrn conversion instead. This patch drops all in-server uses, we should drop the macro later, once drivers have been converted to not use it. Reviewed-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 8da35202f390cd8a0410814911017d99fa9dddcb Author: Dave Airlie Date: Wed Apr 11 09:53:35 2012 +0100 xf86/modes: drop more pScrn->pScreen usages Just simple conversion to use the lookup function. Reviewed-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit e7a9e30fd20a7c2a526783726d0a76b8a04b053a Author: Dave Airlie Date: Wed Apr 11 09:52:37 2012 +0100 xaa: convert pScrn->pScreen to use accessor. This uses a standard conversion function to do the conversion. Reviewed-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 738367ac9b6179593a38074d0105de206cbed296 Author: Dave Airlie Date: Wed Apr 11 09:46:39 2012 +0100 xf86/modes: drop two uses of screenInfo Just use new macros to access scrn->screen. Reviewed-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit cc4fe613d0b0891ea9502340801b37e64301f573 Author: Dave Airlie Date: Sat May 5 09:47:24 2012 +0100 render/exa: use glyph picture accessors use the glyph picture accessors in the X server, render and EXA code. Reviewed-by: Aaron Plattner Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit a45e1d6cc6f2a5f31ed737294351cfa251caa030 Author: Dave Airlie Date: Sat May 5 09:38:28 2012 +0100 render: add GetGlyphPicture accessor. This is a new API to stop the drivers directly looking up the glyph pictures in a global array. It provides a define GLYPH_HAS_GLYPH_PICTURE_ACCESSOR for drivers to work in a compat way. Reviewed-by: Aaron Plattner Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 41151f88a62f01b00c1912822b8b430df1eb307e Author: Dave Airlie Date: Tue Apr 10 15:47:33 2012 +0100 xf86: migrate to using xf86ScreenToScrn wrapper (v2) migrate to new helper API. This just wraps all the obvious uses of xf86Screens[pScreen->myNum], and should be fairly simple to review. v2: remove commented out lines. Reviewed-by: Aaron Plattner Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 53932b3803fa2c02949fd7d4d0e433ea58fa89f1 Author: Dave Airlie Date: Tue Apr 10 15:47:32 2012 +0100 xf86: add helper functions to convert to from ScrnInfoPtr/ScreenPtr (v2) These are just simple functions that we should start migrating drivers to using. The end goal is to remove xf86Screens and screenInfo from the ABI. This includes a define XF86_HAS_SCRN_CONV that drivers can ifdef to provide their own copies. I'll probably post a generic compat.h file for drivers later. v2: add asserts. Reviewed-by: Aaron Plattner Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 39f73e813f7d404498629f6104a9003d092af28d Author: Dave Airlie Date: Tue May 8 13:01:12 2012 +0100 xf86/pci: fix slot claiming counting. Currently if we claim a slot for a PCI driver, we never let it go properly, this prevents the fallback probe from reusing the slot, even though it isn't claimed for that pci slot. So if you set the modesetting driver to point at a specific kms device, that isn't a PCI device (i.e. USB dongle), then the modesetting driver loads, the pci probe tries to bind the config slot to the primary PCI device, however we then check the kms device bus id to discover it isn't valid. However we don't remove the claim on the slot. Next the old probe function is called and there is no slots to claim. This patch fixes that and converts the pciSlotClaimed boolean into a counter, and changes the unclaim api to take a device pointer to remove from the entity. Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 07dcc3f1a98dff2ee374a15ac5beac778d2ccc97 Author: Dave Airlie Date: Sun May 6 17:13:02 2012 +0100 config/udev: add pre_init stage to config and udev. In order to use udev for gpu enumeration, we need to init udev earlier than input initialisations. This splits the config init stuff so that udev pre init sets up before output initialisation. this is just a prepatory patch, doesn't change anything major. Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit a2a02882ab65133e6c0c69db1f38bc20b406236f Author: Dave Airlie Date: Sun May 6 17:35:34 2012 +0100 xfree86: add modesetting driver to fallback list on Linux Add the modesetting driver to the fallback list on Linux, after vesa before fbdev. Acked-by: Peter Hutterer Signed-off-by: Dave Airlie commit 5a3a98fcb799c2ac8fa7494645ad9030f1cac837 Author: Alan Coopersmith Date: Fri Apr 27 13:35:32 2012 -0700 Undocument Font Module loading Code was deleted in commit affec10635343668839994ea2bac16c1d4524200 Signed-off-by: Alan Coopersmith Reviewed-by: Dave Airlie Reviewed-by: Adam Jackson commit afcb7ba24ebd9968d48a192df438e7f1c0ecb770 Author: Alan Coopersmith Date: Fri Apr 27 13:31:56 2012 -0700 Undocument mandatory loadable modules The code to implement was deleted when BaseModules[] was emptied by the replacement of the "pcidata" module with libpciaccess calls in commit 46f55f5dead5d70cdff30531d80a72f6be042315. Signed-off-by: Alan Coopersmith Reviewed-by: Dave Airlie Reviewed-by: Adam Jackson commit c3180a74a4fc6304bcfe676e3285d707874a9fea Author: Alan Coopersmith Date: Fri Apr 6 21:51:37 2012 -0700 cvt man page should use Hz, not kHz, for vertical refresh rate https://bugs.freedesktop.org/show_bug.cgi?id=48311 Signed-off-by: Alan Coopersmith Reviewed-by: Julien Cristau commit 96e0ab54962ab59f03275a098ee02c1f0f86b94e Author: Alan Coopersmith Date: Thu Jan 26 15:44:40 2012 -0800 Convert sbusPaletteKey to latest DevPrivate API Signed-off-by: Alan Coopersmith Reviewed-by: Mark Kettenis Reviewed-by: Dave Airlie commit ba883a0f3435d5da82a8134e696c4905eea70f23 Merge: ae1c48ebc acdc4f54e Author: Keith Packard Date: Thu May 17 16:49:19 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit acdc4f54ee5784d26c251ff8c941b4360ae80e9b Author: Jeremy Huddleston Date: Thu May 17 10:08:02 2012 -0700 XQuartz: Avoid a race in initialization of darwinPointer http://xquartz.macosforge.org/trac/ticket/579 Signed-off-by: Jeremy Huddleston commit c495211373a118acee02a29c6eb25a332abc856c Author: Jeremy Huddleston Date: Thu May 17 16:20:30 2012 -0700 XQuartz: Declare noPseudoramiXExtension for miinitext.c Regression-from: 6699f54fe0b3f4952a75e46fb6c3a643988e65dd Signed-off-by: Jeremy Huddleston commit f5fc5334116ad2b0c8930ac68c52bf0f7a2f1417 Author: Jeremy Huddleston Date: Mon May 7 17:07:27 2012 -0700 XQuartz: Provide fls implementation for Tiger Regression-from: 30623d6ff7bca223f9e1a825e86bd317eef8bf16 Signed-off-by: Jeremy Huddleston commit e0097ce9719f9b0aeccf7102630c0299f8acdf93 Author: Jeremy Huddleston Date: Mon May 7 16:31:38 2012 -0700 XQuartz: Tiger build fix http://trac.macports.org/ticket/34364 Regression-from: 662d41acdde1dcb9774fbe4054e251c708acaffe Reported-by: Peter Dyballa Signed-off-by: Jeremy Huddleston commit 4acbaa3027d89728ed932616f6ef66d93537b101 Author: Jeremy Huddleston Date: Mon May 7 16:16:20 2012 -0700 XQuartz: Workaround an SDK bug on Leopard/x86_64 Signed-off-by: Jeremy Huddleston commit ae1c48ebc8a3c0b32b3d732e8a340bfe00bb9f79 Author: Peter Hutterer Date: Wed May 16 10:54:48 2012 +1000 Xi: fix "discards ''const' qualifier" warnings extinit.c: In function 'XInputExtensionInit': extinit.c:1301:29: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] extinit.c:1303:36: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] property.c: In function 'XIChangeDeviceProperty': xiproperty.c:757:39: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e42bf98283ddc4eac2213c96e8ebcd711583e6b1 Author: Peter Hutterer Date: Wed May 16 10:47:45 2012 +1000 Xi: fix "shadows previous local" warnings exevents.c: In function 'DeepCopyFeedbackClasses': exevents.c:272:20: warning: declaration of 'classes' shadows a previous local [-Wshadow] exevents.c:245:16: warning: shadowed declaration is here [-Wshadow] (and a few more like this) exevents.c: In function 'DeliverTouchEmulatedEvent': exevents.c:1442:27: warning: declaration of 'win' shadows a parameter [-Wshadow] exevents.c:1404:55: warning: shadowed declaration is here [-Wshadow] exevents.c:1475:28: warning: declaration of 'listener' shadows a parameter [-Wshadow] exevents.c:1403:62: warning: shadowed declaration is here [-Wshadow] xiselectev.c: In function 'ProcXISelectEvents': xiselectev.c:178:34: warning: declaration of 'dummy' shadows a previous local [-Wshadow] xiselectev.c:91:18: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit ca6d25ad2d1fb4efae9d40c7e74c8494f9918625 Author: Peter Hutterer Date: Wed May 16 10:10:11 2012 +1000 dix: Move DeviceFocusEvent from Xi into enterleave.c This is only called from the enterleave implementation, so move it and its helper functions to there. No functional changes. Fixes build error introduced in 31174565ec0090b4c03c9334c82878be2455f938 if building with '-Werror=implicit-function-declaration' Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie Reviewed-by: Jeremy Huddleston commit 749a593e49adccdf1225be28a521412ec85333f4 Author: Peter Hutterer Date: Wed May 9 11:30:46 2012 +1000 dix: undo transformation for missing valuators (#49347) last.valuators contains the transformed valuators of the device. If the device submits events with x/y missing, we need to get that from last.valuators and undo the transformation to that axis. X.Org Bug 49347 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 03318835a5a87a8a5cb3515130b5380d565c0d91 Author: Peter Hutterer Date: Mon May 14 15:06:56 2012 +1000 include: don't redeclare device events in xkbsrv.h ../../include/xkbsrv.h:308:51: warning: redundant redeclaration of ‘DeviceKeyPress’ [-Wredundant-decls] Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 43754803c13c232fd5c37eb3d4b1ca2898d6a6cd Author: Peter Hutterer Date: Mon May 14 15:07:57 2012 +1000 test: don't shadow parameter 'len' protocol-xiquerydevice.c:226:25: warning: declaration of ‘len’ shadows a parameter [-Wshadow] Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 1bafc9f26bef0997c98b97efa888ed5e2a54f6f0 Author: Peter Hutterer Date: Mon May 14 15:01:09 2012 +1000 test: fix redundant declaration of "BadDevice" In file included from protocol-common.c:36:0: protocol-common.h:36:12: warning: redundant redeclaration of ‘BadDevice’ [-Wredundant-decls] In file included from protocol-common.c:30:0: ../../Xi/exglobals.h:41:12: note: previous declaration of ‘BadDevice’ was here Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 47e1d0ea43eb7a6caf774f375f11849d0d515e14 Author: Peter Hutterer Date: Mon May 14 14:56:02 2012 +1000 test: fix "userdata shadows global declaration" warnings protocol-xiquerypointer.c:124:72: warning: declaration of ‘userdata’ shadows a global declaration [-Wshadow] and similar Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e6da635826bdda7f67bd492dda8dba8a97809213 Author: Peter Hutterer Date: Mon May 14 14:51:58 2012 +1000 test: fix "redundant declaration of devices" warning In file included from protocol-xiwarppointer.c:41:0: protocol-common.h:91:23: warning: redundant redeclaration of ‘devices’ [-Wredundant-decls] protocol-common.h:86:3: note: previous declaration of ‘devices’ was here Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 693a31e704c0745b209e69711522417c4fa8541e Author: Simon Thum Date: Mon Apr 2 18:49:53 2012 +0200 dix: indentation fixes for pointer acceleration Signed-off-by: Simon Thum Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 31174565ec0090b4c03c9334c82878be2455f938 Author: Michal Suchanek Date: Wed Apr 25 15:03:31 2012 +0200 dix: Remove redundant declarations. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit f1cec791d1def506b99b0e6c160e9e8be107bd13 Author: Michal Suchanek Date: Tue Apr 24 20:08:02 2012 +0200 xfree86: Add ifdef wrapper to xvmodproc.h Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit d2f71b13946a14d9698d0355cc45b114b236e73b Author: Michal Suchanek Date: Tue Apr 24 18:44:48 2012 +0200 Xi: Remove redundant declaration. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit a4f87f885a55373a6daf56fd540e10c5f1db5a5c Author: Michal Suchanek Date: Tue Apr 24 18:43:31 2012 +0200 kdrive: Remove redundant declarations. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 369edd78769fa1a174e4091d0fa0722350df5d68 Author: Michal Suchanek Date: Tue Apr 24 18:41:07 2012 +0200 dix: don't duplicate DoFocusEvents declaration. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 36377fb0e88a6d237d98805e802ab3793582c976 Author: Michal Suchanek Date: Tue Apr 24 18:37:30 2012 +0200 dix: Remove redundant declarations. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit ea9ed83f8f0da241099d0a11c3460d46c5114dea Author: Michal Suchanek Date: Tue Apr 24 18:32:53 2012 +0200 xfree86: don't include xvmodproc.h when not needed The functions are already declared in xf86xv.h Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 1927e5ab25c9c9bf481e75ac50f4b140a96e634a Author: Michal Suchanek Date: Tue Apr 24 18:24:19 2012 +0200 xserver: Remove duplicate declaration in resource.h Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 1339681e4fbd4f5981e6246eedb23e8a9c5d10f4 Author: Michal Suchanek Date: Tue Apr 24 18:19:43 2012 +0200 miext: Remove redundant declaration. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 6699f54fe0b3f4952a75e46fb6c3a643988e65dd Author: Michal Suchanek Date: Tue Apr 24 18:18:43 2012 +0200 mi: Remove redundant declarations. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit b4bf90f9fb20e0e56d2451096d4f62ecfc24a962 Author: Michal Suchanek Date: Tue Apr 24 18:16:30 2012 +0200 exa: Remove redundant declaration. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 5595e7ce0735db6f82e1fe9df45434826019bf9e Author: Michal Suchanek Date: Tue Apr 24 18:15:17 2012 +0200 randr: Remove redundant declaration. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit c59c9dac84301f8eb2a0e4a09a8839146aa5a069 Author: Michal Suchanek Date: Tue Apr 24 18:13:22 2012 +0200 xkb: Remove redundant declarations. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit d0a83460451df1a4c5667b2f414c35ee81b4ffa4 Author: Michal Suchanek Date: Tue Apr 24 18:11:16 2012 +0200 xfixes: remove redundant declaration. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 3a94b338aaa48b656aae1bb3a5a9d64300c0a093 Merge: afc153a5b c91d00e0f Author: Keith Packard Date: Wed May 9 21:17:16 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit e8da587845978ad66c3b3e2e085fd99c16b5d3c8 Author: Dave Airlie Date: Wed May 9 09:33:54 2012 +0100 bump version to 0.3.0 commit 62543946490e7decae4f6549d83072f004e850d4 Author: Matt Turner Date: Wed May 9 00:26:29 2012 -0400 configure.ac: remove DRI and RENDER Driver doesn't support either of these. Signed-off-by: Matt Turner Signed-off-by: Dave Airlie commit 7dc22b7911ac3d5c131075903e3fbf52c58eac15 Author: Dave Airlie Date: Wed May 9 09:32:05 2012 +0100 modesetting: make sure the pci device corresponds to the drm device If we get asked to pci open a device with a kms path override, make sure they match, otherwise this driver can steal the primary device binding for a usb adaptor. The driver should fallback to the old probe entry point in this case. Signed-off-by: Dave Airlie commit afc153a5b4fc58ae70dc214f61a71b1a8c855f06 Author: James Cloos Date: Tue May 8 17:55:10 2012 -0400 Fix RANDR’s gamma_to_ramp(). In order to generate a 256-entry ramp in [0,65535] which covers the full range, one must mupliply eight-bit values not by 256 but rather by 257. Many years back – well before the RANDR extension was written, and before xorg@fdo – a similar bug fix was made to the DIX for converting client-supplied eight-bit color values into sixteen-bit values. Noticed by: Elle Stone and Graeme Gill. Signed-off-by: James Cloos commit e501c34d4937d5e6f19abd29f1ec7f95faa3bb55 Author: Yaakov Selkowitz Date: Tue May 1 22:03:24 2012 -0500 hw/xwin/glx: Use silent rules Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY commit 026d402fef623a0bda0bedd9c0938ba787bf9829 Author: Yaakov Selkowitz Date: Fri Mar 30 14:33:18 2012 -0500 xfree86: use silent rules with sdksyms generation Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY commit 3d98dac46c17bc6e03546b8a532bfb55f00e5084 Author: Yaakov Selkowitz Date: Sun Apr 29 20:45:17 2012 -0500 xfree86: respect EXEEXT in relink target Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY commit e6461db6dcb437cfa7d4b23008c2c12f8169ff79 Author: Yaakov Selkowitz Date: Thu Apr 26 01:49:06 2012 -0500 os: Add CryptoAPI as a choice of SHA1 implementation Both Cygwin and MinGW can use Windows' native CryptoAPI for SHA1, saving a dependency on libgcrypt or OpenSSL. The necessary functions are in ADVAPI32.DLL, which is among the default lib flags and is already used in hw/xwin for accessing the registry. Signed-off-by: Yaakov Selkowitz Reviewed-by: Mikhail Gusarov Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison Tested-by: Colin Harrison commit c91d00e0f330b9de604068e1bfcb0a307096434f Author: Daniel Kurtz Date: Wed Apr 18 17:51:53 2012 +0800 os/log: refactor logging It is not safe to ever use an arbitrary (possibly user supplied) string as part of the format for a *sprintf() call. For example: 1. Name a Bluetooth keyboard "%n%n%n%n%n%n%n%n" 2. Pair it with a computer running X and try to use it 3. X is not happy when trying to do the following in xf86-input-evdev: xf86IDrvMsg(pInfo, X_CONFIG, "Device: \"%s\"\n", device); because LogVHdrMessageVerb() has put the %n from the device name into a format string of the form: "evdev: %n%n%n%n%n%n%n%n: Device: \"%s\"\n" Instead, build up a log message in place by appending successive formatted strings by sncprintf'ing to the end of the previous. Signed-off-by: Daniel Kurtz Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 6ce0eac4f8a05f6d7401445cab95027709d3a479 Author: Daniel Kurtz Date: Wed Apr 18 17:51:52 2012 +0800 os/log: only write timestamp if a message is actually written to logfile The current code will write a timestamps into the logFile whenever the last message ended with a '\n' - even if the verb for that timestamp is at too high a level. This timestamp will sit there with no matching message until the next call to LogVWrite with a valid verb. In other words, in some cases, timestamps in the X.org.log are for some completely unrelated message that was previously ignored due to insufficient verbosity, and not for the message that appears next to it in the log file. We keep the current policy which appears to be to only apply timestamps if a message is actually written to a log file. That is, no timestamps on stderr, or in the mem buffer. Therefore, the timestamp stringification is moved to the conditional where it is used. Since logging uses a fixed length buffer, this patch also forces a '\n' whenever a buffer is terminated due to a too-long write request. This allows the newline detection to work even on overflow, and also cleans up the log a bit in the overflow case. Signed-off-by: Daniel Kurtz Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5c2e2a164d615ab06be28a663734e782614b5cc7 Author: Daniel Kurtz Date: Wed Apr 18 09:51:51 2012 +0000 os/xprintf: add Xvscnprintf and Xscnprintf Normal snprintf() usually returns the number of bytes that would have been written into a buffer had the buffer been long enough. The scnprintf() variants return the actual number of bytes written, excluding the trailing '\0'. Signed-off-by: Daniel Kurtz Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c30862879d2c766519780bb7f353f35edf0daa9b Author: Daniel Kurtz Date: Wed Apr 18 17:51:50 2012 +0800 os/log: trivial cleanups * space->tab * remove comment that doesn't make any sense Signed-off-by: Daniel Kurtz Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 97041364a6acb2b66b5cfd06757c90a006ad50e9 Merge: 19082726c ee542b855 Author: Keith Packard Date: Wed May 2 20:47:25 2012 -0700 Merge remote-tracking branch 'whot/for-keith' No conflicts here commit ee542b85590814ee25369babce1ad14feeb137af Author: Chase Douglas Date: Tue May 1 10:21:12 2012 -0700 Report touch emulated buttons in XIQueryPointer for XI 2.1 and earlier XInput 2.1 and earlier clients do not know about touches. We must report touch emulated button presses for these clients. For later clients, we only report true pointer button presses. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 19082726cb2c69f53e9720904521e3c98f788bff Author: Ryan Pavlik Date: Fri Oct 21 12:47:38 2011 -0500 configure.ac: on MinGW, link with ws2_32 instead of winsock2 ws2_32 is the correct name for the libary (even on 64 bit Windows :-)) Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit ad9605a3e21b20fa8565dc6701610712ac6dd9e1 Author: Ryan Pavlik Date: Fri Nov 4 13:26:14 2011 -0500 configure.ac: MinGW doesn't have setuid binaries either. If the target platform isn't in a list of platforms we know don't use a setuid binary, we try to test if we can chown something to root. This test possibly won't give the right answer if we are cross-compiling, which is common for the MinGW target. This patch adds MinGW to the list of platforms we know don't use a setuid binary. Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit 2225208c2ef9857f14813376ce85d305f19263dd Author: Ryan Pavlik Date: Fri Nov 4 13:30:43 2011 -0500 configure.ac: auto-disable MITSHM if we lack IPC The MITSHM extension uses SYSV IPC, but even if configure's test for IPC failed, MITSHM was still enabled by default, breaking MinGW builds by default. Unfortunately, fixing this exposes the fact that the HAVE_SYSV_IPC test wasn't being used for anything before and so we hadn't noticed it was failing on Cygwin. Change from using SHM_W|SHM_R flags (which aren't required by POSIX) to S_IRUSR|S_IWUSR flags (which are) Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit 1e7b500a8e1d79b91a4e857a2da06194efe8cf69 Author: Chase Douglas Date: Tue May 1 10:21:11 2012 -0700 Report logical button state in ProcXIQueryPointer Physical button state is usually meaningless to an X client. Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit d063f64b5c8c8c27fca41163c93dbca06a774d1c Author: Dave Airlie Date: Tue May 1 17:12:29 2012 +0100 modesetting: attempt to work out if we want 24 or 32bpp the cirrus driver presents certain challenges, and this is a workaround, until we can possibly agree some sane interface for exposing this information. Signed-off-by: Dave Airlie commit 0426e6d65b6598edfbcb2fc66ee65fb08256469e Author: Jon TURNEY Date: Tue Jan 3 00:14:32 2012 +0000 configure.ac: Make default configuration for MinGW disable unsupported extensions and DDXs Same as the default configuration for Cygwin, --disable-xorg and --disable-dmx DDX by default, and force --disable-xv and other unsupported extensions Signed-off-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit 610f532e6a3d934c473d2d16dff95f582285b2eb Author: Dave Airlie Date: Tue May 1 16:52:18 2012 +0100 modesetting: move opening kernel device to before setting depth due to interaction between option handling and set depth, we need to what fbdev does to get the device path early. Signed-off-by: Dave Airlie commit f3410b97cf9b48a47bee3d15d232f8a88e75f4ef Author: Peter Hutterer Date: Mon Apr 30 10:01:48 2012 +1000 dix: when disabling a device, release all buttons and keys A suspend-induced device disable may happen before the device gets to see the button release event. On resume, the server's internal state still has some buttons pressed, causing inconsistent behaviour. Force the release and the matching events to be sent to the client. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit af88b43f9e604157b74270d609c08bdfa256a792 Author: Peter Hutterer Date: Fri Apr 27 16:31:17 2012 +1000 dix: don't emulate scroll events for non-existing axes (#47281) Test case: - create a device with REL_HWHEEL and ABS_X and ABS_Y. evdev 2.7.0 will set that up as device with 1 relative axis - move pointer to VGA1 - xrandr --output VGA1 --off Warps the pointer to the new spot and calls GPE with the x/y mask bits set. When running through the loop to check for scroll event, this overruns the axes and may try to emulate scroll events based on random garbage in the memory. If that memory contained non-zero for the scroll type but near-zero for the increment field, the server would hang in an infinite loop. This was the trigger for this suggested, never-merged, patch here: http://patchwork.freedesktop.org/patch/9543/ X.Org Bug 47281 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 08962951de969b9d8c870af8b6e47303dc0decfd Author: Peter Hutterer Date: Fri Apr 27 10:52:39 2012 +1000 os: make timers signal-safe If TimerSet() is called from a signal handler (synaptics tap handling code) may result in list corruption if we're currently inside TimerSet(). See backtrace in https://bugzilla.redhat.com/show_bug.cgi?id=814869 Block signals for all list manipulations in the timers. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit d662fa2450856777b59c4b62b912395a8bfd52fd Author: Michal Suchanek Date: Thu Apr 26 15:11:20 2012 +0200 dmx: Annotate dmxlog.c with _X_ATTRIBUTE_PRINTF and _X_NORETURN and fix resulting printf warning in dmxLogVisual Signed-off-by: Michal Suchanek Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5c361d59c5031d9b3f7f9093a52d2b1ff4d9ae5f Author: Chase Douglas Date: Fri Apr 20 11:08:15 2012 -0700 TouchListenerAcceptReject: Warn and return early on bad listener index Signed-off-by: Chase Douglas Reviewed-by: Bryce Harrington Signed-off-by: Peter Hutterer commit 88bacc49f06da5927f716869f5a32672a8297ed0 Author: Chase Douglas Date: Wed Apr 4 15:29:42 2012 -0700 os: Add -displayfd option This option specifies a file descriptor in the launching process. X will scan for an available display number and write that number back to the launching process, at the same time as SIGUSR1 generation. This means display managers don't need to guess at available display numbers. As a consequence, if X fails to start when using -displayfd, it's not because the display was in use, so there's no point in retrying the X launch on a higher display number. Signed-off-by: Adam Jackson Signed-off-by: Chase Douglas Reviewed-by: Julien Cristau Tested-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Peter Hutterer commit 1d82ec95942b88dd01f0ac6b883368360a0b5fe6 Author: Michal Suchanek Date: Mon Apr 23 13:52:40 2012 +0200 xserver: Fix out-of-tree build Fixes regression caused by ccb3e78124fb05defd0c9b438746b79d84dfc3ae Signed-off-by: Michal Suchanek Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit ea51e9b2877df60135edaf2a8f88d0f2a2b41060 Author: Peter Hutterer Date: Mon Apr 23 10:35:53 2012 +1000 Xi: return BadValue on XIQueryVersion if the version is less than first call Clients that use plugin systems may require multiple calls to XIQueryVersion from different plugins. The current error handling requires client-side synchronisation of version numbers. The first call to XIQueryVersion defines the server behaviour. Once cached, always return that version number to any clients. Unless a client requests a version lower than the first defined one, then a BadValue must be returned to be protocol-compatible. Introduced in 2c23ef83b0e03e163aeeb06133538606886f4e9c Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit 93d6ba5b711cbd3f502d83e54c9739856d2e6f2a Author: Jeremy Huddleston Date: Thu Apr 26 21:17:54 2012 -0700 XQuartz: Make sure we tell startx the correct server binary to use in our fallback path With multiple servers installed, we can't be certain if X is Xorg or Xquartz Signed-off-by: Jeremy Huddleston commit fa6dddc6ce51c1b7a43fb379fb2a19550f6c8683 Author: Michal Suchanek Date: Wed Mar 28 18:12:39 2012 -0700 xfree86: workaround crash on close Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41653 Signed-off-by: Michal Suchanek Reviewed-by: Jeremy Huddleston Tested-by: Knut Petersen commit adcb48a29dcb3f32ff570551de4b014775c1e147 Author: Jonas Maebe Date: Sun Apr 22 20:52:47 2012 -0700 glapi: Correct size of allocated _glapi_table struct The __glapi_gentable_set_remaining_noop() routine treats the _glapi_struct as an array of _glapi_get_dispatch_table_size() pointers, so we have to allocate _glapi_get_dispatch_table_size()*sizeof(void*) bytes rather than sizeof(struct _glapi_struct) bytes. Signed-off-by: Jonas Maebe Reviewed-by: Jeremy Huddleston commit e34519e525559b01a63d26639f13f0487468de28 Author: Jeremy Huddleston Date: Thu Apr 19 16:38:06 2012 -0700 XQuartz: darwinPointer now sends both absolute and relative motion This should hopefully help out wine clients that were continuing to have issues after the earlier changes. http://xquartz.macosforge.org/trac/ticket/548 Signed-off-by: Jeremy Huddleston commit 662d41acdde1dcb9774fbe4054e251c708acaffe Author: Jeremy Huddleston Date: Thu Apr 19 18:48:22 2012 -0700 XQuartz: Add a hack to better handle clicky wheel scroll mice We loose information from AppKit being in our way. Before adopting smooth scrolling, we always rounded-up the number of scroll button clicks per NSEvent. Now, the scroll value is accumulated in the dix, and clicky scroll wheels with legacy X11 clients are seeing an accumulation of error due to so many translations (button press to smooth scrolling value in AppKit, passed to the dix, and then synthesized into a button press). This attempts to make the situation better. http://xquartz.macosforge.org/trac/ticket/562 Signed-off-by: Jeremy Huddleston commit eda85290ae47d8dd497ef9335d10268bbe3e02a0 Author: Jeremy Huddleston Date: Thu Apr 19 16:20:30 2012 -0700 XQuartz: Use screenInfo.{width,height} instead of grabbing it from the first screen Signed-off-by: Jeremy Huddleston commit b99586c9086ac29df144ef75df92f8c0c7554651 Author: Jeremy Huddleston Date: Wed Apr 18 17:50:55 2012 -0700 XQuartz: Separate out tablet and mouse event delivery into separate functions This should have no immediate impact aside from fake mouse buttons no longer working with tablets (where they aren't needed or desired anyways). This prepares us for future changes. Signed-off-by: Jeremy Huddleston commit 30623d6ff7bca223f9e1a825e86bd317eef8bf16 Author: Jeremy Huddleston Date: Thu Apr 19 16:06:45 2012 -0700 XQuartz: Correct calculation of the size of our file descriptor array in console_redirect Reported-by: Joe Rohde Signed-off-by: Jeremy Huddleston commit b4c4c65a35640e7274ccd4228f62110147878b72 Author: Jeremy Huddleston Date: Wed Apr 18 01:01:44 2012 -0700 XQuartz: Fix a deadlock in pre-dispatch code The fact that this has been in place so long makes me really wonder if anybody cares about this running in Tiger or Leopard. Signed-off-by: Jeremy Huddleston commit d1ef0d4964e43a4ab777750ad214d1092fd1ffda Author: Jeremy Huddleston Date: Sat Apr 7 15:26:53 2012 -0700 test: Fix make dist It seems like make dist should be doing te right thing without this commit, but it's not in some cases. Don't ask me to explain why. Signed-off-by: Jeremy Huddleston commit d97868d934fd1a00f9e9ef23a1154a70c7bc0464 Author: Jeremy Huddleston Date: Thu Apr 19 16:39:23 2012 -0700 os: Annotate OsVendorFatalError as _X_ATTRIBUTE_PRINTF Signed-off-by: Jeremy Huddleston Tested-By: Michal Suchanek commit 0ba1794fe2896395875f62e911720c7585687444 Author: Jeremy Huddleston Date: Thu Apr 19 16:51:46 2012 -0700 xres: Fix build without composite Regression from: b8d0d19a6d410776b53a41e7cae90f68d4b22bb7 Signed-off-by: Jeremy Huddleston Reviewed-by: Rami Ylimäki Tested-By: Michal Suchanek commit d77eb7ee49ef19c2c4c7381d56e9d0f9c3fbc890 Merge: 31e3c0ff7 c7b162555 Author: Keith Packard Date: Thu Apr 19 15:48:34 2012 -0500 Merge remote-tracking branch 'yselkowitz/master' Pull in Cygwin for XFree86 commit 31e3c0ff7f5fb36421be8de06e5f6e675ec26ddc Author: Keith Packard Date: Thu Apr 19 15:25:41 2012 -0500 Export CompositeClientWindowType Make sure CompositeClientWindowType is visible for XResource v1.2 Signed-off-by: Keith Packard commit e6308e32fe2b5f74133d4d238ffa512257f6327c Merge: 3720aa33e 51a8d8dd1 Author: Keith Packard Date: Thu Apr 19 10:45:07 2012 -0500 Merge remote-tracking branch 'whot/for-keith' Touch input changes from Chase commit 51a8d8dd19d7496fe84b37a1f0a7a03658120539 Merge: ebf214876 00cf1c40b Author: Peter Hutterer Date: Thu Apr 19 17:03:54 2012 +1000 Merge branch 'input-fixes' of git://people.freedesktop.org/~cndougla/xserver into for-keith commit 00cf1c40b28417d7035c2917d048553eb720023c Author: Chase Douglas Date: Wed Apr 18 18:21:54 2012 -0700 Replay original touch begin event instead of generated begin event The generated event does not have axes other than X and Y and has a newer timestamp. In particular, the newer timestamp may be newer than the real touch end event, which may be stuck in the syncEvents queue. If a client uses the timestamps for grabbing bad things may happen. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 312910b4e34215aaa50fc0c6092684d5878dc32f Author: Chase Douglas Date: Wed Apr 18 11:15:40 2012 -0700 Update currentTime in dispatch loop A request, like input device grabs, may check a request timestamp against currentTime. It is possible for currentTime to lag a previously sent event timestamp. If the client makes a request based on such an event timestamp, the request may fail the validity check against currentTime unless we always update the time before processing the request. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit a986f2f30cbe2a00e72ded7315c4951d7703e549 Author: Chase Douglas Date: Tue Apr 17 11:40:15 2012 -0700 Update device state including when touch record does not exist If a touch is physically active, the pointer core state should reflect that the first button is pressed. Currently, this only occurs when there are active listeners of the touch sequence. By moving the device state updating to the beginning of touch processing we ensure it is updated according to the processed physical state no matter what. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit ec9c4295830c3de610e65aca17f4da4a7af3c4c5 Author: Chase Douglas Date: Wed Apr 18 12:04:58 2012 -0700 Check other clients' core masks properly when adding touch listener The current code checks the core event mask as though it were an XI mask. This change fixes the checks so the proper client and event masks are used. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit e175971a6f44d94aa8306dc6b9228ccb2c8a0b4d Author: Chase Douglas Date: Tue Apr 17 11:39:10 2012 -0700 Ensure touch is ended when last listener is rejected Currently, the touch is only logically ended if the touch has physically ended. If the touch hasn't physically ended, the touch record is never ended. If there aren't any more listeners, we don't need to keep the dix touch record around any more. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit d0449851d1233543c3133d77e0ab7233319cdf5f Author: Chase Douglas Date: Tue Apr 17 10:49:14 2012 -0700 Create a new dix touch record for an emulated touch with no listeners As a special case, if a still physically active pointer emulated touch has no listeners and the device is explicitly grabbed for pointer events, create a new dix touch record for the grab only. This allows for clients to "hand off" grabs. For example, when dragging a window under compiz the window decorator sees the button press and then ungrabs the implicit grab. It then tells compiz to grab the device, and compiz then moves the window with the pointer motion. This is racy, but is allowed by the input protocol for pointer events when there are no other clients with a grab on the device. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 3d06bfe93d33cfe6150d8fb0058ee7bc8d80622b Author: Chase Douglas Date: Tue Apr 17 13:56:08 2012 -0700 Rename TouchEnsureSprite to TouchBuildSprite and event type checks The function will be used for building a sprite for pointer emulation after an explicit device grab. This commit refactors the code so that TouchBuildSprite will function with any event type and moves the checks to the caller. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 2efbed23c29020f9994ab7c3155ce7386950dc7a Author: Chase Douglas Date: Tue Apr 17 08:39:38 2012 -0700 When activating an explicit grab, update owning listener Pointer passive grabs may be changed by the grabbing client. This allows for a selecting client to change an implicit grab to an active grab, which is the mechanism used for pop-up windows like application menus. We need to do the same thing with touches. If the grabbing client is the owner of a touch sequence, change the listener record to reflect the new grab. If the grabbing client is not the owner, nothing changes for the touch. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit ef64b5ee97099618cf2e2cbbd3e471095695ae24 Author: Chase Douglas Date: Mon Apr 16 15:53:51 2012 -0700 Don't deactivate implicit pointer grab on fake touch end event Fake touch end events are generated by touch acceptance and rejection. These should not cause implicit pointer grabs to be deactivated. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit fc518cd9f59060cc19bb90361767c0f47f0e25eb Author: Chase Douglas Date: Mon Apr 16 15:31:47 2012 -0700 End a pointer emulated touch event only on a "real" end event Fake end events are generated by touch acceptance or rejection. These should not end the touch point. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 80d7d1ec6a9d61aa96e7d019dc1bee29d90cea34 Author: Chase Douglas Date: Mon Apr 16 14:19:59 2012 -0700 On touch accept, only process end event for owner if it has seen the end We still need to generate the touch ownership event to process the ending of the touch event in the case where the owner has the end already. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 8dfd98245d2c44a1eb4c8b7c275e6cfc10fe40f1 Author: Chase Douglas Date: Wed Apr 11 11:14:51 2012 -0700 Fix copy/paste error from before git history in UpdateCurrentTimeIf() See UpdateCurrentTime() for reference. I don't know what bug this might trigger, but it wouldn't hurt to fix this. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 6ca30cb33e829b4edd01822367e44ffe6f0951b0 Author: Chase Douglas Date: Wed Apr 11 08:17:25 2012 -0700 When deactivating an explicit pointer grab, reject all grabs on touches Explicit pointer grabs are placed at the head of the touch listener array for pointer emulated touches. If the grab is deactivated, we must remove it from all touches for the device. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit cacdb9a74065ccba7d50a82e14abdf04b36c5309 Author: Chase Douglas Date: Wed Apr 11 08:13:17 2012 -0700 Accept touch sequence for pointer listener after second event delivery This is a bit of unimplemented code for touchscreen pointer emulation. A pointer grabbing client currently never accepts the touch sequence. The sequence must be accepted once any touch-derived event is irrevocably delivered to a client. The first pointer event, derived from a touch begin event, may be caught in a sync grab and then replayed. This is essentially a revocable delivery of an event. Thus, we must wait till a non-begin event is delivered. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 447fe7a1a72513aa68145962c47894242c589cc9 Author: Chase Douglas Date: Wed Apr 11 08:12:08 2012 -0700 Split out helper function TouchListenerAcceptReject() This will be used for accepting and rejecting touches in the future. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 93c33403642a3de3c9d141ad7940a7b880846aad Author: Chase Douglas Date: Wed Apr 4 12:59:55 2012 -0700 Only set XI2 mask if pointer emulation is for XI2 client The current code returns a reference to memory that may not actually be an XI2 mask. Instead, only return a value when an XI2 client has selected for events. Signed-off-by: Chase Douglas Reviewed-by: Jeremy Huddleston Acked-by: Peter Hutterer commit 4c1dfd21937efc6a85fb204a73dd7d7151d54daa Author: Chase Douglas Date: Wed Apr 4 12:57:40 2012 -0700 Check core event mask properly for pointer emulated touch events The current code checks the core event mask as though it were an XI2 mask. This change fixes the checks so the proper client and event masks are used. Signed-off-by: Chase Douglas Reviewed-by: Jeremy Huddleston Acked-by: Peter Hutterer commit 3720aa33ee50788dd3d4acc9bbf8dfcb72c8f5ce Author: Erkki Seppälä Date: Thu Apr 7 12:53:51 2011 +0300 Added resourceproto version dependency, >= 1.2.0 now required Signed-off-by: Erkki Seppälä commit 233eab4d05cae1fdb4129a2e9905961b78693f74 Author: Erkki Seppälä Date: Wed Dec 8 17:09:30 2010 +0200 dix: add reference count of the resource to ResourceSizeRec The ResourceSizeRec now contains the number of references to the resource. For example a Pixmap knows this value and it can be useful for determining the "weight" of the resource. Typically this value is 1. Reviewed-by: Rami Ylimäki Signed-off-by: Erkki Seppälä commit ccb3e78124fb05defd0c9b438746b79d84dfc3ae Author: Erkki Seppälä Date: Tue Dec 14 12:18:23 2010 +0200 Xext: add a generic hashtable implementation The generic hashtable implementation adds a key-value container, that keeps the key and value inside the hashtable structure and manages their memory by itself. This data structure is best suited for fixed-length keys and values. One creates a new hash table with ht_create and disposes it with ht_destroy. ht_create accepts the key and value sizes (in bytes) in addition to the hashing and comparison functions to use. When adding keys with ht_add, they will be copied into the hash and a pointer to the value will be returned: data may be put into this structure (or if the hash table is to be used as a set, one can just not put anything in). The hash table comes also with one generic hashing function plus a comparison function to facilitate ease of use. It also has a custom hashing and comparison functions for hashing resource IDs with HashXID. Reviewed-by: Rami Ylimäki Signed-off-by: Erkki Seppälä commit a2ac01a8ea8508ed35aa844a589672c1165e05e4 Author: Erkki Seppälä Date: Wed Apr 6 10:16:53 2011 +0300 dix: don't use a local wrapper for calling HashResourceID Calls to Hash(client, id) were replaced with calls directly to HashResourceID(id, clientTable[client].hashsize) and the Hash-function was removed. Signed-off-by: Erkki Seppälä commit a0b0fb83f91bb82534a0d83fdd6c0222567b098d Author: Erkki Seppälä Date: Mon Dec 20 12:58:37 2010 +0200 dix: add hashing functions to resource.h for others to use. The public hashing function HashResourceID uses the same hashing hashing algorithm as resource.c uses internally, but it provides an interface that will is usable by external modules. It provides a parameter for the number of bits for the hash, instead of finding the size from its internal hash table. Signed-off-by: Erkki Seppälä commit 3ba0decb4b55a1fd122d269e15b2b2da8ced8624 Author: Erkki Seppälä Date: Wed Dec 8 15:30:57 2010 +0200 dix: add a mechanism for iterating through all subresources The mechanism allows iterating even through subresources that don't have specific XID's. When such 'resources' are iterated, the XID for them will be zero. A resource type can assign an iteration function for its subresources with SetResourceTypeFindSubResFunc; by default resources are assumed not to contain subresources. The purpose of this extension is to enable accurate accounting of the resources a resource consumes or uses. This patch provides the subresource iteration functions for Windows and GCs. Reviewed-by: Rami Ylimäki Signed-off-by: Erkki Seppälä commit b8d0d19a6d410776b53a41e7cae90f68d4b22bb7 Author: Rami Ylimäki Date: Wed Oct 27 17:25:50 2010 +0300 composite: Report pixmap usage of client windows to resource extension. Signed-off-by: Erkki Seppälä Signed-off-by: Rami Ylimäki Reviewed-by: Mikhail Gusarov Reviewed-by: Tiago Vignatti commit e83388cc70e21e7f377ed2e417d04469e23eb706 Author: Rami Ylimäki Date: Wed Oct 27 16:59:06 2010 +0300 render: Report pixmap usage of pictures to resource extension. Signed-off-by: Erkki Seppälä Signed-off-by: Rami Ylimäki Reviewed-by: Mikhail Gusarov Reviewed-by: Tiago Vignatti commit 96864bfa951ea8bf4ab697753fc62c6a97598bc0 Author: Erkki Seppälä Date: Mon Nov 29 12:40:56 2010 +0200 Implemented first part of XResource extension v1.2: X_XResQueryClientIds This patch implements a part of the XResource extension v1.2 (as specified in http://patchwork.freedesktop.org/patch/2720/ ). The request implemented is X_XResQueryClientIds. This patch depends on the feature introduced by 1e933665bef26c74196bb7c59910e6a78bcacf0e "dix: Add facilities for client ID tracking." . This latest version also adds Doxygen-formatted comments and takes a better notice of coding conventions (as in http://www.x.org/wiki/CodingStyle ). Signed-off-by: Erkki Seppälä commit ebf214876a4885a98ded4f5525925b69005fae05 Author: Peter Hutterer Date: Wed Apr 18 15:56:37 2012 +1000 dix: indentation fix Signed-off-by: Peter Hutterer commit 00c663a3bc76d567ad7edd6d6ef3f7f725b5df3a Author: Dave Airlie Date: Tue Apr 17 11:50:40 2012 +0100 modesetting: add set/drop master around VT switch commit 001dec898098e11c569abc20a307b3c2af2e2184 Author: Dave Airlie Date: Tue Apr 17 11:48:03 2012 +0100 cursor: hide cursors on LeaveVT commit 80fefc42f5e67e6b4a4b440d8991bee7e5f38359 Merge: 9779b904c 12188c8a8 Author: Keith Packard Date: Sun Apr 15 21:05:30 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 12188c8a8a537b38b1ca4cf8c0de5447e19c886a Author: Chase Douglas Date: Tue Apr 3 17:31:01 2012 -0700 Use touch state when querying pointer through core protocol QueryPointer is part of the core protocol. As such, it knows nothing about touch devices. Touches are converted to button 1 press, pointer motion, and button 1 release for core clients, so we should ensure the pointer state mask has button 1 set when XQueryPointer is used. Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer commit 32ece7c09bf0ebc3d99b4078aacebbd44314776a Author: Chase Douglas Date: Tue Apr 10 17:12:42 2012 -0700 Ensure sequential touches are pointer emulated sequentially Issue: * Two sequential touches (i.e. down, up, down, up) * Both are grabbed by a touch grab * Both have a second listener in the form of a pointer grab or selection * The second and first touches are rejected in that order The first touch must be pointer emulated before the second touch, so the second touch must be paused until the first touch is rejected or accepted and all events are delivered to pointer clients. This change ensures all pointer emulated events are emitted sequentially. It necessarily imposes a delay on further touch events when pointer grabs and selections are used, but there is no way around it. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 163b0f375d73c05873fb341652de3ed347337828 Author: Chase Douglas Date: Tue Apr 10 17:12:41 2012 -0700 Update event type when delivering end event to a pointer listener Just like when we deliver to a touch listener, we must convert a touch end event to an update event for further clients. This also ensures that the touch record is not deleted at the end of ProcessTouchEvent(). Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 210cd12c47d063f97915ff23292b61d09abfd73a Author: Chase Douglas Date: Tue Apr 10 17:12:40 2012 -0700 Don't update listener after deactivating implicit pointer grab After the pointer grab is deactivated, the touch listener record is updated at the end of DeliverTouchEmulatedEvent. However, the touch record is ended when the grab is deactivated, so the update to the listener record is in an array of memory that has been freed. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 82a1ae0af3b136371638659c3e909880a99f721c Author: Peter Hutterer Date: Thu Apr 12 15:54:00 2012 +1000 xfree86: after VT switching back, only enable previously enabled devices If a device was enabled before the VT switch, re-enabled it. Otherwise leave it as is, there was probably a reason why it was disabled. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Daniel Stone commit d5d5b407436dfdbffcd56bbefecf17d11750dddf Author: Dave Airlie Date: Sat Apr 14 19:21:47 2012 +0100 dirty: check malloc return Suggested by keithp. Signed-off-by: Dave Airlie commit 6c1b5cb903f2ff9cb915273835c301d6ac255f45 Author: Dave Airlie Date: Sat Apr 14 15:01:16 2012 +0100 drop use of alloca, just use malloc/free Reported-by: Alan Coopersmith Signed-off-by: Dave Airlie commit c5a45b0f7658c77725adce2b64a0fbd62f208328 Author: Daniel Kurtz Date: Thu Apr 12 10:11:10 2012 +1000 dix: don't BUG_WARN for button events from button-only device Events from button-only devices still need coordinates, and they get them from scale_to_desktop(). Therefore, a dev without valuators is not a bug. However, a dev with valuators, but less than two of them still is a bug. This was noticed when unplugging a "Creative Technology SB Arena Headset", which has some BTNs and some KEYs, but no REL or ABS valuators. It emits [BTN_3] = 0 on unplug, which would trigger the BUG_WARN. Signed-off-by: Daniel Kurtz Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit 9779b904c7c0b49c74054c22c420012c40595cdc Author: Keith Packard Date: Wed Apr 11 09:33:54 2012 -0700 hw/xfree86: Re-indent xf86vmode.c This is the result of re-running the 'x-indent.sh' script over xf86vmode.c to clean up the disaster caused by broken syntax in the file. Signed-off-by: Keith Packard commit 592bd0ae2b60cd6f6afd3efc40f5f659b12900b4 Author: Keith Packard Date: Wed Apr 11 09:28:21 2012 -0700 hw/xfree86: Spurious ');' in xf86vmode.c messed up indentation badly Inside the unfinished XF86VIDMODE_EVENTS #ifdef block the function definition for xf86VidModeNotifyEvent had an extra ');' before the prototype argument declarations. This was harmless for the compiler as the code never gets used, but completely messed up the file re-indentation. This patch removes the spurious characters in preparation for re-indenting the file. Signed-off-by: Keith Packard commit 72cfc1a097dc1e09d2cd9415ef7855a2cef92351 Author: Peter Hutterer Date: Wed Apr 11 09:43:23 2012 +1000 Xi: fix XITouchClass sourceid assignment Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 10cd6fdc431d2d0835c313b2f5bdda6dcea281fd Author: Keith Packard Date: Sun Apr 8 00:16:54 2012 -0700 Revert "xfree86: workaround crash on close" This reverts commit 55f552adb651715d2620db7248cd5b9b8187654a. This appears to cause a crash at init time instead of close. Reported-by: Knut Petersen Acked-by: Jeremy Huddleston Signed-off-by: Keith Packard commit c7b162555849ab2d4cb195d02d98a40494c5ce55 Author: Yaakov Selkowitz Date: Thu Mar 29 02:26:41 2012 -0500 xfree86: link modules against Xorg symbols on Cygwin As a PE platform, all symbols in both EXEs and DLLs must be resolved at link time. As Xorg modules depend on symbols in the Xorg executable, we must build Xorg before its modules, creating an implib from the former which is used to link the latter. This implib must then be installed in order to build the drivers. Currently only two drivers are supported on Cygwin: xf86-video-dummy (to replace Xvfb/Xfake) and xf86-video-nested (to replace Xnest/Xephyr). Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit 2dffdcd60f70f534ad730830fe97f0bb1a192e2a Author: Yaakov Selkowitz Date: Thu Mar 29 02:23:17 2012 -0500 xf86Config: load DIX libraries before drivers on Cygwin Cygwin doesn't have ELF rpath capabilities, so these libraries need to be loaded before the drivers (namely dummy and nested) which depend on their symbols. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit 5dd3d2dbbafee28142552640ac6ef3eef2e6d9d3 Author: Yaakov Selkowitz Date: Thu Mar 29 02:21:01 2012 -0500 xf86Init: provide ddxBeforeReset ifdef DDXBEFORERESET This is necessary when building Xorg and XWin simultaneously, otherwise undefined symbol errors result in sdksyms.c. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit 96186bc7219a88e549928707b3da4b8bfc16c54d Author: Yaakov Selkowitz Date: Thu Mar 29 02:18:41 2012 -0500 loader: add Cygwin support Cygwin libraries use the .dll extension and "cyg" prefix in place of "lib". Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit 0ce48729d34ab610ff119303355883048b651500 Author: Yaakov Selkowitz Date: Thu Mar 29 02:17:22 2012 -0500 os-support: add Cygwin support Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit fd115ee114e95b4e7b96f789d3ad67e2e15555de Author: Yaakov Selkowitz Date: Thu Mar 29 02:13:27 2012 -0500 xfree86: allow modules to be built without undefined symbols This will be necessary to port Xorg to Cygwin, but other platforms may find this useful as well. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit 12cd7ca83c35bc61fbda7e61535692e3ec78194c Author: Yaakov Selkowitz Date: Thu Mar 29 02:06:36 2012 -0500 Cygwin/X: disable all unused or unapplicable extensions in configure Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit cb5661e86d4a428ec0ca4efc30a1a165d94d7215 Author: Yaakov Selkowitz Date: Tue Mar 27 22:16:08 2012 -0500 xf86Crtc: include "xf86xv.h" only if XV Signed-off-by: Yaakov Selkowitz Reviewed-by: Alan Coopersmith Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit 1110facdfeb95b1ad47d03c0ca3d73933b86dbd6 Author: Chase Douglas Date: Thu Mar 29 18:06:03 2012 -0700 Implement passive touch ungrabbing Whoops. Forgot to implement this. The code currently generates an error due to the unhandled grab type. X.Org Bug 48069 Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit e9d3848d7bda7f7de4c0f497aee4482d0b30ad49 Author: Jeremy Huddleston Date: Thu Apr 5 14:03:35 2012 -0700 XQuartz: Automatically start our virtual tablet devices Fixes: https://bugs.launchpad.net/inkscape/+bug/972914 Regression introduced by: 7790dc86384cc451ac44663737fde84dd81ad4e1 Signed-off-by: Jeremy Huddleston commit 6cb83b78c47b80556cb4d573524d60f0cd1a64ac Author: Jeremy Huddleston Date: Fri Mar 30 14:29:48 2012 -0700 XQuartz: Tiger build fix Fixes: https://trac.macports.org/ticket/33818 Signed-off-by: Jeremy Huddleston commit eca58ee4db43d85e5940919be094c38ad166d5d0 Author: Jeremy Huddleston Date: Wed Mar 28 15:07:51 2012 -0700 os: Fix regression with FatalError not calling va_start Regression From: a818b305989bbcde4e585112a7ee70cbc0b14a92 Found-by: Colin Harrison Signed-off-by: Jeremy Huddleston commit 55f552adb651715d2620db7248cd5b9b8187654a Author: Michal Suchanek Date: Wed Mar 28 18:12:39 2012 -0700 xfree86: workaround crash on close Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41653 Signed-off-by: Michal Suchanek Reviewed-by: Jeremy Huddleston commit 641a1b9363d59808d2586f9e84847ccc69701482 Author: Peter Hutterer Date: Mon Mar 26 10:34:34 2012 +1000 test: reset the client before checking the swapped version As of 2c23ef83b0e03e163aeeb06133538606886f4e9c, the server returns BadValue for the same client with multiple versions. Avoid this by resetting the client before we issue the same request as a fake swap client. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston commit 17f33ca0e5bff45a2d03e4d3b4753a714ce25baf Author: Peter Hutterer Date: Mon Mar 26 10:28:32 2012 +1000 test: init the sync extensions for tests to pass again Introduced in d645edd11e7482f98c8b7e0d6c8693285c484907 Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston commit 8053faa7b81520b0a46459ba6e3b98f2599d5bbf Author: Peter Hutterer Date: Fri Mar 23 08:20:22 2012 +1000 Bump input ABI to 17 for per-device idlecounters Signed-off-by: Peter Hutterer commit 7f3997b01a8813c1d7055317eb06111aed8572c9 Merge: 92d50c38b 31646d8fa Author: Keith Packard Date: Mon Mar 26 16:41:52 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 92d50c38b2bfeb82e7374a1966a53235e3f8275e Author: Gaetan Nadon Date: Sun Feb 26 12:15:31 2012 -0500 man: s/__xservername__/Xorg/g - no longer required Excerpt from http://lists.x.org/archives/xorg-devel/2011-March/020481.html: The Xorg & xorg.conf substitutions are leftover from the transitional period where some distros were building our sources with the XFree86 and XF86config names until they had time to adjust the rest of their packages/installer/config code to the new names. This will fix inconsistencies and prevent the creation of new unneeded sed patterns. Reviewed-by: Alan Coopersmith Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 9e880cd2e36236e466fda0adadee34a407ae3341 Author: Gaetan Nadon Date: Sun Feb 26 12:15:30 2012 -0500 man: s/__xconfigfile__/xorg.conf/g - no longer required Excerpt from http://lists.x.org/archives/xorg-devel/2011-March/020481.html: The Xorg & xorg.conf substitutions are leftover from the transitional period where some distros were building our sources with the XFree86 and XF86config names until they had time to adjust the rest of their packages/installer/config code to the new names. This will fix inconsistencies and prevent the creation of new unneeded sed patterns. Reviewed-by: Alan Coopersmith Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 31646d8fa9524adca1d7bc2cd2db90d47c2eb96e Author: Jeremy Huddleston Date: Sun Mar 25 23:33:54 2012 -0700 XQuartz: Use scrolling valuators This lets use send more accurate data to Xi clients and uses dix for legacy scroll buttons rather than reinventing the wheel. Signed-off-by: Jeremy Huddleston Acked-by: Peter Hutterer commit 7790dc86384cc451ac44663737fde84dd81ad4e1 Author: Jeremy Huddleston Date: Sun Mar 25 22:30:55 2012 -0700 XQuartz: Use AllocDevicePair to allocate our keyboard and mouse at the same time Also correct isMaster to FALSE while we're here. Signed-off-by: Jeremy Huddleston Acked-by: Peter Hutterer commit 74fb534bf15687610367248071341fe4bfd1d8bf Author: Jeremy Huddleston Date: Sun Mar 25 22:16:22 2012 -0700 XQuartz: Call update_desktop_dimensions() after updating our screen coordinates Fixes: http://xquartz.macosforge.org/trac/ticket/555 Regression from: 8bebb4b4896d8b6ba3309b5b28fce883bb9f8a96 Signed-off-by: Jeremy Huddleston Acked-by: Peter Hutterer commit 41a46546e92b66fed323b5845dd71a6385feb418 Author: Jeremy Huddleston Date: Sun Mar 25 23:05:43 2012 -0700 XQuartz: Formatting cleanup for sendX11NSEvent Signed-off-by: Jeremy Huddleston commit 5324557c7b12dcacddac830bdb65769cb622c6cf Author: Jeremy Huddleston Date: Fri Mar 23 19:58:49 2012 -0700 XQuartz: Source formatting cleanup indent butchered Objective-C formatting. This patch was created by: 1) Reverting the indent changes in hw/xquartz 2) Editing X11Application.m and chaning some #ifdef logic to work with uncrustify 3) Hand edited some (c) notifications 4) Opened all XQuartz sources in XCode and re-indented (^I) 5) Ran uncrustify with this configuration (as close to the indent rules as I could get): tok_split_gte=false utf8_byte=true utf8_force=true indent_cmt_with_tabs=false indent_align_string=false indent_braces=false indent_braces_no_func=false indent_braces_no_class=false indent_braces_no_struct=false indent_brace_parent=false indent_namespace=false indent_extern=false indent_class=false indent_class_colon=false indent_else_if=false indent_var_def_cont=false indent_func_call_param=false indent_func_def_param=false indent_func_proto_param=false indent_func_class_param=false indent_func_ctor_var_param=false indent_template_param=false indent_func_param_double=false indent_relative_single_line_comments=false indent_col1_comment=false indent_access_spec_body=false indent_paren_nl=false indent_comma_paren=false indent_bool_paren=false indent_first_bool_expr=false indent_square_nl=false indent_preserve_sql=false indent_align_assign=true sp_balance_nested_parens=false align_keep_tabs=false align_with_tabs=false align_on_tabstop=false align_number_left=false align_func_params=false align_same_func_call_params=false align_var_def_colon=true align_var_def_attribute=true align_var_def_inline=true align_right_cmt_mix=false align_on_operator=false align_mix_var_proto=false align_single_line_func=false align_single_line_brace=false align_nl_cont=false align_left_shift=true align_oc_decl_colon=true nl_collapse_empty_body=true nl_assign_leave_one_liners=true nl_class_leave_one_liners=true nl_enum_leave_one_liners=true nl_getset_leave_one_liners=true nl_func_leave_one_liners=true nl_if_leave_one_liners=true nl_multi_line_cond=false nl_multi_line_define=false nl_before_case=true nl_after_case=true nl_after_return=false nl_after_semicolon=true nl_after_brace_open=true nl_after_brace_open_cmt=false nl_after_vbrace_open=false nl_after_vbrace_open_empty=false nl_after_brace_close=false nl_after_vbrace_close=false nl_define_macro=false nl_squeeze_ifdef=false nl_ds_struct_enum_cmt=false nl_ds_struct_enum_close_brace=false nl_create_if_one_liner=false nl_create_for_one_liner=false nl_create_while_one_liner=false ls_for_split_full=false ls_func_split_full=false nl_after_multiline_comment=false eat_blanks_after_open_brace=false eat_blanks_before_close_brace=false mod_full_brace_if_chain=false mod_pawn_semicolon=false mod_full_paren_if_bool=false mod_remove_extra_semicolon=false mod_sort_import=false mod_sort_using=false mod_sort_include=false mod_move_case_break=false mod_remove_empty_return=false cmt_indent_multi=true cmt_c_group=false cmt_c_nl_start=false cmt_c_nl_end=false cmt_cpp_group=false cmt_cpp_nl_start=false cmt_cpp_nl_end=false cmt_cpp_to_c=false cmt_star_cont=false cmt_multi_check_last=true cmt_insert_before_preproc=false pp_indent_at_level=false pp_region_indent_code=false pp_if_indent_code=false pp_define_at_level=false indent_columns=4 indent_brace=0 indent_switch_case=0 align_struct_init_span=2 align_pp_define_gap=0 align_pp_define_span=2 align_oc_msg_colon_span=16 nl_end_of_file_min=1 nl_func_var_def_blk=0 code_width=78 nl_max=2 newlines=auto indent_with_tabs=0 sp_arith=force sp_assign=force sp_assign_default=force sp_before_assign=force sp_after_assign=force sp_enum_assign=force sp_enum_before_assign=force sp_enum_after_assign=force sp_pp_stringify=add sp_bool=force sp_compare=force sp_inside_paren=remove sp_paren_paren=remove sp_paren_brace=force sp_before_ptr_star=ignore sp_before_unnamed_ptr_star=force sp_before_byref=force sp_before_unnamed_byref=force sp_after_byref=remove sp_after_type=force sp_before_sparen=force sp_inside_sparen=remove sp_inside_sparen_close=remove sp_after_sparen=force sp_sparen_brace=force sp_special_semi=force sp_before_semi=remove sp_after_semi=force sp_after_semi_for=force sp_after_semi_for_empty=remove sp_before_square=remove sp_inside_square=remove sp_after_comma=force sp_before_comma=remove sp_paren_comma=force sp_before_ellipsis=force sp_after_class_colon=force sp_before_class_colon=force sp_before_case_colon=remove sp_after_cast=remove sp_inside_paren_cast=remove sp_sizeof_paren=remove sp_inside_braces_enum=force sp_inside_braces_struct=force sp_inside_braces=force sp_inside_braces_empty=remove sp_func_proto_paren=remove sp_func_def_paren=remove sp_inside_fparens=remove sp_inside_fparen=remove sp_square_fparen=remove sp_fparen_brace=force sp_func_call_paren=remove sp_func_call_paren_empty=remove sp_return_paren=force sp_attribute_paren=remove sp_defined_paren=remove sp_macro=force sp_macro_func=force sp_else_brace=force sp_brace_else=force sp_brace_typedef=force sp_not=remove sp_inv=remove nl_start_of_file=remove nl_end_of_file=force nl_assign_square=remove nl_after_square_assign=remove nl_fcall_brace=remove nl_enum_brace=remove nl_struct_brace=remove nl_union_brace=remove nl_if_brace=remove nl_brace_else=force nl_elseif_brace=remove nl_else_brace=remove nl_else_if=remove nl_for_brace=remove nl_do_brace=remove nl_brace_while=remove nl_switch_brace=remove nl_case_colon_brace=force nl_func_type_name=force nl_func_type_name_class=force nl_func_proto_type_name=force nl_func_paren=remove nl_func_def_paren=remove nl_func_decl_start=remove nl_func_def_start=remove nl_func_decl_args=remove nl_func_decl_end=remove nl_func_def_end=remove nl_func_decl_end_single=remove nl_func_def_end_single=remove nl_func_decl_empty=remove nl_func_def_empty=remove nl_fdef_brace=force nl_return_expr=remove nl_before_if=ignore nl_after_if=ignore nl_before_for=ignore nl_after_for=ignore nl_before_while=ignore nl_after_while=ignore nl_before_switch=ignore nl_after_switch=ignore nl_before_do=ignore nl_after_do=ignore pp_space=remove Signed-off-by: Jeremy Huddleston commit 3505e1faadddeeec85a0d3f823c877ea33f86e00 Author: Jeremy Huddleston Date: Fri Feb 17 13:15:12 2012 -0800 XQuartz: Detect FatalErrors on startup to prevent tight crash loops If a FatalError occurs before the server finishes launching, it will not have drained the launchd-owned DISPLAY socket, so launchd will just relaunch it. This can cause the server to crash in a tight loop which will spam the user with CrashReporter windows that claim focus on appearance. This allows users stuck in this loop to "deal" with the problem without popping up a crash report every 10 seconds. Signed-off-by: Jeremy Huddleston commit a818b305989bbcde4e585112a7ee70cbc0b14a92 Author: Jeremy Huddleston Date: Fri Feb 17 12:35:02 2012 -0800 os: Pass the FatalError message to OsVendorFatalError Signed-off-by: Jeremy Huddleston Reviewed-by: Jon TURNEY commit 0bb8a2566debd6cd11164df9ddca534150ec440a Author: Jeremy Huddleston Date: Tue Mar 13 00:15:55 2012 -0700 XQuartz: Add a defaults option to disable the RENDER extension RENDER has some ugly issues on XQuartz, so add an option to disable RENDER. Enables workaround for: https://bugs.freedesktop.org/show_bug.cgi?id=26124 Signed-off-by: Jeremy Huddleston commit 5ff46d651ac0cd396be2053b79675997ed7af765 Author: Jeremy Huddleston Date: Sat Mar 17 00:04:27 2012 -0700 XQuartz: Use doubles for input valuators Signed-off-by: Jeremy Huddleston commit cd84c0949a9f397d8b803d3b87c9d02b260d4795 Author: Jeremy Huddleston Date: Sat Mar 17 00:08:19 2012 -0700 XQuartz: Xi: darwinPointer is now Relative There is really no real reason why this should be necessary, but wine developers are stuborn, so doing this to try to work around this wine issue: http://bugs.winehq.org/show_bug.cgi?id=29732 Signed-off-by: Jeremy Huddleston commit 87939bf8311c0e7d168741fe57bc8fac414811d8 Author: Jeremy Huddleston Date: Tue Mar 13 00:25:53 2012 -0700 XQuartz: Move our logs into an X11 subdirectory Signed-off-by: Jeremy Huddleston commit df327f98f6b8e02fadcfd313a85f906722acc572 Author: Jeremy Huddleston Date: Mon Mar 5 00:05:48 2012 -0800 test: Fix 'make dist' for configurations that build the Xorg DDX Signed-off-by: Jeremy Huddleston commit 0e8ee1cf4f3377a2916c43527ae0dc6cb07a67ec Author: Dave Airlie Date: Fri Mar 23 14:54:05 2012 +0000 modesetting: fix build against older Xext commit a7eac500e652f30deffd9dc5e623fab701077738 Merge: bf876c87a d645edd11 Author: Peter Hutterer Date: Thu Mar 22 13:13:07 2012 +1000 Merge branch 'per-device-sync-counters' into for-keith commit d645edd11e7482f98c8b7e0d6c8693285c484907 Author: Peter Hutterer Date: Mon Mar 12 16:36:31 2012 +1000 Xext: Add per-device SyncCounters Previously, we only had one idle alarm that was triggered for all devices, whenever the user used any device, came back from suspend, etc. Add system SyncCounters for each device (named "DEVICEIDLETIME x", with x being the device id) that trigger on that device only. This allows for enabling/disabling devices based on interaction with other devices. Popular use-case: disable the touchpad when the keyboard just above the touchpad stops being idle. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit 6aef209ebc2e54f5465da505a780f7b4cc273ee0 Author: Peter Hutterer Date: Mon Mar 12 13:51:02 2012 +1000 Change lastDeviceIdleTime to be per-device Preparation work for per-device idle counters. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit 20cf0ef825e3f14b0688b691691e0aeba0a4860a Author: Peter Hutterer Date: Tue Mar 13 10:21:23 2012 +1000 Xext: strdup() the SystemSyncCounter name Required for future dynamic names. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit f1b28aea4156f0381ea733ad2afbdd1f34f75599 Author: Peter Hutterer Date: Tue Mar 13 09:31:09 2012 +1000 Xext: store the bracket values for idle counters in the private And drop the three global variables, we have a reference to the counter everywhere now. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit d9553b2bbe06fba0b209218ffed9465edd79b4d2 Author: Peter Hutterer Date: Tue Mar 13 09:29:39 2012 +1000 Xext: pass the counter into block/wakeup handlers No functional changes, currently unused. Preparation work, we don't need a global variable if we can pass the counters around anyway. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit 90e6dc6de1ac339212989fd8e54131b196ebb369 Author: Peter Hutterer Date: Tue Mar 13 09:28:15 2012 +1000 Xext: add a private field to SyncSystemCounters Will be used to store counter-specific data. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit 3ddae647c307005309daa2d5dfe4bc6acb8170ab Author: Peter Hutterer Date: Mon Mar 12 15:31:39 2012 +1000 Xext: localise pIdleTimeValueLess/Greater Cleanup for future features, no functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit 43eb2f2758dfc6ca5a49afce97cc5baea8caf9f5 Author: Peter Hutterer Date: Mon Mar 12 15:27:56 2012 +1000 Xext: localise use of IdleTimeCounter Instead of referring to the global IdleTimeCounter everywhere, only do it once and use a local variable for the rest. Cleanup for future features, no functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit 1f12f059ef994e0b9b68fbd1f1556d0285c96b8b Author: Jamey Sharp Date: Wed Mar 14 17:22:18 2012 -0700 sync: Use a linked list instead of an array for SysCounterList. Signed-off-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit bf876c87a9099fdfa63ed599f8ed9a954dd023d9 Merge: 908ab3d58 c0b0a9bce Author: Peter Hutterer Date: Thu Mar 22 11:34:43 2012 +1000 Merge branch 'dtrace-input-abi' into for-keith commit c0b0a9bce9237b0abe150c1a7b54939affecc751 Author: Peter Hutterer Date: Mon Mar 5 14:12:52 2012 +1000 dix: add dtrace probes to input API For driver debugging, it is helpful to know whether the driver has actually submitted an event to the server. dtrace hooks can help here. Note that GetPointerEvents and friends may also be triggered by the server for other emulated devices, some care must be taken when analysing the results. Additional difficulty: proximity events have a run-time assigned type, so this may make automatic detection a tad harder. If in doubt, go for any event > 64 since the only two that can have that value are ProximityIn and ProximityOut. An example systemtap script is below: # Compile+run with # stap -g xorg.stp /usr/bin/Xorg # function print_valuators:string(nvaluators:long, mask_in:long, valuators_in:long) %{ int i; unsigned char *mask = (unsigned char*)THIS->mask_in; double *valuators = (double*)THIS->valuators_in; char str[128] = {0}; char *s = str; #define BitIsSet(ptr, bit) (((unsigned char*)(ptr))[(bit)>>3] & (1 << ((bit) & 7))) s += sprintf(s, "nval: %d ::", (int)THIS->nvaluators); for (i = 0; i < THIS->nvaluators; i++) { s += sprintf(s, " %d: ", i); if (BitIsSet(mask, i)) s += sprintf(s, "%d", (int)valuators[i]); } sprintf(THIS->__retvalue, "%s", str); %} probe process(@1).mark("input__event") { deviceid = $arg1 type = $arg2 detail = $arg3 flags = $arg4 nvaluators = $arg5 str = print_valuators(nvaluators, $arg6, $arg7) printf("Event: device %d type %d detail %d flags %#x %s\n", deviceid, type, detail, flags, str); } Signed-off-by: Peter Hutterer Acked-by: Jeremy Huddleston commit 61cb98da1c6199964825de158d9eee7682d9c983 Author: Peter Hutterer Date: Mon Mar 12 16:03:50 2012 +1000 Xext: SyncCreateSystemCounter returns a SyncCounter* type safety++ Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Bryce Harrington commit 908ab3d580188533168c8cdfd2cab9dc689b4218 Author: Peter Hutterer Date: Wed Mar 21 14:05:29 2012 +1000 dix: set raw event values before adding up relative values (#46976) Regression introduced in 4e52cc0ef48145134cd58d357fb7289e6f8bb709 Raw event values are values as-is from the driver, modified only be transformation or acceleration. 4e52cc caused the mask to be updated from relative to absolute coordinates which then got written into the raw events. Move the raw event update into the respective branches for absolute/relative events. X.Org Bug 46976 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Daniel Stone Tested-by: Sven Arvidsson Reviewed-by: Simon Thum commit 45fe3085f8f45e529383025414fdd263d86dfd2b Author: Peter Hutterer Date: Mon Mar 12 14:08:39 2012 +1000 Xext: remove needless /* parameter */ comments in declaration Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Bryce Harrington commit 9c3bd3ae652af386b6821b197d24528f20ba867d Author: Peter Hutterer Date: Wed Mar 21 14:03:27 2012 +1000 dix: fix compiler warning "unused variable 'scr'" getevents.c: In function 'updateSlaveDeviceCoords': getevents.c:326:15: warning: unused variable 'scr' [-Wunused-variable] Signed-off-by: Peter Hutterer commit e21ffff4761d2b75815391c6947adcba425ab11e Author: Peter Hutterer Date: Mon Mar 12 14:07:44 2012 +1000 Xext: typedef QueryValue and BracketValue prototypes No functional changes, just for readability Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Bryce Harrington commit 14e3ea730eed344e6ed69c873f918d6f076d13dc Author: Peter Hutterer Date: Wed Mar 14 13:48:56 2012 +1000 include: add an X_DEBUG message type Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp commit 5910f2df58beaae2187438fef0b62c29a563e853 Author: Peter Hutterer Date: Mon Mar 12 16:26:29 2012 +1000 Xext: drop InitServertime() declaration. Not implemented anywhere. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Bryce Harrington commit 31df08a449cf9b6e1740e1c02257997490630d93 Author: Chase Douglas Date: Wed Mar 7 16:06:27 2012 -0800 Use a new sprite trace for indirect touches when all touches have physically ended All touches of an indirect device, such as a trackpad, are sent to the same window set. When there are no active touches, a new window set is created; otherwise, the window set of an existing touch is copied. The current code checks for any logically active touches. This includes touches that have physically ended but are still logically active due to unhandled touch grabs. Instead, we want a new window set whenever there are no physically active touches. This change skips over logically active but pending end touches, which are touches that have physically ended. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 58427e08a4a36ce9e213e4b4fe5249d5db2c764d Author: Chase Douglas Date: Wed Mar 7 16:06:26 2012 -0800 Xi: Fix TouchEnd to TouchUpdate change for one accepted grab If there is only one listener of a touch, the listener is a grab, and is accepted before the touch has ended, the current code will not end the touch record when the touch does end. This change adds a listener state for when a touch is accepted but has not yet ended. We now keep the touch record alive in this state, but end it when the touch ends. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit e884ff8ad4df2b3272a3d8ece772906207af5142 Author: Peter Hutterer Date: Wed Mar 7 19:08:33 2012 +1000 xfree86: remove out-of-date comment No idea what this was referring to but it goes past git history. Signed-off-by: Peter Hutterer commit 5497ce3da442d27c2dc7796bfef6ccd670bbadc4 Author: Peter Hutterer Date: Mon Feb 20 12:09:33 2012 +1000 dix: IsFloating() on master devices is always false There are a few subtle bugs during startup where IsFloating() returns true if the device is a master device that is not yet paired with its keyboard device. Force IsFloating() to always return FALSE for master devices, that was the intent after all and any code that relies on the other behaviour should be fixed instead. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Tested-by: Jon TURNEY commit 2c23ef83b0e03e163aeeb06133538606886f4e9c Author: Peter Hutterer Date: Mon Feb 27 08:01:07 2012 +1000 Xi: prohibit multiple XIQueryVersion requests with different versions Return BadValue if major or minor differs on the second call. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit eb84c154ed38194c32651727b6dfe2d1bde4c599 Author: Peter Hutterer Date: Mon Feb 27 10:09:44 2012 +1000 dix: when rescaling from master, rescale from desktop dimensions (#46657) master->last.valuators[] is in desktop dimensions, so use those as rescale axis ranges, not the screen. Otherwise, a rescale on any screen not the top-left will cause out-of-bounds coordinates which will always map to the bottom-right screen, causing the device to be stuck on that screen. X.Org Bug 46657 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6b6afd3d013e3f4910fae3520d1d786df2b0e47a Author: Peter Hutterer Date: Thu Feb 16 15:11:40 2012 +1000 Xext: return BadAccess if PickPointer fails (#45796) PickPointer or PickKeyboard return NULL, all MDs are currently disabled and we cannot emulate a core event. This wasn't anticipated by the protocol, so we don't really have an error code we may use here - BadAccess is simply the least bad of the possible ones. And returning BadAccess beats crashing the server. X.Org Bug 45796 Signed-off-by: Peter Hutterer commit 9e017cf0cf1f0c9d0d9c2cfeb82ea5dc0eb5905e Author: Andreas Wettstein Date: Sat Feb 25 20:48:17 2012 +0100 XKB: Redirect actions defunct with Gtk3 (XInput?) When redirect actions are used with Gtk3, Gtk3 complained about events not holding a GdkDevice. This was caused by device IDs not being set for redirect actions. More seriously, Gtk3 did not receive state changes redirect actions might specify. This was because event_set_state in dix/inpututils.c accesses the prev_state field, but the changes for the redirect action were only put into the state field. Signed-off-by: Andreas Wettstein Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit ab3a815a75ab5695753fa37a98b0ea5293d4cb91 Author: Daniel Stone Date: Thu Mar 15 15:18:29 2012 +0000 Indentation: Change '& stuff' to '&stuff' If the typedef wasn't perfect, indent would get confused and change: foo = (SomePointlessTypedef *) &stuff[1]; to: foo = (SomePointlessTypedef *) & stuff[1]; Fix this up with a really naïve sed script, plus some hand-editing to change some false positives in XKB back. Signed-off-by: Daniel Stone commit 58b1f739d73b03ff7952ca986ed8746a7307fffe Author: Daniel Stone Date: Thu Mar 15 15:13:51 2012 +0000 Xinerama: Fix up obnoxiously-indented code Comments inside of conditionals confuse indent to death. Which is fair enough really. Signed-off-by: Daniel Stone commit 9838b7032ea9792bec21af424c53c07078636d21 Author: Keith Packard Date: Wed Mar 21 12:55:09 2012 -0700 Introduce a consistent coding style This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard Acked-by: Daniel Stone Acked-by: Alan Coopersmith commit 75199129c603fc8567185ac31866c9518193cb78 Author: Keith Packard Date: Wed Mar 21 12:33:19 2012 -0700 Handle blank betweeen type and name in sdksyms.sh indent sometimes adds a blank line between the type and the name in a function declaration that includes _X_EXPORT, so handle that before the files are re-indented. Signed-off-by: Keith Packard commit a615b90cab7569fae9d123e4da1d3373c871d84b Author: Keith Packard Date: Wed Mar 14 11:32:36 2012 -0700 Bump version number to 1.12.99.0 Now that 1.12 has branched, reset the version on master to a development number. Signed-off-by: Keith Packard commit 53204d5c8bd83c957fbdb7d3dc2891118ed7658b Author: Sascha Hauer Date: Sat Mar 3 14:09:25 2012 +0100 make busID non mandatory Currently the driver only probes a device when it has a busID. The busID is optional so don't depend on it. Signed-off-by: Sascha Hauer Signed-off-by: Dave Airlie commit bb7e39c1f2112f5fb7e87baddb114ab164fbc749 Author: Sascha Hauer Date: Sat Mar 3 14:09:27 2012 +0100 do not bail out on non pci devices To make the driver work on nin PCI devices we shouldn't bail out in this case. Signed-off-by: Sascha Hauer Signed-off-by: Dave Airlie commit 2b6848fcb3f85f9ce18a6de1dc6c3ac047101aa8 Author: Sascha Hauer Date: Sat Mar 3 14:09:26 2012 +0100 Fix non PCI device probing When no devicename is found in the option then the driver probes by PciInfo no matter if it's valid or not. Instead of doing this use PciInfo only when it's valid and fall back to the devicename otherwise. With devicename probing use open_hw() to fall back on the KMSDEVICE environment variable or to the default device. Signed-off-by: Sascha Hauer Signed-off-by: Dave Airlie commit 456a001e3f7a24f443cf0bad8400d5d600e2ad46 Author: Sascha Hauer Date: Sat Mar 3 14:09:24 2012 +0100 introduce open_hw() function probe_hw opens the hardware in the order we want it: first try devname, if this is NULL then try the KMSDEVICE environment variable and as a last fallback use "/dev/dri/card0". Instead of implementing the same code again when really opening the device move the code to a open_hw() function and let probe_hw use it. Signed-off-by: Sascha Hauer Signed-off-by: Dave Airlie commit aa6ceaaa843525b2243569de162ed0b17faa7510 Author: Sascha Hauer Date: Sat Mar 3 14:09:23 2012 +0100 fix if() brackets in Probe function in Probe() the indention shows what's meant but there are no brackets. Add them. Signed-off-by: Sascha Hauer Signed-off-by: Dave Airlie commit b1be72c5ca6cb98ba64637990b142be0f1710a19 Author: Keith Packard Date: Sun Mar 4 20:26:18 2012 -0800 Version bumped to 1.12 Signed-off-by: Keith Packard commit e08ed0b757b9b48344a301f612fabb3e39ffec78 Author: Gaetan Nadon Date: Sun Feb 26 17:51:50 2012 -0500 test: add new test cases to .gitignore Reviewed-by: Peter Hutterer Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 2416ee4a015068359807a10f433e8c54192c78a9 Author: Peter Hutterer Date: Wed Feb 22 15:32:56 2012 +1000 dix: avoid NULL-pointer dereference on button-only devices (#38313) And for such devices simply take the last.valuators[] which must be valid at all times anyway. UpdateSlaveDeviceCoords takes care of that. X.Org Bug 38313 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 38000e7d1f958f5944e641de3e716944a5876d41 Author: Jeremy Huddleston Date: Tue Jan 31 11:06:21 2012 -0800 Revert "dix: don't XWarpPointer through the last slave anymore (#38313)" This reverts commit 2bfb802839688ecf328119c4c6979390fc60348d. This commit caused a regression. See: http://xquartz.macosforge.org/trac/ticket/517#comment:10 Acked-by: Peter Hutterer commit cb6a32da27f09261c4d561c19d1877c750d98cc3 Author: Jeremy Huddleston Date: Fri Feb 17 13:44:12 2012 -0800 XQuartz: Short-circuit activateX: This also avoids a deadlock when calling activateX: before the server thread has initialized Signed-off-by: Jeremy Huddleston commit 1562c4a1ca748d2c4a8c69d57ba09ff7ca9cc453 Author: Jeremy Huddleston Date: Fri Feb 17 13:54:57 2012 -0800 XQuartz: Actually install the new locales Signed-off-by: Jeremy Huddleston commit 1349a2b7ab04553c8fddb60534400dea5cbd3cca Author: Dave Airlie Date: Wed Feb 22 10:07:06 2012 +0000 xf86-video-modesetting 0.2.0 commit e5648616d222966a95edd6c35807dcf5b91a0f96 Author: Dave Airlie Date: Wed Feb 22 09:59:12 2012 +0000 modesetting: fix warnings, remove dead code. Signed-off-by: Dave Airlie commit f7724167746d15c0ca32a7f5f95fb594addcddd1 Author: Gaetan Nadon Date: Sun Feb 19 16:13:34 2012 -0500 config: layout and comment the top portion of configure.ac Reorder statements to be consistent with other modules so things are easier to find. Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit a0bb835dc7db1ddd0472058a2a05a600ddea3930 Author: Gaetan Nadon Date: Sun Feb 19 08:36:19 2012 -0500 config: replace deprecated AC_HELP_STRING with AS_HELP_STRING Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit d56293cae78323b8976859c4461f8809a76a0b03 Author: Gaetan Nadon Date: Sun Feb 19 08:36:17 2012 -0500 make: add all warnings according to the platform The current code only adds -Wall and only for gcc. Automake reserves the use of CPPFLAGS for the user to override on the command line. This also breaks the option --enable-strict-compilation The variable CWARNFLAGS contains the complete set of warnings and is platform sensitive. Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit fa201fe8299099f7192a4399c9df245efcee3f8a Author: Gaetan Nadon Date: Sun Feb 19 08:36:16 2012 -0500 make: remove empty variable assignment Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit e159fbd8805005bb7a33bf2076fd2cef00e987c6 Author: Gaetan Nadon Date: Sun Feb 19 08:36:15 2012 -0500 Remove unneeded AM_PROG_CC_C_CO There are no objects in subdirs or compiled multiple times with different flags. Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit 70558492376e66b73063e51b128b5bbad14b84f4 Author: Gaetan Nadon Date: Sun Feb 19 08:34:28 2012 -0500 Remove redundant AC_PROG_CC Already covered by XORG_DEFAULT_OPTIONS Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit d4bb99ce754073de090221d98000f609a3891380 Author: Gaetan Nadon Date: Sun Feb 19 08:34:27 2012 -0500 Replace obsolete AM_CONFIG_HEADER with AC_CONFIG_HEADERS Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit 5c2d152cad66c3f8ed6a4e82c3e6a45269bbb66d Author: Gaetan Nadon Date: Sun Feb 19 08:34:26 2012 -0500 Add missing targets for ChangeLog and INSTALL Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit 8673f545cdb465b6e74f1d2fcabe29bc7fa0243d Author: Gaetan Nadon Date: Sun Feb 19 08:34:25 2012 -0500 Remove redundant EXTRA_DIST for the README file. Autotools know about it, it is always distributed. Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit 71594746c7da32e1c7986341a0da30f241a7a2be Merge: d53235af8 eaba06a27 Author: Keith Packard Date: Wed Feb 22 18:07:20 2012 +1300 Merge remote-tracking branch 'whot/for-keith' commit 88b637e59a37af8ec6c4c0783504b8f1a49e5595 Author: Gaetan Nadon Date: Sun Feb 19 08:34:24 2012 -0500 make: remove redundant AUTOMAKE_OPTIONS Already covered by AM_INIT_AUTOMAKE([foreign dist-bzip2]) Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit a7ea959094e9a8d862637a0ea515f687aaf89d29 Author: Gaetan Nadon Date: Sun Feb 19 08:34:23 2012 -0500 Fix typo in .gitignore Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit 861e2b444ffb24921e07fdc25ab2679c9b6d2f4d Author: Gaetan Nadon Date: Sun Feb 19 08:34:22 2012 -0500 man: missing AM_V_GEN and hard-coded sed command name Let's use the common xorg makefile for all drivers. This ensures no new problems are introduced. Improvements are welcome and to be applied to all drivers. Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit 453bbe5b442a9c21d7c22437545e487e2993ceb7 Author: Gaetan Nadon Date: Sun Feb 19 08:34:21 2012 -0500 Add contact information to the README file Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit dd1d7e3519ea2f148be83ef7ab0b228da95ff9c3 Author: Gaetan Nadon Date: Sun Feb 19 08:34:20 2012 -0500 Fill the COPYING file with license text This reflects the copyright license text in the source code Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit b0e12e250d4b3438fb3306155a7bbff3e2d7f9b7 Author: Dave Airlie Date: Mon Feb 20 11:08:40 2012 +0000 modesetting: disable dirty updates for ENOSYS the kernel can also return ENOSYS for this to say its not used. Signed-off-by: Dave Airlie commit c5529d68c5b01cf0f36d8f2ce3694a7a0f3333da Author: Dave Airlie Date: Mon Feb 20 11:05:59 2012 +0000 modesetting: fix shadow resizing. if we hotplugged and output, the shadow got disabled by accident. Signed-off-by: Dave Airlie commit f3b9e52b29e8b8c4b12bc2ce290ab44e88750ad9 Author: Dave Airlie Date: Mon Feb 20 11:00:56 2012 +0000 modesetting: move shadow stuff to other structure we need this for resize to work properly. Signed-off-by: Dave Airlie commit eb44a004b7230321ce6837ef44610153b1d2017b Author: Dave Airlie Date: Mon Feb 20 10:54:36 2012 +0000 modesetting: fix stride if kernel modifies it. If the kernel aligns things use its values instead. fixes output on nouveau here. Signed-off-by: Dave Airlie commit 2150cbda8c75d348f39926bbc23d3e4ca9b42c88 Author: Dave Airlie Date: Mon Feb 20 10:54:21 2012 +0000 shadowfb: dump shadowfb state at startup commit 86080a5f7a589e55a485c42bab47c6c8ff6428c1 Author: Dave Airlie Date: Thu Feb 16 19:41:40 2012 +0000 use a cap to decide if shadow is preferred or not. commit fc5f39acd49d023a82ab05fffde1b423b697753c Author: Dave Airlie Date: Thu Feb 16 19:41:30 2012 +0000 cleanup dumb cap fetch commit d94b3eaba9a33d0d78ed2d9acbc33394f40fdc2e Author: Dave Airlie Date: Mon Nov 14 11:22:44 2011 +0000 modesetting: add cursor fallback if kernel rejects cursor. If the kernel rejects a cursor, cause a fallback, this isn't 100% as we can lose the initial cursor, but it works fine once wm starts. Signed-off-by: Dave Airlie commit 594b3c4d6f6f748e08baffc4bc1c3ffad9b0d9cf Author: Dave Airlie Date: Thu Feb 16 19:31:33 2012 +0000 fix some whitespace commit 2e297978c928c571cf0a80e8d38423089014f07e Author: Dave Airlie Date: Wed Oct 5 15:12:43 2011 +0100 fixup device open Signed-off-by: Dave Airlie commit eaba06a27c5520a02f08431ac1e4b0e0bdc22cd8 Author: Chase Douglas Date: Mon Feb 13 16:00:48 2012 -0800 Keep virtual core pointer touch class around if new slave doesn't have one The VCP may have active touch grabs. The touch records must be kept so these touch grabs may be accepted/rejected in the future. This means the touch class list will not represent the touch class of the attached slave device if it does not have a touch class, but we already were breaking that assumption by keeping a separate touches array for the VCP. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8573b3519af138a3a12a2e77098718165f9fd8ff Author: Peter Hutterer Date: Mon Feb 13 16:00:47 2012 -0800 Don't clobber virtual core pointer touches array length The VCP has its own touches array, don't overwrite it when the class is copied from the SD to the master. Reported-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 03d32fe7a718d9016053cdb5d57f51a74ef99b59 Author: Chase Douglas Date: Mon Feb 13 12:09:32 2012 -0800 Don't dereference a touch after it has been ended when punting to next owner In this case, we have ended the touch because the last owner has rejected it. We need to return from the function right now so we don't attempt to dereference another touch client for early acceptance processing. Signed-off-by: Chase Douglas Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit 1ecb7aaf2adedad1996cd26176ef5802113e3ad9 Author: Chase Douglas Date: Sat Feb 11 07:58:38 2012 -0800 Focus event button state must show the logical buttons, not physical buttons Similar to the fix in fcda98c48610fd507ca0b89c6006a5497d9dc1c9. This ensures we show the correct logical state of the buttons in device focus events too. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 6f28388187cffae9e5bc9bfc9425acff4f478b59 Author: Peter Hutterer Date: Sat Feb 11 01:29:26 2012 +1000 dix: reset last.scroll when resetting the valuator (#45611) last.scroll remained on the last-submitted scrolling value but last.valuator was changed whenever the slave device changed. The first scrolling delta after a switch was then calculated as (last.scroll - new abs value), causing erroneous scrolling events. Test case: - synaptics with a scrolling method enabled, other device with 3+ axes (e.g. wacom) - scroll on touchpad - use other device - scroll on touchpad The second scroll caused erroneous button press/release events. X.Org Bug 45611 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit d53235af85d50774c68347720ce132daf9a5bc49 Author: Jeremy Huddleston Date: Mon Feb 13 23:06:07 2012 -0800 XQuartz: Build fix for possible conflict of BOOL type Signed-off-by: Jeremy Huddleston commit 62edd970f6f36058fcb31de4555eb7c1329cce74 Author: Keith Packard Date: Sat Feb 11 16:13:44 2012 +1300 Bump to version 1.11.99.903 (1.12 RC3) Signed-off-by: Keith Packard commit 42b6756463ee0476340656707f1088dc6c2fd220 Merge: 7674d00b0 ca64912c0 Author: Keith Packard Date: Sat Feb 11 15:36:43 2012 +1300 Merge remote-tracking branch 'alanc/master' commit 7674d00b04da5cf73cfa5c7ed1d3a9f42b59960e Author: Peter Hutterer Date: Fri Jan 27 12:41:09 2012 +1000 Xi: handle new XIAllowEvents request in inputproto 2.1.99.6 grab_window and touchid were removed from the struct for ABI compatibility reasons, we need to pull in the new, XI 2.2-specific struct. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit ceb026c6a6f1eea8b34e745f06f1ebcd652c0ba1 Author: Peter Hutterer Date: Fri Jan 27 12:41:09 2012 +1000 Xi: handle new XIAllowEvents request in inputproto 2.1.99.6 grab_window and touchid were removed from the struct for ABI compatibility reasons, we need to pull in the new, XI 2.2-specific struct. Signed-off-by: Peter Hutterer commit b96275c4cdb164aa71f7aa9fbf88be18886d1936 Author: Benjamin Otte Date: Tue Feb 7 18:01:25 2012 +1000 dix: fix an out-of-memory crash Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 6241b5e4fdbdb08d30cc8787d858ac27122d2d49 Author: Chase Douglas Date: Fri Feb 3 16:19:11 2012 -0800 Implement touch early accept This doesn't really implement early accept as it should. Ideally, the server should send end events to all subsequent touch clients as soon as an early accept comes in. However, this implementation is still protocol compliant. We can always improve it later. Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit b0c54856df71f9cabf9dad176fdade960ef8c5d9 Author: Chase Douglas Date: Fri Feb 3 16:19:10 2012 -0800 Implement early touch reject Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 656ab879f20892975510723ce8fe78faf64aadb4 Author: Chase Douglas Date: Fri Feb 3 16:19:09 2012 -0800 Check for proper window ID when processing touch allow requests Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 9a260e9af83feb5c53ffd3b2da2dc3adf06240a1 Author: Chase Douglas Date: Fri Feb 3 16:19:08 2012 -0800 Move AllowTouch to dix/touch.c, and rename to TouchAcceptReject Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 192b2c9a2ec04522655675ddfe71de5cf974cc7b Author: Chase Douglas Date: Fri Feb 3 16:19:07 2012 -0800 Export TouchEventRejected as TouchRejected This function is mostly correct for early reject usage. With a small change to pass the client resource explicitly and making the TouchOwnership event optional, it is usable for all rejection scenarios. This change exports it for use outside Xi/exevents.c and modifies the name accordingly. Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 19073425e5df1317f73f74ce0b95ab24e0e0da14 Author: Chase Douglas Date: Fri Feb 3 16:19:06 2012 -0800 Factor out TouchEnd generation and delivery The server often needs to generate and deliver TouchEnd events for circumstances including touch grab acceptance and rejection. This change refactors the code so it can be used more easily. Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit ab60cadc2afb9d8882144e30fde11c3ef0f999cd Author: Chase Douglas Date: Fri Feb 3 16:19:05 2012 -0800 Store window pointer in touch listener record Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit f92ba92adfce0e1975feb54ab0e1165b7c2a7bea Author: Peter Hutterer Date: Sat Feb 4 19:27:21 2012 +1000 Revert "dix: deduplicate callers of DeliverDeviceEvents in DeliverGrabbedEvents" This call was supposed to have no functional changes but in some cases DeliverDeviceEvents() was called with a uninitialised win variable. Revert, safer than trying to sort this out otherwise. This reverts commit 6eff14a789341d366b3013c5aa020e959c954651. Reported-by: Mathieu Taillefumier Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit ca64912c02bdff486fee420a49b11f54f8f5ba08 Author: Alan Coopersmith Date: Thu Jan 26 16:41:25 2012 -0800 Namespace list api to reduce conflicts with similar system headers Rename functions/macros from list_* to xorg_list_* Rename struct from struct list to struct xorg_list. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard In-sed-I-trust: Peter Hutterer commit 1541e242d1607d0db57b0cc12faca9b1c2850c67 Author: Alan Coopersmith Date: Fri Dec 23 15:17:28 2011 -0800 Stop including from xf86_OSlib.h on Solaris We don't need anything from that header (which defines /proc & kernel structures for process information), and it causes some namespace conflicts. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 85cecd981191f9c3dab0fb13310d91eff643d423 Author: Jeremy Huddleston Date: Sat Jan 28 16:06:28 2012 -0800 XQuartz: Release all buttons and keys when deactivating http://xquartz.macosforge.org/trac/ticket/486 Signed-off-by: Jeremy Huddleston Reviewed-by: Peter Hutterer commit 47b457541b33f00807fd495f5b0b24d5f143bf84 Author: Jeremy Huddleston Date: Sat Jan 28 23:11:44 2012 -0800 XQuartz: Toggle off fullscreen mode when XQuartz is hidden http://xquartz.macosforge.org/trac/ticket/478 Signed-off-by: Jeremy Huddleston commit c2ba3f339f089c595386c4c579935c7984a2a545 Author: Jeremy Huddleston Date: Sun Jan 29 14:26:47 2012 -0800 XQuartz: Localization Updates Signed-off-by: Jeremy Huddleston commit 052ca3f22eadd0aa60dd24ac7d5d76137273926f Author: Keith Packard Date: Fri Jan 27 22:08:08 2012 -0800 Bump version to 1.11.99.902 (1.12 RC2) Signed-off-by: Keith Packard commit bafedb7e9bcff31e2963eeb54669b2492214fae7 Author: Jeremy Huddleston Date: Wed Jan 18 11:52:04 2012 -0800 XQuartz: Bump bundle version to 2.7.2 Signed-off-by: Jeremy Huddleston commit 8e78bbb2d2dc5b18f127540b63b45ba293bbdd25 Author: Colin Harrison Date: Thu Jan 26 13:28:24 2012 +0000 hw/xwin: Fix spelling of 'Canadian' in winkeybd.h The Mounties always get their typo Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 80c073352a276bad3722263629de3cd61df758ab Author: Colin Harrison Date: Wed Jan 4 17:16:36 2012 +0000 hw/xwin: Fix winEnqueueMotion() for change in miPointerSetPosition() Commit 3b36fd1b49030ead44358945f62e5abe7f4609ce changed miPointerSetPosition() to take co-ordinates as doubles, not ints, so this code as it stands is now wrong (if it ever was correct in the first place :-)) It's unclear that we can safely promote x,y to doubles, apply miPointerSetPosition() which potentially constrains the cursor, and then convert back to ints. Fortunately, this whole dance seems to be unnecessary, and we can simply remove the call to miPointerSetPosition() entirely, and just QueuePointerEvents() like any other input driver. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit ced9db65950e402d7ddc663225b888e8482b8c57 Author: Colin Harrison Date: Wed Jan 25 01:37:16 2012 +0000 hw/xwin: Ignore WM_DISPLAYCHANGE messages with 0 bpp Ignore WM_DISPLAYCHANGE messages which indicate bpp is changing to 0. That has no defined meaning I can find, but some graphics card drivers appear to generate it on suspend/resume or screensaver activate/deactivate. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit bea6fb6c7af551778cfe1c0e8412ef4ccf560808 Author: Jon TURNEY Date: Sun Jan 22 19:31:51 2012 +0000 hw/xwin: Avoid WIN_WINDOW_PROP races during Windows window destruction The WIN_WINDOW_PROP is removed during WM_DESTROY handling, so it is not neccessary to remove it in winDestroyWindowsWindow(), and doing so opens a race condition, as we may attempt to access that property in the wndproc before the WM_DESTROY has completed. A specific example of that race is if a WM_KILLFOCUS occurs in the window between property removal and WM_DESTROY processing, where we will attempt to apply DeleteWindowFromAnyEvents() on an invalid (null) WindowPtr. Also guard against null WindowPtr in the WM_KILLFOCUS handler See http://cygwin.com/ml/cygwin-xfree/2012-01/msg00009.html Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9a709d5028094fcbeb7a49f47cb85e22cd772f36 Author: Jon TURNEY Date: Thu Sep 29 15:05:27 2011 +0100 hw/xwin: Handle more motif window decoration hinting Handle the MWM_DECOR_MINIMIZE, MWM_DECOR_MAXIMIZE and MWM_DECOR_MENU decoration hints in a _MOTIF_WM_HINTS window property Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b8b0b841a0e7cfcecaf0b6a5aa67e1b4499374d9 Author: Oliver Schmidt Date: Mon Sep 5 13:32:01 2011 +0100 hw/xwin: Fix AltGr key sometimes firing an additional Ctrl-L key I also had problems with the AltGr key. These could reliably be reproduced by holding the AltGr for some seconds (causing Windows generating auto repeat events) I discovered that the mechanism in winkeybd.c function winIsFakeCtrl_L had a problem if PeekMessage cannot obtain the next Alt_R message because it is not there yet. I prepared a patch that remembers the last Ctrl_L event and reacts on a later Alt_R. It was also necessary to alter the order in winWindowProc() in winwndproc.c: the invocation of winIsFakeCtrl_L had to be done before discarding auto-repeated key presses, as winIsFakeCtrl_L() now has an internal state which must be updated by all key events. Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3d3114d55a2a323f8d49c3549a0dfdf9d4acf89d Author: Jon TURNEY Date: Thu Jun 30 14:19:01 2011 +0100 hw/xwin: Handle the virtual key code generated by the Fn key on IBM Lenovo laptops Apparently, IBM Leonovo laptops can generate a key-press event for the Fn key, with virtual key code 0xFF and scan code extended 0x63 Handle this specially, rather than just passing on key code 0x63 (delete), so you don't delete what you just typed when you adjust the screen brightness, etc. :-) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 74af860f9a59332f6ed1ac9b3e7867fbbb3d7305 Author: Jon TURNEY Date: Wed Mar 24 22:41:22 2010 +0000 hw/xwin: turn on -emulate3buttons if less than 3 mouse buttons are reported Try to be more intelligent with default options, turn on -emulate3buttons by default if less than 3 mouse buttons are reported by Windows Also, add -noemulate3buttons option so this default setting can be reversed if desired Also, correctly report the number of mouse buttons windows is reporting, rather than always at least 3 Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c0f3709501a0afd3bf77e783f11d2c2e5f489d3b Author: Jon TURNEY Date: Thu Mar 24 20:19:47 2011 +0000 hw/xwin: In multiwindow mode, don't grab native input focus for new windows which hint they don't want it In multiwindow mode, avoid grabbing the input focus for newly created windows which have InputHint FALSE (this is used by e.g. glean to avoid every test window grabbing the focus) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 25caa8565d7d10f4c254bca5bb9efa05a77542ad Author: Jon TURNEY Date: Wed Jan 25 13:33:39 2012 +0000 hw/xwin: Remove some redundant OS version reporting Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a9aca218f557c723e637287272819a7c17174e1e Author: Roland Cassard Date: Sat Oct 23 18:12:36 2010 +0100 hw/xwin: Don't assume we'll always have converted the clipboard selection after 2 attempts Rather than knowing we have to call winProcessXEventsTimeout() for up to 2 WIN_XEVENTS_CONVERT messages, process all messages in winProcessXEventsTimeout() until either: (i) the time out expired, (ii) an error occurred, or (iii) received a WIN_XEVENTS_NOTIFY messaage indicating the data has been to put on the clipboard. Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 75fe336b6c903133ae386f5cb8d308a0e9e2768e Author: Michel Hummel Date: Fri Aug 6 15:23:52 2010 +0100 hw/xwin: Mitigate a race condition in clipboard thread initialization Remove the variables g_fClipboardLaunched and g_fClipboardStarted from winInitializeGlobals(), as their re-initialization is handled in the file hw/xwin/InitOutput.c. Re-initializing g_fClipboardLaunched and g_fClipboardStarted during the server reset procedure can lead to the clipboard thread being launched two times and sometimes leads to a crash of the X server... Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 95b1391fe3d3192abdfbad4140513b2112cfa02a Author: Jon TURNEY Date: Mon Apr 5 13:57:24 2010 +0100 hw/xwin: Chain IOError handlers to avoid longjmp across threads Avoid crashes on shutdown due to the undefined behaviour of calling longjmp() on the result of setjmp() from a different thread, by chaining IOError handlers and only jumping back up to the frame for this thread Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0659437f5ec0e3f646373394f5f9c5461e2170f3 Author: Yaakov Selkowitz Date: Sat Feb 20 23:40:53 2010 -0600 hw/xwin: Improve XWinrc loading and error recovery If $HOME/.XWinrc is present but badly formed, ignore it and try system.XWinrc instead. If neither file is present or both are badly formed, provide a built-in default which gives the user the chance to load their new or fixed configuration without restarting. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 47c7b6d3e626497747ae2780f259a15b8e6c846f Author: Michel Hummel Date: Sat Oct 23 18:35:57 2010 +0100 hw/xwin: Remove no-longer needed tricks used to prevent the clipboard client from being killed Remove no-longer needed tricks used to hide the clipboard client from XDM to prevent it from being killed - Delete XQuery wrapper used to hide clipboard client - Delete XDMCP mode heuristic which waits until some magic number of connections have been established before starting the clipboard We still need the EstablishConnection wrapper to ensure that the clipboard client isn't the first client (causing a server restart if it disconnects) Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit c1bf3baa44fbd8af33a2b3ce045324485b85a7a7 Author: Michel Hummel Date: Sun Oct 31 14:53:02 2010 +0000 hw/xwin: Automatically restart clipboard thread Automatically restart clipboard thread on unexpected exit Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit ae981341a98f7a1ee5d6f3bc8ebde04e42042dc5 Author: Jon TURNEY Date: Mon Feb 8 22:37:30 2010 +0000 hw/xwin: Give the X window for the clipboard integration client a name This makes it a bit easier to find when staring at the output of 'xwininfo -tree -root' Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b1093241f3e28223a139e7cb5c3ae85182bdf545 Author: Jon TURNEY Date: Tue Oct 19 20:47:21 2010 +0100 Xext: Warning fix for shm.c shm.c: In function 'CheckForShmSyscall': shm.c:182:5: warning: function declaration isn't a prototype [-Wstrict-prototypes] Signed-off-by: Jon TURNEY Reviewed-by: Alan Coopersmith Reviewed-by: Colin Harrison commit 02775efb8930291cc62fc84086c97da75b912a55 Author: Adam Jackson Date: Tue Jan 24 17:35:04 2012 -0500 int10: Fix unmapping of the BIOS scratch area 342f3eac8460fc48cfad1f1d7be939d671e6e1cd introduced a bug, 'base' is incremented before use. The old code corrected this when unmapping, so the new code should too. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit e1085a0da0b9299f48b3dc41dee5e33bf022bea5 Author: Chase Douglas Date: Wed Jan 18 19:09:21 2012 -0800 Don't set X and Y valuators for indirect touch events For expediency, it made sense to always have the X and Y axes set for direct touch device event propagation. The last X and Y values are stored internally. However, indirect device touch event propagation does not depend on the touch's X and Y values. Thus, we don't need to set the values for every indirect touch event. On top of this, the previous X and Y values aren't stored for indirect touches, so without this change the axes get erroneously set to 0. Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer commit 5201310559fe8708ba8278bdef77cdc1673fff71 Author: Daniel Stone Date: Thu Jan 19 22:40:32 2012 +1100 UngrabAllDevices: Don't kill clients if not told to The kill_client argument to UngrabAllClients specifies if we want to kill the client holding the grab or just deactivate the grab. Signed-off-by: Daniel Stone Reported-by: Julien Cristau Reviewed-by: Cyril Brulebois Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9b1e18f42a05a79d9ebec372a37b47442e397ca9 Author: Chase Douglas Date: Wed Jan 18 18:04:14 2012 -0800 Only update pointer motion data for pointer emulated touch events Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f00e5b02f5d9928cd88961e761da91b5faff1b32 Author: Chase Douglas Date: Wed Jan 18 18:04:13 2012 -0800 Only scale direct device touch coordinates Indirect touch devices provide valuator values in pure device coordinates. They also don't need to be fixed up for screen crossings. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 24dc0389da3970e83e4908039957567e55f9ea05 Author: Peter Hutterer Date: Mon Jan 16 12:53:39 2012 +1000 include: Fix comment typo Signed-off-by: Peter Hutterer commit 954bb994842aa43a0f272858e65036c016b729a4 Author: Jeremy Huddleston Date: Mon Jan 9 00:40:10 2012 -0800 configure.ac: Remove MIEXT_SHADOW_LIB from XORG_LIBS This is provided by dixmods/libshadow.so and is not part of the main binary. This addresses a build failure on darwin due to MIEXT_SHADOW_LIB having unsatisfied dependencies (FB_LIB) in XORG_LIBS. Signed-off-by: Jeremy Huddleston commit ba0f5cc1961bfcfb5e7d66ac5df19d429952631d Author: Jeremy Huddleston Date: Mon Jan 9 00:14:29 2012 -0800 xfree86: Don't link libxorgxkb against libdix.la libdix.a is already provided by XSERVER_LIBS. Including it in libxorgxkb results can result in duplicate symbols landing in the Xorg binary on some configurations (buggy glibtool on darwin). Signed-off-by: Jeremy Huddleston commit 2387fb23858d645f15061bc7bcbe4654386ba116 Author: Jeremy Huddleston Date: Fri Jan 13 12:00:14 2012 -0800 sdksyms.sh: Exit on error rather than building an empty symbol table Signed-off-by: Jeremy Huddleston Reviewed-by: Keith Packard commit cd89482088f71ed517c2e88ed437e4752070c3f4 Author: Jeremy Huddleston Date: Wed Jan 11 12:17:06 2012 -0800 test: Fix linking issues when building unit tests without the Xorg DDX This allows unit tests to build and run successfully on darwin when only the Xvfb or XQuartz DDX is built. Signed-off-by: Jeremy Huddleston Signed-off-by: Jon TURNEY Reviewed-by: Jon TURNEY commit 78d39b3222a4b0b92d840137f5455d3a20dd6906 Author: Jeremy Huddleston Date: Sun Jan 15 02:26:43 2012 -0800 Revert "glx: don't leak fbconfigs" This reverts commit d26fae246d7c451b4d5ffe24fdb959d4bd00b107. This patch free()s memory in __glXScreenDestroy which was allocated in glxdricommon (which isn't in every DDX). That breaks abstraction and causes a crash when XQuartz quits, because it results in freeing a pointer that was never allocated. The correct fix is to do this cleanup in __glXDRIscreenDestroy. Signed-off-by: Jeremy Huddleston commit f9e6858d5c10be6a8439c0f18bfb2325fa0ee070 Author: Chase Douglas Date: Wed Jan 11 07:38:12 2012 -0800 Use event time instead of CurrentTime for grab times When {XI,X,}AllowEvents is called, the timestamp is compared against the grab time to ensure that the request pertains to the current grab in the server. While many clients may use CurrentTime (client-side), the timestamp of the event causing the grab is also valid. This change ensures that the server's notion of the grab time is the time of the event that activated the grab rather than the time that the grab is actually activated. This bug was exposed through nested touch then pointer grabs. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit a6273cc85c01fc020643a68e49ca4e7a2d2ae898 Author: Peter Hutterer Date: Thu Jan 12 10:17:34 2012 +1000 xfree86: mention udev in the xorg.conf manpage AutoAddDevices section And point out what "hotplugging" means. Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau commit a60d87ffe6d9a15fa830c8da2947c72487863c2b Author: Peter Hutterer Date: Wed Jan 11 09:04:02 2012 +1000 os: prettify backtrace output Changes to output: * "Backtrace:" now appears on a separate line _with_ a timestamp * A blank line is inserted after the last backtrace line Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau commit c495a839ace7fcc1f1fe414d3d3ba04f08885434 Author: Peter Hutterer Date: Wed Jan 11 09:01:05 2012 +1000 include: prettify BUG_WARN output ErrorF output is prefixed with a timestamp, so the previous output would look like this: [ 50.423] BUG: triggered 'if (dev->valuator->numAxes < 2)' BUG: getevents.c:842 in scale_to_desktop() Change this to have the prefix on both lines: [ 50.423] BUG: triggered 'if (dev->valuator->numAxes < 2)' [ 50.423] BUG: getevents.c:842 in scale_to_desktop() Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau commit bbb6b8c834e0e1491ca14403b5d0840dd14380d3 Author: Peter Hutterer Date: Fri Jan 6 13:20:45 2012 +1000 render: don't bother with animated cursors on floating slaves (#39989) X.Org Bug 39989 Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit 35bd77e9d0701daae87d681900d749604fc6471f Author: Peter Hutterer Date: Mon Jan 9 15:04:10 2012 +1000 dix: Update pointer limits for floating devices too (#43635) When the screen is restructured, the pointer limits need to be reset for floating slave devices as well, not just for master pointers. Only skip devices that don't have a cursor (attached slaves and keyboard) Bug reproducer: float an absolute slave device, rotate the screen - the device is now confined to a section of the screen only. X.Org Bug 43635 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 5de0c2582f9c80874b4f4a5b86d250059bfaa85b Author: Keith Packard Date: Thu Jan 12 12:10:07 2012 -0800 Revert "os: Repack ConnectionOutput for LP64" This reverts commit d5f724544afd2949cebfcf4f0b4510ec0c701bec. ABI change pended for 1.13 commit 11331305d4acd117b71502e45c0e86684fa9280b Author: Keith Packard Date: Thu Jan 12 12:10:03 2012 -0800 Revert "dix: Repack ClientRec" This reverts commit f702372822dadb1fef92cfc25086481f640147b3. ABI change pended for 1.13 commit d9eeede52f2d5ba9dd6368d988a5d2abb3b8b4e5 Author: Keith Packard Date: Thu Jan 12 12:09:59 2012 -0800 Revert "dix: Pull client-is-local flag up to the ClientRec" This reverts commit 49d38b75c8f3276cfce33ffe6b8c4fbeb1081b96. ABI change pended for 1.13 commit 3be37375eed9eb9cfb9c42821deda4213af4057b Author: Keith Packard Date: Thu Jan 12 12:09:55 2012 -0800 Revert "dix: Extend initial connection handshake for forwarding proxies" This reverts commit 78fa121f4097d29458e5453c13473595df06e26e. ABI change pended for 1.13 commit 5b9f5c8a53aca03c3c73bc10bd362987621a9d72 Author: Keith Packard Date: Thu Jan 12 12:09:44 2012 -0800 Revert "os: Hide the Connection{In,Out}put implementation details" This reverts commit 48e7a2ef574c8b38c4f8f07b45f54c8bfd02552b. ABI change pended for 1.13 commit 5867d453cebebec6b4f10409af86b603755fbf51 Author: Keith Packard Date: Thu Jan 12 12:09:34 2012 -0800 Revert "dix: Fix types in WindowOptRec" This reverts commit a4553019a10b4e01cc06f3081db71a83338697b4. ABI change pended for 1.13 commit e722ad6c3efa57b806ca0f2dc13114bd3619a88c Merge: e476af417 4e44580ef Author: Keith Packard Date: Mon Jan 9 13:22:28 2012 -0800 Merge remote-tracking branch 'jturney/rpavlik-xwin-fixes' commit e476af417d83730b11054f4e5b127ab5540bb332 Merge: f4956faab 146008358 Author: Keith Packard Date: Mon Jan 9 13:17:37 2012 -0800 Merge remote-tracking branch 'whot/multitouch' commit f4956faab9ccf9aba6cf9603f4489f5dad19a347 Author: Zhigang Gong Date: Wed Jan 4 07:01:19 2012 +0000 mi/mibitblt: Fix an overflow bug of bit shift. When depth equal to 32 and planeMask equal to 0, the overflow will occur and cause the pixmap can't be cleared. There are some test cases in XTS hit this bug, and this fix can eliminate the corresponding failures. Signed-off-by: Zhigang Gong Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 6d6d4cb6043905d850834946e9bfc526ed5a9ef7 Author: Matthieu Herrb Date: Mon Jan 2 13:23:59 2012 +0000 Add OpenBSD support to DetermineClientCmd() Uses kvm_getargv() from libkvm. Signed-off-by: Matthieu Herrb Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit a55214d11916b707b7c8c65c555cc0cbb59ac503 Author: Adam Jackson Date: Tue Jan 3 06:22:24 2012 +0000 Always install xaa sdk headers Always install XAA SDK headers so drivers still build even with --disable-xaa Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Signed-off-by: Keith Packard commit dafc327f3c75205cf7e5360e9ccd71c7457f61a5 Author: Matthieu Herrb Date: Mon Jan 2 13:11:41 2012 +0000 UnloadSubModule(): accept pointer value '1' and ignore it. Some driver modules try to unload submodules that are now built-in. Signed-off-by: Matthieu Herrb Reviewed-by: Julien Cristau Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 8db029064bcbe378061e812bb8136608e3123226 Author: Adam Jackson Date: Wed Jan 4 16:39:33 2012 +0000 vgahw: Fix DACDelay() macro to use the driver's vtable We don't want to unconditionally use I/O routines here, since if the driver is using mmap'd VGA ports then the I/O handle won't be set up. Tested-by: Jeff Chua Signed-off-by: Adam Jackson Reviewed-by: Mark Kettenis Signed-off-by: Keith Packard commit 63a8012947fc44ccb3d661dec88dbda14e7f3c04 Author: Chris Halse Rogers Date: Thu Jan 5 01:22:40 2012 +0000 Revert "dix: don't return BadMatch from GetProperty (#23562)" This reverts commit f04fe06ae244b851b38be824b1a80f2f8a030591. dixLookupWindow no longer returns BadMatch. No other caller was checking for it, so this problem is now fixed in the utility function. Signed-off-by: Christopher James Halse Rogers Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit ef492e9797b6d4f6bbc25e86bedc24477819fde7 Author: Chris Halse Rogers Date: Thu Jan 5 01:22:39 2012 +0000 dix: Return BadWindow rather than BadMatch from dixLookupWindow dixLookupWindow uses dixLookupDrawable internally, which returns BadMatch when the XID matches a non-Window drawable. Users of dixLookupWindow don't care about this, just that it's not a valid Window. This is a generalised version of the fix for X.Org Bug 23562, where GetProperty was incorrectly returning BadMatch. Auditing other window requests, all that I checked would incorrectly return BadMatch in these circumstances. An incomplete list of calls that could incorrectly return BadMatch is: ListProperties, SetSelectionOwner, {Destroy,Map,Unmap}{,Sub}Window. None of the callers of dixLookupWindow, except for GetProperty, check for BadMatch Signed-off-by: Christopher James Halse Rogers Reviewed-by: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit ff891bbf68caefc22cabb541b6b56af086ac2280 Author: Arthur Taylor Date: Fri Jan 6 07:21:37 2012 +0000 linux: Use K_OFF VT KB mode over K_RAW if available. Linux kernels since 2.6.38 (March 2011) have an VT KB mode K_OFF in which special keys (like Ctrl+C) are not interpreted and input is not buffered. Use of this mode over K_RAW removes the need for a xf86ConsoleHandler to drain the VT input buffer, removing the grief it causes when it goes wrong or is (de)initialized out-of-order. (This also saves a few needless context switches per key event.) If K_OFF is not defined or not understood by the kernel, K_RAW and the previous method is used as a fall-back. Reviewed-by: Adam Jackson Signed-off-by: Arthur Taylor Signed-off-by: Keith Packard commit 0b113f7cdf5228dccd51a749a339c8669e3f20ff Merge: 0b2c6491c 777bf90ab Author: Keith Packard Date: Mon Jan 9 13:07:25 2012 -0800 Merge commit '777bf90abeac37087a3d0538b847742523d5acf2' commit 0b2c6491c5e5e1c9ba067299f3de61f5acee263b Merge: 1f5587e14 6b1943653 Author: Keith Packard Date: Mon Jan 9 11:40:23 2012 -0800 Merge remote-tracking branch 'whot/for-keith' commit 1f5587e14406c083687203030db6a11691ac9d9f Merge: a97252db2 6269977c9 Author: Keith Packard Date: Mon Jan 9 11:37:59 2012 -0800 Merge remote-tracking branch 'kibi/master' commit a97252db24669a3e26a935024ea38b8a28d30586 Author: Jeremy Huddleston Date: Tue Dec 20 19:49:47 2011 -0800 XQuartz: GL: Buildfix for recent GLX changes dispatch.h was leftover from an earlier implementation and is no longer needed, so remove it since including it causes a build failure due to conflicts between GL/gl.h and OpenGL/gl.h Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: Ian Romanick commit 6b194365364cb7a74c2b19f4a8c5e0e0404339da Author: Andreas Wettstein Date: Wed Nov 30 20:20:21 2011 +0100 xkb: Message actions suppress other key presses #28575 When a key to which a message action is mapped is held down, presses of other keys were not registered. Signed-off-by: Andreas Wettstein Reviewed-by: Daniel Stone Signed-off-by: Peter Hutterer commit 4e44580efd4522ced644c698336d2f6ea54f3917 Author: Ryan Pavlik Date: Fri Nov 4 14:29:01 2011 -0500 hw/xwin: Include manifest file in the dist tarball Commit c02638fd added the manifest file, but didn't add it to EXTRA_DIST. Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit c763fe51b8ff18e204caab9cf97376a1b72324f0 Author: Ryan Pavlik Date: Fri Nov 4 13:17:50 2011 -0500 hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW but still provide it if building for Win32 without autotools xserver/hw/xwin/winclipboard.h:42:0: warning: "HAS_WINSOCK" redefined ../../include/xwin-config.h:11:0: note: this is the location of the previous definition Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit 3d80f202b06227f7fc03b674f5fbf809c2d1efb2 Author: Ryan Pavlik Date: Fri Oct 28 09:56:19 2011 -0500 hw/xwin: Fix possible null ptr deref in winMWExtWMDecorateWindow() Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit c824004b4592b3d86b3514be7cab37b36642b13a Author: Ryan Pavlik Date: Fri Oct 28 09:56:11 2011 -0500 hw/xwin: Fix possible null ptr deref in winMWExtWMRestackFrame() Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit 3c501691a0a9fa17da4e2cc84f55010ef2a4790d Author: Ryan Pavlik Date: Fri Oct 28 09:52:34 2011 -0500 hw/xwin: Fix possible null ptr deref in winActivateAppPrimaryDD() Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit a492c02649de4c60ac21a7fcb6b7c730b558dca6 Author: Ryan Pavlik Date: Fri Oct 28 09:49:00 2011 -0500 hw/xwin: Fix possible null ptr deref in winActivateAppNativeGDI() Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit b907079596bc8600d3420c189409053b0b5016f6 Author: Ryan Pavlik Date: Fri Oct 28 09:46:56 2011 -0500 hw/xwin: Clarify an if statement mixed with ifdef in winSetEngine() Use the same pattern as elsewhere so it's a bit clearer what we are checking Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit 5c35dd7be716a3464f012c92866919a3606f9beb Author: Ryan Pavlik Date: Thu Oct 27 15:49:59 2011 -0500 hw/xwin: Fix rrScreenSetSize function pointer mismatch winrandr.c: In function ‘winRandRInit’: winrandr.c:218:31: warning: assignment from incompatible pointer type Fix winRandRScreenSetSize() function signature to match RRScreenSetSizeProcPtr type, to align with commit fd9331f6 'Revert "Separate out screen size and screen pixmap sizes in RRScreenSizeSet"' This is fall-out from the late revert of RANDR 1.4 in the 1.10 release cycle, it will probably need to be reverted if/when that goes back in again. Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit aa07d82908c28f4d083c0c55846a5b34f0e1ef31 Author: Ryan Pavlik Date: Fri Oct 28 09:56:26 2011 -0500 hw/xwin: Remove an empty #if 0/#endif Um... yeah Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit d459f42e64f2bafef5124a456d2ad6fa2cd92a7f Author: Ryan Pavlik Date: Fri Oct 28 09:52:37 2011 -0500 hw/xwin: Fix double-free in error path in winQueryRGBBitsAndMasks() Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit cc7dedd6b51a01996ddab10fe8b84e30700d1570 Author: Ryan Pavlik Date: Fri Oct 28 09:46:45 2011 -0500 hw/xwin: Fix a memory leak in error path in winInitWM() Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit 777bf90abeac37087a3d0538b847742523d5acf2 Author: Adam Jackson Date: Mon Jul 18 15:07:07 2011 -0400 xfree86: Remove the pretense of EDID v2 support We don't do anything with EDID v2 blocks besides publish them on the root window. Worse, the check deleted by this patch would attempt to take a checksum of arbitrary memory if the rawData array isn't 256+ bytes long (and, for the monitors mentioned, it probably is only 128). Reviewed-by: Mark Kettenis Signed-off-by: Adam Jackson commit 8f9bdfd293ad8e45755efe8d764b4dcc2a724f51 Author: Adam Jackson Date: Tue Dec 13 21:23:12 2011 -0500 dix: Tune dixLookupDrawable for success The vast vast vast majority of resource lookups are successful. Move some work to the error paths so we don't punish success. Before: 40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square After: 40000000 trep @ 0.0009 msec (1148346.9/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square Reviewed-by: Alan Coopersmith Signed-off-by: Adam Jackson commit 83a98543b58c661a22574a6f8d8f9d777c0955b8 Author: Adam Jackson Date: Tue Dec 13 20:23:40 2011 -0500 dix: Tune dtrace hooks around Dispatch Don't call LookupMajorName if the hooks aren't active, it's quite expensive. Before: 40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square After: 40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square Reviewed-by: Alan Coopersmith Signed-off-by: Adam Jackson commit 11977fab546da35d579ebe285e3c26864007805e Author: Adam Jackson Date: Tue Dec 13 21:00:05 2011 -0500 xace: ricer tuning for XaceHook gcc doesn't want to hoist the check for XaceHooks[hook] != NULL above the varargs code for some reason, so do it ourselves. Before: 40000000 trep @ 0.0010 msec (1050420.2/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (1921147.6/sec): ShmPutImage 10x10 square After: 40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square Reviewed-by: Alan Coopersmith Signed-off-by: Adam Jackson commit a4553019a10b4e01cc06f3081db71a83338697b4 Author: Adam Jackson Date: Fri Jun 17 14:30:06 2011 -0400 dix: Fix types in WindowOptRec No reason for these to be 64 bits on LP64. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit c44ef2e1ff7bad168c348da63477b4636b3054fd Author: Adam Jackson Date: Fri Jun 17 14:17:09 2011 -0400 os: Minor header cleanup Move some constants near their only users, and remove some getdtablesize() logic that's second-guessing configure. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 48e7a2ef574c8b38c4f8f07b45f54c8bfd02552b Author: Adam Jackson Date: Fri Jun 17 14:03:01 2011 -0400 os: Hide the Connection{In,Out}put implementation details Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 78fa121f4097d29458e5453c13473595df06e26e Author: Adam Jackson Date: Fri Jun 17 13:43:38 2011 -0400 dix: Extend initial connection handshake for forwarding proxies Forwarding proxies like sshd will appear to be local, even though they aren't really. This leads to weird behaviour for extensions that truly require running under the same OS services as the client, like MIT-SHM and DRI2. Add two new legal values for the initial connection's byteOrder field, 'r' and 'R'. These act like 'l' and 'B' respectively, but have the side effect of forcing the client to be treated as non-local. Forwarding proxies should attempt to munge the first packet of the connection accordingly; older servers will reject connections thusly munged, so the proxy should fall back to passthrough if the munged connection attempt fails. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 49d38b75c8f3276cfce33ffe6b8c4fbeb1081b96 Author: Adam Jackson Date: Fri Jun 17 13:22:41 2011 -0400 dix: Pull client-is-local flag up to the ClientRec Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit f702372822dadb1fef92cfc25086481f640147b3 Author: Adam Jackson Date: Fri Jun 17 12:58:25 2011 -0400 dix: Repack ClientRec sizeof(ClientRec) ILP32 LP64 before 120 184 after 104 136 Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit d5f724544afd2949cebfcf4f0b4510ec0c701bec Author: Adam Jackson Date: Thu Jun 16 17:40:24 2011 -0400 os: Repack ConnectionOutput for LP64 Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit ed8f3c4bd17bddf1369d050ea8e63b9451d887ce Author: Peter Hutterer Date: Fri Jan 6 10:10:16 2012 +1000 Xi: change XIChangeDeviceProperty from const pointer to const void * According to Daniel Kurtz, a typedef void *pointer is a atomic type. So a 'const pointer' is equivalent to 'void* const' instead of the intended 'const void*'. This technically changes the ABI, but we don't bump it for this. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 146008358e9dd9b178bd5305bcc1680ca16c328d Author: Chase Douglas Date: Thu Jan 5 16:43:40 2012 -0800 Remove last listener on touch reject The current code short-circuits around the block that removes the rejecting listener if it is the only listener left. It also does not delete the touchpoint record if the touch has not physically ended. This change ensures the listener is removed under these circumstances. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit e30c3c5c59abba9713cf3be532a46220aa9aeeca Author: Chase Douglas Date: Wed Jan 4 15:50:40 2012 -0800 Don't end touchpoint if owning client hasn't accepted/rejected A touchpoint is ended when no further processing will take place for it. This includes the situation where there is only one grabbing client, and the client receives a touch end before it has accepted/rejected the touchpoint. This change ensures that a delivered touch end event is converted into a touch update event under the above scenario. If the event is left as a touch end event, the touchpoint will be ended in ProcessTouchEvent(). Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 075a473e538efb771497b762101694b6c0c45c2b Author: Carlos Garnacho Date: Tue Jan 3 02:43:40 2012 +0100 dix: Set XITouchEmulatingPointer on events from the touch sequence emulating pointer events The internal flag is kept around, merely translated to XITouchEmulatingPointer when creating the XI2 events that will be delivered to the client. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit e8db10a033491059ddf2b4777c9fafed14c403e8 Author: Peter Hutterer Date: Fri Jan 6 13:49:04 2012 +1000 Require inputproto 2.1.99.5 Signed-off-by: Peter Hutterer commit 223ba8b46eacbc8e573bc5136a3d6677f3e39099 Author: Peter Hutterer Date: Thu Jan 5 15:55:04 2012 +1000 dix: fix wrong condition checking for attached slave (#44003) We need to update the master if the device is not a master _and_ it is not floating. X.Org Bug 44003 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 3ce102c362cadcd7087bdcf48440d9498eaf77d0 Author: Peter Hutterer Date: Thu Jan 5 07:08:01 2012 -0500 dix: on PointerRootWin send a FocusIn to the sprite window too XTS XSetDeviceFocus-7 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit a125aabda3a5cf27aa98cb61f16e49280b66f451 Author: Peter Hutterer Date: Thu Jan 5 07:02:51 2012 -0500 dix: send focus events to the immediate parent (#44079) For a transition from windows A to B, A->parent did not receive an event. DeviceFocusOutEvents sends to windows ]from, to[, so start with the actual window, not it's parent. X.Org Bug 44079 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Keith Packard commit 75953ccb9e9e5f1dbbaa44c714716a0049e22aae Author: Peter Hutterer Date: Tue Jan 3 10:45:45 2012 +1000 xfree86: split warning about missing identifier or input driver Check for identifier first and bail if it's missing (also remove the current identifier check after we've already bailed due to missing identifiers) If a driver is missing, warn but also say that we may have added this device already. I see too many bugreports with incorrectly shortened log files. Signed-off-by: Peter Hutterer Reviewed-by: Cyril Brulebois commit 6269977c91071e0ea16ca5b4b8e15fd6db0b6fcf Author: Julien Cristau Date: Fri Dec 30 20:41:25 2011 +0100 os: don't ignore failure from dladdr If dladdr returns 0, don't go and use the returned Dl_info, it may contain garbage. X.Org bug#44315 Reported-and-tested-by: Cyril Brulebois Reviewed-by: Jeremy Huddleston Reviewed-by: Cyril Brulebois Signed-off-by: Julien Cristau commit 644efb43e0639af648dd46d9729c2cabd9511238 Author: Cyril Brulebois Date: Fri Dec 30 02:34:36 2011 +0000 linux/ia64: Fix regression after domain I/O support code removal. Side effect of aa0bfb0f133481c57762012e8e30c05ffa151423: | CCLD Xorg | sdksyms.o:(.data.rel+0x27d8): undefined reference to `outl' | collect2: ld returned 1 exit status Since the linux/ia64 domain I/O support code got removed in that commit, there's no reason to keep on declaring those functions (inb, inl, inw, outb, outl, outw). Bugzilla: https://bugs.freedesktop.org/43985 Reviewed-by: Jeremy Huddleston Signed-off-by: Cyril Brulebois commit 98cde254acb9b98337ddecf64c138d38c14ec2bf Author: Keith Packard Date: Tue Dec 27 13:42:21 2011 -0800 Bump version to 1.11.99.901 (1.12 RC1) Signed-off-by: Keith Packard commit 5037c9af78da6652189de7202e70e1b833395af5 Author: Keith Packard Date: Tue Dec 27 14:02:01 2011 -0800 glx/glapioffsets.h is no longer part of the build, remove it Signed-off-by: Keith Packard commit 8dedf9831bd80514d800f0085213296a3726dba7 Merge: cfc4c3d7f cf9618312 Author: Keith Packard Date: Tue Dec 27 13:13:48 2011 -0800 Merge remote-tracking branch 'kibi/master' commit cfc4c3d7fa8bd4da4c08b2ab8e6f85435f75353a Author: Alan Coopersmith Date: Sat Dec 24 10:00:56 2011 -0800 Add Solaris support to DetermineClientCmd Uses /proc/pid/psinfo to read command & partial arguments. Moves cmdsize & argsize variables into non-Solaris #else clause to avoid unused variable warnings. Fixes format mismatch errors when building with DEBUG defined on a 64-bit platform (where Mask is defined as CARD32). Signed-off-by: Alan Coopersmith Reviewed-by: Rami Ylimäki Signed-off-by: Keith Packard commit a28ff2cf92c2b35e02eacca21af929afabbf6b83 Author: Chase Douglas Date: Thu Dec 22 12:00:37 2011 -0800 test/xi2: Really fix infinite loop in test_convert_XITouchOwnershipEvent long i; for (i = 1; ; i <<= 1) if (i == (1 << 31)) break; (1 << 31) is compiled as an int, and thus is equal to -2147483648. We are trying to compare it against a long, which on 64-bit machines is 2147483648. This results in an infinite loop. Signed-off-by: Chase Douglas Signed-off-by: Keith Packard commit e7df42ab68e30588a5e32ed543b0711821daf009 Author: Keith Packard Date: Thu Dec 22 09:35:51 2011 -0800 test/xi2: Fix infinite loop in test_convert_XITouchOwnershipEvent The touchid test was using a loop like: for(i = 1; i < 0xffffffff; i <<= 1) When 'i' is a 32-bit variable, this infinite loops as it goes from 0x80000000 to 0. 'i' is declared as 'long', which is 32-bit in 32-bit mode. Signed-off-by: Keith Packard commit cf96183122a85e3376e560f0360b38b5676e57a9 Author: Cyril Brulebois Date: Wed Nov 2 12:41:20 2011 +0100 xorg.conf.man: Fix bad whatis entry. Debian's QA tool “lintian” reported a bad whatis entry for the xorg.conf(.d) manpages. It comes with the following pointers: For manual pages that document multiple programs, functions, files, or other things, the part before "\-" should list each separated by a comma and a space. […] Refer to the lexgrog(1) manual page, the groff_man(7) manual page, and the groff_mdoc(7) manual page for details. Indeed, the current situation is: $ whatis xorg.conf; whatis xorg.conf.d xorg.conf (5) - (unknown subject) xorg.conf.d (5) - (unknown subject) With this patch: xorg.conf (5) - configuration files for Xorg X server xorg.conf.d (5) - configuration files for Xorg X server Reviewed-by: Alan Coopersmith Signed-off-by: Cyril Brulebois commit f75bdf7fbe757f4603e39139acc3c90538a45e15 Author: Peter Hutterer Date: Thu Dec 22 10:00:15 2011 +1000 test: fix grab mode value tests for new XIGrabModeTouch This test checks that last-valid-mode + 1 returns a BadValue. With the addition of XIGrabModeTouch, that value has changed - sync it up again. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e395efc25f9fd60377f32c2bf1a9153d70908236 Merge: 2bb282cd4 fcda98c48 Author: Peter Hutterer Date: Thu Dec 22 09:29:59 2011 +1000 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into multitouch Conflicts: configure.ac dix/inpututils.c Signed-off-by: Peter Hutterer commit 2bb282cd45cb8149b39d72397ef5bbcfebca11d2 Author: Peter Hutterer Date: Wed Dec 21 14:45:27 2011 +1000 Xi: only activate the device grab if we don't already have one If the device is already grabbed, don't activate the passive grab, it screws with our event masks. Just deliver to the grabbing client instead. Reported-by: Carlos Garnacho Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 475ef5cc8339fac3696fe654ef683f92f0b0cc2c Author: Carlos Garnacho Date: Wed Dec 21 01:08:40 2011 +0100 dix: fix xi2 mask/filter when delivering grabbed events Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 4551510f752624592f9201f73db89ac1325a234a Author: Peter Hutterer Date: Mon Dec 19 09:08:05 2011 +1000 test: add a basic test for ownership event values Signed-off-by: Peter Hutterer commit 0c661dc478b4b436a3e61066d31bc510c7a08456 Author: Peter Hutterer Date: Mon Dec 19 08:31:37 2011 +1000 test: drop printfs from protocol-eventconvert.c The test outputs are noisy enough, no need having these here too. Signed-off-by: Peter Hutterer commit 8080d785b2c1e5791312ed0975efd1b8aea58d98 Author: Peter Hutterer Date: Wed Dec 21 11:11:48 2011 +1000 dix: remove requirement for client_id be the first element Leftover code from an earlier version of GetTouchEvents. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 552de314bf0c8e4de5d002bdd1c12388c2f42283 Author: Peter Hutterer Date: Mon Dec 19 14:52:41 2011 +1000 dix: don't retrieve the syncEvents tail on an empty list An empty list points to itself but syncEvents has the list head only and is of a different format than the elements. Thus, casting it to a QdEventPtr gives us garbage. Segfaults with XTS test case Xlib13/XGrabKeyboard Introduced in 7af23259d88f4c28ed21140f82cc03b3724c06bb. Reported-by: Aaron Plattner Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 76c11e0872dedcd360cbe02cf62bb9de3b212957 Author: Peter Hutterer Date: Fri Dec 16 12:41:08 2011 +1000 dix: button state must show the logical buttons, not physical buttons If the device is mapped 3 2 1, a click on physical button 1 sends a button 3 press, but the state was set for button 1. Fix this, the state must be set for that button's logical mapping. https://bugzilla.gnome.org/show_bug.cgi?id=655928 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 8a32c39c00789c16006de61112627722ce548be1 Author: Peter Hutterer Date: Thu Dec 15 07:59:06 2011 +1000 mi: handle screen switching on pointer emulated touch events Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 48547068b115b1f5e5f46a70110454a2175fb9a4 Author: Peter Hutterer Date: Thu Dec 15 07:57:47 2011 +1000 mi: split move to new screen logic to a helper function No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 3b1e2035cc4740711360c845cfcdff07f7b60558 Author: Daniel Stone Date: Thu Dec 15 07:52:28 2011 +1000 dix: Remove touch grabs if the grab disappears Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit cd3de8324e8908955a2e4be3000c8ffee8684c68 Author: Peter Hutterer Date: Thu Dec 15 07:48:49 2011 +1000 dix: hook up passive grabs and pointer emulated passive grabs Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 5b169cb695bd450d7f64e3800f00c9237ee67f96 Author: Carlos Garnacho Date: Tue Dec 13 15:41:23 2011 +0100 Xi: assign correct grab_mode/other_device_mode in XI2 passive grabs CreateGrab() expects the keyboard mode to be stored in grab_mode, and the pointer mode in other_device_mode, so respect this in passive XI2 grabs, and switch modes if needed. Signed-off-by: Carlos Garnacho Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4469430b109fa2da7ba3d2fadf66eca78b7156a0 Author: Peter Hutterer Date: Thu Dec 15 07:42:12 2011 +1000 Xi: add the hooks for passive touch grabs Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit bb0af002dc9ad5b464dc6793aedb6d1ff65d001d Author: Peter Hutterer Date: Thu Dec 15 07:21:38 2011 +1000 Xi: handle grab accept/reject requests Consists mostly of generating an ownership event and processing it. Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 209b3d613a7bed126c81daedbad6461e4391e9e6 Author: Peter Hutterer Date: Tue Dec 20 16:34:43 2011 -0800 Xi: hook up touch ownership handling Ownership changes don't get processed directly when they happen, instead the DIX submits an ownership event which goes through ProcessTouchEvents and ProcessTouchOwnershipEvents. Then on the required events are generated and sent to clients. Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Chase Douglas commit 1894468c2b9788efa70ef4fb5fc911711402f3a7 Author: Peter Hutterer Date: Tue Dec 20 16:33:33 2011 -0800 Xi: hook up pointer emulation for emulating touches Includes a hack for implicit grab activation, because integrating this requires a larger rewrite and I'm not sleeping enough as it is. Right now, we deliver the event and check before/after if there is an implicit grab on. If one activated, then store the event in the grab and switch the listener type to a grab listener. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Chase Douglas commit 753c4dca1e42035e29fb21458a746e484ed93ca3 Author: Peter Hutterer Date: Wed Dec 14 17:04:38 2011 +1000 dix: add touch to pointer event conversion helper Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit c3843f5498a849920ab68cca3557411ad8ab3454 Author: Peter Hutterer Date: Wed Dec 14 17:02:30 2011 +1000 dix: add real_event parameter to ActivatePassiveGrab For touch events with pointer emulation, the event that triggers the grab (the pointer event) is not the same as the actual event (the touch event). For replaying, we need to store the real event then. No effective changes at this point, for the current caller event and real_event are identical. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e389a19a730055d4550ff708da83c78099a516fd Author: Peter Hutterer Date: Tue Dec 20 16:32:52 2011 -0800 Process and deliver touch events Does not include pointer emulation handling. Does include partial ownership handling but not the actual processing of ownership events. Note: this commit is a retroactive commit extracted from a series of ~50 commits and may thus appear a bit more complicated than what you'd write out from scratch. Pointer processing tree is roughly: - ProcessOtherEvents - ProcessTouchEvents - DeliverTouchEvents - DeliverTouchBeginEvent|DeliverTouchEndEvent|... - DeliverOneTouchEvent Also hooks up the event history playing to the right function now. Co-authored-by: Daniel Stone Co-authored-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Chase Douglas commit 634b0da9a83076d0e9e0fc44dc5dc77b0c368bc1 Author: Peter Hutterer Date: Thu Dec 15 07:53:19 2011 +1000 dix: set core and button state based on the touch state If a pointer-emulating touch caused a button to be logically down, set that state in the input events. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit dbfd7b37a0ba21899d8ebb7e0b324301bd466c49 Author: Peter Hutterer Date: Wed Dec 14 16:33:05 2011 +1000 Xi: make UpdateDeviceState aware of touch events Update the logical button state for pointer-emulating events. Button state must be kept separate from the ButtonClassRec to avoid clearing the button state on a touch end if there is a physical button still down. And obviously don't change the button state if we're currently replaying the event history for some client. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 593c3e2eb3da5c5fb957b68c8025dfdbe1139639 Author: Peter Hutterer Date: Wed Dec 14 16:30:05 2011 +1000 dix: add TouchResourceIsOwner helper function The first listener in the sequence is the owner of the touch sequence. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 5d0260cc986e8c1f0907870b851d47fd73bb1b7d Author: Peter Hutterer Date: Wed Dec 14 16:24:17 2011 +1000 dix: add helper functions for adding/removing touch listeners The DIX will call TouchSetupListeners once for a new touch. After that the listener list remains static, with listeners only dropping out when they either reject the grab or disappear. Exception: if grabs activate they are prefixed to the listeners. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6a68f97ce6704dd2ff2a50f91acd2da72c9995bd Author: Chase Douglas Date: Wed Dec 14 16:26:04 2011 +1000 dix: add TouchGetPointerEventType helper function Returns the respective pointer event type for a given touch event type. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 8e58ce73c8b79cb86e890369d0216cdd850c52a5 Author: Daniel Stone Date: Wed Dec 14 16:53:04 2011 +1000 dix: when a window disappears, remove it from the touch sprite trace Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit c18a173cf5f53778356c5e8f25ab132956f8c27d Author: Daniel Stone Date: Wed Dec 14 16:03:01 2011 +1000 dix: add helper functions to build up/verify the sprite trace Touch events' sprite trace stays the same for the duration of the touch sequence. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Chase Douglas commit 40475261eacabb79a824db1138407a9d0f9fe37f Author: Peter Hutterer Date: Wed Dec 14 15:56:05 2011 +1000 dix: add touch event history helper functions If touch client has not registered for ownership events and a grab above that client is rejected, the client needs to receive the complete event history. The history currently doesn't really do fancy overflow handling. We assume that the first TOUCH_HISTORY_SIZE events are the important ones and anything after that is dropped. If that is a problem, fix the client that takes > 100 event to decide whether to accept or reject. Events marked with TOUCH_CLIENT_ID or TOUCH_REPLAYING must not be stored in the history, they are events created by the DIX to comply with the protocol. Any such event should already be in the history anyway. A fixme in this patch: we don't have a function to actually deliver the event yet. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b274c472a5ad700aea5fe651d677e8cb34ffc976 Author: Peter Hutterer Date: Wed Oct 26 09:08:17 2011 +1000 Support XI 2.2 officially Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit d2af968cb65873780a6e61342d5d3c23b9654e2a Author: Daniel Stone Date: Wed Dec 14 15:45:19 2011 +1000 Xi: allow selecting for touch events Selecting for any of XI_TouchBegin/Update/End/Ownership requires the three bits for begin/update/end to be set. Only one client at a time may select for XI_TouchBegin event Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit f3df3ad668fcd417ffb5afa3bea79a73a348bc1a Author: Peter Hutterer Date: Wed Dec 14 16:45:04 2011 +1000 dix: handle DIX-submitted touch events The DIX needs to submit touch events for e.g. TouchEnd after an acceptance/rejection. These have the TOUCH_CLIENT_ID flag set. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit fcda98c48610fd507ca0b89c6006a5497d9dc1c9 Author: Peter Hutterer Date: Fri Dec 16 12:41:08 2011 +1000 dix: button state must show the logical buttons, not physical buttons If the device is mapped 3 2 1, a click on physical button 1 sends a button 3 press, but the state was set for button 1. Fix this, the state must be set for that button's logical mapping. https://bugzilla.gnome.org/show_bug.cgi?id=655928 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 47da6b6b2c2e9245422655f94770146fb8cd430b Author: Peter Hutterer Date: Mon Dec 19 14:52:41 2011 +1000 dix: don't retrieve the syncEvents tail on an empty list An empty list points to itself but syncEvents has the list head only and is of a different format than the elements. Thus, casting it to a QdEventPtr gives us garbage. Segfaults with XTS test case Xlib13/XGrabKeyboard Introduced in 7af23259d88f4c28ed21140f82cc03b3724c06bb. Reported-by: Aaron Plattner Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 2d34b34ed7547b829979756ccfb2cff79368d0a4 Merge: e4b4d83fa 1deede3c4 Author: Keith Packard Date: Tue Dec 20 00:23:33 2011 -0800 Merge remote-tracking branch 'jeremyhu/master' commit e4b4d83fad37bb737e25f7226dbcd15b892f9528 Merge: 4df65d247 d26cb7027 Author: Keith Packard Date: Mon Dec 19 22:36:31 2011 -0800 Merge remote-tracking branch 'idr/glx-fixes' commit 4df65d247b56c6b1b06e17a61236d6637312cdbb Author: Ville Syrjälä Date: Sun Dec 18 18:29:41 2011 +0200 dri2: Invalidate window pixmaps While a redirected window is flipped, its pixmap may still be used as and EGL image and should also get invalidated. When sending invalidate events for a window, also send the events for its pixmap. Signed-off-by: Ville Syrjälä Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit e8fd23fad046877ca0ee08c1e147557756debc8e Author: Keith Packard Date: Sun Dec 18 18:29:40 2011 +0200 dri2: Invalidate DRI2 buffers for all windows with the same pixmap on swap Without this, when a compositing manager unredirects a fullscreen window which uses DRI2 and page flipping, the DRI2 buffer information for the compositing manager's output window (typically the Composite Overlay Window or root window) may become stale, resulting in all kinds of hilarity. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35452 . [Original patch by Michel Dänzer ] [Tree walk optimized version by Keith Packard ] Signed-off-by: Ville Syrjälä Signed-off-by: Keith Packard commit 6f916ffec7767eeab62132eb6575043969104c81 Author: Michel Dänzer Date: Sun Dec 18 18:29:39 2011 +0200 dri2: Always re-generate front buffer information when asked for it. Otherwise we might keep stale cached information, e.g. after the driver performed page flipping. This is part of the fix for https://bugs.freedesktop.org/show_bug.cgi?id=35452 . Signed-off-by: Michel Dänzer Reviewed-by: Ville Syrjälä Reviewed-by: Mario Kleiner Signed-off-by: Keith Packard commit 603fcb3abf155e91fd3250f4a7aa16f289506e8e Author: Rami Ylimäki Date: Sun Dec 18 18:29:38 2011 +0200 dri2: Initialize needInvalidate member of DRI2Drawable. If the client is not behaving correctly and swaps buffers before getting them, Valgrind will complain about uninitialized memory being used in DRI2InvalidateDrawable. Signed-off-by: Rami Ylimäki Reviewed-by: Ville Syrjälä Signed-off-by: Keith Packard commit 3aca8199405cff5097ee5813605ec78b5ae44a43 Author: Peter Hutterer Date: Fri Dec 16 09:15:25 2011 -0500 dmx: force -fno-strict-aliasing for xinput example Compiler warning: xinput.c:272: warning: dereferencing pointer 'e' does break strict-aliasing rules The code itself is the usual XInput client-side code: XEvent event; XDeviceMotionEvent *e = (XDeviceMotionEvent *)&event; XNextEvent(display, &event); printf("%d\n", e->type); Since XDeviceMotionEvent is not guaranteed the same size as XEvent, clients must use pointer aliasing as above when using the XNextEvent API. Disable strict aliasing for this example. Reviewed-by: Peter Hutterer Reviewed-by: Gaetan Nadon Signed-off-by: Peter Hutterer Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 1deede3c48d5ac91f50774c79f02afc6e036614e Author: Jeremy Huddleston Date: Sat Dec 17 12:56:59 2011 -0800 kdrive/linux: Fix compilation with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast Reported-by: Arkadiusz Miśkiewicz Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp commit d0170d54c71fc761b8f1ae7a0e555dc2ca23cf9c Author: Jeremy Huddleston Date: Sat Dec 17 12:25:26 2011 -0800 configure.ac: Make Xephyr dependency error message more informative Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp commit 511beddffab3c4fd43c75556132159117b6ba884 Author: Jeremy Huddleston Date: Fri Nov 25 09:45:25 2011 -0800 XQuartz: Provide in-tree implementation of strndup(3) if needed This function was added to Mac OS X 10.7, so we need to provide it for earlier releases. Signed-off-by: Jeremy Huddleston commit 9ce8463a3334f76f128bb35b541aa6e67b4e4374 Author: Daniel Stone Date: Wed Dec 14 15:41:07 2011 +1000 dix: generate touchpoints from driver-submitted data The touchpoints are generated, enqueued but not processed since we don't handle them in the event processing yet. Co-authored-by: Peter Hutterer Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit bec51f5ec6575a1971ae5371a4b6d8563933032c Author: Daniel Stone Date: Wed Dec 14 15:29:48 2011 +1000 dix: add GetTouchOwnership event API No callers yet. This API is not to be used by drivers, it's an API for the DIX which will create ownership events mainly on touch acceptance/rejection. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 5c63dc6dbcbebbb19d79575a9f1ec9878e6537f1 Author: Peter Hutterer Date: Wed Dec 14 14:57:46 2011 +1000 dix: add DIX API to create touchpoints The DIX touchpoints are the ones used for event processing. Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 7f8127d203394cae45c3ded0d063030d7c5fdb70 Author: Peter Hutterer Date: Wed Dec 14 14:53:52 2011 +1000 dix: if we run out of space for new touch events, resize the queue The SIGIO handler forces us to drop the current touch and schedule the actual resize for later. Should not happen if the device sets up the TouchClassRec with the correct number of touchpoints. Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit d26cb70272a1245a7b1db639cebeddafd8ed4c40 Author: Ian Romanick Date: Thu Dec 8 12:07:38 2011 -0800 glx: use dispatch.h instead of glapioffsets.h Signed-off-by: Ian Romanick Reviewed-by: Adam Jackson commit 66e6037c334c2bcfe6e60d24cac83a8d6087fdd5 Author: Ian Romanick Date: Mon Dec 5 15:27:08 2011 -0800 glx: Regenerate GL API files from Mesa Adam reviewed the underlying changes in the Mesa generated scripts. Signed-off-by: Ian Romanick Reviewed-by: Adam Jackson commit e8485768c1f1d9d9fb7ca9e52ff61175b7bb80e1 Author: Ian Romanick Date: Tue Dec 6 12:30:17 2011 -0800 glx: Add stub implementations of next GLX extension functions Generated code from Mesa contains dispatch for GLX_ARB_create_context and GLX_ARB_create_context_profile. Provide stub implementations of these functions so that the GLX extension will link. Signed-off-by: Ian Romanick Reviewed-by: Adam Jackson commit 2df539c0bc3300ea858f8bc7d52e95e67ff379b8 Author: Ian Romanick Date: Mon Dec 5 14:42:35 2011 -0800 glx: Only declare GlxExtensionInit in one header file This silences the GCC warning: In file included from singlepixswap.c:36:0: glxext.h:47:13: warning: redundant redeclaration of 'GlxExtensionInit' [-Wredundant-decls] glxserver.h:80:6: note: previous declaration of 'GlxExtensionInit' was here Signed-off-by: Ian Romanick Reviewed-by: Adam Jackson commit 758bc57ba5a89f765d83f0b169aa09e79a89bf89 Author: Peter Hutterer Date: Wed Dec 14 14:48:56 2011 +1000 dix: add helper functions to create DDX touch recs DDX touch points are the ones that keep records of the driver-submitted touchpoints. They're unaffected by the grab state and terminate on a TouchEnd submitted by the driver. The client ID assigned is server-global. Since drivers usually submit in the SIGIO handler, we cannot allocate in the these functions. Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 1a133eb8b1ddbe0da7c2fbf7f6a686ec4512373e Author: Peter Hutterer Date: Thu Dec 15 08:30:02 2011 +1000 xfree86: bump the input ABI for the touch changes New additions to the API: - InitTouchClassDeviceStruct - xf86PostTouchEvent Changes to the ABI: - DeviceIntRec now contains a TouchClassPtr Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 3fb258ca28850c998097b55884774cb95f476f69 Author: Daniel Stone Date: Wed Dec 14 12:46:40 2011 +1000 input: add a TouchClassRec to the devices These structs will be used to store touch-related data, events and information. Drivers must call InitTouchClassDeviceStruct to set up a multi-touch capable device. Touchpoints for the DDX and the DIX are handled separately - touchpoints submitted by the driver/DDX will be stored in the DDXTouchPointInfoRec. Once the touchpoints are processed by the DIX, new TouchPointInfoRecs are created and stored. This process is already used for pointer events with the last.valuators field. Note that this patch does not actually add the generation of touch events, only the required structs. TouchListeners are (future) recipients of touch or emulated pointer events. Each listener is in a state, depending which event they have already received. The type of listener defines how the listener got to be one. Co-authored-by: Peter Hutterer Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 098b837440e40bbc485368ec9658e12efd6ef581 Author: Daniel Stone Date: Wed Dec 14 14:41:48 2011 +1000 Add the touch input API stubs xf86PostTouchEvent is the driver API to submit touch events to the server. This API doesn't do anything yet though but now we can at least bump the API. For valuators, drivers should use the existing xf86InitValuatorAxisStruct function. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 93c2a1628a9f6e7480d834bf55c080997fd18911 Author: Peter Hutterer Date: Wed Dec 14 13:51:12 2011 +1000 Hook up the ownership events This patch applies most of the protocol conversions and the internal event type for ownership events. Note that ownership events are generated by the DIX only, they do not pass through the event queue. Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit c065f7b16329e30cb976359e0a807c2adaf50123 Author: Keith Packard Date: Sat Dec 17 17:22:45 2011 -0800 Version 1.11.99.2 (1.12 snapshot 2) Signed-off-by: Keith Packard commit ead968a4300c0adeff89b9886e888b6d284c75cc Author: Antoine Martin Date: Sat Dec 17 01:36:51 2011 +0700 xserver: check for elevated privileges not uid=0 This allows us to run the server as a normal user whilst still being able to use the -modulepath, -logfile and -config switches We define a xf86PrivsElevated which will do the checks and cache the result in case it is called more than once. Also renamed the paths #defines to match their new meaning. Original discussion which led to this patch can be found here: http://lists.freedesktop.org/archives/xorg-devel/2011-September/025853.html Signed-off-by: Antoine Martin Tested-by: Michal Suchanek Reviewed-by: Jamey Sharp Reviewed-by: Adam Jackson commit 3390d3fc0347947796aa245d70fefecf59b7bfe4 Author: Peter Hutterer Date: Wed Dec 14 13:21:59 2011 +1000 Xi: process raw touch events No-one can generated them yet, but if they could, we'd be processing them like there was no tomorrow. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 84db813b9db34975b5fe288a8a551bb98f0cc1c1 Author: Peter Hutterer Date: Wed Dec 14 12:45:28 2011 +1000 Hook up TouchBegin/Update/End events The are the same as device events internally but require the touch ID separately from the detail.button field (the protocol uses the detail field for the touch id). For simpler integration of pointer emulation we need to set the detail.button field while keeping the touchid around. Add the three new touch event types to the various places in the server where they need to be handled. The actual handling of the events is somewhat more complicated in most places. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 92a5862d0c120b009a688237ec7142b7c21ae272 Author: Peter Hutterer Date: Wed Dec 14 15:00:33 2011 +1000 include: add a bunch of flags for GetTouchEvent processing TOUCH_CLIENT_ID is set if the touch was generated from a client ID instead of a DDX/driver touch ID. i.e. submitted by the dix. TOUCH_END is a special flag that's required to force the touch to end. Since the protocol with grab replaying and pointer emulation is rather complex, it's quite hard to know otherwise when a touch sequence should really die. The others do what it says on the imaginary box. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 956a97487beada8cf5f354550ff779635cc64361 Author: Peter Hutterer Date: Wed Dec 14 12:19:27 2011 +1000 include: RawTouchEnd is the last event now Plus, use the actual definition from the protocol instead of the numeric values. Turns out not everyone knows the protocol event IDs by heart. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 92c6c0c1d2d6a8882ed97b0e7f2952978ee5ce82 Author: Peter Hutterer Date: Wed Dec 14 12:15:29 2011 +1000 tests: update for touch support Touch event mask must be set for all three event types. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Chase Douglas commit 731b1db2fcc82c0a8afd28d7f28363c1db0a20ce Author: Peter Hutterer Date: Wed Dec 14 10:41:17 2011 +1000 Require inputproto 2.1.99.3 Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Chase Douglas commit 4c825eae89063fdc2241f92ab4101ba682b5b4b7 Author: Peter Hutterer Date: Wed Nov 2 10:38:26 2011 +1000 Xi: add a FIXME All the DeepCopy stuff really needs to be shared between the init calls the drivers use and this code here. Too many bugs by not keeping the two in sync. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Chase Douglas commit 0b9d2e426defabbf6df7e872e158b080a6a5e0be Author: Peter Hutterer Date: Wed Dec 14 13:21:03 2011 +1000 Xi: split ProcessOtherEvent into ProcessDeviceEvent No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Chase Douglas commit 190a6f45ee7412870b3d95c5db6c1079a285bc59 Author: Peter Hutterer Date: Fri Dec 16 09:52:43 2011 +1000 dix: split positionSprite into scale_to_desktop and positionSprite For future touch points, we need positionSprite to calculate the coordinates but we don't want to actually change the cursor position for non-emulating touches. No functional changes at this point. Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp Reviewed-by: Chase Douglas commit 2c1d0a539c0fb1860ac89a00d1fb609f1959e1b6 Author: Gaetan Nadon Date: Fri Dec 9 07:45:02 2011 -0500 dmx: fix distcheck failure, missing compsize.h in Makefile.am which was added in commit: dmx: Build fix for -Werror=implicit-function-declaration Reviewed-by: Peter Hutterer Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit ff6d9c79c1aa502f1aef81d8063425e5fc002534 Author: Peter Hutterer Date: Thu Dec 15 10:19:26 2011 +1000 include: fix BUG_WARN_MSG for constant messages only Previous declaration required the use of a message + printf varargs. We obviously want to allow the use of just a message. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit f7ea7a324520844beaac8be7503ac50e20da5ab1 Author: Peter Hutterer Date: Wed Dec 14 10:34:19 2011 +1000 configure: split the required modules up We do the same thing for libraries and optional modules already, and it's much easier to read when one of them changes Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Gaetan Nadon Signed-off-by: Keith Packard commit 7da7aa96a0acb895e1fe57a9d3f2d093479cf2a2 Merge: b79de3f42 7528a6b88 Author: Keith Packard Date: Wed Dec 14 11:40:10 2011 -0800 Merge remote-tracking branch 'whot/for-keith' commit 4c80dc1394344dc10cffe4f757c980944312dc3d Author: Peter Hutterer Date: Wed Dec 14 10:31:23 2011 +1000 configure: split the required modules up We do the same thing for libraries and optional modules already, and it's much easier to read when one of them changes Signed-off-by: Peter Hutterer commit 7528a6b88eb32098af4369a8bd9d70a808fa6f1c Merge: f0de5e399 898d97672 Author: Peter Hutterer Date: Tue Dec 13 14:19:54 2011 +1000 Merge branch 'for-whot' of git://people.freedesktop.org/~alanc/xserver into for-keith commit f0de5e3990b70df9899b7dd17d7ee6ff7c768183 Author: Peter Hutterer Date: Sun Dec 11 07:31:43 2011 +1000 dix: add a MAXEVENTS define for the number of core + extension events Not including GenericEvents Signed-off-by: Peter Hutterer Reviewed-by: Walter Harms Reviewed-by: Chase Douglas commit adf8a0d62c0643f4c44a3b6d2e3c6c9b02532915 Author: Peter Hutterer Date: Fri Dec 9 18:38:53 2011 +1000 dix: move event filter retrieval helpers to inpututils.c No functional changes Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Chase Douglas commit a03fe819506fbcbfcb299d4919d16061603fd4ec Author: Peter Hutterer Date: Fri Dec 9 18:02:49 2011 +1000 dix: switch EventIsDeliverable to take the event type only Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Chase Douglas commit 10a8c428fac0d4ff8f8a3e3487c13dd349d27ed7 Author: Peter Hutterer Date: Fri Dec 9 15:49:04 2011 +1000 dix: move storing last.valuators into a helper function Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit a15abf82ddb5a209dbc30c4d12e1dc23c4adf3e4 Author: Peter Hutterer Date: Thu Dec 8 15:38:44 2011 +1000 dix: always allocate and set the grab's sync.event Allocate the memory at device creation time and always store the event, even if we're not frozen. This way we know which event triggered the grab. Since the event was never freed anyway except on device shutdown, this doesn't really change things much. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 218752bdc5d9323d1e6202e762573a925cf8a4eb Author: Peter Hutterer Date: Thu Dec 8 14:27:01 2011 +1000 input: replace GRABTYPE_* with the InputLevel enums They achieve the same thing, re-use the more generic InputLevel so we can convert to/fro easier. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit cd56bd7b3ee34a4b10eb3a57a6e94cac7512167a Author: Peter Hutterer Date: Thu Dec 8 14:59:06 2011 +1000 Add GrabIsPointerGrab and GrabIsKeyboardGrab helpers No functional changes Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 47734b2ba2e1f9246fd1a3b7059ca60b0e15acb2 Author: Peter Hutterer Date: Thu Dec 8 12:00:34 2011 +1000 dix: move delivery stop condition out of event mask Previously, this was only called if there was a mask match, so even if we had a no-propagate flag set or a stopAt window specified, if no mask triggered on the window we would recurse up to the root window and eventually deliver. Move this, so that the stopAt and do-not-propagate mask is honoured. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 1d01e861b69d7ca8fe2335270b8286bc115fb6e9 Author: Peter Hutterer Date: Thu Dec 8 10:22:26 2011 +1000 dix: split out core state and event state setting into helper functions no functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit fb010c543696b781a83b945f72865b7d7b75bf95 Author: Peter Hutterer Date: Wed Dec 7 14:41:18 2011 +1000 dix: move grab matching code into a helper function No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit d253a262c2c690357a4db7e235c48ab5dd0b77f8 Author: Peter Hutterer Date: Wed Dec 7 13:57:25 2011 +1000 dix: split core grab interference check into helper function No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 97d79dd740ed1ac4eb02b0d4135850f953716278 Author: Peter Hutterer Date: Wed Dec 7 13:54:28 2011 +1000 dix: compare the grab type, not the tempGrab type No functional change. To get here, GrabMatchesSecond() needs to be TRUE and for that the two grab types must be identical. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b9d6ae42b686287d7d23c2eefe2b12da98fe6ff8 Author: Peter Hutterer Date: Wed Dec 7 15:43:31 2011 +1000 dix: remove event type check Can't remember why this is there but we'll need to pass in XI2 events soon, so this check is obsolete. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 80816366aa77f1730a1b6ddabfa55a946d76d494 Author: Chase Douglas Date: Fri Nov 25 13:57:03 2011 -0800 dix: Split ActivatePassiveGrab() from CheckPassiveGrab() The changed logic means we don't require the explicit grab = NULL setting and early exit anymore. Not 100% of it, but if we see that message pop up in a log we know it's broken. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9ee62cd8ce3c3effc3663f3d56b322385ce12fdb Author: Chase Douglas Date: Thu Nov 17 17:40:24 2011 -0800 dix: Move grab check and activation logic to CheckPassiveGrab() This is needed for future pointer emulation work. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c53651dabc66aeb9882819a404a799a364f00a29 Author: Peter Hutterer Date: Tue Dec 6 12:57:38 2011 +1000 dix: move EventDeliveryState into a header file, we'll need it elsewhere Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 86c3137c81e924bacd919e9d65809e07afeabbff Author: Peter Hutterer Date: Tue Dec 6 12:04:11 2011 +1000 Xi: split updating button count and state into helper functions Functional change: for a button mapped to 0, the motionHintWindow is not updated to the NullWindow anymore. Before it got updated unconditionally to the button mapping. I have no idea what the practical effect of this is, but I guess it's closer to the correct behaviour: pressing a button that's logically disabled now does not disrupt the motion hint delivery. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e0f37250ffff5dcb3bc0e8cad63439995ce01a20 Author: Peter Hutterer Date: Tue Dec 6 11:40:33 2011 +1000 Xi: deduplicate button motion mask setting No functional changes Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6eff14a789341d366b3013c5aa020e959c954651 Author: Peter Hutterer Date: Mon Dec 5 18:54:30 2011 +1000 dix: deduplicate callers of DeliverDeviceEvents in DeliverGrabbedEvents No functional change. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 93945b0a74aa8156a88f52b8ba77f1210042f396 Author: Peter Hutterer Date: Mon Dec 5 18:42:05 2011 +1000 dix: split grab event conversion and delivery into a helper function Effective functional change: XI2 events are checked with XACE now. DeliverOneGrabbedEvent is exported for future use by touch events. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit c81cdb0862e2184f033b3933e6bacbe0809ef2c0 Author: Peter Hutterer Date: Mon Dec 5 18:29:27 2011 +1000 dix: replace conversion errors with BUG_WARN_MSG Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6368c2aa4613a7c7eb0e8afca8d41f1a9bc4fc4d Author: Peter Hutterer Date: Mon Dec 5 16:46:18 2011 +1000 dix: deduplicate event delivery code Move all the event delivery code into DeliverOneEvent, based on the InputLevel we're sending to. Functional change: we now check XI2 events with XACE too. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 7e2207548b3173afc9accb5ccd532c181a7b94ed Author: Chase Douglas Date: Wed Dec 7 20:32:28 2011 +1000 include: Add an InputLevel enum Currently unused, but will be in the future. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 898d97672907a8074031d0d1038cd44bb5caf40d Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 verify_internal_event: preserve constness of data pointer All we're using it for is ErrorF calls, so make it a const char * to stop gcc from warning: inpututils.c: In function 'verify_internal_event': inpututils.c:629:9: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 79d09647d878e66721a778979a9eb1f4bba5f8d6 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 Use const cast in BitIsOn macro to avoid angering gcc Fixes gcc warnings such as: inpututils.c: In function 'valuator_mask_isset': inpututils.c:498:5: warning: cast discards qualifiers from pointer target type inpututils.c: In function 'CountBits': inpututils.c:613:9: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 99dfe9b1de09cb481e95bd4c45dcf7493480798b Author: Alan Coopersmith Date: Mon Dec 12 16:49:32 2011 -0800 Fix deconstifying cast warning in xi2_get_type Since we're just comparing values in the struct, cast it to a const xGenericEvent * to clear gcc warning of: events.c: In function 'xi2_get_type': events.c:193:5: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit dd80156bf05c9eb4000d0981e00d0d9fb69a94f6 Author: Alan Coopersmith Date: Wed Dec 7 22:58:45 2011 -0800 Include client name if available in PrintDeviceGrabInfo Also adds missing newline to first line of output. Before patch: [3581472.414] (II) Printing all currently active device grabs: [3581472.414] Active grab 0x1800000 (core) on device 'Virtual core pointer' (2): client pid 26174 uid 0 gid 10 [3581472.415] at 3581469139 (from active grab) (device thawed, state 1) [3581472.415] core event mask 0x0 [3581472.415] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 [3581472.415] Active grab 0x1800000 (core) on device 'Virtual core keyboard' (3) : client pid 26174 uid 0 gid 10 [3581472.415] at 3581469139 (from active grab) (device thawed, state 1) [3581472.415] core event mask 0x3 [3581472.415] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 [3581472.415] (II) End list of active device grabs After patch: [3581736.601] (II) Printing all currently active device grabs: [3581736.601] Active grab 0x1600000 (core) on device 'Virtual core pointer' (2): [3581736.601] client pid 26741 /usr/bin/xscreensaver -nosplash [3581736.601] at 3581735000 (from active grab) (device thawed, state 1) [3581736.601] core event mask 0x0 [3581736.601] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 [3581736.601] Active grab 0x1600000 (core) on device 'Virtual core keyboard' (3) : [3581736.601] client pid 26741 /usr/bin/xscreensaver -nosplash [3581736.601] at 3581735000 (from active grab) (device thawed, state 1) [3581736.601] core event mask 0x3 [3581736.601] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 [3581736.601] (II) End list of active device grabs Signed-off-by: Alan Coopersmith Reviewed-by: Rami Ylimäki commit b79de3f42ff8412dcabf2f2a805cbcbd1c6907c3 Author: Alan Coopersmith Date: Mon Dec 12 16:49:35 2011 -0800 xf86 parser: convert Error to a varargs macro to clear gcc format warnings Previously it always passed a format string with exactly one argument, using NULL when the format string needed none. Now pass the right number of arguments to clear gcc warnings of 'too many arguments for format'. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 7801b3dcd6501e3de93a6d2cee93b2593806e922 Author: Alan Coopersmith Date: Mon Dec 12 16:49:35 2011 -0800 Add some printf format attributes suggested by gcc Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit f68df9dfd2c7ca03c24aaa0a895b7191ecb81e85 Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 xf86Priv.h: Add some noreturn attributes suggested by gcc Both functions call exit() at the end and have no other return path. Also correct comment/heading to reflect commit 6450f6ca7ee0 moving DoShowOptions into xf86Configure.c. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 3823eedf3c124d3a20360480ba349bea72de3069 Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 Remove duplicate declarations of KdAdd*Driver in kdrive.h Clears gcc warnings in every file that includes kdrive.h: kdrive.h:507:1: warning: redundant redeclaration of 'KdAddPointerDriver' kdrive.h:225:6: note: previous declaration of 'KdAddPointerDriver' was here kdrive.h:510:1: warning: redundant redeclaration of 'KdAddKeyboardDriver' kdrive.h:284:6: note: previous declaration of 'KdAddKeyboardDriver' was here Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 471e5373b6f87336dac3b9de9b3852f63a2b10dc Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 Remove duplicate declaration of xf86ValidateModesFlags in xf86Modes.h Clears gcc warning in every file that includes xf86Modes.h: xf86Modes.h:102:1: warning: redundant redeclaration of 'xf86ValidateModesFlags' xf86Modes.h:72:1: note: previous declaration of 'xf86ValidateModesFlags' was here Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 41dd7cf673e47ab74c5065b8dbf268b2e5facb64 Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 _XkbFilterDeviceBtn: move variable declarations to match usage scope The main body of this function is an if { } else if { } pair of blocks. Previously there was int button at the top level scope which is used only in the first block, and a redeclaration of int button inside the second block. Since there's no overlap in the code paths for the two uses of button, move the one from the outer block into the first block to help the programmer more quickly determine they are unrelated usages, and to silence the gcc warning of: xkbActions.c: In function '_XkbFilterDeviceBtn': xkbActions.c:999:6: warning: declaration of 'button' shadows a previous local xkbActions.c:955:6: warning: shadowed declaration is here For consistency, move DeviceIntPtr dev declarations as well that are used in the same way. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit d8eb9b5faa2d2c9350bdaffef8749a9cac3c87b8 Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 XkbFindSrvLedInfo: remove extraneous name-clashing sli variable Variable is already defined outside the outer if statement, and there's no need to redefine inside the if statement. No point in setting sli before if (dev->kbdfeed->xkb_sli==NULL) check - if check is true, we immediately set it, if check is false, we immediately return without further reference or use of it. The one thing we do with it inside the inner if statement is store an allocation in it for a brief moment before writing to the final destination, which is immediately returned to the caller. In short, there's no benefit to the variable at all in this block, it just gives the optimizer more code to figure out how to omit. Fixes gcc warning: xkbLEDs.c: In function 'XkbFindSrvLedInfo': xkbLEDs.c:683:19: warning: declaration of 'sli' shadows a previous local xkbLEDs.c:679:18: warning: shadowed declaration is here Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 9edfa47bd58cd318d57d0f114714fd146be35a79 Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 KdParseFindNext: Constify delim argument It's only used as input to strchr to find the delimiters, never written to. Clears a bunch of gcc warnings of the form: kdrive.c:323:2: warning: passing argument 2 of 'KdParseFindNext' discards qualifiers from pointer target type kdrive.c:261:1: note: expected 'char *' but argument is of type 'const char *' Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit ff64ad6c74a3e14ca34bacb8866bdbd2262bddff Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 Convert KdDoSwitchCmd to use asprintf instead of malloc/strcat/etc. Also fix the reason argument to be const char * to clear several gcc warnings of: kdrive.c:151:2: warning: passing argument 1 of 'KdDoSwitchCmd' discards qualifiers from pointer target type kdrive.c:116:1: note: expected 'char *' but argument is of type 'const char *' Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 5bc590bde23ce1c57015b1d9e1cc63189c37448e Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 DoShowOptions: preserve constness of options list as we walk it Since all we do with the option list is walk down the list printing the names, there's no need to cast away its constness. Clears gcc warning: xf86Configure.c: In function 'DoShowOptions': xf86Configure.c:781:4: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 71efd868282d47a6db405a16de18ac322926962b Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 x86emu: constify debug strings Strings are all pointers to literal constants, just used as input to printf calls when debugging is enabled. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit d5a5eece670dee963765eab1431c21525c16d9ee Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 CompareISOLatin1Lowered: constify arguments Allows callers to avoid deconstifying arguments when calling, fixing gcc warning: filter.c: In function 'PictureGetFilterId': filter.c:59:2: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 83ac9502ea9f1dedf3a8002745668af16bb1f2af Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 xdmcp.c: fix three small const warnings xdmcp.c:63:36: warning: initialization discards qualifiers from pointer target type xdmcp.c: In function 'XdmcpRegisterConnection': xdmcp.c:482:8: warning: cast discards qualifiers from pointer target type xdmcp.c:482:8: warning: cast discards qualifiers from pointer target type xdmcp.c:482:8: warning: cast discards qualifiers from pointer target type xdmcp.c: In function 'get_mcast_options': xdmcp.c:1596:21: warning: initialization discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 3839d1480877818f3ccc04e25237d853bab210c3 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 LockServer: store path to LOCKDIR literal string in a const char * And instead of initializing to NULL, then resetting to LOCKDIR almost immediately (before ever using the NULL value), skip directly to setting it to LOCKDIR. tmppath variable is only used as input for generating the path name via calls to strlen, sprintf, etc. Fixes gcc warning of: utils.c: In function 'LockServer': utils.c:259:11: warning: assignment discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit af4113bfeb1d155f5f037c3492e50513336fa4a7 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 WriteToClient: preserve constness of buf while extracting length value Fixes gcc warning: io.c: In function 'WriteToClient': io.c:826:6: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 2c9800f91559fbb12dd276cf0536631104092f67 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 OsInit: store "/dev/null" in a const char * It's only passed as the input side of a strcpy and as the filename to fopen, so doesn't need to be non-const. Fixes gcc warning: osinit.c: In function 'OsInit': osinit.c:154:28: warning: initialization discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 50b1097643934c8caec9530e5eda6ed6534aaf61 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 Constify the reason string throughout the authorization check framework Almost all of the places the string is assigned point to a literal string constant, so use const char * for those, and const char ** for function calls that return it via an argument. Fortunately the top level function, ClientAuthorized, which returns the string as its return value is called from only one place, ProcEstablishConnection. ProcEstablishConnection stores either that return value or a string literal in char *reason. It only uses reason as an argument to SendConnSetup. SendConnSetup passes the reason argument to strlen & WriteToClient, both of which already have const qualifiers on their args. Thus added const to the reason variable in ProcEstablishConnection and the reason argument to SendConnSetup. Fixes gcc warnings: dispatch.c: In function 'ProcEstablishConnection': dispatch.c:3711:9: warning: assignment discards qualifiers from pointer target type auth.c: In function 'CheckAuthorization': auth.c:218:14: warning: assignment discards qualifiers from pointer target type auth.c:220:20: warning: assignment discards qualifiers from pointer target type connection.c: In function 'ClientAuthorized': connection.c:683:3: warning: return discards qualifiers from pointer target type mitauth.c: In function 'MitCheckCookie': mitauth.c:88:13: warning: assignment discards qualifiers from pointer target type xdmauth.c:259:14: warning: assignment discards qualifiers from pointer target type xdmauth.c:270:14: warning: assignment discards qualifiers from pointer target type xdmauth.c:277:11: warning: assignment discards qualifiers from pointer target type xdmauth.c:293:15: warning: assignment discards qualifiers from pointer target type xdmauth.c:313:14: warning: assignment discards qualifiers from pointer target type xdmauth.c:322:11: warning: assignment discards qualifiers from pointer target type rpcauth.c: In function 'SecureRPCCheck': rpcauth.c:136:10: warning: assignment discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 99998196017ef38ec88459b50605aa20f628788b Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 Constify string for authorization protocol names gcc was warning from storing string constants in a char *name field: auth.c:64:1: warning: initialization discards qualifiers from pointer target type auth.c:72:1: warning: initialization discards qualifiers from pointer target type auth.c:81:1: warning: initialization discards qualifiers from pointer target type Making the field const requires changing AuthorizationFromID to take a const char ** pointer for the name argument which it sets to point to the matching name entry. Changing that argument requires changing its sole caller in the security extension to pass the address of a const char * variable to it, which it can do, since the only thing it does with the returned name is to pass it back to the RemoveAuthorization function that already expects a const char *name. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 01834e99e461e2a8354f3b4aef7f14c5e83fa255 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 os/access.c: replace acmp & acopy macros with memcmp & memcpy calls No need to cast to char * now that all supported platforms use C89-standard void * argument types, so just drop the casts from acmp & acopy macros, which clears the gcc warnings for places const pointers were cast non-const: access.c: In function 'DefineSelf': access.c:786:3: warning: cast discards qualifiers from pointer target type access.c:795:6: warning: cast discards qualifiers from pointer target type access.c: In function 'NewHost': access.c:1293:9: warning: cast discards qualifiers from pointer target type access.c:1298:6: warning: cast discards qualifiers from pointer target type access.c:1309:5: warning: cast discards qualifiers from pointer target type Without the casts, acmp & acopy are just a funny way to write memcmp & memmove, so drop the macros and inline the calls, taking care to swap the first two arguments to memmove since it had swapped them. Since all the calls to memmove end up being to non-overlapping memory (mostly copying from an existing pointer to a newly allocated one), replace those with memcpy. And finally, don't actually call memcpy to copy 0 bytes from one place to another, since that's just a waste of a perfectly good function call. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 020d83d361b0ab54ac962e97b12935be785f9a67 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 xres.c: Preserve constness of string returned by LookupResourceName MakeAtom now accepts a const char * so we don't need to cast down to char * anymore. Fixes gcc warning of: xres.c: In function 'ProcXResQueryClientResources': xres.c:155:6: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 2ddae8f0bd2a9ce0cd15bf3848393af29e615acf Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 constify strings in resource name registry LookupResourceName already returned a const char *, so just needed to change the variable we're storing the list in to be a const char ** and then add const to the name argument to RegisterResourceName (which just stores name in the array) and CreateNewResourceType (which just passes name to RegisterResourceName). Clears a bunch of gcc warnings of the form: registry.c:319:5: warning: passing argument 2 of 'RegisterResourceName' discards qualifiers from pointer target type registry.c:200:1: note: expected 'char *' but argument is of type 'const char *' and from all the extensions: damageext.c: In function 'DamageExtensionInit': damageext.c:490:5: warning: passing argument 2 of 'CreateNewResourceType' discards qualifiers from pointer target type ../include/resource.h:159:26: note: expected 'char *' but argument is of type 'const char *' Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 424dbde891486ad6a6c00c61a334031ff18f5556 Author: Alan Coopersmith Date: Fri Dec 9 10:08:55 2011 -0800 CheckForEmptyMask does not need to declare int n twice Just use the existing n variable again in the ARGB_CURSOR loop instead of creating another one. Fixes gcc -Wshadow warning: cursor.c: In function 'CheckForEmptyMask': cursor.c:155:6: warning: declaration of 'n' shadows a previous local cursor.c:146:9: warning: shadowed declaration is here Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit b2bc38e4a553c29f49a0284333b34b4d6c8a8c12 Author: Alan Coopersmith Date: Sat Dec 10 10:01:18 2011 -0800 Even more correctly free config file names If we didn't go into the if (!autoconfig) { } block, the filename, dirname, and sysdirname pointers were never initialized, but we freed them outside the block, leading to potential memory corruption. Move the frees inside the block where they're initialized to avoid this. To avoid similar problems, move the declarations of the variables that are only used in this block inside the block. Regression introduced by commit 3d635fe84d6de53e2f74203b10e89f7851fe3fc1 Found by gcc warning: xf86Config.c: In function 'xf86HandleConfigFile': xf86Config.c:2303:11: warning: 'filename' may be used uninitialized in this function xf86Config.c:2303:22: warning: 'dirname' may be used uninitialized in this function xf86Config.c:2303:32: warning: 'sysdirname' may be used uninitialized in this function Signed-off-by: Alan Coopersmith Reviewed-by: Paulo Zanoni commit 33d6e6743d86324c2078f156991b16ac4f2593fc Author: Alan Coopersmith Date: Wed Dec 7 19:06:05 2011 -0800 xf86RegisterRootWindowProperty is confused about xnfcalloc It will never return NULL, so don't try to handle a NULL condition, since that just confuses programmers and static analyzers. It uses calloc, so all the allocated memory is cleared, so there's no point looping over the memory to manually initialize it NULL. And just because it's annoying, it doesn't need to be the only place in this file to do if (NULL==...) instead of if (... == NULL). Signed-off-by: Alan Coopersmith Reviewed-by: Paulo Zanoni commit e5aa00989cda9ebd18063c5e955235123ad37b88 Author: Peter Hutterer Date: Wed Dec 7 14:14:10 2011 +1000 Change GetXI2/XI/CoreType to just take a type argument Avoids the dummy-event dance if we have an event type and need to get the matching XI2 type. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6cc0e6a0afa6a87802767d484aa4e68fa935d3eb Author: Peter Hutterer Date: Fri Oct 28 12:55:55 2011 +1000 include: add GetXI2MaskByte and GetXI2EventFilterMask to headers This is needed for touch event processing. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 372a6f10dc2d74d2d179e8b92449e9b8636a99ef Author: Alan Coopersmith Date: Thu Dec 8 21:52:07 2011 -0800 Change disable_clientpointer return type to void It doesn't return anything, nor does it's caller expect it to. Fixes Solaris Studio compiler error: "xichangehierarchy.c", line 214: Function has no return statement : disable_clientpointer Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 522f8bcc0360d6a117e929a004bc956ab92037e9 Merge: 6369b5966 2abe83df6 Author: Keith Packard Date: Thu Dec 8 20:57:26 2011 -0800 Merge remote-tracking branch 'whot/for-keith' commit 2abe83df686ed64c4f4df711ac3c1fd12131c2e4 Author: Peter Hutterer Date: Mon Dec 5 14:02:51 2011 +1000 include: add BUG_WARN_MSG for custom error message on bug condition __BUG_WARN_MSG is a simple helper to enable call with and without varargs. I couldn't find a way to otherwise do this without getting gcc warnings. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4fc797f3756611a97767f407e1af0b6a7cf2f1d9 Author: Peter Hutterer Date: Fri Nov 11 16:25:30 2011 +1000 xfree86: include xorg-config.h from xaalocal.h Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 8c9589c71d47f287588314d77ddbfcc22cd04c8a Author: Peter Hutterer Date: Mon Dec 5 11:55:58 2011 +1000 Xi: rename "state" to "corestate" in ProcessDeviceEvents 'state' is shadowed by the XKB 'state' as well (which feeds into the event too), so rename this one to clarify that this is the core event state only. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 631516a4aa9858874ee197444cd93d91b97a1089 Author: Peter Hutterer Date: Fri Dec 2 15:47:58 2011 +1000 Xi: check button mapping value _before_ assigning it Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit a1304d6cb69301899c3c8450d6bf3e68573599df Author: Peter Hutterer Date: Mon Dec 5 11:26:30 2011 +1000 Xi: skip superfluous cast Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 1ab50be938524dcd4a9e56d27e3b96a27c2db2c0 Author: Peter Hutterer Date: Wed Nov 30 09:06:06 2011 +1000 xfixes: don't dereference a NULL cursor If the new cursor is the NULL cursor, don't dereference it and use zeros instead. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit d2ebbcdaf6b13d70eee704b1764ff349e1be22a0 Author: Peter Hutterer Date: Tue Nov 29 16:15:37 2011 +1000 Xi: when removing a device, reset ClientPointers where needed if a client had the to-be-removed device as ClientPointer, reset to NULL. Fixes #43165 Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit 27425f07b29e0ddaa782345c1899273ca742891e Author: Peter Hutterer Date: Wed Nov 9 14:45:02 2011 +1000 dix: use BUG_WARN for input mask size issues Yes, we're likely corrupting memory here but really this is unlikely to be triggered other than a real bug in the server. In which case a stacktrace is going to be more useful than any silent error handling. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 9b570ecbda954227c89938ee6f94b9efd192d3c6 Author: Peter Hutterer Date: Fri Dec 9 10:48:05 2011 +1000 xfree86: bump the input ABI The last few patches broke the ABI, bump it for convenience. Signed-off-by: Peter Hutterer commit 86bb3781b336c09e4279136ed81974de5acdba7f Author: Peter Hutterer Date: Fri Nov 4 11:29:01 2011 +1000 input: swap the server over to use the XI2mask struct Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b8b90cd1610331ff12fa3f70bf372670af7795ec Author: Peter Hutterer Date: Thu Nov 3 13:39:59 2011 +1000 Add a new XI2Mask struct and a few helper functions. The current XI2 mask handling is handy for copying (fixed size arrays) but a pain to deal with otherwise. Add a struct for XI2 masks and the required accessors. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4bc2761ad5ec2d0668aec639780ffb136605fbc8 Author: Peter Hutterer Date: Fri Nov 4 14:16:37 2011 +1000 dix: switch the dev->deviceGrab.activeGrab from GrabRec to GrabPtr This breaks the input ABI. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b601ea769f1b8a4d7f19e9d4a13541c78e865fe5 Author: Peter Hutterer Date: Fri Nov 4 10:47:27 2011 +1000 dix: allocate temporary grabs on the heap Once grabs start having nested memory locations, we can't just use the GrabRec on the stack anymore, we need to alloc/copy/free the grabs. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b0e9e2e32616d09c30a02b9d0ae9db0b13e150d1 Author: Peter Hutterer Date: Fri Nov 4 10:44:31 2011 +1000 dix: add CopyGrab() function Not really needed at this point, but will be once touch support is added. Since grabs are now expected to be allocated/freed with AllocGrab and FreeGrab, CopyGrab must increase the refcount and duplicate the modifier masks. Until the callers are switched to use FreeGrab, this introduces memleaks. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 347f377f3b3f8c9d230d6309ec8ae92aa86d78b7 Author: Peter Hutterer Date: Thu Nov 3 16:12:09 2011 +1000 dix: add AllocGrab helper function Not needed since the GrabRec is a self-contained struct but will be needed for the xi2 input mask rework. FreeGrab already exists, make it available to other callers. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 7af23259d88f4c28ed21140f82cc03b3724c06bb Author: Peter Hutterer Date: Mon Nov 21 11:41:12 2011 -0800 dix: switch the syncEvent queue to a struct list No effective functionality change, just cleanup to make this code slightly more sane. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6369b59668613e51131857fbaeaa393a65a73048 Author: Gaetan Nadon Date: Thu Dec 1 16:24:32 2011 -0500 test: update .gitignore with xfree86 and sort alphabetically Reviewed-by: Alan Coopersmith Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 3ab8ee32470f7cf1223e04238bb8c5f74ed52fc3 Merge: 22a666f99 98c4a888a Author: Keith Packard Date: Wed Dec 7 12:42:17 2011 -0800 Merge remote-tracking branch 'airlied/reviewed-fixes' commit 22a666f9952feb7248e9bb2faf777edaaac8175f Merge: 3824f558c e89b0324d Author: Keith Packard Date: Wed Dec 7 12:27:23 2011 -0800 Merge remote-tracking branch 'alanc/master' commit 3824f558cc2ee051da8314c7bf08b8647b44e84a Author: Keith Packard Date: Wed Dec 7 12:13:37 2011 -0800 hw/xfree86: fix segfault in config parser when config dir is missing Treat a scandir error from a missing (or unusable) directory return as if it simply returned no files at all, which is what we want. cc: Paulo Zanoni Signed-off-by: Keith Packard commit 98c4a888a4428789386c7c47cecc81933b5999ba Author: Dave Airlie Date: Mon Nov 28 16:37:59 2011 +0000 kdrive: drop screen crossing code. The only kdrive server we probably care about anymore is Xephyr, and this screen enable/disable code totally breaks it in multi-screen mode. When you are in one screen the other stops updating. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=757457 Signed-off-by: Dave Airlie Reviewed-by: Peter Hutterer commit 8d3731a811e33e263920dd7c8ec63d02968cb56e Author: Dave Airlie Date: Thu Oct 20 10:48:26 2011 +0100 hal: free tmp_val in one missing case Pointed out by coverity scan. Signed-off-by: Dave Airlie Reviewed-by: Daniel Stone commit 41229392b790f30a0f0ef1f4ed95647c5bca4001 Author: Dave Airlie Date: Thu Oct 20 11:00:43 2011 +0100 xv: test correct number of requests. (v2) Pointed out by coverity. v2: fix swapped as well, as pointed out by Alan Signed-off-by: Dave Airlie Reviewed-by: Alan Coopersmith commit 1049139499d9132a20cd6d4d156fe9da9cddb6c2 Author: Dave Airlie Date: Wed Oct 19 16:57:13 2011 +0100 xaa: avoid possible freed pointer reuse in epilogue If the pGCPriv->flags == 2, then we try to assign the freed pGCPriv->XAAOps avoid this by clearing the flags in to be destroyed pGCPriv. Reported by coverity. Signed-off-by: Dave Airlie Reviewed-by: Jeremy Huddleston commit 682c09a2cedd234b005334cc01247d859dd7f26a Author: Dave Airlie Date: Wed Oct 19 16:22:31 2011 +0100 Xi: avoid overrun of callback array. This code had an off-by-one and would allow writing one past the end of the callbacks array. Pointed out by coverity. Signed-off-by: Dave Airlie Reviewed-by: Jeremy Huddleston commit b62dc4fcbcffd10de16650bee284702c8608bb60 Author: Dave Airlie Date: Wed Oct 19 16:21:26 2011 +0100 xext: don't free uninitialised pointer when malloc fails. (v2) Initialise the pAttr->values to values so if the values allocation fails it just ends up as free(NULL). Pointed out by coverity. v2: use Alan's suggestion. Signed-off-by: Dave Airlie Reviewed-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 22605effd188436629a0dbc688666549473741e4 Author: Adam Jackson Date: Thu Apr 28 13:34:28 2011 +1000 fbdevhw: iterate over all modes that match a mode. (v3) So on RHEL5 anaconda sets an xorg.conf with a fixed 800x600 mode in it, we run radeonfb and fbdev since ati won't work in userspace due to domain issues in the older codebase. On certain pseries blades the built-in KVM can't accept an 800x600-43 mode, it requires the 800x600-60 mode, so we have to have the kernel radeonfb driver reject the 800x600-43 mode when it sees it. However then fbdev doesn't try any of the other 800x600 modes in the modelist, and we end up getting a default 640x480 mode we don't want. This patch changes the mode validation loop to continue on with the other modes that match to find one that works. v2: move code around to avoid extra loop, after comment from Jamey. v3: move loop setup back into loop as per Jeremy's review. Signed-off-by: Dave Airlie Reviewed-by: Jamey Sharp Reviewed-by: Jeremy Huddleston commit fac464e310b82fadcedf790798d1016c4805640b Author: Peter Hutterer Date: Fri Dec 2 08:52:53 2011 +1000 include: rename "foos" to "list_of_foos" in the struct list documentation Makes things a little easier to read. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 7dfe8c32a96d3f96c8aaeb2802f5b122e381a1e4 Author: Peter Hutterer Date: Fri Dec 2 08:51:24 2011 +1000 include: update struct list documentation to use one set of structs only The example at the top of the file used a struct bar and a list of struct foos. Use those two throughout instead of a different struct foo for the examples and for the API documentation. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 18539c89eca8f6e272ead2b631365da530065ae7 Author: Peter Hutterer Date: Fri Dec 2 08:51:04 2011 +1000 include: a new list element does not need initialization, state so Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 58dc73314b6508121ca094bbcf00612fe19ed69f Author: Peter Hutterer Date: Fri Dec 2 08:43:45 2011 +1000 include: point to the tests in list.c as examples Even with the documentation, the list.c tests are the best examples. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit c8e451a8e719ba432bcfa8976774c07307087809 Author: Peter Hutterer Date: Thu Dec 1 14:12:11 2011 +1000 include: add list_last_entry to get the tail of a list Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6acebf9e1298939593b942ec91ae9ec9e74faa19 Author: Peter Hutterer Date: Thu Dec 1 13:35:50 2011 +1000 include: add list_append() The existing list_add() prepends to the list, but in some cases we need the list ordered in the way we append the elements. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e89b0324da89ba5c0ba64af1ef46a12b7f55f879 Author: Gaetan Nadon Date: Sat Dec 3 21:23:51 2011 -0500 autoconf: the minimum required level for autoconf is 2.60 The toolchain requirements are documented here: http://www.x.org/wiki/ModularDevelopersGuide#Required_Tools Note that autoconf features only found in versions later than 2.60 must not be used. Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit 427cb53fddf0c517d1fd1025a87b1104735edd2a Author: Gaetan Nadon Date: Sat Dec 3 21:23:21 2011 -0500 autoconf: remove redundant AC_PROG_MAKE_SET Already included during Automake initialization. After the patch, no change: configure:3893: checking whether make sets $(MAKE) configure:3915: result: yes Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit c19c55a93ab1bc6db56075ca34d6e1c3f522f622 Author: Alan Coopersmith Date: Fri Dec 2 00:09:07 2011 -0800 Fix builds of Xnest & Xephyr with Solaris Studio compilers Required in order to build with Studio cc now that xorg-macros is setting -errwarn=E_FUNC_HAS_NO_RETURN_STMT since a bug in the Solaris system headers causes the noreturn attribute to not be correctly applied to the exit() prototype in when building with Studio instead of gcc. Otherwise compiler exits with errors: "Display.c", line 65: Function has no return statement : x_io_error_handler "hostx.c", line 341: Function has no return statement : x_io_error_handler Uses Studio-specific pragma instead of adding another exit() prototype with a noreturn attribute to avoid causing gcc to warn about having a redundant prototype for the exit() function. Signed-off-by: Alan Coopersmith Reviewed-by: Mikhail Gusarov commit e4dcf580f007d6adcf5b0c639865d7aaab1a319d Author: Alan Coopersmith Date: Thu Dec 1 23:45:42 2011 -0800 LoaderOpen returns either a valid pointer or NULL, so don't check for < 0 Fixes Sun cc warning that was recently elevated to error by the stricter default CFLAGS changes to xorg-macros: "loadmod.c", line 914: improper pointer/integer combination: op "<" Should have been changed when commit ab7f057ce9df4e905b12 changed the LoaderOpen return type from int to void *. Changes log message when file is found but dlopen() fails from: (EE) LoadModule: Module dbe does not have a dbeModuleData data object. (EE) Failed to load module "dbe" (invalid module, 0) to: (EE) Failed to load module "dbe" (loader failed, 7) Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson commit 8b6a75009746db4b8e2e180210ac097e35136bcd Author: Alan Coopersmith Date: Wed Nov 30 23:01:34 2011 -0800 Fix gcc warnings about redundant declarations of fallback functions Ensure ffs, strndup, strlcat, etc. aren't defined by our headers if they're already defined in the system headers. This does export the HAVE_FFS, HAVE_STRNDUP, etc. definitions to drivers, but if you built the Xserver with a libc that had those, and then build the drivers with a less capable libc, you're going to have problems anyway, and this should solve some reported problems with conflicts between our strndup definition and gcc magic for it. Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson commit d829a7c5cb42c979b58f3547136df5b05d906423 Author: Alan Coopersmith Date: Wed Nov 30 22:20:09 2011 -0800 Move to autoconf standard function name checks & defines Replace multiple methods of checking for functions with AC_CHECK_FUNCS Replace multiple methods of selecting fallback funcs with AC_REPLACE_FUNCS Replace HAS_* and NEED_* #defines with autogenerated HAVE_* Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson Reviewed-by: Mikhail Gusarov Reviewed-by: Gaetan Nadon commit 4be68b03128e958d2a6dc1b7feb3587329b9561b Author: Alan Coopersmith Date: Wed Nov 30 19:39:51 2011 -0800 Remove unused function checks from configure.ac & include/*.h.in The code that used getisax to check for MMX support was moved to pixman and removed from the X server by commit eb2d7fe02f9cbc. The code that used HAVE_MKSTEMP was deleted by the Xprint removal in commit 1c8bd318fbaf. All alloca calls were removed by the patch series end in commit 5e363500c8, and used custom X checks instead of the autoconf HAVE_ALLOCA anyway. I can find no record of HAVE_GETUID, HAVE_GETEUID, HAVE_LINK, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_STRCHR, HAVE_STRRCHR, HAVE_GETOPT, HAVE_GETOPT_LONG, HAVE_DOPRNT, or HAVE_VPRINTF ever being used, and the calls to those functions are not wrapped in #ifdefs. (Most of those are in our baseline requirements of C89 & Unix98 anyway.) Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson Reviewed-by: Mikhail Gusarov Reviewed-by: Gaetan Nadon commit 84207def93e4489df8dca8e044ce544be8a3f845 Author: Alan Coopersmith Date: Mon Nov 28 20:38:58 2011 -0800 Disable building of tests requiring DDX functions when Xorg is not built Some test cases require linking with some sort of DDX - ideally we'd have a stub ddx for testing, but for now, since we link with the Xorg ddx, disable those tests when configured with --disable-xorg Fixes https://bugs.freedesktop.org/show_bug.cgi?id=43320 Signed-off-by: Alan Coopersmith Reviewed-by: Dan Nicholson Reviewed-by: Jeremy Huddleston commit fd976e4051e15ab2d01ec0bf89ff26926d4ed04e Author: Gaetan Nadon Date: Thu Dec 1 16:24:12 2011 -0500 config: conftest needs an include directive to locate X11/Xfuncproto.h The compiler option -fvisibility=hidden is erroneously missing due to a faulty configuration test. The gcc command is unable to locate X11/Xfuncproto.h unless the build occurs on a system where X11 development headers are installed. configure:21294: checking for symbol visibility support configure:21323: gcc -std=gnu99 -c -g -O2 -fvisibility=hidden conftest.c >&5 conftest.c:144:28: fatal error: X11/Xfuncproto.h: No such file or directory The solution is to add an include directive to obtain the location of X11/Xfuncproto.h which may or may not be the system installed headers. Reviewed-by: Alan Coopersmith Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit feebf6746374aa04b12e9e3e51313a3a82c03530 Author: Alan Coopersmith Date: Wed Nov 23 00:30:02 2011 -0800 Limit the number of screens Xvfb will attempt to allocate memory for Commit f9e3a2955d2ca7 removing the MAXSCREEN limit left the screen number too unlimited, and allowed any positive int for a screen number: Xvfb :1 -screen 2147483647 1024x1024x8 Fatal server error: Not enough memory for screen 2147483647 Found by Parfait 0.3.7: Error: Integer overflow (CWE 190) Integer parameter of memory allocation function realloc() may overflow due to multiplication with constant value 1112 at line 293 of hw/vfb/InitOutput.c in function 'ddxProcessArgument'. Since the X11 connection setup only has a CARD8 for number of SCREENS, limit to 255 screens, which is also low enough to avoid overflow on the sizeof(*vfbScreens) * (screenNum + 1) calculation for realloc. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp commit fb22a408c69a84f81905147de9e82cf66ffb6eb2 Author: Keith Packard Date: Tue Nov 8 10:13:15 2011 -0800 Save major/minor opcodes in ClientRec for RecordAReply The record extension needs the major and minor opcodes in the reply hook, but the request buffer may have been freed by the time the hook is invoked. Saving the request major and minor codes as the request is executed avoids fetching from the defunct request buffer. This patch also eliminates the public MinorOpcodeOfRequest function, inlining it into Dispatch. Usages of that function have been replaced with direct access to the new ClientRec field. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 05f09354a30a4f5edd421220e1aa97be754c71bb Merge: 3197b773c 08ec4da6a Author: Keith Packard Date: Thu Dec 1 14:44:52 2011 +0000 Merge remote-tracking branch 'jcristau/for-keith' commit 3197b773c81e58cd4aa412eccaee49526012ed6f Merge: 2dc5ba4a1 dfcec1d3f Author: Keith Packard Date: Thu Dec 1 14:36:58 2011 +0000 Merge remote-tracking branch 'whot/for-keith' commit 2dc5ba4a1b127e3ed286718ab0a6c20438361192 Author: Matt Turner Date: Tue Nov 29 23:52:19 2011 -0500 Remove another if (E != NULL) check around free(E) I wonder if there are any other patterns we haven't seen yet? Reviewed-by: Jamey Sharp Signed-off-by: Matt Turner Signed-off-by: Keith Packard commit dfcec1d3f9d7bac5cde9eb034341428ee0ad3728 Author: Peter Hutterer Date: Fri Nov 11 08:55:14 2011 +1000 test: remove unneeded printf statements from misc.c Leftover from debugging, is not really needeed in a test. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 9c38422fc4cf853c3104fada2a3851c79df2a66f Author: Peter Hutterer Date: Wed Nov 9 14:37:26 2011 +1000 include: add BUG_WARN macro for internal bug cases. There are plenty of cases that can only be triggered by a real bug in the server and doing the ErrorF dance manually everywhere is a tad painful and the error message is usually used only to find the spot in the file anyway. Plus, reading BUG_WARN somewhere is a good indicator to the casual reader that this isn't intended behaviour. Note that this is intentionally different to the BUG_ON behaviour on the kernel, we do not FatalError the server. It's just a warning + stacktrace. If the bug is really fatal, call FatalError. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Alan Coopersmith commit 61ef4daf6450da573b9de72ba7b200566821b916 Author: Peter Hutterer Date: Fri Nov 4 15:49:23 2011 +1000 Xi: add FreeInputMask function Does what it says on the box, complements MakeInputMask. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit ee9346bb31efce4036df1b8dd8f1a5dc43ae955a Author: Peter Hutterer Date: Thu Nov 3 15:45:34 2011 +1000 Xi: add helper functions to alloc/free InputClientPtrs Currently not needed since the InputClientRec is a self-contained struct. As part of the touch rework that won't be the case in the future and a function to allocate/free memory appropriately is required. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4acf999c294868a44e559d212c6d88a4978256b2 Author: Peter Hutterer Date: Fri Nov 4 15:37:32 2011 +1000 dix: use a single return statement in CheckPassiveGrabsOnWindow No functional change. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b371795f01c1d7fc338cfe18b8a567ed9f402846 Author: Peter Hutterer Date: Thu Nov 3 14:54:06 2011 +1000 dix: rename GetWindowXI2Mask to WindowXI2MaskIsset And let it return a boolean value, that's all the callers need anyway. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit bedb8fd90de8e2db33d5e3b1d859f24bf34efc9a Author: Peter Hutterer Date: Thu Nov 3 14:25:51 2011 +1000 Xi: use single return code from XIPassiveGrabDevice Some failures returned status but the actual return code was "ret". Use "ret" consistently and move status to the local block is used in. [the goto isn't necessary yet, but for a future patch] Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 2aad1a2b42b7def7812abfa2462b6bcc6382e03a Author: Peter Hutterer Date: Wed Nov 2 14:07:19 2011 +1000 include: fix mask size calculation Same bug as inputproto-2.0.1-9-gb1149ab, if the XI2LASTEVENT was a multiple of 8, the mask was one bit too short. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone Reviewed-by: Chase Douglas commit b2015a2c01711646bb7ae23d684abee0cd55d4d0 Author: Jeremy Huddleston Date: Thu Nov 24 13:54:08 2011 -0800 dmx: Build fix for -Werror=implicit-function-declaration on linux Fixes regression introduced by: 6e6d732bac3c21cb85f8e998908f9b393630e5f8 Found-by: Tinderbox Signed-off-by: Jeremy Huddleston CC: Alan Coopersmith Signed-off-by: Keith Packard commit 873a1ace3646994adf95961f48719e95dcade7a2 Author: Paulo Zanoni Date: Tue Nov 1 10:57:56 2011 -0200 parser: free val.str after xstrtokenize After we tokenize val.str, we discard it. This is just one example: 6 bytes in 1 blocks are definitely lost in loss record 24 of 652 at 0x4C2779D: malloc (in vgpreload_memcheck-amd64-linux.so) by 0x4D744D: xf86getToken (scan.c:400) by 0x4D75F1: xf86getSubToken (scan.c:462) by 0x4DB060: xf86parseInputClassSection (InputClass.c:145) by 0x4D664C: xf86readConfigFile (read.c:184) by 0x490556: xf86HandleConfigFile (xf86Config.c:2360) by 0x49AA77: InitOutput (xf86Init.c:365) by 0x425A7A: main (main.c:204) Signed-off-by: Paulo Zanoni Reviewed-by: Peter Hutterer Reviewed-by: Dan Nicholson commit d41987d77c903e00cca7bcf3e04ed07151e3bb4d Author: Paulo Zanoni Date: Tue Nov 1 10:42:36 2011 -0200 parser: free val.str after xf86getBoolValue After we convert the value to a boolean, we discard the string. This is just one example: 3 bytes in 1 blocks are definitely lost in loss record 5 of 657 at 0x4C2779D: malloc (vgpreload_memcheck-amd64-linux.so) by 0x4D744D: xf86getToken (scan.c:400) by 0x4D75F1: xf86getSubToken (scan.c:462) by 0x4DB3E0: xf86parseInputClassSection (InputClass.c:189) by 0x4D664C: xf86readConfigFile (read.c:184) by 0x490556: xf86HandleConfigFile (xf86Config.c:2360) by 0x49AA77: InitOutput (xf86Init.c:365) by 0x425A7A: main (main.c:204) Signed-off-by: Paulo Zanoni Reviewed-by: Peter Hutterer Reviewed-by: Dan Nicholson commit d5c7338b3eaea55177ade6fcba71a47ccd5547f5 Author: Paulo Zanoni Date: Mon Oct 31 17:54:03 2011 -0200 parser: free scandir's list v2: move the free()s to the function that calls scandir 80 bytes in 1 blocks are definitely lost in loss record 411 of 631 at 0x4C2779D: malloc (vgpreload_memcheck-amd64-linux.so) by 0x4C27927: realloc (vgpreload_memcheck-amd64-linux.so) by 0x696A80D: scandir (scandir.c:108) by 0x4D8828: OpenConfigDir (scan.c:854) by 0x4D8A43: xf86openConfigDirFiles (scan.c:952) by 0x49031F: xf86HandleConfigFile (xf86Config.c:2327) by 0x49A9E3: InitOutput (xf86Init.c:365) by 0x425A7A: main (main.c:204) Signed-off-by: Paulo Zanoni Reviewed-by: Peter Hutterer commit 3d635fe84d6de53e2f74203b10e89f7851fe3fc1 Author: Paulo Zanoni Date: Sun Oct 30 18:04:59 2011 -0200 Correctly free config file names We call xf86penConfigDirFiles twice, so we overwrite the configDirPath variable, losing the pointer. If we move the pointer management to the upper layer (the function callers), they will be able to call these functions as many times as they want, but they'll have to free those returned values. v2: don't leak inside XWin 4,097 bytes in 1 blocks are definitely lost in loss record 625 of 632 at 0x4C2779D: malloc (in vgpreload_memcheck-amd64-linux.so) by 0x4D7899: DoSubstitution (scan.c:615) by 0x4D87B0: OpenConfigDir (scan.c:845) by 0x4D8A2D: xf86openConfigDirFiles (scan.c:955) by 0x49031F: xf86HandleConfigFile (xf86Config.c:2327) by 0x49A9BF: InitOutput (xf86Init.c:365) by 0x425A7A: main (main.c:204) Signed-off-by: Paulo Zanoni Reviewed-by: Dan Nicholson commit 0ae087e13192d9b498db782be5ba49ca91a81547 Author: Paulo Zanoni Date: Sat Oct 29 18:33:24 2011 -0200 glx: don't leak driConfigs For dri, dri2 and driswrast. 12,968 (584 direct, 12,384 indirect) bytes in 1 blocks are definitely lost in loss record 569 of 570 at 0x4C2779D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x7821E3B: driConcatConfigs (utils.c:560) by 0x7827CF2: dri_fill_in_modes (dri_screen.c:224) by 0x782831E: dri_init_screen_helper (dri_screen.c:405) by 0x7826C03: drisw_init_screen (drisw.c:266) by 0x782225F: driCreateNewScreen (drisw_util.c:69) by 0x4826E2: __glXDRIscreenProbe (glxdriswrast.c:451) by 0x4812FA: GlxExtensionInit (glxext.c:327) by 0x41FB14: InitExtensions (miinitext.c:471) by 0x568622: main (main.c:208) Signed-off-by: Paulo Zanoni Reviewed-by: Jeremy Huddleston commit d26fae246d7c451b4d5ffe24fdb959d4bd00b107 Author: Paulo Zanoni Date: Tue Oct 25 14:56:35 2011 -0200 glx: don't leak fbconfigs 29,952 (208 direct, 29,744 indirect) bytes in 1 blocks are definitely lost in loss record 573 of 573 at 0x4C2779D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4829BC: createModeFromConfig (glxdricommon.c:131) by 0x482C09: glxConvertConfigs (glxdricommon.c:185) by 0x482788: __glXDRIscreenProbe (glxdriswrast.c:468) by 0x4812FA: GlxExtensionInit (glxext.c:327) by 0x41FB14: InitExtensions (miinitext.c:471) by 0x568636: main (main.c:208) Signed-off-by: Paulo Zanoni Reviewed-by: Jeremy Huddleston commit 305a8bcb2fc6f87f8d891fcb774198b6fd118ee1 Author: Paulo Zanoni Date: Thu Oct 20 17:39:29 2011 -0200 glx: fix memory leak when destroying screen 1,152 bytes in 1 blocks are definitely lost in loss record 536 of 575 at 0x4C25E84: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x483820: __glXScreenInit (glxscreens.c:357) by 0x48271C: __glXDRIscreenProbe (glxdriswrast.c:469) by 0x4812BE: GlxExtensionInit (glxext.c:327) by 0x41FB14: InitExtensions (miinitext.c:471) by 0x5685AE: main (main.c:208) Signed-off-by: Paulo Zanoni Reviewed-by: Jeremy Huddleston commit f405dfffe7d5db81d398615a80acbeba7e014ada Author: Jeremy Huddleston Date: Mon Nov 7 22:14:30 2011 +0000 dmx: Build fix for -Werror=implicit-function-declaration Signed-off-by: Jeremy Huddleston Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit 632d205b309d0515b4ae0f9902059aa4b093a313 Author: Alan Coopersmith Date: Mon Nov 7 20:24:08 2011 -0800 Fix gcc -Wwrite-strings warnings in xf86Modes code Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 09e4b78f7944234865f4648940453303af0c2663 Author: Alan Coopersmith Date: Mon Nov 7 19:19:47 2011 -0800 Fix gcc -Wwrite-strings warnings in xf86 ddx Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 8e4556f560487f3d07812834d4785441d0a8323c Author: Alan Coopersmith Date: Mon Nov 7 20:09:47 2011 -0800 FindModule: stop copying const char *dirname to char *dirpath Not needed since 6cf844ab69926b split out the allocation/manipulation into the helper function, leaving FindModule just copying the pointer around, and causing gcc warnings and an unreachable call to free. Also no longer need to store the combined strlen results in dirlen. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 05f589d464a961aea8d25632a390fb66a06cd186 Author: Alan Coopersmith Date: Fri Nov 4 23:21:34 2011 -0700 Fix gcc -Wwrite-strings warnings in various extensions Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 232f1ddf3d060f3ce9d2ebd35f33b1294cac380e Author: Alan Coopersmith Date: Thu Nov 3 21:21:19 2011 -0700 Fix gcc -Wwrite-strings warnings in XkbGetRulesDflts Stop temporarily storing a pointer to a constant literal string in a char *, just to strdup it a few lines later. Fixes gcc -Wwrite-strings warnings: xkbInit.c: In function 'XkbGetRulesDflts': xkbInit.c:121:38: warning: assignment discards qualifiers from pointer target type xkbInit.c:123:23: warning: assignment discards qualifiers from pointer target type xkbInit.c:125:24: warning: assignment discards qualifiers from pointer target type xkbInit.c:127:25: warning: assignment discards qualifiers from pointer target type xkbInit.c:129:25: warning: assignment discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 0bc41d5f8d1a6192f57d9bf646cc46ed839b06b9 Author: Alan Coopersmith Date: Mon Nov 7 18:08:21 2011 -0800 Remove redundant redeclarations of functions in the same header file Exposed by recent addition of -Wredundant-decls to default CWARNFLAGS Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 285133a35eede03e37f41aeea6cbfd15a0800d98 Author: Alan Coopersmith Date: Mon Nov 7 15:44:26 2011 -0800 sun_agp: cast key to uintptr_t before casting to (int *) Matches what linux_agp already does and prevents gcc from throwing up: sun_agp.c: In function 'xf86DeallocateGARTMemory': sun_agp.c:236:40: error: cast to pointer from integer of different size Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit f8dd5efb673439e7e9f7d82e6f9cfb97afacc85a Author: Alan Coopersmith Date: Thu Nov 3 21:18:56 2011 -0700 Mark XKB char * as const to clean up gcc -Wwrite-strings warnings Cleans up around 120 warnings from this set Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit cccafabd56d0f8e5784ea0ad9fdc03224f952bfe Author: Alan Coopersmith Date: Thu Nov 3 21:10:51 2011 -0700 Mark arguments to fopen/popen/system wrappers as const char * Silencing more gcc -Wwrite-strings warnings Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 3d0ece5e8467d823afb227b7a7f8b12b906b6ba9 Author: Alan Coopersmith Date: Thu Nov 3 20:44:43 2011 -0700 Reduce unnecessary string copying in xkbtext routines Instead of using sprintf to copy a static string to a local buffer, just to pass it to TryCopyStr, pass the static string to TryCopyStr directly, as is already done in other parts of this code. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 05d8a7f7a785eff3292f0f0537bb3902930f1b5c Author: Alan Coopersmith Date: Sat Oct 29 11:08:17 2011 -0700 Convert a bunch of sprintf to snprintf calls This batch is the straightforward set - others are more complex and need more analysis to determine right size to pass. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit b967bf2af264726042e2f6ffb9ca7d234f34b56b Author: Alan Coopersmith Date: Mon Oct 31 23:01:35 2011 -0700 Remove xf86FormatPciBusNumber from API, inline the one place its used Found no calls from current driver modules Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 6450f6ca7ee070da3b6d70c2d3a6977f018ac421 Author: Alan Coopersmith Date: Thu Nov 3 22:13:05 2011 -0700 Move DoShowOptions to xf86Configure.c, delete xf86ShowOpts.c Gets rid of duplicate static copy of optionTypeToString by putting both callers of that helper function in the same source file. Signed-off-by: Alan Coopersmith Reviewed-by: Daniel Stone Reviewed-by: Jeremy Huddleston commit 43fa1274263f76faaca995f6e498bc3179a857b8 Author: Alan Coopersmith Date: Mon Oct 31 22:17:35 2011 -0700 Remove bad code from DoShowOptions (Xorg -showopts handler) When we want to print a string, it's okay to just print it. We don't need to first allocate a buffer 2 bytes bigger than the string, copy the entire string unmodified to the buffer, print the buffer, and then leak the buffer (though we AbortDDX 8 lines later, and then just in case we survived that, call exit as well, so the leak is short lived, just oh so pointless). Signed-off-by: Alan Coopersmith Reviewed-by: Daniel Stone Reviewed-by: Jeremy Huddleston commit 71a89d97332cc181becc5a5f73166e642f96c076 Author: Alan Coopersmith Date: Mon Oct 31 21:36:47 2011 -0700 Convert glx/single2.c:DoGetString() to use asprintf() Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit f3cb512dc4daaeed389bb4740e21b6e2330e01e1 Author: Alan Coopersmith Date: Sat Oct 29 11:19:44 2011 -0700 LogVMessageVerb: Fix const mismatch warning "log.c", line 382: warning: assignment type mismatch: pointer to char "=" pointer to const char Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 3d2d88029b29d6e1c53220ad275ba8ba2dedd89e Author: Alan Coopersmith Date: Sat Oct 29 11:13:32 2011 -0700 AuthAudit: clean up string handling calls The extra "out" pointer to redirect writes to the array isn't needed since the removal of LBX (commit a9ed5a87902a), and eliminating it allows more logical use of sizeof(addr) in length-checked strlcpy & snprintf calls to write to it. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 615f93a3d03d40924365061c6ae242240dd0ab7e Author: Alan Coopersmith Date: Tue Nov 1 14:57:41 2011 -0700 Remove unnecessary variable rtrn in XkbKeysymText Also removes even more unnecessary use of variable assignment inside function arguments. Signed-off-by: Alan Coopersmith Reviewed-by: Daniel Stone commit 5f285a30a1d6ffba82ebe5e08a0b68352bb51556 Author: Alan Coopersmith Date: Tue Nov 1 16:56:18 2011 -0700 Make XIGetKnownProperty take a const char * argument Now that MakeAtom takes const char *, so can XIGetKnownProperty. Clears 71 warnings from gcc -Wwrite-strings of the form: devices.c:145:5: warning: passing argument 1 of 'XIGetKnownProperty' discards qualifiers from pointer target type ../include/exevents.h:128:23: note: expected 'char *' but argument is of type 'const char *' Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit e0f3633632de609e60950aef07c82df534db7888 Author: Alan Coopersmith Date: Fri Oct 28 21:31:46 2011 -0700 Convert ProcRenderQueryFilters to use memcpy instead of strncpy We just got the string length with strlen, might as well use it to copy the whole string quickly instead of checking each character a second time to see if it's 0 or not. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 780133f9ae7fada462714b47e79d26075bbd9abe Author: Alan Coopersmith Date: Fri Oct 28 21:29:50 2011 -0700 Convert DetermineClientCmd to use strdup instead of malloc+strncpy *cmdname is initialized to NULL earlier in the function, so it's okay to overwrite it with NULL if strdup fails, don't need that extra check. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 03ddca6f71339fad089c56484bf35c63642ae1be Author: Alan Coopersmith Date: Fri Oct 28 21:25:20 2011 -0700 Convert dmxSetDefaultFontPath to use strdup instead of malloc+strncpy Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit d9243777c77d9b2992fbaf7f459430283837e323 Author: Alan Coopersmith Date: Sat Oct 29 10:32:52 2011 -0700 matchDriverFromFiles: use one snprintf instead of strncpy/cat series Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 6e6d732bac3c21cb85f8e998908f9b393630e5f8 Author: Alan Coopersmith Date: Fri Oct 28 21:18:46 2011 -0700 Convert strncpy/strncat to strlcpy/strlcat As long as we're carrying around a compatibility copy in os/strl*.c, might as well use them. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit e189dbb3e57d30eb96034d4ce9544ce7a93a371e Author: Alan Coopersmith Date: Fri Oct 28 20:19:44 2011 -0700 Convert AllocXTestDevice to use asprintf Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 08093c25a91c07ab8af7cece9bba738b827cfd1b Author: Alan Coopersmith Date: Mon Oct 24 23:16:30 2011 -0700 Convert some malloc + strncpy pairs into strndup calls Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit acde97a39d35bfb03af2614c68176ad9afb71f53 Author: Alan Coopersmith Date: Mon Oct 24 20:28:32 2011 -0700 Add fallback implementation of strndup() Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Linux test code fixed by: Keith Packard commit ed38c2648cf7cc04c1d03f8d14375815f6cf536e Author: Alan Coopersmith Date: Fri Oct 28 14:32:56 2011 -0700 Fix Sun compiler check that got turned around Since the check is for !(compilers that support __builtin_constant_p) it needs to be !(gcc or new enough Sun cc), but was written as !(gcc or too old Sun cc). Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 7ee7fd1f4c72b2ab6dba0413e63dd2e8b95b2112 Author: Alan Coopersmith Date: Mon Oct 24 20:39:24 2011 -0700 Remove a couple Error() instances left behind by 09dbfcb0ad7b6c8 Two instances found in the SIOCGIFCONF code for listing network interfaces. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Reviewed-by: Peter Hutterer commit e47aa9475027ed6a255daefec85561c6b15789bd Author: Alan Coopersmith Date: Mon Oct 24 23:40:45 2011 -0700 Enable memory checking during unit testing If configure is generated with xorg-macros 1.16.0 or newer, and an appropriate memory checking library is found for the platform, use it when running unit tests. If not, then no harm is done. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 36670065bd74b870d0da7c6a69a9c0d222b21706 Author: Alan Coopersmith Date: Tue Oct 25 00:12:48 2011 -0700 Don't require ld -wrap for tests that don't need it If configure is generated with xorg-macros 1.16 or later, this allows builders to --enable-unit-test and run the tests other than the xi2 tests which require ld -wrap (and are still wrapped in if HAVE_LD_WRAP in tests/xi2/Makefile). If an older xorg-macros is used, the existing behaviour is preserved of requiring ld -wrap for all unit tests, but no side effects occur, so the minimum xorg-macros version is not raised. If unit testing is enabled without ld -wrap, then we create a bogus "xi2-tests" script just to report that we're skipping them. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 0e6b88db7f2e94ccc8153a0e002d176440914e01 Author: Alan Coopersmith Date: Mon Aug 1 14:09:33 2011 -0700 Don't fallback to wsfb or fbdev on Solaris We don't ship either one, so don't waste time and make confusing log entries trying to load them. Signed-off-by: Alan Coopersmith Reviewed-by: Daniel Stone commit 7b0f53f0a5824fcd81ef505beb3e19ac7c77961f Author: Alan Coopersmith Date: Wed Nov 23 10:50:13 2011 -0800 Fix Xdmx build on Linux to work with strlcpy changes Include strlcpy.c in the libdmxconfig.a library with the other functions shared among the xdmx configuration programs. Also add a #include "os.h" to the scanner.l file that now calls strlcpy to include the prototype from $(top_srcdir)/include/os.h. (To be squashed into http://cgit.freedesktop.org/~alanc/xserver/commit/?id=c19f0ff5223d428f8ad2ab3c563c974c96a521ba before next PULL request to avoid breaking bisection.) Signed-off-by: Alan Coopersmith Signed-off-by: Keith Packard commit 922c1d817091c7eedfb701f4d9eb4324e22ccca4 Author: Gaetan Nadon Date: Fri Nov 11 20:44:19 2011 -0500 docs: spell "X Server Version" consistently in titles. Add where missing. Reviewed-by: Alan Coopersmith Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 5952efa903d57ac69070f1477ce46223a2a7893c Author: Keith Packard Date: Sun Nov 20 13:07:33 2011 -0800 Bump version to 1.11.99.1 (1.12 development release 1) Signed-off-by: Keith Packard commit 795fbe3e6e440f023e52c452106f4c266c13d36c Author: Keith Packard Date: Sun Nov 20 13:33:12 2011 -0800 Add 'optionstr.h' to include/Makefile.am This makes sure it gets distributed Signed-off-by: Keith Packard commit 08ec4da6a7617637914bee1636858474213cf39d Author: Julien Cristau Date: Sat Nov 5 13:00:07 2011 +0100 Fix ShmPutImage for XYBitmap We can't call CopyArea in that case because the image has depth 1, which might not match the target drawable, so we might overrun the shm segment. Commit 11817a881cb93a89788105d1e575a468f2a8d27c apparently fixed a similar bug for XYPixmap, but missed the bitmap case. Fixes: http://bugs.debian.org/629611 Thanks to Alan Curry for diagnosing this and providing a test case. Reported-and-tested-by: Alan Curry Reviewed-by: Peter Harris Signed-off-by: Julien Cristau commit 328074890eeb111950e984c6f618311983600b20 Author: dtakahashi42 Date: Fri Nov 18 11:30:22 2011 -0800 rootless: Fix a server crash when choosing a color with the gimp color wheel https://trac.macports.org/ticket/30927 Signed-off-by: Jeremy Huddleston Reviewed-by: Jeremy Huddleston commit 58864146fbdf1820d04825838691e84784ef91bc Author: Ross Burton Date: Wed Sep 28 11:46:02 2011 +0100 edid: Add quirk for Acer Aspire One 110 At least one revision of the AAO reports a 190x110mm maximum size but a 451x113mm mode. X.Org Bug 41141 Signed-off-by: Ross Burton Reviewed-by: Daniel Stone Reviewed-by: Jeremy Huddleston commit 34b0e4eee911f8b09a3682a7f1b4c8598ef48b8d Author: Chris Wilson Date: Thu Aug 25 16:04:04 2011 +0100 dri2: Register the DRI2DrawableType after server regeneration The Resource database is reset upon regeneration and so the dri2 module needs to re-register its RESTYPE for the drawable or else it will clobber the next unsuspecting user of the database. Fortunately, DRI2 is loaded late in the initialisation sequence and was last up until xf86-video-intel started using the Resource database to track outstanding swaps... Signed-off-by: Chris Wilson Reviewed-by: Jeremy Huddleston Tested-by: Paulo Zanoni commit bfa1a0dd190ed88020d60eba3bb04681c8e83a68 Author: Chris Wilson Date: Mon Jan 24 11:17:03 2011 +0000 DRI2: Avoid a NULL pointer dereference Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41211 Signed-off-by: Chris Wilson Reviewed-by: Jeremy Huddleston commit eeb21a133b982f71de739baf62e53c8a68f5d495 Author: Chris Wilson Date: Mon Jan 24 11:17:03 2011 +0000 VidMode: prevent crash with no modes Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=17431 Signed-off-by: Chris Wilson Reviewed-by: Jeremy Huddleston commit c1bb8f43b9290c2b18a9f0ac59773ff8f1eb974f Author: Rami Ylimäki Date: Tue Oct 4 12:25:26 2011 +0300 record: Prevent out of bounds access when recording a reply. Any pad bytes in replies are written to the client from a zeroed array. However, record extension tries to incorrectly access the pad bytes from the end of reply data. Signed-off-by: Rami Ylimäki Reviewed-by: Erkki Seppälä commit 1f5baa924a5907978f564372265d9830ac72a077 Author: Jeremy Huddleston Date: Sun Oct 30 20:26:42 2011 -0700 xfree86: Deprecate the use of xf86PciInfo.h Signed-off-by: Jeremy Huddleston Reviewed-by: Tormod Volden commit eb3377ffb8a7baa26c9831e56ed782d48b28fa71 Author: Jeremy Huddleston Date: Tue Nov 1 14:59:15 2011 -0700 xfree86: Fix powerpc build with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast memType is a uint64_t on powerpc. Using memType only really makes sense for *physical* addresses, which can be 64-bit for 32-bit systems running on 64-bit hardware. However, unmapVidMem() only deals with *virtual* addresses, which are guaranteed to fit into an uintptr_t. Signed-off-by: Jeremy Huddleston Reviewed-by: Mark Kettenis commit a551f126cc4af7a476d9c8fd0cb309d5aa600d54 Author: Pierre-Loup A. Griffais Date: Fri Nov 4 23:26:25 2011 -0700 xfree86: Fix RandR rotation across server generations 245cb8e94fd1599 fixed xf86RotateDestroy() to actually run its teardown code, causing the Damage object to properly be re-allocated after a server regeneration. However the block that does that still thinks the Rotate layer BlockHandler is wrapped from the last generation, meaning the shadow pixmap is never re-allocated and the Damage object is never re-registered, causing a blank screen, and potentially a driver crash on the next teardown after the server asks it to free a 0x0 Pixmap. Signed-off-by: Pierre-Loup A. Griffais Reviewed-by: Aaron Plattner Signed-off-by: Keith Packard commit bfa2a1857a1efda7f171f10e855d200ca0dbcc1a Merge: f0d50cc66 e7cb8f802 Author: Keith Packard Date: Mon Nov 14 09:07:06 2011 -0800 Merge remote-tracking branch 'whot/for-keith' commit e7cb8f802adf6fc22e7a930c0dfc5c1076781c96 Author: Peter Hutterer Date: Wed Nov 9 15:31:57 2011 +1000 Xext: remove unused variable 'n' xselinux_ext.c: In function 'SELinuxSendItemsToClient': xselinux_ext.c:340:16: warning: unused variable 'n' [-Wunused-variable] Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau commit bb4aa1f263ad38c175bfda3b7e6c325260ce3f28 Author: Peter Hutterer Date: Wed Nov 9 15:31:10 2011 +1000 Xext: don't swap CARD8 in SProcSELinuxQueryVersion xselinux_ext.c: In function 'SELinuxSendItemsToClient': xselinux_ext.c:340:16: warning: unused variable 'n' [-Wunused-variable] xselinux_ext.c: In function 'SProcSELinuxQueryVersion': xselinux_ext.c:532:62: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap xselinux_ext.c:533:62: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau commit 35ec24cf245e5ef676e98a0bf7c77296a3f1ff63 Author: Peter Hutterer Date: Mon Aug 1 14:14:02 2011 +1000 input: replace remaining GetPairedDevice() with GetMaster() Wherever it's obvious which device we need (keyboard or pointer), use GetMaster() instead of GetPairedDevice(). It is more reliable in actually getting the device type we want. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit fc16917ad6f0d2722bfb5c5eeca955dd3bc4125a Author: Peter Hutterer Date: Fri Apr 15 13:32:10 2011 +1000 include: export GetProximityEvents and QueueProximityEvents This is mainly needed for consistency with GetPointerEvents and friend. No-one seems to actually need this function from outside the usual DDXs. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit 11840595a1be9f2df7390bcc708cc176e60d3ef2 Author: Peter Hutterer Date: Thu Nov 3 08:58:58 2011 +1000 dix: Don't let a driver without a ProximityClassRec post events Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit 22715e465b415b3351b83b8279a4f44157f63199 Author: Peter Hutterer Date: Thu Oct 27 11:03:39 2011 +1000 Xi: allow passive keygrabs on the XIAll(Master)Devices fake devices They don't have a KeyClassRec, but we must still allow passive grabs on them. Signed-off-by: Peter Hutterer Tested-by: Bastien Nocera Reviewed-by: Daniel Stone commit f0d50cc6651dce3a8a3cd3fb84210aa92b139763 Author: Derek Buitenhuis Date: Sun Nov 6 12:20:51 2011 -0500 Fix vesa's VBE PanelID interpretation xserver's VESA driver's VBE (Vesa BIOS Extensions) code includes a PanelID probe, which can get a monitor's native resolution. From this, using CVT formulas, it derives horizontal sync rate and a vertical refresh rate ranges. It however, only derives the upper bounds of the ranges, and the lower bounds cannot de derived. By default, they are set --- transfer too big, truncated ---