Skip to contentSkip to conversation

tests/amdgpu: Test plane level CTM

PATCH In review Stylon Wang 3 participants 5 messages Dec 10, 2019 – Dec 11, 2019 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/amdgpu: Test plane level CTM

From: Stylon Wang <[email protected]>
To: [email protected]

Checks if plane-level color transformation works as expected as changing color according to the supplied matrices.

Patch to support plane-level CTM is required to actually run the test. If not available the test is skipped.

---
 lib/igt_kms.c            |  15 ++
 lib/igt_kms.h            |   5 +
 tests/amdgpu/amd_color.c | 295 +++++++++++++++++++++++++++++++++++++--
 3 files changed, 304 insertions(+), 11 deletions(-)
lib/igt_kms.c +15 -0
index e9b80b9b..e3edc68b 100644
@@ -387,6 +387,11 @@ const char * const igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
 	[IGT_PLANE_COLOR_RANGE] = "COLOR_RANGE",
 	[IGT_PLANE_PIXEL_BLEND_MODE] = "pixel blend mode",
 	[IGT_PLANE_ALPHA] = "alpha",
+	[IGT_PLANE_CTM] = "PLANE_CTM",
+	[IGT_PLANE_GAMMA_LUT] = "PLANE_GAMMA_LUT",
+	[IGT_PLANE_GAMMA_LUT_SIZE] = "PLANE_GAMMA_LUT_SIZE",
+	[IGT_PLANE_DEGAMMA_LUT] = "PLANE_DEGAMMA_LUT",
+	[IGT_PLANE_DEGAMMA_LUT_SIZE] = "PLANE_DEGAMMA_LUT_SIZE",
 	[IGT_PLANE_ZPOS] = "zpos",
 };
 
@@ -1814,6 +1819,16 @@ static void igt_plane_reset(igt_plane_t *plane)
 	if (igt_plane_has_prop(plane, IGT_PLANE_ALPHA))
 		igt_plane_set_prop_value(plane, IGT_PLANE_ALPHA, 0xffff);
 
+	/* reset color management */
+	if (igt_plane_has_prop(plane, IGT_PLANE_CTM))
+		igt_plane_replace_prop_blob(plane, IGT_PLANE_CTM, NULL, 0);
+
+	if (igt_plane_has_prop(plane, IGT_PLANE_GAMMA_LUT))
+		igt_plane_replace_prop_blob(plane, IGT_PLANE_GAMMA_LUT, NULL, 0);
+
+	if (igt_plane_has_prop(plane, IGT_PLANE_DEGAMMA_LUT))
+		igt_plane_replace_prop_blob(plane, IGT_PLANE_DEGAMMA_LUT, NULL, 0);
+
 
 	igt_plane_clear_prop_changed(plane, IGT_PLANE_IN_FENCE_FD);
 	plane->values[IGT_PLANE_IN_FENCE_FD] = ~0ULL;
lib/igt_kms.h +5 -0
index 7193f9a5..d6cccc8c 100644
@@ -275,6 +275,11 @@ enum igt_atomic_plane_properties {
        IGT_PLANE_PIXEL_BLEND_MODE,
        IGT_PLANE_ALPHA,
        IGT_PLANE_ZPOS,
+       IGT_PLANE_CTM,
+       IGT_PLANE_GAMMA_LUT,
+       IGT_PLANE_GAMMA_LUT_SIZE,
+       IGT_PLANE_DEGAMMA_LUT,
+       IGT_PLANE_DEGAMMA_LUT_SIZE,
        IGT_NUM_PLANE_PROPS
 };
 
tests/amdgpu/amd_color.c +284 -11

380 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

[igt-dev] ✓ Fi.CI.BAT: success for tests/amdgpu: Test plane level CTM

== Series Details ==

== Series Details ==

