drm/amd/powerplay: use REG32_PCIE wrapper instead for powerplay
Subsystems (2)
PATCH 1/2 drm/amd/powerplay: use REG32_PCIE wrapper instead for powerplay
This patch uses REG32_PCIE wrapper instead of writting pci_index2 and reading pci_data2 for powerplay. This sequence should be protected by pcie_idx_lock.
--- drivers/gpu/drm/amd/powerplay/smumgr/smu9_smumgr.c | 6 ++---- drivers/gpu/drm/amd/powerplay/smumgr/vega20_smumgr.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/powerplay/smumgr/smu9_smumgr.c +2 -4
@@ -40,10 +40,8 @@ bool smu9_is_smc_ram_running(struct pp_hwmgr *hwmgr)struct amdgpu_device *adev = hwmgr->adev;uint32_t mp1_fw_flags; -WREG32_SOC15 (NBIF ,0 , mmPCIE_INDEX2, - (MP1_Public | (smnMP1_FIRMWARE_FLAGS &0xffffffff ))); - - mp1_fw_flags =RREG32_SOC15 (NBIF ,0 , mmPCIE_DATA2); + mp1_fw_flags =RREG32_PCIE (MP1_Public | + (smnMP1_FIRMWARE_FLAGS &0xffffffff ));if (mp1_fw_flags &MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED_MASK )return true;
drivers/gpu/drm/amd/powerplay/smumgr/vega20_smumgr.c +2 -4
@@ -49,10 +49,8 @@ static bool vega20_is_smc_ram_running(struct pp_hwmgr *hwmgr)struct amdgpu_device *adev = hwmgr->adev;uint32_t mp1_fw_flags; -WREG32_SOC15 (NBIF ,0 , mmPCIE_INDEX2, - (MP1_Public | (smnMP1_FIRMWARE_FLAGS &0xffffffff ))); - - mp1_fw_flags =RREG32_SOC15 (NBIF ,0 , mmPCIE_DATA2); + mp1_fw_flags =RREG32_PCIE (MP1_Public | + (smnMP1_FIRMWARE_FLAGS &0xffffffff ));if ((mp1_fw_flags &MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED_MASK ) >>MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED__SHIFT )
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1551078700-1558-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 drm/amdgpu: use REG32_PCIE wrapper instead for psp
This patch uses REG32_PCIE wrapper instead of writting pci_index2 and reading pci_data2 for psp. This sequence should be protected by pcie_idx_lock.
--- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c +1 -3
@@ -500,9 +500,7 @@ static bool psp_v3_1_smu_reload_quirk(struct psp_context *psp)struct amdgpu_device *adev = psp->adev;uint32_t reg; - reg = smnMP1_FIRMWARE_FLAGS |0x03b00000 ; -WREG32_SOC15 (NBIO ,0 , mmPCIE_INDEX2, reg); - reg =RREG32_SOC15 (NBIO ,0 , mmPCIE_DATA2); + reg =RREG32_PCIE (smnMP1_FIRMWARE_FLAGS |0x03b00000 );return (reg &MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED_MASK ) ? true : false; }
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1551078700-1558-2-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-by Alex DeucherRE: [PATCH 2/2] drm/amdgpu: use REG32_PCIE wrapper instead for psp
Series is:
Quoted 39 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Huang Rui
Sent: Monday, February 25, 2019 2:12 AM
To: [email protected]
Cc: Huang, Ray <[email protected]>; Zhang, Hawking <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: useREG32_PCIEwrapper instead for pspThis patch uses
REG32_PCIEwrapper instead of writtingpci_index2and readingpci_data2for psp. This sequence should be protected bypcie_idx_lock.Suggested-by Hawking Zhang <[email protected]>Signed-off-by Huang Rui <[email protected]>--- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/psp_v3_1.c +1
-4@@ -500,9 +500,7 @@ static bool psp_v3_1_smu_reload_quirk(struct psp_context *psp)struct amdgpu_device *adev = psp->adev;uint32_t reg; - reg = smnMP1_FIRMWARE_FLAGS |0x03b00000 ; -WREG32_SOC15 (NBIO ,0 , mmPCIE_INDEX2, reg); - reg =RREG32_SOC15 (NBIO ,0 , mmPCIE_DATA2); + reg =RREG32_PCIE (smnMP1_FIRMWARE_FLAGS |0x03b00000 );return (reg &MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED_MASK ) ? true : false; } --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx