Skip to content

Commit

Permalink
Revert "drm/amdgpu: simplify ATPX detection"
Browse files Browse the repository at this point in the history
This reverts commit f5fda6d.

You can't use BASE_CLASS in pci_get_class.

Bug: https://gitlab.freedesktop.org/drm/amd/issues/995
Acked-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Alex Deucher committed Dec 29, 2019
1 parent e31d941 commit 5d30ed3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,17 @@ static bool amdgpu_atpx_detect(void)
bool d3_supported = false;
struct pci_dev *parent_pdev;

while ((pdev = pci_get_class(PCI_BASE_CLASS_DISPLAY << 16, pdev)) != NULL) {
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
vga_count++;

has_atpx |= (amdgpu_atpx_pci_probe_handle(pdev) == true);

parent_pdev = pci_upstream_bridge(pdev);
d3_supported |= parent_pdev && parent_pdev->bridge_d3;
amdgpu_atpx_get_quirks(pdev);
}

while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_OTHER << 8, pdev)) != NULL) {
vga_count++;

has_atpx |= (amdgpu_atpx_pci_probe_handle(pdev) == true);
Expand Down

0 comments on commit 5d30ed3

Please sign in to comment.