Skip to content

Commit 432e664

Browse files
committed
drm/amdgpu: don't use ATRM for external devices
The ATRM ACPI method is for fetching the dGPU vbios rom image on laptops and all-in-one systems. It should not be used for external add in cards. If the dGPU is thunderbolt connected, don't try ATRM. v2: pci_is_thunderbolt_attached only works for Intel. Use pdev->external_facing instead. v3: dev_is_removable() seems to be what we want Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2925 Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent b3c942b commit 432e664

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "amdgpu.h"
3030
#include "atom.h"
3131

32+
#include <linux/device.h>
3233
#include <linux/pci.h>
3334
#include <linux/slab.h>
3435
#include <linux/acpi.h>
@@ -287,6 +288,10 @@ static bool amdgpu_atrm_get_bios(struct amdgpu_device *adev)
287288
if (adev->flags & AMD_IS_APU)
288289
return false;
289290

291+
/* ATRM is for on-platform devices only */
292+
if (dev_is_removable(&adev->pdev->dev))
293+
return false;
294+
290295
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
291296
dhandle = ACPI_HANDLE(&pdev->dev);
292297
if (!dhandle)

0 commit comments

Comments
 (0)