All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: Add a GuC doorbells selftest
@ 2017-10-25 20:53 Michel Thierry
  2017-10-25 21:08 ` Chris Wilson
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Michel Thierry @ 2017-10-25 20:53 UTC (permalink / raw)
  To: intel-gfx

Try to create multiple clients (one of each kind) 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").

Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
---
 drivers/gpu/drm/i915/i915_guc_submission.c         |   4 +
 .../gpu/drm/i915/selftests/i915_live_selftests.h   |   1 +
 drivers/gpu/drm/i915/selftests/intel_guc.c         | 132 +++++++++++++++++++++
 3 files changed, 137 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/selftests/intel_guc.c

diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 13d383cdc4c9..cb3139d9f4fe 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -1280,3 +1280,7 @@ void i915_guc_submission_disable(struct drm_i915_private *dev_priv)
 	guc_client_free(guc->execbuf_client);
 	guc->execbuf_client = NULL;
 }
+
+#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
+#include "selftests/intel_guc.c"
+#endif
diff --git a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
index 54a73534b37e..1b750e92dd08 100644
--- a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
+++ b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
@@ -19,3 +19,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)
diff --git a/drivers/gpu/drm/i915/selftests/intel_guc.c b/drivers/gpu/drm/i915/selftests/intel_guc.c
new file mode 100644
index 000000000000..9f7be34acf83
--- /dev/null
+++ b/drivers/gpu/drm/i915/selftests/intel_guc.c
@@ -0,0 +1,132 @@
+/*
+ * Copyright © 2017 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#include "../i915_selftest.h"
+
+static int check_all_doorbells(struct intel_guc *guc)
+{
+	u16 db_id;
+
+	pr_info_once("Max number of doorbells: %d", GUC_NUM_DOORBELLS);
+	for (db_id = 0; db_id < GUC_NUM_DOORBELLS; ++db_id) {
+		if (!doorbell_ok(guc, db_id)) {
+			pr_err("doorbell %d, not ok\n", db_id);
+			return -EIO;
+		}
+	}
+
+	return 0;
+}
+
+/* create a client of each type and their doorbells */
+static int igt_guc_doorbells(void *arg)
+{
+	struct drm_i915_private *dev_priv = arg;
+	struct intel_guc *guc;
+	struct i915_guc_client *clients[GUC_CLIENT_PRIORITY_NUM];
+	int i, err = 0;
+
+	DRM_INFO("GuC Doorbells selftest\n");
+	GEM_BUG_ON(!HAS_GUC(dev_priv));
+	mutex_lock(&dev_priv->drm.struct_mutex);
+
+	guc = &dev_priv->guc;
+	if (!guc) {
+		pr_err("No guc object!\n");
+		err = -EINVAL;
+		goto unlock;
+	}
+
+	err = check_all_doorbells(guc);
+	if (err)
+		goto unlock;
+
+	for (i = 0; i < GUC_CLIENT_PRIORITY_NUM; i++) {
+		clients[i] = guc_client_alloc(dev_priv,
+					      INTEL_INFO(dev_priv)->ring_mask,
+					      i % GUC_CLIENT_PRIORITY_NUM,
+					      dev_priv->kernel_context);
+
+		if (!clients[i]) {
+			pr_err("[%d] No guc client!\n", i);
+			err = -EINVAL;
+			goto out;
+		}
+
+		if (i > 0 &&
+		    clients[i - 1]->doorbell_id == clients[i]->doorbell_id) {
+			pr_err("doorbell ids must be unique!\n");
+			err = -EINVAL;
+			goto out;
+		}
+
+		/*
+		 * Client alloc gives us a doorbell, but we want to exercise
+		 * this ourselves.
+		 */
+		destroy_doorbell(clients[i]);
+		if (clients[i]->doorbell_id != GUC_DOORBELL_INVALID) {
+			pr_err("[%d] destroy db did not work!\n", i);
+			err = -EINVAL;
+			goto out;
+		}
+
+		err = __reserve_doorbell(clients[i]);
+		if (err) {
+			pr_err("Failed to reserve a doorbell\n");
+			goto out;
+		}
+
+		__update_doorbell_desc(clients[i], clients[i]->doorbell_id);
+		err = __create_doorbell(clients[i]);
+		if (err) {
+			pr_err("Failed to create a doorbell\n");
+			goto out;
+		}
+
+		err = check_all_doorbells(guc);
+		if (err)
+			goto out;
+	}
+
+out:
+	for (i = 0; i < GUC_CLIENT_PRIORITY_NUM; i++)
+		if (clients[i])
+			guc_client_free(clients[i]);
+unlock:
+	mutex_unlock(&dev_priv->drm.struct_mutex);
+	return err;
+}
+
+int intel_guc_live_selftest(struct drm_i915_private *dev_priv)
+{
+	static const struct i915_subtest tests[] = {
+		SUBTEST(igt_guc_doorbells),
+	};
+
+	if (!i915_modparams.enable_guc_submission)
+		return 0;
+
+	return i915_subtests(tests, dev_priv);
+}
-- 
2.14.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] drm/i915/selftests: Add a GuC doorbells selftest
  2017-10-25 20:53 [PATCH] drm/i915/selftests: Add a GuC doorbells selftest Michel Thierry
@ 2017-10-25 21:08 ` Chris Wilson
  2017-10-25 21:19   ` Michel Thierry
  2017-10-25 21:24 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Chris Wilson @ 2017-10-25 21:08 UTC (permalink / raw)
  To: Michel Thierry, intel-gfx

Quoting Michel Thierry (2017-10-25 21:53:44)
> Try to create multiple clients (one of each kind) 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").
> 
> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> ---
> +/* create a client of each type and their doorbells */
> +static int igt_guc_doorbells(void *arg)
> +{
> +       struct drm_i915_private *dev_priv = arg;
> +       struct intel_guc *guc;
> +       struct i915_guc_client *clients[GUC_CLIENT_PRIORITY_NUM];

Don't you actually want to test up to GUC_NUM_DOORBELLS? (-reserved?)
And check failure when full?

I'm thinking an idr for the clients, that will give you an universal
-EEXISTS test as well for a repeated id, as well as an easy structure to
cleanup.

> +       int i, err = 0;
> +
> +       DRM_INFO("GuC Doorbells selftest\n");
> +       GEM_BUG_ON(!HAS_GUC(dev_priv));
> +       mutex_lock(&dev_priv->drm.struct_mutex);
> +
> +       guc = &dev_priv->guc;
> +       if (!guc) {
> +               pr_err("No guc object!\n");
> +               err = -EINVAL;
> +               goto unlock;
> +       }
> +
> +       err = check_all_doorbells(guc);
> +       if (err)
> +               goto unlock;
> +
> +       for (i = 0; i < GUC_CLIENT_PRIORITY_NUM; i++) {
> +               clients[i] = guc_client_alloc(dev_priv,
> +                                             INTEL_INFO(dev_priv)->ring_mask,
> +                                             i % GUC_CLIENT_PRIORITY_NUM,

Definitely says to me you want a larger loop :)

> +                                             dev_priv->kernel_context);

Is there any sanity check you want to do on the return client? Matches
requested priority, ring, context? I know that seems very superficial.

> +               if (!clients[i]) {
> +                       pr_err("[%d] No guc client!\n", i);
> +                       err = -EINVAL;
> +                       goto out;
> +               }
> +
> +               if (i > 0 &&
> +                   clients[i - 1]->doorbell_id == clients[i]->doorbell_id) {
> +                       pr_err("doorbell ids must be unique!\n");
> +                       err = -EINVAL;
> +                       goto out;
> +               }
> +
> +               /*
> +                * Client alloc gives us a doorbell, but we want to exercise
> +                * this ourselves.
> +                */
> +               destroy_doorbell(clients[i]);
> +               if (clients[i]->doorbell_id != GUC_DOORBELL_INVALID) {
> +                       pr_err("[%d] destroy db did not work!\n", i);
> +                       err = -EINVAL;
> +                       goto out;
> +               }
> +
> +               err = __reserve_doorbell(clients[i]);
> +               if (err) {
> +                       pr_err("Failed to reserve a doorbell\n");
> +                       goto out;
> +               }
> +
> +               __update_doorbell_desc(clients[i], clients[i]->doorbell_id);
> +               err = __create_doorbell(clients[i]);
> +               if (err) {
> +                       pr_err("Failed to create a doorbell\n");
> +                       goto out;
> +               }
> +
> +               err = check_all_doorbells(guc);
> +               if (err)
> +                       goto out;
> +       }

I would love for something to test guc_init_doorbell_hw() to be worked
into here. That function scares me :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] drm/i915/selftests: Add a GuC doorbells selftest
  2017-10-25 21:08 ` Chris Wilson
