From: Riana Tauro Date: Tue, 13 Jun 2023 09:42:32 +0000 (+0530) Subject: drm/xe: Fix GT looping for standalone media X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1e80d0c3c44806e6ff885102a937ea838a01f560;p=linux.git 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 --- 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;