[PATCH] Fix: radeon_platform_probed return ture while kernel driver is amdgpu
hongao
hongao at uniontech.com
Wed Sep 21 03:27:24 UTC 2022
For machines have two AMD graphic cards, and the first graphic card's kernel
driver is radeon, the second graphic card belongs SI/CIK chipset which could use
both radeon and amdgpu for kernel driver. When using kernel command line
"radeon.si_support=0 amdgpu.si_support=1" to switch the second card's kernel
driver to be amdgpu, as xserver probing DDX driver for the second graphic
card, radeon_platform_probe will returned ture while kernel driver is amdgpu,
that will cause xserver terminated with error In the following process of
AddScreen/ScreenInit.
This can be fixed by adding driver name compare to radeon_platform_probe.
This fixes #181
Signed-off-by: hongao <hongao at uniontech.com>
diff --git a/src/radeon_probe.c b/src/radeon_probe.c
index 04f9e559..3b0b031f 100644
--- a/src/radeon_probe.c
+++ b/src/radeon_probe.c
@@ -228,6 +228,11 @@ radeon_platform_probe(DriverPtr pDriver,
xf86SetEntityShared(entity_num);
xf86AddEntityToScreen(pScrn, entity_num);
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1, 16, 99, 901, 0)
+ if(xf86NameCmp(dev->attribs->driver, RADEON_DRIVER_NAME))
+ return FALSE;
+#endif
+
if (!radeon_kernel_mode_enabled(pScrn, dev->pdev))
return FALSE;
--
2.20.1
More information about the xorg-devel
mailing list