Series: tests/amdgpu: Test plane level CTM
URL : https://patchwork.freedesktop.org/series/70667/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7524 -> IGTPW_3836
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_pm_rpm@module-reload:
- fi-skl-lmem: [PASS][1] -> [DMESG-WARN][2] ([i915#592])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/fi-skl-lmem/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/fi-skl-lmem/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][3] -> [FAIL][4] ([fdo#111096] / [i915#323])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/fi-kbl-7500u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/fi-kbl-7500u/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_gttfill@basic:
- {fi-tgl-guc}: [INCOMPLETE][5] ([fdo#111593]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/fi-tgl-guc/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/fi-tgl-guc/igt@[email protected]

* igt@gem_sync@basic-store-each:
- {fi-tgl-u}: [INCOMPLETE][7] ([i915#435] / [i915#472]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/fi-tgl-u/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/fi-tgl-u/igt@[email protected]

* igt@i915_selftest@live_gem_contexts:
- fi-byt-n2820: [DMESG-FAIL][9] ([i915#722]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html

* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [DMESG-WARN][11] ([i915#44]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/fi-hsw-peppy/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/fi-hsw-peppy/igt@[email protected]

#### Warnings ####

* igt@gem_exec_suspend@basic-s4-devices:
- fi-kbl-x1275: [DMESG-WARN][13] ([fdo#107139] / [i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][14] ([fdo#107139] / [i915#62] / [i915#92])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/fi-kbl-x1275/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/fi-kbl-x1275/igt@[email protected]

* igt@i915_selftest@live_blt:
- fi-hsw-4770: [DMESG-FAIL][15] -> [DMESG-FAIL][16] ([i915#553] / [i915#725])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/fi-hsw-4770/igt@i915_selftest@live_blt.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/fi-hsw-4770/igt@i915_selftest@live_blt.html

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-kbl-x1275: [DMESG-WARN][17] ([i915#62] / [i915#92]) -> [DMESG-WARN][18] ([i915#62] / [i915#92] / [i915#95]) +8 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/fi-kbl-x1275/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/fi-kbl-x1275/igt@[email protected]

* igt@kms_force_connector_basic@prune-stale-modes:
- fi-kbl-x1275: [DMESG-WARN][19] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][20] ([i915#62] / [i915#92]) +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/fi-kbl-x1275/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/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#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111593]: https://bugs.freedesktop.org/show_bug.cgi?id=111593
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#435]: https://gitlab.freedesktop.org/drm/intel/issues/435
[i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
[i915#472]: https://gitlab.freedesktop.org/drm/intel/issues/472
[i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
[i915#592]: https://gitlab.freedesktop.org/drm/intel/issues/592
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#722]: https://gitlab.freedesktop.org/drm/intel/issues/722
[i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95

Participating hosts (45 -> 39)
------------------------------

Missing (6): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-tgl-y fi-byt-clapper

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

* CI: CI-20190529 -> None
* IGT: IGT_5341 -> IGTPW_3836

CI-20190529: 20190529
CI_DRM_7524: 28ecf94a6f1072fc4744c06f5b3d267297125b37 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3836: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/index.html
IGT_5341: 5fe683cdebde2d77d16ffc42c9fdf29a9f95bb82 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Testlist changes ==

+igt@amdgpu/amd_color@plane-ctm-color-remapping +igt@amdgpu/amd_color@plane-ctm-intensity-reduction +igt@amdgpu/amd_color@plane-ctm-mixed-mapping +igt@amdgpu/amd_color@plane-ctm-negative-mapping

== Logs ==

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

#2 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for tests/amdgpu: Test plane level CTM

In reply to Stylon Wang
== Series Details ==

== Series Details ==

Series: tests/amdgpu: Test plane level CTM
URL : https://patchwork.freedesktop.org/series/70667/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7524_full -> IGTPW_3836_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Suppressed ####

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

* {igt@gem_render_copy@y-tiled-to-vebox-linear}:
- shard-iclb: NOTRUN -> [SKIP][1] +9 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-iclb6/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_isolation@rcs0-s3:
- shard-kbl: [PASS][2] -> [DMESG-WARN][3] ([i915#180]) +2 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-kbl2/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-kbl2/igt@[email protected]

* igt@gem_ctx_persistence@vcs1-mixed:
- shard-iclb: [PASS][4] -> [SKIP][5] ([fdo#109276] / [fdo#112080])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-iclb1/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-iclb3/igt@[email protected]

* igt@gem_exec_parallel@vcs1-fds:
- shard-iclb: [PASS][6] -> [SKIP][7] ([fdo#112080]) +3 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-iclb1/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-iclb6/igt@[email protected]

* igt@gem_exec_schedule@independent-bsd1:
- shard-iclb: [PASS][8] -> [SKIP][9] ([fdo#109276])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-iclb1/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-iclb6/igt@[email protected]

* igt@gem_exec_schedule@out-order-bsd:
- shard-iclb: [PASS][10] -> [SKIP][11] ([fdo#112146])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-iclb3/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-iclb1/igt@[email protected]

* igt@gem_exec_suspend@basic-s3:
- shard-tglb: [PASS][12] -> [INCOMPLETE][13] ([fdo#111736] / [i915#460])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-tglb6/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-tglb3/igt@[email protected]

* igt@gem_exec_whisper@normal:
- shard-tglb: [PASS][14] -> [INCOMPLETE][15] ([i915#435])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-tglb7/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-tglb6/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-snb: [PASS][16] -> [DMESG-WARN][17] ([fdo#111870]) +1 similar issue
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-snb5/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-snb7/igt@[email protected]

* igt@i915_selftest@live_requests:
- shard-tglb: [PASS][18] -> [INCOMPLETE][19] ([fdo#112057])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-tglb2/igt@i915_selftest@live_requests.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-tglb7/igt@i915_selftest@live_requests.html

* igt@i915_selftest@mock_sanitycheck:
- shard-kbl: [PASS][20] -> [DMESG-WARN][21] ([i915#747])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-kbl1/igt@i915_selftest@mock_sanitycheck.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-kbl2/igt@i915_selftest@mock_sanitycheck.html
- shard-snb: [PASS][22] -> [DMESG-WARN][23] ([i915#747])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-snb4/igt@i915_selftest@mock_sanitycheck.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-snb4/igt@i915_selftest@mock_sanitycheck.html

* igt@kms_flip@flip-vs-suspend:
- shard-apl: [PASS][24] -> [DMESG-WARN][25] ([i915#180])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-apl2/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-apl4/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-hsw: [PASS][26] -> [INCOMPLETE][27] ([i915#61])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-hsw7/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-hsw4/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-apl: [PASS][28] -> [FAIL][29] ([i915#49])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-apl1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-apl2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite.html
- shard-kbl: [PASS][30] -> [FAIL][31] ([i915#49])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-kbl3/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite.html

* igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw:
- shard-tglb: [PASS][32] -> [FAIL][33] ([i915#49])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-tglb2/igt@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-tglb7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-suspend:
- shard-tglb: [PASS][34] -> [INCOMPLETE][35] ([i915#456] / [i915#460] / [i915#474])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-tglb1/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-tglb3/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite:
- shard-tglb: [PASS][36] -> [INCOMPLETE][37] ([fdo#112393] / [i915#667])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-tglb8/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite.html
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-tglb3/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite.html

* igt@kms_universal_plane@universal-plane-pipe-b-functional:
- shard-glk: [PASS][38] -> [FAIL][39] ([i915#331])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-glk1/igt@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-glk1/igt@[email protected]
- shard-apl: [PASS][40] -> [FAIL][41] ([i915#331])
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-apl2/igt@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-apl8/igt@[email protected]
- shard-kbl: [PASS][42] -> [FAIL][43] ([i915#331])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-kbl1/igt@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-kbl2/igt@[email protected]

* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-tglb: [PASS][44] -> [INCOMPLETE][45] ([i915#456] / [i915#460]) +2 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-tglb3/igt@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-tglb4/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_isolation@rcs0-s3:
- shard-apl: [DMESG-WARN][46] ([i915#180]) -> [PASS][47]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-apl4/igt@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-apl8/igt@[email protected]

* igt@gem_ctx_persistence@vecs0-mixed-process:
- shard-apl: [FAIL][48] ([i915#679]) -> [PASS][49]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-apl2/igt@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-apl3/igt@[email protected]
- shard-glk: [FAIL][50] ([i915#679]) -> [PASS][51]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-glk9/igt@[email protected]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-glk1/igt@[email protected]

* igt@gem_exec_nop@basic-parallel:
- shard-tglb: [INCOMPLETE][52] ([i915#435]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-tglb8/igt@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-tglb1/igt@[email protected]

* igt@gem_exec_schedule@preempt-queue-render:
- shard-tglb: [INCOMPLETE][54] ([fdo#111606] / [fdo#111677]) -> [PASS][55] +1 similar issue
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-tglb6/igt@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-tglb9/igt@[email protected]

* igt@gem_exec_schedule@preemptive-hang-bsd:
- shard-iclb: [SKIP][56] ([fdo#112146]) -> [PASS][57] +3 similar issues
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-iclb1/igt@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-iclb8/igt@[email protected]

* igt@gem_exec_schedule@smoketest-vebox:
- shard-tglb: [INCOMPLETE][58] ([i915#707]) -> [PASS][59]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-tglb6/igt@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-tglb2/igt@[email protected]

* igt@gem_exec_store@cachelines-vcs1:
- shard-iclb: [SKIP][60] ([fdo#112080]) -> [PASS][61] +2 similar issues
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-iclb3/igt@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-iclb1/igt@[email protected]

* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-kbl: [FAIL][62] ([i915#644]) -> [PASS][63]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-kbl1/igt@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-kbl3/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap-after-close:
- shard-snb: [DMESG-WARN][64] ([fdo#111870]) -> [PASS][65]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-snb7/igt@[email protected]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-snb7/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-256x85-sliding:
- shard-hsw: [DMESG-WARN][66] ([IGT#6]) -> [PASS][67]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-hsw6/igt@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-hsw1/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-64x21-random:
- shard-kbl: [FAIL][68] ([i915#54]) -> [PASS][69]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-kbl4/igt@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-kbl6/igt@[email protected]
- shard-apl: [FAIL][70] ([i915#54]) -> [PASS][71]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-apl2/igt@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-apl8/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-pwrite:
- shard-tglb: [FAIL][72] ([i915#49]) -> [PASS][73] +1 similar issue
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-tglb6/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-pwrite.html
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-tglb8/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-pwrite.html

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: [DMESG-WARN][74] ([i915#180]) -> [PASS][75] +5 similar issues
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-kbl2/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-kbl3/igt@[email protected]
- shard-tglb: [INCOMPLETE][76] ([i915#456] / [i915#460]) -> [PASS][77]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-tglb1/igt@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-tglb2/igt@[email protected]

* igt@kms_psr2_su@page_flip:
- shard-iclb: [SKIP][78] ([fdo#109642] / [fdo#111068]) -> [PASS][79]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-iclb6/igt@kms_psr2_su@page_flip.html
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-iclb2/igt@kms_psr2_su@page_flip.html

* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [SKIP][80] ([fdo#109441]) -> [PASS][81] +1 similar issue
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-iclb1/igt@kms_psr@psr2_primary_mmap_cpu.html
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html

* igt@prime_busy@after-bsd2:
- shard-iclb: [SKIP][82] ([fdo#109276]) -> [PASS][83] +3 similar issues
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-iclb6/igt@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-iclb2/igt@[email protected]

#### Warnings ####

* igt@gem_ctx_isolation@vcs2-dirty-switch:
- shard-tglb: [SKIP][84] ([fdo#111912] / [fdo#112080]) -> [SKIP][85] ([fdo#112080])
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7524/shard-tglb5/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/shard-tglb9/igt@[email protected]

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

[IGT#6]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/6
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111606]: https://bugs.freedesktop.org/show_bug.cgi?id=111606
[fdo#111677]: https://bugs.freedesktop.org/show_bug.cgi?id=111677
[fdo#111736]: https://bugs.freedesktop.org/show_bug.cgi?id=111736
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#111912]: https://bugs.freedesktop.org/show_bug.cgi?id=111912
[fdo#112057]: https://bugs.freedesktop.org/show_bug.cgi?id=112057
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[fdo#112393]: https://bugs.freedesktop.org/show_bug.cgi?id=112393
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#331]: https://gitlab.freedesktop.org/drm/intel/issues/331
[i915#435]: https://gitlab.freedesktop.org/drm/intel/issues/435
[i915#456]: https://gitlab.freedesktop.org/drm/intel/issues/456
[i915#460]: https://gitlab.freedesktop.org/drm/intel/issues/460
[i915#474]: https://gitlab.freedesktop.org/drm/intel/issues/474
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#667]: https://gitlab.freedesktop.org/drm/intel/issues/667
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#679]: https://gitlab.freedesktop.org/drm/intel/issues/679
[i915#707]: https://gitlab.freedesktop.org/drm/intel/issues/707
[i915#747]: https://gitlab.freedesktop.org/drm/intel/issues/747

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

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

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

* CI: CI-20190529 -> None
* IGT: IGT_5341 -> IGTPW_3836
* Piglit: piglit_4509 -> None

CI-20190529: 20190529
CI_DRM_7524: 28ecf94a6f1072fc4744c06f5b3d267297125b37 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3836: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3836/index.html
IGT_5341: 5fe683cdebde2d77d16ffc42c9fdf29a9f95bb82 @ 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_3836/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw
In reply to Stylon Wang
Quoted 21 lines · Stylon Wang

From: Stylon Wang <[email protected]>
To: [email protected]

Checks if plane-level color transformation works as expected as changing color according to the supplied matrices.

Patch to support plane-level CTM is required to actually run the test. If not available the test is skipped.

---
  lib/igt_kms.c            |  15 ++
  lib/igt_kms.h            |   5 +
  tests/amdgpu/amd_color.c | 295 +++++++++++++++++++++++++++++++++++++--
  3 files changed, 304 insertions(+), 11 deletions(-)
lib/igt_kms.c +0 -0
index e9b80b9b..e3edc68b 100644

lib/igt_kms.c const char * const igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = { · line 394

Quoted 8 lines
lib/igt_kms.c +5 -0
@@ -387,6 +387,11 @@ const char * const igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
  	[IGT_PLANE_COLOR_RANGE] = "COLOR_RANGE",
  	[IGT_PLANE_PIXEL_BLEND_MODE] = "pixel blend mode",
  	[IGT_PLANE_ALPHA] = "alpha",
+	[IGT_PLANE_CTM] = "PLANE_CTM",
+	[IGT_PLANE_GAMMA_LUT] = "PLANE_GAMMA_LUT",
+	[IGT_PLANE_GAMMA_LUT_SIZE] = "PLANE_GAMMA_LUT_SIZE",
+	[IGT_PLANE_DEGAMMA_LUT] = "PLANE_DEGAMMA_LUT",
+	[IGT_PLANE_DEGAMMA_LUT_SIZE] = "PLANE_DEGAMMA_LUT_SIZE",

The patches these were associated with have since been NAK/withdrawn from the i915 developers working on it.

If we're going to expose an interface to support plane level color management in amdgpu then we're going to have:

1. Define custom driver properties, preferably with some sort of prefix or name that won't conflict with whatever crtc/plane color management turns into after

2. Carry these forward in amdgpu forever and ensure that they can still be compatible with the DRM ones.

Because of (1) we can't just add our own properties here to the list. Those plane color management DRM patches won't be merged.

Quoted 7 lines
lib/igt_kms.c +0 -0
  	[IGT_PLANE_ZPOS] = "zpos",
  };
 
@@ -1814,6 +1819,16 @@ static void igt_plane_reset(igt_plane_t *plane)
  	if (igt_plane_has_prop(plane, IGT_PLANE_ALPHA))
  		igt_plane_set_prop_value(plane, IGT_PLANE_ALPHA, 0xffff);
 

lib/igt_kms.c static void igt_plane_reset(igt_plane_t *plane) · line 1831

Quoted 10 lines
lib/igt_kms.c +10 -0
+	/* reset color management */
+	if (igt_plane_has_prop(plane, IGT_PLANE_CTM))
+		igt_plane_replace_prop_blob(plane, IGT_PLANE_CTM, NULL, 0);
+
+	if (igt_plane_has_prop(plane, IGT_PLANE_GAMMA_LUT))
+		igt_plane_replace_prop_blob(plane, IGT_PLANE_GAMMA_LUT, NULL, 0);
+
+	if (igt_plane_has_prop(plane, IGT_PLANE_DEGAMMA_LUT))
+		igt_plane_replace_prop_blob(plane, IGT_PLANE_DEGAMMA_LUT, NULL, 0);
+

Similarly we can't have the reset here. We'll need to incorporate that into the test itself.

Quoted 8 lines
lib/igt_kms.c +0 -0
  	igt_plane_clear_prop_changed(plane, IGT_PLANE_IN_FENCE_FD);
  	plane->values[IGT_PLANE_IN_FENCE_FD] = ~0ULL;
lib/igt_kms.h +0 -0
index 7193f9a5..d6cccc8c 100644

lib/igt_kms.h enum igt_atomic_plane_properties { · line 282

Quoted 8 lines
lib/igt_kms.h +5 -0
@@ -275,6 +275,11 @@ enum igt_atomic_plane_properties {
         IGT_PLANE_PIXEL_BLEND_MODE,
         IGT_PLANE_ALPHA,
         IGT_PLANE_ZPOS,
+       IGT_PLANE_CTM,
+       IGT_PLANE_GAMMA_LUT,
+       IGT_PLANE_GAMMA_LUT_SIZE,
+       IGT_PLANE_DEGAMMA_LUT,
+       IGT_PLANE_DEGAMMA_LUT_SIZE,

...and these will also have to be removed.

Quoted 93 lines
lib/igt_kms.h +0 -0
         IGT_NUM_PLANE_PROPS
  };
 
tests/amdgpu/amd_color.c +38 -3
index 0bbee43d..c1f597fd 100644
@@ -20,6 +20,8 @@
   * OTHER DEALINGS IN THE SOFTWARE.
   */
 
+#include <stdint.h>
+
  #include "igt.h"
 
  /* (De)gamma LUT. */
@@ -39,6 +41,7 @@ typedef struct color {
  typedef struct data {
  	igt_display_t display;
  	igt_plane_t *primary;
+	igt_plane_t *overlay;
  	igt_output_t *output;
  	igt_pipe_t *pipe;
  	igt_pipe_crc_t *pipe_crc;
@@ -47,10 +50,21 @@ typedef struct data {
  	int fd;
  	int w;
  	int h;
-	uint32_t regamma_lut_size;
-	uint32_t degamma_lut_size;
+	uint32_t crtc_regamma_lut_size;
+	uint32_t crtc_degamma_lut_size;
+	uint32_t plane_regamma_lut_size;
+	uint32_t plane_degamma_lut_size;
+	bool plane_has_color_management;
  } data_t;
 
+static const uint64_t fixpt_zero = 0;
+static const uint64_t fixpt_one = 0x100000000LL;
+static const uint64_t fixpt_minus_one = 0x8000000100000000LL;
+static const uint64_t fixpt_half = 0x80000000LL;
+static const uint64_t fixpt_minus_half = 0x8000000080000000LL;
+static const uint64_t fixpt_quarter = 0x40000000LL;
+static const uint64_t fixpt_3_quarters = 0xC0000000LL;
+
  static void lut_init(lut_t *lut, uint32_t size)
  {
  	igt_assert(size > 0);
@@ -137,6 +151,18 @@ static void draw_color(igt_fb_t *fb, double r, double g, double b)
  	igt_put_cairo_ctx(fb->fd, fb, cr);
  }
 
+/* Draws a FB with 3 color bars */
+static void draw_rgb_color(igt_fb_t *fb, color_t color1, color_t color2, color_t color3)
+{
+	cairo_t *cr = igt_get_cairo_ctx(fb->fd, fb);
+	int gh = fb->height / 3;
+
+	igt_paint_color(cr, 0, 0, fb->width, gh, color1.r, color1.g, color1.b);
+	igt_paint_color(cr, 0, gh, fb->width, gh, color2.r, color2.g, color2.b);
+	igt_paint_color(cr, 0, gh * 2, fb->width, gh, color3.r, color3.g, color3.b);
+	igt_put_cairo_ctx(fb->fd, fb, cr);
+}
+
  /* Generates the gamma test pattern. */
  static void draw_gamma_test(igt_fb_t *fb)
  {
@@ -161,7 +187,7 @@ static void set_degamma_lut(data_t *data, lut_t const *lut)
  				       size);
  }
 
-/* Sets the regamma LUT. */
+/* Sets the regamma LUT on. */
  static void set_regamma_lut(data_t *data, lut_t const *lut)
  {
  	size_t size = lut ? sizeof(lut->data[0]) * lut->size : 0;
@@ -171,6 +197,15 @@ static void set_regamma_lut(data_t *data, lut_t const *lut)
  				       size);
  }
 
+/* Sets the CTM on plane. */
+static void set_plane_ctm(data_t *data, struct drm_color_ctm const *ctm)
+{
+	size_t size = ctm ? sizeof(*ctm) : 0;
+
+	igt_plane_replace_prop_blob(data->primary, IGT_PLANE_CTM, (void *)ctm,
+				    size);
+}
+
  /* Common test setup. */
  static void test_init(data_t *data)
  {

tests/amdgpu/amd_color.c static void test_init(data_t *data) · line 229

Quoted 5 lines
tests/amdgpu/amd_color.c +2 -0
@@ -190,19 +225,32 @@ static void test_init(data_t *data)
 
  	data->primary =
  		igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
+	data->overlay =
+		igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_OVERLAY);

I don't think you need to add the code here for overlays since you're not using them in the test.

Quoted 173 lines
tests/amdgpu/amd_color.c +126 -8
  	data->pipe_crc = igt_pipe_crc_new(data->fd, data->pipe_id,
  					  INTEL_PIPE_CRC_SOURCE_AUTO);
 
  	igt_output_set_pipe(data->output, data->pipe_id);
 
-	data->degamma_lut_size =
+	data->crtc_degamma_lut_size =
  		igt_pipe_obj_get_prop(data->pipe, IGT_CRTC_DEGAMMA_LUT_SIZE);
-	igt_assert_lt(0, data->degamma_lut_size);
+	igt_assert_lt(0, data->crtc_degamma_lut_size);
 
-	data->regamma_lut_size =
+	data->crtc_regamma_lut_size =
  		igt_pipe_obj_get_prop(data->pipe, IGT_CRTC_GAMMA_LUT_SIZE);
-	igt_assert_lt(0, data->regamma_lut_size);
+	igt_assert_lt(0, data->crtc_regamma_lut_size);
+
+	data->plane_has_color_management = igt_plane_has_prop(data->primary, IGT_PLANE_CTM);
+
+	if (data->plane_has_color_management) {
+		data->plane_degamma_lut_size =
+			igt_plane_get_prop(data->primary, IGT_PLANE_DEGAMMA_LUT_SIZE);
+
+		data->plane_regamma_lut_size =
+			igt_plane_get_prop(data->primary, IGT_PLANE_GAMMA_LUT_SIZE);
+	}
+
 
  	data->w = data->mode->hdisplay;
  	data->h = data->mode->vdisplay;
@@ -231,7 +279,7 @@ static void test_crtc_linear_degamma(data_t *data)
 
  	test_init(data);
 
-	lut_init(&lut_linear, data->degamma_lut_size);
+	lut_init(&lut_linear, data->crtc_degamma_lut_size);
  	lut_gen_linear(&lut_linear, 0xffff);
 
  	igt_create_fb(data->fd, data->w, data->h, DRM_FORMAT_XRGB8888, 0, &afb);
@@ -273,7 +321,7 @@ static void test_crtc_linear_regamma(data_t *data)
 
  	test_init(data);
 
-	lut_init(&lut_linear, data->regamma_lut_size);
+	lut_init(&lut_linear, data->crtc_regamma_lut_size);
  	lut_gen_linear(&lut_linear, 0xffff);
 
  	igt_create_fb(data->fd, data->w, data->h, DRM_FORMAT_XRGB8888, 0, &afb);
@@ -331,10 +379,10 @@ static void test_crtc_lut_accuracy(data_t *data)
 
  	test_init(data);
 
-	lut_init(&lut_degamma, data->degamma_lut_size);
+	lut_init(&lut_degamma, data->crtc_degamma_lut_size);
  	lut_gen_degamma_srgb(&lut_degamma, 0xffff);
 
-	lut_init(&lut_regamma, data->regamma_lut_size);
+	lut_init(&lut_regamma, data->crtc_regamma_lut_size);
  	lut_gen_regamma_srgb(&lut_regamma, 0xffff);
 
  	/* Don't draw across the whole screen to improve perf. */
@@ -375,6 +423,227 @@ static void test_crtc_lut_accuracy(data_t *data)
  	lut_free(&lut_degamma);
  }
 
+/* Test CTM on color remapping.
+ */
+static void test_plane_ctm_color_remapping(data_t *data)
+{
+	igt_display_t *display = &data->display;
+	igt_crc_t ref_crc, new_crc;
+	igt_fb_t afb;
+	color_t red = {1.0, 0.0, 0.0};
+	color_t green = {0.0, 1.0, 0.0};
+	color_t blue = {0.0, 0.0, 1.0};
+	struct drm_color_ctm ctm = { {fixpt_zero, fixpt_zero, fixpt_zero,
+				      fixpt_zero, fixpt_one, fixpt_zero,
+				      fixpt_one, fixpt_zero, fixpt_one} };
+	struct drm_color_ctm ctm_unit = { {fixpt_one, fixpt_zero, fixpt_zero,
+					   fixpt_zero, fixpt_one, fixpt_zero,
+					   fixpt_zero, fixpt_zero, fixpt_one} };
+
+	test_init(data);
+
+	if (!data->plane_has_color_management) {
+		igt_info("Plane does not support color management, skipping the test.\n");
+		return;
+	}
+
+	igt_create_fb(data->fd, data->w, data->h, DRM_FORMAT_XRGB8888, 0, &afb);
+	igt_plane_set_fb(data->primary, &afb);
+	draw_rgb_color(&afb, blue, green, blue);
+
+	set_plane_ctm(data, &ctm_unit);
+	igt_kmsg("%s reference image\n", __func__);
+	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+	igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
+	sleep(2);
+
+	draw_rgb_color(&afb, red, green, blue);
+	set_plane_ctm(data, &ctm);
+	igt_kmsg("%s actual image\n", __func__);
+	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+	igt_pipe_crc_collect_crc(data->pipe_crc, &new_crc);
+	sleep(2);
+
+	igt_assert_crc_equal(&ref_crc, &new_crc);
+
+	test_fini(data);
+	igt_remove_fb(data->fd, &afb);
+}
+
+/* Test CTM on intensity reduction
+ */
+static void test_plane_ctm_intensity_reduction(data_t *data)
+{
+	igt_display_t *display = &data->display;
+	igt_crc_t ref_crc, new_crc;
+	igt_fb_t afb;
+	color_t red = {1.0, 0.0, 0.0};
+	color_t green = {0.0, 1.0, 0.0};
+	color_t blue = {0.0, 0.0, 1.0};
+
+	struct {
+		const char *desc;
+		color_t expected_colors[3];
+		struct drm_color_ctm ctm;
+	} subitems[] =
+	{
+		{
+			"3/4 reduction",
+			{ {0.75, 0.0, 0.0},
+			  {0.0, 0.75, 0.0},
+			  {0.0, 0.0, 0.75} },
+			{ {fixpt_3_quarters, fixpt_zero, fixpt_zero,
+			   fixpt_zero, fixpt_3_quarters, fixpt_zero,
+			   fixpt_zero, fixpt_zero, fixpt_3_quarters} },
+		},
+		{
+			"1/2 reduction",
+			{ {0.5, 0.0, 0.0},
+			  {0.0, 0.5, 0.0},
+			  {0.0, 0.0, 0.5} },
+			{ {fixpt_half, fixpt_zero, fixpt_zero,
+			   fixpt_zero, fixpt_half, fixpt_zero,
+			   fixpt_zero, fixpt_zero, fixpt_half} },
+		},
+		{
+			"1/4 reduction",
+			{ {0.25, 0.0, 0.0},
+			  {0.0, 0.25, 0.0},
+			  {0.0, 0.0, 0.25} },
+			{ {fixpt_quarter, fixpt_zero, fixpt_zero,
+			   fixpt_zero, fixpt_quarter, fixpt_zero,
+			   fixpt_zero, fixpt_zero, fixpt_quarter} },
+		},
+	};
+	struct drm_color_ctm ctm_unit = { {fixpt_one, fixpt_zero, fixpt_zero,
+					   fixpt_zero, fixpt_one, fixpt_zero,
+					   fixpt_zero, fixpt_zero, fixpt_one} };
+	int i;
+
+	test_init(data);
+
+	if (!data->plane_has_color_management) {
+		igt_info("Plane does not support color management, skipping the test.\n");
+		return;
+	}
+
+	igt_create_fb(data->fd, data->w, data->h, DRM_FORMAT_XRGB8888, 0, &afb);
+	igt_plane_set_fb(data->primary, &afb);
+

tests/amdgpu/amd_color.c static void test_crtc_lut_accuracy(data_t *data) · line 542

Quoted 10 lines
tests/amdgpu/amd_color.c +10 -0
+	for (i=0; i<sizeof(subitems)/sizeof(subitems[0]); ++i) {
+		igt_info("Testing %s\n", subitems[i].desc);
+
+		draw_rgb_color(&afb,
+			       subitems[i].expected_colors[0],
+			       subitems[i].expected_colors[1],
+			       subitems[i].expected_colors[2]
+			       );
+		set_plane_ctm(data, &ctm_unit);
+		igt_kmsg("%s reference image\n", __func__);

Drop these kmgs all throughout the file. If needed these can just be igt_debug prints instead. You can get the output for these if you run via the test itself instead of the test runner, eg.

./build/tests/amdgpu/amd_color <args>

The rest mostly looks fine, but depends on the actual patches for plane color management being in amdgpu.

Nicholas Kazlauskas

Quoted 79 lines
tests/amdgpu/amd_color.c +79 -0
+		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
+
+		draw_rgb_color(&afb, red, green, blue);
+		set_plane_ctm(data, &subitems[i].ctm);
+		igt_kmsg("%s actual image\n", __func__);
+		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		igt_pipe_crc_collect_crc(data->pipe_crc, &new_crc);
+
+		igt_assert_crc_equal(&ref_crc, &new_crc);
+	}
+
+	test_fini(data);
+	igt_remove_fb(data->fd, &afb);
+}
+
+/* Test CTM on negative mapping of colors.
+ */
+static void test_plane_ctm_negative_mapping(data_t *data)
+{
+	igt_display_t *display = &data->display;
+	igt_crc_t ref_crc, new_crc;
+	igt_fb_t afb;
+	color_t black = {0.0, 0.0, 0.0};
+	color_t red = {1.0, 0.0, 0.0};
+	color_t green = {0.0, 1.0, 0.0};
+	color_t blue = {0.0, 0.0, 1.0};
+	struct drm_color_ctm ctm = { {fixpt_minus_one, fixpt_zero, fixpt_zero,
+				      fixpt_zero, fixpt_minus_one, fixpt_zero,
+				      fixpt_zero, fixpt_zero, fixpt_minus_one} };
+	struct drm_color_ctm ctm_unit = { {fixpt_one, fixpt_zero, fixpt_zero,
+					   fixpt_zero, fixpt_one, fixpt_zero,
+					   fixpt_zero, fixpt_zero, fixpt_one} };
+
+	test_init(data);
+
+	if (!data->plane_has_color_management) {
+		igt_info("Plane does not support color management, skipping the test.\n");
+		return;
+	}
+
+	igt_create_fb(data->fd, data->w, data->h, DRM_FORMAT_XRGB8888, 0, &afb);
+	igt_plane_set_fb(data->primary, &afb);
+	draw_rgb_color(&afb, black, black, black);
+
+	set_plane_ctm(data, &ctm_unit);
+	igt_kmsg("%s reference image\n", __func__);
+	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+	igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
+
+	draw_rgb_color(&afb, red, green, blue);
+	set_plane_ctm(data, &ctm);
+	igt_kmsg("%s actual image\n", __func__);
+	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+	igt_pipe_crc_collect_crc(data->pipe_crc, &new_crc);
+
+	igt_assert_crc_equal(&ref_crc, &new_crc);
+
+	test_fini(data);
+	igt_remove_fb(data->fd, &afb);
+}
+
+/* Test CTM on mixed (negative+positive) mapping of colors.
+ */
+static void test_plane_ctm_mixed_mapping(data_t *data)
+{
+	igt_display_t *display = &data->display;
+	igt_crc_t ref_crc, new_crc;
+	igt_fb_t afb;
+	struct drm_color_ctm ctm = { {fixpt_one, fixpt_zero, fixpt_minus_half,
+				      fixpt_zero, fixpt_one, fixpt_zero,
+				      fixpt_zero, fixpt_zero, fixpt_half} };
+	struct drm_color_ctm ctm_unit = { {fixpt_one, fixpt_zero, fixpt_zero,
+					   fixpt_zero, fixpt_one, fixpt_zero,
+					   fixpt_zero, fixpt_zero, fixpt_one} };
+
+	test_init(data);
+
+	if (!data->plane_has_color_management) {

tests/amdgpu/amd_color.c static void test_crtc_lut_accuracy(data_t *data)

Quoted 10 lines
tests/amdgpu/amd_color.c +10 -0
+		igt_info("Plane does not support color management, skipping the test.\n");
+		return;
+	}
+
+	igt_create_fb(data->fd, data->w, data->h, DRM_FORMAT_XRGB8888, 0, &afb);
+	igt_plane_set_fb(data->primary, &afb);
+	draw_color(&afb, 0.5, 0, 0.5);
+
+	set_plane_ctm(data, &ctm_unit);
+	igt_kmsg("%s reference image\n", __func__); > +	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, 

NULL);

tests/amdgpu/amd_color.c static void test_crtc_lut_accuracy(data_t *data)

Quoted 5 lines
tests/amdgpu/amd_color.c +5 -0
+	igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
+
+	draw_color(&afb, 1.0, 0.0, 1.0);
+	set_plane_ctm(data, &ctm);
+	igt_kmsg("%s actual image\n", __func__); > +	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, 

NULL);

Quoted 13 lines
tests/amdgpu/amd_color.c +8 -0
+	igt_pipe_crc_collect_crc(data->pipe_crc, &new_crc);
+
+	igt_assert_crc_equal(&ref_crc, &new_crc);
+
+	test_fini(data);
+	igt_remove_fb(data->fd, &afb);
+}
+
  igt_main
  {
  	data_t data;

tests/amdgpu/amd_color.c igt_main · line 675

Quoted 10 lines
tests/amdgpu/amd_color.c +4 -0
@@ -397,6 +666,10 @@ igt_main
  	igt_subtest("crtc-linear-degamma") test_crtc_linear_degamma(&data);
  	igt_subtest("crtc-linear-regamma") test_crtc_linear_regamma(&data);
  	igt_subtest("crtc-lut-accuracy") test_crtc_lut_accuracy(&data);
+	igt_subtest("plane-ctm-color-remapping") test_plane_ctm_color_remapping(&data);
+	igt_subtest("plane-ctm-intensity-reduction") test_plane_ctm_intensity_reduction(&data);
+	igt_subtest("plane-ctm-negative-mapping") test_plane_ctm_negative_mapping(&data);
+	igt_subtest("plane-ctm-mixed-mapping") test_plane_ctm_mixed_mapping(&data);
 
  	igt_fixture
  	{

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

#4 lore raw

[igt-dev] ✗ GitLab.Pipeline: failure for tests/amdgpu: Test plane level CTM

In reply to Stylon Wang
== Series Details ==

== Series Details ==

Series: tests/amdgpu: Test plane level CTM
URL : https://patchwork.freedesktop.org/series/70667/
State : failure

== Summary ==

ERROR! This series introduces new undocumented tests:

amdgpu/amd_color@plane-ctm-color-remapping
amdgpu/amd_color@plane-ctm-intensity-reduction
amdgpu/amd_color@plane-ctm-mixed-mapping
amdgpu/amd_color@plane-ctm-negative-mapping

Can you document them as per the requirement in the [CONTRIBUTING.md]?

[Documentation] has more details on how to do this.

Here are few examples:
https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/0316695d03aa46108296b27f3982ec93200c7a6e
https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/443cc658e1e6b492ee17bf4f4d891029eb7a205d

Thanks in advance!

[CONTRIBUTING.md]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/blob/master/CONTRIBUTING.md#L19
[Documentation]: https://drm.pages.freedesktop.org/igt-gpu-tools/igt-gpu-tools-Core.html#igt-describe

Other than that, pipeline status: SUCCESS.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/86997 for the overview.

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/86997
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev