Commit f54eeab4 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu: properly guard the generic discovery code

It's only available on navi and newer.
Reviewed-by: default avatarXiaojie Yuan <xiaojie.yuan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 40562787
...@@ -2615,7 +2615,7 @@ int amdgpu_device_init(struct amdgpu_device *adev, ...@@ -2615,7 +2615,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
if (amdgpu_mes && adev->asic_type >= CHIP_NAVI10) if (amdgpu_mes && adev->asic_type >= CHIP_NAVI10)
adev->enable_mes = true; adev->enable_mes = true;
if (amdgpu_discovery) { if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10) {
r = amdgpu_discovery_init(adev); r = amdgpu_discovery_init(adev);
if (r) { if (r) {
dev_err(adev->dev, "amdgpu_discovery_init failed\n"); dev_err(adev->dev, "amdgpu_discovery_init failed\n");
...@@ -2885,7 +2885,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev) ...@@ -2885,7 +2885,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
if (IS_ENABLED(CONFIG_PERF_EVENTS)) if (IS_ENABLED(CONFIG_PERF_EVENTS))
amdgpu_pmu_fini(adev); amdgpu_pmu_fini(adev);
amdgpu_debugfs_preempt_cleanup(adev); amdgpu_debugfs_preempt_cleanup(adev);
if (amdgpu_discovery) if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10)
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