summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_guc_ct.c
diff options
context:
space:
mode:
authorMichał Winiarski <michal.winiarski@intel.com>2023-12-05 04:33:04 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:45:11 +0300
commit0e1a47fcabc8ffa6f460c60c2caa04e51170fa22 (patch)
tree71a656ac72797387779a70d2524be3cc48640dfe /drivers/gpu/drm/xe/xe_guc_ct.c
parent791d0362a9e2d47352ee6b35cc8999cb3404e27c (diff)
downloadlinux-0e1a47fcabc8ffa6f460c60c2caa04e51170fa22.tar.xz
drm/xe: Add a helper for DRM device-lifetime BO create
A helper for managed BO allocations makes it possible to remove specific "fini" actions and will simplify the following patches adding ability to execute a release action for specific BO directly. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_guc_ct.c')
-rw-r--r--drivers/gpu/drm/xe/xe_guc_ct.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index 6295d916e39f..24a33fa36496 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -114,7 +114,6 @@ static void guc_ct_fini(struct drm_device *drm, void *arg)
struct xe_guc_ct *ct = arg;
xa_destroy(&ct->fence_lookup);
- xe_bo_unpin_map_no_vm(ct->bo);
}
static void g2h_worker_func(struct work_struct *w);
@@ -148,10 +147,9 @@ int xe_guc_ct_init(struct xe_guc_ct *ct)
primelockdep(ct);
- bo = xe_bo_create_pin_map(xe, tile, NULL, guc_ct_size(),
- ttm_bo_type_kernel,
- XE_BO_CREATE_VRAM_IF_DGFX(tile) |
- XE_BO_CREATE_GGTT_BIT);
+ bo = xe_managed_bo_create_pin_map(xe, tile, guc_ct_size(),
+ XE_BO_CREATE_VRAM_IF_DGFX(tile) |
+ XE_BO_CREATE_GGTT_BIT);
if (IS_ERR(bo))
return PTR_ERR(bo);