* [PATCH i-g-t] tests/kms_plane_alpha_blend: Skip 7efc alpha-swap CRC check on AMD at >8bpc/DSC
@ 2026-07-16 6:35 James Lin
2026-07-16 7:19 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-07-16 7:32 ` ✓ i915.CI.BAT: " Patchwork
0 siblings, 2 replies; 3+ messages in thread
From: James Lin @ 2026-07-16 6:35 UTC (permalink / raw)
To: igt-dev; +Cc: alex.hung, sunpeng.li, chiahsuan.chung, Pinglei.lin, James Lin
[Why]
alpha-7efc and coverage-7efc assert that swapping the plane global alpha
(the KMS "alpha" property) with the per-pixel fb alpha (0x7e <-> 0xfc) yields
a bit-identical pipe CRC. That identity only holds when the whole blend
datapath collapses to exact 8-bit arithmetic. On AMD DCN the alpha/gain
values are 8-bit, but the blend is carried at higher internal precision and
only quantized down to the output bpc at the very end. A swap that is exact
in idealized 8-bit math can therefore leave a sub-LSB residue: at 8 bpc the
output quantization discards it and the CRCs match, but at >8 bpc, or when the
stream is DSC-compressed (carried at its native >8 bpc), the residue survives
and the CRCs differ. The strict compare then turns a legitimate precision
artifact into a test failure - observed as a CRC mismatch on an eDP link
brought up with DSC, while the same test passes on an 8-bit non-DSC link.
[How]
Add skip_if_alpha_swap_not_exact() and call it at the start of alpha_7efc and
coverage_7efc. It is a no-op on non-AMD devices, so every other driver keeps
the strict check unchanged. On amdgpu it reads the CRTC's current bpc and the
connector's DSC status, and skips only when bpc > 8 or DSC is active - the
conditions under which the alpha swap is legitimately not bit-exact. 8 bpc AMD
configurations still run the strict compare, preserving the regression
coverage the test was written for. Track the output in data_t so the DSC state
of the current connector can be queried.
Signed-off-by: James Lin <PingLei.Lin@amd.com>
---
tests/kms_plane_alpha_blend.c | 44 +++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
index 3a2649833..e040d5bec 100644
--- a/tests/kms_plane_alpha_blend.c
+++ b/tests/kms_plane_alpha_blend.c
@@ -33,6 +33,7 @@
*/
#include "igt.h"
+#include "igt_amd.h"
/**
* SUBTEST: alpha-%s
@@ -77,6 +78,7 @@ typedef struct {
struct igt_fb xrgb_fb, argb_fb_0, argb_fb_cov_0, argb_fb_7e, argb_fb_cov_7e, argb_fb_fc, argb_fb_cov_fc, argb_fb_100, black_fb, gray_fb;
igt_crc_t ref_crc;
igt_pipe_crc_t *pipe_crc;
+ igt_output_t *output;
} data_t;
static bool in_simulation;
@@ -442,11 +444,49 @@ static void constant_alpha_max(data_t *data, igt_crtc_t *crtc,
igt_plane_set_fb(plane, NULL);
}
+/*
+ * The 7e/fc subtests (alpha-7efc, coverage-7efc) assert that swapping the
+ * plane global alpha with the per-pixel fb alpha (0x7e <-> 0xfc) yields a
+ * bit-identical pipe CRC. That identity only holds when the whole blend
+ * datapath collapses to exact 8-bit arithmetic.
+ *
+ * On AMD DCN the alpha/gain values are 8-bit, but the blend itself is carried
+ * at higher internal precision and only quantized down to the output bpc at
+ * the very end, so the swap can leave a sub-LSB residue. At 8 bpc the output
+ * quantization discards it and the two CRCs match; at >8 bpc, or when the
+ * stream is DSC-compressed (carried at its native >8 bpc), the residue is
+ * retained and the CRCs differ. This matches observation: the same test
+ * PASSes on an 8 bpc eDP link without DSC and FAILs on an eDP link brought
+ * up with DSC.
+ *
+ * So keep the strict bit-exact check everywhere except AMD at >8 bpc or with
+ * DSC active, where the swap is legitimately not bit-exact.
+ */
+static void skip_if_alpha_swap_not_exact(data_t *data, igt_crtc_t *crtc)
+{
+ unsigned int bpc;
+ bool dsc;
+
+ if (!is_amdgpu_device(data->gfx_fd))
+ return;
+
+ bpc = igt_get_crtc_current_bpc(crtc);
+ dsc = data->output &&
+ is_dp_dsc_supported(data->gfx_fd, data->output->name) &&
+ igt_amd_read_dsc_clock_status(data->gfx_fd, data->output->name) > 0;
+
+ igt_skip_on_f(bpc > 8 || dsc,
+ "plane-alpha/fb-alpha swap is not bit-exact on AMD DCN "
+ "at >8bpc/DSC (bpc=%u, dsc=%d)\n", bpc, dsc);
+}
+
static void alpha_7efc(data_t *data, igt_crtc_t *crtc, igt_plane_t *plane)
{
igt_display_t *display = &data->display;
igt_crc_t ref_crc = {}, crc = {};
+ skip_if_alpha_swap_not_exact(data, crtc);
+
if (plane->type != DRM_PLANE_TYPE_PRIMARY)
igt_plane_set_fb(igt_crtc_get_plane_type(crtc, DRM_PLANE_TYPE_PRIMARY),
&data->gray_fb);
@@ -475,6 +515,8 @@ static void coverage_7efc(data_t *data, igt_crtc_t *crtc, igt_plane_t *plane)
igt_display_t *display = &data->display;
igt_crc_t ref_crc = {}, crc = {};
+ skip_if_alpha_swap_not_exact(data, crtc);
+
igt_require(igt_plane_try_prop_enum(plane, IGT_PLANE_PIXEL_BLEND_MODE, "Coverage"));
igt_display_commit2(display, COMMIT_ATOMIC);
igt_pipe_crc_start(data->pipe_crc);
@@ -539,6 +581,8 @@ static void run_test_on_crtc_planes(data_t *data, igt_crtc_t *crtc,
int first_plane = -1;
int last_plane = -1;
+ data->output = output;
+
for_each_plane_on_crtc(crtc, plane) {
if (!igt_plane_has_prop(plane, IGT_PLANE_ALPHA))
continue;
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✓ Xe.CI.BAT: success for tests/kms_plane_alpha_blend: Skip 7efc alpha-swap CRC check on AMD at >8bpc/DSC
2026-07-16 6:35 [PATCH i-g-t] tests/kms_plane_alpha_blend: Skip 7efc alpha-swap CRC check on AMD at >8bpc/DSC James Lin
@ 2026-07-16 7:19 ` Patchwork
2026-07-16 7:32 ` ✓ i915.CI.BAT: " Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2026-07-16 7:19 UTC (permalink / raw)
To: James Lin; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]
== Series Details ==
Series: tests/kms_plane_alpha_blend: Skip 7efc alpha-swap CRC check on AMD at >8bpc/DSC
URL : https://patchwork.freedesktop.org/series/170529/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_9007_BAT -> XEIGTPW_15538_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (13 -> 13)
------------------------------
No changes in participating hosts
Changes
-------
No changes found
Build changes
-------------
* IGT: IGT_9007 -> IGTPW_15538
* Linux: xe-5412-116ce94f4e028e50e3523c46a8ce1e665ce47cb9 -> xe-5416-6d15737b9d1d05c2107a1fab794dfc77f15dd945
IGTPW_15538: 15538
IGT_9007: 9007
xe-5412-116ce94f4e028e50e3523c46a8ce1e665ce47cb9: 116ce94f4e028e50e3523c46a8ce1e665ce47cb9
xe-5416-6d15737b9d1d05c2107a1fab794dfc77f15dd945: 6d15737b9d1d05c2107a1fab794dfc77f15dd945
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15538/index.html
[-- Attachment #2: Type: text/html, Size: 1576 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* ✓ i915.CI.BAT: success for tests/kms_plane_alpha_blend: Skip 7efc alpha-swap CRC check on AMD at >8bpc/DSC
2026-07-16 6:35 [PATCH i-g-t] tests/kms_plane_alpha_blend: Skip 7efc alpha-swap CRC check on AMD at >8bpc/DSC James Lin
2026-07-16 7:19 ` ✓ Xe.CI.BAT: success for " Patchwork
@ 2026-07-16 7:32 ` Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2026-07-16 7:32 UTC (permalink / raw)
To: James Lin; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 8041 bytes --]
== Series Details ==
Series: tests/kms_plane_alpha_blend: Skip 7efc alpha-swap CRC check on AMD at >8bpc/DSC
URL : https://patchwork.freedesktop.org/series/170529/
State : success
== Summary ==
CI Bug Log - changes from IGT_9007 -> IGTPW_15538
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/index.html
Participating hosts (41 -> 40)
------------------------------
Additional (1): bat-mtlp-9
Missing (2): bat-dg2-13 fi-snb-2520m
Known issues
------------
Here are the changes found in IGTPW_15538 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@dmabuf@all-tests:
- bat-mtlp-9: NOTRUN -> [SKIP][1] ([i915#15931])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@dmabuf@all-tests.html
* igt@gem_lmem_swapping@parallel-random-engines:
- bat-mtlp-9: NOTRUN -> [SKIP][2] ([i915#4613]) +3 other tests skip
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@gem_lmem_swapping@parallel-random-engines.html
* igt@gem_mmap@basic:
- bat-mtlp-9: NOTRUN -> [SKIP][3] ([i915#4083])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@gem_mmap@basic.html
* igt@gem_render_tiled_blits@basic:
- bat-mtlp-9: NOTRUN -> [SKIP][4] ([i915#4079])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@gem_render_tiled_blits@basic.html
* igt@gem_tiled_fence_blits@basic:
- bat-mtlp-9: NOTRUN -> [SKIP][5] ([i915#4077]) +2 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@gem_tiled_fence_blits@basic.html
* igt@gem_tiled_pread_basic@basic:
- bat-mtlp-9: NOTRUN -> [SKIP][6] ([i915#15657])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@gem_tiled_pread_basic@basic.html
* igt@i915_pm_rpm@module-reload:
- bat-adlp-6: [PASS][7] -> [DMESG-WARN][8] ([i915#15673]) +78 other tests dmesg-warn
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_9007/bat-adlp-6/igt@i915_pm_rpm@module-reload.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-adlp-6/igt@i915_pm_rpm@module-reload.html
* igt@i915_pm_rps@basic-api:
- bat-mtlp-9: NOTRUN -> [SKIP][9] ([i915#11681] / [i915#6621])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@i915_pm_rps@basic-api.html
* igt@intel_hwmon@hwmon-read:
- bat-mtlp-9: NOTRUN -> [SKIP][10] ([i915#7707]) +1 other test skip
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@intel_hwmon@hwmon-read.html
* igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-mtlp-9: NOTRUN -> [SKIP][11] ([i915#5190])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html
* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-mtlp-9: NOTRUN -> [SKIP][12] ([i915#4212]) +8 other tests skip
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@kms_addfb_basic@basic-y-tiled-legacy.html
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-mtlp-9: NOTRUN -> [SKIP][13] ([i915#16119] / [i915#4213]) +1 other test skip
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
* igt@kms_dsc@dsc-basic:
- bat-mtlp-9: NOTRUN -> [SKIP][14] ([i915#16361])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@kms_dsc@dsc-basic.html
* igt@kms_force_connector_basic@force-load-detect:
- bat-mtlp-9: NOTRUN -> [SKIP][15]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@kms_force_connector_basic@force-load-detect.html
* igt@kms_psr@psr-primary-mmap-gtt:
- bat-mtlp-9: NOTRUN -> [SKIP][16] ([i915#4077] / [i915#9688]) +1 other test skip
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@kms_psr@psr-primary-mmap-gtt.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-mtlp-9: NOTRUN -> [SKIP][17] ([i915#3555] / [i915#8809])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@kms_setmode@basic-clone-single-crtc.html
* igt@prime_vgem@basic-gtt:
- bat-mtlp-9: NOTRUN -> [SKIP][18] ([i915#3708] / [i915#4077]) +1 other test skip
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@prime_vgem@basic-gtt.html
* igt@prime_vgem@basic-read:
- bat-mtlp-9: NOTRUN -> [SKIP][19] ([i915#3708]) +1 other test skip
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@prime_vgem@basic-read.html
* igt@prime_vgem@basic-write:
- bat-mtlp-9: NOTRUN -> [SKIP][20] ([i915#10216] / [i915#3708])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-mtlp-9/igt@prime_vgem@basic-write.html
#### Possible fixes ####
* igt@i915_selftest@live@sanitycheck:
- bat-apl-1: [DMESG-WARN][21] ([i915#13735]) -> [PASS][22] +38 other tests pass
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_9007/bat-apl-1/igt@i915_selftest@live@sanitycheck.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-apl-1/igt@i915_selftest@live@sanitycheck.html
* igt@kms_pm_rpm@basic-pci-d3-state:
- bat-apl-1: [DMESG-WARN][23] ([i915#13735] / [i915#180]) -> [PASS][24] +10 other tests pass
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_9007/bat-apl-1/igt@kms_pm_rpm@basic-pci-d3-state.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/bat-apl-1/igt@kms_pm_rpm@basic-pci-d3-state.html
[i915#10216]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10216
[i915#11681]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11681
[i915#13735]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13735
[i915#15657]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15657
[i915#15673]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15673
[i915#15931]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15931
[i915#16119]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16119
[i915#16361]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16361
[i915#180]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/180
[i915#3555]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4083
[i915#4212]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4213
[i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613
[i915#5190]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5190
[i915#6621]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6621
[i915#7707]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7707
[i915#8809]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8809
[i915#9688]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9688
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_9007 -> IGTPW_15538
* Linux: CI_DRM_18830 -> CI_DRM_18834
CI-20190529: 20190529
CI_DRM_18830: 116ce94f4e028e50e3523c46a8ce1e665ce47cb9 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_18834: 6d15737b9d1d05c2107a1fab794dfc77f15dd945 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_15538: 15538
IGT_9007: 9007
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15538/index.html
[-- Attachment #2: Type: text/html, Size: 9554 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-16 7:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-16 6:35 [PATCH i-g-t] tests/kms_plane_alpha_blend: Skip 7efc alpha-swap CRC check on AMD at >8bpc/DSC James Lin
2026-07-16 7:19 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-07-16 7:32 ` ✓ i915.CI.BAT: " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox