summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_migrate.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2023-07-26 19:07:03 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:39:05 +0300
commit937b4be72baaba00fa71a02adac3716332876fa3 (patch)
treecdca8054c66feb169b9cf76a78e651da6cdaccd5 /drivers/gpu/drm/xe/xe_migrate.c
parent621c1fbd9b83fb6a731e0063ad4ea2d89ec20a9c (diff)
downloadlinux-937b4be72baaba00fa71a02adac3716332876fa3.tar.xz
drm/xe: Decouple vram check from xe_bo_addr()
The output arg is_vram in xe_bo_addr() is unused by several callers. It's also not what the function is mainly doing. Remove the argument and let the interested callers to call xe_bo_is_vram(). Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20230726160708.3967790-6-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_migrate.c')
-rw-r--r--drivers/gpu/drm/xe/xe_migrate.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index 0e369a05a5e7..03f50a14c5c2 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -132,7 +132,6 @@ static int xe_migrate_create_cleared_bo(struct xe_migrate *m, struct xe_vm *vm)
struct xe_device *xe = vm->xe;
size_t cleared_size;
u64 vram_addr;
- bool is_vram;
if (!xe_device_has_flat_ccs(xe))
return 0;
@@ -147,8 +146,7 @@ static int xe_migrate_create_cleared_bo(struct xe_migrate *m, struct xe_vm *vm)
return PTR_ERR(m->cleared_bo);
xe_map_memset(xe, &m->cleared_bo->vmap, 0, 0x00, cleared_size);
- vram_addr = xe_bo_addr(m->cleared_bo, 0, XE_PAGE_SIZE, &is_vram);
- XE_BUG_ON(!is_vram);
+ vram_addr = xe_bo_addr(m->cleared_bo, 0, XE_PAGE_SIZE);
m->cleared_vram_ofs = xe_migrate_vram_ofs(vram_addr);
return 0;
@@ -221,15 +219,13 @@ static int xe_migrate_prepare_vm(struct xe_tile *tile, struct xe_migrate *m,
level++;
}
} else {
- bool is_vram;
- u64 batch_addr = xe_bo_addr(batch, 0, XE_PAGE_SIZE, &is_vram);
+ u64 batch_addr = xe_bo_addr(batch, 0, XE_PAGE_SIZE);
m->batch_base_ofs = xe_migrate_vram_ofs(batch_addr);
if (xe->info.supports_usm) {
batch = tile->primary_gt->usm.bb_pool->bo;
- batch_addr = xe_bo_addr(batch, 0, XE_PAGE_SIZE,
- &is_vram);
+ batch_addr = xe_bo_addr(batch, 0, XE_PAGE_SIZE);
m->usm_batch_base_ofs = xe_migrate_vram_ofs(batch_addr);
}
}
@@ -1000,12 +996,8 @@ static void write_pgtable(struct xe_tile *tile, struct xe_bb *bb, u64 ppgtt_ofs,
*/
XE_BUG_ON(update->qwords > 0x1ff);
if (!ppgtt_ofs) {
- bool is_vram;
-
ppgtt_ofs = xe_migrate_vram_ofs(xe_bo_addr(update->pt_bo, 0,
- XE_PAGE_SIZE,
- &is_vram));
- XE_BUG_ON(!is_vram);
+ XE_PAGE_SIZE));
}
do {