Skip to contentSkip to conversation

drm/amd/powerplay: clear VBIOS scratchs on baco exit V2

PATCH In review Evan Quan 2 participants 2 messages Dec 9, 2019

Subsystems (2)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH 1/1 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
---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +7 -0
index f5469ad43929..7781d245f8ef 100644
@@ -1676,10 +1676,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;
Signature · 6 lines
2.24.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Evan Quan

This is needed for coming asic init on performing gpu reset.

V2: use non-asic specific programing way

Change-Id If3671a24d239e3d288665fadaa2c40c87d5da40b
Quoted 29 lines
---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +7 -1
index f5469ad43929..7781d245f8ef 100644
@@ -1676,10 +1676,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.24.0

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