Commit a8394cfa authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher

drm/amd/powerplay: use REG32_PCIE wrapper instead for sw smu

This patch uses REG32_PCIE wrapper instead of writting pci_index2 and reading
pci_data2. This sequence should be protected by pcie_idx_lock.
Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 04cfc0c8
...@@ -211,14 +211,13 @@ static int smu_v11_0_check_fw_status(struct smu_context *smu) ...@@ -211,14 +211,13 @@ static int smu_v11_0_check_fw_status(struct smu_context *smu)
struct amdgpu_device *adev = smu->adev; struct amdgpu_device *adev = smu->adev;
uint32_t mp1_fw_flags; uint32_t mp1_fw_flags;
WREG32_SOC15(NBIF, 0, mmPCIE_INDEX2, mp1_fw_flags = RREG32_PCIE(MP1_Public |
(MP1_Public | (smnMP1_FIRMWARE_FLAGS & 0xffffffff))); (smnMP1_FIRMWARE_FLAGS & 0xffffffff));
mp1_fw_flags = RREG32_SOC15(NBIF, 0, mmPCIE_DATA2);
if ((mp1_fw_flags & MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED_MASK) >> if ((mp1_fw_flags & MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED_MASK) >>
MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED__SHIFT) MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED__SHIFT)
return 0; return 0;
return -EIO; return -EIO;
} }
......
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