Skip to contentSkip to conversation

panfrost: Test labeling functionality

PATCH In review Rohan Garg 5 participants 6 messages May 28, 2020 – May 29, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore

Rohan Garg

author
#0 lore raw

PATCH 1/1 panfrost: Test labeling functionality

Introduce tests to cover the new generic labeling ioctl's being reviewed here [1].

[1] https://patchwork.freedesktop.org/series/77267/

---
 include/drm-uapi/drm.h    |  23 ++++++-
 tests/meson.build         |   1 +
 tests/panfrost_bo_label.c | 129 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 152 insertions(+), 1 deletion(-)
 create mode 100644 tests/panfrost_bo_label.c
include/drm-uapi/drm.h +22 -1
index c7fd2a35..87124882 100644
@@ -620,6 +620,25 @@ struct drm_gem_open {
 	__u64 size;
 };
 
+/** struct drm_handle_label - ioctl argument for labelling BOs.
+ *
+ * This label's a BO with a userspace label
+ *
+ */
+struct drm_handle_label {
+	/** Handle for the object being labelled. */
+	__u32 handle;
+
+	/** Label and label length (len includes the trailing NULL).
+	 *  Label lenght *MUST* be smaller than PAGE_SIZE.
+	 */
+	__u32 len;
+	__u64 label;
+
+	/** Flags .. Currently no flags are defined */
+	__u32 flags;
+};
+
 #define DRM_CAP_DUMB_BUFFER		0x1
 #define DRM_CAP_VBLANK_HIGH_CRTC	0x2
 #define DRM_CAP_DUMB_PREFERRED_DEPTH	0x3
