tests/i915: skip gem_set_caching call for mtl
PATCH 1/1 tests/i915: skip gem_set_caching call for mtl
Call to gem_set_caching skips the test since i915_gem_set_caching_ioctl is deprecated for MTL. To avoid this added the return value check for 0 or EOPNOTSUPP in __gem_set_caching.
FIXME: This is a temp solution to fix the IGT test issues where set caching call is used , there is alternate API available but support not yet available to use that.Once set_pat_index support available need to bring that change replacing this one.
--- tests/i915/gem_caching.c | 8 +++++--- tests/i915/gem_exec_flush.c | 10 ++++++---- tests/i915/gem_exec_latency.c | 4 +++- tests/i915/gem_exec_suspend.c | 7 +++++-- tests/i915/gem_render_tiled_blits.c | 5 +++-- tests/i915/gem_softpin.c | 4 +++- tests/i915/gem_userptr_blits.c | 8 +++++--- tests/i915/gem_workarounds.c | 8 +++++--- tests/i915/i915_pm_rpm.c | 7 +++++-- tests/prime_vgem.c | 4 +++- 10 files changed, 43 insertions(+), 22 deletions(-)
tests/i915/gem_caching.c +5 -3
@@ -136,7 +136,7 @@ igt_mainstruct intel_bb *ibb;data_t data = {0 , };unsigned flags =TEST_BOTH ; -int i, j; +int i, j, ret;uint8_t *cpu_ptr;uint8_t *gtt_ptr;
@@ -163,8 +163,10 @@ igt_main scratch_buf =intel_buf_create (data.bops,BO_SIZE /4 ,1 ,32 ,0 ,I915_TILING_NONE ,0 ); -if (!gem_has_lmem (data.fd)) -gem_set_caching (data.fd, scratch_buf->handle,1 ); +if (!gem_has_lmem (data.fd)) { + ret =__gem_set_caching (data.fd, scratch_buf->handle,1 ); +igt_require (ret ==0 || ret == -EOPNOTSUPP ); + } staging_buf =intel_buf_create (data.bops,BO_SIZE /4 ,1 ,32 ,0 ,I915_TILING_NONE ,0 );
tests/i915/gem_exec_flush.c +6 -4
@@ -127,7 +127,7 @@ static void run(int fd, unsigned ring, int nchild, int timeout,bool snoop = false;uint32_t *ptr;uint32_t *map; -int i; +int i, ret;bool has_relocs =gem_has_relocations (fd);memset (obj,0 ,sizeof (obj));
@@ -142,7 +142,8 @@ static void run(int fd, unsigned ring, int nchild, int timeout, I915_GEM_DOMAIN_WC); }else { snoop = flags &COHERENT ; -gem_set_caching (fd, obj[0 ].handle, snoop); + ret =__gem_set_caching (fd, obj[0 ].handle, snoop); +igt_require (ret ==0 || ret == -EOPNOTSUPP ); map =gem_mmap__cpu (fd, obj[0 ].handle,0 ,4096 ,PROT_WRITE ); gem_set_domain(fd, obj[0].handle, I915_GEM_DOMAIN_CPU,
@@ -394,14 +395,15 @@ static void batch(int fd, unsigned ring, int nchild, int timeout,unsigned long cycles =0 ;uint32_t *ptr;uint32_t *map; -int i; +int i, ret;bool has_relocs =gem_has_relocations (fd);memset (obj,0 ,sizeof (obj)); obj[0 ].handle =gem_create (fd,4096 ); obj[0 ].flags |=EXEC_OBJECT_WRITE ; -gem_set_caching (fd, obj[0 ].handle, !!(flags &COHERENT )); + ret =__gem_set_caching (fd, obj[0 ].handle, !!(flags &COHERENT )); +igt_require (ret ==0 || ret == -EOPNOTSUPP ); map =gem_mmap__cpu (fd, obj[0 ].handle,0 ,4096 ,PROT_WRITE ); gem_set_domain(fd, obj[0].handle,
tests/i915/gem_exec_latency.c +3 -1
@@ -756,6 +756,7 @@ static void context_switch(int i915, const intel_ctx_t *ctx,const uint32_t mmio_base =gem_engine_mmio_base (i915, e->name);struct igt_mean mean;const intel_ctx_t *tmp_ctx[2 ]; +int ret;igt_require (mmio_base);igt_require (gem_class_has_mutable_submission (i915, e->class));
@@ -770,7 +771,8 @@ static void context_switch(int i915, const intel_ctx_t *ctx,memset (obj,0 ,sizeof (obj)); obj[0 ].handle =gem_create (i915,4096 ); -gem_set_caching (i915, obj[0 ].handle,1 ); + ret =__gem_set_caching (i915, obj[0 ].handle,1 ); +igt_require (ret ==0 || ret == -EOPNOTSUPP ); results =gem_mmap__cpu (i915, obj[0 ].handle,0 ,4096 ,PROT_READ );gem_set_domain (i915, obj[0 ].handle,I915_GEM_DOMAIN_CPU ,0 );
tests/i915/gem_exec_suspend.c +5 -2
@@ -86,6 +86,7 @@ static void run_test(int fd, const intel_ctx_t *ctx,unsigned nengine;igt_spin_t *spin =NULL ;uint64_t ahnd =get_reloc_ahnd (fd,0 ); +int ret; nengine =0 ;if (engine ==ALL_ENGINES ) {
@@ -116,8 +117,10 @@ static void run_test(int fd, const intel_ctx_t *ctx,memset (obj,0 ,sizeof (obj)); obj[0 ].handle =gem_create_in_memory_regions (fd,4096 , region); -if (!gem_has_lmem (fd)) -gem_set_caching (fd, obj[0 ].handle, !!(flags &CACHED )); +if (!gem_has_lmem (fd)) { + ret =__gem_set_caching (fd, obj[0 ].handle, !!(flags &CACHED )); +igt_require (ret ==0 || ret == -EOPNOTSUPP ); + } obj[0 ].flags |=EXEC_OBJECT_WRITE ; obj[1 ].handle =gem_create_in_memory_regions (fd,4096 , region);gem_write (fd, obj[1 ].handle,0 , &bbe,sizeof (bbe));
tests/i915/gem_render_tiled_blits.c +3 -2
@@ -97,7 +97,7 @@ static void run_test (int fd, int count)struct intel_bb *ibb;uint32_t *start_val;struct intel_buf *bufs; -int i, j; +int i, j, ret;uint32_t devid; devid =intel_get_drm_devid (fd);
@@ -117,7 +117,8 @@ static void run_test (int fd, int count)intel_buf_init (bops, &linear,WIDTH ,HEIGHT ,32 ,0 ,I915_TILING_NONE ,I915_COMPRESSION_NONE );if (snoop) { -gem_set_caching (fd, linear.handle,1 ); + ret =__gem_set_caching (fd, linear.handle,1 ); +igt_require (ret ==0 || ret == -EOPNOTSUPP );igt_info ("Using a snoop linear buffer for comparisons\n" ); }
tests/i915/gem_softpin.c +3 -1
@@ -518,6 +518,7 @@ static void test_evict_snoop(int fd, unsigned int flags)struct drm_i915_gem_execbuffer2 execbuf;struct drm_i915_gem_exec_object2 object[2 ];uint64_t hole; +int ret;igt_require (!gem_has_llc (fd));igt_require (!gem_uses_ppgtt (fd));
@@ -537,7 +538,8 @@ static void test_evict_snoop(int fd, unsigned int flags)/* Create a snoop + uncached pair */ object[0 ].handle =gem_create (fd,4096 ); object[0 ].flags =EXEC_OBJECT_PINNED ; -gem_set_caching (fd, object[0 ].handle,1 ); + ret =__gem_set_caching (fd, object[0 ].handle,1 ); +igt_require (ret ==0 || ret == -EOPNOTSUPP ); object[1 ].handle =gem_create (fd,4096 ); object[1 ].flags =EXEC_OBJECT_PINNED ;gem_write (fd, object[1 ].handle,4096 -sizeof (bbe), &bbe,sizeof (bbe));
tests/i915/gem_userptr_blits.c +5 -3
@@ -1105,15 +1105,17 @@ static void test_relocations(int fd)struct drm_i915_gem_execbuffer2 exec;unsigned size;void *ptr; -int i; +int i, ret; size =PAGE_SIZE +ALIGN (sizeof (*reloc)*256 ,PAGE_SIZE );memset (&obj,0 ,sizeof (obj));igt_assert (posix_memalign (&ptr,PAGE_SIZE , size) ==0 );gem_userptr (fd, ptr, size,0 , userptr_flags, &obj.handle); -if (!gem_has_llc (fd)) -gem_set_caching (fd, obj.handle,0 ); +if (!gem_has_llc (fd)) { + ret =__gem_set_caching (fd, obj.handle,0 ); +igt_require (ret ==0 || ret == -EOPNOTSUPP ); + } *(uint32_t *)ptr =MI_BATCH_BUFFER_END ; reloc = (typeof (reloc))((char *)ptr +PAGE_SIZE );
tests/i915/gem_workarounds.c +5 -3
@@ -92,7 +92,7 @@ static int workaround_fail_count(int i915, const intel_ctx_t *ctx)uint32_t result_sz, batch_sz;uint32_t *base, *out;igt_spin_t *spin; -int fw, fail =0 ; +int fw, fail =0 , ret;uint64_t ahnd =get_reloc_ahnd (i915, ctx->id); reloc =calloc (num_wa_regs,sizeof (*reloc));
@@ -106,8 +106,10 @@ static int workaround_fail_count(int i915, const intel_ctx_t *ctx)memset (obj,0 ,sizeof (obj)); obj[0 ].handle =gem_create (i915, result_sz); -if (!gem_has_lmem (i915)) -gem_set_caching (i915, obj[0 ].handle,I915_CACHING_CACHED ); +if (!gem_has_lmem (i915)) { + ret =__gem_set_caching (i915, obj[0 ].handle,I915_CACHING_CACHED ); +igt_require (ret ==0 || ret == -EOPNOTSUPP ); + } obj[1 ].handle =gem_create (i915, batch_sz); obj[1 ].relocs_ptr =to_user_pointer (reloc); obj[1 ].relocation_count = !ahnd ? num_wa_regs :0 ;
tests/i915/i915_pm_rpm.c +5 -2
@@ -1977,6 +1977,7 @@ static void pm_test_caching(void) {uint32_t handle;uint8_t *gem_buf; +int ret;uint32_t i;uint32_t default_cache_level;
@@ -1995,7 +1996,8 @@ static void pm_test_caching(void)for (i =0 ; i <ARRAY_SIZE (cache_levels); i++) {igt_assert (wait_for_suspended ()); -gem_set_caching (drm_fd, handle, default_cache_level); + ret =__gem_set_caching (drm_fd, handle, default_cache_level); +igt_require (ret ==0 || ret == -EOPNOTSUPP );/* Ensure we bind the vma into the GGTT */ memset (gem_buf,16 << i, gtt_obj_max_size);
@@ -2008,7 +2010,8 @@ static void pm_test_caching(void)*/ igt_debug ("Setting cache level %u\n" , cache_levels[i]);igt_assert (wait_for_suspended ()); -gem_set_caching (drm_fd, handle, cache_levels[i]); + ret =__gem_set_caching (drm_fd, handle, cache_levels[i]); +igt_require (ret ==0 || ret == -EOPNOTSUPP ); }igt_assert (munmap (gem_buf, gtt_obj_max_size) ==0 );
tests/prime_vgem.c +3 -1
@@ -316,6 +316,7 @@ static void test_userptr(int vgem, int i915) };struct vgem_bo scratch;uint32_t *ptr; +int ret;igt_require (has_userptr (i915));
@@ -330,7 +331,8 @@ static void test_userptr(int vgem, int i915) *ptr =MI_BATCH_BUFFER_END ;gem_userptr (i915, ptr, scratch.size,0 ,0 , &obj.handle); -gem_set_caching (i915, obj.handle,I915_CACHING_NONE );/* for !llc exec */ + ret =__gem_set_caching (i915, obj.handle,I915_CACHING_NONE );/* for !llc exec */ +igt_require (ret ==0 || ret == -EOPNOTSUPP );gem_execbuf (i915, &execbuf);gem_close (i915, obj.handle);
Signature · 1 line
2.25.1
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for tests/i915: skip gem_set_caching call for mtl
== Series Details ==
== Series Details ==
Series: tests/i915: skip gem_set_caching call for mtl
URL : https://patchwork.freedesktop.org/series/114544/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12800 -> IGTPW_8550
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_8550 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_8550, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/index.html
Participating hosts (38 -> 2)
------------------------------
ERROR: It appears as if the changes made in IGTPW_8550 prevented too many machines from booting.
Additional (1): bat-atsm-1
Missing (37): fi-rkl-11600 bat-adls-5 bat-dg1-6 bat-dg1-5 bat-adlp-6 fi-apl-guc fi-snb-2520m bat-rpls-1 fi-blb-e6850 bat-rpls-2 fi-skl-6600u fi-bsw-n3050 bat-dg2-8 bat-adlm-1 bat-dg2-9 fi-ilk-650 fi-hsw-4770 bat-adln-1 fi-ivb-3770 bat-jsl-3 bat-rplp-1 fi-elk-e7500 bat-dg2-11 fi-bsw-nick fi-kbl-7567u bat-dg1-7 bat-kbl-2 bat-adlp-9 fi-skl-guc fi-cfl-8700k fi-glk-j4005 bat-jsl-1 fi-tgl-1115g4 fi-cfl-guc fi-kbl-guc fi-kbl-x1275 fi-cfl-8109u
Known issues
------------
Here are the changes found in IGTPW_8550 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@fbdev@eof:
- bat-atsm-1: NOTRUN -> [SKIP][1] ([i915#2582]) +4 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@gem_mmap@basic:
- bat-atsm-1: NOTRUN -> [SKIP][2] ([i915#4083])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@gem_tiled_fence_blits@basic:
- bat-atsm-1: NOTRUN -> [SKIP][3] ([i915#4077]) +2 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@gem_tiled_pread_basic:
- bat-atsm-1: NOTRUN -> [SKIP][4] ([i915#4079]) +1 similar issue
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@gem_tiled_pread_basic.html
* igt@i915_pm_rps@basic-api:
- bat-atsm-1: NOTRUN -> [SKIP][5] ([i915#6621])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@i915_suspend@basic-s3-without-i915:
- bat-atsm-1: NOTRUN -> [SKIP][6] ([i915#6645])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@kms_addfb_basic@size-max:
- bat-atsm-1: NOTRUN -> [SKIP][7] ([i915#6077]) +36 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- bat-atsm-1: NOTRUN -> [SKIP][8] ([i915#6078]) +19 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@kms_flip@basic-plain-flip:
- bat-atsm-1: NOTRUN -> [SKIP][9] ([i915#6166]) +3 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@kms_force_connector_basic@prune-stale-modes:
- bat-atsm-1: NOTRUN -> [SKIP][10] ([i915#6093]) +3 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@kms_pipe_crc_basic@hang-read-crc:
- bat-atsm-1: NOTRUN -> [SKIP][11] ([i915#1836]) +6 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@kms_prop_blob@basic:
- bat-atsm-1: NOTRUN -> [SKIP][12] ([i915#7357])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@kms_psr@sprite_plane_onoff:
- bat-atsm-1: NOTRUN -> [SKIP][13] ([i915#1072]) +3 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@kms_psr@sprite_plane_onoff.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-atsm-1: NOTRUN -> [SKIP][14] ([i915#6094])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@prime_vgem@basic-fence-flip:
- bat-atsm-1: NOTRUN -> [SKIP][15] ([fdo#109295] / [i915#6078])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@prime_vgem@basic-fence-mmap:
- bat-atsm-1: NOTRUN -> [SKIP][16] ([fdo#109295] / [i915#4077]) +1 similar issue
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
* igt@prime_vgem@basic-write:
- bat-atsm-1: NOTRUN -> [SKIP][17] ([fdo#109295]) +3 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/bat-atsm-1/igt@[email protected]
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1836]: https://gitlab.freedesktop.org/drm/intel/issues/1836
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#6077]: https://gitlab.freedesktop.org/drm/intel/issues/6077
[i915#6078]: https://gitlab.freedesktop.org/drm/intel/issues/6078
[i915#6093]: https://gitlab.freedesktop.org/drm/intel/issues/6093
[i915#6094]: https://gitlab.freedesktop.org/drm/intel/issues/6094
[i915#6166]: https://gitlab.freedesktop.org/drm/intel/issues/6166
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#7357]: https://gitlab.freedesktop.org/drm/intel/issues/7357
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7178 -> IGTPW_8550
CI-20190529: 20190529
CI_DRM_12800: 648a70b879daba67a6e7c69f191e846c4e043854 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8550: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/index.html
IGT_7178: ffe3f6670b91ab975f90799ab3fd0941b6eae019 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8550/index.html