提交 887656f0 编写于 作者: H Heinrich Schuchardt 提交者: Alex Deucher

drm/amdgpu/gmc8: remove dead code (v2)

In an if block for (running == 0) running cannot be non-zero.

v2: agd: remove unused variable
Reviewed-by: NChristian König <christian.koenig@amd.com>
Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 5c0eb98e
...@@ -253,7 +253,7 @@ static int gmc_v8_0_mc_load_microcode(struct amdgpu_device *adev) ...@@ -253,7 +253,7 @@ static int gmc_v8_0_mc_load_microcode(struct amdgpu_device *adev)
const struct mc_firmware_header_v1_0 *hdr; const struct mc_firmware_header_v1_0 *hdr;
const __le32 *fw_data = NULL; const __le32 *fw_data = NULL;
const __le32 *io_mc_regs = NULL; const __le32 *io_mc_regs = NULL;
u32 running, blackout = 0; u32 running;
int i, ucode_size, regs_size; int i, ucode_size, regs_size;
if (!adev->mc.fw) if (!adev->mc.fw)
...@@ -279,11 +279,6 @@ static int gmc_v8_0_mc_load_microcode(struct amdgpu_device *adev) ...@@ -279,11 +279,6 @@ static int gmc_v8_0_mc_load_microcode(struct amdgpu_device *adev)
running = REG_GET_FIELD(RREG32(mmMC_SEQ_SUP_CNTL), MC_SEQ_SUP_CNTL, RUN); running = REG_GET_FIELD(RREG32(mmMC_SEQ_SUP_CNTL), MC_SEQ_SUP_CNTL, RUN);
if (running == 0) { if (running == 0) {
if (running) {
blackout = RREG32(mmMC_SHARED_BLACKOUT_CNTL);
WREG32(mmMC_SHARED_BLACKOUT_CNTL, blackout | 1);
}
/* reset the engine and set to writable */ /* reset the engine and set to writable */
WREG32(mmMC_SEQ_SUP_CNTL, 0x00000008); WREG32(mmMC_SEQ_SUP_CNTL, 0x00000008);
WREG32(mmMC_SEQ_SUP_CNTL, 0x00000010); WREG32(mmMC_SEQ_SUP_CNTL, 0x00000010);
...@@ -315,9 +310,6 @@ static int gmc_v8_0_mc_load_microcode(struct amdgpu_device *adev) ...@@ -315,9 +310,6 @@ static int gmc_v8_0_mc_load_microcode(struct amdgpu_device *adev)
break; break;
udelay(1); udelay(1);
} }
if (running)
WREG32(mmMC_SHARED_BLACKOUT_CNTL, blackout);
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册