From: jsg Date: Thu, 30 Nov 2023 02:52:49 +0000 (+0000) Subject: drm/amdgpu: don't use ATRM for external devices X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=dfb3bfe40ac1a693004eadab5802c289fb852838;p=openbsd drm/amdgpu: don't use ATRM for external devices From Alex Deucher 2ab6c1237bd4a961b8d5032671510a028fb9f0f6 in linux-6.1.y/6.1.64 432e664e7c98c243fab4c3c95bd463bea3aeed28 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_bios.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_bios.c index 742845c7e56..ec1cdc6ef34 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_bios.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_bios.c @@ -29,6 +29,7 @@ #include "amdgpu.h" #include "atom.h" +#include #include #include #include @@ -406,6 +407,10 @@ static bool amdgpu_atrm_get_bios(struct amdgpu_device *adev) if (adev->flags & AMD_IS_APU) return false; + /* ATRM is for on-platform devices only */ + if (dev_is_removable(&adev->pdev->dev)) + return false; + #ifdef notyet while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) { dhandle = ACPI_HANDLE(&pdev->dev);