Commit 4292b0b2 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu: clean up discovery testing

Rather than checking of the variable is enabled and the
chip is the right family check for the presence of the
discovery table.
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Acked-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 258620d0
...@@ -1533,7 +1533,7 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev) ...@@ -1533,7 +1533,7 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
adev->firmware.gpu_info_fw = NULL; adev->firmware.gpu_info_fw = NULL;
if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10) { if (adev->discovery_bin) {
amdgpu_discovery_get_gfx_info(adev); amdgpu_discovery_get_gfx_info(adev);
return 0; return 0;
} }
...@@ -3374,7 +3374,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev) ...@@ -3374,7 +3374,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
sysfs_remove_files(&adev->dev->kobj, amdgpu_dev_attributes); sysfs_remove_files(&adev->dev->kobj, amdgpu_dev_attributes);
if (IS_ENABLED(CONFIG_PERF_EVENTS)) if (IS_ENABLED(CONFIG_PERF_EVENTS))
amdgpu_pmu_fini(adev); amdgpu_pmu_fini(adev);
if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10) if (adev->discovery_bin)
amdgpu_discovery_fini(adev); amdgpu_discovery_fini(adev);
} }
......
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