projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drm/amdgpu: don't use ATRM for external devices
[platform/kernel/linux-starfive.git]
/
drivers
/
gpu
/
drm
/
amd
/
amdgpu
/
amdgpu_bios.c
diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
index
38ccec9
..
f3a09ec
100644
(file)
--- a/
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
+++ b/
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
@@
-29,6
+29,7
@@
#include "amdgpu.h"
#include "atom.h"
#include "amdgpu.h"
#include "atom.h"
+#include <linux/device.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/acpi.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/acpi.h>
@@
-287,6
+288,10
@@
static bool amdgpu_atrm_get_bios(struct amdgpu_device *adev)
if (adev->flags & AMD_IS_APU)
return false;
if (adev->flags & AMD_IS_APU)
return false;
+ /* ATRM is for on-platform devices only */
+ if (dev_is_removable(&adev->pdev->dev))
+ return false;
+
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
dhandle = ACPI_HANDLE(&pdev->dev);
if (!dhandle)
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
dhandle = ACPI_HANDLE(&pdev->dev);
if (!dhandle)