[Intel-xe] [PATCH 10/26] drm/xe: Drop vram_id

Lucas De Marchi lucas.demarchi at intel.com
Wed May 17 05:09:54 UTC 2023


On Wed, May 10, 2023 at 08:47:06PM -0700, Matt Roper wrote:
>The VRAM ID is always the tile ID; there's no need to track it
>separately within a GT.
>
>Signed-off-by: Matt Roper <matthew.d.roper at intel.com>

with the move to be tile-based, with the hope it stays like this for
future platforms

Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

Lucas De Marchi

>---
> drivers/gpu/drm/xe/tests/xe_bo.c | 6 +++---
> drivers/gpu/drm/xe/xe_pci.c      | 2 --
> 2 files changed, 3 insertions(+), 5 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
>index bee5a2031153..e4d1d17b1d3c 100644
>--- a/drivers/gpu/drm/xe/tests/xe_bo.c
>+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
>@@ -115,9 +115,9 @@ static void ccs_test_run_gt(struct xe_device *xe, struct xe_gt *gt,
> 	int ret;
>
> 	/* TODO: Sanity check */
>-	vram_bit = XE_BO_CREATE_VRAM0_BIT << gt->info.vram_id;
>+	vram_bit = XE_BO_CREATE_VRAM0_BIT << gt_to_tile(gt)->id;
> 	kunit_info(test, "Testing gt id %u vram id %u\n", gt->info.id,
>-		   gt->info.vram_id);
>+		   gt_to_tile(gt)->id);
>
> 	bo = xe_bo_create_locked(xe, NULL, NULL, SZ_1M, ttm_bo_type_device,
> 				 vram_bit);
>@@ -179,7 +179,7 @@ static int evict_test_run_gt(struct xe_device *xe, struct xe_gt *gt, struct kuni
> 	int err, i;
>
> 	kunit_info(test, "Testing device %s gt id %u vram id %u\n",
>-		   dev_name(xe->drm.dev), gt->info.id, gt->info.vram_id);
>+		   dev_name(xe->drm.dev), gt->info.id, gt_to_tile(gt)->id);
>
> 	for (i = 0; i < 2; ++i) {
> 		xe_vm_lock(vm, &ww, 0, false);
>diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
>index be7c41024838..0f3508c72c79 100644
>--- a/drivers/gpu/drm/xe/xe_pci.c
>+++ b/drivers/gpu/drm/xe/xe_pci.c
>@@ -34,7 +34,6 @@ struct xe_subplatform_desc {
>
> struct xe_gt_desc {
> 	enum xe_gt_type type;
>-	u8 vram_id;
> 	u32 mmio_adj_limit;
> 	u32 mmio_adj_offset;
> };
>@@ -258,7 +257,6 @@ static const struct xe_device_desc dg2_desc = {
> static const struct xe_gt_desc pvc_gts[] = {
> 	{
> 		.type = XE_GT_TYPE_REMOTE,
>-		.vram_id = 1,
> 		.mmio_adj_limit = 0,
> 		.mmio_adj_offset = 0,
> 	},
>-- 
>2.40.0
>


More information about the Intel-xe mailing list