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.

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));
>  }
>  

Reply via email to