All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate
@ 2018-08-29 22:20 Chris Wilson
  2018-08-29 23:01 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (11 more replies)
  0 siblings, 12 replies; 19+ messages in thread
From: Chris Wilson @ 2018-08-29 22:20 UTC (permalink / raw)
  To: intel-gfx

Although we cannot do a full system-level test of suspend/hibernate from
deep with the kernel selftests, we can exercise the GEM subsystem in
isolation and simulate the external effects (such as losing stolen
contents and trashing the register state).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jakub Bartmiński <jakub.bartminski@intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c               |   1 +
 drivers/gpu/drm/i915/selftests/i915_gem.c     | 173 ++++++++++++++++++
 .../drm/i915/selftests/i915_live_selftests.h  |   1 +
 3 files changed, 175 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/selftests/i915_gem.c

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0453eb42a1a3..7b7bbfe59697 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -6207,4 +6207,5 @@ int i915_gem_object_attach_phys(struct drm_i915_gem_object *obj, int align)
 #include "selftests/huge_pages.c"
 #include "selftests/i915_gem_object.c"
 #include "selftests/i915_gem_coherency.c"
+#include "selftests/i915_gem.c"
 #endif
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c b/drivers/gpu/drm/i915/selftests/i915_gem.c
new file mode 100644
index 000000000000..1714643474d5
--- /dev/null
+++ b/drivers/gpu/drm/i915/selftests/i915_gem.c
@@ -0,0 +1,173 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright © 2018 Intel Corporation
+ */
+
+#include <linux/random.h>
+
+#include "../i915_selftest.h"
+
+#include "mock_context.h"
+#include "igt_flush_test.h"
+
+static int switch_to_context(struct drm_i915_private *i915,
+			     struct i915_gem_context *ctx)
+{
+	struct intel_engine_cs *engine;
+	enum intel_engine_id id;
+	int err = 0;
+
+	for_each_engine(engine, i915, id) {
+		struct i915_request *rq;
+
+		rq = i915_request_alloc(engine, ctx);
+		if (IS_ERR(rq)) {
+			err = PTR_ERR(rq);
+			break;
+		}
+
+		i915_request_add(rq);
+	}
+
+	return err;
+}
+
+static void trash_stolen(struct drm_i915_private *i915)
+{
+	struct i915_ggtt *ggtt = &i915->ggtt;
+	const u64 slot = ggtt->error_capture.start;
+	const resource_size_t size = resource_size(&i915->dsm);
+	unsigned long page;
+	u32 prng = 0x12345678;
+
+	for (page = 0; page < size; page += PAGE_SIZE) {
+		const dma_addr_t dma = i915->dsm.start + page;
+		u32 __iomem *s;
+		int x;
+
+		ggtt->vm.insert_page(&ggtt->vm, dma, slot, I915_CACHE_NONE, 0);
+
+		s = io_mapping_map_atomic_wc(&ggtt->iomap, slot);
+		for (x = 0; x < PAGE_SIZE/sizeof(u32); x++)
+			s[x] = prng = next_pseudo_random32(prng);
+		io_mapping_unmap_atomic(s);
+	}
+
+	ggtt->vm.clear_range(&ggtt->vm, slot, PAGE_SIZE);
+}
+
+static void simulate_hibernate(struct drm_i915_private *i915)
+{
+	/*
+	 * As a final sting in the tail, invalidate stolen. Under a real S4,
+	 * stolen is lost and needs to be refilled on resume. However, under
+	 * CI we merely do S4-device testing (as full S4 is too unreliable
+	 * for automated testing across a cluster), so to simulate the effect
+	 * of stolen being trashed across S4, we trash it ourselves.
+	 */
+	trash_stolen(i915);
+}
+
+static int igt_gem_suspend(void *arg)
+{
+	struct drm_i915_private *i915 = arg;
+	struct i915_gem_context *ctx;
+	struct drm_file *file;
+	int err;
+
+	file = mock_file(i915);
+	if (IS_ERR(file))
+		return PTR_ERR(file);
+
+	err = -ENOMEM;
+	mutex_lock(&i915->drm.struct_mutex);
+	ctx = live_context(i915, file);
+	if (!IS_ERR(ctx))
+		err = switch_to_context(i915, ctx);
+	mutex_unlock(&i915->drm.struct_mutex);
+	if (err)
+		goto out;
+
+	if (i915_gem_suspend(i915)) {
+		pr_err("i915_gem_suspend failed\n");
+		err = -EINVAL;
+		goto out;
+	}
+
+	i915_gem_suspend_late(i915);
+
+	/* Here be dragons! Note that with S3RST any S3 may become S4! */
+	simulate_hibernate(i915);
+
+	intel_engines_sanitize(i915);
+	i915_gem_sanitize(i915);
+
+	i915_gem_resume(i915);
+
+	mutex_lock(&i915->drm.struct_mutex);
+	err = switch_to_context(i915, ctx);
+	if (igt_flush_test(i915, I915_WAIT_LOCKED))
+		err = -EIO;
+	mutex_unlock(&i915->drm.struct_mutex);
+out:
+	mock_file_free(i915, file);
+	return err;
+}
+
+static int igt_gem_hibernate(void *arg)
+{
+	struct drm_i915_private *i915 = arg;
+	struct i915_gem_context *ctx;
+	struct drm_file *file;
+	int err;
+
+	file = mock_file(i915);
+	if (IS_ERR(file))
+		return PTR_ERR(file);
+
+	err = -ENOMEM;
+	mutex_lock(&i915->drm.struct_mutex);
+	ctx = live_context(i915, file);
+	if (!IS_ERR(ctx))
+		err = switch_to_context(i915, ctx);
+	mutex_unlock(&i915->drm.struct_mutex);
+	if (err)
+		goto out;
+
+	if (i915_gem_suspend(i915)) {
+		pr_err("i915_gem_suspend failed\n");
+		err = -EINVAL;
+		goto out;
+	}
+
+	i915_gem_freeze(i915);
+	i915_gem_freeze_late(i915);
+
+	/* Here be dragons! */
+	simulate_hibernate(i915);
+
+	intel_engines_sanitize(i915);
+	i915_gem_sanitize(i915);
+
+	i915_gem_resume(i915);
+
+	mutex_lock(&i915->drm.struct_mutex);
+	err = switch_to_context(i915, ctx);
+	if (igt_flush_test(i915, I915_WAIT_LOCKED))
+		err = -EIO;
+	mutex_unlock(&i915->drm.struct_mutex);
+out:
+	mock_file_free(i915, file);
+	return err;
+}
+
+int i915_gem_live_selftests(struct drm_i915_private *i915)
+{
+	static const struct i915_subtest tests[] = {
+		SUBTEST(igt_gem_suspend),
+		SUBTEST(igt_gem_hibernate),
+	};
+
+	return i915_subtests(tests, i915);
+}
diff --git a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
index a00e2bd08bce..a15713cae3b3 100644
--- a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
+++ b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
@@ -17,6 +17,7 @@ selftest(objects, i915_gem_object_live_selftests)
 selftest(dmabuf, i915_gem_dmabuf_live_selftests)
 selftest(coherency, i915_gem_coherency_live_selftests)
 selftest(gtt, i915_gem_gtt_live_selftests)
+selftest(gem, i915_gem_live_selftests)
 selftest(evict, i915_gem_evict_live_selftests)
 selftest(hugepages, i915_gem_huge_page_live_selftests)
 selftest(contexts, i915_gem_context_live_selftests)
-- 
2.19.0.rc1

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

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate
  2018-08-29 22:20 [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
@ 2018-08-29 23:01 ` Patchwork
  2018-08-29 23:01 ` ✗ Fi.CI.SPARSE: " Patchwork
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-08-29 23:01 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Add a simple exerciser for suspend/hibernate
URL   : https://patchwork.freedesktop.org/series/48906/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
a315eea06821 drm/i915/selftests: Add a simple exerciser for suspend/hibernate
-:31: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#31: 
new file mode 100644

-:36: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#36: FILE: drivers/gpu/drm/i915/selftests/i915_gem.c:1:
+/*

-:87: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV)
#87: FILE: drivers/gpu/drm/i915/selftests/i915_gem.c:52:
+		for (x = 0; x < PAGE_SIZE/sizeof(u32); x++)
 		                         ^

-:88: CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#88: FILE: drivers/gpu/drm/i915/selftests/i915_gem.c:53:
+			s[x] = prng = next_pseudo_random32(prng);

total: 0 errors, 2 warnings, 2 checks, 185 lines checked

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

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

* ✗ Fi.CI.SPARSE: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate
  2018-08-29 22:20 [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
  2018-08-29 23:01 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2018-08-29 23:01 ` Patchwork
  2018-08-30  9:52 ` [PATCH v2] " Chris Wilson
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-08-29 23:01 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Add a simple exerciser for suspend/hibernate
URL   : https://patchwork.freedesktop.org/series/48906/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: drm/i915/selftests: Add a simple exerciser for suspend/hibernate
+drivers/gpu/drm/i915/selftests/i915_gem.c:53:26: warning: dereference of noderef expression

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

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

* [PATCH v2] drm/i915/selftests: Add a simple exerciser for suspend/hibernate
  2018-08-29 22:20 [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
  2018-08-29 23:01 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
  2018-08-29 23:01 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2018-08-30  9:52 ` Chris Wilson
  2018-08-30 10:47   ` Bartminski, Jakub
  2018-08-30 11:31 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev2) Patchwork
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 19+ messages in thread
From: Chris Wilson @ 2018-08-30  9:52 UTC (permalink / raw)
  To: intel-gfx

Although we cannot do a full system-level test of suspend/hibernate from
deep with the kernel selftests, we can exercise the GEM subsystem in
isolation and simulate the external effects (such as losing stolen
contents and trashing the register state).

v2: Don't forget to hold rpm

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jakub Bartmiński <jakub.bartminski@intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c               |   1 +
 drivers/gpu/drm/i915/selftests/i915_gem.c     | 183 ++++++++++++++++++
 .../drm/i915/selftests/i915_live_selftests.h  |   1 +
 3 files changed, 185 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/selftests/i915_gem.c

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0453eb42a1a3..7b7bbfe59697 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -6207,4 +6207,5 @@ int i915_gem_object_attach_phys(struct drm_i915_gem_object *obj, int align)
 #include "selftests/huge_pages.c"
 #include "selftests/i915_gem_object.c"
 #include "selftests/i915_gem_coherency.c"
+#include "selftests/i915_gem.c"
 #endif
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c b/drivers/gpu/drm/i915/selftests/i915_gem.c
new file mode 100644
index 000000000000..f3cb426b1578
--- /dev/null
+++ b/drivers/gpu/drm/i915/selftests/i915_gem.c
@@ -0,0 +1,183 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright © 2018 Intel Corporation
+ */
+
+#include <linux/random.h>
+
+#include "../i915_selftest.h"
+
+#include "mock_context.h"
+#include "igt_flush_test.h"
+
+static int switch_to_context(struct drm_i915_private *i915,
+			     struct i915_gem_context *ctx)
+{
+	struct intel_engine_cs *engine;
+	enum intel_engine_id id;
+	int err = 0;
+
+	intel_runtime_pm_get(i915);
+
+	for_each_engine(engine, i915, id) {
+		struct i915_request *rq;
+
+		rq = i915_request_alloc(engine, ctx);
+		if (IS_ERR(rq)) {
+			err = PTR_ERR(rq);
+			break;
+		}
+
+		i915_request_add(rq);
+	}
+
+	intel_runtime_pm_put(i915);
+
+	return err;
+}
+
+static void trash_stolen(struct drm_i915_private *i915)
+{
+	struct i915_ggtt *ggtt = &i915->ggtt;
+	const u64 slot = ggtt->error_capture.start;
+	const resource_size_t size = resource_size(&i915->dsm);
+	unsigned long page;
+	u32 prng = 0x12345678;
+
+	for (page = 0; page < size; page += PAGE_SIZE) {
+		const dma_addr_t dma = i915->dsm.start + page;
+		u32 __iomem *s;
+		int x;
+
+		ggtt->vm.insert_page(&ggtt->vm, dma, slot, I915_CACHE_NONE, 0);
+
+		s = io_mapping_map_atomic_wc(&ggtt->iomap, slot);
+		for (x = 0; x < PAGE_SIZE / sizeof(u32); x++) {
+			prng = next_pseudo_random32(prng);
+			iowrite32(prng, &s[x]);
+		}
+		io_mapping_unmap_atomic(s);
+	}
+
+	ggtt->vm.clear_range(&ggtt->vm, slot, PAGE_SIZE);
+}
+
+static void simulate_hibernate(struct drm_i915_private *i915)
+{
+	intel_runtime_pm_get(i915);
+
+	/*
+	 * As a final sting in the tail, invalidate stolen. Under a real S4,
+	 * stolen is lost and needs to be refilled on resume. However, under
+	 * CI we merely do S4-device testing (as full S4 is too unreliable
+	 * for automated testing across a cluster), so to simulate the effect
+	 * of stolen being trashed across S4, we trash it ourselves.
+	 */
+	trash_stolen(i915);
+
+	intel_runtime_pm_put(i915);
+}
+
+static int igt_gem_suspend(void *arg)
+{
+	struct drm_i915_private *i915 = arg;
+	struct i915_gem_context *ctx;
+	struct drm_file *file;
+	int err;
+
+	file = mock_file(i915);
+	if (IS_ERR(file))
+		return PTR_ERR(file);
+
+	err = -ENOMEM;
+	mutex_lock(&i915->drm.struct_mutex);
+	ctx = live_context(i915, file);
+	if (!IS_ERR(ctx))
+		err = switch_to_context(i915, ctx);
+	mutex_unlock(&i915->drm.struct_mutex);
+	if (err)
+		goto out;
+
+	if (i915_gem_suspend(i915)) {
+		pr_err("i915_gem_suspend failed\n");
+		err = -EINVAL;
+		goto out;
+	}
+
+	i915_gem_suspend_late(i915);
+
+	/* Here be dragons! Note that with S3RST any S3 may become S4! */
+	simulate_hibernate(i915);
+
+	intel_engines_sanitize(i915);
+	i915_gem_sanitize(i915);
+
+	i915_gem_resume(i915);
+
+	mutex_lock(&i915->drm.struct_mutex);
+	err = switch_to_context(i915, ctx);
+	if (igt_flush_test(i915, I915_WAIT_LOCKED))
+		err = -EIO;
+	mutex_unlock(&i915->drm.struct_mutex);
+out:
+	mock_file_free(i915, file);
+	return err;
+}
+
+static int igt_gem_hibernate(void *arg)
+{
+	struct drm_i915_private *i915 = arg;
+	struct i915_gem_context *ctx;
+	struct drm_file *file;
+	int err;
+
+	file = mock_file(i915);
+	if (IS_ERR(file))
+		return PTR_ERR(file);
+
+	err = -ENOMEM;
+	mutex_lock(&i915->drm.struct_mutex);
+	ctx = live_context(i915, file);
+	if (!IS_ERR(ctx))
+		err = switch_to_context(i915, ctx);
+	mutex_unlock(&i915->drm.struct_mutex);
+	if (err)
+		goto out;
+
+	if (i915_gem_suspend(i915)) {
+		pr_err("i915_gem_suspend failed\n");
+		err = -EINVAL;
+		goto out;
+	}
+
+	i915_gem_freeze(i915);
+	i915_gem_freeze_late(i915);
+
+	/* Here be dragons! */
+	simulate_hibernate(i915);
+
+	intel_engines_sanitize(i915);
+	i915_gem_sanitize(i915);
+
+	i915_gem_resume(i915);
+
+	mutex_lock(&i915->drm.struct_mutex);
+	err = switch_to_context(i915, ctx);
+	if (igt_flush_test(i915, I915_WAIT_LOCKED))
+		err = -EIO;
+	mutex_unlock(&i915->drm.struct_mutex);
+out:
+	mock_file_free(i915, file);
+	return err;
+}
+
+int i915_gem_live_selftests(struct drm_i915_private *i915)
+{
+	static const struct i915_subtest tests[] = {
+		SUBTEST(igt_gem_suspend),
+		SUBTEST(igt_gem_hibernate),
+	};
+
+	return i915_subtests(tests, i915);
+}
diff --git a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
index a00e2bd08bce..a15713cae3b3 100644
--- a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
+++ b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
@@ -17,6 +17,7 @@ selftest(objects, i915_gem_object_live_selftests)
 selftest(dmabuf, i915_gem_dmabuf_live_selftests)
 selftest(coherency, i915_gem_coherency_live_selftests)
 selftest(gtt, i915_gem_gtt_live_selftests)
+selftest(gem, i915_gem_live_selftests)
 selftest(evict, i915_gem_evict_live_selftests)
 selftest(hugepages, i915_gem_huge_page_live_selftests)
 selftest(contexts, i915_gem_context_live_selftests)
-- 
2.19.0.rc1

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

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

* Re: [PATCH v2] drm/i915/selftests: Add a simple exerciser for suspend/hibernate
  2018-08-30  9:52 ` [PATCH v2] " Chris Wilson
@ 2018-08-30 10:47   ` Bartminski, Jakub
  2018-08-30 10:59     ` Chris Wilson
  0 siblings, 1 reply; 19+ messages in thread
From: Bartminski, Jakub @ 2018-08-30 10:47 UTC (permalink / raw)
  To: intel-gfx, chris


[-- Attachment #1.1: Type: text/plain, Size: 768 bytes --]

On Thu, 2018-08-30 at 10:52 +0100, Chris Wilson wrote:

> +static int igt_gem_suspend(void *arg)
[...]
> +	if (i915_gem_suspend(i915)) {
> +		pr_err("i915_gem_suspend failed\n");
> +		err = -EINVAL;
> +		goto out;
> +	}
> +
> +	i915_gem_suspend_late(i915);

Shouldn't we also do i915_gem_suspend_gtt_mappings after
i915_gem_suspend (usually it's in drm_suspend, which is called by both
pm_suspend and pm_freeze)? It's later restored in i915_gem_resume.

> +static int igt_gem_hibernate(void *arg)

Most of this function is same as igt_gem_suspend and that is probably
not going to change since both suspend and hibernation normally go
through pm_prepare and pm_resume_early/resume, maybe some prepare and
resume helpers for readability?

- Jakub

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3278 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

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

* Re: [PATCH v2] drm/i915/selftests: Add a simple exerciser for suspend/hibernate
  2018-08-30 10:47   ` Bartminski, Jakub
@ 2018-08-30 10:59     ` Chris Wilson
  0 siblings, 0 replies; 19+ messages in thread
From: Chris Wilson @ 2018-08-30 10:59 UTC (permalink / raw)
  To: Bartminski, Jakub, intel-gfx

Quoting Bartminski, Jakub (2018-08-30 11:47:21)
> On Thu, 2018-08-30 at 10:52 +0100, Chris Wilson wrote:
> 
> > +static int igt_gem_suspend(void *arg)
> [...]
> > +     if (i915_gem_suspend(i915)) {
> > +             pr_err("i915_gem_suspend failed\n");
> > +             err = -EINVAL;
> > +             goto out;
> > +     }
> > +
> > +     i915_gem_suspend_late(i915);
> 
> Shouldn't we also do i915_gem_suspend_gtt_mappings after
> i915_gem_suspend (usually it's in drm_suspend, which is called by both
> pm_suspend and pm_freeze)? It's later restored in i915_gem_resume.

Possibly, I didn't recall it as being that important. Still, the more
the merrier.
 
> > +static int igt_gem_hibernate(void *arg)
> 
> Most of this function is same as igt_gem_suspend and that is probably
> not going to change since both suspend and hibernation normally go
> through pm_prepare and pm_resume_early/resume, maybe some prepare and
> resume helpers for readability?

You were meant to jump and say, hmm, I'm going to add a few more cases
here with different GPU loads and will need to parameterise the
functions... I was ok with the duplication for now as I expect these to
serve as a base for more tests to come. It was more important for me to
give you a test case that blows up if you remove i915->gt.resume() :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev2)
  2018-08-29 22:20 [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
                   ` (2 preceding siblings ...)
  2018-08-30  9:52 ` [PATCH v2] " Chris Wilson
@ 2018-08-30 11:31 ` Patchwork
  2018-08-30 11:51 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-08-30 11:31 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev2)
URL   : https://patchwork.freedesktop.org/series/48906/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
87bb0faa6d38 drm/i915/selftests: Add a simple exerciser for suspend/hibernate
-:33: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#33: 
new file mode 100644

-:38: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#38: FILE: drivers/gpu/drm/i915/selftests/i915_gem.c:1:
+/*

total: 0 errors, 2 warnings, 0 checks, 195 lines checked

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

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

* ✓ Fi.CI.BAT: success for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev2)
  2018-08-29 22:20 [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
                   ` (3 preceding siblings ...)
  2018-08-30 11:31 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev2) Patchwork
@ 2018-08-30 11:51 ` Patchwork
  2018-08-30 12:07 ` [PATCH v3] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-08-30 11:51 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev2)
URL   : https://patchwork.freedesktop.org/series/48906/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4738 -> Patchwork_10044 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/48906/revisions/2/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Possible regressions ====

    {igt@drv_selftest@live_gem}:
      fi-whl-u:           NOTRUN -> DMESG-WARN
      fi-pnv-d510:        NOTRUN -> DMESG-WARN
      fi-skl-6600u:       NOTRUN -> DMESG-WARN
      fi-kbl-7560u:       NOTRUN -> DMESG-WARN
      fi-cfl-s3:          NOTRUN -> DMESG-WARN
      {fi-skl-iommu}:     NOTRUN -> DMESG-WARN
      fi-hsw-4770r:       NOTRUN -> DMESG-WARN
      fi-elk-e7500:       NOTRUN -> DMESG-WARN
      fi-skl-6700k2:      NOTRUN -> DMESG-WARN
      {fi-bsw-kefka}:     NOTRUN -> DMESG-WARN
      fi-skl-6700hq:      NOTRUN -> DMESG-WARN
      fi-bdw-5557u:       NOTRUN -> DMESG-WARN
      fi-glk-dsi:         NOTRUN -> DMESG-WARN
      {fi-cfl-8109u}:     NOTRUN -> DMESG-WARN
      {fi-byt-clapper}:   NOTRUN -> DMESG-WARN
      fi-bdw-gvtdvm:      NOTRUN -> DMESG-WARN
      fi-kbl-7500u:       NOTRUN -> DMESG-WARN
      fi-cfl-8700k:       NOTRUN -> DMESG-WARN
      fi-bxt-dsi:         NOTRUN -> DMESG-WARN
      fi-hsw-4770:        NOTRUN -> DMESG-WARN
      fi-ivb-3520m:       NOTRUN -> DMESG-WARN
      fi-skl-6770hq:      NOTRUN -> DMESG-WARN
      fi-bsw-n3050:       NOTRUN -> DMESG-WARN
      fi-ilk-650:         NOTRUN -> DMESG-WARN
      fi-ivb-3770:        NOTRUN -> DMESG-WARN
      fi-skl-gvtdvm:      NOTRUN -> DMESG-WARN
      fi-cnl-psr:         NOTRUN -> DMESG-WARN
      fi-hsw-peppy:       NOTRUN -> DMESG-WARN
      fi-skl-6260u:       NOTRUN -> DMESG-WARN
      fi-bxt-j4205:       NOTRUN -> DMESG-WARN
      fi-byt-n2820:       NOTRUN -> DMESG-WARN
      fi-kbl-7567u:       NOTRUN -> DMESG-WARN
      fi-kbl-x1275:       NOTRUN -> DMESG-WARN
      fi-snb-2600:        NOTRUN -> DMESG-WARN
      fi-bwr-2160:        NOTRUN -> DMESG-WARN
      fi-gdg-551:         NOTRUN -> DMESG-WARN
      fi-glk-j4005:       NOTRUN -> DMESG-WARN
      {fi-kbl-8809g}:     NOTRUN -> DMESG-WARN
      {fi-bdw-samus}:     NOTRUN -> DMESG-WARN
      fi-byt-j1900:       NOTRUN -> DMESG-WARN
      fi-kbl-r:           NOTRUN -> DMESG-WARN

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@debugfs_test@read_all_entries:
      fi-snb-2520m:       PASS -> INCOMPLETE (fdo#103713)

    {igt@drv_selftest@live_gem}:
      fi-skl-guc:         NOTRUN -> DMESG-WARN (fdo#105710, fdo#106679)
      fi-kbl-guc:         NOTRUN -> DMESG-WARN (fdo#106679)
      fi-cfl-guc:         NOTRUN -> DMESG-WARN (fdo#106679)

    igt@gem_exec_suspend@basic-s4-devices:
      fi-blb-e6850:       NOTRUN -> INCOMPLETE (fdo#107718)

    
    ==== Possible fixes ====

    igt@gem_exec_suspend@basic-s3:
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    igt@kms_frontbuffer_tracking@basic:
      {fi-byt-clapper}:   FAIL (fdo#103167) -> PASS

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

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-skl-guc:         FAIL (fdo#103191) -> PASS

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

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         FAIL (fdo#104008) -> PASS

    
    ==== Warnings ====

    {igt@pm_rpm@module-reload}:
      fi-bsw-n3050:       DMESG-FAIL (fdo#107704) -> DMESG-WARN (fdo#107704)

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

  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#105710 https://bugs.freedesktop.org/show_bug.cgi?id=105710
  fdo#106679 https://bugs.freedesktop.org/show_bug.cgi?id=106679
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107704 https://bugs.freedesktop.org/show_bug.cgi?id=107704
  fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718


== 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_4738 -> Patchwork_10044

  CI_DRM_4738: e1ec819ee824a4ed48f168bea66dba4da464e555 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4612: e39e09910fc8e369e24f6a0cabaeb9356dbfae08 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10044: 87bb0faa6d38f445bf6b0249081459f4fbb0997c @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

87bb0faa6d38 drm/i915/selftests: Add a simple exerciser for suspend/hibernate

== Logs ==

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

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

* [PATCH v3] drm/i915/selftests: Add a simple exerciser for suspend/hibernate
  2018-08-29 22:20 [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
                   ` (4 preceding siblings ...)
  2018-08-30 11:51 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-08-30 12:07 ` Chris Wilson
  2018-08-30 13:21 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev3) Patchwork
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Chris Wilson @ 2018-08-30 12:07 UTC (permalink / raw)
  To: intel-gfx

Although we cannot do a full system-level test of suspend/hibernate from
deep with the kernel selftests, we can exercise the GEM subsystem in
isolation and simulate the external effects (such as losing stolen
contents and trashing the register state).

v2: Don't forget to hold rpm
v3: Suspend the GTT mappings, and more rpm!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jakub Bartmiński <jakub.bartminski@intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c               |   1 +
 drivers/gpu/drm/i915/selftests/i915_gem.c     | 221 ++++++++++++++++++
 .../drm/i915/selftests/i915_live_selftests.h  |   1 +
 3 files changed, 223 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/selftests/i915_gem.c

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0453eb42a1a3..7b7bbfe59697 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -6207,4 +6207,5 @@ int i915_gem_object_attach_phys(struct drm_i915_gem_object *obj, int align)
 #include "selftests/huge_pages.c"
 #include "selftests/i915_gem_object.c"
 #include "selftests/i915_gem_coherency.c"
+#include "selftests/i915_gem.c"
 #endif
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c b/drivers/gpu/drm/i915/selftests/i915_gem.c
new file mode 100644
index 000000000000..1dbdc35fdec4
--- /dev/null
+++ b/drivers/gpu/drm/i915/selftests/i915_gem.c
@@ -0,0 +1,221 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright © 2018 Intel Corporation
+ */
+
+#include <linux/random.h>
+
+#include "../i915_selftest.h"
+
+#include "mock_context.h"
+#include "igt_flush_test.h"
+
+static int switch_to_context(struct drm_i915_private *i915,
+			     struct i915_gem_context *ctx)
+{
+	struct intel_engine_cs *engine;
+	enum intel_engine_id id;
+	int err = 0;
+
+	intel_runtime_pm_get(i915);
+
+	for_each_engine(engine, i915, id) {
+		struct i915_request *rq;
+
+		rq = i915_request_alloc(engine, ctx);
+		if (IS_ERR(rq)) {
+			err = PTR_ERR(rq);
+			break;
+		}
+
+		i915_request_add(rq);
+	}
+
+	intel_runtime_pm_put(i915);
+
+	return err;
+}
+
+static int pm_prepare(struct drm_i915_private *i915)
+{
+	int err;
+
+	if (i915_gem_suspend(i915)) {
+		pr_err("i915_gem_suspend failed\n");
+		err = -EINVAL;
+	}
+
+	return err;
+}
+
+static void trash_stolen(struct drm_i915_private *i915)
+{
+	struct i915_ggtt *ggtt = &i915->ggtt;
+	const u64 slot = ggtt->error_capture.start;
+	const resource_size_t size = resource_size(&i915->dsm);
+	unsigned long page;
+	u32 prng = 0x12345678;
+
+	for (page = 0; page < size; page += PAGE_SIZE) {
+		const dma_addr_t dma = i915->dsm.start + page;
+		u32 __iomem *s;
+		int x;
+
+		ggtt->vm.insert_page(&ggtt->vm, dma, slot, I915_CACHE_NONE, 0);
+
+		s = io_mapping_map_atomic_wc(&ggtt->iomap, slot);
+		for (x = 0; x < PAGE_SIZE / sizeof(u32); x++) {
+			prng = next_pseudo_random32(prng);
+			iowrite32(prng, &s[x]);
+		}
+		io_mapping_unmap_atomic(s);
+	}
+
+	ggtt->vm.clear_range(&ggtt->vm, slot, PAGE_SIZE);
+}
+
+static void simulate_hibernate(struct drm_i915_private *i915)
+{
+	intel_runtime_pm_get(i915);
+
+	/*
+	 * As a final sting in the tail, invalidate stolen. Under a real S4,
+	 * stolen is lost and needs to be refilled on resume. However, under
+	 * CI we merely do S4-device testing (as full S4 is too unreliable
+	 * for automated testing across a cluster), so to simulate the effect
+	 * of stolen being trashed across S4, we trash it ourselves.
+	 */
+	trash_stolen(i915);
+
+	intel_runtime_pm_put(i915);
+}
+
+static void pm_resume(struct drm_i915_private *i915)
+{
+	/*
+	 * Both suspend and hibernate follow the same wakeup path and assume
+	 * that runtime-pm just works.
+	 */
+	intel_runtime_pm_get(i915);
+
+	intel_engines_sanitize(i915);
+	i915_gem_sanitize(i915);
+	i915_gem_resume(i915);
+
+	intel_runtime_pm_put(i915);
+}
+
+static void pm_suspend(struct drm_i915_private *i915)
+{
+	intel_runtime_pm_get(i915);
+
+	i915_gem_suspend_gtt_mappings(i915);
+	i915_gem_suspend_late(i915);
+
+	intel_runtime_pm_put(i915);
+}
+
+static int igt_gem_suspend(void *arg)
+{
+	struct drm_i915_private *i915 = arg;
+	struct i915_gem_context *ctx;
+	struct drm_file *file;
+	int err;
+
+	file = mock_file(i915);
+	if (IS_ERR(file))
+		return PTR_ERR(file);
+
+	err = -ENOMEM;
+	mutex_lock(&i915->drm.struct_mutex);
+	ctx = live_context(i915, file);
+	if (!IS_ERR(ctx))
+		err = switch_to_context(i915, ctx);
+	mutex_unlock(&i915->drm.struct_mutex);
+	if (err)
+		goto out;
+
+	err = pm_prepare(i915);
+	if (err)
+		goto out;
+
+	pm_suspend(i915);
+
+	/* Here be dragons! Note that with S3RST any S3 may become S4! */
+	simulate_hibernate(i915);
+
+	pm_resume(i915);
+
+	mutex_lock(&i915->drm.struct_mutex);
+	err = switch_to_context(i915, ctx);
+	if (igt_flush_test(i915, I915_WAIT_LOCKED))
+		err = -EIO;
+	mutex_unlock(&i915->drm.struct_mutex);
+out:
+	mock_file_free(i915, file);
+	return err;
+}
+
+static void pm_hibernate(struct drm_i915_private *i915)
+{
+	intel_runtime_pm_get(i915);
+
+	i915_gem_suspend_gtt_mappings(i915);
+
+	i915_gem_freeze(i915);
+	i915_gem_freeze_late(i915);
+
+	intel_runtime_pm_put(i915);
+}
+
+static int igt_gem_hibernate(void *arg)
+{
+	struct drm_i915_private *i915 = arg;
+	struct i915_gem_context *ctx;
+	struct drm_file *file;
+	int err;
+
+	file = mock_file(i915);
+	if (IS_ERR(file))
+		return PTR_ERR(file);
+
+	err = -ENOMEM;
+	mutex_lock(&i915->drm.struct_mutex);
+	ctx = live_context(i915, file);
+	if (!IS_ERR(ctx))
+		err = switch_to_context(i915, ctx);
+	mutex_unlock(&i915->drm.struct_mutex);
+	if (err)
+		goto out;
+
+	err = pm_prepare(i915);
+	if (err)
+		goto out;
+
+	pm_hibernate(i915);
+
+	/* Here be dragons! */
+	simulate_hibernate(i915);
+
+	pm_resume(i915);
+
+	mutex_lock(&i915->drm.struct_mutex);
+	err = switch_to_context(i915, ctx);
+	if (igt_flush_test(i915, I915_WAIT_LOCKED))
+		err = -EIO;
+	mutex_unlock(&i915->drm.struct_mutex);
+out:
+	mock_file_free(i915, file);
+	return err;
+}
+
+int i915_gem_live_selftests(struct drm_i915_private *i915)
+{
+	static const struct i915_subtest tests[] = {
+		SUBTEST(igt_gem_suspend),
+		SUBTEST(igt_gem_hibernate),
+	};
+
+	return i915_subtests(tests, i915);
+}
diff --git a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
index a00e2bd08bce..a15713cae3b3 100644
--- a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
+++ b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
@@ -17,6 +17,7 @@ selftest(objects, i915_gem_object_live_selftests)
 selftest(dmabuf, i915_gem_dmabuf_live_selftests)
 selftest(coherency, i915_gem_coherency_live_selftests)
 selftest(gtt, i915_gem_gtt_live_selftests)
