summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-01-27 23:19:40 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-01-27 23:19:40 +0000
commitffa89be50809dafdb969c625beebdb0b539da2ba (patch)
tree5aef9717a9eb721a228a10da4216f85be68d69ba /sys
parent248bf2cc2ff3ed54f3c2662f657ca2399788d3e5 (diff)
drm/amdgpu: don't do resets on APUs which don't support it
From Alex Deucher c3a9e0e701dfd087b0044c3598bffe880262c066 in linux 5.15.y/5.15.17 e8309d50e97851ff135c4e33325d37b032666b94 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_cik.c4
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/vi.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_cik.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_cik.c
index f3737b45f1b..eae678e4ead 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_cik.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_cik.c
@@ -1428,6 +1428,10 @@ static int cik_asic_reset(struct amdgpu_device *adev)
{
int r;
+ /* APUs don't have full asic reset */
+ if (adev->flags & AMD_IS_APU)
+ return 0;
+
if (cik_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) {
dev_info(adev->dev, "BACO reset\n");
r = amdgpu_dpm_baco_reset(adev);
diff --git a/sys/dev/pci/drm/amd/amdgpu/vi.c b/sys/dev/pci/drm/amd/amdgpu/vi.c
index afa52154346..f9012638f8c 100644
--- a/sys/dev/pci/drm/amd/amdgpu/vi.c
+++ b/sys/dev/pci/drm/amd/amdgpu/vi.c
@@ -956,6 +956,10 @@ static int vi_asic_reset(struct amdgpu_device *adev)
{
int r;
+ /* APUs don't have full asic reset */
+ if (adev->flags & AMD_IS_APU)
+ return 0;
+
if (vi_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) {
dev_info(adev->dev, "BACO reset\n");
r = amdgpu_dpm_baco_reset(adev);