@@ -941,8 +960,10 @@ extern "C" {
 #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)
-
 #define DRM_IOCTL_MODE_GETFB2		DRM_IOWR(0xCE, struct drm_mode_fb_cmd2)
+#define DRM_IOCTL_HANDLE_SET_LABEL      DRM_IOWR(0xCF, struct drm_handle_label)
+#define DRM_IOCTL_HANDLE_GET_LABEL      DRM_IOWR(0xD0, struct drm_handle_label)
+
 
 /**
  * Device specific ioctls should only be in their respective headers
tests/meson.build +1 -0
index e69bdb7d..ee91bf48 100644
@@ -72,6 +72,7 @@ test_progs = [
 	'kms_vblank',
 	'kms_vrr',
 	'meta_test',
+        'panfrost_bo_label',
 	'panfrost_get_param',
 	'panfrost_gem_new',
 	'panfrost_prime',
tests/panfrost_bo_label.c new file +129 -0

129 lines not on this page · raw message

Signature · 6 lines
2.17.1

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

Hi Rohan,

Quoted 8 lines · Rohan Garg

Introduce tests to cover the new generic labeling ioctl's being reviewed here [1].

[1] https://patchwork.freedesktop.org/series/77267/

Quoted 8 lines
---
 include/drm-uapi/drm.h    |  23 ++++++-
 tests/meson.build         |   1 +
 tests/panfrost_bo_label.c | 129 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 152 insertions(+), 1 deletion(-)
 create mode 100644 tests/panfrost_bo_label.c

Listing high-level comments, haven't looked at the test itself:
- make/name the test generic - I would imagine we can use dumb buffer
on panfrost, vc4 or others
- catch the missing locking - a) two writers, b) missing read lock
would trigger user-after-free
- use invalid handles - to highlight the mismatched gem_object_put
(as mentioned off-list)

The last two categories would produce various kernel warnings/warn/bugs with earlier revisions.
Might be a good idea to run the test against those, to ensure the test triggers correctly.

-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for panfrost: Test labeling functionality

In reply to Rohan Garg
== Series Details ==

== Series Details ==

Series: panfrost: Test labeling functionality
URL : https://patchwork.freedesktop.org/series/77742/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8547 -> IGTPW_4619
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/index.html

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@client:
- fi-bsw-nick: [PASS][1] -> [INCOMPLETE][2] ([i915#1909])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/fi-bsw-nick/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/fi-bsw-nick/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@i915_pm_rpm@module-reload:
- fi-kbl-x1275: [FAIL][3] ([i915#62]) -> [SKIP][4] ([fdo#109271])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/fi-kbl-x1275/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/fi-kbl-x1275/igt@[email protected]

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1909]: https://gitlab.freedesktop.org/drm/intel/issues/1909
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62

Participating hosts (50 -> 43)
------------------------------

Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus

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

* CI: CI-20190529 -> None
* IGT: IGT_5682 -> IGTPW_4619

CI-20190529: 20190529
CI_DRM_8547: 055c59085e117a2433d3862d645e049e30f3a2dc @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4619: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/index.html
IGT_5682: e5371a99a877be134c6ad5361a5f03843a66f775 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Testlist changes ==

+igt@panfrost_bo_label@clear-label
+igt@panfrost_bo_label@get-label
+igt@panfrost_bo_label@label-too-long
+igt@panfrost_bo_label@set-bad-handle
+igt@panfrost_bo_label@set-label

== Logs ==

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

#3 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for panfrost: Test labeling functionality

In reply to Rohan Garg
== Series Details ==

== Series Details ==

Series: panfrost: Test labeling functionality
URL : https://patchwork.freedesktop.org/series/77742/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_8547_full -> IGTPW_4619_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_4619_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_4619_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://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/index.html

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

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

### IGT changes ###

#### Possible regressions ####

* igt@gem_exec_reloc@basic-gtt:
- shard-glk: [PASS][1] -> [TIMEOUT][2] +2 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-glk7/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-glk9/igt@[email protected]

#### Warnings ####

* igt@kms_plane_alpha_blend@pipe-a-alpha-basic:
- shard-glk: [FAIL][3] ([fdo#108145] / [i915#265]) -> [TIMEOUT][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-glk8/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-glk9/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_workarounds@suspend-resume-context:
- shard-kbl: [PASS][5] -> [DMESG-WARN][6] ([i915#180])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl6/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl7/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-256x256-random:
- shard-kbl: [PASS][7] -> [FAIL][8] ([i915#54] / [i915#93] / [i915#95])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl3/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl2/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-suspend:
- shard-kbl: [PASS][9] -> [INCOMPLETE][10] ([i915#155])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl4/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl3/igt@[email protected]

* igt@kms_draw_crc@draw-method-xrgb8888-pwrite-untiled:
- shard-apl: [PASS][11] -> [FAIL][12] ([i915#52] / [i915#54] / [i915#95])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl7/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl2/igt@[email protected]

* igt@kms_flip_tiling@flip-changes-tiling:
- shard-apl: [PASS][13] -> [FAIL][14] ([i915#95])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl7/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl6/igt@[email protected]
- shard-kbl: [PASS][15] -> [FAIL][16] ([i915#699] / [i915#93] / [i915#95])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl1/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl1/igt@[email protected]

* igt@kms_panel_fitting@atomic-fastset:
- shard-tglb: [PASS][17] -> [FAIL][18] ([i915#83])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-tglb7/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-tglb5/igt@[email protected]
- shard-iclb: [PASS][19] -> [FAIL][20] ([i915#83])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-iclb1/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-iclb2/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: [PASS][21] -> [FAIL][22] ([i915#53] / [i915#93] / [i915#95])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl6/igt@[email protected]
- shard-apl: [PASS][23] -> [FAIL][24] ([i915#53] / [i915#95])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl4/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl7/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- shard-apl: [PASS][25] -> [DMESG-WARN][26] ([i915#180])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl8/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl1/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-apl: [PASS][27] -> [FAIL][28] ([fdo#108145] / [i915#265] / [i915#95])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl2/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl1/igt@[email protected]

* igt@kms_plane_cursor@pipe-a-viewport-size-128:
- shard-apl: [PASS][29] -> [FAIL][30] ([i915#1559] / [i915#95])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl8/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl8/igt@[email protected]
- shard-kbl: [PASS][31] -> [FAIL][32] ([i915#1559] / [i915#93] / [i915#95])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl7/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl6/igt@[email protected]

* igt@kms_plane_cursor@pipe-c-primary-size-256:
- shard-hsw: [PASS][33] -> [INCOMPLETE][34] ([i915#1927] / [i915#61])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-hsw7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-hsw2/igt@[email protected]

* igt@kms_psr@psr2_cursor_mmap_cpu:
- shard-iclb: [PASS][35] -> [SKIP][36] ([fdo#109441]) +2 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-iclb1/igt@kms_psr@psr2_cursor_mmap_cpu.html

* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-kbl: [PASS][37] -> [INCOMPLETE][38] ([i915#155] / [i915#794])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl6/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl3/igt@[email protected]

* igt@perf@blocking:
- shard-hsw: [PASS][39] -> [SKIP][40] ([fdo#109271])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-hsw4/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-hsw4/igt@[email protected]
- shard-glk: [PASS][41] -> [SKIP][42] ([fdo#109271])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-glk1/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-glk8/igt@[email protected]
- shard-tglb: [PASS][43] -> [SKIP][44] ([i915#405])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-tglb5/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-tglb6/igt@[email protected]
- shard-apl: [PASS][45] -> [SKIP][46] ([fdo#109271])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl3/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl3/igt@[email protected]
- shard-iclb: [PASS][47] -> [SKIP][48] ([i915#405])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-iclb1/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-iclb8/igt@[email protected]
- shard-kbl: [PASS][49] -> [SKIP][50] ([fdo#109271])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl7/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl2/igt@[email protected]

#### Possible fixes ####

* igt@gem_userptr_blits@unsync-unmap-after-close:
- shard-apl: [TIMEOUT][51] ([i915#1635]) -> [PASS][52] +5 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl4/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl6/igt@[email protected]

* igt@gen9_exec_parse@allowed-all:
- shard-apl: [DMESG-WARN][53] ([i915#1436] / [i915#716]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl1/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl1/igt@[email protected]

* igt@i915_pm_dc@dc3co-vpb-simulation:
- shard-tglb: [SKIP][55] ([i915#1904]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-tglb8/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-tglb8/igt@[email protected]

* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [FAIL][57] ([i915#1899]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-iclb7/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-iclb7/igt@[email protected]

* igt@kms_big_fb@linear-32bpp-rotate-0:
- shard-kbl: [FAIL][59] ([i915#1119] / [i915#93] / [i915#95]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl7/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl3/igt@[email protected]
- shard-apl: [FAIL][61] ([i915#1119] / [i915#95]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl8/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl2/igt@[email protected]

* igt@kms_big_fb@linear-64bpp-rotate-180:
- shard-glk: [FAIL][63] ([i915#1119] / [i915#118] / [i915#95]) -> [PASS][64] +1 similar issue
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-glk8/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-glk1/igt@[email protected]

* igt@kms_color@pipe-a-legacy-gamma:
- shard-apl: [FAIL][65] ([fdo#108145] / [i915#71] / [i915#95]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl8/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl2/igt@[email protected]
- shard-kbl: [FAIL][67] ([fdo#108145] / [i915#71] / [i915#93] / [i915#95]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl1/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl4/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-128x128-offscreen:
- shard-kbl: [FAIL][69] ([i915#54] / [i915#93] / [i915#95]) -> [PASS][70] +2 similar issues
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl4/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl4/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-64x64-onscreen:
- shard-kbl: [FAIL][71] ([i915#54]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl1/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl1/igt@[email protected]
- shard-glk: [FAIL][73] ([i915#54]) -> [PASS][74]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-glk8/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-glk4/igt@[email protected]
- shard-apl: [FAIL][75] ([i915#54]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl8/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl6/igt@[email protected]

* igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size:
- shard-hsw: [INCOMPLETE][77] ([i915#61]) -> [PASS][78] +1 similar issue
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-hsw1/igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size.html
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-hsw8/igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size.html

* igt@kms_fbcon_fbt@fbc-suspend:
- shard-apl: [DMESG-WARN][79] ([i915#180]) -> [PASS][80] +1 similar issue
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl8/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-mmap-wc:
- shard-glk: [FAIL][81] ([i915#49]) -> [PASS][82]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-glk8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-mmap-wc.html
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-glk2/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-mmap-wc.html

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-kbl: [DMESG-WARN][83] ([i915#180]) -> [PASS][84]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl7/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl7/igt@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-kbl: [INCOMPLETE][85] ([i915#155]) -> [PASS][86]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl3/igt@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl2/igt@[email protected]

* igt@kms_psr2_su@frontbuffer:
- shard-tglb: [SKIP][87] ([i915#1911]) -> [PASS][88]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-tglb6/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-tglb8/igt@[email protected]

* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [SKIP][89] ([fdo#109441]) -> [PASS][90] +2 similar issues
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-iclb5/igt@kms_psr@psr2_primary_page_flip.html
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html

* igt@perf@i915-ref-count:
- shard-iclb: [SKIP][91] ([i915#405]) -> [PASS][92]
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-iclb8/igt@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-iclb4/igt@[email protected]
- shard-kbl: [SKIP][93] ([fdo#109271]) -> [PASS][94]
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl2/igt@[email protected]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl6/igt@[email protected]
- shard-apl: [SKIP][95] ([fdo#109271]) -> [PASS][96]
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl6/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl2/igt@[email protected]
- shard-glk: [SKIP][97] ([fdo#109271]) -> [PASS][98]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-glk6/igt@[email protected]
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-glk1/igt@[email protected]
- shard-tglb: [SKIP][99] ([i915#405]) -> [PASS][100]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-tglb5/igt@[email protected]
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-tglb6/igt@[email protected]

#### Warnings ####

* igt@kms_content_protection@legacy:
- shard-apl: [TIMEOUT][101] ([i915#1319] / [i915#1635]) -> [DMESG-FAIL][102] ([fdo#110321])
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl6/igt@[email protected]
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl2/igt@[email protected]

* igt@kms_content_protection@srm:
- shard-apl: [TIMEOUT][103] ([i915#1319] / [i915#1635]) -> [TIMEOUT][104] ([i915#1319])
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl6/igt@[email protected]
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl2/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
- shard-kbl: [FAIL][105] ([fdo#108145] / [i915#265] / [i915#93] / [i915#95]) -> [FAIL][106] ([fdo#108145] / [i915#265])
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl2/igt@[email protected]
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl2/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-apl: [FAIL][107] ([fdo#108145] / [i915#265] / [i915#95]) -> [FAIL][108] ([fdo#108145] / [i915#265]) +1 similar issue
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl3/igt@[email protected]
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl4/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
- shard-apl: [FAIL][109] ([fdo#108145] / [i915#265]) -> [FAIL][110] ([fdo#108145] / [i915#265] / [i915#95])
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-apl6/igt@[email protected]
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-apl6/igt@[email protected]
- shard-kbl: [FAIL][111] ([fdo#108145] / [i915#265]) -> [FAIL][112] ([fdo#108145] / [i915#265] / [i915#93] / [i915#95])
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8547/shard-kbl2/igt@[email protected]
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/shard-kbl3/igt@[email protected]

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

[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
[i915#1119]: https://gitlab.freedesktop.org/drm/intel/issues/1119
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#1519]: https://gitlab.freedesktop.org/drm/intel/issues/1519
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
[i915#1559]: https://gitlab.freedesktop.org/drm/intel/issues/1559
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1899]: https://gitlab.freedesktop.org/drm/intel/issues/1899
[i915#1904]: https://gitlab.freedesktop.org/drm/intel/issues/1904
[i915#1911]: https://gitlab.freedesktop.org/drm/intel/issues/1911
[i915#1927]: https://gitlab.freedesktop.org/drm/intel/issues/1927
[i915#1930]: https://gitlab.freedesktop.org/drm/intel/issues/1930
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#405]: https://gitlab.freedesktop.org/drm/intel/issues/405
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#52]: https://gitlab.freedesktop.org/drm/intel/issues/52
[i915#53]: https://gitlab.freedesktop.org/drm/intel/issues/53
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#699]: https://gitlab.freedesktop.org/drm/intel/issues/699
[i915#71]: https://gitlab.freedesktop.org/drm/intel/issues/71
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#794]: https://gitlab.freedesktop.org/drm/intel/issues/794
[i915#83]: https://gitlab.freedesktop.org/drm/intel/issues/83
[i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95

Participating hosts (11 -> 8)
------------------------------

Missing (3): pig-skl-6260u pig-glk-j5005 pig-icl-1065g7

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

* CI: CI-20190529 -> None
* IGT: IGT_5682 -> IGTPW_4619
* Piglit: piglit_4509 -> None

CI-20190529: 20190529
CI_DRM_8547: 055c59085e117a2433d3862d645e049e30f3a2dc @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4619: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4619/index.html
IGT_5682: e5371a99a877be134c6ad5361a5f03843a66f775 @ 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_4619/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#4 lore raw
In reply to Rohan Garg
Quoted 8 lines · Rohan Garg

Introduce tests to cover the new generic labeling ioctl's being reviewed here [1].

[1] https://patchwork.freedesktop.org/series/77267/

A few comments below.

Quoted 16 lines
---
  include/drm-uapi/drm.h    |  23 ++++++-
  tests/meson.build         |   1 +
  tests/panfrost_bo_label.c | 129 ++++++++++++++++++++++++++++++++++++++
  3 files changed, 152 insertions(+), 1 deletion(-)

create mode 100644 tests/panfrost_bo_label.c

include/drm-uapi/drm.h +1 -0
index c7fd2a35..87124882 100644
@@ -620,6 +620,25 @@ struct drm_gem_open {
  	__u64 size;
  };
 
+/** struct drm_handle_label - ioctl argument for labelling BOs.

include/drm-uapi/drm.h struct drm_gem_open { · line 633

Quoted 10 lines
include/drm-uapi/drm.h +10 -0
+ *
+ * This label's a BO with a userspace label
+ *
+ */
+struct drm_handle_label {
+	/** Handle for the object being labelled. */
+	__u32 handle;
+
+	/** Label and label length (len includes the trailing NULL).
+	 *  Label lenght *MUST* be smaller than PAGE_SIZE.
                  ^^^^^^

typo: s/lenght/length/

Quoted 28 lines
include/drm-uapi/drm.h +11 -1
+	 */
+	__u32 len;
+	__u64 label;
+
+	/** Flags .. Currently no flags are defined */
+	__u32 flags;
+};
+
  #define DRM_CAP_DUMB_BUFFER		0x1
  #define DRM_CAP_VBLANK_HIGH_CRTC	0x2
  #define DRM_CAP_DUMB_PREFERRED_DEPTH	0x3
@@ -941,8 +960,10 @@ extern "C" {
  #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)
-
  #define DRM_IOCTL_MODE_GETFB2		DRM_IOWR(0xCE, struct drm_mode_fb_cmd2)
+#define DRM_IOCTL_HANDLE_SET_LABEL      DRM_IOWR(0xCF, struct drm_handle_label)
+#define DRM_IOCTL_HANDLE_GET_LABEL      DRM_IOWR(0xD0, struct drm_handle_label)
+
 
  /**
   * Device specific ioctls should only be in their respective headers
tests/meson.build +0 -0
index e69bdb7d..ee91bf48 100644

tests/meson.build test_progs = [ · line 75

Quoted 4 lines
tests/meson.build +1 -0
@@ -72,6 +72,7 @@ test_progs = [
  	'kms_vblank',
  	'kms_vrr',
  	'meta_test',
+        'panfrost_bo_label',

Looks like you've used spaces rather than tabs. Please also check the rest of the patch for correct spaces/tabs.

Quoted 63 lines
tests/meson.build +0 -0
  	'panfrost_get_param',
  	'panfrost_gem_new',
  	'panfrost_prime',
tests/panfrost_bo_label.c new file +54 -0
new file mode 100644
index 00000000..d3179458
@@ -0,0 +1,129 @@
+/*
+ * Copyright © 2020 Collabora Ltd.
+ *     Author: Rohan Garg <[email protected]>
+ *
+ * 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.
+ */
+
+#include "igt.h"
+#include "igt_panfrost.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <poll.h>
+#include "vc4_drm.h"
+
+static int
+set_label(int fd, int handle, const char *label)
+{
+	struct drm_handle_label args = { 0 };
+	if (label) {
+		args.handle = handle;
+		args.len = strlen(label) + 1;
+		args.label= (uintptr_t)label;
+	}
+
+	return drmIoctl(fd, DRM_IOCTL_HANDLE_SET_LABEL, &args);
+}
+
+static const char*
+get_label(int fd, int handle)
+{

tests/panfrost_bo_label.c line 64

Quoted 10 lines
tests/panfrost_bo_label.c new file +10 -0
+	struct drm_handle_label args = {
+                .handle = handle,
+		.len = 10,
+		.label = (uintptr_t) malloc(sizeof(char*) * 10)
+        };
+
+	drmIoctl(fd, DRM_IOCTL_HANDLE_GET_LABEL, &args);
+
+	if (!args.label)
+		return NULL;

This seems out of place - assuming this is to check that malloc() succeeded then it would be normal to check before the ioctl call.

tests/panfrost_bo_label.c line 66

Quoted 2 lines
tests/panfrost_bo_label.c new file +2 -0
+
+	igt_assert(args.label);

Given the above check this can never fail.

Also nothing is checking the return from drmIoctl.

Quoted 36 lines
tests/panfrost_bo_label.c new file +36 -0
+
+        args.label = (uintptr_t) realloc(args.label, args.len);
+
+	drmIoctl(fd, DRM_IOCTL_HANDLE_GET_LABEL, &args);
+
+        return args.label;
+}
+
+
+igt_main
+{
+	int fd;
+
+	igt_fixture
+		fd = drm_open_driver(DRIVER_ANY);
+
+	igt_subtest("set-label") {
+		struct panfrost_bo *bo = igt_panfrost_gem_new(fd, 4096);
+		int ret;
+		ret = set_label(fd, bo->handle, "a test label");
+		igt_assert(ret == 0);
+
+		ret = set_label(fd, bo->handle, "a new test label");
+		igt_assert(ret == 0);
+
+		igt_panfrost_free_bo(fd, bo);
+	}
+
+	igt_subtest("get-label") {
+		struct panfrost_bo *bo = igt_panfrost_gem_new(fd, 4096);
+		set_label(fd, bo->handle, "a test label");
+		const char* label = get_label(fd, bo->handle);
+		igt_assert(strcmp(label, "a test label") == 0);
+		free(label);
+		igt_panfrost_free_bo(fd, bo);
+	}

tests/panfrost_bo_label.c line 112

Quoted 10 lines
tests/panfrost_bo_label.c new file +10 -0
+
+	igt_subtest("clear-label") {
+		struct panfrost_bo *bo = igt_panfrost_gem_new(fd, 4096);
+		set_label(fd, bo->handle, NULL);
+		igt_assert_eq(NULL, get_label(fd, bo->handle));
+		igt_panfrost_free_bo(fd, bo);
+	}
+
+	igt_subtest("label-too-long") {
+		char label[4096] = {[0 ... 4095] = 'a'};

Beware PAGE_SIZE isn't always 4096 bytes, e.g. see ARM64_64K_PAGES. You might want to try sysconf(_SC_PAGESIZE).

Steve

Quoted 8 lines
tests/panfrost_bo_label.c new file +7 -0
+		int ret;
+		struct panfrost_bo *bo = igt_panfrost_gem_new(fd, 4096);
+		ret = set_label(fd, bo->handle, label);
+		igt_assert_eq(-1, ret);
+		igt_assert_eq(EINVAL, errno);
+		igt_panfrost_free_bo(fd, bo);
+	}

tests/panfrost_bo_label.c line 129

Quoted 10 lines
tests/panfrost_bo_label.c new file +10 -0
+
+	igt_subtest("set-bad-handle") {
+		int ret = set_label(fd, 0xd0d0d0d0, "bad handle");
+		igt_assert_eq(-1, ret);
+		igt_assert_eq(ENOENT, errno);
+	}
+
+	igt_fixture
+		close(fd);
+}

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw
In reply to Rohan Garg
Quoted 10 lines · Rohan Garg

Introduce tests to cover the new generic labeling ioctl's being reviewed here [1].

[1] https://patchwork.freedesktop.org/series/77267/

---
 include/drm-uapi/drm.h    |  23 ++++++-

Please update drm.h in a separate commit, and state which kernel commit (and from which repo) it's copied from. Examples can be seen in the git log for the file.

Signature · 5 lines
Petri Latvala
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev