]> www.infradead.org Git - users/hch/configfs.git/commit
drm/xe/rtp: Fix off-by-one when processing rules
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 26 Jul 2024 06:43:35 +0000 (23:43 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 26 Jul 2024 18:46:56 +0000 (11:46 -0700)
commitfd6797ec50c561f085bc94e3ee26f484a52af79e
treeb8bad9866f3f9e81a746a83b985fb223788f5431
parent5e9209c3739454a08c4d770c649187b0f51dffc6
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: fe19328b900c ("drm/xe/rtp: Add support for entries with no action")
Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240726064337.797576-6-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_rtp.c