summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_pci.c
diff options
context:
space:
mode:
authorMichał Winiarski <michal.winiarski@intel.com>2023-12-05 04:32:57 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:45:10 +0300
commit7e4ce4518b906a960122f29e8f3426ca95ebee0a (patch)
treee1f676a043743f9f4a3e6d7679eb038207fad576 /drivers/gpu/drm/xe/xe_pci.c
parent4f5ee007f62a1825cec8140b14b28ef532f570f8 (diff)
downloadlinux-7e4ce4518b906a960122f29e8f3426ca95ebee0a.tar.xz
drm/xe: Introduce xe_tile_init_early and use at earlier point in probe
It also merges the GT (which is part of tile) initialization happening at xe_info_init with allocating other per-tile data structures into a common helper function. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Matthew Brost <matthew.brost@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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 9e35ebfb3341..87257716b93e 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -26,6 +26,7 @@
#include "xe_pm.h"
#include "xe_sriov.h"
#include "xe_step.h"
+#include "xe_tile.h"
enum toggle_d3cold {
D3COLD_DISABLE,
@@ -623,12 +624,11 @@ static int xe_info_init(struct xe_device *xe,
xe->info.tile_count = 1 + graphics_desc->max_remote_tiles;
for_each_tile(tile, xe, id) {
- tile->xe = xe;
- tile->id = id;
+ int err;
- tile->primary_gt = xe_gt_alloc(tile);
- if (IS_ERR(tile->primary_gt))
- return PTR_ERR(tile->primary_gt);
+ err = xe_tile_init_early(tile, xe, id);
+ if (err)
+ return err;
gt = tile->primary_gt;
gt->info.id = xe->info.gt_count++;