aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index 72f31cc7df00..6d06f8eb659f 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -819,23 +819,12 @@ static int sdma_v3_0_load_microcode(struct amdgpu_device *adev)
819 */ 819 */
820static int sdma_v3_0_start(struct amdgpu_device *adev) 820static int sdma_v3_0_start(struct amdgpu_device *adev)
821{ 821{
822 int r, i; 822 int r;
823 823
824 if (!adev->pp_enabled) { 824 if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT) {
825 if (adev->firmware.load_type != AMDGPU_FW_LOAD_SMU) { 825 r = sdma_v3_0_load_microcode(adev);
826 r = sdma_v3_0_load_microcode(adev); 826 if (r)
827 if (r) 827 return r;
828 return r;
829 } else {
830 for (i = 0; i < adev->sdma.num_instances; i++) {
831 r = adev->smu.smumgr_funcs->check_fw_load_finish(adev,
832 (i == 0) ?
833 AMDGPU_UCODE_ID_SDMA0 :
834 AMDGPU_UCODE_ID_SDMA1);
835 if (r)
836 return -EINVAL;
837 }
838 }
839 } 828 }
840 829
841 /* disable sdma engine before programing it */ 830 /* disable sdma engine before programing it */