xserver/hw/xfree86
Shashank Sharma 82bf391c93 xf86: allow DDX driver for GPU/PCI hot-plug
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-11-16 15:47:46 +00:00
..
common xf86: allow DDX driver for GPU/PCI hot-plug 2022-11-16 15:47:46 +00:00
ddc print_edid: Fix a format string error 2022-06-26 09:16:42 +00:00
dixmods Remove autotools support 2021-10-27 13:15:40 +03:00
doc Remove autotools support 2021-10-27 13:15:40 +03:00
dri Remove autotools support 2021-10-27 13:15:40 +03:00
dri2 Remove autotools support 2021-10-27 13:15:40 +03:00
drivers xf86-input-inputtest: Fix build on systems without SOCK_NONBLOCK 2022-06-26 09:16:42 +00:00
exa Remove autotools support 2021-10-27 13:15:40 +03:00
fbdevhw Remove autotools support 2021-10-27 13:15:40 +03:00
glamor_egl Remove autotools support 2021-10-27 13:15:40 +03:00
i2c Remove autotools support 2021-10-27 13:15:40 +03:00
int10 Remove autotools support 2021-10-27 13:15:40 +03:00
loader Remove autotools support 2021-10-27 13:15:40 +03:00
man xf86: allow DDX driver for GPU/PCI hot-plug 2022-11-16 15:47:46 +00:00
modes Better fix for xf86CompatOut() when there are no privates 2021-12-06 23:27:35 +02:00
os-support xf86: allow DDX driver for GPU/PCI hot-plug 2022-11-16 15:47:46 +00:00
parser Remove autotools support 2021-10-27 13:15:40 +03:00
ramdac Replace "the the" with a single "the" in docs & comments 2022-03-31 13:27:57 -07:00
shadowfb Remove autotools support 2021-10-27 13:15:40 +03:00
utils Remove autotools support 2021-10-27 13:15:40 +03:00
vgahw Remove autotools support 2021-10-27 13:15:40 +03:00
x86emu x86emu: re-align breaks in ins() and outs() 2022-03-31 20:44:06 +00:00
xkb Remove autotools support 2021-10-27 13:15:40 +03:00
.gitignore Xorg: Add Xorg.wrap to hw/xfree86/.gitignore 2014-04-18 11:39:16 +02:00
Xorg.sh.in xfree86: rename Xorg.bin to Xorg 2015-01-05 09:53:58 +10:00
meson.build meson: Support building Xnest and Xorg on darwin 2022-06-26 09:16:42 +00:00
sdksyms.sh Consolidate fourcc.h 2020-09-15 11:43:16 +02:00
xorg-wrapper.c Fix various spelling errors 2019-10-01 17:05:28 +00:00
xorgconf.cpp Fix spelling/wording issues 2020-07-05 13:07:33 -07:00