Commit 7c67d74d authored by Jingwen Chen's avatar Jingwen Chen Committed by Alex Deucher

drm/amd/pm: Skip use smc fw data in SRIOV

smc fw is not needed in SRIOV, thus driver should not try to get smc
fw data.
Signed-off-by: default avatarJingwen Chen <Jingwen.Chen2@amd.com>
Reviewed-by: default avatarEmily.Deng <Emily.Deng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3704cdd3
...@@ -322,39 +322,42 @@ int smu_v11_0_setup_pptable(struct smu_context *smu) ...@@ -322,39 +322,42 @@ int smu_v11_0_setup_pptable(struct smu_context *smu)
void *table; void *table;
uint16_t version_major, version_minor; uint16_t version_major, version_minor;
hdr = (const struct smc_firmware_header_v1_0 *) adev->pm.fw->data; if (!amdgpu_sriov_vf(adev)) {
version_major = le16_to_cpu(hdr->header.header_version_major); hdr = (const struct smc_firmware_header_v1_0 *) adev->pm.fw->data;
version_minor = le16_to_cpu(hdr->header.header_version_minor); version_major = le16_to_cpu(hdr->header.header_version_major);
if ((version_major == 2 && smu->smu_table.boot_values.pp_table_id > 0) || version_minor = le16_to_cpu(hdr->header.header_version_minor);
adev->asic_type == CHIP_NAVY_FLOUNDER) { if ((version_major == 2 && smu->smu_table.boot_values.pp_table_id > 0) ||
dev_info(adev->dev, "use driver provided pptable %d\n", smu->smu_table.boot_values.pp_table_id); adev->asic_type == CHIP_NAVY_FLOUNDER) {
switch (version_minor) { dev_info(adev->dev, "use driver provided pptable %d\n", smu->smu_table.boot_values.pp_table_id);
case 0: switch (version_minor) {
ret = smu_v11_0_set_pptable_v2_0(smu, &table, &size); case 0:
break; ret = smu_v11_0_set_pptable_v2_0(smu, &table, &size);
case 1: break;
ret = smu_v11_0_set_pptable_v2_1(smu, &table, &size, case 1:
smu->smu_table.boot_values.pp_table_id); ret = smu_v11_0_set_pptable_v2_1(smu, &table, &size,
break; smu->smu_table.boot_values.pp_table_id);
default: break;
ret = -EINVAL; default:
break; ret = -EINVAL;
break;
}
if (ret)
return ret;
goto out;
} }
if (ret) }
return ret;
} else { dev_info(adev->dev, "use vbios provided pptable\n");
dev_info(adev->dev, "use vbios provided pptable\n"); index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1,
index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1, powerplayinfo);
powerplayinfo);
ret = amdgpu_atombios_get_data_table(adev, index, &atom_table_size, &frev, &crev, ret = amdgpu_atombios_get_data_table(adev, index, &atom_table_size, &frev, &crev,
(uint8_t **)&table); (uint8_t **)&table);
if (ret) if (ret)
return ret; return ret;
size = atom_table_size; size = atom_table_size;
}
out:
if (!smu->smu_table.power_play_table) if (!smu->smu_table.power_play_table)
smu->smu_table.power_play_table = table; smu->smu_table.power_play_table = table;
if (!smu->smu_table.power_play_table_size) if (!smu->smu_table.power_play_table_size)
......
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