* [igt-dev] [PATCH v6 0/1] test/gem_create: exercise gem_create_ext_set_pat
@ 2023-05-26 17:22 fei.yang
2023-05-26 17:22 ` [igt-dev] [PATCH v6 1/1] " fei.yang
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: fei.yang @ 2023-05-26 17:22 UTC (permalink / raw)
To: igt-dev; +Cc: Fei Yang
From: Fei Yang <fei.yang@intel.com>
This is the first draft of a new test case exercising the set_pat
extension for GEM_CREATE.
v2: make sure {get|set}_caching ioctls are disabled.
v3: move header change to lib/i915/i915_drm_local.h, will submit a
separate patch for include/uapi/drm/i915_drm.h after the kernel
change lands in upstream.
v4: GEM_CREATE returns -EINVAL if set_pat is unsupported.
v5: address comments from Kamil Konieczny
v6: checking {get|set}_caching ioctls only for iGPU.
Fei Yang (1):
test/gem_create: exercise gem_create_ext_set_pat
lib/i915/i915_drm_local.h | 34 +++++++++++++++++++++
tests/i915/gem_create.c | 64 +++++++++++++++++++++++++++++++++++++++
2 files changed, 98 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [igt-dev] [PATCH v6 1/1] test/gem_create: exercise gem_create_ext_set_pat
2023-05-26 17:22 [igt-dev] [PATCH v6 0/1] test/gem_create: exercise gem_create_ext_set_pat fei.yang
@ 2023-05-26 17:22 ` fei.yang
2023-05-29 11:08 ` Kamil Konieczny
2023-05-26 18:17 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-05-27 17:51 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2 siblings, 1 reply; 5+ messages in thread
From: fei.yang @ 2023-05-26 17:22 UTC (permalink / raw)
To: igt-dev; +Cc: Fei Yang
From: Fei Yang <fei.yang@intel.com>
Gem_create uAPI has been extended with capability of setting PAT index.
Add a test case to exercise it.
PAT index is a page attribute that gets programmed into Page Table
Entry (PTE) for caching policy control. Please refer to kernel patch
for implementation details.
https://patchwork.freedesktop.org/series/116870/
Signed-off-by: Fei Yang <fei.yang@intel.com>
---
lib/i915/i915_drm_local.h | 34 +++++++++++++++++++++
tests/i915/gem_create.c | 64 +++++++++++++++++++++++++++++++++++++++
2 files changed, 98 insertions(+)
diff --git a/lib/i915/i915_drm_local.h b/lib/i915/i915_drm_local.h
index bb2ebef3..0f47578c 100644
--- a/lib/i915/i915_drm_local.h
+++ b/lib/i915/i915_drm_local.h
@@ -41,6 +41,40 @@ extern "C" {
#define __I915_PMU_RC6_RESIDENCY(gt) ___I915_PMU_OTHER(gt, 3)
#define __I915_PMU_SOFTWARE_GT_AWAKE_TIME(gt) ___I915_PMU_OTHER(gt, 4)
+#define I915_GEM_CREATE_EXT_SET_PAT 2
+
+/**
+ * struct drm_i915_gem_create_ext_set_pat - The
+ * I915_GEM_CREATE_EXT_SET_PAT extension.
+ *
+ * If this extension is provided, the specified caching policy (PAT index) is
+ * applied to the buffer object.
+ *
+ * Below is an example on how to create an object with specific caching policy:
+ *
+ * .. code-block:: C
+ *
+ * struct drm_i915_gem_create_ext_set_pat set_pat_ext = {
+ * .base = { .name = I915_GEM_CREATE_EXT_SET_PAT },
+ * .pat_index = 0,
+ * };
+ * struct drm_i915_gem_create_ext create_ext = {
+ * .size = PAGE_SIZE,
+ * .extensions = (uintptr_t)&set_pat_ext,
+ * };
+ *
+ * int err = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE_EXT, &create_ext);
+ * if (err) ...
+ */
+struct drm_i915_gem_create_ext_set_pat {
+ /** @base: Extension link. See struct i915_user_extension. */
+ struct i915_user_extension base;
+ /** @pat_index: PAT index to be set */
+ __u32 pat_index;
+ /** @rsvd: reserved for future use */
+ __u32 rsvd;
+};
+
#if defined(__cplusplus)
}
#endif
diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c
index 3320717f..e9e8216d 100644
--- a/tests/i915/gem_create.c
+++ b/tests/i915/gem_create.c
@@ -635,6 +635,66 @@ static void create_ext_placement_each(int fd)
free(regions);
}
+/**
+ * TEST: GEM create uAPI
+ * Category: Infrastructure
+ * Description: Tests the DRM_IOCTL_I915_GEM_CREATE_EXT ioctl.
+ * Feature: core
+ * Functionality: Create GEM object with specific PAT index
+ * Run type: BAT
+ * Sub-category: i915
+ * Test category: GEM_Legacy
+ *
+ * SUBTEST: create-ext-set-pat
+ */
+static void create_ext_set_pat(int fd)
+{
+ struct drm_i915_gem_create_ext_set_pat setparam_pat = {
+ .base = { .name = I915_GEM_CREATE_EXT_SET_PAT },
+ .pat_index = 0,
+ };
+ struct drm_i915_gem_create_ext_set_pat setparam_inv_pat = {
+ .base = { .name = I915_GEM_CREATE_EXT_SET_PAT },
+ .pat_index = 65,
+ };
+ struct drm_i915_gem_caching arg;
+ uint64_t size;
+ uint32_t handle;
+ int ret;
+
+ size = PAGE_SIZE;
+
+ ret = __gem_create_ext(fd, &size, 0, &handle, &setparam_pat.base);
+
+ /*
+ * With a valid PAT index specified, returning -EINVAL here
+ * indicates set_pat extension is not supported
+ */
+ if (ret == -EINVAL)
+ igt_skip("I915_GEM_CREATE_EXT_SET_PAT is not supported\n");
+ igt_assert(ret == 0);
+
+ /*
+ * {set|get}_caching ioctl should fail for objects created with set_pat
+ * Also note, dGPU doesn't support {set|get}_caching ioctl, so checking
+ * this for iGPU only.
+ */
+ if (!gem_has_lmem(fd)) {
+ igt_assert_eq(__gem_set_caching(fd, handle, 1), -EOPNOTSUPP);
+
+ memset(&arg, 0, sizeof(arg));
+ arg.handle = handle;
+ igt_assert(ioctl(fd, DRM_IOCTL_I915_GEM_GET_CACHING, &arg) < 0 &&
+ errno == EOPNOTSUPP);
+ }
+
+ /* gem_create should fail with -EINVAL if invalid pat index specified */
+ igt_assert_eq(__gem_create_ext(fd, &size, 0, &handle, &setparam_inv_pat.base),
+ -EINVAL);
+
+ gem_close(fd, handle);
+}
+
static bool supports_needs_cpu_access(int fd)
{
struct drm_i915_gem_memory_class_instance regions[] = {
@@ -995,6 +1055,10 @@ igt_main
igt_subtest("create-ext-placement-all")
create_ext_placement_all(fd);
+ igt_describe("Validate basic creation of objects with PAT cache setting.");
+ igt_subtest("create-ext-set-pat")
+ create_ext_set_pat(fd);
+
igt_describe("Verify the basic functionally and expected ABI contract around I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS");
igt_subtest("create-ext-cpu-access-sanity-check") {
igt_require(supports_needs_cpu_access(fd));
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for test/gem_create: exercise gem_create_ext_set_pat
2023-05-26 17:22 [igt-dev] [PATCH v6 0/1] test/gem_create: exercise gem_create_ext_set_pat fei.yang
2023-05-26 17:22 ` [igt-dev] [PATCH v6 1/1] " fei.yang
@ 2023-05-26 18:17 ` Patchwork
2023-05-27 17:51 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2023-05-26 18:17 UTC (permalink / raw)
To: fei.yang; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 4992 bytes --]
== Series Details ==
Series: test/gem_create: exercise gem_create_ext_set_pat
URL : https://patchwork.freedesktop.org/series/118443/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_13196 -> IGTPW_9050
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/index.html
Participating hosts (39 -> 38)
------------------------------
Additional (1): bat-mtlp-6
Missing (2): fi-kbl-soraka fi-snb-2520m
Known issues
------------
Here are the changes found in IGTPW_9050 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- fi-skl-6600u: NOTRUN -> [SKIP][1] ([fdo#109271])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/fi-skl-6600u/igt@kms_chamelium_hpd@common-hpd-after-suspend.html
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s3@smem:
- fi-skl-6600u: [ABORT][2] -> [PASS][3]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/fi-skl-6600u/igt@gem_exec_suspend@basic-s3@smem.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/fi-skl-6600u/igt@gem_exec_suspend@basic-s3@smem.html
* igt@i915_selftest@live@slpc:
- {bat-mtlp-8}: [DMESG-WARN][4] ([i915#6367]) -> [PASS][5]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/bat-mtlp-8/igt@i915_selftest@live@slpc.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/bat-mtlp-8/igt@i915_selftest@live@slpc.html
- bat-rpls-1: [DMESG-WARN][6] ([i915#6367]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/bat-rpls-1/igt@i915_selftest@live@slpc.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/bat-rpls-1/igt@i915_selftest@live@slpc.html
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1:
- bat-dg2-8: [FAIL][8] ([i915#7932]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#6]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/6
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3595]: https://gitlab.freedesktop.org/drm/intel/issues/3595
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4342]: https://gitlab.freedesktop.org/drm/intel/issues/4342
[i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
[i915#8189]: https://gitlab.freedesktop.org/drm/intel/issues/8189
[i915#8497]: https://gitlab.freedesktop.org/drm/intel/issues/8497
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7307 -> IGTPW_9050
CI-20190529: 20190529
CI_DRM_13196: 9e0c716f834ec17dbf96c47c8b5a2b32c4f483cd @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_9050: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/index.html
IGT_7307: f0714273cd896c637759b3790f485308c4c97008 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Testlist changes
----------------
+igt@gem_create@create-ext-set-pat
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/index.html
[-- Attachment #2: Type: text/html, Size: 4006 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for test/gem_create: exercise gem_create_ext_set_pat
2023-05-26 17:22 [igt-dev] [PATCH v6 0/1] test/gem_create: exercise gem_create_ext_set_pat fei.yang
2023-05-26 17:22 ` [igt-dev] [PATCH v6 1/1] " fei.yang
2023-05-26 18:17 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2023-05-27 17:51 ` Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2023-05-27 17:51 UTC (permalink / raw)
To: fei.yang; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 16123 bytes --]
== Series Details ==
Series: test/gem_create: exercise gem_create_ext_set_pat
URL : https://patchwork.freedesktop.org/series/118443/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_13196_full -> IGTPW_9050_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/index.html
Participating hosts (7 -> 7)
------------------------------
No changes in participating hosts
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_9050_full:
### IGT changes ###
#### Possible regressions ####
* igt@gem_create@create-ext-set-pat (NEW):
- {shard-rkl}: NOTRUN -> [SKIP][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-rkl-6/igt@gem_create@create-ext-set-pat.html
- {shard-dg1}: NOTRUN -> [SKIP][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-dg1-17/igt@gem_create@create-ext-set-pat.html
- {shard-tglu}: NOTRUN -> [SKIP][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-tglu-2/igt@gem_create@create-ext-set-pat.html
New tests
---------
New tests have been introduced between CI_DRM_13196_full and IGTPW_9050_full:
### New IGT tests (1) ###
* igt@gem_create@create-ext-set-pat:
- Statuses : 6 skip(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in IGTPW_9050_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_create@create-ext-set-pat (NEW):
- shard-glk: NOTRUN -> [SKIP][4] ([fdo#109271])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-glk9/igt@gem_create@create-ext-set-pat.html
- shard-apl: NOTRUN -> [SKIP][5] ([fdo#109271])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-apl3/igt@gem_create@create-ext-set-pat.html
* igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-apl: [PASS][6] -> [FAIL][7] ([i915#2842])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-apl7/igt@gem_exec_fair@basic-none-solo@rcs0.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-apl4/igt@gem_exec_fair@basic-none-solo@rcs0.html
* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [PASS][8] -> [FAIL][9] ([i915#2842]) +3 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-glk1/igt@gem_exec_fair@basic-pace-share@rcs0.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-glk9/igt@gem_exec_fair@basic-pace-share@rcs0.html
* igt@gem_userptr_blits@vma-merge:
- shard-snb: NOTRUN -> [FAIL][10] ([i915#2724])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-snb6/igt@gem_userptr_blits@vma-merge.html
* igt@kms_atomic_transition@plane-all-modeset-transition-fencing-internal-panels:
- shard-snb: NOTRUN -> [SKIP][11] ([fdo#109271] / [i915#4579]) +18 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-snb6/igt@kms_atomic_transition@plane-all-modeset-transition-fencing-internal-panels.html
* igt@kms_ccs@pipe-c-crc-primary-rotation-180-4_tiled_mtl_mc_ccs:
- shard-snb: NOTRUN -> [SKIP][12] ([fdo#109271]) +77 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-snb5/igt@kms_ccs@pipe-c-crc-primary-rotation-180-4_tiled_mtl_mc_ccs.html
* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-glk: [PASS][13] -> [FAIL][14] ([IGT#6] / [i915#2346])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-glk4/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-glk6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
#### Possible fixes ####
* igt@drm_fdinfo@most-busy-idle-check-all@rcs0:
- {shard-rkl}: [FAIL][15] ([i915#7742]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-rkl-3/igt@drm_fdinfo@most-busy-idle-check-all@rcs0.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-rkl-6/igt@drm_fdinfo@most-busy-idle-check-all@rcs0.html
* igt@gem_ctx_exec@basic-nohangcheck:
- {shard-rkl}: [FAIL][17] ([i915#6268]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-rkl-1/igt@gem_ctx_exec@basic-nohangcheck.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-rkl-1/igt@gem_ctx_exec@basic-nohangcheck.html
- {shard-tglu}: [FAIL][19] ([i915#6268]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-tglu-8/igt@gem_ctx_exec@basic-nohangcheck.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-tglu-5/igt@gem_ctx_exec@basic-nohangcheck.html
* igt@gem_eio@unwedge-stress:
- {shard-dg1}: [FAIL][21] ([i915#5784]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-dg1-15/igt@gem_eio@unwedge-stress.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-dg1-18/igt@gem_eio@unwedge-stress.html
* igt@gem_exec_fair@basic-deadline:
- shard-glk: [FAIL][23] ([i915#2846]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-glk8/igt@gem_exec_fair@basic-deadline.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-glk3/igt@gem_exec_fair@basic-deadline.html
* igt@gem_exec_fair@basic-pace-share@rcs0:
- {shard-rkl}: [FAIL][25] ([i915#2842]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-rkl-2/igt@gem_exec_fair@basic-pace-share@rcs0.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-rkl-6/igt@gem_exec_fair@basic-pace-share@rcs0.html
* igt@gem_lmem_swapping@smem-oom@lmem0:
- {shard-dg1}: [DMESG-WARN][27] ([i915#4936] / [i915#5493]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-dg1-18/igt@gem_lmem_swapping@smem-oom@lmem0.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-dg1-18/igt@gem_lmem_swapping@smem-oom@lmem0.html
* igt@i915_module_load@reload-no-display:
- shard-snb: [ABORT][29] ([i915#4528] / [i915#8393]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-snb4/igt@i915_module_load@reload-no-display.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-snb6/igt@i915_module_load@reload-no-display.html
* igt@i915_pm_rc6_residency@rc6-idle@rcs0:
- {shard-dg1}: [FAIL][31] ([i915#3591]) -> [PASS][32] +1 similar issue
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-dg1-14/igt@i915_pm_rc6_residency@rc6-idle@rcs0.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-dg1-15/igt@i915_pm_rc6_residency@rc6-idle@rcs0.html
* igt@i915_pm_rpm@modeset-lpsp-stress:
- {shard-rkl}: [SKIP][33] ([i915#1397]) -> [PASS][34] +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-rkl-6/igt@i915_pm_rpm@modeset-lpsp-stress.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-rkl-7/igt@i915_pm_rpm@modeset-lpsp-stress.html
* igt@i915_pm_rps@reset:
- shard-snb: [INCOMPLETE][35] ([i915#7790]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-snb1/igt@i915_pm_rps@reset.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-snb4/igt@i915_pm_rps@reset.html
* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-apl: [FAIL][37] ([IGT#6] / [i915#2346]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-apl2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-apl7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-glk: [FAIL][39] ([IGT#6] / [i915#2346]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-glk7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-glk7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
* igt@kms_cursor_legacy@single-bo@pipe-b:
- {shard-rkl}: [INCOMPLETE][41] ([i915#8011]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-rkl-7/igt@kms_cursor_legacy@single-bo@pipe-b.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-rkl-6/igt@kms_cursor_legacy@single-bo@pipe-b.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible@c-hdmi-a2:
- shard-glk: [FAIL][43] ([i915#79]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-glk8/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-hdmi-a2.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-glk4/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-hdmi-a2.html
#### Warnings ####
* igt@kms_content_protection@mei_interface:
- shard-apl: [SKIP][45] ([IGT#6] / [fdo#109271] / [i915#4579]) -> [SKIP][46] ([IGT#6] / [fdo#109271])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-apl7/igt@kms_content_protection@mei_interface.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-apl4/igt@kms_content_protection@mei_interface.html
- shard-snb: [SKIP][47] ([fdo#109271] / [i915#4579]) -> [SKIP][48] ([fdo#109271])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-snb5/igt@kms_content_protection@mei_interface.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-snb2/igt@kms_content_protection@mei_interface.html
- shard-glk: [SKIP][49] ([IGT#6] / [fdo#109271] / [i915#4579]) -> [SKIP][50] ([IGT#6] / [fdo#109271])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/shard-glk8/igt@kms_content_protection@mei_interface.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/shard-glk5/igt@kms_content_protection@mei_interface.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#6]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/6
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2724]: https://gitlab.freedesktop.org/drm/intel/issues/2724
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#3023]: https://gitlab.freedesktop.org/drm/intel/issues/3023
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3528]: https://gitlab.freedesktop.org/drm/intel/issues/3528
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4816]: https://gitlab.freedesktop.org/drm/intel/issues/4816
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4936]: https://gitlab.freedesktop.org/drm/intel/issues/4936
[i915#5234]: https://gitlab.freedesktop.org/drm/intel/issues/5234
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5493]: https://gitlab.freedesktop.org/drm/intel/issues/5493
[i915#5723]: https://gitlab.freedesktop.org/drm/intel/issues/5723
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#7790]: https://gitlab.freedesktop.org/drm/intel/issues/7790
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#7975]: https://gitlab.freedesktop.org/drm/intel/issues/7975
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
[i915#8213]: https://gitlab.freedesktop.org/drm/intel/issues/8213
[i915#8393]: https://gitlab.freedesktop.org/drm/intel/issues/8393
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7307 -> IGTPW_9050
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_13196: 9e0c716f834ec17dbf96c47c8b5a2b32c4f483cd @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_9050: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/index.html
IGT_7307: f0714273cd896c637759b3790f485308c4c97008 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9050/index.html
[-- Attachment #2: Type: text/html, Size: 15333 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [igt-dev] [PATCH v6 1/1] test/gem_create: exercise gem_create_ext_set_pat
2023-05-26 17:22 ` [igt-dev] [PATCH v6 1/1] " fei.yang
@ 2023-05-29 11:08 ` Kamil Konieczny
0 siblings, 0 replies; 5+ messages in thread
From: Kamil Konieczny @ 2023-05-29 11:08 UTC (permalink / raw)
To: igt-dev; +Cc: fei.yang
On 2023-05-26 at 10:22:21 -0700, fei.yang@intel.com wrote:
> From: Fei Yang <fei.yang@intel.com>
>
> Gem_create uAPI has been extended with capability of setting PAT index.
> Add a test case to exercise it.
>
> PAT index is a page attribute that gets programmed into Page Table
> Entry (PTE) for caching policy control. Please refer to kernel patch
> for implementation details.
>
> https://patchwork.freedesktop.org/series/116870/
>
> Signed-off-by: Fei Yang <fei.yang@intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> ---
> lib/i915/i915_drm_local.h | 34 +++++++++++++++++++++
> tests/i915/gem_create.c | 64 +++++++++++++++++++++++++++++++++++++++
> 2 files changed, 98 insertions(+)
>
> diff --git a/lib/i915/i915_drm_local.h b/lib/i915/i915_drm_local.h
> index bb2ebef3..0f47578c 100644
> --- a/lib/i915/i915_drm_local.h
> +++ b/lib/i915/i915_drm_local.h
> @@ -41,6 +41,40 @@ extern "C" {
> #define __I915_PMU_RC6_RESIDENCY(gt) ___I915_PMU_OTHER(gt, 3)
> #define __I915_PMU_SOFTWARE_GT_AWAKE_TIME(gt) ___I915_PMU_OTHER(gt, 4)
>
> +#define I915_GEM_CREATE_EXT_SET_PAT 2
> +
> +/**
> + * struct drm_i915_gem_create_ext_set_pat - The
> + * I915_GEM_CREATE_EXT_SET_PAT extension.
> + *
> + * If this extension is provided, the specified caching policy (PAT index) is
> + * applied to the buffer object.
> + *
> + * Below is an example on how to create an object with specific caching policy:
> + *
> + * .. code-block:: C
> + *
> + * struct drm_i915_gem_create_ext_set_pat set_pat_ext = {
> + * .base = { .name = I915_GEM_CREATE_EXT_SET_PAT },
> + * .pat_index = 0,
> + * };
> + * struct drm_i915_gem_create_ext create_ext = {
> + * .size = PAGE_SIZE,
> + * .extensions = (uintptr_t)&set_pat_ext,
> + * };
> + *
> + * int err = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE_EXT, &create_ext);
> + * if (err) ...
> + */
> +struct drm_i915_gem_create_ext_set_pat {
> + /** @base: Extension link. See struct i915_user_extension. */
> + struct i915_user_extension base;
> + /** @pat_index: PAT index to be set */
> + __u32 pat_index;
> + /** @rsvd: reserved for future use */
> + __u32 rsvd;
> +};
> +
> #if defined(__cplusplus)
> }
> #endif
> diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c
> index 3320717f..e9e8216d 100644
> --- a/tests/i915/gem_create.c
> +++ b/tests/i915/gem_create.c
> @@ -635,6 +635,66 @@ static void create_ext_placement_each(int fd)
> free(regions);
> }
>
> +/**
> + * TEST: GEM create uAPI
> + * Category: Infrastructure
> + * Description: Tests the DRM_IOCTL_I915_GEM_CREATE_EXT ioctl.
> + * Feature: core
> + * Functionality: Create GEM object with specific PAT index
> + * Run type: BAT
> + * Sub-category: i915
> + * Test category: GEM_Legacy
> + *
> + * SUBTEST: create-ext-set-pat
> + */
> +static void create_ext_set_pat(int fd)
> +{
> + struct drm_i915_gem_create_ext_set_pat setparam_pat = {
> + .base = { .name = I915_GEM_CREATE_EXT_SET_PAT },
> + .pat_index = 0,
> + };
> + struct drm_i915_gem_create_ext_set_pat setparam_inv_pat = {
> + .base = { .name = I915_GEM_CREATE_EXT_SET_PAT },
> + .pat_index = 65,
> + };
> + struct drm_i915_gem_caching arg;
> + uint64_t size;
> + uint32_t handle;
> + int ret;
> +
> + size = PAGE_SIZE;
> +
> + ret = __gem_create_ext(fd, &size, 0, &handle, &setparam_pat.base);
> +
> + /*
> + * With a valid PAT index specified, returning -EINVAL here
> + * indicates set_pat extension is not supported
> + */
> + if (ret == -EINVAL)
> + igt_skip("I915_GEM_CREATE_EXT_SET_PAT is not supported\n");
> + igt_assert(ret == 0);
> +
> + /*
> + * {set|get}_caching ioctl should fail for objects created with set_pat
> + * Also note, dGPU doesn't support {set|get}_caching ioctl, so checking
> + * this for iGPU only.
> + */
> + if (!gem_has_lmem(fd)) {
> + igt_assert_eq(__gem_set_caching(fd, handle, 1), -EOPNOTSUPP);
> +
> + memset(&arg, 0, sizeof(arg));
> + arg.handle = handle;
> + igt_assert(ioctl(fd, DRM_IOCTL_I915_GEM_GET_CACHING, &arg) < 0 &&
> + errno == EOPNOTSUPP);
> + }
> +
> + /* gem_create should fail with -EINVAL if invalid pat index specified */
> + igt_assert_eq(__gem_create_ext(fd, &size, 0, &handle, &setparam_inv_pat.base),
> + -EINVAL);
> +
> + gem_close(fd, handle);
> +}
> +
> static bool supports_needs_cpu_access(int fd)
> {
> struct drm_i915_gem_memory_class_instance regions[] = {
> @@ -995,6 +1055,10 @@ igt_main
> igt_subtest("create-ext-placement-all")
> create_ext_placement_all(fd);
>
> + igt_describe("Validate basic creation of objects with PAT cache setting.");
> + igt_subtest("create-ext-set-pat")
> + create_ext_set_pat(fd);
> +
> igt_describe("Verify the basic functionally and expected ABI contract around I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS");
> igt_subtest("create-ext-cpu-access-sanity-check") {
> igt_require(supports_needs_cpu_access(fd));
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-29 11:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-26 17:22 [igt-dev] [PATCH v6 0/1] test/gem_create: exercise gem_create_ext_set_pat fei.yang
2023-05-26 17:22 ` [igt-dev] [PATCH v6 1/1] " fei.yang
2023-05-29 11:08 ` Kamil Konieczny
2023-05-26 18:17 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-05-27 17:51 ` [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.