Skip to content

Commit 90e1d03

Browse files
ethancedwards8alexdeucher
authored andcommitted
drm/amdgpu/gfx9: remove redundant repeated nested 0 check
The repeated checks on grbm_soft_reset are unnecessary. Remove them. Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 8802ec0 commit 90e1d03

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4175,19 +4175,17 @@ static int gfx_v9_0_soft_reset(struct amdgpu_ip_block *ip_block)
41754175
/* Disable MEC parsing/prefetching */
41764176
gfx_v9_0_cp_compute_enable(adev, false);
41774177

4178-
if (grbm_soft_reset) {
4179-
tmp = RREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET);
4180-
tmp |= grbm_soft_reset;
4181-
dev_info(adev->dev, "GRBM_SOFT_RESET=0x%08X\n", tmp);
4182-
WREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET, tmp);
4183-
tmp = RREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET);
4184-
4185-
udelay(50);
4186-
4187-
tmp &= ~grbm_soft_reset;
4188-
WREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET, tmp);
4189-
tmp = RREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET);
4190-
}
4178+
tmp = RREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET);
4179+
tmp |= grbm_soft_reset;
4180+
dev_info(adev->dev, "GRBM_SOFT_RESET=0x%08X\n", tmp);
4181+
WREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET, tmp);
4182+
tmp = RREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET);
4183+
4184+
udelay(50);
4185+
4186+
tmp &= ~grbm_soft_reset;
4187+
WREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET, tmp);
4188+
tmp = RREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET);
41914189

41924190
/* Wait a little for things to settle down */
41934191
udelay(50);

0 commit comments

Comments
 (0)