Patch1 - 6: Reviewed-by: Evan Quan <evan.quan@xxxxxxx> Patch7 - 9: I think suspend needs also be taken into consideration as vega20_power_off_asic() is also on the suspend path. That means even if the default asic method is baco, you may still need using PrepareMp1ForUnload() for suspend case. BTW there is typo for patch9 header. The "vega120" should be "vega20". Regards, Evan > -----Original Message----- > From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Alex > Deucher > Sent: Wednesday, July 24, 2019 1:00 PM > To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx> > Subject: [PATCH 9/9] drm/amdgpu/powerplay/vega120: only use > PrepareMp1ForUnload for mode1 reset > > Use PrepareMp1ForUnload for mode1 reset and PrepareMp1ForShutdown > for baco reset. > > Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> > --- > .../gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 18 > ++++++++++++++---- > 1 file changed, 14 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c > b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c > index e16d6654692f..c3d2b32f0b66 100644 > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c > @@ -3756,6 +3756,7 @@ static int vega20_disable_dpm_tasks(struct > pp_hwmgr *hwmgr) static int vega20_power_off_asic(struct pp_hwmgr > *hwmgr) { > struct vega20_hwmgr *data = (struct vega20_hwmgr *)(hwmgr- > >backend); > + struct amdgpu_device *adev = hwmgr->adev; > int result; > > result = vega20_disable_dpm_tasks(hwmgr); @@ -3764,10 +3765,19 > @@ static int vega20_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); > + } else { > + PP_ASSERT_WITH_CODE((result = > + smum_send_msg_to_smc(hwmgr, > + > PPSMC_MSG_PrepareMp1ForShutdown)) == 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 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx