diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2023-06-01 14:52:21 -0700 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-19 18:34:11 -0500 |
commit | ad703e06376d5d71acf61cac0c136b53959506bc (patch) | |
tree | ad5e2946e400fef5fd172e0838eb9c8209fbe285 /drivers/gpu/drm/xe/xe_bo_evict.c | |
parent | 3b0d4a5579968f1c42044142a4997bab9fe7ffed (diff) | |
download | lwn-ad703e06376d5d71acf61cac0c136b53959506bc.tar.gz lwn-ad703e06376d5d71acf61cac0c136b53959506bc.zip |
drm/xe: Move GGTT from GT to tile
The GGTT exists at the tile level. When a tile contains multiple GTs,
they share the same GGTT.
v2:
- Include some changes that were mis-squashed into the VRAM patch.
(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-9-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 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo_evict.c b/drivers/gpu/drm/xe/xe_bo_evict.c index 6642c5f52009..a72963c54bf3 100644 --- a/drivers/gpu/drm/xe/xe_bo_evict.c +++ b/drivers/gpu/drm/xe/xe_bo_evict.c @@ -149,9 +149,11 @@ int xe_bo_restore_kernel(struct xe_device *xe) } if (bo->flags & XE_BO_CREATE_GGTT_BIT) { - mutex_lock(&bo->gt->mem.ggtt->lock); - xe_ggtt_map_bo(bo->gt->mem.ggtt, bo); - mutex_unlock(&bo->gt->mem.ggtt->lock); + struct xe_tile *tile = gt_to_tile(bo->gt); + + mutex_lock(&tile->mem.ggtt->lock); + xe_ggtt_map_bo(tile->mem.ggtt, bo); + mutex_unlock(&tile->mem.ggtt->lock); } /* |