All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6
@ 2019-12-03  8:53 Andi Shyti
  2019-12-03  9:25 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/selftests: add basic selftests for rc6 (rev3) Patchwork
  2019-12-03 11:01 ` [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6 Chris Wilson
  0 siblings, 2 replies; 6+ messages in thread
From: Andi Shyti @ 2019-12-03  8:53 UTC (permalink / raw)
  To: Intel GFX

Add three basic tests for rc6 power status:

1. live_rc6_basic - simply checks if rc6 works when it's enabled
   or stops when it's disabled.

2. live_rc6_threshold - rc6 should not work when the evaluation
   interval is less than the threshold and should work otherwise.

3. live_rc6_busy - keeps the gpu busy and then goes in idle;
   checks that we don't fall in rc6 when busy and that we do fall
   in rc6 when idling.

The three tests are added as sutest of the bigger live_late_gt_pm
selftest.

The basic rc6 functionality is tested by checking the reference
counter within the evaluation interval.

Signed-off-by: Andi Shyti <andi.shyti@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
Hi,

this is the first patche from the pm selftest series. Now it's
rebased on top of drm-tip.

Changelog:
* v1 -> v2:
	- some changes from Chris (thank you!).
* v2 -> v3:
	- rebased on top of the latest drm-tip
	- fixed exiting order in rc6_basic to avoid exiting
	  without releasing the pm reference

Andi

 drivers/gpu/drm/i915/gt/selftest_gt_pm.c |   3 +
 drivers/gpu/drm/i915/gt/selftest_rc6.c   | 190 +++++++++++++++++++++++
 drivers/gpu/drm/i915/gt/selftest_rc6.h   |   3 +
 3 files changed, 196 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/selftest_gt_pm.c b/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
index 09ff8e4f88af..84d1a58cfa28 100644
--- a/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
+++ b/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
@@ -51,6 +51,9 @@ static int live_gt_resume(void *arg)
 int intel_gt_pm_live_selftests(struct drm_i915_private *i915)
 {
 	static const struct i915_subtest tests[] = {
+		SUBTEST(live_rc6_basic),
+		SUBTEST(live_rc6_threshold),
+		SUBTEST(live_rc6_busy),
 		SUBTEST(live_rc6_manual),
 		SUBTEST(live_gt_resume),
 	};
diff --git a/drivers/gpu/drm/i915/gt/selftest_rc6.c b/drivers/gpu/drm/i915/gt/selftest_rc6.c
index f8b7691be4d1..935e721f5479 100644
--- a/drivers/gpu/drm/i915/gt/selftest_rc6.c
+++ b/drivers/gpu/drm/i915/gt/selftest_rc6.c
@@ -11,6 +11,7 @@
 #include "selftest_rc6.h"
 
 #include "selftests/i915_random.h"
+#include "selftests/igt_spinner.h"
 
 int live_rc6_manual(void *arg)
 {
@@ -202,3 +203,192 @@ int live_rc6_ctx_wa(void *arg)
 	kfree(engines);
 	return err;
 }
+
+static bool test_rc6(struct intel_rc6 *rc6, bool enabled)
+{
+	struct intel_uncore *uncore = rc6_to_uncore(rc6);
+	intel_wakeref_t wakeref;
+	u32 ec1, ec2;
+	u32 interval;
+
+	wakeref = intel_runtime_pm_get(uncore->rpm);
+
+	interval = intel_uncore_read(uncore, GEN6_RC_EVALUATION_INTERVAL);
+
+	/*
+	 * the interval is stored in steps of 1.28us
+	 */
+	interval = div_u64(mul_u32_u32(interval, 128),
+			   100 * 1000); /* => miliseconds */
+
+	ec1 = intel_uncore_read(uncore, GEN6_GT_GFX_RC6);
+
+	/*
+	 * It's not important to precisely wait the interval time.
+	 * I'll wait at least twice the time in order to be sure
+	 * that the counting happens in the reference counter.
+	 */
+	msleep(2 * interval);
+
+	ec2 = intel_uncore_read(uncore, GEN6_GT_GFX_RC6);
+
+	intel_runtime_pm_put(uncore->rpm, wakeref);
+
+	return enabled != (ec1 >= ec2);
+}
+
+int live_rc6_basic(void *arg)
+{
+	struct intel_gt *gt = arg;
+	struct intel_rc6 *rc6 = &gt->rc6;
+	intel_wakeref_t wakeref;
+	int i, err = 0;
+
+	if (!rc6->supported)
+		return 0;
+
+	wakeref = intel_runtime_pm_get(gt->uncore->rpm);
+
+	/*
+	 * the two loops test rc6 both in case it's enabled
+	 * and in the case it's disabled. It restores the prvious
+	 * status
+	 */
+	for (i = 0; i < 2; i++) {
+		if (!test_rc6(rc6, rc6->enabled)) {
+			err = -EINVAL;
+
+			/* restore before leaving */
+			if (!i)
+				goto exit;
+		}
+
+		if (rc6->enabled)
+			intel_rc6_disable(&gt->rc6);
+		else
+			intel_rc6_enable(&gt->rc6);
+	}
+
+exit:
+	intel_runtime_pm_put(gt->uncore->rpm, wakeref);
+	return err;
+}
+
+int live_rc6_threshold(void *arg)
+{
+	struct intel_gt *gt = arg;
+	struct intel_uncore *uncore = gt->uncore;
+	struct intel_rc6 *rc6 = &gt->rc6;
+	intel_wakeref_t wakeref;
+	u32 threshold, interval;
+	u32 t_orig, i_orig;
+	int err = 0;
+
+	if (!rc6->supported)
+		return 0;
+
+	wakeref = intel_runtime_pm_get(uncore->rpm);
+
+	t_orig = intel_uncore_read(uncore, GEN6_RC6_THRESHOLD);
+	i_orig = intel_uncore_read(uncore, GEN6_RC_EVALUATION_INTERVAL);
+
+	/*
+	 * set the threshold to 50ms
+	 *
+	 * 50ms * 1000 = 50000us
+	 * 50000 / (1.28 * 100) / 100 (we don't have floating point)
+	 */
+	threshold = 50 * 1000 / 128 * 100;
+	intel_uncore_write(uncore, GEN6_RC6_THRESHOLD, threshold);
+
+	/* set interval indicatively to half the threshold */
+	interval = threshold / 2;
+	intel_uncore_write(uncore, GEN6_RC_EVALUATION_INTERVAL, interval);
+
+	/* interval < threshold */
+	if (!test_rc6(rc6, true)) {
+		pr_err("i915 mismatch: rc6 with interval < threshold\n");
+		err = -EINVAL;
+	}
+
+	/* set interval indicatively to twice the threshold */
+	interval = threshold * 2;
+	intel_uncore_write(uncore, GEN6_RC_EVALUATION_INTERVAL, interval);
+
+	/* interval > threshold */
+	if (!test_rc6(rc6, false)) {
+		pr_err("i915 mismatch: not in rc6 with interval > threshold\n");
+		err = -EINVAL;
+	}
+
+	intel_uncore_write(uncore, GEN6_RC6_THRESHOLD, t_orig);
+	intel_uncore_write(uncore, GEN6_RC_EVALUATION_INTERVAL, i_orig);
+	intel_runtime_pm_put(uncore->rpm, wakeref);
+
+	return err;
+}
+
+int live_rc6_busy(void *arg)
+{
+	struct intel_gt *gt = arg;
+	struct intel_rc6 *rc6 = &gt->rc6;
+	struct intel_engine_cs *engine;
+	struct igt_spinner spin;
+	intel_wakeref_t wakeref;
+	enum intel_engine_id id;
+	int err;
+
+	if (!rc6->supported)
+		return 0;
+
+	err = igt_spinner_init(&spin, gt);
+	if (err)
+		return err;
+
+	wakeref = intel_runtime_pm_get(gt->uncore->rpm);
+	for_each_engine(engine, gt, id) {
+		struct i915_request *rq;
+
+		rq = igt_spinner_create_request(&spin,
+						engine->kernel_context,
+						MI_NOOP);
+		if (IS_ERR(rq)) {
+			err = PTR_ERR(rq);
+			break;
+		}
+
+		i915_request_get(rq);
+		i915_request_add(rq);
+
+		igt_wait_for_spinner(&spin, rq); /* it's enough waiting */
+
+		/* gpu is busy, we shouldn't be in rc6 */
+		if (!test_rc6(rc6, false)) {
+			pr_err("%s: never busy enough for having a nap\n",
+			       engine->name);
+			err = -EINVAL;
+		}
+
+		igt_spinner_end(&spin);
+		if (i915_request_wait(rq, 0, HZ / 5) < 0)
+			err = -ETIME;
+		i915_request_put(rq);
+		if (err)
+			break;
+
+		intel_gt_wait_for_idle(gt, HZ / 5);
+		intel_gt_pm_wait_for_idle(gt);
+
+		/* gpu is busy, we should be in rc6 */
+		if (!test_rc6(rc6, true)) {
+			pr_err("%s is idle but doesn't go in rc6\n",
+			       engine->name);
+			err = -EINVAL;
+			break;
+		}
+	}
+	intel_runtime_pm_put(gt->uncore->rpm, wakeref);
+
+	igt_spinner_fini(&spin);
+	return err;
+}
diff --git a/drivers/gpu/drm/i915/gt/selftest_rc6.h b/drivers/gpu/drm/i915/gt/selftest_rc6.h
index 762fd442d7b2..b924d2e5cb43 100644
--- a/drivers/gpu/drm/i915/gt/selftest_rc6.h
+++ b/drivers/gpu/drm/i915/gt/selftest_rc6.h
@@ -7,6 +7,9 @@
 #ifndef SELFTEST_RC6_H
 #define SELFTEST_RC6_H
 
+int live_rc6_basic(void *arg);
+int live_rc6_threshold(void *arg);
+int live_rc6_busy(void *arg);
 int live_rc6_ctx_wa(void *arg);
 int live_rc6_manual(void *arg);
 
-- 
2.24.0

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

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

* [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/selftests: add basic selftests for rc6 (rev3)
  2019-12-03  8:53 [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6 Andi Shyti
@ 2019-12-03  9:25 ` Patchwork
  2019-12-03 11:01 ` [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6 Chris Wilson
  1 sibling, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-12-03  9:25 UTC (permalink / raw)
  To: Andi Shyti; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: add basic selftests for rc6 (rev3)
URL   : https://patchwork.freedesktop.org/series/69825/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7467 -> Patchwork_15552
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_15552 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_15552, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/index.html

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

  * igt@i915_selftest@live_gt_pm:
    - fi-icl-u2:          [PASS][1] -> [DMESG-FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-icl-u2/igt@i915_selftest@live_gt_pm.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-icl-u2/igt@i915_selftest@live_gt_pm.html
    - fi-kbl-7500u:       [PASS][3] -> [DMESG-FAIL][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-7500u/igt@i915_selftest@live_gt_pm.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-7500u/igt@i915_selftest@live_gt_pm.html
    - fi-icl-u3:          [PASS][5] -> [DMESG-FAIL][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-icl-u3/igt@i915_selftest@live_gt_pm.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-icl-u3/igt@i915_selftest@live_gt_pm.html
    - fi-glk-dsi:         [PASS][7] -> [DMESG-FAIL][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-glk-dsi/igt@i915_selftest@live_gt_pm.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-glk-dsi/igt@i915_selftest@live_gt_pm.html
    - fi-hsw-peppy:       [PASS][9] -> [DMESG-FAIL][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-hsw-peppy/igt@i915_selftest@live_gt_pm.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-hsw-peppy/igt@i915_selftest@live_gt_pm.html
    - fi-ivb-3770:        [PASS][11] -> [DMESG-FAIL][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-ivb-3770/igt@i915_selftest@live_gt_pm.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-ivb-3770/igt@i915_selftest@live_gt_pm.html
    - fi-skl-6700k2:      [PASS][13] -> [DMESG-FAIL][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-skl-6700k2/igt@i915_selftest@live_gt_pm.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-6700k2/igt@i915_selftest@live_gt_pm.html
    - fi-bsw-n3050:       [PASS][15] -> [DMESG-FAIL][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-bsw-n3050/igt@i915_selftest@live_gt_pm.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-bsw-n3050/igt@i915_selftest@live_gt_pm.html
    - fi-kbl-soraka:      [PASS][17] -> [DMESG-FAIL][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-soraka/igt@i915_selftest@live_gt_pm.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-soraka/igt@i915_selftest@live_gt_pm.html
    - fi-whl-u:           [PASS][19] -> [DMESG-FAIL][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-whl-u/igt@i915_selftest@live_gt_pm.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-whl-u/igt@i915_selftest@live_gt_pm.html
    - fi-cfl-guc:         [PASS][21] -> [DMESG-FAIL][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-cfl-guc/igt@i915_selftest@live_gt_pm.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-cfl-guc/igt@i915_selftest@live_gt_pm.html
    - fi-hsw-4770:        [PASS][23] -> [DMESG-FAIL][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-hsw-4770/igt@i915_selftest@live_gt_pm.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-hsw-4770/igt@i915_selftest@live_gt_pm.html
    - fi-bxt-dsi:         [PASS][25] -> [DMESG-FAIL][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-bxt-dsi/igt@i915_selftest@live_gt_pm.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-bxt-dsi/igt@i915_selftest@live_gt_pm.html
    - fi-skl-6600u:       [PASS][27] -> [DMESG-FAIL][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-skl-6600u/igt@i915_selftest@live_gt_pm.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-6600u/igt@i915_selftest@live_gt_pm.html
    - fi-cml-u2:          [PASS][29] -> [DMESG-FAIL][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-cml-u2/igt@i915_selftest@live_gt_pm.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-cml-u2/igt@i915_selftest@live_gt_pm.html
    - fi-icl-dsi:         [PASS][31] -> [DMESG-FAIL][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-icl-dsi/igt@i915_selftest@live_gt_pm.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-icl-dsi/igt@i915_selftest@live_gt_pm.html
    - fi-apl-guc:         [PASS][33] -> [DMESG-FAIL][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-apl-guc/igt@i915_selftest@live_gt_pm.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-apl-guc/igt@i915_selftest@live_gt_pm.html
    - fi-kbl-8809g:       [PASS][35] -> [DMESG-FAIL][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-8809g/igt@i915_selftest@live_gt_pm.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-8809g/igt@i915_selftest@live_gt_pm.html
    - fi-cfl-8700k:       [PASS][37] -> [DMESG-FAIL][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-cfl-8700k/igt@i915_selftest@live_gt_pm.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-cfl-8700k/igt@i915_selftest@live_gt_pm.html
    - fi-kbl-r:           [PASS][39] -> [DMESG-FAIL][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-r/igt@i915_selftest@live_gt_pm.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-r/igt@i915_selftest@live_gt_pm.html
    - fi-byt-j1900:       [PASS][41] -> [DMESG-FAIL][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-byt-j1900/igt@i915_selftest@live_gt_pm.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-byt-j1900/igt@i915_selftest@live_gt_pm.html
    - fi-bsw-nick:        [PASS][43] -> [DMESG-FAIL][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-bsw-nick/igt@i915_selftest@live_gt_pm.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-bsw-nick/igt@i915_selftest@live_gt_pm.html
    - fi-icl-y:           [PASS][45] -> [DMESG-FAIL][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-icl-y/igt@i915_selftest@live_gt_pm.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-icl-y/igt@i915_selftest@live_gt_pm.html
    - fi-kbl-x1275:       NOTRUN -> [DMESG-FAIL][47]
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-x1275/igt@i915_selftest@live_gt_pm.html
    - fi-kbl-guc:         [PASS][48] -> [DMESG-FAIL][49]
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-guc/igt@i915_selftest@live_gt_pm.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-guc/igt@i915_selftest@live_gt_pm.html
    - fi-skl-guc:         [PASS][50] -> [DMESG-FAIL][51]
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-skl-guc/igt@i915_selftest@live_gt_pm.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-guc/igt@i915_selftest@live_gt_pm.html
    - fi-bdw-5557u:       [PASS][52] -> [DMESG-FAIL][53]
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-bdw-5557u/igt@i915_selftest@live_gt_pm.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-bdw-5557u/igt@i915_selftest@live_gt_pm.html
    - fi-snb-2600:        [PASS][54] -> [DMESG-FAIL][55]
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-snb-2600/igt@i915_selftest@live_gt_pm.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-snb-2600/igt@i915_selftest@live_gt_pm.html
    - fi-bsw-kefka:       [PASS][56] -> [DMESG-FAIL][57]
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-bsw-kefka/igt@i915_selftest@live_gt_pm.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-bsw-kefka/igt@i915_selftest@live_gt_pm.html
    - fi-hsw-4770r:       [PASS][58] -> [DMESG-FAIL][59]
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-hsw-4770r/igt@i915_selftest@live_gt_pm.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-hsw-4770r/igt@i915_selftest@live_gt_pm.html
    - fi-byt-n2820:       [PASS][60] -> [DMESG-FAIL][61]
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-byt-n2820/igt@i915_selftest@live_gt_pm.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-byt-n2820/igt@i915_selftest@live_gt_pm.html
    - fi-skl-lmem:        [PASS][62] -> [DMESG-FAIL][63]
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-skl-lmem/igt@i915_selftest@live_gt_pm.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-lmem/igt@i915_selftest@live_gt_pm.html
    - fi-skl-6770hq:      NOTRUN -> [DMESG-FAIL][64]
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-6770hq/igt@i915_selftest@live_gt_pm.html
    - fi-snb-2520m:       [PASS][65] -> [DMESG-FAIL][66]
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-snb-2520m/igt@i915_selftest@live_gt_pm.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-snb-2520m/igt@i915_selftest@live_gt_pm.html

  
#### Warnings ####

  * igt@i915_selftest@live_gt_pm:
    - fi-icl-guc:         [DMESG-FAIL][67] ([i915#571]) -> [DMESG-FAIL][68]
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-icl-guc/igt@i915_selftest@live_gt_pm.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-icl-guc/igt@i915_selftest@live_gt_pm.html

  
Known issues
------------

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [PASS][69] -> [FAIL][70] ([fdo#111096] / [i915#323])
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  
#### Possible fixes ####

  * igt@i915_pm_rpm@module-reload:
    - fi-skl-6770hq:      [DMESG-WARN][71] ([i915#592]) -> [PASS][72]
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html

  * igt@i915_selftest@live_blt:
    - fi-ivb-3770:        [DMESG-FAIL][73] ([i915#563]) -> [PASS][74]
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-ivb-3770/igt@i915_selftest@live_blt.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-ivb-3770/igt@i915_selftest@live_blt.html
    - fi-hsw-4770:        [DMESG-FAIL][75] ([i915#563]) -> [PASS][76]
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-hsw-4770/igt@i915_selftest@live_blt.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-hsw-4770/igt@i915_selftest@live_blt.html

  * igt@i915_selftest@live_gem_contexts:
    - fi-skl-lmem:        [INCOMPLETE][77] ([i915#424]) -> [PASS][78]
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-skl-lmem/igt@i915_selftest@live_gem_contexts.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-skl-lmem/igt@i915_selftest@live_gem_contexts.html
    - fi-hsw-peppy:       [DMESG-FAIL][79] ([fdo#111692]) -> [PASS][80]
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-guc:         [FAIL][81] ([i915#49]) -> [PASS][82]
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-icl-guc/igt@kms_frontbuffer_tracking@basic.html
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-icl-guc/igt@kms_frontbuffer_tracking@basic.html

  
#### Warnings ####

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - fi-kbl-x1275:       [DMESG-WARN][83] ([i915#62] / [i915#92]) -> [DMESG-WARN][84] ([i915#62] / [i915#92] / [i915#95]) +6 similar issues
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_flip@basic-flip-vs-modeset:
    - fi-kbl-x1275:       [DMESG-WARN][85] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][86] ([i915#62] / [i915#92]) +7 similar issues
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7467/fi-kbl-x1275/igt@kms_flip@basic-flip-vs-modeset.html
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15552/fi-kbl-x1275/igt@kms_flip@basic-flip-vs-modeset.html

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

  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
  [fdo#111692]: https://bugs.freedesktop.org/show_bug.cgi?id=111692
  [i915#109]: https://gitlab.freedesktop.org/drm/intel/issues/109
  [i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
  [i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424
  [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
  [i915#563]: https://gitlab.freedesktop.org/drm/intel/issues/563
  [i915#571]: https://gitlab.freedesktop.org/drm/intel/issues/571
  [i915#592]: https://gitlab.freedesktop.org/drm/intel/issues/592
  [i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
  [i915#710]: https://gitlab.freedesktop.org/drm/intel/issues/710
  [i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (50 -> 45)
------------------------------

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


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7467 -> Patchwork_15552

  CI-20190529: 20190529
  CI_DRM_7467: 14954f24e7251b067b2081aaa09a7da6840da0d5 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5321: 9df50aef49e0da4413609d9866b41b82b725f2a0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_15552: cad39e5dd244fb05ce050cbf6cf0ee84bc4e39cd @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

cad39e5dd244 drm/i915/selftests: add basic selftests for rc6

== Logs ==

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

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

* Re: [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6
  2019-12-03  8:53 [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6 Andi Shyti
  2019-12-03  9:25 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/selftests: add basic selftests for rc6 (rev3) Patchwork
@ 2019-12-03 11:01 ` Chris Wilson
  2019-12-03 11:54   ` Andi Shyti
  1 sibling, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2019-12-03 11:01 UTC (permalink / raw)
  To: Andi Shyti, Intel GFX

Quoting Andi Shyti (2019-12-03 08:53:12)
> Add three basic tests for rc6 power status:
> 
> 1. live_rc6_basic - simply checks if rc6 works when it's enabled
>    or stops when it's disabled.
> 
> 2. live_rc6_threshold - rc6 should not work when the evaluation
>    interval is less than the threshold and should work otherwise.
> 
> 3. live_rc6_busy - keeps the gpu busy and then goes in idle;
>    checks that we don't fall in rc6 when busy and that we do fall
>    in rc6 when idling.
> 
> The three tests are added as sutest of the bigger live_late_gt_pm
> selftest.
> 
> The basic rc6 functionality is tested by checking the reference
> counter within the evaluation interval.
> 
> Signed-off-by: Andi Shyti <andi.shyti@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> Hi,
> 
> this is the first patche from the pm selftest series. Now it's
> rebased on top of drm-tip.
> 
> Changelog:
> * v1 -> v2:
>         - some changes from Chris (thank you!).
> * v2 -> v3:
>         - rebased on top of the latest drm-tip
>         - fixed exiting order in rc6_basic to avoid exiting
>           without releasing the pm reference
> 
> Andi
> 
>  drivers/gpu/drm/i915/gt/selftest_gt_pm.c |   3 +
>  drivers/gpu/drm/i915/gt/selftest_rc6.c   | 190 +++++++++++++++++++++++
>  drivers/gpu/drm/i915/gt/selftest_rc6.h   |   3 +
>  3 files changed, 196 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gt/selftest_gt_pm.c b/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
> index 09ff8e4f88af..84d1a58cfa28 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
> @@ -51,6 +51,9 @@ static int live_gt_resume(void *arg)
>  int intel_gt_pm_live_selftests(struct drm_i915_private *i915)
>  {
>         static const struct i915_subtest tests[] = {
> +               SUBTEST(live_rc6_basic),
> +               SUBTEST(live_rc6_threshold),
> +               SUBTEST(live_rc6_busy),
>                 SUBTEST(live_rc6_manual),
>                 SUBTEST(live_gt_resume),
>         };
> diff --git a/drivers/gpu/drm/i915/gt/selftest_rc6.c b/drivers/gpu/drm/i915/gt/selftest_rc6.c
> index f8b7691be4d1..935e721f5479 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_rc6.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_rc6.c
> @@ -11,6 +11,7 @@
>  #include "selftest_rc6.h"
>  
>  #include "selftests/i915_random.h"
> +#include "selftests/igt_spinner.h"
>  
>  int live_rc6_manual(void *arg)
>  {
> @@ -202,3 +203,192 @@ int live_rc6_ctx_wa(void *arg)
>         kfree(engines);
>         return err;
>  }
> +
> +static bool test_rc6(struct intel_rc6 *rc6, bool enabled)

I keep getting confused as to the meaning of the result, forgetting it
changes based on bool enabled.

Maybe u32 measure_rc6() and leave the pass/fail to the caller?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6
  2019-12-03 11:01 ` [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6 Chris Wilson
@ 2019-12-03 11:54   ` Andi Shyti
  2019-12-03 12:32     ` Andi Shyti
  0 siblings, 1 reply; 6+ messages in thread
From: Andi Shyti @ 2019-12-03 11:54 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Intel GFX

Hi Chris,

> >  }
> > +
> > +static bool test_rc6(struct intel_rc6 *rc6, bool enabled)
> 
> I keep getting confused as to the meaning of the result, forgetting it
> changes based on bool enabled.
> 
> Maybe u32 measure_rc6() and leave the pass/fail to the caller?