@ 2017-10-25 21:19   ` Michel Thierry
  2017-10-25 23:12     ` Michel Thierry
  0 siblings, 1 reply; 12+ messages in thread
From: Michel Thierry @ 2017-10-25 21:19 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On 25/10/17 14:08, Chris Wilson wrote:
> Quoting Michel Thierry (2017-10-25 21:53:44)
>> Try to create multiple clients (one of each kind) 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").
>>
>> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Cc: Michal Winiarski <michal.winiarski@intel.com>
>> ---
>> +/* create a client of each type and their doorbells */
>> +static int igt_guc_doorbells(void *arg)
>> +{
>> +       struct drm_i915_private *dev_priv = arg;
>> +       struct intel_guc *guc;
>> +       struct i915_guc_client *clients[GUC_CLIENT_PRIORITY_NUM];
> 
> Don't you actually want to test up to GUC_NUM_DOORBELLS? (-reserved?)
> And check failure when full?
> 
> I'm thinking an idr for the clients, that will give you an universal
> -EEXISTS test as well for a repeated id, as well as an easy structure to
> cleanup.
> 
>> +       int i, err = 0;
>> +
>> +       DRM_INFO("GuC Doorbells selftest\n");
>> +       GEM_BUG_ON(!HAS_GUC(dev_priv));
>> +       mutex_lock(&dev_priv->drm.struct_mutex);
>> +
>> +       guc = &dev_priv->guc;
>> +       if (!guc) {
>> +               pr_err("No guc object!\n");
>> +               err = -EINVAL;
>> +               goto unlock;
>> +       }
>> +
>> +       err = check_all_doorbells(guc);
>> +       if (err)
>> +               goto unlock;
>> +
>> +       for (i = 0; i < GUC_CLIENT_PRIORITY_NUM; i++) {
>> +               clients[i] = guc_client_alloc(dev_priv,
>> +                                             INTEL_INFO(dev_priv)->ring_mask,
>> +                                             i % GUC_CLIENT_PRIORITY_NUM,
> 
> Definitely says to me you want a larger loop :)
> 

I was trying to test doorbells not clients, but I'll expand it as you 
suggest.

>> +                                             dev_priv->kernel_context);
> 
> Is there any sanity check you want to do on the return client? Matches
> requested priority, ring, context? I know that seems very superficial.
> 
>> +               if (!clients[i]) {
>> +                       pr_err("[%d] No guc client!\n", i);
>> +                       err = -EINVAL;
>> +                       goto out;
>> +               }
>> +
>> +               if (i > 0 &&
>> +                   clients[i - 1]->doorbell_id == clients[i]->doorbell_id) {
>> +                       pr_err("doorbell ids must be unique!\n");
>> +                       err = -EINVAL;
>> +                       goto out;
>> +               }
>> +
>> +               /*
>> +                * Client alloc gives us a doorbell, but we want to exercise
>> +                * this ourselves.
>> +                */
>> +               destroy_doorbell(clients[i]);
>> +               if (clients[i]->doorbell_id != GUC_DOORBELL_INVALID) {
>> +                       pr_err("[%d] destroy db did not work!\n", i);
>> +                       err = -EINVAL;
>> +                       goto out;
>> +               }
>> +
>> +               err = __reserve_doorbell(clients[i]);
>> +               if (err) {
>> +                       pr_err("Failed to reserve a doorbell\n");
>> +                       goto out;
>> +               }
>> +
>> +               __update_doorbell_desc(clients[i], clients[i]->doorbell_id);
>> +               err = __create_doorbell(clients[i]);
>> +               if (err) {
>> +                       pr_err("Failed to create a doorbell\n");
>> +                       goto out;
>> +               }
>> +
>> +               err = check_all_doorbells(guc);
>> +               if (err)
>> +                       goto out;
>> +       }
> 
> I would love for something to test guc_init_doorbell_hw() to be worked
> into here. That function scares me :)

You noticed this is more less a copy of guc_init_doorbell_hw, I'll try 
to use it directly.

Thanks
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* ✗ Fi.CI.BAT: failure for drm/i915/selftests: Add a GuC doorbells selftest
  2017-10-25 20:53 [PATCH] drm/i915/selftests: Add a GuC doorbells selftest Michel Thierry
  2017-10-25 21:08 ` Chris Wilson
@ 2017-10-25 21:24 ` Patchwork
  2017-10-26 18:51 ` [PATCH v2] " Michel Thierry
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2017-10-25 21:24 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Add a GuC doorbells selftest
URL   : https://patchwork.freedesktop.org/series/32655/
State : failure

== Summary ==

Series 32655v1 drm/i915/selftests: Add a GuC doorbells selftest
https://patchwork.freedesktop.org/api/1.0/series/32655/revisions/1/mbox/

Test chamelium:
        Subgroup dp-crc-fast:
                fail       -> PASS       (fi-kbl-7500u) fdo#102514
Test gem_exec_suspend:
        Subgroup basic-s3:
                pass       -> INCOMPLETE (fi-elk-e7500)
Test kms_flip:
        Subgroup basic-flip-vs-wf_vblank:
                fail       -> PASS       (fi-skl-6770hq)

fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:442s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:459s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:370s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:520s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:263s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:501s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:493s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:493s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:486s
fi-cfl-s         total:289  pass:253  dwarn:4   dfail:0   fail:0   skip:32  time:554s
fi-elk-e7500     total:118  pass:81   dwarn:0   dfail:0   fail:0   skip:36 
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:252s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:585s
fi-glk-dsi       total:289  pass:258  dwarn:0   dfail:0   fail:1   skip:30  time:483s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:427s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:428s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:434s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:492s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:458s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:488s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:572s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:476s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:586s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:542s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:451s
fi-skl-6600u     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:589s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:649s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:518s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:504s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:457s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:572s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:416s
fi-cnl-y failed to connect after reboot

be67da218126edb88de92c391a48964c89219c11 drm-tip: 2017y-10m-25d-17h-36m-48s UTC integration manifest
b26366ed8b14 drm/i915/selftests: Add a GuC doorbells selftest

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6193/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] drm/i915/selftests: Add a GuC doorbells selftest
  2017-10-25 21:19   ` Michel Thierry
