]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/xe/xe_query: Use separate iterator while filling GT list
authorMatt Roper <matthew.d.roper@intel.com>
Tue, 1 Jul 2025 20:13:28 +0000 (13:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:41:12 +0000 (18:41 +0200)
commit8a1f4ffd5ce5fd2ef2ccefbbf62f9c9cc2930913
tree04b8e607ad21f18c7784b2fe1a35f1fd426d4ec0
parentdb0ca73498207148165828527a0de4953b893c9d
drm/xe/xe_query: Use separate iterator while filling GT list

[ Upstream commit d4eb4a010262ea7801e576d1033b355910f2f7d4 ]

The 'id' value updated by for_each_gt() is the uapi GT ID of the GTs
being iterated over, and may skip over values if a GT is not present on
the device.  Use a separate iterator for GT list array assignments to
ensure that the array will be filled properly on future platforms where
index in the GT query list may not match the uapi ID.

v2:
 - Include the missing increment of the iterator.  (Jonathan)

Cc: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Link: https://lore.kernel.org/r/20250701201320.2514369-16-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/xe/xe_query.c