yes, I was thinking the same, it makes, indeed more sense.

The original idea was just to know whether rc6 works or not.

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

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

* Re: [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6
  2019-12-03 11:54   ` Andi Shyti
@ 2019-12-03 12:32     ` Andi Shyti
  2019-12-03 12:41       ` Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Andi Shyti @ 2019-12-03 12:32 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Intel GFX

> > >  }
> > > +
> > > +static bool test_rc6(struct intel_rc6 *rc6, bool enabled)
> > 
> > I keep getting confused as to the meaning of the result, forgetting it
> > changes based on bool enabled.
> > 
> > Maybe u32 measure_rc6() and leave the pass/fail to the caller?

thinking a bit better... what exactly would I return? what would
measure_rc6 measure? The "sleeping" function is not precise by
definition (as you pointed out as well) and it would be out from
the scope of this function to provide an exact measure of the
interval count.

The way I would rather do it would be:

u32 measure_rc6(u32 time_in_ms)
{
	...
}

bool test_rc6(bool enable)
{
	...
	return enable ^ does_rc6_work(2 * interval);
}

where measure_rc6 provides the counter in a more precise time
range and can be also used for other tests, like hysteresis or
duty cycle tests where I guess time measurement is more critical.

But as for now such function wouldn't be of any use. I could
eventually call 'test_rc6' in a more intuitive way, like
'is_rc6_enabled()'.

Andi

> yes, I was thinking the same, it makes, indeed more sense.
> 
> The original idea was just to know whether rc6 works or not.
> 
> Thanks,
> Andi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6
  2019-12-03 12:32     ` Andi Shyti
@ 2019-12-03 12:41       ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2019-12-03 12:41 UTC (permalink / raw)
  To: Andi Shyti; +Cc: Intel GFX

Quoting Andi Shyti (2019-12-03 12:32:24)
> > > >  }
> > > > +
> > > > +static bool test_rc6(struct intel_rc6 *rc6, bool enabled)
> > > 
> > > I keep getting confused as to the meaning of the result, forgetting it
> > > changes based on bool enabled.
> > > 
> > > Maybe u32 measure_rc6() and leave the pass/fail to the caller?
> 
> thinking a bit better... what exactly would I return? what would
> measure_rc6 measure? The "sleeping" function is not precise by
> definition (as you pointed out as well) and it would be out from
> the scope of this function to provide an exact measure of the
> interval count.
> 
> The way I would rather do it would be:
> 
> u32 measure_rc6(u32 time_in_ms)
> {
>         ...
> }
> 
> bool test_rc6(bool enable)
> {
>         ...
>         return enable ^ does_rc6_work(2 * interval);
> }
> 
> where measure_rc6 provides the counter in a more precise time
> range and can be also used for other tests, like hysteresis or
> duty cycle tests where I guess time measurement is more critical.

That's how I thought it would look since for the first test,
test_rc6(rc6->enabled) makes sense. But I would like to know the values
of EI, THRESHOLD, slept and measured rc6 to understand failures better.

And when we do get better understanding, the next wave of tests I expect
will be more than simple booleans, but did we get x rc6 cycles. (That
depends on much we keep scratching at the rc6 powersaving surface :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2019-12-03 12:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-03  8:53 [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6 Andi Shyti
2019-12-03  9:25 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/selftests: add basic selftests for rc6 (rev3) Patchwork
2019-12-03 11:01 ` [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6 Chris Wilson
2019-12-03 11:54   ` Andi Shyti
2019-12-03 12:32     ` Andi Shyti
2019-12-03 12:41       ` Chris Wilson

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.