* [igt-dev] [CI i-g-t] tests/gem_ctx_sse: Explore..
@ 2018-08-23 8:01 Tvrtko Ursulin
2018-08-23 9:25 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Tvrtko Ursulin @ 2018-08-23 8:01 UTC (permalink / raw)
To: igt-dev; +Cc: Tvrtko Ursulin
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
tests/Makefile.sources | 1 +
tests/gem_ctx_sseu.c | 183 +++++++++++++++++++++++++++++++++++++++++
tests/meson.build | 1 +
3 files changed, 185 insertions(+)
create mode 100644 tests/gem_ctx_sseu.c
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index c84933f1d971..f8f2c8d67d72 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -56,6 +56,7 @@ TESTS_progs = \
gem_ctx_exec \
gem_ctx_isolation \
gem_ctx_param \
+ gem_ctx_sseu \
gem_ctx_switch \
gem_ctx_thrash \
gem_double_irq_loop \
diff --git a/tests/gem_ctx_sseu.c b/tests/gem_ctx_sseu.c
new file mode 100644
index 000000000000..fe2e6081df9b
--- /dev/null
+++ b/tests/gem_ctx_sseu.c
@@ -0,0 +1,183 @@
+/*
+ * Copyright © 2017 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * Authors:
+ * Lionel Landwerlin <lionel.g.landwerlin@intel.com>
+ *
+ */
+
+#include "igt.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <errno.h>
+#include <time.h>
+#include <sys/wait.h>
+
+#include "igt_perf.h"
+#include "igt_sysfs.h"
+#include "ioctl_wrappers.h"
+
+#define MI_STORE_REGISTER_MEM (0x24 << 23)
+
+#define MI_SET_PREDICATE (0x1 << 23)
+#define MI_SET_PREDICATE_NOOP_NEVER (0)
+#define MI_SET_PREDICATE_NOOP_RESULT2_CLEAR (1)
+#define MI_SET_PREDICATE_NOOP_RESULT2_SET (2)
+#define MI_SET_PREDICATE_NOOP_RESULT_CLEAR (3)
+#define MI_SET_PREDICATE_NOOP_RESULT_SET (4)
+#define MI_SET_PREDICATE_1_SLICES (5)
+#define MI_SET_PREDICATE_2_SLICES (6)
+#define MI_SET_PREDICATE_3_SLICES (7)
+
+#define GEN8_R_PWR_CLK_STATE 0x20C8
+#define GEN8_RPCS_ENABLE (1 << 31)
+#define GEN8_RPCS_S_CNT_ENABLE (1 << 18)
+#define GEN8_RPCS_S_CNT_SHIFT 15
+#define GEN8_RPCS_S_CNT_MASK (0x7 << GEN8_RPCS_S_CNT_SHIFT)
+#define GEN8_RPCS_SS_CNT_ENABLE (1 << 11)
+#define GEN8_RPCS_SS_CNT_SHIFT 8
+#define GEN8_RPCS_SS_CNT_MASK (0x7 << GEN8_RPCS_SS_CNT_SHIFT)
+#define GEN8_RPCS_EU_MAX_SHIFT 4
+#define GEN8_RPCS_EU_MAX_MASK (0xf << GEN8_RPCS_EU_MAX_SHIFT)
+#define GEN8_RPCS_EU_MIN_SHIFT 0
+#define GEN8_RPCS_EU_MIN_MASK (0xf << GEN8_RPCS_EU_MIN_SHIFT)
+
+static uint32_t *
+fill_relocation(uint32_t *batch,
+ struct drm_i915_gem_relocation_entry *reloc,
+ uint32_t gem_handle, uint32_t delta, /* in bytes */
+ uint32_t offset, /* in dwords */
+ uint32_t read_domains, uint32_t write_domains)
+{
+ reloc->target_handle = gem_handle;
+ reloc->delta = delta;
+ reloc->offset = offset * sizeof(uint32_t);
+ reloc->presumed_offset = 0;
+ reloc->read_domains = read_domains;
+ reloc->write_domain = write_domains;
+
+ *batch++ = delta;
+ *batch++ = 0;
+
+ return batch;
+}
+
+
+static uint32_t
+read_rpcs_reg(int fd, uint32_t context, uint32_t expected_slices)
+{
+ struct drm_i915_gem_execbuffer2 execbuf = { };
+ struct drm_i915_gem_relocation_entry relocs = { };
+ struct drm_i915_gem_exec_object2 obj[2];
+ uint32_t *batch, *b;
+ uint32_t rpcs;
+
+ memset(obj, 0, sizeof(obj));
+ obj[0].handle = gem_create(fd, 4096);
+ obj[1].handle = gem_create(fd, 4096);
+
+ batch = b = gem_mmap__cpu(fd, obj[1].handle, 0, 4096,
+ PROT_READ | PROT_WRITE);
+
+ *b++ = MI_SET_PREDICATE | (1 - 1) |
+ (MI_SET_PREDICATE_1_SLICES + expected_slices - 1);
+
+ *b++ = MI_STORE_REGISTER_MEM | (4 - 2);
+ *b++ = GEN8_R_PWR_CLK_STATE;
+ b = fill_relocation(b, &relocs, obj[0].handle, 0, b - batch,
+ I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER);
+
+ *b++ = MI_SET_PREDICATE | (1 - 1) | MI_SET_PREDICATE_NOOP_NEVER;
+
+ *b++ = MI_BATCH_BUFFER_END;
+
+ gem_munmap(batch, 4096);
+
+ obj[1].relocation_count = 1;
+ obj[1].relocs_ptr = to_user_pointer(&relocs);
+
+ execbuf.buffers_ptr = to_user_pointer(obj);
+ execbuf.buffer_count = ARRAY_SIZE(obj);
+ i915_execbuffer2_set_context_id(execbuf, context);
+
+ gem_execbuf(fd, &execbuf);
+
+ gem_read(fd, obj[0].handle, 0, &rpcs, sizeof(rpcs));
+
+ gem_close(fd, obj[0].handle);
+ gem_close(fd, obj[1].handle);
+
+ return rpcs;
+}
+
+static void test_slices(int fd)
+{
+ uint32_t ctx = gem_context_create(fd);
+ const unsigned int max = 3;
+ unsigned int cnt = 0;
+ unsigned int i;
+
+ for (i = 1; i <= max; i++) {
+ uint32_t reg = read_rpcs_reg(fd, ctx, i);
+ uint8_t s = (reg & GEN8_RPCS_S_CNT_MASK) >>
+ GEN8_RPCS_S_CNT_SHIFT;
+ uint8_t ss = (reg & GEN8_RPCS_SS_CNT_MASK) >>
+ GEN8_RPCS_SS_CNT_SHIFT;
+
+ igt_info("%u slices: rpcs=%x -> %u%sx%u%s\n",
+ i, reg,
+ s, reg & GEN8_RPCS_S_CNT_ENABLE ? "*" : "",
+ ss, reg & GEN8_RPCS_SS_CNT_ENABLE ? "*" : "");
+
+ if (reg)
+ cnt++;
+ }
+
+ gem_context_destroy(fd, ctx);
+}
+
+igt_main
+{
+ int fd;
+
+ igt_fixture {
+ int gen;
+
+ fd = drm_open_driver(DRIVER_INTEL);
+ igt_require_gem(fd);
+
+ gen = intel_gen(intel_get_drm_devid(fd));
+
+ igt_require(gen >= 8 && gen < 10);
+ }
+
+ igt_subtest("slices")
+ test_slices(fd);
+
+ igt_fixture {
+ close(fd);
+ }
+}
diff --git a/tests/meson.build b/tests/meson.build
index 17deb945ec95..9187f4438280 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -33,6 +33,7 @@ test_progs = [
'gem_ctx_exec',
'gem_ctx_isolation',
'gem_ctx_param',
+ 'gem_ctx_sseu',
'gem_ctx_switch',
'gem_ctx_thrash',
'gem_double_irq_loop',
--
2.17.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for tests/gem_ctx_sse: Explore..
2018-08-23 8:01 [igt-dev] [CI i-g-t] tests/gem_ctx_sse: Explore Tvrtko Ursulin
@ 2018-08-23 9:25 ` Patchwork
2018-08-23 10:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-08-23 9:25 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: igt-dev
== Series Details ==
Series: tests/gem_ctx_sse: Explore..
URL : https://patchwork.freedesktop.org/series/48607/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4693 -> IGTPW_1738 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48607/revisions/1/mbox/
== Known issues ==
Here are the changes found in IGTPW_1738 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_hangcheck:
fi-bdw-5557u: PASS -> DMESG-FAIL (fdo#106560)
igt@gem_exec_suspend@basic-s3:
{fi-kbl-soraka}: NOTRUN -> INCOMPLETE (fdo#107556)
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: PASS -> DMESG-FAIL (fdo#102614)
igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
{fi-byt-clapper}: PASS -> FAIL (fdo#107362, fdo#103191)
igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
fi-skl-guc: PASS -> FAIL (fdo#103191)
igt@prime_vgem@basic-fence-flip:
fi-ilk-650: PASS -> FAIL (fdo#104008)
==== Possible fixes ====
igt@drv_selftest@live_hangcheck:
fi-kbl-7560u: DMESG-FAIL (fdo#106947, fdo#106560) -> PASS
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
{fi-byt-clapper}: FAIL (fdo#107362) -> PASS
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
{fi-byt-clapper}: FAIL (fdo#107362, fdo#103191) -> PASS
igt@pm_rpm@basic-pci-d3-state:
fi-skl-6600u: FAIL -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
== 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 ==
* IGT: IGT_4607 -> IGTPW_1738
CI_DRM_4693: f22275363ffa04dbd719032810154e857110cd75 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1738: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1738/
IGT_4607: 6e0b3e7a2d241af36f8c6b1cc335aa1db3532d29 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@gem_ctx_sseu@slices
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1738/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for tests/gem_ctx_sse: Explore..
2018-08-23 8:01 [igt-dev] [CI i-g-t] tests/gem_ctx_sse: Explore Tvrtko Ursulin
2018-08-23 9:25 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-08-23 10:44 ` Patchwork
2018-08-23 11:04 ` [igt-dev] [CI i-g-t v2] " Tvrtko Ursulin
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-08-23 10:44 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: igt-dev
== Series Details ==
Series: tests/gem_ctx_sse: Explore..
URL : https://patchwork.freedesktop.org/series/48607/
State : success
== Summary ==
= CI Bug Log - changes from IGT_4607_full -> IGTPW_1738_full =
== Summary - WARNING ==
Minor unknown changes coming with IGTPW_1738_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_1738_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48607/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1738_full:
=== IGT changes ===
==== Warnings ====
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-msflip-blt:
shard-hsw: PASS -> SKIP
igt@pm_rc6_residency@rc6-accuracy:
shard-kbl: SKIP -> PASS
== Known issues ==
Here are the changes found in IGTPW_1738_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_await@wide-contexts:
shard-glk: PASS -> FAIL (fdo#105900)
igt@kms_available_modes_crc@available_mode_test_crc:
shard-snb: PASS -> FAIL (fdo#106641)
igt@kms_busy@extended-pageflip-hang-newfb-render-d:
shard-snb: SKIP -> INCOMPLETE (fdo#105411)
igt@kms_vblank@pipe-b-ts-continuation-suspend:
shard-kbl: PASS -> INCOMPLETE (fdo#103665)
==== Possible fixes ====
igt@drv_suspend@debugfs-reader:
shard-snb: INCOMPLETE (fdo#105411) -> PASS +1
igt@drv_suspend@fence-restore-tiled2untiled:
shard-kbl: DMESG-WARN (fdo#103313) -> PASS
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-kbl: INCOMPLETE (fdo#106023, fdo#103665) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-wc:
shard-glk: FAIL (fdo#103167) -> 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#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* IGT: IGT_4607 -> IGTPW_1738
* Linux: CI_DRM_4690 -> CI_DRM_4693
CI_DRM_4690: 5b8042159e2b05425c098868ed6fac9518ee638d @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4693: f22275363ffa04dbd719032810154e857110cd75 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1738: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1738/
IGT_4607: 6e0b3e7a2d241af36f8c6b1cc335aa1db3532d29 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1738/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] [CI i-g-t v2] tests/gem_ctx_sse: Explore..
2018-08-23 8:01 [igt-dev] [CI i-g-t] tests/gem_ctx_sse: Explore Tvrtko Ursulin
2018-08-23 9:25 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-08-23 10:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2018-08-23 11:04 ` Tvrtko Ursulin
2018-08-23 11:25 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/gem_ctx_sse: Explore.. (rev2) Patchwork
2018-08-23 12:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
4 siblings, 0 replies; 7+ messages in thread
From: Tvrtko Ursulin @ 2018-08-23 11:04 UTC (permalink / raw)
To: igt-dev; +Cc: Tvrtko Ursulin
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
v2: BAT..
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
tests/Makefile.sources | 1 +
tests/gem_ctx_sseu.c | 183 ++++++++++++++++++++++++++
tests/intel-ci/fast-feedback.testlist | 1 +
tests/meson.build | 1 +
4 files changed, 186 insertions(+)
create mode 100644 tests/gem_ctx_sseu.c
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index c84933f1d971..f8f2c8d67d72 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -56,6 +56,7 @@ TESTS_progs = \
gem_ctx_exec \
gem_ctx_isolation \
gem_ctx_param \
+ gem_ctx_sseu \
gem_ctx_switch \
gem_ctx_thrash \
gem_double_irq_loop \
diff --git a/tests/gem_ctx_sseu.c b/tests/gem_ctx_sseu.c
new file mode 100644
index 000000000000..fe2e6081df9b
--- /dev/null
+++ b/tests/gem_ctx_sseu.c
@@ -0,0 +1,183 @@
+/*
+ * Copyright © 2017 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * Authors:
+ * Lionel Landwerlin <lionel.g.landwerlin@intel.com>
+ *
+ */
+
+#include "igt.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <errno.h>
+#include <time.h>
+#include <sys/wait.h>
+
+#include "igt_perf.h"
+#include "igt_sysfs.h"
+#include "ioctl_wrappers.h"
+
+#define MI_STORE_REGISTER_MEM (0x24 << 23)
+
+#define MI_SET_PREDICATE (0x1 << 23)
+#define MI_SET_PREDICATE_NOOP_NEVER (0)
+#define MI_SET_PREDICATE_NOOP_RESULT2_CLEAR (1)
+#define MI_SET_PREDICATE_NOOP_RESULT2_SET (2)
+#define MI_SET_PREDICATE_NOOP_RESULT_CLEAR (3)
+#define MI_SET_PREDICATE_NOOP_RESULT_SET (4)
+#define MI_SET_PREDICATE_1_SLICES (5)
+#define MI_SET_PREDICATE_2_SLICES (6)
+#define MI_SET_PREDICATE_3_SLICES (7)
+
+#define GEN8_R_PWR_CLK_STATE 0x20C8
+#define GEN8_RPCS_ENABLE (1 << 31)
+#define GEN8_RPCS_S_CNT_ENABLE (1 << 18)
+#define GEN8_RPCS_S_CNT_SHIFT 15
+#define GEN8_RPCS_S_CNT_MASK (0x7 << GEN8_RPCS_S_CNT_SHIFT)
+#define GEN8_RPCS_SS_CNT_ENABLE (1 << 11)
+#define GEN8_RPCS_SS_CNT_SHIFT 8
+#define GEN8_RPCS_SS_CNT_MASK (0x7 << GEN8_RPCS_SS_CNT_SHIFT)
+#define GEN8_RPCS_EU_MAX_SHIFT 4
+#define GEN8_RPCS_EU_MAX_MASK (0xf << GEN8_RPCS_EU_MAX_SHIFT)
+#define GEN8_RPCS_EU_MIN_SHIFT 0
+#define GEN8_RPCS_EU_MIN_MASK (0xf << GEN8_RPCS_EU_MIN_SHIFT)
+
+static uint32_t *
+fill_relocation(uint32_t *batch,
+ struct drm_i915_gem_relocation_entry *reloc,
+ uint32_t gem_handle, uint32_t delta, /* in bytes */
+ uint32_t offset, /* in dwords */
+ uint32_t read_domains, uint32_t write_domains)
+{
+ reloc->target_handle = gem_handle;
+ reloc->delta = delta;
+ reloc->offset = offset * sizeof(uint32_t);
+ reloc->presumed_offset = 0;
+ reloc->read_domains = read_domains;
+ reloc->write_domain = write_domains;
+
+ *batch++ = delta;
+ *batch++ = 0;
+
+ return batch;
+}
+
+
+static uint32_t
+read_rpcs_reg(int fd, uint32_t context, uint32_t expected_slices)
+{
+ struct drm_i915_gem_execbuffer2 execbuf = { };
+ struct drm_i915_gem_relocation_entry relocs = { };
+ struct drm_i915_gem_exec_object2 obj[2];
+ uint32_t *batch, *b;
+ uint32_t rpcs;
+
+ memset(obj, 0, sizeof(obj));
+ obj[0].handle = gem_create(fd, 4096);
+ obj[1].handle = gem_create(fd, 4096);
+
+ batch = b = gem_mmap__cpu(fd, obj[1].handle, 0, 4096,
+ PROT_READ | PROT_WRITE);
+
+ *b++ = MI_SET_PREDICATE | (1 - 1) |
+ (MI_SET_PREDICATE_1_SLICES + expected_slices - 1);
+
+ *b++ = MI_STORE_REGISTER_MEM | (4 - 2);
+ *b++ = GEN8_R_PWR_CLK_STATE;
+ b = fill_relocation(b, &relocs, obj[0].handle, 0, b - batch,
+ I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER);
+
+ *b++ = MI_SET_PREDICATE | (1 - 1) | MI_SET_PREDICATE_NOOP_NEVER;
+
+ *b++ = MI_BATCH_BUFFER_END;
+
+ gem_munmap(batch, 4096);
+
+ obj[1].relocation_count = 1;
+ obj[1].relocs_ptr = to_user_pointer(&relocs);
+
+ execbuf.buffers_ptr = to_user_pointer(obj);
+ execbuf.buffer_count = ARRAY_SIZE(obj);
+ i915_execbuffer2_set_context_id(execbuf, context);
+
+ gem_execbuf(fd, &execbuf);
+
+ gem_read(fd, obj[0].handle, 0, &rpcs, sizeof(rpcs));
+
+ gem_close(fd, obj[0].handle);
+ gem_close(fd, obj[1].handle);
+
+ return rpcs;
+}
+
+static void test_slices(int fd)
+{
+ uint32_t ctx = gem_context_create(fd);
+ const unsigned int max = 3;
+ unsigned int cnt = 0;
+ unsigned int i;
+
+ for (i = 1; i <= max; i++) {
+ uint32_t reg = read_rpcs_reg(fd, ctx, i);
+ uint8_t s = (reg & GEN8_RPCS_S_CNT_MASK) >>
+ GEN8_RPCS_S_CNT_SHIFT;
+ uint8_t ss = (reg & GEN8_RPCS_SS_CNT_MASK) >>
+ GEN8_RPCS_SS_CNT_SHIFT;
+
+ igt_info("%u slices: rpcs=%x -> %u%sx%u%s\n",
+ i, reg,
+ s, reg & GEN8_RPCS_S_CNT_ENABLE ? "*" : "",
+ ss, reg & GEN8_RPCS_SS_CNT_ENABLE ? "*" : "");
+
+ if (reg)
+ cnt++;
+ }
+
+ gem_context_destroy(fd, ctx);
+}
+
+igt_main
+{
+ int fd;
+
+ igt_fixture {
+ int gen;
+
+ fd = drm_open_driver(DRIVER_INTEL);
+ igt_require_gem(fd);
+
+ gen = intel_gen(intel_get_drm_devid(fd));
+
+ igt_require(gen >= 8 && gen < 10);
+ }
+
+ igt_subtest("slices")
+ test_slices(fd);
+
+ igt_fixture {
+ close(fd);
+ }
+}
diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index c625904d546f..d4a5ca444607 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -18,6 +18,7 @@ igt@gem_ctx_create@basic-files
igt@gem_ctx_exec@basic
igt@gem_ctx_param@basic
igt@gem_ctx_param@basic-default
+igt@gem_ctx_sseu@slices
igt@gem_ctx_switch@basic-default
igt@gem_ctx_switch@basic-default-heavy
igt@gem_exec_basic@basic-blt
diff --git a/tests/meson.build b/tests/meson.build
index 17deb945ec95..9187f4438280 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -33,6 +33,7 @@ test_progs = [
'gem_ctx_exec',
'gem_ctx_isolation',
'gem_ctx_param',
+ 'gem_ctx_sseu',
'gem_ctx_switch',
'gem_ctx_thrash',
'gem_double_irq_loop',
--
2.17.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for tests/gem_ctx_sse: Explore.. (rev2)
2018-08-23 8:01 [igt-dev] [CI i-g-t] tests/gem_ctx_sse: Explore Tvrtko Ursulin
` (2 preceding siblings ...)
2018-08-23 11:04 ` [igt-dev] [CI i-g-t v2] " Tvrtko Ursulin
@ 2018-08-23 11:25 ` Patchwork
2018-08-23 11:36 ` Tvrtko Ursulin
2018-08-23 12:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
4 siblings, 1 reply; 7+ messages in thread
From: Patchwork @ 2018-08-23 11:25 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: igt-dev
== Series Details ==
Series: tests/gem_ctx_sse: Explore.. (rev2)
URL : https://patchwork.freedesktop.org/series/48607/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4693 -> IGTPW_1739 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48607/revisions/2/mbox/
== Known issues ==
Here are the changes found in IGTPW_1739 that come from known issues:
=== IGT changes ===
==== Possible fixes ====
igt@drv_selftest@live_hangcheck:
fi-kbl-7560u: DMESG-FAIL (fdo#106560, fdo#106947) -> PASS
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
{fi-byt-clapper}: FAIL (fdo#107362) -> PASS
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
{fi-byt-clapper}: FAIL (fdo#103191, fdo#107362) -> PASS
igt@pm_rpm@basic-pci-d3-state:
fi-skl-6600u: FAIL -> PASS
==== Warnings ====
{igt@kms_psr@primary_page_flip}:
fi-cnl-psr: DMESG-FAIL (fdo#107372) -> DMESG-WARN (fdo#107372)
{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#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107372 https://bugs.freedesktop.org/show_bug.cgi?id=107372
== Participating hosts (53 -> 46) ==
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-skl-guc fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-u
== Build changes ==
* IGT: IGT_4607 -> IGTPW_1739
CI_DRM_4693: f22275363ffa04dbd719032810154e857110cd75 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1739: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1739/
IGT_4607: 6e0b3e7a2d241af36f8c6b1cc335aa1db3532d29 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@gem_ctx_sseu@slices
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1739/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] ✓ Fi.CI.BAT: success for tests/gem_ctx_sse: Explore.. (rev2)
2018-08-23 11:25 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/gem_ctx_sse: Explore.. (rev2) Patchwork
@ 2018-08-23 11:36 ` Tvrtko Ursulin
0 siblings, 0 replies; 7+ messages in thread
From: Tvrtko Ursulin @ 2018-08-23 11:36 UTC (permalink / raw)
To: igt-dev, Patchwork, Tvrtko Ursulin
On 23/08/2018 12:25, Patchwork wrote:
> == Series Details ==
>
> Series: tests/gem_ctx_sse: Explore.. (rev2)
> URL : https://patchwork.freedesktop.org/series/48607/
> State : success
>
> == Summary ==
>
> = CI Bug Log - changes from CI_DRM_4693 -> IGTPW_1739 =
>
> == Summary - SUCCESS ==
>
> No regressions found.
>
> External URL: https://patchwork.freedesktop.org/api/1.0/series/48607/revisions/2/mbox/
>
> == Known issues ==
>
> Here are the changes found in IGTPW_1739 that come from known issues:
>
> === IGT changes ===
>
> ==== Possible fixes ====
>
> igt@drv_selftest@live_hangcheck:
> fi-kbl-7560u: DMESG-FAIL (fdo#106560, fdo#106947) -> PASS
>
> igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
> {fi-byt-clapper}: FAIL (fdo#107362) -> PASS
>
> igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
> {fi-byt-clapper}: FAIL (fdo#103191, fdo#107362) -> PASS
>
> igt@pm_rpm@basic-pci-d3-state:
> fi-skl-6600u: FAIL -> PASS
>
>
> ==== Warnings ====
>
> {igt@kms_psr@primary_page_flip}:
> fi-cnl-psr: DMESG-FAIL (fdo#107372) -> DMESG-WARN (fdo#107372)
>
>
> {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#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
> fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
> fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
> fdo#107372 https://bugs.freedesktop.org/show_bug.cgi?id=107372
>
>
> == Participating hosts (53 -> 46) ==
>
> Missing (7): fi-ilk-m540 fi-hsw-4200u fi-skl-guc fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-u
>
>
> == Build changes ==
>
> * IGT: IGT_4607 -> IGTPW_1739
>
> CI_DRM_4693: f22275363ffa04dbd719032810154e857110cd75 @ git://anongit.freedesktop.org/gfx-ci/linux
> IGTPW_1739: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1739/
> IGT_4607: 6e0b3e7a2d241af36f8c6b1cc335aa1db3532d29 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
>
>
>
> == Testlist changes ==
>
> +igt@gem_ctx_sseu@slices
This showed that on 1x3x6 BXT and GLK the undocumented 0b11 written into
R_PWR_CLK_STATE::SScount is preserved until read-back. Next question is
whether the documentation is incorrect, and if not, what does the
hardware do with it.
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for tests/gem_ctx_sse: Explore.. (rev2)
2018-08-23 8:01 [igt-dev] [CI i-g-t] tests/gem_ctx_sse: Explore Tvrtko Ursulin
` (3 preceding siblings ...)
2018-08-23 11:25 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/gem_ctx_sse: Explore.. (rev2) Patchwork
@ 2018-08-23 12:13 ` Patchwork
4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-08-23 12:13 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: igt-dev
== Series Details ==
Series: tests/gem_ctx_sse: Explore.. (rev2)
URL : https://patchwork.freedesktop.org/series/48607/
State : success
== Summary ==
= CI Bug Log - changes from IGT_4607_full -> IGTPW_1739_full =
== Summary - WARNING ==
Minor unknown changes coming with IGTPW_1739_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_1739_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48607/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1739_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_blt@normal-min:
shard-glk: PASS -> SKIP
shard-snb: PASS -> SKIP
igt@pm_rc6_residency@rc6-accuracy:
shard-kbl: SKIP -> PASS
== Known issues ==
Here are the changes found in IGTPW_1739_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-kbl: PASS -> INCOMPLETE (fdo#103665, fdo#106023)
igt@kms_available_modes_crc@available_mode_test_crc:
shard-snb: PASS -> FAIL (fdo#106641)
==== Possible fixes ====
igt@drv_suspend@debugfs-reader:
shard-snb: INCOMPLETE (fdo#105411) -> PASS +1
igt@drv_suspend@fence-restore-tiled2untiled:
shard-kbl: DMESG-WARN (fdo#103313) -> PASS
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-kbl: INCOMPLETE (fdo#103665, fdo#106023) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-wc:
shard-glk: FAIL (fdo#103167) -> PASS
igt@kms_rotation_crc@primary-rotation-180:
shard-snb: FAIL (fdo#103925) -> 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#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* IGT: IGT_4607 -> IGTPW_1739
* Linux: CI_DRM_4690 -> CI_DRM_4693
CI_DRM_4690: 5b8042159e2b05425c098868ed6fac9518ee638d @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4693: f22275363ffa04dbd719032810154e857110cd75 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1739: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1739/
IGT_4607: 6e0b3e7a2d241af36f8c6b1cc335aa1db3532d29 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1739/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-08-23 12:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-23 8:01 [igt-dev] [CI i-g-t] tests/gem_ctx_sse: Explore Tvrtko Ursulin
2018-08-23 9:25 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-08-23 10:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-08-23 11:04 ` [igt-dev] [CI i-g-t v2] " Tvrtko Ursulin
2018-08-23 11:25 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/gem_ctx_sse: Explore.. (rev2) Patchwork
2018-08-23 11:36 ` Tvrtko Ursulin
2018-08-23 12:13 ` [igt-dev] ✓ 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.