diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2023-06-01 14:52:31 -0700 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-19 18:34:15 -0500 |
commit | f6929e80cdf540d7106764bda38c4ce0601fee7b (patch) | |
tree | e43da7d75c84ee5a3e032310203998db34d444f7 /drivers/gpu/drm/xe/xe_pci.c | |
parent | 1e6c20be6c83817cf68637eb334dafac3a4b2512 (diff) |
drm/xe: Allocate GT dynamically
In preparation for re-adding media GT support, switch the primary GT
within the tile to a dynamic allocation.
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20230601215244.678611-19-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_pci.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_pci.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index 4fbcbfb8a93a..be51c9e97a79 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -18,6 +18,7 @@ #include "regs/xe_gt_regs.h" #include "xe_device.h" #include "xe_drv.h" +#include "xe_gt.h" #include "xe_macros.h" #include "xe_module.h" #include "xe_pci_types.h" @@ -529,9 +530,12 @@ static int xe_info_init(struct xe_device *xe, tile->xe = xe; tile->id = id; - gt = &tile->primary_gt; + tile->primary_gt = xe_gt_alloc(tile); + if (IS_ERR(tile->primary_gt)) + return PTR_ERR(tile->primary_gt); + + gt = tile->primary_gt; gt->info.id = id; /* FIXME: Determine sensible numbering */ - gt->tile = tile; gt->info.type = XE_GT_TYPE_MAIN; gt->info.__engine_mask = graphics_desc->hw_engine_mask; if (MEDIA_VER(xe) < 13 && media_desc) |