浏览代码

drm/radeon: handle non-VGA class pci devices with ATRM

Newer PX systems have non-VGA pci class dGPUs.  Update
the ATRM fetch method to handle those cases.

bug:
https://bugzilla.kernel.org/show_bug.cgi?id=75401

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
Alex Deucher 11 年之前
父节点
当前提交
d8ade3526b
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14 0
      drivers/gpu/drm/radeon/radeon_bios.c

+ 14 - 0
drivers/gpu/drm/radeon/radeon_bios.c

@@ -196,6 +196,20 @@ static bool radeon_atrm_get_bios(struct radeon_device *rdev)
 		}
 		}
 	}
 	}
 
 
+	if (!found) {
+		while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_OTHER << 8, pdev)) != NULL) {
+			dhandle = ACPI_HANDLE(&pdev->dev);
+			if (!dhandle)
+				continue;
+
+			status = acpi_get_handle(dhandle, "ATRM", &atrm_handle);
+			if (!ACPI_FAILURE(status)) {
+				found = true;
+				break;
+			}
+		}
+	}
+
 	if (!found)
 	if (!found)
 		return false;
 		return false;