Skip to content

Commit

Permalink
drm/xe: fix engine_class bounds check again
Browse files Browse the repository at this point in the history
This was fixed in commit b7dce52 ("drm/xe/queue: fix engine_class
bounds check"), but then re-introduced in commit 6f20fc0 ("drm/xe:
Move and export xe_hw_engine lookup.") which should only be simple code
movement of the existing function.

Fixes: 6f20fc0 ("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]>
  • Loading branch information
matt-auld authored and lucasdemarchi committed Aug 15, 2024
1 parent 4551d60 commit 23ab1cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/xe/xe_hw_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 23ab1cb

Please sign in to comment.