summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2020-05-28 17:06:59 -0400
committerAlex Deucher <alexander.deucher@amd.com>2020-05-29 13:55:07 -0400
commit4292b0b2026bc10bced32636ea02dd8eed00cea9 (patch)
treeb24ff03c9bbc399c2e65ab77394a805714ebf57f /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent258620d0b36f5aae7f32099f05817206bd4ae0d1 (diff)
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: Hawking Zhang <Hawking.Zhang@amd.com> Acked-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-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 b7373c03d471..b633171281f8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1533,7 +1533,7 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
adev->firmware.gpu_info_fw = NULL;
- if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10) {
+ if (adev->discovery_bin) {
amdgpu_discovery_get_gfx_info(adev);
return 0;
}
@@ -3374,7 +3374,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
sysfs_remove_files(&adev->dev->kobj, amdgpu_dev_attributes);
if (IS_ENABLED(CONFIG_PERF_EVENTS))
amdgpu_pmu_fini(adev);
- if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10)
+ if (adev->discovery_bin)
amdgpu_discovery_fini(adev);
}