+selftest(gem, i915_gem_live_selftests)
 selftest(evict, i915_gem_evict_live_selftests)
 selftest(hugepages, i915_gem_huge_page_live_selftests)
 selftest(contexts, i915_gem_context_live_selftests)
-- 
2.19.0.rc1

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

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev3)
  2018-08-29 22:20 [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
                   ` (5 preceding siblings ...)
  2018-08-30 12:07 ` [PATCH v3] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
@ 2018-08-30 13:21 ` Patchwork
  2018-08-30 13:45 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-08-30 13:21 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev3)
URL   : https://patchwork.freedesktop.org/series/48906/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
c308e9f7b94b drm/i915/selftests: Add a simple exerciser for suspend/hibernate
-:34: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#34: 
new file mode 100644

-:39: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#39: FILE: drivers/gpu/drm/i915/selftests/i915_gem.c:1:
+/*

total: 0 errors, 2 warnings, 0 checks, 233 lines checked

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

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

* ✓ Fi.CI.BAT: success for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev3)
  2018-08-29 22:20 [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
                   ` (6 preceding siblings ...)
  2018-08-30 13:21 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev3) Patchwork
@ 2018-08-30 13:45 ` Patchwork
  2018-08-30 13:48 ` [PATCH v4] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-08-30 13:45 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev3)
URL   : https://patchwork.freedesktop.org/series/48906/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4739 -> Patchwork_10048 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/48906/revisions/3/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Possible regressions ====

    {igt@drv_selftest@live_gem}:
      fi-whl-u:           NOTRUN -> DMESG-FAIL
      fi-pnv-d510:        NOTRUN -> DMESG-FAIL
      fi-skl-6600u:       NOTRUN -> DMESG-FAIL
      fi-kbl-7560u:       NOTRUN -> DMESG-FAIL
      fi-cfl-s3:          NOTRUN -> DMESG-FAIL
      {fi-skl-iommu}:     NOTRUN -> DMESG-FAIL
      fi-hsw-4770r:       NOTRUN -> DMESG-FAIL
      fi-elk-e7500:       NOTRUN -> DMESG-FAIL
      fi-skl-6700k2:      NOTRUN -> DMESG-FAIL
      {fi-bsw-kefka}:     NOTRUN -> DMESG-FAIL
      fi-skl-6700hq:      NOTRUN -> DMESG-FAIL
      fi-bdw-5557u:       NOTRUN -> DMESG-FAIL
      fi-glk-dsi:         NOTRUN -> DMESG-FAIL
      fi-skl-guc:         NOTRUN -> DMESG-FAIL
      fi-kbl-guc:         NOTRUN -> DMESG-FAIL
      {fi-cfl-8109u}:     NOTRUN -> DMESG-FAIL
      {fi-byt-clapper}:   NOTRUN -> DMESG-FAIL
      fi-bdw-gvtdvm:      NOTRUN -> DMESG-FAIL
      fi-kbl-7500u:       NOTRUN -> DMESG-FAIL
      fi-cfl-8700k:       NOTRUN -> DMESG-FAIL
      fi-snb-2520m:       NOTRUN -> DMESG-FAIL
      fi-bxt-dsi:         NOTRUN -> DMESG-FAIL
      fi-hsw-4770:        NOTRUN -> DMESG-FAIL
      fi-ivb-3520m:       NOTRUN -> DMESG-FAIL
      fi-cfl-guc:         NOTRUN -> DMESG-FAIL
      fi-skl-6770hq:      NOTRUN -> DMESG-FAIL
      fi-bsw-n3050:       NOTRUN -> DMESG-FAIL
      fi-ilk-650:         NOTRUN -> DMESG-FAIL
      fi-ivb-3770:        NOTRUN -> DMESG-FAIL
      fi-skl-gvtdvm:      NOTRUN -> DMESG-FAIL
      fi-cnl-psr:         NOTRUN -> DMESG-FAIL
      fi-hsw-peppy:       NOTRUN -> DMESG-FAIL
      fi-skl-6260u:       NOTRUN -> DMESG-FAIL
      fi-bxt-j4205:       NOTRUN -> DMESG-FAIL
      fi-byt-n2820:       NOTRUN -> DMESG-FAIL
      fi-kbl-7567u:       NOTRUN -> DMESG-FAIL
      fi-kbl-x1275:       NOTRUN -> DMESG-FAIL
      fi-icl-u:           NOTRUN -> DMESG-FAIL
      fi-snb-2600:        NOTRUN -> DMESG-FAIL
      fi-bwr-2160:        NOTRUN -> DMESG-FAIL
      fi-gdg-551:         NOTRUN -> DMESG-FAIL
      fi-glk-j4005:       NOTRUN -> DMESG-FAIL
      {fi-kbl-8809g}:     NOTRUN -> DMESG-FAIL
      {fi-bdw-samus}:     NOTRUN -> DMESG-FAIL
      fi-blb-e6850:       NOTRUN -> DMESG-FAIL
      fi-byt-j1900:       NOTRUN -> DMESG-FAIL
      fi-kbl-r:           NOTRUN -> DMESG-FAIL

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

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

    
    ==== Possible fixes ====

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         FAIL (fdo#104008) -> PASS

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

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


== 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_4739 -> Patchwork_10048

  CI_DRM_4739: f65e436af74d73b095b211d5294f5d7cd5132882 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4612: e39e09910fc8e369e24f6a0cabaeb9356dbfae08 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10048: c308e9f7b94b11e482e9f618b9ec44b2de612c25 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

c308e9f7b94b drm/i915/selftests: Add a simple exerciser for suspend/hibernate

== Logs ==

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

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

* [PATCH v4] drm/i915/selftests: Add a simple exerciser for suspend/hibernate
  2018-08-29 22:20 [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
                   ` (7 preceding siblings ...)
  2018-08-30 13:45 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-08-30 13:48 ` Chris Wilson
  2018-08-31  8:00   ` Chris Wilson
  2018-08-31  9:01   ` Bartminski, Jakub
  2018-08-30 15:09 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev4) Patchwork
                   ` (2 subsequent siblings)
  11 siblings, 2 replies; 19+ messages in thread
From: Chris Wilson @ 2018-08-30 13:48 UTC (permalink / raw)
  To: intel-gfx

Although we cannot do a full system-level test of suspend/hibernate from
deep with the kernel selftests, we can exercise the GEM subsystem in
isolation and simulate the external effects (such as losing stolen
contents and trashing the register state).

v2: Don't forget to hold rpm
v3: Suspend the GTT mappings, and more rpm!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jakub Bartmiński <jakub.bartminski@intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c               |   1 +
 drivers/gpu/drm/i915/selftests/i915_gem.c     | 221 ++++++++++++++++++
 .../drm/i915/selftests/i915_live_selftests.h  |   1 +
 3 files changed, 223 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/selftests/i915_gem.c

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0453eb42a1a3..7b7bbfe59697 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -6207,4 +6207,5 @@ int i915_gem_object_attach_phys(struct drm_i915_gem_object *obj, int align)
 #include "selftests/huge_pages.c"
 #include "selftests/i915_gem_object.c"
 #include "selftests/i915_gem_coherency.c"
+#include "selftests/i915_gem.c"
 #endif
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c b/drivers/gpu/drm/i915/selftests/i915_gem.c
new file mode 100644
index 000000000000..e9cfc1fb0c07
--- /dev/null
+++ b/drivers/gpu/drm/i915/selftests/i915_gem.c
@@ -0,0 +1,221 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright © 2018 Intel Corporation
+ */
+
+#include <linux/random.h>
+
+#include "../i915_selftest.h"
+
+#include "mock_context.h"
+#include "igt_flush_test.h"
+
+static int switch_to_context(struct drm_i915_private *i915,
+			     struct i915_gem_context *ctx)
+{
+	struct intel_engine_cs *engine;
+	enum intel_engine_id id;
+	int err = 0;
+
+	intel_runtime_pm_get(i915);
+
+	for_each_engine(engine, i915, id) {
+		struct i915_request *rq;
+
+		rq = i915_request_alloc(engine, ctx);
+		if (IS_ERR(rq)) {
+			err = PTR_ERR(rq);
+			break;
+		}
+
+		i915_request_add(rq);
+	}
+
+	intel_runtime_pm_put(i915);
+
+	return err;
+}
+
+static int pm_prepare(struct drm_i915_private *i915)
+{
+	int err = 0;
+
+	if (i915_gem_suspend(i915)) {
+		pr_err("i915_gem_suspend failed\n");
+		err = -EINVAL;
+	}
+
+	return err;
+}
+
+static void trash_stolen(struct drm_i915_private *i915)
+{
+	struct i915_ggtt *ggtt = &i915->ggtt;
+	const u64 slot = ggtt->error_capture.start;
+	const resource_size_t size = resource_size(&i915->dsm);
+	unsigned long page;
+	u32 prng = 0x12345678;
+
+	for (page = 0; page < size; page += PAGE_SIZE) {
+		const dma_addr_t dma = i915->dsm.start + page;
+		u32 __iomem *s;
+		int x;
+
+		ggtt->vm.insert_page(&ggtt->vm, dma, slot, I915_CACHE_NONE, 0);
+
+		s = io_mapping_map_atomic_wc(&ggtt->iomap, slot);
+		for (x = 0; x < PAGE_SIZE / sizeof(u32); x++) {
+			prng = next_pseudo_random32(prng);
+			iowrite32(prng, &s[x]);
+		}
+		io_mapping_unmap_atomic(s);
+	}
+
+	ggtt->vm.clear_range(&ggtt->vm, slot, PAGE_SIZE);
+}
+
+static void simulate_hibernate(struct drm_i915_private *i915)
+{
+	intel_runtime_pm_get(i915);
+
+	/*
+	 * As a final sting in the tail, invalidate stolen. Under a real S4,
+	 * stolen is lost and needs to be refilled on resume. However, under
+	 * CI we merely do S4-device testing (as full S4 is too unreliable
+	 * for automated testing across a cluster), so to simulate the effect
+	 * of stolen being trashed across S4, we trash it ourselves.
+	 */
+	trash_stolen(i915);
+
+	intel_runtime_pm_put(i915);
+}
+
+static void pm_resume(struct drm_i915_private *i915)
+{
+	/*
+	 * Both suspend and hibernate follow the same wakeup path and assume
+	 * that runtime-pm just works.
+	 */
+	intel_runtime_pm_get(i915);
+
+	intel_engines_sanitize(i915);
+	i915_gem_sanitize(i915);
+	i915_gem_resume(i915);
+
+	intel_runtime_pm_put(i915);
+}
+
+static void pm_suspend(struct drm_i915_private *i915)
+{
+	intel_runtime_pm_get(i915);
+
+	i915_gem_suspend_gtt_mappings(i915);
+	i915_gem_suspend_late(i915);
+
+	intel_runtime_pm_put(i915);
+}
+
+static int igt_gem_suspend(void *arg)
+{
+	struct drm_i915_private *i915 = arg;
+	struct i915_gem_context *ctx;
+	struct drm_file *file;
+	int err;
+
+	file = mock_file(i915);
+	if (IS_ERR(file))
+		return PTR_ERR(file);
+
+	err = -ENOMEM;
+	mutex_lock(&i915->drm.struct_mutex);
+	ctx = live_context(i915, file);
+	if (!IS_ERR(ctx))
+		err = switch_to_context(i915, ctx);
+	mutex_unlock(&i915->drm.struct_mutex);
+	if (err)
+		goto out;
+
+	err = pm_prepare(i915);
+	if (err)
+		goto out;
+
+	pm_suspend(i915);
+
+	/* Here be dragons! Note that with S3RST any S3 may become S4! */
+	simulate_hibernate(i915);
+
+	pm_resume(i915);
+
+	mutex_lock(&i915->drm.struct_mutex);
+	err = switch_to_context(i915, ctx);
+	if (igt_flush_test(i915, I915_WAIT_LOCKED))
+		err = -EIO;
+	mutex_unlock(&i915->drm.struct_mutex);
+out:
+	mock_file_free(i915, file);
+	return err;
+}
+
+static void pm_hibernate(struct drm_i915_private *i915)
+{
+	intel_runtime_pm_get(i915);
+
+	i915_gem_suspend_gtt_mappings(i915);
+
+	i915_gem_freeze(i915);
+	i915_gem_freeze_late(i915);
+
+	intel_runtime_pm_put(i915);
+}
+
+static int igt_gem_hibernate(void *arg)
+{
+	struct drm_i915_private *i915 = arg;
+	struct i915_gem_context *ctx;
+	struct drm_file *file;
+	int err;
+
+	file = mock_file(i915);
+	if (IS_ERR(file))
+		return PTR_ERR(file);
+
+	err = -ENOMEM;
+	mutex_lock(&i915->drm.struct_mutex);
+	ctx = live_context(i915, file);
+	if (!IS_ERR(ctx))
+		err = switch_to_context(i915, ctx);
+	mutex_unlock(&i915->drm.struct_mutex);
+	if (err)
+		goto out;
+
+	err = pm_prepare(i915);
+	if (err)
+		goto out;
+
+	pm_hibernate(i915);
+
+	/* Here be dragons! */
+	simulate_hibernate(i915);
+
+	pm_resume(i915);
+
+	mutex_lock(&i915->drm.struct_mutex);
+	err = switch_to_context(i915, ctx);
+	if (igt_flush_test(i915, I915_WAIT_LOCKED))
+		err = -EIO;
+	mutex_unlock(&i915->drm.struct_mutex);
+out:
+	mock_file_free(i915, file);
+	return err;
+}
+
+int i915_gem_live_selftests(struct drm_i915_private *i915)
+{
+	static const struct i915_subtest tests[] = {
+		SUBTEST(igt_gem_suspend),
+		SUBTEST(igt_gem_hibernate),
+	};
+
+	return i915_subtests(tests, i915);
+}
diff --git a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
index a00e2bd08bce..a15713cae3b3 100644
--- a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
+++ b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
@@ -17,6 +17,7 @@ selftest(objects, i915_gem_object_live_selftests)
 selftest(dmabuf, i915_gem_dmabuf_live_selftests)
 selftest(coherency, i915_gem_coherency_live_selftests)
 selftest(gtt, i915_gem_gtt_live_selftests)
+selftest(gem, i915_gem_live_selftests)
 selftest(evict, i915_gem_evict_live_selftests)
 selftest(hugepages, i915_gem_huge_page_live_selftests)
 selftest(contexts, i915_gem_context_live_selftests)
-- 
2.19.0.rc1

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

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev4)
  2018-08-29 22:20 [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
                   ` (8 preceding siblings ...)
  2018-08-30 13:48 ` [PATCH v4] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
@ 2018-08-30 15:09 ` Patchwork
  2018-08-30 15:29 ` ✓ Fi.CI.BAT: success " Patchwork
  2018-08-30 19:57 ` ✓ Fi.CI.IGT: " Patchwork
  11 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-08-30 15:09 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev4)
