]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu/umsch: don't execute umsch test when GPU is in reset/suspend
authorLang Yu <Lang.Yu@amd.com>
Fri, 19 Apr 2024 07:40:08 +0000 (15:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2024 14:35:29 +0000 (16:35 +0200)
commit 661d71ee5a010bdc0663e0db701931aff920e8e1 upstream.

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@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Veerabadhran Gopalakrishnan <Veerabadhran.Gopalakrishnan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c

index bfbf59326ee12d5bc5a7dd3def0a77e74971e008..1b5ef32108e146d15dae571bc74f96f6253600ce 100644 (file)
@@ -766,6 +766,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);
 }