On 10/15/26 05:45, Liang, Prike wrote: > AMD General > > Regards, > Prike > >> -----Original Message----- >> From: Koenig, Christian <[email protected]> >> Sent: Tuesday, October 13, 2026 5:28 PM >> To: Liang, Prike <[email protected]>; [email protected] >> Cc: Deucher, Alexander <[email protected]>; Lazar, Lijo >> <[email protected]>; Prosyak, Vitaly <[email protected]> >> Subject: Re: [PATCH 2/9] drm/amdgpu: skip VKMS mode-config helpers during GPU >> reset >> >> On 10/13/26 10:24, Prike Liang wrote: >>> GPU recovery already notifies DRM clients. Skip the VKMS mode-config >>> suspend/resume helpers during that internal reset to avoid duplicate >>> client notification and atomic-state handling under the reset lock. >>> Keep ordinary system suspend and resume unchanged. >> >> Clear NAK to that as well. >> >> The amdgpu_in_reset() function can only be called from inside the GPU reset >> itself! >> >> It is *NOT* allowed to skip any operation outside the reset depending on >> this. > > How about moving the drm_mode_config_helper_suspend()/resume() calls for > VKMS into the system suspend/resume path (amdgpu_device_suspend/resume())? > VKMS has no hardware state a reset can lose, so recovery doesn't need them, > and that can drop the amdgpu_in_reset() check entirely.
I'm not an expert for the VKMS stuff but that sounds like it makes sense to me. Regards, Christian. > > Regards, > Prike >> Regards, >> Christian. >> >>> >>> Signed-off-by: Prike Liang <[email protected]> >>> --- >>> drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 ++++++ >>> 1 file changed, 6 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c >>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c >>> index d6b51b3f216b..a49c7dda4c4e 100644 >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c >>> @@ -491,6 +491,9 @@ static int amdgpu_vkms_suspend(struct >> amdgpu_ip_block *ip_block) >>> struct amdgpu_device *adev = ip_block->adev; >>> int r; >>> >>> + if (amdgpu_in_reset(adev)) >>> + return 0; >>> + >>> r = drm_mode_config_helper_suspend(adev_to_drm(adev)); >>> if (r) >>> return r; >>> @@ -505,6 +508,9 @@ static int amdgpu_vkms_resume(struct amdgpu_ip_block >> *ip_block) >>> r = amdgpu_vkms_hw_init(ip_block); >>> if (r) >>> return r; >>> + if (amdgpu_in_reset(ip_block->adev)) >>> + return 0; >>> + >>> return drm_mode_config_helper_resume(adev_to_drm(ip_block->adev)); >>> } >>> >
