Commit 6b77dab5 authored by Nirmoy Das's avatar Nirmoy Das

drm/xe: Remove redundant param from xe_bo_create_user

BO from xe_bo_create_user() will always be of type,
ttm_bo_type_device. So remove that redundant parameter.

Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240816102248.25628-1-nirmoy.das@intel.comSigned-off-by: default avatarNirmoy Das <nirmoy.das@intel.com>
parent 4099cfda
...@@ -125,7 +125,7 @@ static void ccs_test_run_tile(struct xe_device *xe, struct xe_tile *tile, ...@@ -125,7 +125,7 @@ static void ccs_test_run_tile(struct xe_device *xe, struct xe_tile *tile,
kunit_info(test, "Testing system memory\n"); kunit_info(test, "Testing system memory\n");
bo = xe_bo_create_user(xe, NULL, NULL, SZ_1M, DRM_XE_GEM_CPU_CACHING_WC, bo = xe_bo_create_user(xe, NULL, NULL, SZ_1M, DRM_XE_GEM_CPU_CACHING_WC,
ttm_bo_type_device, bo_flags); bo_flags);
if (IS_ERR(bo)) { if (IS_ERR(bo)) {
KUNIT_FAIL(test, "Failed to create bo.\n"); KUNIT_FAIL(test, "Failed to create bo.\n");
return; return;
...@@ -206,7 +206,6 @@ static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struc ...@@ -206,7 +206,6 @@ static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struc
xe_vm_lock(vm, false); xe_vm_lock(vm, false);
bo = xe_bo_create_user(xe, NULL, vm, 0x10000, bo = xe_bo_create_user(xe, NULL, vm, 0x10000,
DRM_XE_GEM_CPU_CACHING_WC, DRM_XE_GEM_CPU_CACHING_WC,
ttm_bo_type_device,
bo_flags); bo_flags);
xe_vm_unlock(vm); xe_vm_unlock(vm);
if (IS_ERR(bo)) { if (IS_ERR(bo)) {
...@@ -216,7 +215,7 @@ static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struc ...@@ -216,7 +215,7 @@ static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struc
external = xe_bo_create_user(xe, NULL, NULL, 0x10000, external = xe_bo_create_user(xe, NULL, NULL, 0x10000,
DRM_XE_GEM_CPU_CACHING_WC, DRM_XE_GEM_CPU_CACHING_WC,
ttm_bo_type_device, bo_flags); bo_flags);
if (IS_ERR(external)) { if (IS_ERR(external)) {
KUNIT_FAIL(test, "external bo create err=%pe\n", external); KUNIT_FAIL(test, "external bo create err=%pe\n", external);
goto cleanup_bo; goto cleanup_bo;
......
...@@ -126,7 +126,7 @@ static void xe_test_dmabuf_import_same_driver(struct xe_device *xe) ...@@ -126,7 +126,7 @@ static void xe_test_dmabuf_import_same_driver(struct xe_device *xe)
kunit_info(test, "running %s\n", __func__); kunit_info(test, "running %s\n", __func__);
bo = xe_bo_create_user(xe, NULL, NULL, size, DRM_XE_GEM_CPU_CACHING_WC, bo = xe_bo_create_user(xe, NULL, NULL, size, DRM_XE_GEM_CPU_CACHING_WC,
ttm_bo_type_device, params->mem_mask); params->mem_mask);
if (IS_ERR(bo)) { if (IS_ERR(bo)) {
KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n", KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n",
PTR_ERR(bo)); PTR_ERR(bo));
......
...@@ -641,7 +641,7 @@ static void validate_ccs_test_run_tile(struct xe_device *xe, struct xe_tile *til ...@@ -641,7 +641,7 @@ static void validate_ccs_test_run_tile(struct xe_device *xe, struct xe_tile *til
long ret; long ret;
sys_bo = xe_bo_create_user(xe, NULL, NULL, SZ_4M, sys_bo = xe_bo_create_user(xe, NULL, NULL, SZ_4M,
DRM_XE_GEM_CPU_CACHING_WC, ttm_bo_type_device, DRM_XE_GEM_CPU_CACHING_WC,
XE_BO_FLAG_SYSTEM | XE_BO_FLAG_NEEDS_CPU_ACCESS); XE_BO_FLAG_SYSTEM | XE_BO_FLAG_NEEDS_CPU_ACCESS);
if (IS_ERR(sys_bo)) { if (IS_ERR(sys_bo)) {
...@@ -664,8 +664,9 @@ static void validate_ccs_test_run_tile(struct xe_device *xe, struct xe_tile *til ...@@ -664,8 +664,9 @@ static void validate_ccs_test_run_tile(struct xe_device *xe, struct xe_tile *til
} }
xe_bo_unlock(sys_bo); xe_bo_unlock(sys_bo);
ccs_bo = xe_bo_create_user(xe, NULL, NULL, SZ_4M, DRM_XE_GEM_CPU_CACHING_WC, ccs_bo = xe_bo_create_user(xe, NULL, NULL, SZ_4M,
ttm_bo_type_device, bo_flags | XE_BO_FLAG_NEEDS_CPU_ACCESS); DRM_XE_GEM_CPU_CACHING_WC,
bo_flags | XE_BO_FLAG_NEEDS_CPU_ACCESS);
if (IS_ERR(ccs_bo)) { if (IS_ERR(ccs_bo)) {
KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n", KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n",
...@@ -687,8 +688,9 @@ static void validate_ccs_test_run_tile(struct xe_device *xe, struct xe_tile *til ...@@ -687,8 +688,9 @@ static void validate_ccs_test_run_tile(struct xe_device *xe, struct xe_tile *til
} }
xe_bo_unlock(ccs_bo); xe_bo_unlock(ccs_bo);
vram_bo = xe_bo_create_user(xe, NULL, NULL, SZ_4M, DRM_XE_GEM_CPU_CACHING_WC, vram_bo = xe_bo_create_user(xe, NULL, NULL, SZ_4M,
ttm_bo_type_device, bo_flags | XE_BO_FLAG_NEEDS_CPU_ACCESS); DRM_XE_GEM_CPU_CACHING_WC,
bo_flags | XE_BO_FLAG_NEEDS_CPU_ACCESS);
if (IS_ERR(vram_bo)) { if (IS_ERR(vram_bo)) {
KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n", KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n",
PTR_ERR(vram_bo)); PTR_ERR(vram_bo));
......
...@@ -1499,11 +1499,10 @@ struct xe_bo *xe_bo_create_locked(struct xe_device *xe, struct xe_tile *tile, ...@@ -1499,11 +1499,10 @@ struct xe_bo *xe_bo_create_locked(struct xe_device *xe, struct xe_tile *tile,
struct xe_bo *xe_bo_create_user(struct xe_device *xe, struct xe_tile *tile, struct xe_bo *xe_bo_create_user(struct xe_device *xe, struct xe_tile *tile,
struct xe_vm *vm, size_t size, struct xe_vm *vm, size_t size,
u16 cpu_caching, u16 cpu_caching,
enum ttm_bo_type type,
u32 flags) u32 flags)
{ {
struct xe_bo *bo = __xe_bo_create_locked(xe, tile, vm, size, 0, ~0ULL, struct xe_bo *bo = __xe_bo_create_locked(xe, tile, vm, size, 0, ~0ULL,
cpu_caching, type, cpu_caching, ttm_bo_type_device,
flags | XE_BO_FLAG_USER); flags | XE_BO_FLAG_USER);
if (!IS_ERR(bo)) if (!IS_ERR(bo))
xe_bo_unlock_vm_held(bo); xe_bo_unlock_vm_held(bo);
...@@ -2027,7 +2026,7 @@ int xe_gem_create_ioctl(struct drm_device *dev, void *data, ...@@ -2027,7 +2026,7 @@ int xe_gem_create_ioctl(struct drm_device *dev, void *data,
} }
bo = xe_bo_create_user(xe, NULL, vm, args->size, args->cpu_caching, bo = xe_bo_create_user(xe, NULL, vm, args->size, args->cpu_caching,
ttm_bo_type_device, bo_flags); bo_flags);
if (vm) if (vm)
xe_vm_unlock(vm); xe_vm_unlock(vm);
...@@ -2333,7 +2332,6 @@ int xe_bo_dumb_create(struct drm_file *file_priv, ...@@ -2333,7 +2332,6 @@ int xe_bo_dumb_create(struct drm_file *file_priv,
bo = xe_bo_create_user(xe, NULL, NULL, args->size, bo = xe_bo_create_user(xe, NULL, NULL, args->size,
DRM_XE_GEM_CPU_CACHING_WC, DRM_XE_GEM_CPU_CACHING_WC,
ttm_bo_type_device,
XE_BO_FLAG_VRAM_IF_DGFX(xe_device_get_root_tile(xe)) | XE_BO_FLAG_VRAM_IF_DGFX(xe_device_get_root_tile(xe)) |
XE_BO_FLAG_SCANOUT | XE_BO_FLAG_SCANOUT |
XE_BO_FLAG_NEEDS_CPU_ACCESS); XE_BO_FLAG_NEEDS_CPU_ACCESS);
......
...@@ -87,7 +87,6 @@ struct xe_bo *xe_bo_create(struct xe_device *xe, struct xe_tile *tile, ...@@ -87,7 +87,6 @@ struct xe_bo *xe_bo_create(struct xe_device *xe, struct xe_tile *tile,
struct xe_bo *xe_bo_create_user(struct xe_device *xe, struct xe_tile *tile, struct xe_bo *xe_bo_create_user(struct xe_device *xe, struct xe_tile *tile,
struct xe_vm *vm, size_t size, struct xe_vm *vm, size_t size,
u16 cpu_caching, u16 cpu_caching,
enum ttm_bo_type type,
u32 flags); u32 flags);
struct xe_bo *xe_bo_create_pin_map(struct xe_device *xe, struct xe_tile *tile, struct xe_bo *xe_bo_create_pin_map(struct xe_device *xe, struct xe_tile *tile,
struct xe_vm *vm, size_t size, struct xe_vm *vm, size_t size,
......
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