Skip to contentSkip to conversation

igt: add timeline test cases v2

PATCH New Chunming Zhou 2 participants 3 messages Dec 7, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igt: add timeline test cases v2

v2: adapt to new transfer ioctl

---
 include/drm-uapi/drm.h   |   33 ++
 lib/igt_syncobj.c        |  206 ++++++++
 lib/igt_syncobj.h        |   19 +
 tests/meson.build        |    1 +
 tests/syncobj_timeline.c | 1051 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 1310 insertions(+)
 create mode 100644 tests/syncobj_timeline.c
include/drm-uapi/drm.h +33 -0
index 85c685a2..dcd245d9 100644
@@ -731,6 +731,8 @@ struct drm_syncobj_handle {
 
 #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0)
 #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1)
+/* wait for time point to become available */
+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2)
 struct drm_syncobj_wait {
 	__u64 handles;
 	/* absolute timeout */
@@ -741,11 +743,38 @@ struct drm_syncobj_wait {
 	__u32 pad;
 };
 
+struct drm_syncobj_timeline_wait {
+        __u64 handles;
+        /* wait on specific timeline point for every handles*/
+        __u64 points;
+        /* absolute timeout */
+        __s64 timeout_nsec;
+        __u32 count_handles;
+        __u32 flags;
+        __u32 first_signaled; /* only valid when not waiting all */
+        __u32 pad;
+};
+
 struct drm_syncobj_array {
 	__u64 handles;
 	__u32 count_handles;
 	__u32 pad;
 };
+struct drm_syncobj_timeline_array {
+       __u64 handles;
+       __u64 points;
+       __u32 count_handles;
+       __u32 pad;
+};
+
+struct drm_syncobj_transfer {
+        __u32 src_handle;
+        __u32 dst_handle;
+        __u64 src_point;
+        __u64 dst_point;
+        __u32 flags;
+        __u32 pad;
+};
 
 /* Query current scanout sequence number */
 struct drm_crtc_get_sequence {
@@ -902,6 +931,10 @@ extern "C" {
 #define DRM_IOCTL_MODE_LIST_LESSEES	DRM_IOWR(0xC7, struct drm_mode_list_lessees)
 #define DRM_IOCTL_MODE_GET_LEASE	DRM_IOWR(0xC8, struct drm_mode_get_lease)
 #define DRM_IOCTL_MODE_REVOKE_LEASE	DRM_IOWR(0xC9, struct drm_mode_revoke_lease)
+#define DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT DRM_IOWR(0xCA, struct drm_syncobj_timeline_wait)
+#define DRM_IOCTL_SYNCOBJ_QUERY         DRM_IOWR(0xCB, struct drm_syncobj_timeline_array)
+#define DRM_IOCTL_SYNCOBJ_TRANSFER    DRM_IOWR(0xCC, struct drm_syncobj_transfer)
+#define DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL    DRM_IOWR(0xCD, struct drm_syncobj_timeline_array)
 
 /**
  * Device specific ioctls should only be in their respective headers
lib/igt_syncobj.c +206 -0

209 lines not on this page · raw message

lib/igt_syncobj.h +19 -0
index 44d1378d..175e5027 100644
@@ -65,7 +65,26 @@ int syncobj_wait_err(int fd, uint32_t *handles, uint32_t count,
 bool syncobj_wait(int fd, uint32_t *handles, uint32_t count,
 		  uint64_t abs_timeout_nsec, uint32_t flags,
 		  uint32_t *first_signaled);
+int __syncobj_timeline_wait_ioctl(int fd,
+				  struct drm_syncobj_timeline_wait *args);
+bool syncobj_timeline_wait(int fd, uint32_t *handles, uint64_t *points,
+			   unsigned num_handles,
+			   int64_t timeout_nsec, unsigned flags,
+			   uint32_t *first_signaled);
+int syncobj_timeline_wait_err(int fd, uint32_t *handles, uint64_t *points,
+			      unsigned num_handles,
+			      int64_t timeout_nsec, unsigned flags);
 void syncobj_reset(int fd, uint32_t *handles, uint32_t count);
 void syncobj_signal(int fd, uint32_t *handles, uint32_t count);
+void syncobj_timeline_query(int fd, uint32_t *handles, uint64_t **points,
+			    uint32_t count);
+void syncobj_binary_to_timeline(int fd, uint32_t timeline_handle,
+				uint64_t point, uint32_t binary_handle);
+void syncobj_timeline_to_binary(int fd, uint32_t binary_handle,
+				uint32_t timeline_handle,
+				uint64_t point,
+				uint32_t flags);
+void syncobj_timeline_signal(int fd, uint32_t *handles, uint64_t *points,
+			     uint32_t count);
 
 #endif /* IGT_SYNCOBJ_H */
tests/meson.build +1 -0
index b8a6e61b..bddc223c 100644
@@ -77,6 +77,7 @@ test_progs = [
 	'sw_sync',
 	'syncobj_basic',
 	'syncobj_wait',
+	'syncobj_timeline',
 	'template',
 	'tools_test',
 	'v3d_get_bo_offset',
tests/syncobj_timeline.c new file +1051 -0

1,051 lines not on this page · raw message

Signature · 6 lines
2.17.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for igt: add timeline test cases (rev3)

== Series Details ==

== Series Details ==

Series: igt: add timeline test cases (rev3)
URL : https://patchwork.freedesktop.org/series/53743/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5287 -> IGTPW_2138
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Possible regressions ####

* igt@kms_flip@basic-flip-vs-wf_vblank:
- {fi-icl-u3}: PASS -> INCOMPLETE

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

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

### IGT changes ###

#### Issues hit ####

* igt@prime_vgem@basic-fence-flip:
- fi-ilk-650: PASS -> FAIL [fdo#104008]

#### Possible fixes ####

* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: DMESG-WARN [fdo#102614] -> 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#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008

Participating hosts (51 -> 46)
------------------------------

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

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

* IGT: IGT_4743 -> IGTPW_2138

CI_DRM_5287: 1f240056ad2a4b4b4f174f652202dd7d9e7d0fed @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2138: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2138/
IGT_4743: edb2db2cf2b6665d7ba3fa9117263302f6307a4f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Testlist changes ==

+++ 114 lines
--- 0 lines

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2138/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.IGT: success for igt: add timeline test cases (rev3)

In reply to Chunming Zhou
== Series Details ==

== Series Details ==

Series: igt: add timeline test cases (rev3)
URL : https://patchwork.freedesktop.org/series/53743/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5287_full -> IGTPW_2138_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_fence@basic-await-default:
- shard-hsw: PASS -> FAIL [fdo#108888]

* igt@kms_color@pipe-c-legacy-gamma:
- shard-apl: PASS -> FAIL [fdo#104782]

* igt@kms_cursor_crc@cursor-256x256-dpms:
- shard-glk: PASS -> FAIL [fdo#103232]

* igt@kms_cursor_crc@cursor-256x256-suspend:
- shard-kbl: PASS -> FAIL [fdo#103191] / [fdo#103232] +1

* igt@kms_cursor_crc@cursor-64x64-sliding:
- shard-apl: PASS -> FAIL [fdo#103232] +2
- shard-kbl: PASS -> FAIL [fdo#103232]

* igt@kms_cursor_crc@cursor-64x64-suspend:
- shard-apl: PASS -> FAIL [fdo#103191] / [fdo#103232] +1

* igt@kms_flip@2x-flip-vs-expired-vblank:
- shard-glk: PASS -> FAIL [fdo#105363]

* igt@kms_flip@dpms-vs-vblank-race-interruptible:
- shard-hsw: PASS -> FAIL [fdo#103060]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite:
- shard-apl: PASS -> FAIL [fdo#103167] +4

* igt@kms_frontbuffer_tracking@fbc-1p-rte:
- shard-apl: PASS -> FAIL [fdo#103167] / [fdo#105682]

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-move:
- shard-glk: PASS -> FAIL [fdo#103167] +7

* igt@kms_plane@plane-position-covered-pipe-b-planes:
- shard-glk: PASS -> FAIL [fdo#103166] +1

* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
- shard-glk: PASS -> FAIL [fdo#108145]

* igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
- shard-apl: PASS -> FAIL [fdo#103166] +2
- shard-kbl: PASS -> FAIL [fdo#103166] +1

* igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend:
- shard-kbl: PASS -> INCOMPLETE [fdo#103665]

#### Possible fixes ####

* igt@gem_exec_nop@basic-series:
- shard-snb: INCOMPLETE [fdo#105411] -> PASS

* igt@kms_busy@basic-modeset-a:
- shard-apl: DMESG-WARN [fdo#103558] / [fdo#105602] -> PASS +7

* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
- shard-hsw: DMESG-WARN [fdo#107956] -> PASS

* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
- shard-apl: DMESG-WARN [fdo#107956] -> PASS

* igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
- shard-glk: FAIL [fdo#108145] -> PASS

* igt@kms_cursor_crc@cursor-128x42-sliding:
- shard-apl: FAIL [fdo#103232] -> PASS +2

* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-glk: FAIL [fdo#103232] -> PASS +2

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
- shard-apl: FAIL [fdo#103167] -> PASS +1
- shard-kbl: FAIL [fdo#103167] -> PASS

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-pwrite:
- shard-glk: FAIL [fdo#103167] -> PASS +1

* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-snb: DMESG-WARN [fdo#102365] -> PASS

* igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
- shard-apl: FAIL [fdo#103166] -> PASS +1
- shard-kbl: FAIL [fdo#103166] -> PASS

* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS

#### Warnings ####

* igt@i915_suspend@shrink:
- shard-snb: DMESG-WARN [fdo#108784] -> INCOMPLETE [fdo#105411] / [fdo#106886]
- shard-hsw: DMESG-WARN [fdo#108784] -> INCOMPLETE [fdo#103540] / [fdo#106886]

* igt@kms_plane@plane-position-covered-pipe-b-planes:
- shard-apl: DMESG-WARN [fdo#103558] / [fdo#105602] -> FAIL [fdo#103166]

[fdo#102365]: https://bugs.freedesktop.org/show_bug.cgi?id=102365
[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
[fdo#106886]: https://bugs.freedesktop.org/show_bug.cgi?id=106886
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108784]: https://bugs.freedesktop.org/show_bug.cgi?id=108784
[fdo#108888]: https://bugs.freedesktop.org/show_bug.cgi?id=108888

Participating hosts (7 -> 5)
------------------------------

Missing (2): shard-skl shard-iclb

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

* IGT: IGT_4743 -> IGTPW_2138
* Piglit: piglit_4509 -> None

CI_DRM_5287: 1f240056ad2a4b4b4f174f652202dd7d9e7d0fed @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2138: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2138/
IGT_4743: edb2db2cf2b6665d7ba3fa9117263302f6307a4f @ 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_2138/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx