From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: amd-gfx@lists.freedesktop.org
Cc: luben.tuikov@amd.com
Subject: [PATCH 6/8] drm/amdgpu: abort submissions during prepare on error
Date: Thu, 20 Apr 2023 13:57:50 +0200 [thread overview]
Message-ID: <20230420115752.31470-6-christian.koenig@amd.com> (raw)
In-Reply-To: <20230420115752.31470-1-christian.koenig@amd.com>
Forward errors from previous submissions to this one.
Signed-off-by: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
index 0a950c1c8782..5462f0406b02 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@ -256,16 +256,27 @@ 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)
+ goto error;
+
if (job->gang_submit)
fence = amdgpu_device_switch_gang(ring->adev, job->gang_submit);
while (!fence && job->vm && !job->vmid) {
r = amdgpu_vmid_grab(job->vm, ring, job, &fence);
- if (r)
+ if (r) {
DRM_ERROR("Error getting VM ID (%d)\n", r);
+ goto error;
+ }
}
return fence;
+
+error:
+ dma_fence_set_error(&job->base.s_fence->finished, r);
+ return NULL;
}
static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job)
--
2.34.1
next prev parent reply other threads:[~2023-04-20 11:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 11:57 [PATCH 1/8] drm/scheduler: properly forward fence errors Christian König
2023-04-20 11:57 ` [PATCH 2/8] drm/scheduler: add drm_sched_entity_error and use rcu for last_scheduled Christian König
2023-04-20 11:57 ` [PATCH 3/8] drm/amdgpu: add amdgpu_error_* debugfs file Christian König
2023-04-20 11:57 ` [PATCH 4/8] drm/amdgpu: mark force completed fences with -ECANCELED Christian König
2023-04-20 11:57 ` [PATCH 5/8] drm/amdgpu: mark soft recovered fences with -ENODATA Christian König
2023-04-20 11:57 ` Christian König [this message]
2023-04-20 11:57 ` [PATCH 7/8] drm/amdgpu: reset VM when an error is detected Christian König
2023-04-20 11:57 ` [PATCH 8/8] drm/amdgpu: add VM generation token Christian König
2023-04-21 5:22 ` [PATCH 1/8] drm/scheduler: properly forward fence errors Luben Tuikov
2023-04-21 13:27 ` Christian König
2023-04-21 13:40 ` Deucher, Alexander
2023-04-24 10:06 ` Christian König
2023-04-27 10:35 ` Yin, ZhenGuo (Chris)
2023-04-27 12:05 ` Christian König
2023-08-17 8:17 ` Yin, ZhenGuo (Chris)
2023-08-23 8:12 ` Yin, ZhenGuo (Chris)
2023-08-23 8:26 ` Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230420115752.31470-6-christian.koenig@amd.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=luben.tuikov@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.