From: Kexin Sun <kexinsun@smail.nju.edu.cn>
To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
rodrigo.vivi@intel.com, tursulin@ursulin.net,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: airlied@gmail.com, simona@ffwll.ch, linux-kernel@vger.kernel.org,
julia.lawall@inria.fr, xutong.ma@inria.fr, yunbolyu@smu.edu.sg,
ratnadiraw@smu.edu.sg, Kexin Sun <kexinsun@smail.nju.edu.cn>
Subject: [PATCH] drm/i915/gem: update outdated comment
Date: Wed, 11 Mar 2026 21:31:53 +0800 [thread overview]
Message-ID: <20260311133153.576-1-kexinsun@smail.nju.edu.cn> (raw)
The function set_engines() was removed in commit d9d29c747df8
("drm/i915/gem: Don't allow changing the engine set on running
contexts (v3)").
However, concurrent code paths such as i915_gem_context_lock_engines()
still access ctx->engines under engines_mutex (e.g. from execbuf
throttle), so the lock in context_close() remains necessary to
serialize the engine teardown against these concurrent readers.
So, remove the outdated reference to set_engines(), but preserve the
serialization reminder.
Assisted-by: unnamed:deepseek-v3.2 coccinelle
Signed-off-by: Kexin Sun <kexinsun@smail.nju.edu.cn>
---
drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
index 6ac0f23570f3..958e3c822948 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
@@ -1516,7 +1516,7 @@ static void context_close(struct i915_gem_context *ctx)
{
struct i915_drm_client *client;
- /* Flush any concurrent set_engines() */
+ /* Serialize against concurrent access to the context's engines */
mutex_lock(&ctx->engines_mutex);
unpin_engines(__context_engines_static(ctx));
engines_idle_release(ctx, rcu_replace_pointer(ctx->engines, NULL, 1));
--
2.25.1
next reply other threads:[~2026-03-11 21:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 13:31 Kexin Sun [this message]
2026-03-13 4:47 ` Claude review: drm/i915/gem: update outdated comment Claude Code Review Bot
2026-03-13 4:47 ` Claude Code Review Bot
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=20260311133153.576-1-kexinsun@smail.nju.edu.cn \
--to=kexinsun@smail.nju.edu.cn \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=julia.lawall@inria.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=ratnadiraw@smu.edu.sg \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=tursulin@ursulin.net \
--cc=xutong.ma@inria.fr \
--cc=yunbolyu@smu.edu.sg \
/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