[Intel-xe] [PATCH 01/26] drm/xe/mtl: Disable media GT

Lucas De Marchi lucas.demarchi at intel.com
Thu May 11 23:29:55 UTC 2023


On Wed, May 10, 2023 at 08:46:57PM -0700, Matt Roper wrote:
>Xe incorrectly conflates the concept of 'tile' and 'GT.'  Since MTL's
>media support is not yet functioning properly, let's just disable it
>completely for now while we fix the fundamental driver design.  Support
>for media GTs on platforms like MTL will be re-added later.
>
>Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
>---
> drivers/gpu/drm/xe/xe_gt_mcr.c |  2 +-
> drivers/gpu/drm/xe/xe_mmio.c   |  2 --
> drivers/gpu/drm/xe/xe_pci.c    | 15 ++-------------
> 3 files changed, 3 insertions(+), 16 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
>index 3db550c85e32..be80fdc4b5a2 100644
>--- a/drivers/gpu/drm/xe/xe_gt_mcr.c
>+++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
>@@ -293,7 +293,7 @@ void xe_gt_mcr_init(struct xe_gt *gt)
>
> 	spin_lock_init(&gt->mcr_lock);
>
>-	if (gt->info.type == XE_GT_TYPE_MEDIA) {
>+	if (xe_gt_is_media_type(gt)) {

was there a squashing issue here?  if media GT is being removed,
why are you replacing the gt type check xe_gt_is_media_type()?
Shouldn't you then remove xe_gt_is_media_type() is all this branch here
since it's for MEDIA_VER(xe) >= 13?

or just leave this branch as is...

> 		drm_WARN_ON(&xe->drm, MEDIA_VER(xe) < 13);
>
> 		gt->steering[OADDRM].ranges = xelpmp_oaddrm_steering_table;
>diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
>index c7fbb1cc1f64..4804616a3c44 100644
>--- a/drivers/gpu/drm/xe/xe_mmio.c
>+++ b/drivers/gpu/drm/xe/xe_mmio.c
>@@ -301,8 +301,6 @@ static void xe_mmio_probe_tiles(struct xe_device *xe)
> 	mtcfg = xe_mmio_read64(gt, XEHP_MTCFG_ADDR);
> 	adj_tile_count = xe->info.tile_count =
> 		REG_FIELD_GET(TILE_COUNT, mtcfg) + 1;
>-	if (xe->info.media_verx100 >= 1300)
>-		xe->info.tile_count *= 2;
>
> 	drm_info(&xe->drm, "tile_count: %d, adj_tile_count %d\n",
> 		 xe->info.tile_count, adj_tile_count);
>diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
>index a6858fc7fe8d..bf2c234c4f6e 100644
>--- a/drivers/gpu/drm/xe/xe_pci.c
>+++ b/drivers/gpu/drm/xe/xe_pci.c
>@@ -19,6 +19,7 @@
> #include "xe_device.h"
> #include "xe_display.h"
> #include "xe_drv.h"
>+#include "xe_gt.h"
> #include "xe_macros.h"
> #include "xe_module.h"
> #include "xe_pci_types.h"
>@@ -271,20 +272,10 @@ static const struct xe_device_desc pvc_desc = {
> 	.extra_gts = pvc_gts,
> };
>
>-static const struct xe_gt_desc xelpmp_gts[] = {
>-	{
>-		.type = XE_GT_TYPE_MEDIA,
>-		.vram_id = 0,
>-		.mmio_adj_limit = 0x40000,
>-		.mmio_adj_offset = 0x380000,
>-	},
>-};
>-
> static const struct xe_device_desc mtl_desc = {
> 	/* .graphics and .media determined via GMD_ID */
> 	.require_force_probe = true,
> 	PLATFORM(XE_METEORLAKE),
>-	.extra_gts = xelpmp_gts,
> };
>
> #undef PLATFORM
>@@ -528,8 +519,6 @@ static int xe_info_init(struct xe_device *xe,
> 	 * treats it as the number of GTs rather than just the number of tiles.
> 	 */
> 	xe->info.tile_count = 1 + graphics_desc->max_remote_tiles;
>-	if (MEDIA_VER(xe) >= 13)
>-		xe->info.tile_count++;
>
> 	xe->info.subplatform = subplatform_desc ?
> 		subplatform_desc->subplatform : XE_SUBPLATFORM_NONE;
>@@ -553,7 +542,7 @@ static int xe_info_init(struct xe_device *xe,
> 		} else {
> 			gt->info.type = desc->extra_gts[id - 1].type;
> 			gt->info.vram_id = desc->extra_gts[id - 1].vram_id;
>-			gt->info.__engine_mask = (gt->info.type == XE_GT_TYPE_MEDIA) ?
>+			gt->info.__engine_mask = xe_gt_is_media_type(gt) ?

same thing here. /me confused

The rest of the patch makes sense and we could leave these lines alone.
It seems the main goal of this patch is actually to free up the
tile_count to be used with proper tile in later patches rather than gt.

Lucas De Marchi

> 				media_desc->hw_engine_mask :
> 				graphics_desc->hw_engine_mask;
> 			gt->mmio.adj_limit =
>-- 
>2.40.0
>


More information about the Intel-xe mailing list