[Intel-gfx] [PATCH v4 1/3] drm/i915/selftests: Add a GuC doorbells selftest

Chris Wilson chris at chris-wilson.co.uk
Thu Nov 16 11:12:02 UTC 2017


Quoting Michel Thierry (2017-11-15 18:30:27)
> 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.
> 
> Signed-off-by: Michel Thierry <michel.thierry at intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>

I think this is a good start. The biggest wishlist item I have for this
is to mock it and so always run it (as well as then checking the hw
interaction in live selftests).

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

> +static int igt_guc_init_doorbell_hw(void *args)
> +{
> +       struct drm_i915_private *dev_priv = args;
> +       struct intel_guc *guc;
> +       DECLARE_BITMAP(db_bitmap_bk, GUC_NUM_DOORBELLS);
> +       int i, err = 0;
> +
> +       pr_info("GuC init_doorbell_hw selftest\n");

Just prior to this there is a pr_debug("igt_guc_init_doorbell_hw\n");
Hence why I feel these entry pr_info are redundant; enable debugging ;)
-Chris


More information about the Intel-gfx mailing list