drm/amdgpu/discovery: handle AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO in SMU
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Apr 2022 22:08:49 +0000 (18:08 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 May 2022 14:43:54 +0000 (10:43 -0400)
Handle SMU load ordering when firmware load type is
AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO.  This works similarly
to AMDGPU_FW_LOAD_DIRECT where the SMU load order is
different from the standard ordering when front door
loading is enabled.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

index 9c177cc..0adcbd3 100644 (file)
@@ -2292,8 +2292,9 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
        if (r)
                return r;
 
-       if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&
-           !amdgpu_sriov_vf(adev)) {
+       if ((adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&
+            !amdgpu_sriov_vf(adev)) ||
+           (adev->firmware.load_type == AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO && amdgpu_dpm == 1)) {
                r = amdgpu_discovery_set_smu_ip_blocks(adev);
                if (r)
                        return r;