@ 2017-10-25 23:12     ` Michel Thierry
  0 siblings, 0 replies; 12+ messages in thread
From: Michel Thierry @ 2017-10-25 23:12 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On 25/10/17 14:19, Michel Thierry wrote:
> On 25/10/17 14:08, Chris Wilson wrote:
>> Quoting Michel Thierry (2017-10-25 21:53:44)
>>> Try to create multiple clients (one of each kind) 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").
>>>
>>> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
>>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>>> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>>> Cc: Michal Winiarski <michal.winiarski@intel.com>
>>> ---
>>> +/* create a client of each type and their doorbells */
>>> +static int igt_guc_doorbells(void *arg)
>>> +{
>>> +       struct drm_i915_private *dev_priv = arg;
>>> +       struct intel_guc *guc;
>>> +       struct i915_guc_client *clients[GUC_CLIENT_PRIORITY_NUM];
>>
>> Don't you actually want to test up to GUC_NUM_DOORBELLS? (-reserved?)
>> And check failure when full?
>>
>> I'm thinking an idr for the clients, that will give you an universal
>> -EEXISTS test as well for a repeated id, as well as an easy structure to
>> cleanup.
>>

cc-ing people that may be interested,

There is already an idr for the clients, guc->stage_ids, but its max 
range is GUC_MAX_STAGE_DESCRIPTORS, not GUC_NUM_DOORBELLS (this is 
because other drivers support the idea of 'leasing doorbells' and you 
could have more clients than doorbells).

But we don't support that, and right now any client after 
GUC_NUM_DOORBELLS would be allocated but then get a -ENOSPC while 
creating/reserving its doorbell.

I could change the limit of guc->stage_ids idr and reject earlier, any 
comments?

-Michel

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] drm/i915/selftests: Add a GuC doorbells selftest
  2017-10-25 20:53 [PATCH] drm/i915/selftests: Add a GuC doorbells selftest Michel Thierry
  2017-10-25 21:08 ` Chris Wilson
  2017-10-25 21:24 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2017-10-26 18:51 ` Michel Thierry
  2017-10-26 18:54   ` Michel Thierry
  2017-11-10 19:04   ` [PATCH v3] " Michel Thierry
  2017-10-26 19:03 ` ✗ Fi.CI.BAT: failure for drm/i915/selftests: Add a GuC doorbells selftest (rev2) Patchwork
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 12+ messages in thread
From: Michel Thierry @ 2017-10-26 18:51 UTC (permalink / raw)
  To: intel-gfx

Try 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).

Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_guc_submission.c         |  15 +-
 .../gpu/drm/i915/selftests/i915_live_selftests.h   |   1 +
 drivers/gpu/drm/i915/selftests/intel_guc.c         | 186 +++++++++++++++++++++
 3 files changed, 199 insertions(+), 3 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/selftests/intel_guc.c

diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 13d383cdc4c9..e643f47c8697 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -725,10 +725,15 @@ static int __reset_doorbell(struct i915_guc_client* client, u16 db_id)
  * client. Also, tell GuC about all the doorbells in use by all clients.
  * We do this because the KMD, the GuC and the doorbell HW can easily go out of
  * sync (e.g. we can reset the GuC, but not the doorbel HW).
+ *
+ * The optional test_client is a hook to use this function with multiple
+ * clients in the guc selftest.
  */
-static int guc_init_doorbell_hw(struct intel_guc *guc)
+static int guc_init_doorbell_hw(struct intel_guc *guc,
+				struct i915_guc_client *test_client)
 {
-	struct i915_guc_client *client = guc->execbuf_client;
+	struct i915_guc_client *client = !test_client ? guc->execbuf_client :
+							test_client;
 	bool recreate_first_client = false;
 	u16 db_id;
 	int ret;
@@ -1244,7 +1249,7 @@ int i915_guc_submission_enable(struct drm_i915_private *dev_priv)
 
 	guc_reset_wq(client);
 
-	err = guc_init_doorbell_hw(guc);
+	err = guc_init_doorbell_hw(guc, NULL);
 	if (err)
 		goto err_execbuf_client;
 
@@ -1280,3 +1285,7 @@ void i915_guc_submission_disable(struct drm_i915_private *dev_priv)
 	guc_client_free(guc->execbuf_client);
 	guc->execbuf_client = NULL;
 }
