Commit 055e94a8 authored by Stanley.Yang's avatar Stanley.Yang Committed by Alex Deucher

drm/amdgpu: only skip smc sdma sos ta and asd fw in SRIOV for navi12

The KFDTopologyTest.BasicTest will failed if skip smc, sdma, sos, ta
and asd fw in SRIOV for vega10, so adjust above fw and skip load them
in SRIOV only for navi12.

v2: remove unnecessary asic type check.
Signed-off-by: default avatarStanley.Yang <Stanley.Yang@amd.com>
Reviewed-by: default avatarGuchun Chen <guchun.chen@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9ccde05c
...@@ -593,9 +593,6 @@ static int sdma_v4_0_init_microcode(struct amdgpu_device *adev) ...@@ -593,9 +593,6 @@ static int sdma_v4_0_init_microcode(struct amdgpu_device *adev)
struct amdgpu_firmware_info *info = NULL; struct amdgpu_firmware_info *info = NULL;
const struct common_firmware_header *header = NULL; const struct common_firmware_header *header = NULL;
if (amdgpu_sriov_vf(adev))
return 0;
DRM_DEBUG("\n"); DRM_DEBUG("\n");
switch (adev->asic_type) { switch (adev->asic_type) {
......
...@@ -203,7 +203,7 @@ static int sdma_v5_0_init_microcode(struct amdgpu_device *adev) ...@@ -203,7 +203,7 @@ static int sdma_v5_0_init_microcode(struct amdgpu_device *adev)
const struct common_firmware_header *header = NULL; const struct common_firmware_header *header = NULL;
const struct sdma_firmware_header_v1_0 *hdr; const struct sdma_firmware_header_v1_0 *hdr;
if (amdgpu_sriov_vf(adev)) if (amdgpu_sriov_vf(adev) && (adev->asic_type == CHIP_NAVI12))
return 0; return 0;
DRM_DEBUG("\n"); DRM_DEBUG("\n");
......
...@@ -153,9 +153,6 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev) ...@@ -153,9 +153,6 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev)
struct amdgpu_firmware_info *info = NULL; struct amdgpu_firmware_info *info = NULL;
const struct common_firmware_header *header = NULL; const struct common_firmware_header *header = NULL;
if (amdgpu_sriov_vf(adev))
return 0;
DRM_DEBUG("\n"); DRM_DEBUG("\n");
switch (adev->asic_type) { switch (adev->asic_type) {
......
...@@ -209,13 +209,11 @@ static int vega10_smu_init(struct pp_hwmgr *hwmgr) ...@@ -209,13 +209,11 @@ static int vega10_smu_init(struct pp_hwmgr *hwmgr)
int ret; int ret;
struct cgs_firmware_info info = {0}; struct cgs_firmware_info info = {0};
if (!amdgpu_sriov_vf((struct amdgpu_device *)hwmgr->adev)) {
ret = cgs_get_firmware_info(hwmgr->device, ret = cgs_get_firmware_info(hwmgr->device,
CGS_UCODE_ID_SMU, CGS_UCODE_ID_SMU,
&info); &info);
if (ret || !info.kptr) if (ret || !info.kptr)
return -EINVAL; return -EINVAL;
}
priv = kzalloc(sizeof(struct vega10_smumgr), GFP_KERNEL); priv = kzalloc(sizeof(struct vega10_smumgr), GFP_KERNEL);
......
...@@ -847,7 +847,7 @@ static int smu_sw_init(void *handle) ...@@ -847,7 +847,7 @@ static int smu_sw_init(void *handle)
smu->smu_dpm.dpm_level = AMD_DPM_FORCED_LEVEL_AUTO; smu->smu_dpm.dpm_level = AMD_DPM_FORCED_LEVEL_AUTO;
smu->smu_dpm.requested_dpm_level = AMD_DPM_FORCED_LEVEL_AUTO; smu->smu_dpm.requested_dpm_level = AMD_DPM_FORCED_LEVEL_AUTO;
if (!amdgpu_sriov_vf(adev)) { if (!amdgpu_sriov_vf(adev) || (adev->asic_type != CHIP_NAVI12)) {
ret = smu_init_microcode(smu); ret = smu_init_microcode(smu);
if (ret) { if (ret) {
dev_err(adev->dev, "Failed to load smu firmware!\n"); dev_err(adev->dev, "Failed to load smu firmware!\n");
......
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