diff options
author | Michał Winiarski <michal.winiarski@intel.com> | 2023-12-05 02:33:04 +0100 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 11:45:11 -0500 |
commit | 0e1a47fcabc8ffa6f460c60c2caa04e51170fa22 (patch) | |
tree | 71a656ac72797387779a70d2524be3cc48640dfe /drivers/gpu/drm/xe/xe_ggtt.c | |
parent | 791d0362a9e2d47352ee6b35cc8999cb3404e27c (diff) |
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_ggtt.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_ggtt.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c index f8bdbd6010f7..374ae4289fa0 100644 --- a/drivers/gpu/drm/xe/xe_ggtt.c +++ b/drivers/gpu/drm/xe/xe_ggtt.c @@ -108,7 +108,6 @@ static void ggtt_fini(struct drm_device *drm, void *arg) { struct xe_ggtt *ggtt = arg; - xe_bo_unpin_map_no_vm(ggtt->scratch); ggtt->scratch = NULL; } @@ -227,10 +226,7 @@ int xe_ggtt_init(struct xe_ggtt *ggtt) else flags |= XE_BO_CREATE_VRAM_IF_DGFX(ggtt->tile); - ggtt->scratch = xe_bo_create_pin_map(xe, ggtt->tile, NULL, XE_PAGE_SIZE, - ttm_bo_type_kernel, - flags); - + ggtt->scratch = xe_managed_bo_create_pin_map(xe, ggtt->tile, XE_PAGE_SIZE, flags); if (IS_ERR(ggtt->scratch)) { err = PTR_ERR(ggtt->scratch); goto err; |