URL   : https://patchwork.freedesktop.org/series/48906/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
41720addaafc drm/i915/selftests: Add a simple exerciser for suspend/hibernate
-:34: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#34: 
new file mode 100644

-:39: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#39: FILE: drivers/gpu/drm/i915/selftests/i915_gem.c:1:
+/*

total: 0 errors, 2 warnings, 0 checks, 233 lines checked

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

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

* ✓ Fi.CI.BAT: success for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev4)
  2018-08-29 22:20 [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
                   ` (9 preceding siblings ...)
  2018-08-30 15:09 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev4) Patchwork
@ 2018-08-30 15:29 ` Patchwork
  2018-08-30 19:57 ` ✓ Fi.CI.IGT: " Patchwork
  11 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-08-30 15:29 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev4)
URL   : https://patchwork.freedesktop.org/series/48906/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4740 -> Patchwork_10052 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/48906/revisions/4/mbox/

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

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

    igt@debugfs_test@read_all_entries:
      fi-kbl-7560u:       PASS -> INCOMPLETE (fdo#103665)

    igt@gem_exec_suspend@basic-s3:
      {fi-kbl-soraka}:    NOTRUN -> INCOMPLETE (fdo#107556)

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

    {igt@kms_psr@primary_page_flip}:
      fi-cnl-psr:         PASS -> FAIL (fdo#107336)

    
    ==== Possible fixes ====

    {igt@amdgpu/amd_prime@i915-to-amd}:
      fi-bxt-j4205:       INCOMPLETE (fdo#103927) -> SKIP

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

    {igt@pm_rpm@module-reload}:
      fi-cnl-psr:         WARN (fdo#107602, fdo#107708) -> PASS
      fi-bxt-j4205:       DMESG-FAIL (fdo#107712) -> 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#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107402 https://bugs.freedesktop.org/show_bug.cgi?id=107402
  fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
  fdo#107602 https://bugs.freedesktop.org/show_bug.cgi?id=107602
  fdo#107708 https://bugs.freedesktop.org/show_bug.cgi?id=107708
  fdo#107712 https://bugs.freedesktop.org/show_bug.cgi?id=107712


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

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


== Build changes ==

    * Linux: CI_DRM_4740 -> Patchwork_10052

  CI_DRM_4740: dc30149e06cea1672bac53f0fa7b8f5606ca8d1c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4612: e39e09910fc8e369e24f6a0cabaeb9356dbfae08 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10052: 41720addaafc699fddfd9771f8825b32c205bef9 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

41720addaafc drm/i915/selftests: Add a simple exerciser for suspend/hibernate

== Logs ==

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

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

* ✓ Fi.CI.IGT: success for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev4)
  2018-08-29 22:20 [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
                   ` (10 preceding siblings ...)
  2018-08-30 15:29 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-08-30 19:57 ` Patchwork
  11 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-08-30 19:57 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev4)
URL   : https://patchwork.freedesktop.org/series/48906/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4740_full -> Patchwork_10052_full =

== Summary - SUCCESS ==

  No regressions found.

  

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@shrink:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411, fdo#106886)

    igt@gem_exec_await@wide-contexts:
      shard-glk:          PASS -> FAIL (fdo#105900)

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

    igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
      shard-apl:          PASS -> FAIL (fdo#103375)

    igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
      shard-apl:          PASS -> INCOMPLETE (fdo#103927)

    igt@perf_pmu@enable-race-bcs0:
      shard-snb:          SKIP -> INCOMPLETE (fdo#105411)

    
    ==== Possible fixes ====

    igt@drv_suspend@shrink:
      shard-hsw:          INCOMPLETE (fdo#103540, fdo#106886) -> PASS

    igt@gem_exec_await@wide-contexts:
      shard-kbl:          FAIL (fdo#105900) -> PASS

    igt@gem_render_linear_blits@basic:
      shard-kbl:          INCOMPLETE (fdo#103665) -> PASS

    igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
      shard-hsw:          FAIL (fdo#105767) -> PASS

    igt@kms_frontbuffer_tracking@fbc-badstride:
      shard-glk:          FAIL (fdo#103167) -> PASS

    igt@kms_setmode@basic:
      shard-kbl:          FAIL (fdo#99912) -> PASS

    igt@perf@polling:
      shard-hsw:          FAIL (fdo#102252) -> PASS

    
  fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
  fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
  fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
  fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
  fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


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

  No changes in participating hosts


== Build changes ==

    * Linux: CI_DRM_4740 -> Patchwork_10052

  CI_DRM_4740: dc30149e06cea1672bac53f0fa7b8f5606ca8d1c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4612: e39e09910fc8e369e24f6a0cabaeb9356dbfae08 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10052: 41720addaafc699fddfd9771f8825b32c205bef9 @ 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_10052/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v4] drm/i915/selftests: Add a simple exerciser for suspend/hibernate
  2018-08-30 13:48 ` [PATCH v4] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
@ 2018-08-31  8:00   ` Chris Wilson
  2018-08-31  9:01   ` Bartminski, Jakub
  1 sibling, 0 replies; 19+ messages in thread
From: Chris Wilson @ 2018-08-31  8:00 UTC (permalink / raw)
  To: intel-gfx

Quoting Chris Wilson (2018-08-30 14:48:06)
> Although we cannot do a full system-level test of suspend/hibernate from
> deep with the kernel selftests, we can exercise the GEM subsystem in
> isolation and simulate the external effects (such as losing stolen
> contents and trashing the register state).
> 
> v2: Don't forget to hold rpm
> v3: Suspend the GTT mappings, and more rpm!
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jakub Bartmiński <jakub.bartminski@intel.com>
> Cc: Matthew Auld <matthew.william.auld@gmail.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

The dust has finally settled; care for a perusal?
-Chris

> ---
>  drivers/gpu/drm/i915/i915_gem.c               |   1 +
>  drivers/gpu/drm/i915/selftests/i915_gem.c     | 221 ++++++++++++++++++
>  .../drm/i915/selftests/i915_live_selftests.h  |   1 +
>  3 files changed, 223 insertions(+)
>  create mode 100644 drivers/gpu/drm/i915/selftests/i915_gem.c
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 0453eb42a1a3..7b7bbfe59697 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -6207,4 +6207,5 @@ int i915_gem_object_attach_phys(struct drm_i915_gem_object *obj, int align)
>  #include "selftests/huge_pages.c"
>  #include "selftests/i915_gem_object.c"
>  #include "selftests/i915_gem_coherency.c"
> +#include "selftests/i915_gem.c"
>  #endif
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c b/drivers/gpu/drm/i915/selftests/i915_gem.c
> new file mode 100644
> index 000000000000..e9cfc1fb0c07
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem.c
> @@ -0,0 +1,221 @@
> +/*
> + * SPDX-License-Identifier: MIT
> + *
> + * Copyright © 2018 Intel Corporation
> + */
> +
> +#include <linux/random.h>
> +
> +#include "../i915_selftest.h"
> +
> +#include "mock_context.h"
> +#include "igt_flush_test.h"
> +
> +static int switch_to_context(struct drm_i915_private *i915,
> +                            struct i915_gem_context *ctx)
> +{
> +       struct intel_engine_cs *engine;
> +       enum intel_engine_id id;
> +       int err = 0;
> +
> +       intel_runtime_pm_get(i915);
> +
> +       for_each_engine(engine, i915, id) {
> +               struct i915_request *rq;
> +
> +               rq = i915_request_alloc(engine, ctx);
> +               if (IS_ERR(rq)) {
> +                       err = PTR_ERR(rq);
> +                       break;
> +               }
> +
> +               i915_request_add(rq);
> +       }
> +
> +       intel_runtime_pm_put(i915);
> +
> +       return err;
> +}
> +
> +static int pm_prepare(struct drm_i915_private *i915)
> +{
> +       int err = 0;
> +
> +       if (i915_gem_suspend(i915)) {
> +               pr_err("i915_gem_suspend failed\n");
> +               err = -EINVAL;
> +       }
> +
> +       return err;
> +}
> +
> +static void trash_stolen(struct drm_i915_private *i915)
> +{
> +       struct i915_ggtt *ggtt = &i915->ggtt;
> +       const u64 slot = ggtt->error_capture.start;
> +       const resource_size_t size = resource_size(&i915->dsm);
> +       unsigned long page;
> +       u32 prng = 0x12345678;
> +
> +       for (page = 0; page < size; page += PAGE_SIZE) {
> +               const dma_addr_t dma = i915->dsm.start + page;
> +               u32 __iomem *s;
> +               int x;
> +
> +               ggtt->vm.insert_page(&ggtt->vm, dma, slot, I915_CACHE_NONE, 0);
> +
> +               s = io_mapping_map_atomic_wc(&ggtt->iomap, slot);
> +               for (x = 0; x < PAGE_SIZE / sizeof(u32); x++) {
> +                       prng = next_pseudo_random32(prng);
> +                       iowrite32(prng, &s[x]);
> +               }
> +               io_mapping_unmap_atomic(s);
> +       }
> +
> +       ggtt->vm.clear_range(&ggtt->vm, slot, PAGE_SIZE);
> +}
> +
> +static void simulate_hibernate(struct drm_i915_private *i915)
> +{
> +       intel_runtime_pm_get(i915);
> +
> +       /*
> +        * As a final sting in the tail, invalidate stolen. Under a real S4,
> +        * stolen is lost and needs to be refilled on resume. However, under
> +        * CI we merely do S4-device testing (as full S4 is too unreliable
> +        * for automated testing across a cluster), so to simulate the effect
> +        * of stolen being trashed across S4, we trash it ourselves.
> +        */
> +       trash_stolen(i915);
> +
> +       intel_runtime_pm_put(i915);
> +}
> +
> +static void pm_resume(struct drm_i915_private *i915)
> +{
> +       /*
> +        * Both suspend and hibernate follow the same wakeup path and assume
> +        * that runtime-pm just works.
> +        */
> +       intel_runtime_pm_get(i915);
> +
> +       intel_engines_sanitize(i915);
> +       i915_gem_sanitize(i915);
> +       i915_gem_resume(i915);
> +
> +       intel_runtime_pm_put(i915);
> +}
> +
> +static void pm_suspend(struct drm_i915_private *i915)
> +{
> +       intel_runtime_pm_get(i915);
> +
> +       i915_gem_suspend_gtt_mappings(i915);
> +       i915_gem_suspend_late(i915);
> +
> +       intel_runtime_pm_put(i915);
> +}
> +
> +static int igt_gem_suspend(void *arg)
> +{
> +       struct drm_i915_private *i915 = arg;
> +       struct i915_gem_context *ctx;
> +       struct drm_file *file;
> +       int err;
> +
> +       file = mock_file(i915);
> +       if (IS_ERR(file))
> +               return PTR_ERR(file);
> +
> +       err = -ENOMEM;
> +       mutex_lock(&i915->drm.struct_mutex);
> +       ctx = live_context(i915, file);
> +       if (!IS_ERR(ctx))
> +               err = switch_to_context(i915, ctx);
> +       mutex_unlock(&i915->drm.struct_mutex);
> +       if (err)
> +               goto out;
> +
> +       err = pm_prepare(i915);
> +       if (err)
> +               goto out;
> +
> +       pm_suspend(i915);
> +
> +       /* Here be dragons! Note that with S3RST any S3 may become S4! */
> +       simulate_hibernate(i915);
> +
> +       pm_resume(i915);
> +
> +       mutex_lock(&i915->drm.struct_mutex);
> +       err = switch_to_context(i915, ctx);
> +       if (igt_flush_test(i915, I915_WAIT_LOCKED))
> +               err = -EIO;
> +       mutex_unlock(&i915->drm.struct_mutex);
> +out:
> +       mock_file_free(i915, file);
> +       return err;
> +}
> +
> +static void pm_hibernate(struct drm_i915_private *i915)
> +{
> +       intel_runtime_pm_get(i915);
> +
> +       i915_gem_suspend_gtt_mappings(i915);
> +
> +       i915_gem_freeze(i915);
> +       i915_gem_freeze_late(i915);
> +
> +       intel_runtime_pm_put(i915);
> +}
> +
> +static int igt_gem_hibernate(void *arg)
> +{
> +       struct drm_i915_private *i915 = arg;
> +       struct i915_gem_context *ctx;
> +       struct drm_file *file;
> +       int err;
> +
> +       file = mock_file(i915);
> +       if (IS_ERR(file))
> +               return PTR_ERR(file);
> +
> +       err = -ENOMEM;
> +       mutex_lock(&i915->drm.struct_mutex);
> +       ctx = live_context(i915, file);
> +       if (!IS_ERR(ctx))
> +               err = switch_to_context(i915, ctx);
> +       mutex_unlock(&i915->drm.struct_mutex);
> +       if (err)
> +               goto out;
> +
> +       err = pm_prepare(i915);
> +       if (err)
> +               goto out;
> +
> +       pm_hibernate(i915);
> +
> +       /* Here be dragons! */
> +       simulate_hibernate(i915);
> +
> +       pm_resume(i915);
> +
> +       mutex_lock(&i915->drm.struct_mutex);
> +       err = switch_to_context(i915, ctx);
> +       if (igt_flush_test(i915, I915_WAIT_LOCKED))
> +               err = -EIO;
> +       mutex_unlock(&i915->drm.struct_mutex);
> +out:
> +       mock_file_free(i915, file);
> +       return err;
> +}
> +
> +int i915_gem_live_selftests(struct drm_i915_private *i915)
> +{
> +       static const struct i915_subtest tests[] = {
> +               SUBTEST(igt_gem_suspend),
> +               SUBTEST(igt_gem_hibernate),
> +       };
> +
> +       return i915_subtests(tests, i915);
> +}
> diff --git a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
> index a00e2bd08bce..a15713cae3b3 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
> +++ b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
> @@ -17,6 +17,7 @@ selftest(objects, i915_gem_object_live_selftests)
>  selftest(dmabuf, i915_gem_dmabuf_live_selftests)
>  selftest(coherency, i915_gem_coherency_live_selftests)
>  selftest(gtt, i915_gem_gtt_live_selftests)
> +selftest(gem, i915_gem_live_selftests)
>  selftest(evict, i915_gem_evict_live_selftests)
>  selftest(hugepages, i915_gem_huge_page_live_selftests)
>  selftest(contexts, i915_gem_context_live_selftests)
> -- 
> 2.19.0.rc1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v4] drm/i915/selftests: Add a simple exerciser for suspend/hibernate
  2018-08-30 13:48 ` [PATCH v4] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
  2018-08-31  8:00   ` Chris Wilson
@ 2018-08-31  9:01   ` Bartminski, Jakub
  2018-08-31  9:09     ` Chris Wilson
  1 sibling, 1 reply; 19+ messages in thread
From: Bartminski, Jakub @ 2018-08-31  9:01 UTC (permalink / raw)
  To: intel-gfx, chris


[-- Attachment #1.1: Type: text/plain, Size: 8070 bytes --]

Looks good to me, thanks for the test case (btw maybe it's worth
mentioning in the commit message that the test fails without doing
gt.resume?)

Reviewed-by: Jakub Bartmiński <jakub.bartminski@intel.com>

On Thu, 2018-08-30 at 14:48 +0100, Chris Wilson wrote:
> Although we cannot do a full system-level test of suspend/hibernate
> from
> deep with the kernel selftests, we can exercise the GEM subsystem in
> isolation and simulate the external effects (such as losing stolen
> contents and trashing the register state).
> 
> v2: Don't forget to hold rpm
> v3: Suspend the GTT mappings, and more rpm!
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jakub Bartmiński <jakub.bartminski@intel.com>
> Cc: Matthew Auld <matthew.william.auld@gmail.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c               |   1 +
>  drivers/gpu/drm/i915/selftests/i915_gem.c     | 221
> ++++++++++++++++++
>  .../drm/i915/selftests/i915_live_selftests.h  |   1 +
>  3 files changed, 223 insertions(+)
>  create mode 100644 drivers/gpu/drm/i915/selftests/i915_gem.c
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c
> b/drivers/gpu/drm/i915/i915_gem.c
> index 0453eb42a1a3..7b7bbfe59697 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -6207,4 +6207,5 @@ int i915_gem_object_attach_phys(struct
> drm_i915_gem_object *obj, int align)
>  #include "selftests/huge_pages.c"
>  #include "selftests/i915_gem_object.c"
>  #include "selftests/i915_gem_coherency.c"
> +#include "selftests/i915_gem.c"
>  #endif
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c
> b/drivers/gpu/drm/i915/selftests/i915_gem.c
> new file mode 100644
> index 000000000000..e9cfc1fb0c07
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem.c
> @@ -0,0 +1,221 @@
> +/*
> + * SPDX-License-Identifier: MIT
> + *
> + * Copyright © 2018 Intel Corporation
> + */
> +
> +#include <linux/random.h>
> +
> +#include "../i915_selftest.h"
> +
> +#include "mock_context.h"
> +#include "igt_flush_test.h"
> +
> +static int switch_to_context(struct drm_i915_private *i915,
> +			     struct i915_gem_context *ctx)
> +{
> +	struct intel_engine_cs *engine;
> +	enum intel_engine_id id;
> +	int err = 0;
> +
> +	intel_runtime_pm_get(i915);
> +
> +	for_each_engine(engine, i915, id) {
> +		struct i915_request *rq;
> +
> +		rq = i915_request_alloc(engine, ctx);
> +		if (IS_ERR(rq)) {
> +			err = PTR_ERR(rq);
> +			break;
> +		}
> +
> +		i915_request_add(rq);
> +	}
> +
> +	intel_runtime_pm_put(i915);
> +
> +	return err;
> +}
> +
> +static int pm_prepare(struct drm_i915_private *i915)
> +{
> +	int err = 0;
> +
> +	if (i915_gem_suspend(i915)) {
> +		pr_err("i915_gem_suspend failed\n");
> +		err = -EINVAL;
> +	}
> +
> +	return err;
> +}
> +
> +static void trash_stolen(struct drm_i915_private *i915)
> +{
> +	struct i915_ggtt *ggtt = &i915->ggtt;
> +	const u64 slot = ggtt->error_capture.start;
> +	const resource_size_t size = resource_size(&i915->dsm);
> +	unsigned long page;
> +	u32 prng = 0x12345678;
> +
> +	for (page = 0; page < size; page += PAGE_SIZE) {
> +		const dma_addr_t dma = i915->dsm.start + page;
> +		u32 __iomem *s;
> +		int x;
> +
> +		ggtt->vm.insert_page(&ggtt->vm, dma, slot,
> I915_CACHE_NONE, 0);
> +
> +		s = io_mapping_map_atomic_wc(&ggtt->iomap, slot);
> +		for (x = 0; x < PAGE_SIZE / sizeof(u32); x++) {
> +			prng = next_pseudo_random32(prng);
> +			iowrite32(prng, &s[x]);
> +		}
> +		io_mapping_unmap_atomic(s);
> +	}
> +
> +	ggtt->vm.clear_range(&ggtt->vm, slot, PAGE_SIZE);
> +}
> +
> +static void simulate_hibernate(struct drm_i915_private *i915)
> +{
> +	intel_runtime_pm_get(i915);
> +
> +	/*
> +	 * As a final sting in the tail, invalidate stolen. Under a
> real S4,
> +	 * stolen is lost and needs to be refilled on resume.
> However, under
> +	 * CI we merely do S4-device testing (as full S4 is too
> unreliable
> +	 * for automated testing across a cluster), so to simulate
> the effect
> +	 * of stolen being trashed across S4, we trash it ourselves.
> +	 */
> +	trash_stolen(i915);
> +
> +	intel_runtime_pm_put(i915);
> +}
> +
> +static void pm_resume(struct drm_i915_private *i915)
> +{
> +	/*
> +	 * Both suspend and hibernate follow the same wakeup path
> and assume
> +	 * that runtime-pm just works.
> +	 */
> +	intel_runtime_pm_get(i915);
> +
> +	intel_engines_sanitize(i915);
> +	i915_gem_sanitize(i915);
> +	i915_gem_resume(i915);
> +
> +	intel_runtime_pm_put(i915);
> +}
> +
> +static void pm_suspend(struct drm_i915_private *i915)
> +{
> +	intel_runtime_pm_get(i915);
> +
> +	i915_gem_suspend_gtt_mappings(i915);
> +	i915_gem_suspend_late(i915);
> +
> +	intel_runtime_pm_put(i915);
> +}
> +
> +static int igt_gem_suspend(void *arg)
> +{
> +	struct drm_i915_private *i915 = arg;
> +	struct i915_gem_context *ctx;
> +	struct drm_file *file;
> +	int err;
> +
> +	file = mock_file(i915);
> +	if (IS_ERR(file))
> +		return PTR_ERR(file);
> +
> +	err = -ENOMEM;
> +	mutex_lock(&i915->drm.struct_mutex);
> +	ctx = live_context(i915, file);
> +	if (!IS_ERR(ctx))
> +		err = switch_to_context(i915, ctx);
> +	mutex_unlock(&i915->drm.struct_mutex);
> +	if (err)
> +		goto out;
> +
> +	err = pm_prepare(i915);
> +	if (err)
> +		goto out;
> +
> +	pm_suspend(i915);
> +
> +	/* Here be dragons! Note that with S3RST any S3 may become
> S4! */
> +	simulate_hibernate(i915);
> +
> +	pm_resume(i915);
> +
> +	mutex_lock(&i915->drm.struct_mutex);
> +	err = switch_to_context(i915, ctx);
> +	if (igt_flush_test(i915, I915_WAIT_LOCKED))
> +		err = -EIO;
> +	mutex_unlock(&i915->drm.struct_mutex);
> +out:
> +	mock_file_free(i915, file);
> +	return err;
> +}
> +
> +static void pm_hibernate(struct drm_i915_private *i915)
> +{
> +	intel_runtime_pm_get(i915);
> +
> +	i915_gem_suspend_gtt_mappings(i915);
> +
> +	i915_gem_freeze(i915);
> +	i915_gem_freeze_late(i915);
> +
> +	intel_runtime_pm_put(i915);
> +}
> +
> +static int igt_gem_hibernate(void *arg)
> +{
> +	struct drm_i915_private *i915 = arg;
> +	struct i915_gem_context *ctx;
> +	struct drm_file *file;
> +	int err;
> +
> +	file = mock_file(i915);
> +	if (IS_ERR(file))
> +		return PTR_ERR(file);
> +
> +	err = -ENOMEM;
> +	mutex_lock(&i915->drm.struct_mutex);
> +	ctx = live_context(i915, file);
> +	if (!IS_ERR(ctx))
> +		err = switch_to_context(i915, ctx);
> +	mutex_unlock(&i915->drm.struct_mutex);
> +	if (err)
> +		goto out;
> +
> +	err = pm_prepare(i915);
> +	if (err)
> +		goto out;
> +
> +	pm_hibernate(i915);
> +
> +	/* Here be dragons! */
> +	simulate_hibernate(i915);
> +
> +	pm_resume(i915);
> +
> +	mutex_lock(&i915->drm.struct_mutex);
> +	err = switch_to_context(i915, ctx);
> +	if (igt_flush_test(i915, I915_WAIT_LOCKED))
> +		err = -EIO;
> +	mutex_unlock(&i915->drm.struct_mutex);
> +out:
> +	mock_file_free(i915, file);
> +	return err;
> +}
> +
> +int i915_gem_live_selftests(struct drm_i915_private *i915)
> +{
> +	static const struct i915_subtest tests[] = {
> +		SUBTEST(igt_gem_suspend),
> +		SUBTEST(igt_gem_hibernate),
> +	};
> +
> +	return i915_subtests(tests, i915);
> +}
> diff --git a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
> b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
> index a00e2bd08bce..a15713cae3b3 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
> +++ b/drivers/gpu/drm/i915/selftests/i915_live_selftests.h
> @@ -17,6 +17,7 @@ selftest(objects, i915_gem_object_live_selftests)
>  selftest(dmabuf, i915_gem_dmabuf_live_selftests)
>  selftest(coherency, i915_gem_coherency_live_selftests)
>  selftest(gtt, i915_gem_gtt_live_selftests)
> +selftest(gem, i915_gem_live_selftests)
>  selftest(evict, i915_gem_evict_live_selftests)
>  selftest(hugepages, i915_gem_huge_page_live_selftests)
>  selftest(contexts, i915_gem_context_live_selftests)

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3278 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

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

* Re: [PATCH v4] drm/i915/selftests: Add a simple exerciser for suspend/hibernate
  2018-08-31  9:01   ` Bartminski, Jakub
@ 2018-08-31  9:09     ` Chris Wilson
  2018-08-31  9:23       ` Chris Wilson
  0 siblings, 1 reply; 19+ messages in thread
From: Chris Wilson @ 2018-08-31  9:09 UTC (permalink / raw)
  To: Bartminski, Jakub, intel-gfx

Quoting Bartminski, Jakub (2018-08-31 10:01:57)
> Looks good to me, thanks for the test case (btw maybe it's worth
> mentioning in the commit message that the test fails without doing
> gt.resume?)

That would mean doing actual work to dig out the original failing bug
reports!
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v4] drm/i915/selftests: Add a simple exerciser for suspend/hibernate
  2018-08-31  9:09     ` Chris Wilson
@ 2018-08-31  9:23       ` Chris Wilson
  0 siblings, 0 replies; 19+ messages in thread
From: Chris Wilson @ 2018-08-31  9:23 UTC (permalink / raw)
  To: Bartminski, Jakub, intel-gfx

Quoting Chris Wilson (2018-08-31 10:09:00)
> Quoting Bartminski, Jakub (2018-08-31 10:01:57)
> > Looks good to me, thanks for the test case (btw maybe it's worth
> > mentioning in the commit message that the test fails without doing
> > gt.resume?)
> 
> That would mean doing actual work to dig out the original failing bug
> reports!

Added,
    References: https://bugs.freedesktop.org/show_bug.cgi?id=96526
    References: 5ab57c702069 ("drm/i915: Flush logical context image out to memory upon suspend")
and pushed. Pleasure to be of service,
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-08-31  9:24 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29 22:20 [PATCH] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
2018-08-29 23:01 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-08-29 23:01 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-08-30  9:52 ` [PATCH v2] " Chris Wilson
2018-08-30 10:47   ` Bartminski, Jakub
2018-08-30 10:59     ` Chris Wilson
2018-08-30 11:31 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev2) Patchwork
2018-08-30 11:51 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-30 12:07 ` [PATCH v3] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
2018-08-30 13:21 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev3) Patchwork
2018-08-30 13:45 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-30 13:48 ` [PATCH v4] drm/i915/selftests: Add a simple exerciser for suspend/hibernate Chris Wilson
2018-08-31  8:00   ` Chris Wilson
2018-08-31  9:01   ` Bartminski, Jakub
2018-08-31  9:09     ` Chris Wilson
2018-08-31  9:23       ` Chris Wilson
2018-08-30 15:09 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Add a simple exerciser for suspend/hibernate (rev4) Patchwork
2018-08-30 15:29 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-30 19:57 ` ✓ 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.