aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4727-drm-amd-powerplay-clear-VBIOS-scratchs-on-baco-exit-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4727-drm-amd-powerplay-clear-VBIOS-scratchs-on-baco-exit-.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4727-drm-amd-powerplay-clear-VBIOS-scratchs-on-baco-exit-.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4727-drm-amd-powerplay-clear-VBIOS-scratchs-on-baco-exit-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4727-drm-amd-powerplay-clear-VBIOS-scratchs-on-baco-exit-.patch
new file mode 100644
index 00000000..53191b48
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4727-drm-amd-powerplay-clear-VBIOS-scratchs-on-baco-exit-.patch
@@ -0,0 +1,42 @@
+From 96860e79942a5f30e0234e04755c69cb6b7ea160 Mon Sep 17 00:00:00 2001
+From: Evan Quan <evan.quan@amd.com>
+Date: Fri, 6 Dec 2019 11:30:45 +0800
+Subject: [PATCH 4727/4736] drm/amd/powerplay: clear VBIOS scratchs on baco
+ exit V2
+
+This is needed for coming asic init on performing gpu reset.
+
+V2: use non-asic specific programing way
+
+Change-Id: If3671a24d239e3d288665fadaa2c40c87d5da40b
+Signed-off-by: Evan Quan <evan.quan@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
+index d65187993ef9..83113cb2524c 100644
+--- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
++++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
+@@ -1675,10 +1675,17 @@ int smu_v11_0_baco_set_state(struct smu_context *smu, enum smu_baco_state state)
+ }
+ } else {
+ ret = smu_send_smc_msg(smu, SMU_MSG_ExitBaco);
++ if (ret)
++ goto out;
++
+ bif_doorbell_intr_cntl = REG_SET_FIELD(bif_doorbell_intr_cntl,
+ BIF_DOORBELL_INT_CNTL,
+ DOORBELL_INTERRUPT_DISABLE, 0);
+ WREG32_SOC15(NBIO, 0, mmBIF_DOORBELL_INT_CNTL, bif_doorbell_intr_cntl);
++
++ /* clear vbios scratch 6 and 7 for coming asic reinit */
++ WREG32(adev->bios_scratch_reg_offset + 6, 0);
++ WREG32(adev->bios_scratch_reg_offset + 7, 0);
+ }
+ if (ret)
+ goto out;
+--
+2.17.1
+