aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Auld <[email protected]>2024-08-12 15:13:32 +0100
committerLucas De Marchi <[email protected]>2024-08-15 12:16:48 -0700
commit23ab1cb6591dba7c97b65eb407cd71147bd878b8 (patch)
treed7a99562aec7a9b1d4c0607d6ec0ab3d75b6eac1
parent4551d60299b5ddc2655b6b365a4b92634e14e04f (diff)
drm/xe: fix engine_class bounds check again
This was fixed in commit b7dce525c4fc ("drm/xe/queue: fix engine_class bounds check"), but then re-introduced in commit 6f20fc09936e ("drm/xe: Move and export xe_hw_engine lookup.") which should only be simple code movement of the existing function. Fixes: 6f20fc09936e ("drm/xe: Move and export xe_hw_engine lookup.") Signed-off-by: Matthew Auld <[email protected]> Cc: Dominik Grzegorzek <[email protected]> Cc: Mika Kuoppala <[email protected]> Cc: Matthew Brost <[email protected]> Reviewed-by: Jonathan Cavitt <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Lucas De Marchi <[email protected]>
-rw-r--r--drivers/gpu/drm/xe/xe_hw_engine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
index 402dfa748e16..e195022ca836 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine.c
+++ b/drivers/gpu/drm/xe/xe_hw_engine.c
@@ -1189,7 +1189,7 @@ xe_hw_engine_lookup(struct xe_device *xe,
{
unsigned int idx;
- if (eci.engine_class > ARRAY_SIZE(user_to_xe_engine_class))
+ if (eci.engine_class >= ARRAY_SIZE(user_to_xe_engine_class))
return NULL;
if (eci.gt_id >= xe->info.gt_count)