+
+#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
+#include "selftests/intel_guc.c"
+#endif
diff --git a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
index 54a73534b37e..1b750e92dd08 100644
--- a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
+++ b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
@@ -19,3 +19,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)
diff --git a/drivers/gpu/drm/i915/selftests/intel_guc.c b/drivers/gpu/drm/i915/selftests/intel_guc.c
new file mode 100644
index 000000000000..86e0be919d7f
--- /dev/null
+++ b/drivers/gpu/drm/i915/selftests/intel_guc.c
@@ -0,0 +1,186 @@
+/*
+ * Copyright © 2017 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#include "../i915_selftest.h"
+
+/* max doorbell number + negative test for each client type */
+#define ATTEMPTS (GUC_NUM_DOORBELLS + GUC_CLIENT_PRIORITY_NUM)
+
+struct i915_guc_client *clients[ATTEMPTS];
+
+static bool available_dbs(struct intel_guc *guc, u32 priority)
+{
+	unsigned long offset;
+	unsigned long end;
+	u16 id;
+
+	/* first hal is used for normal priority, second half for high */
+	offset = 0;
+	end = GUC_NUM_DOORBELLS/2;
+	if (priority <= GUC_CLIENT_PRIORITY_HIGH) {
+		offset = end;
+		end += offset;
+	}
+
+	id = find_next_zero_bit(guc->doorbell_bitmap, end, offset);
+	if (id < end)
+		return true;
+
+	return false;
+}
+
+static int check_all_doorbells(struct intel_guc *guc)
+{
+	u16 db_id;
+
+	pr_info_once("Max number of doorbells: %d", GUC_NUM_DOORBELLS);
+	for (db_id = 0; db_id < GUC_NUM_DOORBELLS; ++db_id) {
+		if (!doorbell_ok(guc, db_id)) {
+			pr_err("doorbell %d, not ok\n", db_id);
+			return -EIO;
+		}
+	}
+
+	return 0;
+}
+
+/*
+ * Create as many clients as number of doorbells (note that there's already
+ * one client/db created during driver load).
+ */
+static int igt_guc_doorbells(void *arg)
+{
+	struct drm_i915_private *dev_priv = arg;
+	struct intel_guc *guc;
+	int i, err = 0;
+	u16 db_id;
+
+	DRM_INFO("GuC Doorbells selftest\n");
+	GEM_BUG_ON(!HAS_GUC(dev_priv));
+	mutex_lock(&dev_priv->drm.struct_mutex);
+
+	guc = &dev_priv->guc;
+	if (!guc) {
+		pr_err("No guc object!\n");
+		err = -EINVAL;
+		goto unlock;
+	}
+
+	err = check_all_doorbells(guc);
+	if (err)
+		goto unlock;
+
+	for (i = 0; i < ATTEMPTS; i++) {
+		clients[i] = guc_client_alloc(dev_priv,
+					      INTEL_INFO(dev_priv)->ring_mask,
+					      i % GUC_CLIENT_PRIORITY_NUM,
+					      dev_priv->kernel_context);
+
+		if (!clients[i]) {
+			pr_err("[%d] No guc client\n", i);
+			err = -EINVAL;
+			goto out;
+		}
+
+		if (IS_ERR(clients[i])) {
+			if (PTR_ERR(clients[i]) != -ENOSPC) {
+				pr_err("[%d] unexpected error\n", i);
+				err = PTR_ERR(clients[i]);
+				goto out;
+			}
+
+			if (available_dbs(guc, i % GUC_CLIENT_PRIORITY_NUM)) {
+				pr_err("unexpected client alloc failure\n");
+				err = -EINVAL;
+				goto out;
+			}
+
+			/* expected, ran out of dbs for this client type */
+			continue;
+		}
+
+		/*
+		 * The check below is only valid while we keep a doorbell
+		 * assigned during the whole life of the client.
+		 */
+		if (clients[i]->stage_id >= GUC_NUM_DOORBELLS) {
+			pr_err("more clients than doorbells (%d >= %d)\n",
+			       clients[i]->id, GUC_NUM_DOORBELLS);
+			err = -EINVAL;
+			goto out;
+		}
+
+		/* basic client sanity check */
+		if (clients[i]->owner != dev_priv->kernel_context ||
+		    clients[i]->engines != INTEL_INFO(dev_priv)->ring_mask ||
+		    clients[i]->priority != (i % GUC_CLIENT_PRIORITY_NUM) ||
+		    clients[i]->doorbell_id == GUC_DOORBELL_INVALID) {
+			pr_err("[%d] client_alloc sanity check failed!\n", i);
+			err = -EINVAL;
+			goto out;
+		}
+
+		db_id = clients[i]->doorbell_id;
+
+		/* recreate client's doorbell using existing code */
+		err = guc_init_doorbell_hw(guc, clients[i]);
+		if (err) {
+			pr_err("Failed to create a doorbell\n");
+			goto out;
+		}
+
+		/* doorbell id shouldn't change, we are holding the mutex */
+		if (db_id != clients[i]->doorbell_id) {
+			pr_err("doorbell id changed (%d - %d)\n",
+			       db_id, clients[i]->doorbell_id);
+			err = -EINVAL;
+			goto out;
+		}
+
+		/* guc_init_doorbell_hw already did this, but don't trust it */
+		err = check_all_doorbells(guc);
+		if (err)
+			goto out;
+	}
+
+out:
+	for (i = 0; i < ATTEMPTS; i++)
+		if (!IS_ERR_OR_NULL(clients[i]))
+			guc_client_free(clients[i]);
+unlock:
+	mutex_unlock(&dev_priv->drm.struct_mutex);
+	return err;
+}
+
+int intel_guc_live_selftest(struct drm_i915_private *dev_priv)
+{
+	static const struct i915_subtest tests[] = {
+		SUBTEST(igt_guc_doorbells),
+	};
+
+	if (!i915_modparams.enable_guc_submission)
+		return 0;
+
+	return i915_subtests(tests, dev_priv);
+}
-- 
2.14.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] drm/i915/selftests: Add a GuC doorbells selftest
  2017-10-26 18:51 ` [PATCH v2] " Michel Thierry
@ 2017-10-26 18:54   ` Michel Thierry
  2017-10-26 19:42     ` Chris Wilson
  2017-11-10 19:04   ` [PATCH v3] " Michel Thierry
  1 sibling, 1 reply; 12+ messages in thread
From: Michel Thierry @ 2017-10-26 18:54 UTC (permalink / raw)
  To: intel-gfx

On 26/10/17 11:51, Michel Thierry wrote:
> Try 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).

This will conflict with Michal's patch ("Add a second client, to be used 
for preemption") but I want to get feedback about reusing 
guc_init_doorbell_hw in the selftest.

Thanks,

