Skip to content

Commit 6ba57b7

Browse files
committed
drm/amdgpu: move discovery gfx config fetching
Move it into the fw_info function since it's logically part of the same functionality. Acked-by: Christian König <[email protected]> Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 78b7dfd commit 6ba57b7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,8 +1617,10 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
16171617
(const struct gpu_info_firmware_v1_0 *)(adev->firmware.gpu_info_fw->data +
16181618
le32_to_cpu(hdr->header.ucode_array_offset_bytes));
16191619

1620-
if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10)
1620+
if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10) {
1621+
amdgpu_discovery_get_gfx_info(adev);
16211622
goto parse_soc_bounding_box;
1623+
}
16221624

16231625
adev->gfx.config.max_shader_engines = le32_to_cpu(gpu_info_fw->gc_num_se);
16241626
adev->gfx.config.max_cu_per_sh = le32_to_cpu(gpu_info_fw->gc_num_cu_per_sh);
@@ -1768,9 +1770,6 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
17681770
if (r)
17691771
return r;
17701772

1771-
if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10)
1772-
amdgpu_discovery_get_gfx_info(adev);
1773-
17741773
amdgpu_amdkfd_device_probe(adev);
17751774

17761775
if (amdgpu_sriov_vf(adev)) {

0 commit comments

Comments
 (0)