File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1269,6 +1269,10 @@ static void i915_gem_context_release_work(struct work_struct *work)
1269
1269
trace_i915_context_free (ctx );
1270
1270
GEM_BUG_ON (!i915_gem_context_is_closed (ctx ));
1271
1271
1272
+ spin_lock (& ctx -> i915 -> gem .contexts .lock );
1273
+ list_del (& ctx -> link );
1274
+ spin_unlock (& ctx -> i915 -> gem .contexts .lock );
1275
+
1272
1276
if (ctx -> syncobj )
1273
1277
drm_syncobj_put (ctx -> syncobj );
1274
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 );
1525
- list_del (& ctx -> link );
1526
- spin_unlock (& ctx -> i915 -> gem .contexts .lock );
1527
-
1528
1528
client = ctx -> client ;
1529
1529
if (client ) {
1530
1530
spin_lock (& client -> ctx_lock );
Original file line number Diff line number Diff line change @@ -1191,7 +1191,8 @@ void i915_gem_driver_release(struct drm_i915_private *dev_priv)
1191
1191
1192
1192
intel_uc_cleanup_firmwares (& to_gt (dev_priv )-> uc );
1193
1193
1194
- i915_gem_drain_freed_objects (dev_priv );
1194
+ /* Flush any outstanding work, including i915_gem_context.release_work. */
1195
+ i915_gem_drain_workqueue (dev_priv );
1195
1196
1196
1197
drm_WARN_ON (& dev_priv -> drm , !list_empty (& dev_priv -> gem .contexts .list ));
1197
1198
}
You can’t perform that action at this time.
0 commit comments