> 
> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/i915_guc_submission.c         |  15 +-
>   .../gpu/drm/i915/selftests/i915_live_selftests.h   |   1 +
>   drivers/gpu/drm/i915/selftests/intel_guc.c         | 186 +++++++++++++++++++++
>   3 files changed, 199 insertions(+), 3 deletions(-)
>   create mode 100644 drivers/gpu/drm/i915/selftests/intel_guc.c
> 
> diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
> index 13d383cdc4c9..e643f47c8697 100644
> --- a/drivers/gpu/drm/i915/i915_guc_submission.c
> +++ b/drivers/gpu/drm/i915/i915_guc_submission.c
> @@ -725,10 +725,15 @@ static int __reset_doorbell(struct i915_guc_client* client, u16 db_id)
>    * client. Also, tell GuC about all the doorbells in use by all clients.
>    * We do this because the KMD, the GuC and the doorbell HW can easily go out of
>    * sync (e.g. we can reset the GuC, but not the doorbel HW).
> + *
> + * The optional test_client is a hook to use this function with multiple
> + * clients in the guc selftest.
>    */
> -static int guc_init_doorbell_hw(struct intel_guc *guc)
> +static int guc_init_doorbell_hw(struct intel_guc *guc,
> +                               struct i915_guc_client *test_client)
>   {
> -       struct i915_guc_client *client = guc->execbuf_client;
> +       struct i915_guc_client *client = !test_client ? guc->execbuf_client :
> +                                                       test_client;
>          bool recreate_first_client = false;
>          u16 db_id;
>          int ret;
> @@ -1244,7 +1249,7 @@ int i915_guc_submission_enable(struct drm_i915_private *dev_priv)
> 
>          guc_reset_wq(client);
> 
> -       err = guc_init_doorbell_hw(guc);
> +       err = guc_init_doorbell_hw(guc, NULL);
>          if (err)
>                  goto err_execbuf_client;
> 
> @@ -1280,3 +1285,7 @@ void i915_guc_submission_disable(struct drm_i915_private *dev_priv)
>          guc_client_free(guc->execbuf_client);
>          guc->execbuf_client = NULL;
>   }
> +
> +#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
> +#include "selftests/intel_guc.c"
> +#endif
> diff --git a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
> index 54a73534b37e..1b750e92dd08 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
> +++ b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
> @@ -19,3 +19,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)
> diff --git a/drivers/gpu/drm/i915/selftests/intel_guc.c b/drivers/gpu/drm/i915/selftests/intel_guc.c
> new file mode 100644
> index 000000000000..86e0be919d7f
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/selftests/intel_guc.c
> @@ -0,0 +1,186 @@
> +/*
> + * Copyright © 2017 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> + * IN THE SOFTWARE.
> + *
> + */
> +
> +#include "../i915_selftest.h"
> +
> +/* max doorbell number + negative test for each client type */
> +#define ATTEMPTS (GUC_NUM_DOORBELLS + GUC_CLIENT_PRIORITY_NUM)
> +
> +struct i915_guc_client *clients[ATTEMPTS];
> +
> +static bool available_dbs(struct intel_guc *guc, u32 priority)
> +{
> +       unsigned long offset;
> +       unsigned long end;
> +       u16 id;
> +
> +       /* first hal is used for normal priority, second half for high */
> +       offset = 0;
> +       end = GUC_NUM_DOORBELLS/2;
> +       if (priority <= GUC_CLIENT_PRIORITY_HIGH) {
> +               offset = end;
> +               end += offset;
> +       }
> +
> +       id = find_next_zero_bit(guc->doorbell_bitmap, end, offset);
> +       if (id < end)
> +               return true;
> +
> +       return false;
> +}
> +
> +static int check_all_doorbells(struct intel_guc *guc)
> +{
> +       u16 db_id;
> +
> +       pr_info_once("Max number of doorbells: %d", GUC_NUM_DOORBELLS);
> +       for (db_id = 0; db_id < GUC_NUM_DOORBELLS; ++db_id) {
> +               if (!doorbell_ok(guc, db_id)) {
> +                       pr_err("doorbell %d, not ok\n", db_id);
> +                       return -EIO;
> +               }
> +       }
> +
> +       return 0;
> +}
> +
> +/*
> + * Create as many clients as number of doorbells (note that there's already
> + * one client/db created during driver load).
> + */
> +static int igt_guc_doorbells(void *arg)
> +{
> +       struct drm_i915_private *dev_priv = arg;
> +       struct intel_guc *guc;
> +       int i, err = 0;
> +       u16 db_id;
> +
> +       DRM_INFO("GuC Doorbells selftest\n");
> +       GEM_BUG_ON(!HAS_GUC(dev_priv));
> +       mutex_lock(&dev_priv->drm.struct_mutex);
> +
> +       guc = &dev_priv->guc;
> +       if (!guc) {
> +               pr_err("No guc object!\n");
> +               err = -EINVAL;
> +               goto unlock;
> +       }
> +
> +       err = check_all_doorbells(guc);
> +       if (err)
> +               goto unlock;
> +
> +       for (i = 0; i < ATTEMPTS; i++) {
> +               clients[i] = guc_client_alloc(dev_priv,
> +                                             INTEL_INFO(dev_priv)->ring_mask,
> +                                             i % GUC_CLIENT_PRIORITY_NUM,
> +                                             dev_priv->kernel_context);
> +
> +               if (!clients[i]) {
> +                       pr_err("[%d] No guc client\n", i);
> +                       err = -EINVAL;
> +                       goto out;
> +               }
> +
> +               if (IS_ERR(clients[i])) {
> +                       if (PTR_ERR(clients[i]) != -ENOSPC) {
> +                               pr_err("[%d] unexpected error\n", i);
> +                               err = PTR_ERR(clients[i]);
> +                               goto out;
> +                       }
> +
> +                       if (available_dbs(guc, i % GUC_CLIENT_PRIORITY_NUM)) {
> +                               pr_err("unexpected client alloc failure\n");
> +                               err = -EINVAL;
> +                               goto out;
> +                       }
> +
> +                       /* expected, ran out of dbs for this client type */
> +                       continue;
> +               }
> +
> +               /*
> +                * The check below is only valid while we keep a doorbell
> +                * assigned during the whole life of the client.
> +                */
> +               if (clients[i]->stage_id >= GUC_NUM_DOORBELLS) {
> +                       pr_err("more clients than doorbells (%d >= %d)\n",
> +                              clients[i]->id, GUC_NUM_DOORBELLS);
> +                       err = -EINVAL;
> +                       goto out;
> +               }
> +
> +               /* basic client sanity check */
> +               if (clients[i]->owner != dev_priv->kernel_context ||
> +                   clients[i]->engines != INTEL_INFO(dev_priv)->ring_mask ||
> +                   clients[i]->priority != (i % GUC_CLIENT_PRIORITY_NUM) ||
> +                   clients[i]->doorbell_id == GUC_DOORBELL_INVALID) {
> +                       pr_err("[%d] client_alloc sanity check failed!\n", i);
> +                       err = -EINVAL;
> +                       goto out;
> +               }
> +
> +               db_id = clients[i]->doorbell_id;
> +
> +               /* recreate client's doorbell using existing code */
> +               err = guc_init_doorbell_hw(guc, clients[i]);
> +               if (err) {
> +                       pr_err("Failed to create a doorbell\n");
> +                       goto out;
> +               }
> +
> +               /* doorbell id shouldn't change, we are holding the mutex */
> +               if (db_id != clients[i]->doorbell_id) {
> +                       pr_err("doorbell id changed (%d - %d)\n",
> +                              db_id, clients[i]->doorbell_id);
> +                       err = -EINVAL;
> +                       goto out;
> +               }
> +
> +               /* guc_init_doorbell_hw already did this, but don't trust it */
> +               err = check_all_doorbells(guc);
> +               if (err)
> +                       goto out;
> +       }
> +
> +out:
> +       for (i = 0; i < ATTEMPTS; i++)
> +               if (!IS_ERR_OR_NULL(clients[i]))
> +                       guc_client_free(clients[i]);
> +unlock:
> +       mutex_unlock(&dev_priv->drm.struct_mutex);
> +       return err;
> +}
> +
> +int intel_guc_live_selftest(struct drm_i915_private *dev_priv)
> +{
> +       static const struct i915_subtest tests[] = {
> +               SUBTEST(igt_guc_doorbells),
> +       };
> +
> +       if (!i915_modparams.enable_guc_submission)
> +               return 0;
> +
> +       return i915_subtests(tests, dev_priv);
> +}
> --
> 2.14.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* ✗ Fi.CI.BAT: failure for drm/i915/selftests: Add a GuC doorbells selftest (rev2)
  2017-10-25 20:53 [PATCH] drm/i915/selftests: Add a GuC doorbells selftest Michel Thierry
                   ` (2 preceding siblings ...)
  2017-10-26 18:51 ` [PATCH v2] " Michel Thierry
