drm/i915/selftests: Add a GuC doorbells selftest
Subsystems (2)
PATCH v5 1/2 drm/i915/selftests: Add a GuC doorbells selftest
The first test aims to check guc_init_doorbell_hw, changing the existing guc clients and doorbells state before calling it.
The second test tries to create as many clients as it is currently possible (currently limited to max number of doorbells) and exercise the doorbell alloc/dealloc code.
Since our usage mode require very few clients/doorbells, this code has been exercised very lightly and it's good to have a simple test for it.
As reference, this test already helped identify the bug fixed by commit 7f1ea2ac3017 ("drm/i915/guc: Fix doorbell id selection").
v2: Extend number of clients; check for client allocation failure when number of doorbells is exceeded; validate client properties; reuse guc_init_doorbell_hw (Chris).
v3: guc_init_doorbell_hw test added per Chris suggestion.
v4: Try to explain why guc_init_doorbell_hw exist and comment some details in the subtest.
v5: Remove redundant pr_info at the beginning of each subtest (Chris); rebase (s/i915_guc_client/intel_guc_client/).
--- drivers/gpu/drm/i915/intel_guc_submission.c | 4 + .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + drivers/gpu/drm/i915/selftests/intel_guc.c | 360 +++++++++++++++++++++ 3 files changed, 365 insertions(+) create mode 100644 drivers/gpu/drm/i915/selftests/intel_guc.c
drivers/gpu/drm/i915/intel_guc_submission.c +4 -0
@@ -1475,3 +1475,7 @@ void intel_guc_submission_disable(struct intel_guc *guc)guc_clients_destroy (guc); } + +#if IS_ENABLED (CONFIG_DRM_I915_SELFTEST ) +#include "selftests/intel_guc.c" +#endif
drivers/gpu/drm/i915/selftests/i915_live_selftests.h +1 -0
@@ -20,3 +20,4 @@ selftest(evict, i915_gem_evict_live_selftests) selftest(hugepages, i915_gem_huge_page_live_selftests) selftest(contexts, i915_gem_context_live_selftests) selftest(hangcheck, intel_hangcheck_live_selftests) +selftest (guc, intel_guc_live_selftest)
drivers/gpu/drm/i915/selftests/intel_guc.c new file +360 -0
360 lines not on this page · raw message
Signature · 6 lines
2.15.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 2/2 HAX enable GuC submission for CI
From: Michal Wajdeczko <[email protected]>
Also revert ("drm/i915/guc: Assert that we switch between known ggtt->invalidate functions")
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++------ drivers/gpu/drm/i915/i915_params.h | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +2 -6
@@ -3590,17 +3590,13 @@ int i915_ggtt_enable_hw(struct drm_i915_private *dev_priv)void i915_ggtt_enable_guc (struct drm_i915_private *i915) { -GEM_BUG_ON (i915->ggtt.invalidate != gen6_ggtt_invalidate); - i915->ggtt.invalidate = guc_ggtt_invalidate; }void i915_ggtt_disable_guc (struct drm_i915_private *i915) { -/* We should only be called after i915_ggtt_enable_guc() */ -GEM_BUG_ON (i915->ggtt.invalidate != guc_ggtt_invalidate); - - i915->ggtt.invalidate = gen6_ggtt_invalidate; +if (i915->ggtt.invalidate == guc_ggtt_invalidate) + i915->ggtt.invalidate = gen6_ggtt_invalidate; }void i915_gem_restore_gtt_mappings (struct drm_i915_private *dev_priv)
drivers/gpu/drm/i915/i915_params.h +2 -2
@@ -44,8 +44,8 @@ param(int, disable_power_well, -1) \ param(int, enable_ips, 1) \ param(int, invert_brightness, 0) \ - param(int, enable_guc_loading, 0) \ - param(int, enable_guc_submission, 0) \ + param(int, enable_guc_loading, 1) \ + param(int, enable_guc_submission, 1) \ param(int, guc_log_level, -1) \ param(char *, guc_firmware_path, NULL) \param (char *, huc_firmware_path, NULL) \
Signature · 6 lines
2.15.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for series starting with [v5,1/2] drm/i915/selftests: Add a GuC doorbells selftest
In reply to Michel Thierry== Series Details ==
== Series Details ==
Series: series starting with [v5,1/2] drm/i915/selftests: Add a GuC doorbells selftest
URL : https://patchwork.freedesktop.org/series/33964/
State : warning
== Summary ==
Series 33964v1 series starting with [v5,1/2] drm/i915/selftests: Add a GuC doorbells selftest
https://patchwork.freedesktop.org/api/1.0/series/33964/revisions/1/mbox/
Test gem_sync:
Subgroup basic-many-each:
pass -> FAIL (fi-kbl-7567u) fdo#103165
Test kms_force_connector_basic:
Subgroup prune-stale-modes:
pass -> SKIP (fi-snb-2520m)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713fdo#103165 https://bugs.freedesktop.org/show_bug.cgi?id=103165
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:447s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:454s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:388s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:534s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:278s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:513s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:508s fi-byt-j1900 total:289 pass:254 dwarn:0 dfail:0 fail:0 skip:35 time:497s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:432s fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:265s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:543s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:428s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:439s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:436s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:484s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:461s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:481s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:530s fi-kbl-7567u total:289 pass:268 dwarn:0 dfail:0 fail:1 skip:20 time:485s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:539s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:581s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:450s fi-skl-6600u total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:544s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:567s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:526s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:499s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:456s fi-snb-2520m total:246 pass:211 dwarn:0 dfail:0 fail:0 skip:34 fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:419s
Blacklisted hosts:
fi-cfl-s2 total:289 pass:260 dwarn:0 dfail:0 fail:1 skip:28 time:474s
6e008f5fb186b924d5a31f284b564b6955e9a511 drm-tip: 2017y-11m-16d-20h-16m-50s UTC integration manifest e2e46dc388fb HAX enable GuC submission for CI0d5e9efc2643 drm/i915/selftests: Add a GuC doorbells selftest
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7162/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Michel Thierry (2017-11-16 22:06:31)
Quoted 22 lines
The first test aims to check
guc_init_doorbell_hw, changing the existing guc clients and doorbells state before calling it.The second test tries to create as many clients as it is currently possible (currently limited to max number of doorbells) and exercise the doorbell alloc/dealloc code.
Since our usage mode require very few clients/doorbells, this code has been exercised very lightly and it's good to have a simple test for it.
As reference, this test already helped identify the bug fixed by commit
7f1ea2ac3017("drm/i915/guc: Fix doorbell id selection").v2: Extend number of clients; check for client allocation failure when number of doorbells is exceeded; validate client properties; reuse
guc_init_doorbell_hw(Chris).v3:
guc_init_doorbell_hwtest added per Chris suggestion.v4: Try to explain why
guc_init_doorbell_hwexist and comment some details in the subtest.
Quoted 8 lines
v5: Remove redundant
pr_infoat the beginning of each subtest (Chris); rebase (s/i915_guc_client/intel_guc_client/).Signed-off-by Michel Thierry <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc Daniele Ceraolo Spurio <[email protected]>Cc Chris Wilson <[email protected]>Reviewed-by Chris Wilson <[email protected]>
And pushed, thanks for the unit tests!
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx