Skip to content

Commit 8636a5c

Browse files
dceraolorodrigovivi
authored andcommitted
drm/xe: use devm instead of drmm for managed bo
The BO cleanup touches the GGTT and therefore requires the HW to be available, so we need to use devm instead of drmm. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1160 Signed-off-by: Daniele Ceraolo Spurio <[email protected]> Cc: Lucas De Marchi <[email protected]> Cc: Matthew Auld <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Lucas De Marchi <[email protected]> (cherry picked from commit 8d3a2d3) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 8776b02 commit 8636a5c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/xe/xe_bo.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ struct xe_bo *xe_bo_create_from_data(struct xe_device *xe, struct xe_tile *tile,
15751575
return bo;
15761576
}
15771577

1578-
static void __xe_bo_unpin_map_no_vm(struct drm_device *drm, void *arg)
1578+
static void __xe_bo_unpin_map_no_vm(void *arg)
15791579
{
15801580
xe_bo_unpin_map_no_vm(arg);
15811581
}
@@ -1590,7 +1590,7 @@ struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tile
15901590
if (IS_ERR(bo))
15911591
return bo;
15921592

1593-
ret = drmm_add_action_or_reset(&xe->drm, __xe_bo_unpin_map_no_vm, bo);
1593+
ret = devm_add_action_or_reset(xe->drm.dev, __xe_bo_unpin_map_no_vm, bo);
15941594
if (ret)
15951595
return ERR_PTR(ret);
15961596

@@ -1638,7 +1638,7 @@ int xe_managed_bo_reinit_in_vram(struct xe_device *xe, struct xe_tile *tile, str
16381638
if (IS_ERR(bo))
16391639
return PTR_ERR(bo);
16401640

1641-
drmm_release_action(&xe->drm, __xe_bo_unpin_map_no_vm, *src);
1641+
devm_release_action(xe->drm.dev, __xe_bo_unpin_map_no_vm, *src);
16421642
*src = bo;
16431643

16441644
return 0;

0 commit comments

Comments
 (0)