summaryrefslogtreecommitdiff
path: root/hw/xfree86/common
AgeCommit message (Collapse)AuthorFilesLines
3 daysinclude: move dbus-core.h to configEnrico Weigelt, metux IT consult1-1/+1
This header is internal (not installed) and holds definitions for sources in config/, thus it fells more clean moving it to config/, too. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1357>
3 daysinclude: colormap.h: move internal typedef to dix/colormap_priv.hEnrico Weigelt, metux IT consult1-0/+2
Moving the internal EntryType typedef from "colormap.h" into newly added internal-only header "dix/colormap_priv.h" Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1283>
8 daysxfree86: os-support: move hidden Solaris-specific symbols out of public headerEnrico Weigelt, metux IT consult1-0/+1
These aren't exported at all, so no need to have it in public header. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
8 daysxfree86: os-support: move unexported stuff out of xf86_OSproc.hEnrico Weigelt, metux IT consult1-0/+1
It's cleaner to have public headers only holding public stuff and xf86_os_support seems to be much more appropriate place for this. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
8 daysxfree86: unexport os-support functionsEnrico Weigelt, metux IT consult6-8/+2
These aren't called by drivers/modules, so no need to export them. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
9 daysFix missing include of sys/stat.hEnrico Weigelt, metux IT consult3-0/+4
Instead of relying on very indirect includes, it's more more clean when everybody explicitly includes what he really needs. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1417>
10 daysos: unexport Os*() functionsEnrico Weigelt, metux IT consult2-1/+3
These aren't called (and suited for being called) by drivers, thus drop them from the public module API. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1381>
10 daysrename remaining RT_* defines to X11_RESTYPE_*Enrico Weigelt, metux IT consult2-4/+4
Since we already had to rename some of them, in order to fix name clashes on win32, it's now time to rename all the remaining ones. The old ones are still present as define's to the new ones, just for backwards compatibility. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1355>
10 daysprevent name clash on Windows w/ RT_* definesEnrico Weigelt, metux IT consult1-2/+2
Windows' native headers using some our RT_* define's names for other things. Since the naming isn't very nice anyways, introducing some new ones (X11_RESTYPE_NONE, X11_RESTYPE_FONT, X11_RESTYPE_CURSOR) and define the old ones as an alias to them, in case some out-of-tree code still uses them. With thins change, we don't need to be so extremely careful about include ordering and have explicit #undef's in order to prevent name clashes on Win32 targets. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1355>
10 daysos: unexport command line args handling functionsEnrico Weigelt, metux IT consult1-0/+1
These functions shouldn't be called by drivers or extensions, thus shouldn't be exported. Also moving it to separate header, so the already huge ones aren't cluttered with even more things. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1334>
2024-04-09Present: add PresentCapabilitySyncobj and PresentPixmapSyncedErik Kurzinger1-1/+1
Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967>
2024-03-21xfree86: common: fix missing include of <errno.h>Enrico Weigelt, metux IT consult2-0/+4
It's much cleaner to always include directly what one needs, instead of relying on very indirect including. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1435>
2024-03-19Revert "Fix missing includes of <errno.h>"Peter Hutterer2-4/+0
Removing errno from xf86_OSlib.h breaks the xf86-input-mouse driver build. And xf86_OSlib.h itself relies on errno anyway in the SYSCALL macro provided by this header. This reverts commit f6a367102cbb4ab8b8d56b1943a06cc07462cd81. Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1423>
2024-03-18Fix missing includes of <errno.h>Enrico Weigelt, metux IT consult2-0/+4
It's much cleaner to always include directly what one needs, instead of relying on very indirect including. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1416>
2024-03-11dix: unexport eventconvert.h functionsEnrico Weigelt, metux IT consult1-1/+3
This header isn't installed, so no external modules could use the functions declared there. Thus we can unexport it all. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1358>
2024-03-09dix: unexport InitTrackers()Enrico Weigelt, metux IT consult1-0/+3
Not used by any modules, thus no need to export it. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1347>
2024-03-03dix: unexport AddScreen() and AddGPUScreen()Enrico Weigelt, metux IT consult2-0/+6
These aren't used by any drivers/modules, just DDX'es, so no need to export. Note: tigervnc does use it, but it has it's own DDX, therefore directly linked in, just like the in-tree DDX'es which doesn't need exporting. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1349>
2024-02-29xfree86: common: move non-exported funcs from dgaproc.h to separate headerEnrico Weigelt, metux IT consult7-12/+24
The typdef and defines from dgaproc.h are used by drivers, so it needs to remain part of the public API. But no need to clutter the public header with non-exported function declarations. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1323>
2024-02-29xfree86: drop unneeded wrapper xf86PrivsElevated()Enrico Weigelt, metux IT consult2-10/+2
It's just a dumb wrapper around PrivsElevated(), and also just called in few places, while others call PrivsElevated() directly - thus not needed and can be dropped. Note that it's also not called by drivers, so the export was unnecessary. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1324>
2024-02-19drop remains of support for old Sun compilersEnrico Weigelt, metux IT consult1-48/+2
With transition from autoconf to meson, these aren't actually supported anymore, and re-adding it isn't planned. Thus the now dead code pathes can be completely removed. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1286>
2024-02-19hw/xfree86: fix NULL pointer refrence to mode nameYusuf Khan1-0/+2
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 <yusisamerican@gmail.com>
2024-01-03Revert "xfree86: Remove -flippixels"Izumi Tsutsui5-2/+31
This reverts commit d1c00c859c6676fbb540420c9055788bc19cb18f except hw/xfree86/common/xf86str.h that was not used by -flipPixels option.
2023-12-22hw/xfree86: re-calculate the clock and refresh rateChia-Lin Kao (AceLan)1-0/+2
xserver fails to generate useable resolutions with 90Hz framerate panels(encounter the same issue with 3 different 2.5k resolution panels). All the resolutions shown by xrandr lead to blank screen except the one written in EDID. Ville Syrjälä from Intel provides a method to calculate the preferred clock and refresh rate from the existing resolution table and this works for the issue. v2. xf86ModeVRefresh might return 0, need to check it before use it. v3. reported by Markus on launchpad that the issue is not devided by 0, it's the "preferred" being accessed unconditionally. BugLink: https://launchpad.net/bugs/1999852 Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1388 Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
2023-12-17xf86: Accept devices with the kernel's ofdrm driverThomas Zimmermann1-0/+3
Add a workaround to accept devices of the kernel's ofdrm driver. Makes Xorg work on Open Firmware's pre-configured display with the DRM graphics stack. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2023-11-02AutoRepeat: Fix wrong repeat rate being appliedPedro Montes Alcalde1-1/+1
When you set the auto repeat rate trough xset to something like 250 40: `xset r rate 250 40` Is setting the first delay to 250ms and set the rate to 40hz (25ms) However, if you were to apply this configuration from a xorg config file, the result would be the first delay being applied correctly, but the repeat rate would be set to 25Hz instead. This is because the config option is using a rate of repeats per second but XKB stores it as interval. Make sure this is converted correctly. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1558 Signed-off-by: EXtremeExploit <pedro.montes.alcalde@gmail.com>
2023-10-22The framebuffer driver on FreeBSD is called scfb, use it.Gleb Popov1-0/+3
2023-10-22Extend Linux #ifdef to FreeBSD OS.Niclas Zeising1-1/+1
2023-01-06Disallow byte-swapped clients by defaultPeter Hutterer1-0/+8
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 let's disable this by default and allow it only when the respective config option or commandline flag is given. For Xorg, this adds the ServerFlag "AllowByteSwappedClients" "on". For all DDX, this adds the commandline options +byteswappedclients and -byteswappedclients to enable or disable, respectively. Fixes #1201 https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1029 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-01-04xfree86: Fix videodrv ABI versionOlivier Fourdan1-1/+1
Commit 5145742fb6 accidentally bumped the videodrv ABI version from 26.0 to 26.6 in one go. Change it back to 26.1 as per the documented process for minor additions. Fixes: 5145742fb6 - randr: introduce rrCrtcGetInfo DDX function Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2023-01-03randr: introduce rrCrtcGetInfo DDX functionMinh Phan1-1/+1
This allows rrCrtcGetInfo to override the values in the XRRCrtcGetInfo reply. One use case is to allow Xwayland to return the current emulated mode for the specific client instead of the global mode. Signed-off-by: Minh Phan <phanquangminh217@gmail.com> Acked-by: Olivier Fourdan <ofourdan@redhat.com>
2022-12-30dix: Remove pScratchPixmap and other associated ABI changesJeremy Huddleston Sequoia2-2/+2
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-12-19xfree86: make xf86RotateCrtcRedisplay publicSultan Alsawaf1-1/+1
xf86RotateCrtcRedisplay() is about to be used outside of xf86Rotate.c in order to copy transformed pixmaps, so fix up its interface by specifying the source drawable and destination pixmap rather than assuming the root drawable and rotated pixmap, respectively. In addition, add an argument to make xf86RotateCrtcRedisplay() not perform any transformations, which is an indicator that it should only copy a transformed pixmap rather than actually transform a pixmap. These changes make it possible to use xf86RotateCrtcRedisplay() to not only copy transformed pixmaps, but also actually transform pixmaps, making it very useful outside of xf86Rotate.c. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
2022-11-16xf86: allow DDX driver for GPU/PCI hot-plugShashank Sharma2-7/+52
The current X server infrastructure sets modesetting driver as default driver to handle PCI-hotplug of a GPU device. This prevents the respective DDX driver (like AMDGPU DDX driver) to take control of the card. This patch: - Adds a few functions and fine-tunes the GPU hotplug infrastructure to allow the DDX driver to be loaded, if it is configured in the X config file options as "hotplug-driver". - Scans and updates the PCI device list before adding the new GPU device in platform, so that the association of the platform device and PCI device is in place (dev->pdev). - Adds documentation of this new option An example usage in the config file would look like: Section "OutputClass" Identifier "AMDgpu" MatchDriver "amdgpu" Driver "amdgpu" HotplugDriver "amdgpu" EndSection V2: Fixed typo in commit message (Martin) Added R-B from Adam. Added ACK from Alex and Martin. V3: Added an output class based approach for finding the DDX driver (Aaron) Rebase V4: Addressed review comment from Aaron: GPU hot-plug handling driver's name to be read from the DDX config file options. In this way only the DDX drivers interested in handling GPU hot-plug will be picked and loaded, for others modesetting driver will be used as usual. V5: Addressed review comments from Aaron: - X config option to be listed in CamelCase. - Indentation fix at one place. - Code readability related optimization. V6: Addressed review comments from Aaron: - Squash the doc in the same patch - Doc formatting changes Cc: Alex Deucher <alexander.deucher@amd.com> Suggested-by: Aaron Plattner aplattner@nvidia.com (v3) Acked-by: Martin Roukala martin.roukala@mupuf.org(v1) Acked-by: Alex Deucher alexander.deucher@amd.com (v1) Reviewed-by: Adam Jackson ajax@redhat.com(v1) Signed-off-by: Shashank Sharma shashank.sharma@amd.com
2022-09-20xf86AutoConfig: try modesetting on all platforms we build it onAlan Coopersmith1-1/+1
Changes check for trying modesetting driver from if defined(__linux__) to use meson check for if we built the driver for this platform. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-09-07Simplify auto device configuration for choosing wsfb, fbdevcoypu@sdf.org1-5/+5
I wanted to simplify the logic, and thought this is a good opportunity to eliminate local diffs. I don't want to list OSes without wsfb, because I understand that is a netbsd/openbsd driver, and always have it as a fallback for us. Additionally, I understand "fbdev" is linux-specific, so have the logic match this intent.
2022-04-05xfree86: finish removing numTimings in xf86ValidateModes()Alan Coopersmith1-14/+3
Finishes the work started in commit cd0d4c1bb54b809100444e6efc1f161054c43a8b to remove checks for the variable that never varied from 0 after the code to change it was removed by commit 511c60bc7399b07c267d686a969880e5ec92408a in 2006 (xorg-server-1.2.0). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-02xfree86: numTimings is never value other than 0Konstantin Kharlamov1-14/+4
Correctness is ensured be checking md5sum result before and after the commit (it's the same). Fixes LGTM warning "Comparison is always false because numTimings <= 0." Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2022-01-29xf86: Accept devices with the 'hyperv_drm' driverThomas Zimmermann1-0/+3
Put in a workaround to accept devices of the kernel's hyperv_drm driver. Makes Xorg work on HyperV Gen 1/2 with the DRM graphics stack. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2021-12-20xf86/logind: Fix compilation error when built without logind/platform busJocelyn Falempe1-8/+1
This was introduced by commit 8eb1396d Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1269 Fixes: da9d012a9 - xf86/logind: Fix drm_drop_master before vt_reldisp Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2021-12-14hw/xfree86: fix sbus build for SPARCSam James1-0/+4
Initially reported downstream in Gentoo. Manifests with errors like: ``` gnu/bin/ld: hw/xfree86/common/libxorg_common.a(xf86fbBus.c.o): in function `xf86ClaimFbSlot': xf86fbBus.c:(.text+0x20): undefined reference to `sbusSlotClaimed' /usr/lib/gcc/sparc-unknown-linux-gnu/11.2.0/../../../../sparc-unknown-linux-gnu/bin/ld: xf86fbBus.c:(.text+0x2c): undefined reference to `sbusSlotClaimed' ``` While we use the headers in meson.build, we don't reference xf86sbusBus.c which defines the missing symbols like sbusSlotClaimed. Bug: https://bugs.gentoo.org/828513 Signed-off-by: Sam James <sam@gentoo.org>
2021-12-10remove the PRE_RELEASE message.Matthieu Herrb1-13/+0
With the new numbering scheme, XORG_VERISON_SNAP doesn't mean a pre-release version anymore. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2021-12-07randr: add new interface to allow delaying lease responsesXaver Hugl1-1/+1
Add a new interface to _rrScrPriv to make it possible for the server to delay answering a lease request, at the cost of blocking the client. This is needed for implementing drm-lease-v1, as the Wayland protocol has no defined time table for responding to lease requests. Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com> Acked-by: Michel Dänzer <mdaenzer@redhat.com>
2021-11-22xf86/logind: Fix drm_drop_master before vt_reldispJocelyn Falempe1-0/+11
When switching to VT, the ioctl DRM_DROP_MASTER must be done before the ioctl VT_RELDISP. Otherwise the kernel can't change the modesetting reliably, and this leads to the console not showing up in some cases, like after unplugging a docking station with a DP or HDMI monitor. Before doing the VT_RELDISP, send a dbus message to logind, to pause the drm device, so logind will do the ioctl DRM_DROP_MASTER. With this patch, it changes the order logind will send the resume event, and drm will be sent last instead of first. so there is a also fix to call systemd_logind_vtenter() at the right time. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2021-11-16Revert "hw/xfree86: Propagate physical dimensions from DRM connector"Povilas Kanapickas1-18/+12
Quite a lot of applications currently expect the screen DPI exposed by the X server to be 96 even when the real display DPI is different. Additionally, currently Xwayland completely ignores any hardware information and sets the DPI to 96. Accordingly the new behavior, even if it fixes a bug, should not be enabled automatically to all users. A better solution would be to make the default DPI stay as is and enable the correct behavior with a command line option (maybe -dpi auto, or similar). For now let's just revert the bug fix. This reverts commit 05b3c681ea2f478c0cb941c2f8279919cf78de6d. Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2021-11-06xfree86: On Linux, while only seat0 can have TTYs, don't assmume all seat0s ↵nerdopolis2-1/+19
have TTYs
2021-10-27Remove autotools supportPovilas Kanapickas1-104/+0
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2021-10-08xf86: Accept devices with the 'simpledrm' driver.nerdopolis1-1/+6
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
2021-07-30xf86: Assign GPUs to screens according to configurationZoltán Böszörményi3-22/+41
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 <zboszor@gmail.com>
2021-07-30xf86: Extract screen configuration matching into its own functionZoltán Böszörményi1-22/+27
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
2021-06-24xfree86: Fix out of array bound access to xf86EntitiesŁukasz Spintzyk1-2/+2
Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>