diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2023-06-02 00:52:21 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-20 02:34:11 +0300 |
commit | ad703e06376d5d71acf61cac0c136b53959506bc (patch) | |
tree | ad5e2946e400fef5fd172e0838eb9c8209fbe285 /drivers/gpu/drm/xe/xe_gt.c | |
parent | 3b0d4a5579968f1c42044142a4997bab9fe7ffed (diff) | |
download | linux-ad703e06376d5d71acf61cac0c136b53959506bc.tar.xz |
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_gt.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_gt.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c index 18eda5b1377f..0f07f810bb1f 100644 --- a/drivers/gpu/drm/xe/xe_gt.c +++ b/drivers/gpu/drm/xe/xe_gt.c @@ -67,11 +67,6 @@ int xe_gt_alloc(struct xe_device *xe, struct xe_gt *gt) XE_BUG_ON(gt->info.type == XE_GT_TYPE_UNINITIALIZED); if (!xe_gt_is_media_type(gt)) { - gt->mem.ggtt = drmm_kzalloc(drm, sizeof(*gt->mem.ggtt), - GFP_KERNEL); - if (!gt->mem.ggtt) - return -ENOMEM; - gt->mem.vram_mgr = drmm_kzalloc(drm, sizeof(*gt->mem.vram_mgr), GFP_KERNEL); if (!gt->mem.vram_mgr) @@ -80,7 +75,6 @@ int xe_gt_alloc(struct xe_device *xe, struct xe_gt *gt) } else { struct xe_gt *full_gt = xe_find_full_gt(gt); - gt->mem.ggtt = full_gt->mem.ggtt; gt->mem.vram_mgr = full_gt->mem.vram_mgr; } @@ -354,8 +348,6 @@ int xe_gt_init_noalloc(struct xe_gt *gt) if (err) goto err_force_wake; - err = xe_ggtt_init_noalloc(gt, gt->mem.ggtt); - err_force_wake: err2 = xe_force_wake_put(gt_to_fw(gt), XE_FW_GT); XE_WARN_ON(err2); @@ -376,7 +368,7 @@ static int gt_fw_domain_init(struct xe_gt *gt) xe_pat_init(gt); if (!xe_gt_is_media_type(gt)) { - err = xe_ggtt_init(gt, gt->mem.ggtt); + err = xe_ggtt_init(gt_to_tile(gt)->mem.ggtt); if (err) goto err_force_wake; } |