We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3549ad8 commit 1b12f8dCopy full SHA for 1b12f8d
drivers/gpu/drm/xe/xe_ggtt.c
@@ -198,6 +198,13 @@ static const struct xe_ggtt_pt_ops xelpg_pt_wa_ops = {
198
.ggtt_set_pte = xe_ggtt_set_pte_and_flush,
199
};
200
201
+static void dev_fini_ggtt(void *arg)
202
+{
203
+ struct xe_ggtt *ggtt = arg;
204
+
205
+ drain_workqueue(ggtt->wq);
206
+}
207
208
/**
209
* xe_ggtt_init_early - Early GGTT initialization
210
* @ggtt: the &xe_ggtt to be initialized
@@ -254,6 +261,10 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
254
261
if (err)
255
262
return err;
256
263
264
+ err = devm_add_action_or_reset(xe->drm.dev, dev_fini_ggtt, ggtt);
265
+ if (err)
266
+ return err;
267
257
268
if (IS_SRIOV_VF(xe)) {
258
269
err = xe_gt_sriov_vf_prepare_ggtt(xe_tile_get_gt(ggtt->tile, 0));
259
270
0 commit comments