]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/xe: Rename ___xe_bo_create_locked()
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Mon, 8 Sep 2025 10:12:42 +0000 (12:12 +0200)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Wed, 10 Sep 2025 07:16:04 +0000 (09:16 +0200)
Don't start external function names with underscores.
Rename to xe_bo_init_locked().

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250908101246.65025-10-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/xe/xe_bo.c
drivers/gpu/drm/xe/xe_bo.h
drivers/gpu/drm/xe/xe_dma_buf.c

index be10673e5c7700a699851074822064e2de48cded..ad2863a7df77439cfd8afc17c4e163fbd52e2591 100644 (file)
@@ -1163,10 +1163,10 @@ int xe_bo_notifier_prepare_pinned(struct xe_bo *bo)
        if (bo->flags & XE_BO_FLAG_PINNED_NORESTORE)
                goto out_unlock_bo;
 
-       backup = ___xe_bo_create_locked(xe, NULL, NULL, bo->ttm.base.resv, NULL, xe_bo_size(bo),
-                                       DRM_XE_GEM_CPU_CACHING_WB, ttm_bo_type_kernel,
-                                       XE_BO_FLAG_SYSTEM | XE_BO_FLAG_NEEDS_CPU_ACCESS |
-                                       XE_BO_FLAG_PINNED, exec);
+       backup = xe_bo_init_locked(xe, NULL, NULL, bo->ttm.base.resv, NULL, xe_bo_size(bo),
+                                  DRM_XE_GEM_CPU_CACHING_WB, ttm_bo_type_kernel,
+                                  XE_BO_FLAG_SYSTEM | XE_BO_FLAG_NEEDS_CPU_ACCESS |
+                                  XE_BO_FLAG_PINNED, exec);
        if (IS_ERR(backup)) {
                ret = PTR_ERR(backup);
                goto out_unlock_bo;
@@ -1242,11 +1242,10 @@ int xe_bo_evict_pinned(struct xe_bo *bo)
                goto out_unlock_bo;
 
        if (!backup) {
-               backup = ___xe_bo_create_locked(xe, NULL, NULL, bo->ttm.base.resv,
-                                               NULL, xe_bo_size(bo),
-                                               DRM_XE_GEM_CPU_CACHING_WB, ttm_bo_type_kernel,
-                                               XE_BO_FLAG_SYSTEM | XE_BO_FLAG_NEEDS_CPU_ACCESS |
-                                               XE_BO_FLAG_PINNED, exec);
+               backup = xe_bo_init_locked(xe, NULL, NULL, bo->ttm.base.resv, NULL, xe_bo_size(bo),
+                                          DRM_XE_GEM_CPU_CACHING_WB, ttm_bo_type_kernel,
+                                          XE_BO_FLAG_SYSTEM | XE_BO_FLAG_NEEDS_CPU_ACCESS |
+                                          XE_BO_FLAG_PINNED, exec);
                if (IS_ERR(backup)) {
                        ret = PTR_ERR(backup);
                        goto out_unlock_bo;
@@ -2036,7 +2035,7 @@ void xe_bo_free(struct xe_bo *bo)
 }
 
 /**
- * ___xe_bo_create_locked() - Initialize or create an xe_bo.
+ * xe_bo_init_locked() - Initialize or create an xe_bo.
  * @xe: The xe device.
  * @bo: An already allocated buffer object or NULL
  * if the function should allocate a new one.
@@ -2056,11 +2055,11 @@ void xe_bo_free(struct xe_bo *bo)
  *
  * Return: The buffer object on success. Negative error pointer on failure.
  */
-struct xe_bo *___xe_bo_create_locked(struct xe_device *xe, struct xe_bo *bo,
-                                    struct xe_tile *tile, struct dma_resv *resv,
-                                    struct ttm_lru_bulk_move *bulk, size_t size,
-                                    u16 cpu_caching, enum ttm_bo_type type,
-                                    u32 flags, struct drm_exec *exec)
+struct xe_bo *xe_bo_init_locked(struct xe_device *xe, struct xe_bo *bo,
+                               struct xe_tile *tile, struct dma_resv *resv,
+                               struct ttm_lru_bulk_move *bulk, size_t size,
+                               u16 cpu_caching, enum ttm_bo_type type,
+                               u32 flags, struct drm_exec *exec)
 {
        struct ttm_operation_ctx ctx = {
                .interruptible = true,
@@ -2252,11 +2251,11 @@ __xe_bo_create_locked(struct xe_device *xe,
                }
        }
 
-       bo = ___xe_bo_create_locked(xe, bo, tile, vm ? xe_vm_resv(vm) : NULL,
-                                   vm && !xe_vm_in_fault_mode(vm) &&
-                                   flags & XE_BO_FLAG_USER ?
-                                   &vm->lru_bulk_move : NULL, size,
-                                   cpu_caching, type, flags, exec);
+       bo = xe_bo_init_locked(xe, bo, tile, vm ? xe_vm_resv(vm) : NULL,
+                              vm && !xe_vm_in_fault_mode(vm) &&
+                              flags & XE_BO_FLAG_USER ?
+                              &vm->lru_bulk_move : NULL, size,
+                              cpu_caching, type, flags, exec);
        if (IS_ERR(bo))
                return bo;
 
index 096b5c71554a85246deb260c59f5a4717f60e790..ebca6e9f695913ac9d3d7d999181ca85bf567cbe 100644 (file)
@@ -89,11 +89,11 @@ struct sg_table;
 struct xe_bo *xe_bo_alloc(void);
 void xe_bo_free(struct xe_bo *bo);
 
-struct xe_bo *___xe_bo_create_locked(struct xe_device *xe, struct xe_bo *bo,
-                                    struct xe_tile *tile, struct dma_resv *resv,
-                                    struct ttm_lru_bulk_move *bulk, size_t size,
-                                    u16 cpu_caching, enum ttm_bo_type type,
-                                    u32 flags, struct drm_exec *exec);
+struct xe_bo *xe_bo_init_locked(struct xe_device *xe, struct xe_bo *bo,
+                               struct xe_tile *tile, struct dma_resv *resv,
+                               struct ttm_lru_bulk_move *bulk, size_t size,
+                               u16 cpu_caching, enum ttm_bo_type type,
+                               u32 flags, struct drm_exec *exec);
 struct xe_bo *
 xe_bo_create_locked_range(struct xe_device *xe,
                          struct xe_tile *tile, struct xe_vm *vm,
index 2e5b4b37118f1a3dc9562935888afc5ea71b4378..607c3f4ef3b928362e748f3dc1dbcb7a133b3f44 100644 (file)
@@ -238,9 +238,9 @@ xe_dma_buf_init_obj(struct drm_device *dev, struct xe_bo *storage,
                if (ret)
                        break;
 
-               bo = ___xe_bo_create_locked(xe, storage, NULL, resv, NULL, dma_buf->size,
-                                           0, /* Will require 1way or 2way for vm_bind */
-                                           ttm_bo_type_sg, XE_BO_FLAG_SYSTEM, &exec);
+               bo = xe_bo_init_locked(xe, storage, NULL, resv, NULL, dma_buf->size,
+                                      0, /* Will require 1way or 2way for vm_bind */
+                                      ttm_bo_type_sg, XE_BO_FLAG_SYSTEM, &exec);
                drm_exec_retry_on_contention(&exec);
                if (IS_ERR(bo)) {
                        ret = PTR_ERR(bo);