Skip to content

Commit 5e46ad8

Browse files
konradybciorobclark
authored andcommitted
drm/msm/a6xx: Ensure clean GMU state in a6xx_gmu_fw_start
While it's not very well understood, there is some sort of a fault handler implemented in the GMU firmware which triggers when a certain bit is set, resulting in the M3 core not booting up the way we expect it to. Write a magic value to a magic register to hopefully prevent that from happening. Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/543335/ Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent 29af760 commit 5e46ad8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/msm/adreno/a6xx_gmu.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,12 @@ static int a6xx_gmu_fw_start(struct a6xx_gmu *gmu, unsigned int state)
790790
gmu_write(gmu, REG_A6XX_GMU_AHB_FENCE_RANGE_0,
791791
(1 << 31) | (0xa << 18) | (0xa0));
792792

793+
/*
794+
* Snapshots toggle the NMI bit which will result in a jump to the NMI
795+
* handler instead of __main. Set the M3 config value to avoid that.
796+
*/
797+
gmu_write(gmu, REG_A6XX_GMU_CM3_CFG, 0x4052);
798+
793799
/*
794800
* Note that the GMU has a slightly different layout for
795801
* chip_id, for whatever reason, so a bit of massaging

0 commit comments

Comments
 (0)