Skip to contentSkip to conversation

tests/kms_big_joiner: Add test to validate big joiner

PATCH Superseded Karthik B S 3 participants 5 messages Oct 1, 2020 – Oct 5, 2020 Arm/Amlogic Meson SoC support

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 tests/kms_big_joiner: Add test to validate big joiner

Added negative test to verify the different scenarios for big joiner. In the test, modeset is done on Pipe A for a big joiner mode and a second modeset is attempted on Pipe B which is expected to fail. Same functionality is validated for other pipes as well.

Secondly, the reverse is tested where a modeset is done on Pipe B and then a second big joiner modeset is attempted on Pipe A which is expected to fail. Same functionality is validated for other pipes as well.

v2: -Rename HDISPLAY_5K to MAX_HDISPLAY_PER_PIPE. (Manasi)
-Do not assume mode[0] will be the highest mode.
Loop through the mode list to find the 8k mode. (Manasi)
-Add a subtest for verifying basic 8k modeset on all pipes. (Manasi)

v3: -Add break after big joiner output is found in basic subtest. (Manasi)
-Fix the clean up part in the invalid-modeset subtest.

---
 tests/Makefile.sources |   1 +
 tests/kms_big_joiner.c | 257 +++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 3 files changed, 259 insertions(+)
 create mode 100644 tests/kms_big_joiner.c
tests/Makefile.sources +1 -0
index f32ea9cf..f59ac150 100644
@@ -38,6 +38,7 @@ TESTS_progs = \
 	kms_atomic_transition \
 	kms_available_modes_crc \
 	kms_big_fb \
+	kms_big_joiner \
 	kms_busy \
 	kms_ccs \
 	kms_concurrent \
tests/kms_big_joiner.c new file +257 -0

257 lines not on this page · raw message

tests/meson.build +1 -0
index 32f011e9..aea7d7f8 100644
@@ -22,6 +22,7 @@ test_progs = [
 	'kms_atomic_transition',
 	'kms_available_modes_crc',
 	'kms_big_fb',
+	'kms_big_joiner' ,
 	'kms_busy',
 	'kms_ccs',
 	'kms_concurrent',
Signature · 6 lines
2.22.0

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

[igt-dev] ✓ Fi.CI.BAT: success for tests/kms_big_joiner: Add test to validate big joiner (rev3)

== Series Details ==

== Series Details ==

Series: tests/kms_big_joiner: Add test to validate big joiner (rev3)
URL : https://patchwork.freedesktop.org/series/78769/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_9086 -> IGTPW_5035
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_module_load@reload:
- fi-glk-dsi: [PASS][1] -> [DMESG-WARN][2] ([i915#1982])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/fi-glk-dsi/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/fi-glk-dsi/igt@[email protected]

* igt@i915_selftest@live@active:
- fi-bsw-kefka: [PASS][3] -> [DMESG-FAIL][4] ([i915#541])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/fi-bsw-kefka/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/fi-bsw-kefka/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@execlists:
- fi-icl-y: [PASS][5] -> [INCOMPLETE][6] ([i915#2276])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/fi-icl-y/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/fi-icl-y/igt@i915_selftest@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-bsw-kefka: [PASS][7] -> [DMESG-WARN][8] ([i915#1982])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/fi-bsw-kefka/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/fi-bsw-kefka/igt@[email protected]

* igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1:
- fi-icl-u2: [PASS][9] -> [DMESG-WARN][10] ([i915#1982])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/fi-icl-u2/igt@kms_flip@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/fi-icl-u2/igt@kms_flip@[email protected]

#### Possible fixes ####

* {igt@core_hotunplug@unbind-rebind}:
- fi-kbl-x1275: [DMESG-WARN][11] ([i915#62] / [i915#92]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/fi-kbl-x1275/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/fi-kbl-x1275/igt@[email protected]

* igt@i915_module_load@reload:
- fi-byt-j1900: [DMESG-WARN][13] ([i915#1982]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/fi-byt-j1900/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/fi-byt-j1900/igt@[email protected]
- fi-icl-y: [DMESG-WARN][15] ([i915#1982]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/fi-icl-y/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/fi-icl-y/igt@[email protected]

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7500u: [DMESG-WARN][17] ([i915#2203]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/fi-kbl-7500u/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/fi-kbl-7500u/igt@[email protected]

#### Warnings ####

* igt@debugfs_test@read_all_entries:
- fi-kbl-x1275: [DMESG-WARN][19] ([i915#62] / [i915#92]) -> [DMESG-WARN][20] ([i915#62] / [i915#92] / [i915#95]) +3 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/fi-kbl-x1275/igt@debugfs_test@read_all_entries.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/fi-kbl-x1275/igt@debugfs_test@read_all_entries.html

* igt@gem_exec_suspend@basic-s0:
- fi-kbl-x1275: [DMESG-WARN][21] ([i915#1982] / [i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][22] ([i915#62] / [i915#92] / [i915#95])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/fi-kbl-x1275/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/fi-kbl-x1275/igt@[email protected]

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

* igt@kms_force_connector_basic@prune-stale-modes:
- fi-kbl-x1275: [DMESG-WARN][25] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][26] ([i915#62] / [i915#92]) +4 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/fi-kbl-x1275/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/fi-kbl-x1275/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#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2203]: https://gitlab.freedesktop.org/drm/intel/issues/2203
[i915#2276]: https://gitlab.freedesktop.org/drm/intel/issues/2276
[i915#2417]: https://gitlab.freedesktop.org/drm/intel/issues/2417
[i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95

Participating hosts (45 -> 38)
------------------------------

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_5796 -> IGTPW_5035

CI-20190529: 20190529
CI_DRM_9086: b86053f8eb427de294c64eea6b3554c78326bd10 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_5035: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/index.html
IGT_5796: 19ae9421a5af7b03a1c9a577c57f2cf8b16a0116 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Testlist changes ==

+igt@kms_big_joiner@basic
+igt@kms_big_joiner@invalid-modeset

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/index.html

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

#2 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_big_joiner: Add test to validate big joiner (rev3)

In reply to Karthik B S
== Series Details ==

== Series Details ==

Series: tests/kms_big_joiner: Add test to validate big joiner (rev3)
URL : https://patchwork.freedesktop.org/series/78769/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_9086_full -> IGTPW_5035_full
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in IGTPW_5035_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_5035/index.html

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

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

### IGT changes ###

#### Possible regressions ####

* igt@gem_ctx_persistence@legacy-engines-hostile@bsd1:
- shard-tglb: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-tglb6/igt@gem_ctx_persistence@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-tglb7/igt@gem_ctx_persistence@[email protected]

* {igt@kms_big_joiner@basic} (NEW):
- shard-tglb: NOTRUN -> [SKIP][3] +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-tglb8/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][4] +1 similar issue
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-iclb4/igt@[email protected]

New tests
---------

New tests have been introduced between CI_DRM_9086_full and IGTPW_5035_full:

### New IGT tests (2) ###

* igt@kms_big_joiner@basic:
- Statuses : 6 skip(s)
- Exec time: [0.0] s

* igt@kms_big_joiner@invalid-modeset:
- Statuses : 7 skip(s)
- Exec time: [0.0] s

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

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

### IGT changes ###

#### Issues hit ####

* igt@feature_discovery@psr2:
- shard-iclb: [PASS][5] -> [SKIP][6] ([i915#658])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-iclb2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-iclb4/igt@[email protected]

* igt@gem_exec_reloc@basic-many-active@rcs0:
- shard-apl: [PASS][7] -> [FAIL][8] ([i915#1635] / [i915#2389])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-apl8/igt@gem_exec_reloc@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-apl7/igt@gem_exec_reloc@[email protected]

* igt@gem_exec_whisper@basic-fds-forked:
- shard-glk: [PASS][9] -> [DMESG-WARN][10] ([i915#118] / [i915#95]) +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-glk9/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-glk3/igt@[email protected]

* igt@kms_big_fb@x-tiled-16bpp-rotate-0:
- shard-glk: [PASS][11] -> [FAIL][12] ([i915#1119])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-glk5/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-glk9/igt@[email protected]

* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
- shard-hsw: [PASS][13] -> [FAIL][14] ([i915#96])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-hsw6/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-hsw1/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible@b-edp1:
- shard-iclb: [PASS][15] -> [INCOMPLETE][16] ([i915#1185])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-iclb2/igt@kms_flip@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-iclb3/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-suspend@c-dp1:
- shard-kbl: [PASS][17] -> [DMESG-WARN][18] ([i915#180]) +2 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-kbl1/igt@kms_flip@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-kbl4/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-shrfb-fliptrack:
- shard-tglb: [PASS][19] -> [DMESG-WARN][20] ([i915#1982]) +3 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-tglb6/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-tglb5/igt@[email protected]

* igt@kms_plane_cursor@pipe-b-viewport-size-64:
- shard-snb: [PASS][21] -> [SKIP][22] ([fdo#109271])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-snb7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-snb7/igt@[email protected]

* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [PASS][23] -> [SKIP][24] ([fdo#109441]) +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-iclb5/igt@kms_psr@psr2_no_drrs.html

* igt@perf_pmu@module-unload:
- shard-iclb: [PASS][25] -> [DMESG-WARN][26] ([i915#1982])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-iclb2/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-iclb7/igt@[email protected]

#### Possible fixes ####

* igt@i915_pciid:
- shard-hsw: [INCOMPLETE][27] ([i915#2377]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-hsw8/igt@i915_pciid.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-hsw1/igt@i915_pciid.html

* {igt@kms_async_flips@alternate-sync-async-flip}:
- shard-apl: [DMESG-WARN][29] ([i915#1635] / [i915#1982]) -> [PASS][30] +4 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-apl2/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-apl7/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-128x128-random:
- shard-apl: [FAIL][31] ([i915#1635] / [i915#54]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-apl3/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-apl6/igt@[email protected]
- shard-glk: [FAIL][33] ([i915#54]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-glk7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-glk6/igt@[email protected]

* igt@kms_flip@2x-flip-vs-suspend@bc-vga1-hdmi-a1:
- shard-hsw: [INCOMPLETE][35] ([i915#2055]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-hsw2/igt@kms_flip@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-hsw4/igt@kms_flip@[email protected]

* igt@kms_flip@plain-flip-ts-check-interruptible@a-dp1:
- shard-kbl: [FAIL][37] ([i915#2122]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-kbl2/igt@kms_flip@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-kbl4/igt@kms_flip@[email protected]

* igt@kms_psr2_su@page_flip:
- shard-tglb: [SKIP][39] ([i915#1911]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-tglb3/igt@kms_psr2_su@page_flip.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-tglb3/igt@kms_psr2_su@page_flip.html
- shard-iclb: [SKIP][41] ([fdo#109642] / [fdo#111068]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-iclb6/igt@kms_psr2_su@page_flip.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-iclb2/igt@kms_psr2_su@page_flip.html

* igt@kms_psr@psr2_cursor_plane_move:
- shard-iclb: [SKIP][43] ([fdo#109441]) -> [PASS][44] +3 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-iclb3/igt@kms_psr@psr2_cursor_plane_move.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html

* igt@kms_universal_plane@universal-plane-pipe-b-sanity:
- shard-tglb: [DMESG-WARN][45] ([i915#1982]) -> [PASS][46] +4 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-tglb5/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-tglb3/igt@[email protected]

#### Warnings ####

* igt@gem_workarounds@suspend-resume:
- shard-tglb: [INCOMPLETE][47] ([i915#1436] / [i915#1602] / [i915#1887] / [i915#456]) -> [DMESG-WARN][48] ([i915#2411])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-tglb6/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-tglb8/igt@[email protected]

* igt@kms_content_protection@atomic-dpms:
- shard-apl: [FAIL][49] ([fdo#110321] / [fdo#110336] / [i915#1635]) -> [TIMEOUT][50] ([i915#1319] / [i915#1635] / [i915#1958])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9086/shard-apl6/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/shard-apl2/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#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
[fdo#110336]: https://bugs.freedesktop.org/show_bug.cgi?id=110336
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[i915#1119]: https://gitlab.freedesktop.org/drm/intel/issues/1119
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1185]: https://gitlab.freedesktop.org/drm/intel/issues/1185
[i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#1602]: https://gitlab.freedesktop.org/drm/intel/issues/1602
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1887]: https://gitlab.freedesktop.org/drm/intel/issues/1887
[i915#1911]: https://gitlab.freedesktop.org/drm/intel/issues/1911
[i915#1958]: https://gitlab.freedesktop.org/drm/intel/issues/1958
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2055]: https://gitlab.freedesktop.org/drm/intel/issues/2055
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2377]: https://gitlab.freedesktop.org/drm/intel/issues/2377
[i915#2389]: https://gitlab.freedesktop.org/drm/intel/issues/2389
[i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411
[i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
[i915#456]: https://gitlab.freedesktop.org/drm/intel/issues/456
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
[i915#96]: https://gitlab.freedesktop.org/drm/intel/issues/96

Participating hosts (12 -> 8)
------------------------------

Missing (4): pig-snb-2600 pig-glk-j5005 pig-skl-6260u pig-icl-1065g7

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

* CI: CI-20190529 -> None
* IGT: IGT_5796 -> IGTPW_5035
* Piglit: piglit_4509 -> None

CI-20190529: 20190529
CI_DRM_9086: b86053f8eb427de294c64eea6b3554c78326bd10 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_5035: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5035/index.html
IGT_5796: 19ae9421a5af7b03a1c9a577c57f2cf8b16a0116 @ 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_5035/index.html

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

#3 lore raw
In reply to Karthik B S
Quoted 136 lines · Karthik B S

Added negative test to verify the different scenarios for big joiner. In the test, modeset is done on Pipe A for a big joiner mode and a second modeset is attempted on Pipe B which is expected to fail. Same functionality is validated for other pipes as well.

Secondly, the reverse is tested where a modeset is done on Pipe B and then a second big joiner modeset is attempted on Pipe A which is expected to fail. Same functionality is validated for other pipes as well.

v2: -Rename HDISPLAY_5K to MAX_HDISPLAY_PER_PIPE. (Manasi)
-Do not assume mode[0] will be the highest mode.
Loop through the mode list to find the 8k mode. (Manasi)
-Add a subtest for verifying basic 8k modeset on all pipes. (Manasi)

v3: -Add break after big joiner output is found in basic subtest. (Manasi)
-Fix the clean up part in the invalid-modeset subtest.

---
 tests/Makefile.sources |   1 +
 tests/kms_big_joiner.c | 257 +++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 3 files changed, 259 insertions(+)
 create mode 100644 tests/kms_big_joiner.c
tests/Makefile.sources +1 -0
index f32ea9cf..f59ac150 100644
@@ -38,6 +38,7 @@ TESTS_progs = \
 	kms_atomic_transition \
 	kms_available_modes_crc \
 	kms_big_fb \
+	kms_big_joiner \
 	kms_busy \
 	kms_ccs \
 	kms_concurrent \
tests/kms_big_joiner.c new file +93 -0
new file mode 100644
index 00000000..58171ce8
@@ -0,0 +1,257 @@
+/*
+ * Copyright © 2020 Intel Corporation
+ *
+ * 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.
+ *
+ * Author:
+ *  Karthik B S <[email protected]>
+ */
+
+#include "igt.h"
+
+#define MAX_HDISPLAY_PER_PIPE 5120
+
+IGT_TEST_DESCRIPTION("Test big joiner");
+
+typedef struct {
+	int drm_fd;
+	igt_display_t display;
+	struct igt_fb fb;
+	int mode_number;
+	int n_pipes;
+	uint32_t big_joiner_output_id;
+} data_t;
+
+static void test_invalid_modeset(data_t *data)
+{
+	drmModeModeInfo *mode;
+	igt_display_t *display = &data->display;
+	igt_output_t *output, *big_joiner_output = NULL, *second_output = NULL;
+	int width = 0, height = 0, i, ret;
+	igt_pipe_t *pipe;
+	igt_plane_t *plane;
+
+	for_each_connected_output(display, output) {
+		mode = &output->config.connector->modes[0];
+
+		if (data->big_joiner_output_id == output->id) {
+			mode = &output->config.connector->modes[data->mode_number];
+			big_joiner_output = output;
+		} else if (second_output == NULL) {
+			second_output = output;
+		}
+
+		width = max(width, mode->hdisplay);
+		height = max(height, mode->vdisplay);
+	}
+
+	igt_create_pattern_fb(data->drm_fd, width, height, DRM_FORMAT_XRGB8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE, &data->fb);
+
+	for_each_pipe(display, i) {
+		if (i < (data->n_pipes - 1)) {
+			igt_output_set_pipe(big_joiner_output, i);
+
+			mode = &big_joiner_output->config.connector->modes[data->mode_number];
+			igt_output_override_mode(big_joiner_output, mode);
+
+			pipe = &display->pipes[i];
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+			igt_plane_set_fb(plane, &data->fb);
+			igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
+			igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
+
+			igt_display_commit2(display, COMMIT_ATOMIC);
+
+			igt_output_set_pipe(second_output, i + 1);
+
+			mode = igt_output_get_mode(second_output);
+
+			pipe = &display->pipes[i + 1];
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+			igt_plane_set_fb(plane, &data->fb);
+			igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
+			igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);

tests/kms_big_joiner.c line 103

Quoted 10 lines
tests/kms_big_joiner.c new file +10 -0
+
+			/* This commit is expectd to fail as this pipe is being used for big joiner */
+			ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_TEST_ONLY |
+							    DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+			igt_assert_lt(ret, 0);
+
+			igt_output_set_pipe(big_joiner_output, PIPE_NONE);
+			igt_output_set_pipe(second_output, PIPE_NONE);
+
+			pipe = &display->pipes[i];

So here you fixed this to get the plane only for big joiner master pipe and set fb for that to NULL
Is that what fixed the NULL pointer dereferencing?

Quoted 35 lines
tests/kms_big_joiner.c new file +35 -0
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+			igt_plane_set_fb(plane, NULL);
+			igt_display_commit2(display, COMMIT_ATOMIC);
+			igt_output_override_mode(big_joiner_output, NULL);
+		}
+	}
+
+	for_each_pipe(display, i) {
+		if (i < (data->n_pipes - 1)) {
+			igt_output_set_pipe(second_output, i + 1);
+
+			mode = igt_output_get_mode(second_output);
+
+			pipe = &display->pipes[i + 1];
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+			igt_plane_set_fb(plane, &data->fb);
+			igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
+			igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
+
+			igt_display_commit2(display, COMMIT_ATOMIC);
+
+			igt_output_set_pipe(big_joiner_output, i);
+
+			mode = &big_joiner_output->config.connector->modes[data->mode_number];
+			igt_output_override_mode(big_joiner_output, mode);
+
+			pipe = &display->pipes[i];
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+			igt_plane_set_fb(plane, &data->fb);
+			igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
+			igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
+

tests/kms_big_joiner.c line 148

Quoted 10 lines
tests/kms_big_joiner.c new file +10 -0
+			/* This commit is expected to fail as the adjacent pipe is already in use*/
+			ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_TEST_ONLY |
+							    DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+			igt_assert_lt(ret, 0);
+
+			igt_output_set_pipe(big_joiner_output, PIPE_NONE);
+			igt_output_set_pipe(second_output, PIPE_NONE);
+			igt_plane_set_fb(plane, NULL);
+
+			pipe = &display->pipes[i + 1];

But here we basically obtain the plane for pipes[i+1] which is for eDP in our test and set the fb for that to NULL, how does that fix the issue?

May be for clarificatio on cleanup, add comments on why only particular fb needs to be set to NULL so that its clear.

Manasi

Quoted 124 lines
tests/kms_big_joiner.c new file +109 -0
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+			igt_plane_set_fb(plane, NULL);
+
+			igt_display_commit2(display, COMMIT_ATOMIC);
+
+			igt_output_override_mode(big_joiner_output, NULL);
+		}
+	}
+
+	igt_remove_fb(data->drm_fd, &data->fb);
+}
+
+static void test_basic_modeset(data_t *data)
+{
+	drmModeModeInfo *mode;
+	igt_output_t *output, *big_joiner_output = NULL;
+	igt_display_t *display = &data->display;
+	int width = 0, height = 0, i;
+	igt_pipe_t *pipe;
+	igt_plane_t *plane;
+
+	for_each_connected_output(display, output) {
+		if (data->big_joiner_output_id == output->id) {
+			mode = &output->config.connector->modes[data->mode_number];
+			big_joiner_output = output;
+			width = mode->hdisplay;
+			height = mode->vdisplay;
+			break;
+		}
+	}
+
+	igt_create_pattern_fb(data->drm_fd, width, height, DRM_FORMAT_XRGB8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE, &data->fb);
+
+	for_each_pipe(display, i) {
+		if (i < (data->n_pipes - 1)) {
+			igt_output_set_pipe(big_joiner_output, i);
+
+			mode = &big_joiner_output->config.connector->modes[data->mode_number];
+			igt_output_override_mode(big_joiner_output, mode);
+
+			pipe = &display->pipes[i];
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+			igt_plane_set_fb(plane, &data->fb);
+			igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
+			igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
+
+			igt_display_commit2(display, COMMIT_ATOMIC);
+
+			igt_output_set_pipe(big_joiner_output, PIPE_NONE);
+			igt_plane_set_fb(plane, NULL);
+			igt_display_commit2(display, COMMIT_ATOMIC);
+		}
+	}
+
+	igt_remove_fb(data->drm_fd, &data->fb);
+}
+
+igt_main
+{
+	data_t data;
+	bool big_joiner_mode_found = false;
+	igt_output_t *output;
+	drmModeModeInfo *mode;
+	int valid_output = 0, i;
+
+	igt_fixture {
+		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+		kmstest_set_vt_graphics_mode();
+
+		igt_display_require(&data.display, data.drm_fd);
+
+		for_each_connected_output(&data.display, output) {
+			if (!big_joiner_mode_found) {
+				for (i = 0; i < output->config.connector->count_modes; i++) {
+					mode = &output->config.connector->modes[i];
+					if (mode->hdisplay > MAX_HDISPLAY_PER_PIPE) {
+						big_joiner_mode_found = true;
+						data.mode_number = i;
+						data.big_joiner_output_id = output->id;
+						break;
+					}
+				}
+			}
+			valid_output++;
+		}
+
+		data.n_pipes = 0;
+		for_each_pipe(&data.display, i)
+			data.n_pipes++;
+
+		igt_require_f(big_joiner_mode_found, "No output with 5k+ mode found\n");
+	}
+
+	igt_describe("Verify the basic modeset on big joiner mode on all pipes");
+	igt_subtest("basic")
+		test_basic_modeset(&data);
+
+	igt_describe("Verify if the modeset on the adjoining pipe is rejected "
+		     "when the pipe is active with a big joiner modeset");
+	igt_subtest("invalid-modeset") {
+		igt_require_f(valid_output > 1, "No valid Second output found\n");
+		test_invalid_modeset(&data);
+	}
+
+	igt_fixture
+		igt_display_fini(&data.display);
+}
tests/meson.build +1 -0
index 32f011e9..aea7d7f8 100644
@@ -22,6 +22,7 @@ test_progs = [
 	'kms_atomic_transition',
 	'kms_available_modes_crc',
 	'kms_big_fb',
+	'kms_big_joiner' ,
 	'kms_busy',
 	'kms_ccs',
 	'kms_concurrent',
Signature · 1 line
2.22.0

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

#4 lore raw
Quoted 143 lines · Manasi
Quoted 142 lines · Karthik B S

Added negative test to verify the different scenarios for big joiner. In the test, modeset is done on Pipe A for a big joiner mode and a second modeset is attempted on Pipe B which is expected to fail. Same functionality is validated for other pipes as well.

Secondly, the reverse is tested where a modeset is done on Pipe B and then a second big joiner modeset is attempted on Pipe A which is expected to fail. Same functionality is validated for other pipes as well.

v2: -Rename HDISPLAY_5K to MAX_HDISPLAY_PER_PIPE. (Manasi)
-Do not assume mode[0] will be the highest mode.
Loop through the mode list to find the 8k mode. (Manasi)
-Add a subtest for verifying basic 8k modeset on all pipes. (Manasi)

v3: -Add break after big joiner output is found in basic subtest. (Manasi)
-Fix the clean up part in the invalid-modeset subtest.

---
  tests/Makefile.sources |   1 +
  tests/kms_big_joiner.c | 257 +++++++++++++++++++++++++++++++++++++++++
  tests/meson.build      |   1 +
  3 files changed, 259 insertions(+)

create mode 100644 tests/kms_big_joiner.c

tests/Makefile.sources +1 -0
index f32ea9cf..f59ac150 100644
@@ -38,6 +38,7 @@ TESTS_progs = \
  	kms_atomic_transition \
  	kms_available_modes_crc \
  	kms_big_fb \
+	kms_big_joiner \
  	kms_busy \
  	kms_ccs \
  	kms_concurrent \
tests/kms_big_joiner.c new file +99 -0
new file mode 100644
index 00000000..58171ce8
@@ -0,0 +1,257 @@
+/*
+ * Copyright © 2020 Intel Corporation
+ *
+ * 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.
+ *
+ * Author:
+ *  Karthik B S <[email protected]>
+ */
+
+#include "igt.h"
+
+#define MAX_HDISPLAY_PER_PIPE 5120
+
+IGT_TEST_DESCRIPTION("Test big joiner");
+
+typedef struct {
+	int drm_fd;
+	igt_display_t display;
+	struct igt_fb fb;
+	int mode_number;
+	int n_pipes;
+	uint32_t big_joiner_output_id;
+} data_t;
+
+static void test_invalid_modeset(data_t *data)
+{
+	drmModeModeInfo *mode;
+	igt_display_t *display = &data->display;
+	igt_output_t *output, *big_joiner_output = NULL, *second_output = NULL;
+	int width = 0, height = 0, i, ret;
+	igt_pipe_t *pipe;
+	igt_plane_t *plane;
+
+	for_each_connected_output(display, output) {
+		mode = &output->config.connector->modes[0];
+
+		if (data->big_joiner_output_id == output->id) {
+			mode = &output->config.connector->modes[data->mode_number];
+			big_joiner_output = output;
+		} else if (second_output == NULL) {
+			second_output = output;
+		}
+
+		width = max(width, mode->hdisplay);
+		height = max(height, mode->vdisplay);
+	}
+
+	igt_create_pattern_fb(data->drm_fd, width, height, DRM_FORMAT_XRGB8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE, &data->fb);
+
+	for_each_pipe(display, i) {
+		if (i < (data->n_pipes - 1)) {
+			igt_output_set_pipe(big_joiner_output, i);
+
+			mode = &big_joiner_output->config.connector->modes[data->mode_number];
+			igt_output_override_mode(big_joiner_output, mode);
+
+			pipe = &display->pipes[i];
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+			igt_plane_set_fb(plane, &data->fb);
+			igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
+			igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
+
+			igt_display_commit2(display, COMMIT_ATOMIC);
+
+			igt_output_set_pipe(second_output, i + 1);
+
+			mode = igt_output_get_mode(second_output);
+
+			pipe = &display->pipes[i + 1];
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+			igt_plane_set_fb(plane, &data->fb);
+			igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
+			igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
+
+			/* This commit is expectd to fail as this pipe is being used for big joiner */
+			ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_TEST_ONLY |
+							    DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+			igt_assert_lt(ret, 0);
+
Quoted 9 lines

tests/kms_big_joiner.c line 103

Quoted 4 lines
tests/kms_big_joiner.c new file +4 -0
+			igt_output_set_pipe(big_joiner_output, PIPE_NONE);
+			igt_output_set_pipe(second_output, PIPE_NONE);
+
+			pipe = &display->pipes[i];

So here you fixed this to get the plane only for big joiner master pipe and set fb for that to NULL
Is that what fixed the NULL pointer dereferencing?

Yes. Before I was setting the eDP plane also to NULL together with the plane for big joiner master, which was leading to the NULL pointer dereference.

Quoted 40 lines
Quoted 40 lines
tests/kms_big_joiner.c new file +40 -0
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+			igt_plane_set_fb(plane, NULL);
+			igt_display_commit2(display, COMMIT_ATOMIC);
+			igt_output_override_mode(big_joiner_output, NULL);
+		}
+	}
+
+	for_each_pipe(display, i) {
+		if (i < (data->n_pipes - 1)) {
+			igt_output_set_pipe(second_output, i + 1);
+
+			mode = igt_output_get_mode(second_output);
+
+			pipe = &display->pipes[i + 1];
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+			igt_plane_set_fb(plane, &data->fb);
+			igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
+			igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
+
+			igt_display_commit2(display, COMMIT_ATOMIC);
+
+			igt_output_set_pipe(big_joiner_output, i);
+
+			mode = &big_joiner_output->config.connector->modes[data->mode_number];
+			igt_output_override_mode(big_joiner_output, mode);
+
+			pipe = &display->pipes[i];
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+			igt_plane_set_fb(plane, &data->fb);
+			igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
+			igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
+
+			/* This commit is expected to fail as the adjacent pipe is already in use*/
+			ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_TEST_ONLY |
+							    DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+			igt_assert_lt(ret, 0);
+
Quoted 9 lines

tests/kms_big_joiner.c line 118

Quoted 5 lines
tests/kms_big_joiner.c new file +5 -0
+			igt_output_set_pipe(big_joiner_output, PIPE_NONE);
+			igt_output_set_pipe(second_output, PIPE_NONE);
+			igt_plane_set_fb(plane, NULL);
+
+			pipe = &display->pipes[i + 1];

But here we basically obtain the plane for pipes[i+1] which is for eDP in our test and set the fb for that to NULL, how does that fix the issue?

Here we're setting the planes of both the eDP and the big joiner output to NULL. I even tried by only setting eDP plane to NULL and not doing anything with the big joiner plane as big joiner modeset is getting rejected anyway in this case. But this leads to the NULL pointer dereference during test exit like we were seeing in the basic case before.

Quoted 3 lines

May be for clarificatio on cleanup, add comments on why only particular fb needs to be set to NULL so that its clear.

Sure, I'll add these comments.

Thanks,
Karthik.B.S

Quoted 118 lines

Manasi

Quoted 116 lines
tests/kms_big_joiner.c new file +109 -0
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+			igt_plane_set_fb(plane, NULL);
+
+			igt_display_commit2(display, COMMIT_ATOMIC);
+
+			igt_output_override_mode(big_joiner_output, NULL);
+		}
+	}
+
+	igt_remove_fb(data->drm_fd, &data->fb);
+}
+
+static void test_basic_modeset(data_t *data)
+{
+	drmModeModeInfo *mode;
+	igt_output_t *output, *big_joiner_output = NULL;
+	igt_display_t *display = &data->display;
+	int width = 0, height = 0, i;
+	igt_pipe_t *pipe;
+	igt_plane_t *plane;
+
+	for_each_connected_output(display, output) {
+		if (data->big_joiner_output_id == output->id) {
+			mode = &output->config.connector->modes[data->mode_number];
+			big_joiner_output = output;
+			width = mode->hdisplay;
+			height = mode->vdisplay;
+			break;
+		}
+	}
+
+	igt_create_pattern_fb(data->drm_fd, width, height, DRM_FORMAT_XRGB8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE, &data->fb);
+
+	for_each_pipe(display, i) {
+		if (i < (data->n_pipes - 1)) {
+			igt_output_set_pipe(big_joiner_output, i);
+
+			mode = &big_joiner_output->config.connector->modes[data->mode_number];
+			igt_output_override_mode(big_joiner_output, mode);
+
+			pipe = &display->pipes[i];
+			plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
+
+			igt_plane_set_fb(plane, &data->fb);
+			igt_fb_set_size(&data->fb, plane, mode->hdisplay, mode->vdisplay);
+			igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
+
+			igt_display_commit2(display, COMMIT_ATOMIC);
+
+			igt_output_set_pipe(big_joiner_output, PIPE_NONE);
+			igt_plane_set_fb(plane, NULL);
+			igt_display_commit2(display, COMMIT_ATOMIC);
+		}
+	}
+
+	igt_remove_fb(data->drm_fd, &data->fb);
+}
+
+igt_main
+{
+	data_t data;
+	bool big_joiner_mode_found = false;
+	igt_output_t *output;
+	drmModeModeInfo *mode;
+	int valid_output = 0, i;
+
+	igt_fixture {
+		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+		kmstest_set_vt_graphics_mode();
+
+		igt_display_require(&data.display, data.drm_fd);
+
+		for_each_connected_output(&data.display, output) {
+			if (!big_joiner_mode_found) {
+				for (i = 0; i < output->config.connector->count_modes; i++) {
+					mode = &output->config.connector->modes[i];
+					if (mode->hdisplay > MAX_HDISPLAY_PER_PIPE) {
+						big_joiner_mode_found = true;
+						data.mode_number = i;
+						data.big_joiner_output_id = output->id;
+						break;
+					}
+				}
+			}
+			valid_output++;
+		}
+
+		data.n_pipes = 0;
+		for_each_pipe(&data.display, i)
+			data.n_pipes++;
+
+		igt_require_f(big_joiner_mode_found, "No output with 5k+ mode found\n");
+	}
+
+	igt_describe("Verify the basic modeset on big joiner mode on all pipes");
+	igt_subtest("basic")
+		test_basic_modeset(&data);
+
+	igt_describe("Verify if the modeset on the adjoining pipe is rejected "
+		     "when the pipe is active with a big joiner modeset");
+	igt_subtest("invalid-modeset") {
+		igt_require_f(valid_output > 1, "No valid Second output found\n");
+		test_invalid_modeset(&data);
+	}
+
+	igt_fixture
+		igt_display_fini(&data.display);
+}
tests/meson.build +0 -0
index 32f011e9..aea7d7f8 100644
@@ -22,6 +22,7 @@ test_progs = [
  	'kms_atomic_transition',
  	'kms_available_modes_crc',
Quoted 8 lines
Quoted 8 lines
tests/meson.build +1 -0
  	'kms_big_fb',
+	'kms_big_joiner' ,
  	'kms_busy',
  	'kms_ccs',
  	'kms_concurrent',
Signature · 1 line
2.22.0

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