@ 2017-10-26 19:03 ` Patchwork
  2017-11-10 19:39 ` ✓ Fi.CI.BAT: success for drm/i915/selftests: Add a GuC doorbells selftest (rev3) Patchwork
  2017-11-10 21:00 ` ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2017-10-26 19:03 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Add a GuC doorbells selftest (rev2)
URL   : https://patchwork.freedesktop.org/series/32655/
State : failure

== Summary ==

  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
  CC [M]  drivers/gpu/drm/i915/i915_guc_submission.o
In file included from ./include/linux/kernel.h:13:0,
                 from ./include/linux/list.h:8,
                 from ./include/linux/smp.h:11,
                 from ./include/linux/tracepoint.h:17,
                 from ./include/trace/events/dma_fence.h:7,
                 from drivers/gpu/drm/i915/i915_guc_submission.c:26:
drivers/gpu/drm/i915/selftests/intel_guc.c: In function ‘igt_guc_doorbells’:
drivers/gpu/drm/i915/selftests/intel_guc.c:129:21: error: ‘struct i915_guc_client’ has no member named ‘id’
           clients[i]->id, GUC_NUM_DOORBELLS);
                     ^
./include/linux/printk.h:301:33: note: in definition of macro ‘pr_err’
  printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
                                 ^~~~~~~~~~~
scripts/Makefile.build:313: recipe for target 'drivers/gpu/drm/i915/i915_guc_submission.o' failed
make[4]: *** [drivers/gpu/drm/i915/i915_guc_submission.o] Error 1
scripts/Makefile.build:572: recipe for target 'drivers/gpu/drm/i915' failed
make[3]: *** [drivers/gpu/drm/i915] Error 2
scripts/Makefile.build:572: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:572: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1023: recipe for target 'drivers' failed
make: *** [drivers] Error 2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] drm/i915/selftests: Add a GuC doorbells selftest
  2017-10-26 18:54   ` Michel Thierry
@ 2017-10-26 19:42     ` Chris Wilson
  0 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2017-10-26 19:42 UTC (permalink / raw)
  To: Michel Thierry, intel-gfx

Quoting Michel Thierry (2017-10-26 19:54:06)
> On 26/10/17 11:51, Michel Thierry wrote:
> > Try 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).
> 
> This will conflict with Michal's patch ("Add a second client, to be used 
> for preemption") but I want to get feedback about reusing 
> guc_init_doorbell_hw in the selftest.

It's more work, but I think you basically want both. You want unittests
for the individual lowlevel functions, plus you want to unittest init_hw
as it will typically be called after reset so a failure there may be
hard to disentangle from the cause of the reset.

In essence, we want to treat the doorbell data struct as a library api
and so exercise its contract (if it was easy enough, I would suggest
mocking the hw interactions). And then similar at the next level, we
want to look at the interface guc exposes to the driver and check that
behaves as expected (that is more akin to live testing with hw).

As such, they are probably two different subtests. :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v3] drm/i915/selftests: Add a GuC doorbells selftest
  2017-10-26 18:51 ` [PATCH v2] " Michel Thierry
  2017-10-26 18:54   ` Michel Thierry
@ 2017-11-10 19:04   ` Michel Thierry
  1 sibling, 0 replies; 12+ messages in thread
From: Michel Thierry @ 2017-11-10 19:04 UTC (permalink / raw)
  To: intel-gfx

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.

Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_guc_submission.c         |   4 +
 .../gpu/drm/i915/selftests/i915_live_selftests.h   |   1 +
 drivers/gpu/drm/i915/selftests/intel_guc.c         | 345 +++++++++++++++++++++
 3 files changed, 350 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/selftests/intel_guc.c

diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 0ba2fc04fe9c..5d6576e01a91 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -1464,3 +1464,7 @@ void i915_guc_submission_disable(struct drm_i915_private *dev_priv)
 
 	guc_clients_destroy(guc);
 }
