drm/amdgpu: only skip smc sdma sos ta and asd fw in SRIOV for navi12
authorStanley.Yang <Stanley.Yang@amd.com>
Fri, 20 Nov 2020 06:14:53 +0000 (14:14 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 1 Dec 2020 20:58:16 +0000 (15:58 -0500)
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: Stanley.Yang <Stanley.Yang@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
drivers/gpu/drm/amd/pm/powerplay/smumgr/vega10_smumgr.c
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

index dc74ca2aa8926f2f8294c3faebea0bc64d985f34..49c0f1052109d41471548571a5d234cadaa92885 100644 (file)
@@ -593,9 +593,6 @@ static int sdma_v4_0_init_microcode(struct amdgpu_device *adev)
        struct amdgpu_firmware_info *info = NULL;
        const struct common_firmware_header *header = NULL;
 
-       if (amdgpu_sriov_vf(adev))
-               return 0;
-
        DRM_DEBUG("\n");
 
        switch (adev->asic_type) {
index 9c72b95b74639d537224b0497660d87124ba24fc..fad1cc39421953384b7cff7221107f2ce2fcc77c 100644 (file)
@@ -203,7 +203,7 @@ static int sdma_v5_0_init_microcode(struct amdgpu_device *adev)
        const struct common_firmware_header *header = NULL;
        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;
 
        DRM_DEBUG("\n");
index cb5a6f1437f81d9367fadb62cebb1bd88589aaec..5ea11a0f568f501976eea4077460b3d5fd5efd24 100644 (file)
@@ -153,9 +153,6 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev)
        struct amdgpu_firmware_info *info = NULL;
        const struct common_firmware_header *header = NULL;
 
-       if (amdgpu_sriov_vf(adev))
-               return 0;
-
        DRM_DEBUG("\n");
 
        switch (adev->asic_type) {
index daf122f24f2303b1b04e71c1148d241085e007b5..85e08a5526854db9240990d4de2d0505f1b0e2e5 100644 (file)
@@ -209,13 +209,11 @@ static int vega10_smu_init(struct pp_hwmgr *hwmgr)
        int ret;
        struct cgs_firmware_info info = {0};
 
-       if (!amdgpu_sriov_vf((struct amdgpu_device *)hwmgr->adev)) {
-               ret = cgs_get_firmware_info(hwmgr->device,
-                                               CGS_UCODE_ID_SMU,
-                                               &info);
-               if (ret || !info.kptr)
-                       return -EINVAL;
-       }
+       ret = cgs_get_firmware_info(hwmgr->device,
+                                       CGS_UCODE_ID_SMU,
+                                       &info);
+       if (ret || !info.kptr)
+               return -EINVAL;
 
        priv = kzalloc(sizeof(struct vega10_smumgr), GFP_KERNEL);
 
index 17a36a962e31659fc06a2df5abd0a59c001b812e..cf999b7a21645efcfcd8f73755f077a48e214661 100644 (file)
@@ -847,7 +847,7 @@ static int smu_sw_init(void *handle)
        smu->smu_dpm.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);
                if (ret) {
                        dev_err(adev->dev, "Failed to load smu firmware!\n");