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: Jingwen Chen <Jingwen.Chen2@amd.com>
Reviewed-by: Emily.Deng <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Jingwen Chen 2020-09-18 11:23:09 +08:00 committed by Alex Deucher
parent 3704cdd30a
commit 7c67d74d10
1 changed files with 33 additions and 30 deletions

View File

@ -322,6 +322,7 @@ int smu_v11_0_setup_pptable(struct smu_context *smu)
void *table;
uint16_t version_major, version_minor;
if (!amdgpu_sriov_vf(adev)) {
hdr = (const struct smc_firmware_header_v1_0 *) adev->pm.fw->data;
version_major = le16_to_cpu(hdr->header.header_version_major);
version_minor = le16_to_cpu(hdr->header.header_version_minor);
@ -342,8 +343,10 @@ int smu_v11_0_setup_pptable(struct smu_context *smu)
}
if (ret)
return ret;
goto out;
}
}
} else {
dev_info(adev->dev, "use vbios provided pptable\n");
index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1,
powerplayinfo);
@ -353,8 +356,8 @@ int smu_v11_0_setup_pptable(struct smu_context *smu)
if (ret)
return ret;
size = atom_table_size;
}
out:
if (!smu->smu_table.power_play_table)
smu->smu_table.power_play_table = table;
if (!smu->smu_table.power_play_table_size)