[PATCH] drm/amdgpu/umsch: don't execute umsch test when GPU is in reset/suspend

Christian König ckoenig.leichtzumerken at gmail.com
Fri Apr 19 09:50:25 UTC 2024


Am 19.04.24 um 09:52 schrieb Lang Yu:
> umsch test needs full GPU functionality(e.g., VM update, TLB flush,
> possibly buffer moving under memory pressure) which may be not ready
> under these states. Just skip it to avoid potential issues.
>
> Signed-off-by: Lang Yu <Lang.Yu at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
> index 06ad68714172..9f9d6a6d5cf3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
> @@ -774,6 +774,9 @@ static int umsch_mm_late_init(void *handle)
>   {
>   	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>   
> +	if (amdgpu_in_reset(adev) || adev->in_s0ix || adev->in_suspend)
> +		return 0;
> +
>   	return umsch_mm_test(adev);
>   }
>   



More information about the amd-gfx mailing list