]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu: Forward soft recovery errors to userspace
authorJoshua Ashton <joshua@froggi.es>
Thu, 7 Mar 2024 19:04:31 +0000 (19:04 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:25 +0000 (15:34 +0200)
commit 829798c789f567ef6ba4b084c15b7b5f3bd98d51 upstream.

As we discussed before[1], soft recovery should be
forwarded to userspace, or we can get into a really
bad state where apps will keep submitting hanging
command buffers cascading us to a hard reset.

1: https://lore.kernel.org/all/bf23d5ed-9a6b-43e7-84ee-8cbfd0d60f18@froggi.es/
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 434967aadbbbe3ad9103cc29e9a327de20fdba01)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c

index e4742b65032d1dce16db69ea086c86dd4895e610..4a9cec002691a4402a746e72fadce137fa6a3a67 100644 (file)
@@ -262,9 +262,8 @@ amdgpu_job_prepare_job(struct drm_sched_job *sched_job,
        struct dma_fence *fence = NULL;
        int r;
 
-       /* Ignore soft recovered fences here */
        r = drm_sched_entity_error(s_entity);
-       if (r && r != -ENODATA)
+       if (r)
                goto error;
 
        if (!fence && job->gang_submit)