[Intel-xe] [PATCH v2 7/7] drm/xe: Add test for GT workarounds and tunings
Michał Winiarski
michal.winiarski at intel.com
Mon Apr 3 13:14:03 UTC 2023
On Sat, Apr 01, 2023 at 01:51:51AM -0700, Lucas De Marchi wrote:
> In order to avoid mistakes when populating the workarounds, it's good to
> be able to test if the entries added are all compatible for a certain
> platform. The platform itself is not needed as long as we create fake
> devices with enough configuration for the RTP helpers to process the
> tables. Common mistakes that can be avoided:
>
> - Entries clashing the bitfields being updated
> - Register type being mixed (MCR vs regular / masked vs regular)
> - Unexpected errors while adding the reg_sr entry
>
> To test, inject a duplicate entry in gt_was, but with platform == tigerlake
> rather than the currenct graphics version check:
>
> { XE_RTP_NAME("14011059788"),
> XE_RTP_RULES(PLATFORM(TIGERLAKE)),
> XE_RTP_ACTIONS(SET(GEN10_DFR_RATIO_EN_AND_CHICKEN, DFR_DISABLE))
> },
>
> This produces the following result:
>
> $ ./tools/testing/kunit/kunit.py run \
> --kunitconfig drivers/gpu/drm/xe/.kunitconfig xe_wa
>
> [14:18:02] Starting KUnit Kernel (1/1)...
> [14:18:02] ============================================================
> [14:18:02] ==================== xe_wa (1 subtest) =====================
> [14:18:02] ======================== xe_wa_gt =========================
> [14:18:02] [drm:xe_reg_sr_add] *ERROR* Discarding save-restore reg 9550 (clear: 00000200, set: 00000200, masked: no): ret=-22
> [14:18:02] # xe_wa_gt: ASSERTION FAILED at drivers/gpu/drm/xe/tests/xe_wa_test.c:116
> [14:18:02] Expected gt->reg_sr.errors == 0, but
> [14:18:02] gt->reg_sr.errors == 1 (0x1)
> [14:18:02] [FAILED] TIGERLAKE (B0)
> [14:18:02] [PASSED] DG1 (A0)
> [14:18:02] [PASSED] DG1 (B0)
> ...
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski at intel.com>
-Michał
> ---
> drivers/gpu/drm/xe/tests/Makefile | 3 +-
> drivers/gpu/drm/xe/tests/xe_wa_test.c | 136 ++++++++++++++++++++++++++
> drivers/gpu/drm/xe/xe_tuning.c | 3 +
> drivers/gpu/drm/xe/xe_wa.c | 2 +
> 4 files changed, 143 insertions(+), 1 deletion(-)
> create mode 100644 drivers/gpu/drm/xe/tests/xe_wa_test.c
More information about the Intel-xe
mailing list