drm/amdgpu: no need load microcode at sdma if powerplay is enabled
authorHuang Rui <ray.huang@amd.com>
Sun, 19 Jun 2016 15:29:20 +0000 (23:29 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Jul 2016 16:33:00 +0000 (12:33 -0400)
SDMA firmware will be loaded by SMU manager if powerplay is enabled.
So it needn't load at SDMA.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c

index b2469ffb10ea742fd237e9fb8fd2ff25ea9bf3b0..0111d153411b572e156652ec89b2cc6cc89cdaca 100644 (file)
@@ -567,19 +567,21 @@ static int sdma_v2_4_start(struct amdgpu_device *adev)
 {
        int r;
 
-       if (!adev->firmware.smu_load) {
-               r = sdma_v2_4_load_microcode(adev);
-               if (r)
-                       return r;
-       } else {
-               r = adev->smu.smumgr_funcs->check_fw_load_finish(adev,
-                                               AMDGPU_UCODE_ID_SDMA0);
-               if (r)
-                       return -EINVAL;
-               r = adev->smu.smumgr_funcs->check_fw_load_finish(adev,
-                                               AMDGPU_UCODE_ID_SDMA1);
-               if (r)
-                       return -EINVAL;
+       if (!adev->pp_enabled) {
+               if (!adev->firmware.smu_load) {
+                       r = sdma_v2_4_load_microcode(adev);
+                       if (r)
+                               return r;
+               } else {
+                       r = adev->smu.smumgr_funcs->check_fw_load_finish(adev,
+                                                       AMDGPU_UCODE_ID_SDMA0);
+                       if (r)
+                               return -EINVAL;
+                       r = adev->smu.smumgr_funcs->check_fw_load_finish(adev,
+                                                       AMDGPU_UCODE_ID_SDMA1);
+                       if (r)
+                               return -EINVAL;
+               }
        }
 
        /* halt the engine before programing */