[PATCH 8/9] drm/amdgpu/powerplay/vega12: only use PrepareMp1ForUnload for mode1 reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's not needed for BACO.

Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
index 3d3504411b63..939c53a51f71 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
@@ -2460,6 +2460,7 @@ static int vega12_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
 static int vega12_power_off_asic(struct pp_hwmgr *hwmgr)
 {
 	struct vega12_hwmgr *data = (struct vega12_hwmgr *)(hwmgr->backend);
+	struct amdgpu_device *adev = hwmgr->adev;
 	int result;
 
 	result = vega12_disable_dpm_tasks(hwmgr);
@@ -2468,10 +2469,13 @@ static int vega12_power_off_asic(struct pp_hwmgr *hwmgr)
 			);
 	data->water_marks_bitmap &= ~(WaterMarksLoaded);
 
-	PP_ASSERT_WITH_CODE((result = smum_send_msg_to_smc(hwmgr,
-			PPSMC_MSG_PrepareMp1ForUnload)) == 0,
-			"[PrepareMp1ForUnload] Failed!",
-			return result);
+	if (amdgpu_asic_reset_method(adev) == AMD_RESET_METHOD_MODE1) {
+		PP_ASSERT_WITH_CODE((result =
+				     smum_send_msg_to_smc(hwmgr,
+							  PPSMC_MSG_PrepareMp1ForUnload)) == 0,
+				    "[PrepareMp1ForUnload] Failed!",
+				    return result);
+	}
 
 	return result;
 }
-- 
2.20.1

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux