* [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
* Claude review: drm/i915/gem: update outdated comment
2026-03-11 13:31 [PATCH] drm/i915/gem: update outdated comment Kexin Sun
@ 2026-03-13 4:47 ` Claude Code Review Bot
2026-03-13 4:47 ` Claude Code Review Bot
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-03-13 4:47 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/i915/gem: update outdated comment
Author: Kexin Sun <kexinsun@smail.nju.edu.cn>
Patches: 1
Reviewed: 2026-03-13T14:47:22.791586
---
This is a single-patch series that updates an outdated comment in the i915 GEM context code. The change is trivially correct and well-motivated. The old comment referenced `set_engines()`, a function removed in commit d9d29c747df8, while the mutex is still needed for serialization against other concurrent engine accessors like `i915_gem_context_lock_engines()`. The new comment is more general and accurate.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Claude review: drm/i915/gem: update outdated comment
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
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-03-13 4:47 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Correctness:** The patch is correct.
- `set_engines()` is confirmed to no longer exist in `i915_gem_context.c`.
- The `engines_mutex` lock at line 1520 is still needed because `i915_gem_context_lock_engines()` (defined in `i915_gem_context.h:190`) and callers such as `i915_gem_throttle.c:61` access `ctx->engines` under this mutex concurrently.
- The replacement comment `/* Serialize against concurrent access to the context's engines */` accurately describes the purpose of the lock.
**Minor notes:**
1. The `Assisted-by: unnamed:deepseek-v3.2 coccinelle` tag is non-standard. Typically `Assisted-by` is not an established kernel tag (the recognized ones are things like `Suggested-by`, `Reported-by`, etc.). The maintainer may want the author to either drop this tag or use a more standard format. Additionally, listing "coccinelle" alongside an AI model name is confusing since Coccinelle is a separate tool — it's unclear what role each played in a comment-only change.
2. The commit message is well-written and provides good justification for why the lock is retained even though `set_engines()` is gone.
**Verdict:** Looks good to merge, modulo the non-standard tag. The code change itself is a clear improvement.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [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