Skip to content

Commit 23e1ee3

Browse files
matt-auldlucasdemarchi
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 <[email protected]> Cc: Nirmoy Das <[email protected]> Reviewed-by: Nirmoy Das <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit a5ef563) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent b7dce52 commit 23e1ee3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)