Skip to content

Commit

Permalink
drm/amdgpu: clean up discovery testing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Deucher committed May 29, 2020
1 parent 258620d commit 4292b0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 4292b0b

Please sign in to comment.