diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2021-05-20 18:50:51 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-05-22 01:03:05 +0300 |
commit | e0fb14c8dcec68a8b0941462afcc67efeb1badf3 (patch) | |
tree | e78b383fe50204a8343af54f0758a08ffc8be254 /drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | |
parent | 77bf762f8b3011b2d00eb49098071952956da892 (diff) | |
download | linux-e0fb14c8dcec68a8b0941462afcc67efeb1badf3.tar.xz |
drm/amdgpu/apci: switch ATIF/ATCS probe order
Try the handle from ATPX first since this is the most
common case.
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index 67675eff1d2a..dcde3f658a7a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c @@ -230,16 +230,15 @@ static acpi_handle amdgpu_atif_probe_handle(acpi_handle dhandle) /* For PX/HG systems, ATIF and ATPX are in the iGPU's namespace, on dGPU only * systems, ATIF is in the dGPU's namespace. */ - status = acpi_get_handle(dhandle, "ATIF", &handle); - if (ACPI_SUCCESS(status)) - goto out; - if (amdgpu_has_atpx()) { status = acpi_get_handle(amdgpu_atpx_get_dhandle(), "ATIF", &handle); if (ACPI_SUCCESS(status)) goto out; } + status = acpi_get_handle(dhandle, "ATIF", &handle); + if (ACPI_SUCCESS(status)) + goto out; DRM_DEBUG_DRIVER("No ATIF handle found\n"); return NULL; @@ -259,16 +258,15 @@ static acpi_handle amdgpu_atcs_probe_handle(acpi_handle dhandle) /* For PX/HG systems, ATCS and ATPX are in the iGPU's namespace, on dGPU only * systems, ATIF is in the dGPU's namespace. */ - status = acpi_get_handle(dhandle, "ATCS", &handle); - if (ACPI_SUCCESS(status)) - goto out; - if (amdgpu_has_atpx()) { status = acpi_get_handle(amdgpu_atpx_get_dhandle(), "ATCS", &handle); if (ACPI_SUCCESS(status)) goto out; } + status = acpi_get_handle(dhandle, "ATCS", &handle); + if (ACPI_SUCCESS(status)) + goto out; DRM_DEBUG_DRIVER("No ATCS handle found\n"); return NULL; |