Skip to content

Commit

Permalink
drm/xe: Drop extra_gts[] declarations and XE_GT_TYPE_REMOTE
Browse files Browse the repository at this point in the history
Now that tiles and GTs are handled separately, extra_gts[] doesn't
really provide any useful information that we can't just infer directly.
The primary GT of the root tile and of the remote tiles behave the same
way and don't need independent handling.

When we re-add support for media GTs in a future patch, the presence of
media can be determined from MEDIA_VER() (i.e., >= 13) and media's GSI
offset handling is expected to remain constant for all forseeable future
platforms, so it won't need to be provided in a definition structure
either.

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20230601215244.678611-18-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
  • Loading branch information
Matt Roper authored and Rodrigo Vivi committed Dec 19, 2023
1 parent 68ccb9b commit 1e6c20b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 31 deletions.
1 change: 0 additions & 1 deletion drivers/gpu/drm/xe/xe_gt_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ struct xe_ring_ops;
enum xe_gt_type {
XE_GT_TYPE_UNINITIALIZED,
XE_GT_TYPE_MAIN,
XE_GT_TYPE_REMOTE,
XE_GT_TYPE_MEDIA,
};

Expand Down
36 changes: 6 additions & 30 deletions drivers/gpu/drm/xe/xe_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ struct xe_device_desc {

const char *platform_name;
const struct xe_subplatform_desc *subplatforms;
const struct xe_gt_desc *extra_gts;

enum xe_platform platform;

Expand Down Expand Up @@ -257,20 +256,11 @@ static const struct xe_device_desc dg2_desc = {
DG2_FEATURES,
};

static const struct xe_gt_desc pvc_gts[] = {
{
.type = XE_GT_TYPE_REMOTE,
.mmio_adj_limit = 0,
.mmio_adj_offset = 0,
},
};

static const __maybe_unused struct xe_device_desc pvc_desc = {
.graphics = &graphics_xehpc,
DGFX_FEATURES,
PLATFORM(XE_PVC),
.require_force_probe = true,
.extra_gts = pvc_gts,
};

static const struct xe_device_desc mtl_desc = {
Expand Down Expand Up @@ -540,28 +530,14 @@ static int xe_info_init(struct xe_device *xe,
tile->id = id;

gt = &tile->primary_gt;
gt->info.id = id;
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)
gt->info.__engine_mask |= media_desc->hw_engine_mask;

if (id == 0) {
gt->info.type = XE_GT_TYPE_MAIN;

gt->info.__engine_mask = graphics_desc->hw_engine_mask;
if (MEDIA_VER(xe) < 13 && media_desc)
gt->info.__engine_mask |= media_desc->hw_engine_mask;

gt->mmio.adj_limit = 0;
gt->mmio.adj_offset = 0;
} else {
gt->info.type = desc->extra_gts[id - 1].type;
gt->info.__engine_mask = (gt->info.type == XE_GT_TYPE_MEDIA) ?
media_desc->hw_engine_mask :
graphics_desc->hw_engine_mask;
gt->mmio.adj_limit =
desc->extra_gts[id - 1].mmio_adj_limit;
gt->mmio.adj_offset =
desc->extra_gts[id - 1].mmio_adj_offset;
}
/* TODO: Init media GT, if present */
}

return 0;
Expand Down

0 comments on commit 1e6c20b

Please sign in to comment.