From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: matthew.brost@intel.com, dri-devel@lists.freedesktop.org,
"Lucas De Marchi" <lucas.demarchi@intel.com>,
"Christian König" <christian.koenig@amd.com>,
"Pierre-Eric Pelloux-Prayer" <pierre-eric.pelloux-prayer@amd.com>,
"Philipp Stanner" <phasta@kernel.org>
Subject: [PATCH] drm/xe: Fix NPD when saving default context
Date: Wed, 28 May 2025 14:42:22 -0700 [thread overview]
Message-ID: <20250528-fix-sched-v1-1-c042ef23ff8b@intel.com> (raw)
xef is only valid if it's a job from userspace. For in-kernel jobs it
causes a NPD like below:
<4> [] RIP: 0010:xe_sched_job_create+0xbd/0x390 [xe]
...
<4> [] Call Trace:
<4> [] <TASK>
<4> [] __xe_bb_create_job+0xa2/0x240 [xe]
<4> [] ? find_held_lock+0x31/0x90
<4> [] ? xa_find_after+0x12c/0x250
<4> [] xe_bb_create_job+0x6e/0x380 [xe]
<4> [] ? xa_find_after+0x136/0x250
<4> [] ? __drm_dev_dbg+0x7d/0xb0
<4> [] xe_gt_record_default_lrcs+0x542/0xb00 [xe]
Since drm_file starts with 1 for the unique id, just use 0 for the
in-kernel jobs.
Fixes: 2956554823ce ("drm/sched: Store the drm client_id in drm_sched_fence")
Cc: Christian König <christian.koenig@amd.com>
Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Cc: Philipp Stanner <phasta@kernel.org>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
drivers/gpu/drm/xe/xe_sched_job.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_sched_job.c b/drivers/gpu/drm/xe/xe_sched_job.c
index 5921293b25db3..d21bf8f269640 100644
--- a/drivers/gpu/drm/xe/xe_sched_job.c
+++ b/drivers/gpu/drm/xe/xe_sched_job.c
@@ -114,7 +114,7 @@ struct xe_sched_job *xe_sched_job_create(struct xe_exec_queue *q,
xe_exec_queue_get(job->q);
err = drm_sched_job_init(&job->drm, q->entity, 1, NULL,
- q->xef->drm->client_id);
+ q->xef ? q->xef->drm->client_id : 0);
if (err)
goto err_free;
next reply other threads:[~2025-05-28 21:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 21:42 Lucas De Marchi [this message]
2025-05-28 21:47 ` ✓ CI.Patch_applied: success for drm/xe: Fix NPD when saving default context Patchwork
2025-05-28 21:47 ` ✓ CI.checkpatch: " Patchwork
2025-05-28 21:49 ` ✓ CI.KUnit: " Patchwork
2025-05-28 21:51 ` [PATCH] " Matthew Brost
2025-05-29 14:23 ` Lucas De Marchi
2025-05-28 21:59 ` ✓ CI.Build: success for " Patchwork
2025-05-28 22:02 ` ✓ CI.Hooks: " Patchwork
2025-05-28 22:03 ` ✓ CI.checksparse: " Patchwork
2025-05-28 22:24 ` ✓ Xe.CI.BAT: " Patchwork
2025-05-29 3:33 ` ✗ Xe.CI.Full: failure " Patchwork
2025-05-29 4:55 ` [PATCH] " Upadhyay, Tejas
2025-05-29 4:59 ` Matthew Brost
2025-05-29 14:24 ` Lucas De Marchi
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=20250528-fix-sched-v1-1-c042ef23ff8b@intel.com \
--to=lucas.demarchi@intel.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=phasta@kernel.org \
--cc=pierre-eric.pelloux-prayer@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox