public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v5] lib/i915/gem_mman: Add a helper for obtaining MMAP_GTT interface version
@ 2019-05-31 10:30 Janusz Krzysztofik
  2019-05-31 15:36 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/i915/gem_mman: Add a helper for obtaining MMAP_GTT interface version (rev2) Patchwork
  2019-06-01 16:42 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Janusz Krzysztofik @ 2019-05-31 10:30 UTC (permalink / raw)
  To: Arkadiusz Hiler, Petri Latvala; +Cc: Janusz Krzysztofik, intel-gfx, igt-dev

From: Janusz Krzysztofik <janusz.krzysztofik@intel.com>

If a test calls a function which depends on availability of a specific
version of MMAP_GTT interface, an error may occur on unsupported hardware.
That may negatively affect results reported by a test framework even if
that test ignores the failure and succeedes.

This helper wraps up an IOCTL call which returns a version number of
MMAP_GTT interface.  It may be used by tests which should adjust their
scope depending on availability of a specific version of MMAP_GTT
interface.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
Changelog:
v4 -> v5:
- change sign of errno before it is returned (Chris - thanks!),
- validate -errno with igt_assume() (Chris - thanks!),
- follow coding style suggested by Chris - thanks!
To be honest, I think Chris should be somehow officially credited in
the commit tags for his contributions but I'm not sure how. Would a
Suggested-by: clause be OK, or Co-develped-by: maybe?

v3 -> v4:
- return errno value on failure (Chris - thanks!),
- clear errno before return, as other helpers do,
- reword the helper documentation and commit message again (Chris -
  thanks!).

v2 (internal) -> v3:
- make the code less obsucre, more explicit (Antonio - thanks!),
- reword the helper documentation and commit message.

v1 (internal) -> v2 (internal):
- minimize future potential conflicts with 
  https://patchwork.freedesktop.org/patch/294053/?series=58551&rev=1
  (no progress with than one so not waiting for it any longer):
  - convert the helper to a drop-in replacement of the one from the
    above mentioned patch, returning mappable aperture version, not
    only information on its availability,
  - drop any other wrappers,
- document the helper,
- reword commit message.

 lib/i915/gem_mman.c | 25 +++++++++++++++++++++++++
 lib/i915/gem_mman.h |  1 +
 2 files changed, 26 insertions(+)

diff --git a/lib/i915/gem_mman.c b/lib/i915/gem_mman.c
index 3cf9a6bb..27c437da 100644
--- a/lib/i915/gem_mman.c
+++ b/lib/i915/gem_mman.c
@@ -40,6 +40,31 @@
 #define VG(x) do {} while (0)
 #endif
 
+/**
+ * gem_mmap__gtt_version:
+ * @fd: open i915 drm file descriptor
+ *
+ * This functions wraps up an IOCTL to obtain MMAP_GTT interface version
+ *
+ * Returns: MMAP_GTT interface version, kernel error code on failure.
+ */
+int gem_mmap__gtt_version(int fd)
+{
+	int result = -EIO;
+	struct drm_i915_getparam gp = {
+		.param = I915_PARAM_MMAP_GTT_VERSION,
+		.value = &result,
+	};
+
+	if (ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp)) {
+		result = -errno;
+		igt_assume(result);
+	}
+
+	errno = 0;
+	return result;
+}
+
 /**
  * __gem_mmap__gtt:
  * @fd: open i915 drm file descriptor
diff --git a/lib/i915/gem_mman.h b/lib/i915/gem_mman.h
index f7242ed7..ab12e566 100644
--- a/lib/i915/gem_mman.h
+++ b/lib/i915/gem_mman.h
@@ -25,6 +25,7 @@
 #ifndef GEM_MMAN_H
 #define GEM_MMAN_H
 
+int gem_mmap__gtt_version(int fd);
 void *gem_mmap__gtt(int fd, uint32_t handle, uint64_t size, unsigned prot);
 void *gem_mmap__cpu(int fd, uint32_t handle, uint64_t offset, uint64_t size, unsigned prot);
 
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for lib/i915/gem_mman: Add a helper for obtaining MMAP_GTT interface version (rev2)
  2019-05-31 10:30 [igt-dev] [PATCH i-g-t v5] lib/i915/gem_mman: Add a helper for obtaining MMAP_GTT interface version Janusz Krzysztofik
@ 2019-05-31 15:36 ` Patchwork
  2019-06-01 16:42 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2019-05-31 15:36 UTC (permalink / raw)
  To: Janusz Krzysztofik; +Cc: igt-dev

== Series Details ==

Series: lib/i915/gem_mman: Add a helper for obtaining MMAP_GTT interface version (rev2)
URL   : https://patchwork.freedesktop.org/series/61417/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6175 -> IGTPW_3088
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * {igt@i915_selftest@live_mman}:
    - fi-icl-u3:          NOTRUN -> [TIMEOUT][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/fi-icl-u3/igt@i915_selftest@live_mman.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@core_auth@basic-auth:
    - fi-icl-u3:          [PASS][2] -> [DMESG-WARN][3] ([fdo#107724])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/fi-icl-u3/igt@core_auth@basic-auth.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/fi-icl-u3/igt@core_auth@basic-auth.html

  
#### Possible fixes ####

  * igt@gem_exec_fence@basic-busy-default:
    - {fi-icl-guc}:       [INCOMPLETE][4] ([fdo#107713]) -> [PASS][5]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/fi-icl-guc/igt@gem_exec_fence@basic-busy-default.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/fi-icl-guc/igt@gem_exec_fence@basic-busy-default.html

  * igt@i915_pm_rpm@module-reload:
    - fi-icl-u3:          [INCOMPLETE][6] ([fdo#107713] / [fdo#108840]) -> [PASS][7]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/fi-icl-u3/igt@i915_pm_rpm@module-reload.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/fi-icl-u3/igt@i915_pm_rpm@module-reload.html

  * {igt@i915_selftest@live_mman}:
    - fi-icl-y:           [TIMEOUT][8] -> [PASS][9]
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/fi-icl-y/igt@i915_selftest@live_mman.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/fi-icl-y/igt@i915_selftest@live_mman.html

  * igt@kms_addfb_basic@invalid-get-prop-any:
    - fi-icl-u3:          [DMESG-WARN][10] ([fdo#107724]) -> [PASS][11]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/fi-icl-u3/igt@kms_addfb_basic@invalid-get-prop-any.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/fi-icl-u3/igt@kms_addfb_basic@invalid-get-prop-any.html

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

  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840


Participating hosts (54 -> 46)
------------------------------

  Missing    (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ilk-650 fi-kbl-7560u fi-byt-clapper fi-bdw-samus 


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

  * IGT: IGT_5026 -> IGTPW_3088

  CI_DRM_6175: 0ebe1e37a70176b84d4e2d489f03c3533e0fcd1a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3088: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/
  IGT_5026: 4108c74c3b15460de25ab989f4e2031594559dfc @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for lib/i915/gem_mman: Add a helper for obtaining MMAP_GTT interface version (rev2)
  2019-05-31 10:30 [igt-dev] [PATCH i-g-t v5] lib/i915/gem_mman: Add a helper for obtaining MMAP_GTT interface version Janusz Krzysztofik
  2019-05-31 15:36 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/i915/gem_mman: Add a helper for obtaining MMAP_GTT interface version (rev2) Patchwork
@ 2019-06-01 16:42 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2019-06-01 16:42 UTC (permalink / raw)
  To: Janusz Krzysztofik; +Cc: igt-dev

== Series Details ==

Series: lib/i915/gem_mman: Add a helper for obtaining MMAP_GTT interface version (rev2)
URL   : https://patchwork.freedesktop.org/series/61417/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6175_full -> IGTPW_3088_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@drm_import_export@prime:
    - shard-glk:          [PASS][1] -> [INCOMPLETE][2] ([fdo#103359] / [k.org#198133])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-glk9/igt@drm_import_export@prime.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-glk1/igt@drm_import_export@prime.html

  * igt@i915_suspend@debugfs-reader:
    - shard-apl:          [PASS][3] -> [DMESG-WARN][4] ([fdo#108566]) +3 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-apl7/igt@i915_suspend@debugfs-reader.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-apl8/igt@i915_suspend@debugfs-reader.html

  * igt@kms_cursor_legacy@2x-flip-vs-cursor-atomic:
    - shard-glk:          [PASS][5] -> [FAIL][6] ([fdo#104873])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-glk9/igt@kms_cursor_legacy@2x-flip-vs-cursor-atomic.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-glk1/igt@kms_cursor_legacy@2x-flip-vs-cursor-atomic.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-mmap-gtt:
    - shard-glk:          [PASS][7] -> [FAIL][8] ([fdo#103167])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-glk8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-mmap-gtt.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-glk7/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-mmap-gtt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-blt:
    - shard-iclb:         [PASS][9] -> [FAIL][10] ([fdo#103167])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-blt.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-blt.html

  * igt@kms_psr@psr2_sprite_plane_move:
    - shard-iclb:         [PASS][11] -> [SKIP][12] ([fdo#109441]) +1 similar issue
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-iclb7/igt@kms_psr@psr2_sprite_plane_move.html

  * igt@kms_setmode@basic:
    - shard-kbl:          [PASS][13] -> [FAIL][14] ([fdo#99912])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-kbl2/igt@kms_setmode@basic.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-kbl2/igt@kms_setmode@basic.html

  * igt@kms_vblank@pipe-c-ts-continuation-idle-hang:
    - shard-hsw:          [PASS][15] -> [INCOMPLETE][16] ([fdo#103540])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-hsw2/igt@kms_vblank@pipe-c-ts-continuation-idle-hang.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-hsw4/igt@kms_vblank@pipe-c-ts-continuation-idle-hang.html

  
#### Possible fixes ####

  * igt@gem_eio@in-flight-suspend:
    - shard-glk:          [FAIL][17] ([fdo#110667]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-glk5/igt@gem_eio@in-flight-suspend.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-glk6/igt@gem_eio@in-flight-suspend.html

  * igt@gem_persistent_relocs@forked:
    - shard-iclb:         [INCOMPLETE][19] ([fdo#107713]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-iclb7/igt@gem_persistent_relocs@forked.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-iclb2/igt@gem_persistent_relocs@forked.html

  * igt@gem_softpin@softpin:
    - shard-glk:          [INCOMPLETE][21] ([fdo#103359] / [k.org#198133]) -> [PASS][22] +1 similar issue
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-glk4/igt@gem_softpin@softpin.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-glk7/igt@gem_softpin@softpin.html

  * igt@gem_tiled_swapping@non-threaded:
    - shard-kbl:          [FAIL][23] ([fdo#108686]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-kbl7/igt@gem_tiled_swapping@non-threaded.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-kbl4/igt@gem_tiled_swapping@non-threaded.html

  * igt@i915_suspend@fence-restore-untiled:
    - shard-apl:          [DMESG-WARN][25] ([fdo#108566]) -> [PASS][26] +2 similar issues
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-apl7/igt@i915_suspend@fence-restore-untiled.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-apl2/igt@i915_suspend@fence-restore-untiled.html

  * igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite:
    - shard-iclb:         [FAIL][27] ([fdo#103167]) -> [PASS][28] +2 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite.html

  * igt@kms_plane_lowres@pipe-a-tiling-x:
    - shard-iclb:         [FAIL][29] ([fdo#103166]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-iclb6/igt@kms_plane_lowres@pipe-a-tiling-x.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-iclb3/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * igt@kms_psr@psr2_primary_mmap_gtt:
    - shard-iclb:         [SKIP][31] ([fdo#109441]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-iclb4/igt@kms_psr@psr2_primary_mmap_gtt.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-iclb2/igt@kms_psr@psr2_primary_mmap_gtt.html

  * igt@perf_pmu@rc6-runtime-pm-long:
    - shard-glk:          [FAIL][33] ([fdo#105010]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-glk1/igt@perf_pmu@rc6-runtime-pm-long.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-glk9/igt@perf_pmu@rc6-runtime-pm-long.html

  
#### Warnings ####

  * igt@gem_mmap_gtt@forked-big-copy-odd:
    - shard-iclb:         [INCOMPLETE][35] ([fdo#107713] / [fdo#109100]) -> [TIMEOUT][36] ([fdo#109673]) +1 similar issue
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6175/shard-iclb7/igt@gem_mmap_gtt@forked-big-copy-odd.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/shard-iclb5/igt@gem_mmap_gtt@forked-big-copy-odd.html

  
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
  [fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
  [fdo#110667]: https://bugs.freedesktop.org/show_bug.cgi?id=110667
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (10 -> 6)
------------------------------

  Missing    (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005 


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

  * IGT: IGT_5026 -> IGTPW_3088
  * Piglit: piglit_4509 -> None

  CI_DRM_6175: 0ebe1e37a70176b84d4e2d489f03c3533e0fcd1a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3088: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/
  IGT_5026: 4108c74c3b15460de25ab989f4e2031594559dfc @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3088/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2019-06-01 16:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-31 10:30 [igt-dev] [PATCH i-g-t v5] lib/i915/gem_mman: Add a helper for obtaining MMAP_GTT interface version Janusz Krzysztofik
2019-05-31 15:36 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/i915/gem_mman: Add a helper for obtaining MMAP_GTT interface version (rev2) Patchwork
2019-06-01 16:42 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox