Skip to content

Commit 9eab82c

Browse files
committed
drm/xe/kunit: Rename rtp test cases
Those tests check the behavior of xe_rtp_process_to_sr(), so name them accordingly to allow adding tests for xe_rtp_process() later. Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240727015907.899192-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
1 parent d93a4fe commit 9eab82c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/gpu/drm/xe/tests/xe_rtp_test.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#undef XE_REG_MCR
3232
#define XE_REG_MCR(...) XE_REG(__VA_ARGS__, .mcr = 1)
3333

34-
struct rtp_test_case {
34+
struct rtp_to_sr_test_case {
3535
const char *name;
3636
struct xe_reg expected_reg;
3737
u32 expected_set_bits;
@@ -52,7 +52,7 @@ static bool match_no(const struct xe_gt *gt, const struct xe_hw_engine *hwe)
5252
return false;
5353
}
5454

55-
static const struct rtp_test_case cases[] = {
55+
static const struct rtp_to_sr_test_case rtp_to_sr_cases[] = {
5656
{
5757
.name = "coalesce-same-reg",
5858
.expected_reg = REGULAR_REG1,
@@ -298,17 +298,17 @@ static const struct rtp_test_case cases[] = {
298298
},
299299
};
300300

301-
static void xe_rtp_process_tests(struct kunit *test)
301+
static void xe_rtp_process_to_sr_tests(struct kunit *test)
302302
{
303-
const struct rtp_test_case *param = test->param_value;
303+
const struct rtp_to_sr_test_case *param = test->param_value;
304304
struct xe_device *xe = test->priv;
305305
struct xe_gt *gt = xe_device_get_root_tile(xe)->primary_gt;
306306
struct xe_reg_sr *reg_sr = &gt->reg_sr;
307307
const struct xe_reg_sr_entry *sre, *sr_entry = NULL;
308308
struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(gt);
309309
unsigned long idx, count_sr_entries = 0, count_rtp_entries = 0, active = 0;
310310

311-
xe_reg_sr_init(reg_sr, "xe_rtp_tests", xe);
311+
xe_reg_sr_init(reg_sr, "xe_rtp_to_sr_tests", xe);
312312

313313
while (param->entries[count_rtp_entries].rules)
314314
count_rtp_entries++;
@@ -337,12 +337,12 @@ static void xe_rtp_process_tests(struct kunit *test)
337337
KUNIT_EXPECT_EQ(test, reg_sr->errors, param->expected_sr_errors);
338338
}
339339

340-
static void rtp_desc(const struct rtp_test_case *t, char *desc)
340+
static void rtp_to_sr_desc(const struct rtp_to_sr_test_case *t, char *desc)
341341
{
342342
strscpy(desc, t->name, KUNIT_PARAM_DESC_SIZE);
343343
}
344344

345-
KUNIT_ARRAY_PARAM(rtp, cases, rtp_desc);
345+
KUNIT_ARRAY_PARAM(rtp_to_sr, rtp_to_sr_cases, rtp_to_sr_desc);
346346

347347
static int xe_rtp_test_init(struct kunit *test)
348348
{
@@ -375,7 +375,7 @@ static void xe_rtp_test_exit(struct kunit *test)
375375
}
376376

377377
static struct kunit_case xe_rtp_tests[] = {
378-
KUNIT_CASE_PARAM(xe_rtp_process_tests, rtp_gen_params),
378+
KUNIT_CASE_PARAM(xe_rtp_process_to_sr_tests, rtp_to_sr_gen_params),
379379
{}
380380
};
381381

0 commit comments

Comments
 (0)