Commit 8d3a2d3d authored by Daniele Ceraolo Spurio's avatar Daniele Ceraolo Spurio Committed by Lucas De Marchi

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/1160Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240809231237.1503796-2-daniele.ceraolospurio@intel.comSigned-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
parent b0ee81da
...@@ -1584,7 +1584,7 @@ struct xe_bo *xe_bo_create_from_data(struct xe_device *xe, struct xe_tile *tile, ...@@ -1584,7 +1584,7 @@ struct xe_bo *xe_bo_create_from_data(struct xe_device *xe, struct xe_tile *tile,
return bo; return bo;
} }
static void __xe_bo_unpin_map_no_vm(struct drm_device *drm, void *arg) static void __xe_bo_unpin_map_no_vm(void *arg)
{ {
xe_bo_unpin_map_no_vm(arg); xe_bo_unpin_map_no_vm(arg);
} }
...@@ -1599,7 +1599,7 @@ struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tile ...@@ -1599,7 +1599,7 @@ struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tile
if (IS_ERR(bo)) if (IS_ERR(bo))
return bo; return bo;
ret = drmm_add_action_or_reset(&xe->drm, __xe_bo_unpin_map_no_vm, bo); ret = devm_add_action_or_reset(xe->drm.dev, __xe_bo_unpin_map_no_vm, bo);
if (ret) if (ret)
return ERR_PTR(ret); return ERR_PTR(ret);
...@@ -1647,7 +1647,7 @@ int xe_managed_bo_reinit_in_vram(struct xe_device *xe, struct xe_tile *tile, str ...@@ -1647,7 +1647,7 @@ int xe_managed_bo_reinit_in_vram(struct xe_device *xe, struct xe_tile *tile, str
if (IS_ERR(bo)) if (IS_ERR(bo))
return PTR_ERR(bo); return PTR_ERR(bo);
drmm_release_action(&xe->drm, __xe_bo_unpin_map_no_vm, *src); devm_release_action(xe->drm.dev, __xe_bo_unpin_map_no_vm, *src);
*src = bo; *src = bo;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment