aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2019-07-08 13:44:59 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-07-09 17:43:31 -0500
commitf54eeab4e7e066c6fd2f409f599f043c4ef98a6e (patch)
treecbd60642cef23a63992a2d4508bcbe253cf4a750 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parentdrm/amdgpu: add missing documentation on new module parameters (diff)
downloadlinux-dev-f54eeab4e7e066c6fd2f409f599f043c4ef98a6e.tar.xz
linux-dev-f54eeab4e7e066c6fd2f409f599f043c4ef98a6e.zip
drm/amdgpu: properly guard the generic discovery code
It's only available on navi and newer. Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index d721b4d3024c..7401bc95c15b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2615,7 +2615,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
if (amdgpu_mes && adev->asic_type >= CHIP_NAVI10)
adev->enable_mes = true;
- if (amdgpu_discovery) {
+ if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10) {
r = amdgpu_discovery_init(adev);
if (r) {
dev_err(adev->dev, "amdgpu_discovery_init failed\n");
@@ -2885,7 +2885,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
if (IS_ENABLED(CONFIG_PERF_EVENTS))
amdgpu_pmu_fini(adev);
amdgpu_debugfs_preempt_cleanup(adev);
- if (amdgpu_discovery)
+ if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10)
amdgpu_discovery_fini(adev);
}