public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/gem: update outdated comment
@ 2026-03-11 13:31 Kexin Sun
  2026-03-13  4:47 ` Claude review: " Claude Code Review Bot
  2026-03-13  4:47 ` Claude Code Review Bot
  0 siblings, 2 replies; 3+ messages in thread
From: Kexin Sun @ 2026-03-11 13:31 UTC (permalink / raw)
  To: jani.nikula, joonas.lahtinen, rodrigo.vivi, tursulin, intel-gfx,
	dri-devel
  Cc: airlied, simona, linux-kernel, julia.lawall, xutong.ma, yunbolyu,
	ratnadiraw, Kexin Sun

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-13  4:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11 13:31 [PATCH] drm/i915/gem: update outdated comment Kexin Sun
2026-03-13  4:47 ` Claude review: " Claude Code Review Bot
2026-03-13  4:47 ` Claude Code Review Bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox