Skip to content

Commit ae02c7b

Browse files
lucasdemarchirodrigovivi
authored andcommitted
drm/xe/rtp: Fix off-by-one when processing rules
Gustavo noticed an odd "+ 2" in rtp_mark_active() while processing rtp rules and pointed that it should be "+ 1". In fact, while processing entries without actions (OOB workarounds), if the WA is activated and has OR rules, it will also inadvertently activate the very next workaround. Test in a LNL B0 platform by moving 18024947630 on top of 16020292621, makes the latter become active: $ cat /sys/kernel/debug/dri/0/gt0/workarounds ... OOB Workarounds 18024947630 16020292621 14018094691 16022287689 13011645652 22019338487_display In future a kunit test will be added to cover the rtp checks for entries without actions. Fixes: fe19328 ("drm/xe/rtp: Add support for entries with no action") Cc: Gustavo Sousa <[email protected]> Reviewed-by: Gustavo Sousa <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Lucas De Marchi <[email protected]> (cherry picked from commit fd6797e) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent de9c2c6 commit ae02c7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/xe/xe_rtp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ static void rtp_mark_active(struct xe_device *xe,
231231
if (first == last)
232232
bitmap_set(ctx->active_entries, first, 1);
233233
else
234-
bitmap_set(ctx->active_entries, first, last - first + 2);
234+
bitmap_set(ctx->active_entries, first, last - first + 1);
235235
}
236236

237237
/**

0 commit comments

Comments
 (0)