Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> On Thu, Dec 30, 2021 at 5:01 AM Evan Quan <evan.quan@xxxxxxx> wrote: > > To pair with the workaround which always reset the ASIC in suspend. > Otherwise, the reset which relies on BACO will fail. > > Fixes: 50583690930d ("drm/amdgpu: always reset the asic in suspend (v2)") > > Signed-off-by: Evan Quan <evan.quan@xxxxxxx> > Change-Id: I39ed072af16e34ef1e1c16b50ace6d46fbc388b9 > --- > drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c > index 4d867778a65c..7628be2f2301 100644 > --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c > +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c > @@ -1308,10 +1308,16 @@ static int smu_disable_dpms(struct smu_context *smu) > { > struct amdgpu_device *adev = smu->adev; > int ret = 0; > + /* > + * TODO: (adev->in_suspend && !adev->in_s0ix) is added to pair > + * the workaround which always reset the asic in suspend. > + * It's likely that workaround will be dropped in the future. > + * Then the change here should be dropped together. > + */ > bool use_baco = !smu->is_apu && > ((amdgpu_in_reset(adev) && > (amdgpu_asic_reset_method(adev) == AMD_RESET_METHOD_BACO)) || > - ((adev->in_runpm || adev->in_s4) && amdgpu_asic_supports_baco(adev))); > + ((adev->in_runpm || adev->in_s4 || (adev->in_suspend && !adev->in_s0ix)) && amdgpu_asic_supports_baco(adev))); > > /* > * For custom pptable uploading, skip the DPM features > -- > 2.29.0 >