Patch "drm/xe/device: fix XE_MAX_TILES_PER_DEVICE check" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/xe/device: fix XE_MAX_TILES_PER_DEVICE check

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-xe-device-fix-xe_max_tiles_per_device-check.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9e79a87326146e35411264167ec24a3489b26dc6
Author: Matthew Auld <matthew.auld@xxxxxxxxx>
Date:   Mon Mar 18 18:05:35 2024 +0000

    drm/xe/device: fix XE_MAX_TILES_PER_DEVICE check
    
    [ Upstream commit b45f20fa69cedb6038fdaec31bd600c273c865a5 ]
    
    Here XE_MAX_TILES_PER_DEVICE is the gt array size, therefore the gt
    index should always be less than.
    
    v2 (Lucas):
      - Add fixes tag.
    
    Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
    Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx>
    Cc: Nirmoy Das <nirmoy.das@xxxxxxxxx>
    Reviewed-by: Nirmoy Das <nirmoy.das@xxxxxxxxx>
    Acked-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
    Reviewed-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240318180532.57522-6-matthew.auld@xxxxxxxxx
    (cherry picked from commit a96cd71ec7be0790f9fc4039ad21be8d214b03a4)
    Signed-off-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/xe/xe_device.h b/drivers/gpu/drm/xe/xe_device.h
index ee8be4c6b59b1..bf8efb44edf60 100644
--- a/drivers/gpu/drm/xe/xe_device.h
+++ b/drivers/gpu/drm/xe/xe_device.h
@@ -79,7 +79,7 @@ static inline struct xe_gt *xe_device_get_gt(struct xe_device *xe, u8 gt_id)
 	if (MEDIA_VER(xe) >= 13) {
 		gt = xe_tile_get_gt(root_tile, gt_id);
 	} else {
-		if (drm_WARN_ON(&xe->drm, gt_id > XE_MAX_TILES_PER_DEVICE))
+		if (drm_WARN_ON(&xe->drm, gt_id >= XE_MAX_TILES_PER_DEVICE))
 			gt_id = 0;
 
 		gt = xe->tiles[gt_id].primary_gt;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux