Commit 60454736 authored by Lucas De Marchi's avatar Lucas De Marchi Committed by Matt Roper
Browse files

drm/xe/rtp: Allow to match 0 sr entries



If none of the rules match, there should be 0 entries in the sr xarray,
so none of them should have a register matching.

Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240618050044.324454-2-lucas.demarchi@intel.com
parent f0ccd2d8
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -255,9 +255,14 @@ static void xe_rtp_process_tests(struct kunit *test)
	}

	KUNIT_EXPECT_EQ(test, count, param->expected_count);
	if (count) {
		KUNIT_EXPECT_EQ(test, sr_entry->clr_bits, param->expected_clr_bits);
		KUNIT_EXPECT_EQ(test, sr_entry->set_bits, param->expected_set_bits);
		KUNIT_EXPECT_EQ(test, sr_entry->reg.raw, param->expected_reg.raw);
	} else {
		KUNIT_EXPECT_NULL(test, sr_entry);
	}

	KUNIT_EXPECT_EQ(test, reg_sr->errors, param->expected_sr_errors);
}