From 1e80d0c3c44806e6ff885102a937ea838a01f560 Mon Sep 17 00:00:00 2001 From: Riana Tauro Date: Tue, 13 Jun 2023 15:12:32 +0530 Subject: [PATCH] drm/xe: Fix GT looping for standalone media gt_count is only being incremented when initializing the primary GT; since the media GT sets the ID directly, gt_count is not incremented again, resulting in an incorrect count on MTL. Use autoincrement while assigning the media GTs ID to ensure gt_count is correct on MTL and other future platforms with standalone media. Signed-off-by: Riana Tauro Link: https://lore.kernel.org/r/20230613094232.3703549-1-riana.tauro@intel.com [mattrope: Tweaked commit message to focus on gt_count importance] Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/xe/xe_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index 208dc7a63f88c..71be80274683d 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -569,7 +569,7 @@ static int xe_info_init(struct xe_device *xe, * up with platforms that support both together. */ drm_WARN_ON(&xe->drm, id != 0); - gt->info.id = 1; + gt->info.id = xe->info.gt_count++; } return 0; -- 2.30.2