Commit 2a70bbe6 authored by Lucas De Marchi's avatar Lucas De Marchi Committed by Rodrigo Vivi

drm/xe/kunit: Test WAs for MTL and LNL

Now that the kunit infra has proper support for GMD_ID platforms, add a
few variants of MTL and LNL.

v2: Remove bogus check for setting both media and graphics version in
    test (Matt Roper)
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20231129232807.1499826-6-lucas.demarchi@intel.com
Link: https://lore.kernel.org/r/20231205133954.2089546-4-lucas.demarchi@intel.comSigned-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 6cad2285
...@@ -18,6 +18,8 @@ struct platform_test_case { ...@@ -18,6 +18,8 @@ struct platform_test_case {
const char *name; const char *name;
enum xe_platform platform; enum xe_platform platform;
enum xe_subplatform subplatform; enum xe_subplatform subplatform;
u32 graphics_verx100;
u32 media_verx100;
struct xe_step_info step; struct xe_step_info step;
}; };
...@@ -38,6 +40,18 @@ struct platform_test_case { ...@@ -38,6 +40,18 @@ struct platform_test_case {
.step = { .graphics = STEP_ ## graphics_step__ } \ .step = { .graphics = STEP_ ## graphics_step__ } \
} }
#define GMDID_CASE(platform__, graphics_verx100__, graphics_step__, \
media_verx100__, media_step__) \
{ \
.name = #platform__ " (g:" #graphics_step__ ", m:" #media_step__ ")",\
.platform = XE_ ## platform__, \
.subplatform = XE_SUBPLATFORM_NONE, \
.graphics_verx100 = graphics_verx100__, \
.media_verx100 = media_verx100__, \
.step = { .graphics = STEP_ ## graphics_step__, \
.media = STEP_ ## media_step__ } \
}
static const struct platform_test_case cases[] = { static const struct platform_test_case cases[] = {
PLATFORM_CASE(TIGERLAKE, B0), PLATFORM_CASE(TIGERLAKE, B0),
PLATFORM_CASE(DG1, A0), PLATFORM_CASE(DG1, A0),
...@@ -63,6 +77,10 @@ static const struct platform_test_case cases[] = { ...@@ -63,6 +77,10 @@ static const struct platform_test_case cases[] = {
PLATFORM_CASE(PVC, B0), PLATFORM_CASE(PVC, B0),
PLATFORM_CASE(PVC, B1), PLATFORM_CASE(PVC, B1),
PLATFORM_CASE(PVC, C0), PLATFORM_CASE(PVC, C0),
GMDID_CASE(METEORLAKE, 1270, A0, 1300, A0),
GMDID_CASE(METEORLAKE, 1271, A0, 1300, A0),
GMDID_CASE(LUNARLAKE, 2004, A0, 2000, A0),
GMDID_CASE(LUNARLAKE, 2004, B0, 2000, A0),
}; };
static void platform_desc(const struct platform_test_case *t, char *desc) static void platform_desc(const struct platform_test_case *t, char *desc)
...@@ -78,6 +96,10 @@ static int xe_wa_test_init(struct kunit *test) ...@@ -78,6 +96,10 @@ static int xe_wa_test_init(struct kunit *test)
struct xe_pci_fake_data data = { struct xe_pci_fake_data data = {
.platform = param->platform, .platform = param->platform,
.subplatform = param->subplatform, .subplatform = param->subplatform,
.graphics_verx100 = param->graphics_verx100,
.media_verx100 = param->media_verx100,
.graphics_step = param->step.graphics,
.media_step = param->step.media,
}; };
struct xe_device *xe; struct xe_device *xe;
struct device *dev; struct device *dev;
...@@ -95,6 +117,7 @@ static int xe_wa_test_init(struct kunit *test) ...@@ -95,6 +117,7 @@ static int xe_wa_test_init(struct kunit *test)
ret = xe_pci_fake_device_init(xe); ret = xe_pci_fake_device_init(xe);
KUNIT_ASSERT_EQ(test, ret, 0); KUNIT_ASSERT_EQ(test, ret, 0);
if (!param->graphics_verx100)
xe->info.step = param->step; xe->info.step = param->step;
/* TODO: init hw engines for engine/LRC WAs */ /* TODO: init hw engines for engine/LRC WAs */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment