Commit e0fb14c8 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/apci: switch ATIF/ATCS probe order

Try the handle from ATPX first since this is the most
common case.
Reviewed-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 77bf762f
...@@ -230,16 +230,15 @@ static acpi_handle amdgpu_atif_probe_handle(acpi_handle dhandle) ...@@ -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 /* For PX/HG systems, ATIF and ATPX are in the iGPU's namespace, on dGPU only
* systems, ATIF is in the dGPU's namespace. * 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()) { if (amdgpu_has_atpx()) {
status = acpi_get_handle(amdgpu_atpx_get_dhandle(), "ATIF", status = acpi_get_handle(amdgpu_atpx_get_dhandle(), "ATIF",
&handle); &handle);
if (ACPI_SUCCESS(status)) if (ACPI_SUCCESS(status))
goto out; goto out;
} }
status = acpi_get_handle(dhandle, "ATIF", &handle);
if (ACPI_SUCCESS(status))
goto out;
DRM_DEBUG_DRIVER("No ATIF handle found\n"); DRM_DEBUG_DRIVER("No ATIF handle found\n");
return NULL; return NULL;
...@@ -259,16 +258,15 @@ static acpi_handle amdgpu_atcs_probe_handle(acpi_handle dhandle) ...@@ -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 /* For PX/HG systems, ATCS and ATPX are in the iGPU's namespace, on dGPU only
* systems, ATIF is in the dGPU's namespace. * 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()) { if (amdgpu_has_atpx()) {
status = acpi_get_handle(amdgpu_atpx_get_dhandle(), "ATCS", status = acpi_get_handle(amdgpu_atpx_get_dhandle(), "ATCS",
&handle); &handle);
if (ACPI_SUCCESS(status)) if (ACPI_SUCCESS(status))
goto out; goto out;
} }
status = acpi_get_handle(dhandle, "ATCS", &handle);
if (ACPI_SUCCESS(status))
goto out;
DRM_DEBUG_DRIVER("No ATCS handle found\n"); DRM_DEBUG_DRIVER("No ATCS handle found\n");
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment