]> www.infradead.org Git - users/hch/configfs.git/commitdiff
drm/xe/kunit: Rename rtp test cases
authorLucas De Marchi <lucas.demarchi@intel.com>
Sat, 27 Jul 2024 01:59:03 +0000 (18:59 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 29 Jul 2024 18:19:39 +0000 (11:19 -0700)
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>
drivers/gpu/drm/xe/tests/xe_rtp_test.c

index 459f6ae9449d3a3fd2b73f45dfe935eca3a5ac41..893e3e01e2ab6a56dcd167d95640f62ebfbf90b1 100644 (file)
@@ -31,7 +31,7 @@
 #undef XE_REG_MCR
 #define XE_REG_MCR(...)     XE_REG(__VA_ARGS__, .mcr = 1)
 
-struct rtp_test_case {
+struct rtp_to_sr_test_case {
        const char *name;
        struct xe_reg expected_reg;
        u32 expected_set_bits;
@@ -52,7 +52,7 @@ static bool match_no(const struct xe_gt *gt, const struct xe_hw_engine *hwe)
        return false;
 }
 
-static const struct rtp_test_case cases[] = {
+static const struct rtp_to_sr_test_case rtp_to_sr_cases[] = {
        {
                .name = "coalesce-same-reg",
                .expected_reg = REGULAR_REG1,
@@ -298,9 +298,9 @@ static const struct rtp_test_case cases[] = {
        },
 };
 
-static void xe_rtp_process_tests(struct kunit *test)
+static void xe_rtp_process_to_sr_tests(struct kunit *test)
 {
-       const struct rtp_test_case *param = test->param_value;
+       const struct rtp_to_sr_test_case *param = test->param_value;
        struct xe_device *xe = test->priv;
        struct xe_gt *gt = xe_device_get_root_tile(xe)->primary_gt;
        struct xe_reg_sr *reg_sr = &gt->reg_sr;
@@ -308,7 +308,7 @@ static void xe_rtp_process_tests(struct kunit *test)
        struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(gt);
        unsigned long idx, count_sr_entries = 0, count_rtp_entries = 0, active = 0;
 
-       xe_reg_sr_init(reg_sr, "xe_rtp_tests", xe);
+       xe_reg_sr_init(reg_sr, "xe_rtp_to_sr_tests", xe);
 
        while (param->entries[count_rtp_entries].rules)
                count_rtp_entries++;
@@ -337,12 +337,12 @@ static void xe_rtp_process_tests(struct kunit *test)
        KUNIT_EXPECT_EQ(test, reg_sr->errors, param->expected_sr_errors);
 }
 
-static void rtp_desc(const struct rtp_test_case *t, char *desc)
+static void rtp_to_sr_desc(const struct rtp_to_sr_test_case *t, char *desc)
 {
        strscpy(desc, t->name, KUNIT_PARAM_DESC_SIZE);
 }
 
-KUNIT_ARRAY_PARAM(rtp, cases, rtp_desc);
+KUNIT_ARRAY_PARAM(rtp_to_sr, rtp_to_sr_cases, rtp_to_sr_desc);
 
 static int xe_rtp_test_init(struct kunit *test)
 {
@@ -375,7 +375,7 @@ static void xe_rtp_test_exit(struct kunit *test)
 }
 
 static struct kunit_case xe_rtp_tests[] = {
-       KUNIT_CASE_PARAM(xe_rtp_process_tests, rtp_gen_params),
+       KUNIT_CASE_PARAM(xe_rtp_process_to_sr_tests, rtp_to_sr_gen_params),
        {}
 };