[PATCH] drm/i915/gem: update outdated comment

Kexin Sun posted 1 patch 3 weeks, 6 days ago
drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] drm/i915/gem: update outdated comment
Posted by Kexin Sun 3 weeks, 6 days ago
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