]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerMatt Roper <matthew.d.roper@intel.com>
Wed, 2 Jul 2025 23:08:54 +0000 (16:08 -0700)
commitd4eb4a010262ea7801e576d1033b355910f2f7d4
tree349fdd67737bb29123eab71dd5b38e62da77be93
parent457123d5a0351792280c7441107db49560bdd3c3
drm/xe/xe_query: Use separate iterator while filling GT list

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>
drivers/gpu/drm/xe/xe_query.c