From 7da6fe6a00a32b74832f2d1b3b49a4e0015f1eae Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 17 Dec 2025 10:39:37 +0100 Subject: [PATCH] ac/spm: fix programming more than one counter slot Some blocks have two or more SPM counters and they should be used when more than 4 counters are programmed (ie. 16-bit per counter). Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/common/ac_spm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/common/ac_spm.c b/src/amd/common/ac_spm.c index a0ea83f2847..6b4ec16d47c 100644 --- a/src/amd/common/ac_spm.c +++ b/src/amd/common/ac_spm.c @@ -357,7 +357,8 @@ ac_spm_map_counter(struct ac_spm *spm, struct ac_spm_block_select *block_sel, S_037008_PERF_MODE3(0); break; default: - return false; + /* Try to program the new counter slot. */ + continue; } /* Mark this 16-bit counter as used. */