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: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240618050044.324454-2-lucas.demarchi@intel.com
This commit is contained in:
parent
f0ccd2d805
commit
6045473650
@ -255,9 +255,14 @@ static void xe_rtp_process_tests(struct kunit *test)
|
||||
}
|
||||
|
||||
KUNIT_EXPECT_EQ(test, count, param->expected_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);
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user