summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support
AgeCommit message (Collapse)AuthorFilesLines
4 daysinclude: move dbus-core.h to configEnrico Weigelt, metux IT consult1-1/+2
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>
9 daysxfree86: os-support: bsd: fix missing prototypesEnrico Weigelt, metux IT consult1-1/+0
Fix warnings on missing prototypes: > ../hw/xfree86/os-support/bsd/bsd_VTsw.c:56:20: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] > xf86VTSwitchPending() > ^ > void > ../hw/xfree86/os-support/bsd/bsd_VTsw.c:67:17: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] > xf86VTSwitchAway() > ^ > void > ../hw/xfree86/os-support/bsd/bsd_VTsw.c:82:15: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] > xf86VTSwitchTo() > ^ > void > ../hw/xfree86/os-support/bsd/bsd_init.c:155:16: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] > xf86OpenConsole() > ^ > void > ../hw/xfree86/os-support/bsd/bsd_init.c:322:15: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] > xf86OpenPccons() > ^ > void > ../hw/xfree86/os-support/bsd/bsd_init.c:347:16: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] > xf86OpenSyscons() > ^ > void > ../hw/xfree86/os-support/bsd/bsd_init.c:453:13: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] > xf86OpenPcvt() > ^ > void > ../hw/xfree86/os-support/bsd/bsd_init.c:596:17: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] > xf86CloseConsole() > ^ > void > ../hw/xfree86/os-support/bsd/bsd_init.c:673:11: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] > xf86UseMsg() > ^ > void Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1428>
9 daysxfree86: os-support: move hidden Solaris-specific symbols out of public headerEnrico Weigelt, metux IT consult3-7/+9
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>
9 daysxfree86: os-support: move xf86FatalError macro out of public headerEnrico Weigelt, metux IT consult2-13/+15
This macro is only used inside xfree86's os-support layer, not by any (known) drivers. Thus no need to have it exported in the public API. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
9 daysxfree86: os-support: move unexported stuff out of xf86_OSproc.hEnrico Weigelt, metux IT consult4-9/+11
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>
9 daysxfree86: os-support: move VidMemInfo xf86_os_support.hEnrico Weigelt, metux IT consult2-41/+4
This type is only used inside the os-support layer of xfree86, so it fits better into xf86_os_support.h, whose purpose is being the primary entry point into os-support layer. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
9 daysxfree86: os-support: move xf86OSInitVidMem() to xf86_os_support.hEnrico Weigelt, metux IT consult15-18/+19
This function isn't exported at all, so it better fits into xf86_os_support.h, whose purpose is being the primary entry point into os-support layer. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
9 daysxfree86: os-support: unexport xf86RemoveSIGIOHandlerEnrico Weigelt, metux IT consult4-1/+4
It's not used by any driver, so 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/1456>
9 daysxfree86: os-support: unexport xf86DeallocateGARTMemoryEnrico Weigelt, metux IT consult5-1/+4
It's not used in any drivers, so 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/1456>
9 daysxfree86: os-support: unexport xf86OSInputThreadInit()Enrico Weigelt, metux IT consult3-1/+2
This is just called by xfree86 core, not by any drivers, 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/1456>
9 daysxfree86: os-support: unexport xf86OSRingBell()Enrico Weigelt, metux IT consult7-4/+7
This function is only internal to xfree86 DDX, not used by any drivers, 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/1456>
9 daysxfree86: unexport os-support functionsEnrico Weigelt, metux IT consult18-26/+49
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 including <sys/mman.h>Enrico Weigelt, metux IT consult6-9/+10
Make sure everybody who needs stuff from <sys/mman.h> actually includes it, and dropped the include from xf86_OSlib.h. Check for all symbols defined by Open Group spec. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1412>
9 daysxfree86: os-support: bsd fix warning on unused label on NetBSDEnrico Weigelt, metux IT consult1-0/+2
The label is only used on FreeBSD, so compiling on NetBSD gives a warning on unused label. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1447>
9 daysxfree86: os-support: bsd: fix warning on discarded constEnrico Weigelt, metux IT consult1-2/+3
Fix warnings: ../hw/xfree86/os-support/bsd/bsd_init.c ../hw/xfree86/os-support/bsd/bsd_init.c:91:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 91 | "pccons (with X support)", | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c:97:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 97 | "pcvt", | ^~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c:100:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 100 | "wscons", | ^~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c:462:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 462 | vtprefix = "/dev/ttyv"; | ^ ../hw/xfree86/os-support/bsd/bsd_init.c:471:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 471 | vtprefix = "/dev/ttyE"; | ^ Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1446>
10 daysFix missing include of sys/stat.hEnrico Weigelt, metux IT consult3-4/+2
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 daysxfree86: os-support: drop ununsed POSIX_TTYEnrico Weigelt, metux IT consult1-4/+0
Found no evidence that this define is practically used anywhere, aymore. Web research just showed up a single ancient .c file (looks like an Wacom driver) from 1998. Xserver's git history doesn't tell when it actually had been introduced. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1408>
10 daysxfree86: drop unused xf86EnableAGP()Enrico Weigelt, metux IT consult4-47/+0
This function doesn't seem to be used anymore, neither inside the xserver, nor by any drivers - so it can be dropped. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1404>
10 daysxfree86: drop unused xf86SetReallySlowBcopy()Enrico Weigelt, metux IT consult2-26/+0
This had been introduced almost two decades ago, by Dave Airlie (*1) along with some major IO speed improvement, just in case some driver still needed the old behaviour - in that case it would call xf86SetReallySlowBcopy(), so xf86SlowBcopy() would fall back to the old approach emitting an extra outb() on debug port, in order to slow things down more. Now aeons have passed and there doesn't seem to be any actual user for this, so it's time to drop that ancient relic. *1) commit e717eb82dc2e55f852919312d04f5cfc8ee55bc8 Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1402>
10 daysxfree86: linux: int10: drop dead codeEnrico Weigelt, metux IT consult1-64/+0
The code pieces inside `ifdef DoSubModule` aren't used anymore since very long time. There's no evidence of this symbol ever been set in the whole git history, so it must be an really ancient relic, that nobody used for decades. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1400>
11 daysos: unexport Os*() functionsEnrico Weigelt, metux IT consult4-0/+7
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>
11 daysos: unexport xthread_sigmaskEnrico Weigelt, metux IT consult1-0/+2
This function isn't used by drivers and there's currently no need to do so, thus keep it out of the public module API. Fixes: 30ac7567980a1eb79d084a63e0e74e1d9a3af673 Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1368>
11 daysos: unexport command line args handling functionsEnrico Weigelt, metux IT consult3-1/+6
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>
13 daysxfree86: os-support: move _NEED_SYSI86 guarded block to sun_vid.cEnrico Weigelt, metux IT consult2-18/+5
The sun_vid.c driver seems to be the only actual consumer left, so it can be dropped from public headers and moved to sun_vid.c instead. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1414>
13 daysxfree86: os-support: drop Solaris pre-7 remainsEnrico Weigelt, metux IT consult1-4/+0
Since meson transition, we can't build on Solaris older than v7 (which came out 1998), so no need for extra quirks. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1414>
13 daysxfree86: os-support: clean out remains of SVR3/sysv supportEnrico Weigelt, metux IT consult1-9/+0
SVR3/sysv support had been removed 13 years ago, but there still was some fallout left. The symbol HAS_SVR3_MMAPDRV never had been set by autoconf, let alone meson, so this piece of code is really dead. Fixes: 6ce1908ba4959aaa0a48171acb62cf6a5d5cbf18 Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1414>
2024-04-10xfree86: os-support: bsd: fix warning on old-style function definitionEnrico Weigelt, metux IT consult2-10/+10
Fix compiler warnings: ../hw/xfree86/os-support/bsd/bsd_VTsw.c: In function ‘xf86VTSwitchPending’: ../hw/xfree86/os-support/bsd/bsd_VTsw.c:56:1: warning: old-style function definition [-Wold-style-definition] 56 | xf86VTSwitchPending() | ^~~~~~~~~~~~~~~~~~~ ./hw/xfree86/os-support/bsd/bsd_VTsw.c: In function ‘xf86VTSwitchAway’: ./hw/xfree86/os-support/bsd/bsd_VTsw.c:67:1: warning: old-style function definition [-Wold-style-definition] 67 | xf86VTSwitchAway() | ^~~~~~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_VTsw.c: In function ‘xf86VTSwitchTo’: ../hw/xfree86/os-support/bsd/bsd_VTsw.c:82:1: warning: old-style function definition [-Wold-style-definition] 82 | xf86VTSwitchTo() | ^~~~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86OpenConsole’: ../hw/xfree86/os-support/bsd/bsd_init.c:153:1: warning: old-style function definition [-Wold-style-definition] 153 | xf86OpenConsole() | ^~~~~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86OpenPccons’: ../hw/xfree86/os-support/bsd/bsd_init.c:320:1: warning: old-style function definition [-Wold-style-definition] 320 | xf86OpenPccons() | ^~~~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86OpenPcvt’: ../hw/xfree86/os-support/bsd/bsd_init.c:451:1: warning: old-style function definition [-Wold-style-definition] 451 | xf86OpenPcvt() | ^~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86OpenWScons’: ../hw/xfree86/os-support/bsd/bsd_init.c:563:1: warning: old-style function definition [-Wold-style-definition] 563 | xf86OpenWScons() | ^~~~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86CloseConsole’: ../hw/xfree86/os-support/bsd/bsd_init.c:594:1: warning: old-style function definition [-Wold-style-definition] 594 | xf86CloseConsole() | ^~~~~~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86UseMsg’: ../hw/xfree86/os-support/bsd/bsd_init.c:671:1: warning: old-style function definition [-Wold-style-definition] 671 | xf86UseMsg() | ^~~~~~~~~~ Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1445>
2024-03-21xfree86: os-support: fix missing include of <errno.h>Enrico Weigelt, metux IT consult11-1/+20
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-20bsd_init.c: fix build on FreeBSDAlan Coopersmith1-0/+4
Commit 0d4a7ed6 put the definition of pcvt_version inside #ifdef __NetBSD__ but left one use of it outside of the ifdefs, resulting in a build failure on FreeBSD 14.0 in the gitlab CI for xf86-input-keyboard. ../hw/xfree86/os-support/bsd/bsd_init.c:540:21: error: use of undeclared identifier 'pcvt_version' pcvt_version.rmajor, pcvt_version.rminor); ^ ../hw/xfree86/os-support/bsd/bsd_init.c:540:42: error: use of undeclared identifier 'pcvt_version' pcvt_version.rmajor, pcvt_version.rminor); ^ Fixes: 0d4a7ed68 ("bsd_init.c: fix build on OpenBSD") Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1424>
2024-03-19xfree86: os-support: ppc_video: drop unused DEV_MEM defineEnrico Weigelt, metux IT consult1-4/+0
This #define is local within a .c file, but became unused about a decade ago (commit 8686463de7e1ef9814824d46526d8177a7a492a0). Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1410>
2024-03-19xfree86: os-support: drop obsolete Solaris specific LED definesEnrico Weigelt, metux IT consult1-5/+0
Historical legacy: the LED ID defines have/had different naming across various platforms - for better portability of the keyboard driver, those have been aliased to BSD's naming scheme. Meanwhile, lots of ancient platforms have been died or moved to other drivers (eg. Linux went to either evdev or libinput and not supported by the xf86-input-keyboard driver anymore). The only remaining possible consumer is Solaris. But it has it's own dedicated code (sun_kbd.c in xf86-input-keyboard), which already using the Solaris' naming. Therefore, there's no actual consumer of them left, so we can drop them. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1418>
2024-03-19Revert "Fix missing includes of <errno.h>"Peter Hutterer12-20/+7
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 include of <sys/wait.h>Enrico Weigelt, metux IT consult1-2/+0
Instead of relying on indirect includes, it's much cleaner if everybody includes directly what he needs. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1419>
2024-03-18Fix missing includes of <errno.h>Enrico Weigelt, metux IT consult12-7/+20
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-15xfree86: os-support: drop unused xf86SerialSendBreak()Enrico Weigelt, metux IT consult2-11/+0
Since no evidency of anybody actually using it (nor it ever been used within recorded git history), it's time to drop this old relic from times before the great flood. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1403>
2024-03-15xfree86: os-support: drop unused NO_OSLIB_PROTOTYPES guardEnrico Weigelt, metux IT consult1-2/+0
The last user was removed a decade ago by commit a6fcb15472bb7663ae917f5913bf07b6d3c7f186. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1407>
2024-02-29xfree86: drop unneeded wrapper xf86PrivsElevated()Enrico Weigelt, metux IT consult1-1/+1
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-19bsd_init.c: fix build on OpenBSDMatthieu Herrb1-0/+12
isolate NetBSD specific VGAPCVTID ioctl(2) call. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2024-02-18xfree86/bsd: fix build on NetBSD/amd64.Matthieu Herrb1-0/+3
The IOPL function for 64 bit systems is x86_64_iopl() there
2024-02-17Add full prototypes in hw/xfree86/os-support/bsd/bsd-video.cMatthieu Herrb1-7/+7
Trivial functions without parameters -> (void)
2023-12-02Revert "Compile lnx_platform.c on FreeBSD too."Alan Coopersmith1-5/+1
This reverts commit 947d1c7ecf5571cdb4028d20e3b06e70d18c2672. lnx_platform.c doesn't exist in this branch since commit 54681238 renamed it to shared/drm_platform.c and added it to the BSD build. Fixes build failures in CI of: ../hw/xfree86/os-support/meson.build:163:18: ERROR: File linux/lnx_platform.c does not exist. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-10-22Extented 'arm' case to 'aarch64' on BSD.John Kennedy1-1/+1
2023-10-22Compile lnx_platform.c on FreeBSD too.Austin Shafer1-1/+5
2023-10-22Fix build on FreeBSD/PowerPC architecture.Peter Grehan1-0/+4
2023-10-22Implement -novtswitch option handling for FreeBSD.Gleb Popov1-2/+2
2023-06-12logind: call SetType on the logind sessionAaron Dill1-0/+28
This allows manual handling of IdleAction and IdleHint rather than automatically calling the IdleAction every IdleSecs, due to inactivity on the underlying tty. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1194 Signed-off-by: aarondill <aaronsacks2006@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2023-02-25Remove "All rights reserved" from Oracle copyright noticesAlan Coopersmith8-8/+8
Oracle no longer includes this term in our copyright & license notices. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-23Add DRM platform for BSDAustin Shafer2-1/+2
This moves lnx_platform.c to the shared directory and adds it to the BSD build. This is needed for PRIME render offload. Acked-by: Olivier Fourdan <ofourdan@redhat.com>
2023-01-09x86/logind fix suspend/resume when there are no input devicesJocelyn Falempe1-1/+5
Make sure info->active and info->vt_active are false after dropping drm master. Normally, this is done when pausing the first input device, so it breaks when there are no input device at all. Fixes: da9d012a9 ("xf86/logind: Fix drm_drop_master before vt_reldisp") Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1387 Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
2022-11-16xf86: allow DDX driver for GPU/PCI hot-plugShashank Sharma1-2/+8
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