All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: ring all doorbells in igt_guc_doorbells
@ 2018-08-27 22:36 Daniele Ceraolo Spurio
  2018-08-27 22:57 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Daniele Ceraolo Spurio @ 2018-08-27 22:36 UTC (permalink / raw)
  To: intel-gfx

We currently verify that all doorbells can be registerd with GuC and
HW but don't check that all works as expected after a db ring.

Do a nop ring of all doorbells to make sure we haven't misprogrammed
any WQ or stage descriptor data. This will also help validating
upcoming changes in the db programming flow.

Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
 drivers/gpu/drm/i915/intel_guc_fwif.h       |  1 +
 drivers/gpu/drm/i915/intel_guc_submission.c | 25 +++++++++-----
 drivers/gpu/drm/i915/intel_guc_submission.h |  4 +++
 drivers/gpu/drm/i915/selftests/intel_guc.c  | 38 +++++++++++++++++++++
 4 files changed, 59 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_fwif.h b/drivers/gpu/drm/i915/intel_guc_fwif.h
index 1a0f2a39cef9..8382d591c784 100644
--- a/drivers/gpu/drm/i915/intel_guc_fwif.h
+++ b/drivers/gpu/drm/i915/intel_guc_fwif.h
@@ -49,6 +49,7 @@
 #define   WQ_TYPE_BATCH_BUF		(0x1 << WQ_TYPE_SHIFT)
 #define   WQ_TYPE_PSEUDO		(0x2 << WQ_TYPE_SHIFT)
 #define   WQ_TYPE_INORDER		(0x3 << WQ_TYPE_SHIFT)
+#define   WQ_TYPE_NOOP			(0x4 << WQ_TYPE_SHIFT)
 #define WQ_TARGET_SHIFT			10
 #define WQ_LEN_SHIFT			16
 #define WQ_NO_WCFLUSH_WAIT		(1 << 27)
diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
index 195adbd0ebf7..07b9d313b019 100644
--- a/drivers/gpu/drm/i915/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/intel_guc_submission.c
@@ -456,6 +456,9 @@ static void guc_wq_item_append(struct intel_guc_client *client,
 	 */
 	BUILD_BUG_ON(wqi_size != 16);
 
+	/* We expect the WQ to be active if we're appending items to it */
+	GEM_BUG_ON(desc->wq_status != WQ_STATUS_ACTIVE);
+
 	/* Free space is guaranteed. */
 	wq_off = READ_ONCE(desc->tail);
 	GEM_BUG_ON(CIRC_SPACE(wq_off, READ_ONCE(desc->head),
@@ -465,15 +468,19 @@ static void guc_wq_item_append(struct intel_guc_client *client,
 	/* WQ starts from the page after doorbell / process_desc */
 	wqi = client->vaddr + wq_off + GUC_DB_SIZE;
 
-	/* Now fill in the 4-word work queue item */
-	wqi->header = WQ_TYPE_INORDER |
-		      (wqi_len << WQ_LEN_SHIFT) |
-		      (target_engine << WQ_TARGET_SHIFT) |
-		      WQ_NO_WCFLUSH_WAIT;
-	wqi->context_desc = context_desc;
-	wqi->submit_element_info = ring_tail << WQ_RING_TAIL_SHIFT;
-	GEM_BUG_ON(ring_tail > WQ_RING_TAIL_MAX);
-	wqi->fence_id = fence_id;
+	if (I915_SELFTEST_ONLY(client->use_nop_wqi)) {
+		wqi->header = WQ_TYPE_NOOP | (wqi_len << WQ_LEN_SHIFT);
+	} else {
+		/* Now fill in the 4-word work queue item */
+		wqi->header = WQ_TYPE_INORDER |
+			      (wqi_len << WQ_LEN_SHIFT) |
+			      (target_engine << WQ_TARGET_SHIFT) |
+			      WQ_NO_WCFLUSH_WAIT;
+		wqi->context_desc = context_desc;
+		wqi->submit_element_info = ring_tail << WQ_RING_TAIL_SHIFT;
+		GEM_BUG_ON(ring_tail > WQ_RING_TAIL_MAX);
+		wqi->fence_id = fence_id;
+	}
 
 	/* Make the update visible to GuC */
 	WRITE_ONCE(desc->tail, (wq_off + wqi_size) & (GUC_WQ_SIZE - 1));
diff --git a/drivers/gpu/drm/i915/intel_guc_submission.h b/drivers/gpu/drm/i915/intel_guc_submission.h
index fb081cefef93..169c54568340 100644
--- a/drivers/gpu/drm/i915/intel_guc_submission.h
+++ b/drivers/gpu/drm/i915/intel_guc_submission.h
@@ -28,6 +28,7 @@
 #include <linux/spinlock.h>
 
 #include "i915_gem.h"
+#include "i915_selftest.h"
 
 struct drm_i915_private;
 
@@ -71,6 +72,9 @@ struct intel_guc_client {
 	spinlock_t wq_lock;
 	/* Per-engine counts of GuC submissions */
 	u64 submissions[I915_NUM_ENGINES];
+
+	/* For testing purposes, use nop WQ items instead of real ones */
+	I915_SELFTEST_DECLARE(bool use_nop_wqi);
 };
 
 int intel_guc_submission_init(struct intel_guc *guc);
diff --git a/drivers/gpu/drm/i915/selftests/intel_guc.c b/drivers/gpu/drm/i915/selftests/intel_guc.c
index 407c98fb9170..3154fd2f625d 100644
--- a/drivers/gpu/drm/i915/selftests/intel_guc.c
+++ b/drivers/gpu/drm/i915/selftests/intel_guc.c
@@ -65,6 +65,40 @@ static int check_all_doorbells(struct intel_guc *guc)
 	return 0;
 }
 
+static int ring_doorbell_nop(struct intel_guc_client *client)
+{
+	int err;
+	struct guc_process_desc *desc = __get_process_desc(client);
+
+	client->use_nop_wqi = true;
+
+	spin_lock_irq(&client->wq_lock);
+
+	guc_wq_item_append(client, 0, 0, 0, 0);
+	guc_ring_doorbell(client);
+
+	spin_unlock_irq(&client->wq_lock);
+
+	client->use_nop_wqi = false;
+
+	/* if there are no issues GuC will update the WQ head and keep the
+	 * WQ in active status
+	 */
+	err = wait_for(READ_ONCE(desc->head) == READ_ONCE(desc->tail), 10);
+	if (err) {
+		pr_err("doorbell %u ring failed!\n", client->doorbell_id);
+		return -EIO;
+	}
+
+	if (desc->wq_status != WQ_STATUS_ACTIVE) {
+		pr_err("doorbell %u ring put WQ in bad state (%u)!\n",
+		       client->doorbell_id, desc->wq_status);
+		return -EIO;
+	}
+
+	return 0;
+}
+
 /*
  * Basic client sanity check, handy to validate create_clients.
  */
@@ -332,6 +366,10 @@ static int igt_guc_doorbells(void *arg)
 		err = check_all_doorbells(guc);
 		if (err)
 			goto out;
+
+		err = ring_doorbell_nop(clients[i]);
+		if (err)
+			goto out;
 	}
 
 out:
-- 
2.18.0

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

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: ring all doorbells in igt_guc_doorbells
  2018-08-27 22:36 [PATCH] drm/i915/selftests: ring all doorbells in igt_guc_doorbells Daniele Ceraolo Spurio
@ 2018-08-27 22:57 ` Patchwork
  2018-08-27 23:15 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-08-27 22:57 UTC (permalink / raw)
  To: Daniele Ceraolo Spurio; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: ring all doorbells in igt_guc_doorbells
URL   : https://patchwork.freedesktop.org/series/48768/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
b370a2de90ed drm/i915/selftests: ring all doorbells in igt_guc_doorbells
-:6: WARNING:TYPO_SPELLING: 'registerd' may be misspelled - perhaps 'registered'?
#6: 
We currently verify that all doorbells can be registerd with GuC and

total: 0 errors, 1 warnings, 0 checks, 110 lines checked

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

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

* ✓ Fi.CI.BAT: success for drm/i915/selftests: ring all doorbells in igt_guc_doorbells
  2018-08-27 22:36 [PATCH] drm/i915/selftests: ring all doorbells in igt_guc_doorbells Daniele Ceraolo Spurio
  2018-08-27 22:57 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2018-08-27 23:15 ` Patchwork
  2018-08-27 23:33 ` [PATCH] " Michel Thierry
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-08-27 23:15 UTC (permalink / raw)
  To: Daniele Ceraolo Spurio; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: ring all doorbells in igt_guc_doorbells
URL   : https://patchwork.freedesktop.org/series/48768/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4712 -> Patchwork_10023 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/48768/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10023:

  === IGT changes ===

    ==== Warnings ====

    {igt@kms_psr@primary_page_flip}:
      fi-cnl-psr:         DMESG-WARN -> DMESG-FAIL

    {igt@pm_rpm@module-reload}:
      fi-hsw-4770r:       SKIP -> PASS

    
== Known issues ==

  Here are the changes found in Patchwork_10023 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    {igt@amdgpu/amd_prime@amd-to-i915}:
      {fi-kbl-8809g}:     NOTRUN -> FAIL (fdo#107341)

    igt@drv_selftest@live_hangcheck:
      {fi-cfl-8109u}:     PASS -> DMESG-FAIL (fdo#106560)
      fi-cfl-s3:          PASS -> DMESG-FAIL (fdo#106560)
      fi-kbl-7567u:       PASS -> DMESG-FAIL (fdo#106560, fdo#106947)

    igt@gem_basic@bad-close:
      fi-skl-6770hq:      PASS -> DMESG-WARN (fdo#105541)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      {fi-byt-clapper}:   PASS -> FAIL (fdo#103191, fdo#107362)

    {igt@pm_rpm@module-reload}:
      fi-cnl-psr:         PASS -> WARN (fdo#107602)

    
    ==== Possible fixes ====

    {igt@amdgpu/amd_basic@userptr}:
      {fi-kbl-8809g}:     INCOMPLETE (fdo#107402) -> PASS

    igt@drv_module_reload@basic-reload-inject:
      fi-hsw-4770r:       DMESG-WARN (fdo#107425) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         INCOMPLETE (fdo#103927) -> PASS

    
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105541 https://bugs.freedesktop.org/show_bug.cgi?id=105541
  fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
  fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
  fdo#107341 https://bugs.freedesktop.org/show_bug.cgi?id=107341
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107402 https://bugs.freedesktop.org/show_bug.cgi?id=107402
  fdo#107425 https://bugs.freedesktop.org/show_bug.cgi?id=107425
  fdo#107602 https://bugs.freedesktop.org/show_bug.cgi?id=107602


== Participating hosts (54 -> 49) ==

  Missing    (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * Linux: CI_DRM_4712 -> Patchwork_10023

  CI_DRM_4712: 7b245f2b1e25677a1f2b63fd69003e35731cedda @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4610: c40743d3fce5055682d31610519758dd7379c0f8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10023: b370a2de90ed24f059085b7482f852e0efc0f1fd @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

b370a2de90ed drm/i915/selftests: ring all doorbells in igt_guc_doorbells

== Logs ==

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

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

* Re: [PATCH] drm/i915/selftests: ring all doorbells in igt_guc_doorbells
  2018-08-27 22:36 [PATCH] drm/i915/selftests: ring all doorbells in igt_guc_doorbells Daniele Ceraolo Spurio
  2018-08-27 22:57 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
  2018-08-27 23:15 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-08-27 23:33 ` Michel Thierry
  2018-08-28 16:16   ` Daniele Ceraolo Spurio
  2018-08-28  0:25 ` ✓ Fi.CI.IGT: success for " Patchwork
  2018-08-28 12:34 ` [PATCH] " Katarzyna Dec
  4 siblings, 1 reply; 9+ messages in thread
From: Michel Thierry @ 2018-08-27 23:33 UTC (permalink / raw)
  To: Daniele Ceraolo Spurio, intel-gfx

On 8/27/2018 3:36 PM, Daniele Ceraolo Spurio wrote:
> We currently verify that all doorbells can be registerd with GuC and
						^registered
> HW but don't check that all works as expected after a db ring.
> 
> Do a nop ring of all doorbells to make sure we haven't misprogrammed
> any WQ or stage descriptor data. This will also help validating
> upcoming changes in the db programming flow.
> 
> Cc: Michel Thierry <michel.thierry@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_guc_fwif.h       |  1 +
>   drivers/gpu/drm/i915/intel_guc_submission.c | 25 +++++++++-----
>   drivers/gpu/drm/i915/intel_guc_submission.h |  4 +++
>   drivers/gpu/drm/i915/selftests/intel_guc.c  | 38 +++++++++++++++++++++
>   4 files changed, 59 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_guc_fwif.h b/drivers/gpu/drm/i915/intel_guc_fwif.h
> index 1a0f2a39cef9..8382d591c784 100644
> --- a/drivers/gpu/drm/i915/intel_guc_fwif.h
> +++ b/drivers/gpu/drm/i915/intel_guc_fwif.h
> @@ -49,6 +49,7 @@
>   #define   WQ_TYPE_BATCH_BUF		(0x1 << WQ_TYPE_SHIFT)
>   #define   WQ_TYPE_PSEUDO		(0x2 << WQ_TYPE_SHIFT)
>   #define   WQ_TYPE_INORDER		(0x3 << WQ_TYPE_SHIFT)
> +#define   WQ_TYPE_NOOP			(0x4 << WQ_TYPE_SHIFT)
>   #define WQ_TARGET_SHIFT			10
>   #define WQ_LEN_SHIFT			16
>   #define WQ_NO_WCFLUSH_WAIT		(1 << 27)
> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
> index 195adbd0ebf7..07b9d313b019 100644
> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> @@ -456,6 +456,9 @@ static void guc_wq_item_append(struct intel_guc_client *client,
>   	 */
>   	BUILD_BUG_ON(wqi_size != 16);
>   
> +	/* We expect the WQ to be active if we're appending items to it */
> +	GEM_BUG_ON(desc->wq_status != WQ_STATUS_ACTIVE);
> +
>   	/* Free space is guaranteed. */
>   	wq_off = READ_ONCE(desc->tail);
>   	GEM_BUG_ON(CIRC_SPACE(wq_off, READ_ONCE(desc->head),
> @@ -465,15 +468,19 @@ static void guc_wq_item_append(struct intel_guc_client *client,
>   	/* WQ starts from the page after doorbell / process_desc */
>   	wqi = client->vaddr + wq_off + GUC_DB_SIZE;
>   
> -	/* Now fill in the 4-word work queue item */
> -	wqi->header = WQ_TYPE_INORDER |
> -		      (wqi_len << WQ_LEN_SHIFT) |
> -		      (target_engine << WQ_TARGET_SHIFT) |
> -		      WQ_NO_WCFLUSH_WAIT;
> -	wqi->context_desc = context_desc;
> -	wqi->submit_element_info = ring_tail << WQ_RING_TAIL_SHIFT;
> -	GEM_BUG_ON(ring_tail > WQ_RING_TAIL_MAX);
> -	wqi->fence_id = fence_id;
> +	if (I915_SELFTEST_ONLY(client->use_nop_wqi)) {
> +		wqi->header = WQ_TYPE_NOOP | (wqi_len << WQ_LEN_SHIFT);
Note to self, this is WQ_NOOP + three u32 with 0's

> +	} else {
> +		/* Now fill in the 4-word work queue item */
> +		wqi->header = WQ_TYPE_INORDER |
> +			      (wqi_len << WQ_LEN_SHIFT) |
> +			      (target_engine << WQ_TARGET_SHIFT) |
> +			      WQ_NO_WCFLUSH_WAIT;
> +		wqi->context_desc = context_desc;
> +		wqi->submit_element_info = ring_tail << WQ_RING_TAIL_SHIFT;
> +		GEM_BUG_ON(ring_tail > WQ_RING_TAIL_MAX);
> +		wqi->fence_id = fence_id;
> +	}
>   
>   	/* Make the update visible to GuC */
>   	WRITE_ONCE(desc->tail, (wq_off + wqi_size) & (GUC_WQ_SIZE - 1));
> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.h b/drivers/gpu/drm/i915/intel_guc_submission.h
> index fb081cefef93..169c54568340 100644
> --- a/drivers/gpu/drm/i915/intel_guc_submission.h
> +++ b/drivers/gpu/drm/i915/intel_guc_submission.h
> @@ -28,6 +28,7 @@
>   #include <linux/spinlock.h>
>   
>   #include "i915_gem.h"
> +#include "i915_selftest.h"
>   
>   struct drm_i915_private;
>   
> @@ -71,6 +72,9 @@ struct intel_guc_client {
>   	spinlock_t wq_lock;
>   	/* Per-engine counts of GuC submissions */
>   	u64 submissions[I915_NUM_ENGINES];
> +
> +	/* For testing purposes, use nop WQ items instead of real ones */
> +	I915_SELFTEST_DECLARE(bool use_nop_wqi);
>   };
>   
>   int intel_guc_submission_init(struct intel_guc *guc);
> diff --git a/drivers/gpu/drm/i915/selftests/intel_guc.c b/drivers/gpu/drm/i915/selftests/intel_guc.c
> index 407c98fb9170..3154fd2f625d 100644
> --- a/drivers/gpu/drm/i915/selftests/intel_guc.c
> +++ b/drivers/gpu/drm/i915/selftests/intel_guc.c
> @@ -65,6 +65,40 @@ static int check_all_doorbells(struct intel_guc *guc)
>   	return 0;
>   }
>   
> +static int ring_doorbell_nop(struct intel_guc_client *client)
> +{
> +	int err;
> +	struct guc_process_desc *desc = __get_process_desc(client);
> +
> +	client->use_nop_wqi = true;
> +
> +	spin_lock_irq(&client->wq_lock);
> +
> +	guc_wq_item_append(client, 0, 0, 0, 0);
> +	guc_ring_doorbell(client);
> +
> +	spin_unlock_irq(&client->wq_lock);
> +
> +	client->use_nop_wqi = false;
> +
> +	/* if there are no issues GuC will update the WQ head and keep the
> +	 * WQ in active status
> +	 */
> +	err = wait_for(READ_ONCE(desc->head) == READ_ONCE(desc->tail), 10);
> +	if (err) {
> +		pr_err("doorbell %u ring failed!\n", client->doorbell_id);
> +		return -EIO;
> +	}
> +
> +	if (desc->wq_status != WQ_STATUS_ACTIVE) {
> +		pr_err("doorbell %u ring put WQ in bad state (%u)!\n",
> +		       client->doorbell_id, desc->wq_status);
> +		return -EIO;
> +	}
> +
> +	return 0;
> +}
> +
>   /*
>    * Basic client sanity check, handy to validate create_clients.
>    */
> @@ -332,6 +366,10 @@ static int igt_guc_doorbells(void *arg)
>   		err = check_all_doorbells(guc);
>   		if (err)
>   			goto out;
> +
> +		err = ring_doorbell_nop(clients[i]);
> +		if (err)
> +			goto out;
>   	}
>   
>   out:
> 

Reviewed-by: Michel Thierry <michel.thierry@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for drm/i915/selftests: ring all doorbells in igt_guc_doorbells
  2018-08-27 22:36 [PATCH] drm/i915/selftests: ring all doorbells in igt_guc_doorbells Daniele Ceraolo Spurio
                   ` (2 preceding siblings ...)
  2018-08-27 23:33 ` [PATCH] " Michel Thierry
@ 2018-08-28  0:25 ` Patchwork
  2018-08-28 12:34 ` [PATCH] " Katarzyna Dec
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-08-28  0:25 UTC (permalink / raw)
  To: Daniele Ceraolo Spurio; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: ring all doorbells in igt_guc_doorbells
URL   : https://patchwork.freedesktop.org/series/48768/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4712_full -> Patchwork_10023_full =

== Summary - SUCCESS ==

  No regressions found.

  

== Known issues ==

  Here are the changes found in Patchwork_10023_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665, fdo#106023)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      shard-apl:          PASS -> INCOMPLETE (fdo#103927)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_hangcheck:
      shard-kbl:          DMESG-FAIL (fdo#106947, fdo#106560) -> PASS

    {igt@gem_userptr_blits@readonly-unsync}:
      shard-apl:          INCOMPLETE (fdo#103927) -> PASS

    igt@kms_flip@flip-vs-expired-vblank:
      shard-glk:          FAIL (fdo#105363) -> PASS

    
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
  fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
  fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * Linux: CI_DRM_4712 -> Patchwork_10023

  CI_DRM_4712: 7b245f2b1e25677a1f2b63fd69003e35731cedda @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4610: c40743d3fce5055682d31610519758dd7379c0f8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10023: b370a2de90ed24f059085b7482f852e0efc0f1fd @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

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

* Re: [PATCH] drm/i915/selftests: ring all doorbells in igt_guc_doorbells
  2018-08-27 22:36 [PATCH] drm/i915/selftests: ring all doorbells in igt_guc_doorbells Daniele Ceraolo Spurio
                   ` (3 preceding siblings ...)
  2018-08-28  0:25 ` ✓ Fi.CI.IGT: success for " Patchwork
@ 2018-08-28 12:34 ` Katarzyna Dec
  2018-08-28 12:47   ` Chris Wilson
  2018-08-28 16:21   ` Daniele Ceraolo Spurio
  4 siblings, 2 replies; 9+ messages in thread
From: Katarzyna Dec @ 2018-08-28 12:34 UTC (permalink / raw)
  To: Daniele Ceraolo Spurio; +Cc: intel-gfx

On Mon, Aug 27, 2018 at 03:36:14PM -0700, Daniele Ceraolo Spurio wrote:
> We currently verify that all doorbells can be registerd with GuC and
> HW but don't check that all works as expected after a db ring.
> 
> Do a nop ring of all doorbells to make sure we haven't misprogrammed
> any WQ or stage descriptor data. This will also help validating
> upcoming changes in the db programming flow.
> 
> Cc: Michel Thierry <michel.thierry@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_guc_fwif.h       |  1 +
>  drivers/gpu/drm/i915/intel_guc_submission.c | 25 +++++++++-----
>  drivers/gpu/drm/i915/intel_guc_submission.h |  4 +++
>  drivers/gpu/drm/i915/selftests/intel_guc.c  | 38 +++++++++++++++++++++
>  4 files changed, 59 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_guc_fwif.h b/drivers/gpu/drm/i915/intel_guc_fwif.h
> index 1a0f2a39cef9..8382d591c784 100644
> --- a/drivers/gpu/drm/i915/intel_guc_fwif.h
> +++ b/drivers/gpu/drm/i915/intel_guc_fwif.h
> @@ -49,6 +49,7 @@
>  #define   WQ_TYPE_BATCH_BUF		(0x1 << WQ_TYPE_SHIFT)
>  #define   WQ_TYPE_PSEUDO		(0x2 << WQ_TYPE_SHIFT)
>  #define   WQ_TYPE_INORDER		(0x3 << WQ_TYPE_SHIFT)
> +#define   WQ_TYPE_NOOP			(0x4 << WQ_TYPE_SHIFT)

I got general question to this ^ defines. Do I correctly see that PSEUDO and BATCH_BUF are not
used anywhere?

>  #define WQ_TARGET_SHIFT			10
>  #define WQ_LEN_SHIFT			16
>  #define WQ_NO_WCFLUSH_WAIT		(1 << 27)
> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
> index 195adbd0ebf7..07b9d313b019 100644
> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> @@ -456,6 +456,9 @@ static void guc_wq_item_append(struct intel_guc_client *client,
>  	 */
>  	BUILD_BUG_ON(wqi_size != 16);
>  
> +	/* We expect the WQ to be active if we're appending items to it */
> +	GEM_BUG_ON(desc->wq_status != WQ_STATUS_ACTIVE);
> + 
>  	/* Free space is guaranteed. */
>  	wq_off = READ_ONCE(desc->tail);
>  	GEM_BUG_ON(CIRC_SPACE(wq_off, READ_ONCE(desc->head),
> @@ -465,15 +468,19 @@ static void guc_wq_item_append(struct intel_guc_client *client,
>  	/* WQ starts from the page after doorbell / process_desc */
>  	wqi = client->vaddr + wq_off + GUC_DB_SIZE;
>  
> -	/* Now fill in the 4-word work queue item */
> -	wqi->header = WQ_TYPE_INORDER |
> -		      (wqi_len << WQ_LEN_SHIFT) |
> -		      (target_engine << WQ_TARGET_SHIFT) |
> -		      WQ_NO_WCFLUSH_WAIT;
> -	wqi->context_desc = context_desc;
> -	wqi->submit_element_info = ring_tail << WQ_RING_TAIL_SHIFT;
> -	GEM_BUG_ON(ring_tail > WQ_RING_TAIL_MAX);
> -	wqi->fence_id = fence_id;
> +	if (I915_SELFTEST_ONLY(client->use_nop_wqi)) {
> +		wqi->header = WQ_TYPE_NOOP | (wqi_len << WQ_LEN_SHIFT);
> +	} else {
> +		/* Now fill in the 4-word work queue item */
> +		wqi->header = WQ_TYPE_INORDER |
> +			      (wqi_len << WQ_LEN_SHIFT) |
> +			      (target_engine << WQ_TARGET_SHIFT) |
> +			      WQ_NO_WCFLUSH_WAIT;
> +		wqi->context_desc = context_desc;
> +		wqi->submit_element_info = ring_tail << WQ_RING_TAIL_SHIFT;
> +		GEM_BUG_ON(ring_tail > WQ_RING_TAIL_MAX);
> +		wqi->fence_id = fence_id;
> +	}
>  
>  	/* Make the update visible to GuC */
>  	WRITE_ONCE(desc->tail, (wq_off + wqi_size) & (GUC_WQ_SIZE - 1));
> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.h b/drivers/gpu/drm/i915/intel_guc_submission.h
> index fb081cefef93..169c54568340 100644
> --- a/drivers/gpu/drm/i915/intel_guc_submission.h
> +++ b/drivers/gpu/drm/i915/intel_guc_submission.h
> @@ -28,6 +28,7 @@
>  #include <linux/spinlock.h>
>  
>  #include "i915_gem.h"
> +#include "i915_selftest.h"
>  
>  struct drm_i915_private;
>  
> @@ -71,6 +72,9 @@ struct intel_guc_client {
>  	spinlock_t wq_lock;
>  	/* Per-engine counts of GuC submissions */
>  	u64 submissions[I915_NUM_ENGINES];
> +
> +	/* For testing purposes, use nop WQ items instead of real ones */
> +	I915_SELFTEST_DECLARE(bool use_nop_wqi);
>  };
>  
>  int intel_guc_submission_init(struct intel_guc *guc);
> diff --git a/drivers/gpu/drm/i915/selftests/intel_guc.c b/drivers/gpu/drm/i915/selftests/intel_guc.c
> index 407c98fb9170..3154fd2f625d 100644
> --- a/drivers/gpu/drm/i915/selftests/intel_guc.c
> +++ b/drivers/gpu/drm/i915/selftests/intel_guc.c
> @@ -65,6 +65,40 @@ static int check_all_doorbells(struct intel_guc *guc)
>  	return 0;
>  }
>  
> +static int ring_doorbell_nop(struct intel_guc_client *client)
> +{
> +	int err;
> +	struct guc_process_desc *desc = __get_process_desc(client);
> +
> +	client->use_nop_wqi = true;
> +
> +	spin_lock_irq(&client->wq_lock);
> +
> +	guc_wq_item_append(client, 0, 0, 0, 0);
> +	guc_ring_doorbell(client);
> +
> +	spin_unlock_irq(&client->wq_lock);
> +
> +	client->use_nop_wqi = false;
> +
> +	/* if there are no issues GuC will update the WQ head and keep the
> +	 * WQ in active status
> +	 */
> +	err = wait_for(READ_ONCE(desc->head) == READ_ONCE(desc->tail), 10);
> +	if (err) {
> +		pr_err("doorbell %u ring failed!\n", client->doorbell_id);
> +		return -EIO;
> +	}
> +
> +	if (desc->wq_status != WQ_STATUS_ACTIVE) {
> +		pr_err("doorbell %u ring put WQ in bad state (%u)!\n",
> +		       client->doorbell_id, desc->wq_status);
> +		return -EIO;
> +	}
> +
> +	return 0;
> +}
> +
>  /*
>   * Basic client sanity check, handy to validate create_clients.
>   */
> @@ -332,6 +366,10 @@ static int igt_guc_doorbells(void *arg)
>  		err = check_all_doorbells(guc);
>  		if (err)
>  			goto out;
> +
> +		err = ring_doorbell_nop(clients[i]);
> +		if (err)
> +			goto out;
>  	}
>  
>  out:
> -- 
> 2.18.0
> 
Selftests are new topic for me, but this one looks fairly simple. I hope
I understand it correctly.
Acked-by: Katarzyna Dec <katarzyna.dec@intel.com>

> _______________________________________________
> 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] 9+ messages in thread

* Re: [PATCH] drm/i915/selftests: ring all doorbells in igt_guc_doorbells
  2018-08-28 12:34 ` [PATCH] " Katarzyna Dec
@ 2018-08-28 12:47   ` Chris Wilson
  2018-08-28 16:21   ` Daniele Ceraolo Spurio
  1 sibling, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2018-08-28 12:47 UTC (permalink / raw)
  To: Daniele Ceraolo Spurio, Katarzyna Dec; +Cc: intel-gfx

Quoting Katarzyna Dec (2018-08-28 13:34:16)
> On Mon, Aug 27, 2018 at 03:36:14PM -0700, Daniele Ceraolo Spurio wrote:
> > We currently verify that all doorbells can be registerd with GuC and
> > HW but don't check that all works as expected after a db ring.
> > 
> > Do a nop ring of all doorbells to make sure we haven't misprogrammed
> > any WQ or stage descriptor data. This will also help validating
> > upcoming changes in the db programming flow.
> > 
> > Cc: Michel Thierry <michel.thierry@intel.com>
> > Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
[snip]
> Selftests are new topic for me, but this one looks fairly simple. I hope
> I understand it correctly.
> Acked-by: Katarzyna Dec <katarzyna.dec@intel.com>

Fixed up the spelling mistake and pushed. Thanks for the review and more
testing,
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/selftests: ring all doorbells in igt_guc_doorbells
  2018-08-27 23:33 ` [PATCH] " Michel Thierry
@ 2018-08-28 16:16   ` Daniele Ceraolo Spurio
  0 siblings, 0 replies; 9+ messages in thread
From: Daniele Ceraolo Spurio @ 2018-08-28 16:16 UTC (permalink / raw)
  To: Michel Thierry, intel-gfx

<snip>


>> @@ -465,15 +468,19 @@ static void guc_wq_item_append(struct 
>> intel_guc_client *client,
>>       /* WQ starts from the page after doorbell / process_desc */
>>       wqi = client->vaddr + wq_off + GUC_DB_SIZE;
>> -    /* Now fill in the 4-word work queue item */
>> -    wqi->header = WQ_TYPE_INORDER |
>> -              (wqi_len << WQ_LEN_SHIFT) |
>> -              (target_engine << WQ_TARGET_SHIFT) |
>> -              WQ_NO_WCFLUSH_WAIT;
>> -    wqi->context_desc = context_desc;
>> -    wqi->submit_element_info = ring_tail << WQ_RING_TAIL_SHIFT;
>> -    GEM_BUG_ON(ring_tail > WQ_RING_TAIL_MAX);
>> -    wqi->fence_id = fence_id;
>> +    if (I915_SELFTEST_ONLY(client->use_nop_wqi)) {
>> +        wqi->header = WQ_TYPE_NOOP | (wqi_len << WQ_LEN_SHIFT);
> Note to self, this is WQ_NOOP + three u32 with 0's
> 

Actually we don't care what's in the 3 u32 following the header. When 
WQ_TYPE_NOOP is used GuC will just bump the WQ head based on the 
provided length and then move to the next request, so it is going to 
jump over them.

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

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

* Re: [PATCH] drm/i915/selftests: ring all doorbells in igt_guc_doorbells
  2018-08-28 12:34 ` [PATCH] " Katarzyna Dec
  2018-08-28 12:47   ` Chris Wilson
@ 2018-08-28 16:21   ` Daniele Ceraolo Spurio
  1 sibling, 0 replies; 9+ messages in thread
From: Daniele Ceraolo Spurio @ 2018-08-28 16:21 UTC (permalink / raw)
  To: Katarzyna Dec; +Cc: intel-gfx

<snip>


>> diff --git a/drivers/gpu/drm/i915/intel_guc_fwif.h b/drivers/gpu/drm/i915/intel_guc_fwif.h
>> index 1a0f2a39cef9..8382d591c784 100644
>> --- a/drivers/gpu/drm/i915/intel_guc_fwif.h
>> +++ b/drivers/gpu/drm/i915/intel_guc_fwif.h
>> @@ -49,6 +49,7 @@
>>   #define   WQ_TYPE_BATCH_BUF		(0x1 << WQ_TYPE_SHIFT)
>>   #define   WQ_TYPE_PSEUDO		(0x2 << WQ_TYPE_SHIFT)
>>   #define   WQ_TYPE_INORDER		(0x3 << WQ_TYPE_SHIFT)
>> +#define   WQ_TYPE_NOOP			(0x4 << WQ_TYPE_SHIFT)
> 
> I got general question to this ^ defines. Do I correctly see that PSEUDO and BATCH_BUF are not
> used anywhere?
> 

Yes they're unused. I'm assuming when the FW support was first added to 
i915 we just defined all the cases available in the FW at the time, even 
if we didn't actually use them. Personally I think it is worth keeping 
them as having only part of the modes defined would be less clear IMO.

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

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

end of thread, other threads:[~2018-08-28 16:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-27 22:36 [PATCH] drm/i915/selftests: ring all doorbells in igt_guc_doorbells Daniele Ceraolo Spurio
2018-08-27 22:57 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-08-27 23:15 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-27 23:33 ` [PATCH] " Michel Thierry
2018-08-28 16:16   ` Daniele Ceraolo Spurio
2018-08-28  0:25 ` ✓ Fi.CI.IGT: success for " Patchwork
2018-08-28 12:34 ` [PATCH] " Katarzyna Dec
2018-08-28 12:47   ` Chris Wilson
2018-08-28 16:21   ` Daniele Ceraolo Spurio

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.