[Intel-xe] [PATCH v2 5/5] drm/xe/kunit: Test WAs for MTL and LNL
Matt Roper
matthew.d.roper at intel.com
Thu Nov 30 00:04:14 UTC 2023
On Wed, Nov 29, 2023 at 03:28:07PM -0800, Lucas De Marchi wrote:
> 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)
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
Reviewed-by: Matt Roper <matthew.d.roper at intel.com>
> ---
> drivers/gpu/drm/xe/tests/xe_wa_test.c | 25 ++++++++++++++++++++++++-
> 1 file changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/tests/xe_wa_test.c b/drivers/gpu/drm/xe/tests/xe_wa_test.c
> index 045afae43891..a53c22a19582 100644
> --- a/drivers/gpu/drm/xe/tests/xe_wa_test.c
> +++ b/drivers/gpu/drm/xe/tests/xe_wa_test.c
> @@ -18,6 +18,8 @@ struct platform_test_case {
> const char *name;
> enum xe_platform platform;
> enum xe_subplatform subplatform;
> + u32 graphics_verx100;
> + u32 media_verx100;
> struct xe_step_info step;
> };
>
> @@ -38,6 +40,18 @@ struct platform_test_case {
> .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[] = {
> PLATFORM_CASE(TIGERLAKE, B0),
> PLATFORM_CASE(DG1, A0),
> @@ -63,6 +77,10 @@ static const struct platform_test_case cases[] = {
> PLATFORM_CASE(PVC, B0),
> PLATFORM_CASE(PVC, B1),
> 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)
> @@ -78,6 +96,10 @@ static int xe_wa_test_init(struct kunit *test)
> struct xe_pci_fake_data data = {
> .platform = param->platform,
> .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 device *dev;
> @@ -95,7 +117,8 @@ static int xe_wa_test_init(struct kunit *test)
> ret = xe_pci_fake_device_init(xe);
> KUNIT_ASSERT_EQ(test, ret, 0);
>
> - xe->info.step = param->step;
> + if (!param->graphics_verx100)
> + xe->info.step = param->step;
>
> /* TODO: init hw engines for engine/LRC WAs */
> xe->drm.dev = dev;
> --
> 2.40.1
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
More information about the Intel-xe
mailing list