We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cec344 commit ad3aa7cCopy full SHA for ad3aa7c
drivers/gpu/drm/i915/gem/i915_gem_context.c
@@ -1269,6 +1269,10 @@ static void i915_gem_context_release_work(struct work_struct *work)
1269
trace_i915_context_free(ctx);
1270
GEM_BUG_ON(!i915_gem_context_is_closed(ctx));
1271
1272
+ spin_lock(&ctx->i915->gem.contexts.lock);
1273
+ list_del(&ctx->link);
1274
+ spin_unlock(&ctx->i915->gem.contexts.lock);
1275
+
1276
if (ctx->syncobj)
1277
drm_syncobj_put(ctx->syncobj);
1278
@@ -1521,10 +1525,6 @@ static void context_close(struct i915_gem_context *ctx)
1521
1525
1522
1526
ctx->file_priv = ERR_PTR(-EBADF);
1523
1527
1524
- spin_lock(&ctx->i915->gem.contexts.lock);
- list_del(&ctx->link);
- spin_unlock(&ctx->i915->gem.contexts.lock);
-
1528
client = ctx->client;
1529
if (client) {
1530
spin_lock(&client->ctx_lock);
0 commit comments