mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
Remove drmCheckModesettingSupported and kernel module loading, on Linux
The former of these is a UMS artefact which gives incorrect and misleading promise whether KMS is supported. Not to mention that AMDGPU is a only KMS driver. In a similar fashion xf86LoadKernelModule() is a relic of the times, where platforms had no scheme of detecting and loading the appropriate kernel module. Notes: - Since there is no reply from Robert the code is still around, behind a FreeBSD guard. - If FreeBSD still needs this they should look and fix it ASAP, as: - wayland itself or compositors do _not_ load kernel modules - the kernel module should be loaded early to control the clocks/fan, hence temperature of the card v2: Keep the code as FreeBSD only, add 'Notes' in the commit message. Cc: Robert Millan <rmh@freebsd.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Emil Velikov
parent
0b3bc7addf
commit
abbe23fae7
@@ -93,20 +93,20 @@ static char *amdgpu_bus_id(ScrnInfoPtr pScrn, struct pci_device *dev)
|
||||
|
||||
static Bool amdgpu_kernel_mode_enabled(ScrnInfoPtr pScrn, char *busIdString)
|
||||
{
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
int ret = drmCheckModesettingSupported(busIdString);
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
if (ret) {
|
||||
if (xf86LoadKernelModule("amdgpukms"))
|
||||
ret = drmCheckModesettingSupported(busIdString);
|
||||
}
|
||||
#endif
|
||||
if (ret) {
|
||||
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
|
||||
"[KMS] drm report modesetting isn't supported.\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
|
||||
"[KMS] Kernel modesetting enabled.\n");
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user