mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
drm/xe/rtp: Ensure oob_was does not evaluate engine type rules
This commit builds on the implementation of the GT WA testing, increasing
the scope of testing to include the OOB workaround list. The added test
checks for workarounds with XE_RTP_ENGINE_CLASS() rules and raises an
expectationfailure if any are found. Unlike the GT workarounds, there are
no flags within this workaround list, so all invalid rules will fail.
v6:
- No change
v5:
- No change
v4:
- No change
v3:
- Removed VISIBLE_IF_KUNIT keyword from xe_wa.h
- Reworked KUNIT_EXPECT_TRUE for easier decoding of errors
v2:
- Changed xe_rtp_table_oob_test() to follow format of
xe_rtp_table_gt_test
- Changed oob_was generated params to follow format of gt_was
generated params
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Violet Monti <violet.monti@intel.com>
Link: https://patch.msgid.link/20260601200947.2032784-9-violet.monti@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
This commit is contained in:
parent
e9845449e3
commit
e2cfc5bc0c
|
|
@ -39,9 +39,24 @@ static void xe_rtp_table_gt_test(struct kunit *test)
|
|||
RTP_TABLE_PARAM(gt_was);
|
||||
RTP_TABLE_PARAM(gt_tunings);
|
||||
|
||||
static void xe_rtp_table_oob_test(struct kunit *test)
|
||||
{
|
||||
const struct xe_rtp_entry *entry = test->param_value;
|
||||
|
||||
for (int i = 0; i < entry->n_rules; i++) {
|
||||
u8 match_type = entry->rules[i].match_type;
|
||||
|
||||
KUNIT_EXPECT_NE(test, match_type, XE_RTP_MATCH_ENGINE_CLASS);
|
||||
KUNIT_EXPECT_NE(test, match_type, XE_RTP_MATCH_NOT_ENGINE_CLASS);
|
||||
}
|
||||
}
|
||||
|
||||
RTP_TABLE_PARAM(oob_was);
|
||||
|
||||
static struct kunit_case xe_rtp_table_tests[] = {
|
||||
KUNIT_CASE_PARAM(xe_rtp_table_gt_test, gt_was_gen_params),
|
||||
KUNIT_CASE_PARAM(xe_rtp_table_gt_test, gt_tunings_gen_params),
|
||||
KUNIT_CASE_PARAM(xe_rtp_table_oob_test, oob_was_gen_params),
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -803,10 +803,11 @@ static const struct xe_rtp_entry oob_was_entries[] = {
|
|||
|
||||
static_assert(ARRAY_SIZE(oob_was_entries) == _XE_WA_OOB_COUNT);
|
||||
|
||||
static __maybe_unused const struct xe_rtp_table oob_was = {
|
||||
VISIBLE_IF_KUNIT __maybe_unused const struct xe_rtp_table oob_was = {
|
||||
.entries = oob_was_entries,
|
||||
.n_entries = ARRAY_SIZE(oob_was_entries),
|
||||
};
|
||||
EXPORT_SYMBOL_IF_KUNIT(oob_was);
|
||||
|
||||
static const struct xe_rtp_entry device_oob_was_entries[] = {
|
||||
#include <generated/xe_device_wa_oob.c>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ int xe_wa_gt_dump(struct xe_gt *gt, struct drm_printer *p);
|
|||
|
||||
#if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
|
||||
extern const struct xe_rtp_table_sr gt_was;
|
||||
extern __maybe_unused const struct xe_rtp_table oob_was;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user