Skip to content

Commit 23e1ee3

Browse files
matt-auldLucas De Marchi
authored andcommitted
drm/xe/device: fix XE_MAX_GT_PER_TILE check
Here XE_MAX_GT_PER_TILE is the total, therefore the gt index should always be less than. Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240318180532.57522-5-matthew.auld@intel.com (cherry picked from commit a5ef563) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
1 parent b7dce52 commit 23e1ee3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/xe/xe_device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static inline struct xe_tile *xe_device_get_root_tile(struct xe_device *xe)
5858

5959
static inline struct xe_gt *xe_tile_get_gt(struct xe_tile *tile, u8 gt_id)
6060
{
61-
if (drm_WARN_ON(&tile_to_xe(tile)->drm, gt_id > XE_MAX_GT_PER_TILE))
61+
if (drm_WARN_ON(&tile_to_xe(tile)->drm, gt_id >= XE_MAX_GT_PER_TILE))
6262
gt_id = 0;
6363

6464
return gt_id ? tile->media_gt : tile->primary_gt;

0 commit comments

Comments
 (0)