diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2023-06-02 00:52:27 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-20 02:34:15 +0300 |
commit | 08dea7674533cfd49764bcd09ba84de7143361ab (patch) | |
tree | 9b7d342551c0ac5512cf68bd69c6195e7c999f72 /drivers/gpu/drm/xe/xe_bo_evict.c | |
parent | 876611c2b75689c6bea43bdbbbef9b358f71526a (diff) | |
download | linux-08dea7674533cfd49764bcd09ba84de7143361ab.tar.xz |
drm/xe: Move migration from GT to tile
Migration primarily focuses on the memory associated with a tile, so it
makes more sense to track this at the tile level (especially since the
driver was already skipping migration operations on media GTs).
Note that the blitter engine used to perform the migration always lives
in the tile's primary GT today. In theory that could change if media
GTs ever start including blitter engines in the future, but we can
extend the design if/when that happens in the future.
v2:
- Fix kunit test build
- Kerneldoc parameter name update
v3:
- Removed leftover prototype for removed function. (Gustavo)
- Remove unrelated / unwanted error handling change. (Gustavo)
Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://lore.kernel.org/r/20230601215244.678611-15-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_bo_evict.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_bo_evict.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo_evict.c b/drivers/gpu/drm/xe/xe_bo_evict.c index 9226195bd560..f559a7f3eb3e 100644 --- a/drivers/gpu/drm/xe/xe_bo_evict.c +++ b/drivers/gpu/drm/xe/xe_bo_evict.c @@ -8,7 +8,7 @@ #include "xe_bo.h" #include "xe_device.h" #include "xe_ggtt.h" -#include "xe_gt.h" +#include "xe_tile.h" /** * xe_bo_evict_all - evict all BOs from VRAM @@ -29,7 +29,7 @@ int xe_bo_evict_all(struct xe_device *xe) struct ttm_device *bdev = &xe->ttm; struct ww_acquire_ctx ww; struct xe_bo *bo; - struct xe_gt *gt; + struct xe_tile *tile; struct list_head still_in_list; u32 mem_type; u8 id; @@ -83,8 +83,8 @@ int xe_bo_evict_all(struct xe_device *xe) * Wait for all user BO to be evicted as those evictions depend on the * memory moved below. */ - for_each_gt(gt, xe, id) - xe_gt_migrate_wait(gt); + for_each_tile(tile, xe, id) + xe_tile_migrate_wait(tile); spin_lock(&xe->pinned.lock); for (;;) { @@ -186,7 +186,7 @@ int xe_bo_restore_user(struct xe_device *xe) { struct ww_acquire_ctx ww; struct xe_bo *bo; - struct xe_gt *gt; + struct xe_tile *tile; struct list_head still_in_list; u8 id; int ret; @@ -224,8 +224,8 @@ int xe_bo_restore_user(struct xe_device *xe) spin_unlock(&xe->pinned.lock); /* Wait for validate to complete */ - for_each_gt(gt, xe, id) - xe_gt_migrate_wait(gt); + for_each_tile(tile, xe, id) + xe_tile_migrate_wait(tile); return 0; } |