+
+#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
+#include "selftests/intel_guc.c"
+#endif
diff --git a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
index d7dd98a6acad..088f45bc6199 100644
--- a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
+++ b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
@@ -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)
diff --git a/drivers/gpu/drm/i915/selftests/intel_guc.c b/drivers/gpu/drm/i915/selftests/intel_guc.c
new file mode 100644
index 000000000000..3d7245bb5588
--- /dev/null
+++ b/drivers/gpu/drm/i915/selftests/intel_guc.c
@@ -0,0 +1,345 @@
+/*
+ * Copyright © 2017 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#include "../i915_selftest.h"
+
+/* max doorbell number + negative test for each client type */
+#define ATTEMPTS (GUC_NUM_DOORBELLS + GUC_CLIENT_PRIORITY_NUM)
+
+struct i915_guc_client *clients[ATTEMPTS];
+
+static bool available_dbs(struct intel_guc *guc, u32 priority)
+{
+	unsigned long offset;
+	unsigned long end;
+	u16 id;
+
+	/* first half is used for normal priority, second half for high */
+	offset = 0;
+	end = GUC_NUM_DOORBELLS/2;
+	if (priority <= GUC_CLIENT_PRIORITY_HIGH) {
+		offset = end;
+		end += offset;
+	}
+
+	id = find_next_zero_bit(guc->doorbell_bitmap, end, offset);
+	if (id < end)
+		return true;
+
+	return false;
+}
+
+static int check_all_doorbells(struct intel_guc *guc)
+{
+	u16 db_id;
+
+	pr_info_once("Max number of doorbells: %d", GUC_NUM_DOORBELLS);
+	for (db_id = 0; db_id < GUC_NUM_DOORBELLS; ++db_id) {
+		if (!doorbell_ok(guc, db_id)) {
+			pr_err("doorbell %d, not ok\n", db_id);
+			return -EIO;
+		}
+	}
+
+	return 0;
+}
+
+/*
+ * Basic client sanity check, called after create_clients.
+ */
+static int validate_client(struct i915_guc_client *client,
+			   int client_priority,
+			   bool is_preempt_client)
+{
+	struct drm_i915_private *dev_priv = guc_to_i915(client->guc);
+	struct i915_gem_context *ctx_owner = is_preempt_client ?
+			dev_priv->preempt_context : dev_priv->kernel_context;
+
+	if (client->owner != ctx_owner ||
+	    client->engines != INTEL_INFO(dev_priv)->ring_mask ||
+	    client->priority != client_priority ||
+	    client->doorbell_id == GUC_DOORBELL_INVALID)
+		return -EINVAL;
+	else
+		return 0;
+}
+
+/*
+ * Checking that guc_init_doorbell_hw is doing what it should.
+ */
+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");
+	GEM_BUG_ON(!HAS_GUC(dev_priv));
+	mutex_lock(&dev_priv->drm.struct_mutex);
+
+	guc = &dev_priv->guc;
+	if (!guc) {
+		pr_err("No guc object!\n");
+		err = -EINVAL;
+		goto unlock;
+	}
+
+	err = check_all_doorbells(guc);
+	if (err)
+		goto unlock;
+
+	/* Get rid of clients created during driver load, the test will
+	 * recreate them.
+	 */
+	guc_clients_destroy(guc);
+	if (guc->execbuf_client || guc->preempt_client) {
+		pr_err("guc_clients_destroy lied!\n");
+		err = -EINVAL;
+		goto unlock;
+	}
+
+	err = guc_clients_create(guc);
+	if (err) {
+		pr_err("Failed to create clients\n");
+		goto unlock;
+	}
+
+	err = validate_client(guc->execbuf_client,
+			      GUC_CLIENT_PRIORITY_KMD_NORMAL, false);
+	if (err) {
+		pr_err("execbug client validation failed\n");
+		goto out;
+	}
+
+	err = validate_client(guc->preempt_client,
+			      GUC_CLIENT_PRIORITY_KMD_HIGH, true);
+	if (err) {
+		pr_err("preempt client validation failed\n");
+		goto out;
+	}
+
+	/* each client should have received a doorbell during alloc */
+	if (!has_doorbell(guc->execbuf_client) ||
+	    !has_doorbell(guc->preempt_client)) {
+		pr_err("guc_clients_create didn't create doorbells\n");
+		err = -EINVAL;
+		goto out;
+	}
+
+	/* basic test */
+	err = guc_init_doorbell_hw(guc);
+	if (err)
+		goto out;
+
+	/* test using client with no doorbell (init_db_hw should fail) */
+	destroy_doorbell(guc->execbuf_client);
+	if (has_doorbell(guc->execbuf_client)) {
+		pr_err("destroy db did not work\n");
+		err = -EINVAL;
+		goto out;
+	}
+
+	/* expected to fail */
+	err = guc_init_doorbell_hw(guc);
+	if (err != -EIO) {
+		pr_err("unexpected (err = %d)", err);
+		goto out;
+	}
+
+	/* clean after test */
+	err = create_doorbell(guc->execbuf_client);
+	if (err) {
+		pr_err("recreate doorbell failed\n");
+		goto out;
+	}
+
+	/* test doorbell_bitmap out of sync, will trigger a few of
+	 * WARN_ON(!doorbell_ok(guc, db_id)) but that's ok as long as the
+	 * doorbells from our clients don't fail.
+	 */
+	bitmap_copy(db_bitmap_bk, guc->doorbell_bitmap, GUC_NUM_DOORBELLS);
+	for (i = 0; i < GUC_NUM_DOORBELLS; i++)
+		if (i % 2)
+			test_and_change_bit(i, guc->doorbell_bitmap);
+
+	err = guc_init_doorbell_hw(guc);
+	if (err) {
+		pr_err("out of sync doorbell caused an error\n");
+		goto out;
+	}
+
+	/* restore 'correct' db bitmap */
+	bitmap_copy(guc->doorbell_bitmap, db_bitmap_bk, GUC_NUM_DOORBELLS);
+	err = guc_init_doorbell_hw(guc);
+	if (err) {
+		pr_err("restored doorbell caused an error\n");
+		goto out;
+	}
+
+out:
+	/* leave clean state for other test, plus the driver always destroy the
+	 * clients during unload.
+	 */
+	guc_clients_destroy(guc);
+	guc_clients_create(guc);
+unlock:
+	mutex_unlock(&dev_priv->drm.struct_mutex);
+	return err;
+}
+
+/*
+ * Create as many clients as number of doorbells (note that there's already
+ * one client/db created during driver load).
+ */
+static int igt_guc_doorbells(void *arg)
+{
+	struct drm_i915_private *dev_priv = arg;
+	struct intel_guc *guc;
+	int i, err = 0;
+	u16 db_id;
+
+	pr_info("GuC Doorbells selftest\n");
+	GEM_BUG_ON(!HAS_GUC(dev_priv));
+	mutex_lock(&dev_priv->drm.struct_mutex);
+
+	guc = &dev_priv->guc;
+	if (!guc) {
+		pr_err("No guc object!\n");
+		err = -EINVAL;
+		goto unlock;
+	}
+
+	err = check_all_doorbells(guc);
+	if (err)
+		goto unlock;
+
+	for (i = 0; i < ATTEMPTS; i++) {
+		clients[i] = guc_client_alloc(dev_priv,
+					      INTEL_INFO(dev_priv)->ring_mask,
+					      i % GUC_CLIENT_PRIORITY_NUM,
+					      dev_priv->kernel_context);
+
+		if (!clients[i]) {
+			pr_err("[%d] No guc client\n", i);
+			err = -EINVAL;
+			goto out;
+		}
+
+		if (IS_ERR(clients[i])) {
+			if (PTR_ERR(clients[i]) != -ENOSPC) {
+				pr_err("[%d] unexpected error\n", i);
+				err = PTR_ERR(clients[i]);
+				goto out;
+			}
+
+			if (available_dbs(guc, i % GUC_CLIENT_PRIORITY_NUM)) {
+				pr_err("[%d] non-db related alloc fail\n", i);
+				err = -EINVAL;
+				goto out;
+			}
+
+			/* expected, ran out of dbs for this client type */
+			continue;
+		}
+
+		/*
+		 * The check below is only valid because we keep a doorbell
+		 * assigned during the whole life of the client.
+		 */
+		if (clients[i]->stage_id >= GUC_NUM_DOORBELLS) {
+			pr_err("[%d] more clients than doorbells (%d >= %d)\n",
+			       i, clients[i]->stage_id, GUC_NUM_DOORBELLS);
+			err = -EINVAL;
+			goto out;
+		}
+
+		err = validate_client(clients[i],
+				      i % GUC_CLIENT_PRIORITY_NUM, false);
+		if (err) {
+			pr_err("[%d] client_alloc sanity check failed!\n", i);
+			err = -EINVAL;
+			goto out;
+		}
+
+		db_id = clients[i]->doorbell_id;
+
+		/*
+		 * Client alloc gives us a doorbell, but we want to exercise
+		 * this ourselves (this resembles guc_init_doorbell_hw)
+		 */
+		destroy_doorbell(clients[i]);
+		if (clients[i]->doorbell_id != GUC_DOORBELL_INVALID) {
+			pr_err("[%d] destroy db did not work!\n", i);
+			err = -EINVAL;
+			goto out;
+		}
+
+		err = __reserve_doorbell(clients[i]);
+		if (err) {
+			pr_err("[%d] Failed to reserve a doorbell\n", i);
+			goto out;
+		}
+
+		__update_doorbell_desc(clients[i], clients[i]->doorbell_id);
+		err = __create_doorbell(clients[i]);
+		if (err) {
+			pr_err("[%d] Failed to create a doorbell\n", i);
+			goto out;
+		}
+
+		/* doorbell id shouldn't change, we are holding the mutex */
+		if (db_id != clients[i]->doorbell_id) {
+			pr_err("[%d] doorbell id changed (%d != %d)\n",
+			       i, db_id, clients[i]->doorbell_id);
+			err = -EINVAL;
+			goto out;
+		}
+
+		err = check_all_doorbells(guc);
+		if (err)
+			goto out;
+	}
+
+out:
+	for (i = 0; i < ATTEMPTS; i++)
+		if (!IS_ERR_OR_NULL(clients[i]))
+			guc_client_free(clients[i]);
+unlock:
+	mutex_unlock(&dev_priv->drm.struct_mutex);
+	return err;
+}
+
+int intel_guc_live_selftest(struct drm_i915_private *dev_priv)
+{
+	static const struct i915_subtest tests[] = {
+		SUBTEST(igt_guc_init_doorbell_hw),
+		SUBTEST(igt_guc_doorbells),
+	};
+
+	if (!i915_modparams.enable_guc_submission)
+		return 0;
+
+	return i915_subtests(tests, dev_priv);
+}
-- 
2.15.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915/selftests: Add a GuC doorbells selftest (rev3)
  2017-10-25 20:53 [PATCH] drm/i915/selftests: Add a GuC doorbells selftest Michel Thierry
                   ` (3 preceding siblings ...)
  2017-10-26 19:03 ` ✗ Fi.CI.BAT: failure for drm/i915/selftests: Add a GuC doorbells selftest (rev2) Patchwork
