From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: broonie@kernel.org
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@opensource.cirrus.com
Subject: [PATCH v2 8/8] firmware: cs_dsp: test_bin: Add tests for offsets > 0xffff
Date: Wed, 31 Dec 2025 17:27:11 +0000 [thread overview]
Message-ID: <20251231172711.450024-9-rf@opensource.cirrus.com> (raw)
In-Reply-To: <20251231172711.450024-1-rf@opensource.cirrus.com>
Add test cases for using the new long-offset block types to patch
memory that is >0xffff from the algorithm base.
This is just adding entries to the parameter data that have larger
offset values.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
Changes in V2:
- Fixed inconsistent commit title prefix
.../firmware/cirrus/test/cs_dsp_test_bin.c | 52 +++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/drivers/firmware/cirrus/test/cs_dsp_test_bin.c b/drivers/firmware/cirrus/test/cs_dsp_test_bin.c
index 67af7da4f8c1..99148ea22df3 100644
--- a/drivers/firmware/cirrus/test/cs_dsp_test_bin.c
+++ b/drivers/firmware/cirrus/test/cs_dsp_test_bin.c
@@ -2326,6 +2326,7 @@ static const struct bin_test_param x_or_y_and_offset_param_cases[] = {
};
static const struct bin_test_param x_or_y_and_long_offset_param_cases[] = {
+ /* Offset < 0xffff in long-offset block type */
{ .mem_type = WMFW_ADSP2_XM, .offset_words = 0, WMDR_PATCH_LONG },
{ .mem_type = WMFW_ADSP2_XM, .offset_words = 1, WMDR_PATCH_LONG },
{ .mem_type = WMFW_ADSP2_XM, .offset_words = 2, WMDR_PATCH_LONG },
@@ -2336,6 +2337,7 @@ static const struct bin_test_param x_or_y_and_long_offset_param_cases[] = {
{ .mem_type = WMFW_ADSP2_XM, .offset_words = 21, WMDR_PATCH_LONG },
{ .mem_type = WMFW_ADSP2_XM, .offset_words = 20, WMDR_PATCH_LONG },
+ /* Offset < 0xffff in long-offset block type */
{ .mem_type = WMFW_ADSP2_YM, .offset_words = 0, WMDR_PATCH_LONG },
{ .mem_type = WMFW_ADSP2_YM, .offset_words = 1, WMDR_PATCH_LONG },
{ .mem_type = WMFW_ADSP2_YM, .offset_words = 2, WMDR_PATCH_LONG },
@@ -2345,6 +2347,28 @@ static const struct bin_test_param x_or_y_and_long_offset_param_cases[] = {
{ .mem_type = WMFW_ADSP2_YM, .offset_words = 22, WMDR_PATCH_LONG },
{ .mem_type = WMFW_ADSP2_YM, .offset_words = 21, WMDR_PATCH_LONG },
{ .mem_type = WMFW_ADSP2_YM, .offset_words = 20, WMDR_PATCH_LONG },
+
+ /* Offset > 0xffff in long-offset block type */
+ { .mem_type = WMFW_ADSP2_XM, .offset_words = 0x10000, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_XM, .offset_words = 0x10001, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_XM, .offset_words = 0x10002, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_XM, .offset_words = 0x10003, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_XM, .offset_words = 0x10004, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_XM, .offset_words = 0x2f003, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_XM, .offset_words = 0x2f002, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_XM, .offset_words = 0x2f001, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_XM, .offset_words = 0x2f000, WMDR_PATCH_LONG },
+
+ /* Offset > 0xffff in long-offset block type */
+ { .mem_type = WMFW_ADSP2_YM, .offset_words = 0x10000, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_YM, .offset_words = 0x10001, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_YM, .offset_words = 0x10002, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_YM, .offset_words = 0x10003, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_YM, .offset_words = 0x10004, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_YM, .offset_words = 0x2f003, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_YM, .offset_words = 0x2f002, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_YM, .offset_words = 0x2f001, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_ADSP2_YM, .offset_words = 0x2f000, WMDR_PATCH_LONG },
};
/* Parameterize on ZM with a range of word offsets */
@@ -2374,15 +2398,31 @@ static const struct bin_test_param packed_x_or_y_and_offset_param_cases[] = {
};
static const struct bin_test_param packed_x_or_y_and_long_offset_param_cases[] = {
+ /* Offset < 0xffff in long-offset block type */
{ .mem_type = WMFW_HALO_XM_PACKED, .offset_words = 0, WMDR_PATCH_LONG },
{ .mem_type = WMFW_HALO_XM_PACKED, .offset_words = 4, WMDR_PATCH_LONG },
{ .mem_type = WMFW_HALO_XM_PACKED, .offset_words = 8, WMDR_PATCH_LONG },
{ .mem_type = WMFW_HALO_XM_PACKED, .offset_words = 12, WMDR_PATCH_LONG },
+ /* Offset < 0xffff in long-offset block type */
{ .mem_type = WMFW_HALO_YM_PACKED, .offset_words = 0, WMDR_PATCH_LONG },
{ .mem_type = WMFW_HALO_YM_PACKED, .offset_words = 4, WMDR_PATCH_LONG },
{ .mem_type = WMFW_HALO_YM_PACKED, .offset_words = 8, WMDR_PATCH_LONG },
{ .mem_type = WMFW_HALO_YM_PACKED, .offset_words = 12, WMDR_PATCH_LONG },
+
+ /* Offset > 0xffff in long-offset block type */
+ { .mem_type = WMFW_HALO_XM_PACKED, .offset_words = 0x10000, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_HALO_XM_PACKED, .offset_words = 0x10004, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_HALO_XM_PACKED, .offset_words = 0x10008, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_HALO_XM_PACKED, .offset_words = 0x2f000, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_HALO_XM_PACKED, .offset_words = 0x2f004, WMDR_PATCH_LONG },
+
+ /* Offset > 0xffff in long-offset block type */
+ { .mem_type = WMFW_HALO_YM_PACKED, .offset_words = 0x10000, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_HALO_YM_PACKED, .offset_words = 0x10004, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_HALO_YM_PACKED, .offset_words = 0x10008, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_HALO_YM_PACKED, .offset_words = 0x2f000, WMDR_PATCH_LONG },
+ { .mem_type = WMFW_HALO_YM_PACKED, .offset_words = 0x2f004, WMDR_PATCH_LONG },
};
static void x_or_y_or_z_and_offset_param_desc(const struct bin_test_param *param,
@@ -2449,6 +2489,7 @@ static const struct bin_test_param offset_param_cases[] = {
};
static const struct bin_test_param long_offset_param_cases[] = {
+ /* Offset < 0xffff in long-offset block type */
{ .offset_words = 0, WMDR_PATCH_LONG },
{ .offset_words = 1, WMDR_PATCH_LONG },
{ .offset_words = 2, WMDR_PATCH_LONG },
@@ -2458,6 +2499,17 @@ static const struct bin_test_param long_offset_param_cases[] = {
{ .offset_words = 22, WMDR_PATCH_LONG },
{ .offset_words = 21, WMDR_PATCH_LONG },
{ .offset_words = 20, WMDR_PATCH_LONG },
+
+ /* Offset > 0xffff in long-offset block type */
+ { .offset_words = 0x10000, WMDR_PATCH_LONG },
+ { .offset_words = 0x10001, WMDR_PATCH_LONG },
+ { .offset_words = 0x10002, WMDR_PATCH_LONG },
+ { .offset_words = 0x10003, WMDR_PATCH_LONG },
+ { .offset_words = 0x10004, WMDR_PATCH_LONG },
+ { .offset_words = 0x2f000, WMDR_PATCH_LONG },
+ { .offset_words = 0x2f001, WMDR_PATCH_LONG },
+ { .offset_words = 0x2f002, WMDR_PATCH_LONG },
+ { .offset_words = 0x2f003, WMDR_PATCH_LONG },
};
static void offset_param_desc(const struct bin_test_param *param, char *desc)
--
2.43.0
next prev parent reply other threads:[~2025-12-31 17:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-31 17:27 [PATCH v2 0/8] firmware: cirrus: cs_dsp: Add long-offset WMDR blocks Richard Fitzgerald
2025-12-31 17:27 ` [PATCH v2 1/8] firmware: cs_dsp: Handle long-offset data blocks Richard Fitzgerald
2025-12-31 17:27 ` [PATCH v2 2/8] firmware: cs_dsp: test_bin: Run test cases with v3 file format Richard Fitzgerald
2025-12-31 17:27 ` [PATCH v2 3/8] firmware: cs_dsp: test_bin: Make patch function a test parameter Richard Fitzgerald
2025-12-31 17:27 ` [PATCH v2 4/8] firmware: cs_dsp: mock_bin: Pass offset32 to cs_dsp_mock_bin_add_raw_block() Richard Fitzgerald
2025-12-31 17:27 ` [PATCH v2 5/8] firmware: cs_dsp: mock_bin: Add function to create long-offset patches Richard Fitzgerald
2025-12-31 17:27 ` [PATCH v2 6/8] firmware: cs_dsp: test: Increase size of XM and YM on Halo Core Richard Fitzgerald
2025-12-31 17:27 ` [PATCH v2 7/8] firmware: cs_dsp: test_bin: Run test cases on long-offset blocks Richard Fitzgerald
2025-12-31 17:27 ` Richard Fitzgerald [this message]
2026-01-06 19:42 ` [PATCH v2 0/8] firmware: cirrus: cs_dsp: Add long-offset WMDR blocks Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251231172711.450024-9-rf@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox