Commit 7f03b1d1 authored by Mangesh Gadre's avatar Mangesh Gadre Committed by Alex Deucher

drm/amdgpu:Remove sdma halt/unhalt during frontdoor load

sdma halt/unhalt is performed by psp when frontdoor
loading used,so this can be skipped.

v2: Instead of removing halt/unhalt completely,
    driver will do it only during backdoor load.
Signed-off-by: default avatarMangesh Gadre <Mangesh.Gadre@amd.com>
Reviewed-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Reviewed-by: default avatarAsad Kamal <asad.kamal@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4ff96bcc
......@@ -578,6 +578,9 @@ static void sdma_v4_4_2_inst_enable(struct amdgpu_device *adev, bool enable,
return;
}
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP)
return;
for_each_inst(i, inst_mask) {
f32_cntl = RREG32_SDMA(i, regSDMA_F32_CNTL);
f32_cntl = REG_SET_FIELD(f32_cntl, SDMA_F32_CNTL, HALT, enable ? 0 : 1);
......@@ -904,10 +907,12 @@ static int sdma_v4_4_2_inst_start(struct amdgpu_device *adev,
ring->use_doorbell, ring->doorbell_index,
adev->doorbell_index.sdma_doorbell_range);
/* unhalt engine */
temp = RREG32_SDMA(i, regSDMA_F32_CNTL);
temp = REG_SET_FIELD(temp, SDMA_F32_CNTL, HALT, 0);
WREG32_SDMA(i, regSDMA_F32_CNTL, temp);
if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) {
/* unhalt engine */
temp = RREG32_SDMA(i, regSDMA_F32_CNTL);
temp = REG_SET_FIELD(temp, SDMA_F32_CNTL, HALT, 0);
WREG32_SDMA(i, regSDMA_F32_CNTL, temp);
}
}
}
......
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