@ 2017-11-10 19:39 ` Patchwork
  2017-11-10 21:00 ` ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2017-11-10 19:39 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Add a GuC doorbells selftest (rev3)
URL   : https://patchwork.freedesktop.org/series/32655/
State : success

== Summary ==

Series 32655v3 drm/i915/selftests: Add a GuC doorbells selftest
https://patchwork.freedesktop.org/api/1.0/series/32655/revisions/3/mbox/

Test chamelium:
        Subgroup dp-crc-fast:
                pass       -> FAIL       (fi-kbl-7500u) fdo#102514
Test gem_exec_reloc:
        Subgroup basic-cpu-read-active:
                pass       -> FAIL       (fi-gdg-551) fdo#102582 +2
Test gem_exec_suspend:
        Subgroup basic-s3:
                dmesg-fail -> PASS       (fi-kbl-7560u) fdo#103039
        Subgroup basic-s4-devices:
                dmesg-fail -> PASS       (fi-kbl-7560u) fdo#102846 +1
Test gem_flink_basic:
        Subgroup bad-flink:
                dmesg-warn -> PASS       (fi-kbl-7560u) fdo#103049 +4
Test gem_linear_blits:
        Subgroup basic:
                incomplete -> PASS       (fi-kbl-7560u) fdo#103163
Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-legacy:
                fail       -> PASS       (fi-gdg-551) fdo#102618

fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#102582 https://bugs.freedesktop.org/show_bug.cgi?id=102582
fdo#103039 https://bugs.freedesktop.org/show_bug.cgi?id=103039
fdo#102846 https://bugs.freedesktop.org/show_bug.cgi?id=102846
fdo#103049 https://bugs.freedesktop.org/show_bug.cgi?id=103049
fdo#103163 https://bugs.freedesktop.org/show_bug.cgi?id=103163
fdo#102618 https://bugs.freedesktop.org/show_bug.cgi?id=102618

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:444s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:456s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:382s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:533s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:276s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:508s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:511s
fi-byt-j1900     total:289  pass:254  dwarn:0   dfail:0   fail:0   skip:35  time:496s
fi-byt-n2820     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:492s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:437s
fi-gdg-551       total:289  pass:175  dwarn:1   dfail:0   fail:4   skip:109 time:262s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:541s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:429s
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:423s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:488s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:469s
fi-kbl-7500u     total:289  pass:263  dwarn:1   dfail:0   fail:1   skip:24  time:474s
fi-kbl-7560u     total:245  pass:228  dwarn:0   dfail:0   fail:0   skip:16 
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:475s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:531s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:564s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:451s
fi-skl-6600u     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:541s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:564s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:523s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:492s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:462s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:564s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:422s
Blacklisted hosts:
fi-cfl-s         total:289  pass:254  dwarn:3   dfail:0   fail:0   skip:32  time:524s
fi-cnl-y         total:248  pass:223  dwarn:0   dfail:0   fail:0   skip:24 
fi-glk-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:490s

6f3dca38f7a939db9658bd11d9c37357089cabef drm-tip: 2017y-11m-10d-12h-56m-44s UTC integration manifest
5628e40419c3 drm/i915/selftests: Add a GuC doorbells selftest

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7068/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* ✓ Fi.CI.IGT: success for drm/i915/selftests: Add a GuC doorbells selftest (rev3)
  2017-10-25 20:53 [PATCH] drm/i915/selftests: Add a GuC doorbells selftest Michel Thierry
                   ` (4 preceding siblings ...)
  2017-11-10 19:39 ` ✓ Fi.CI.BAT: success for drm/i915/selftests: Add a GuC doorbells selftest (rev3) Patchwork
@ 2017-11-10 21:00 ` Patchwork
  5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2017-11-10 21:00 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Add a GuC doorbells selftest (rev3)
URL   : https://patchwork.freedesktop.org/series/32655/
State : success

== Summary ==

Test kms_frontbuffer_tracking:
        Subgroup fbc-farfromfence:
                skip       -> PASS       (shard-hsw)
Test perf:
        Subgroup blocking:
                fail       -> PASS       (shard-hsw) fdo#102252
Test kms_flip:
        Subgroup modeset-vs-vblank-race-interruptible:
                fail       -> PASS       (shard-hsw) fdo#103060
Test kms_busy:
        Subgroup extended-modeset-hang-oldfb-with-reset-render-c:
                pass       -> DMESG-WARN (shard-hsw) fdo#102249

fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#102249 https://bugs.freedesktop.org/show_bug.cgi?id=102249

shard-hsw        total:2585 pass:1472 dwarn:3   dfail:1   fail:10  skip:1099 time:9508s
Blacklisted hosts:
shard-apl        total:2585 pass:1623 dwarn:4   dfail:1   fail:21  skip:936 time:13226s
shard-kbl        total:2556 pass:1696 dwarn:10  dfail:0   fail:24  skip:824 time:9905s
shard-snb        total:2585 pass:1216 dwarn:2   dfail:1   fail:11  skip:1355 time:7908s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7068/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-11-10 21:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-25 20:53 [PATCH] drm/i915/selftests: Add a GuC doorbells selftest Michel Thierry
2017-10-25 21:08 ` Chris Wilson
2017-10-25 21:19   ` Michel Thierry
2017-10-25 23:12     ` Michel Thierry
2017-10-25 21:24 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-10-26 18:51 ` [PATCH v2] " Michel Thierry
2017-10-26 18:54   ` Michel Thierry
2017-10-26 19:42     ` Chris Wilson
2017-11-10 19:04   ` [PATCH v3] " Michel Thierry
2017-10-26 19:03 ` ✗ Fi.CI.BAT: failure for drm/i915/selftests: Add a GuC doorbells selftest (rev2) Patchwork
2017-11-10 19:39 ` ✓ Fi.CI.BAT: success for drm/i915/selftests: Add a GuC doorbells selftest (rev3) Patchwork
2017-11-10 21:00 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.