Skip to contentSkip to conversation

tests/kms_writeback.c: fix the `fill_fb` function

PATCH Superseded Igor Matheus Andrade Torrente 3 participants 5 messages Oct 5, 2021 – Oct 7, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/kms_writeback.c: fix the `fill_fb` function

Currently, the fill_fb function, instead of filling the framebuffer with the whole pixel, is only filling it with the rightmost byte.

This is happening because, even though the memset accepts an int as a parameter, it's casting the value to unsigned char and will fill the memory with this 8 bits value.

If we setup the pixel to 0xff0000|f0|, the buffer will filled with:

| addr     | = 0f
| addr + 1 | = 0f
| addr + 2 | = 0f
| addr + 3 | = 0f
    ...

| addr + N | = 0f

This patch address this issue by manually copying the entire integer in the little-endian format.

---
 tests/kms_writeback.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
tests/kms_writeback.c +14 -2
index 60dbda2a..60d9b74e 100644
@@ -227,14 +227,26 @@ static void writeback_fb_id(igt_output_t *output, igt_fb_t *valid_fb, igt_fb_t *
 
 static void fill_fb(igt_fb_t *fb, uint32_t pixel)
 {
-	void *ptr;
+	uint8_t *ptr, x, r, g, b, step = sizeof(uint32_t);
+	int64_t pixel_count, i;
 
 	igt_assert(fb->drm_format == DRM_FORMAT_XRGB8888);
 
 	ptr = igt_fb_map_buffer(fb->fd, fb);
 	igt_assert(ptr);
 
-	memset(ptr, pixel, fb->strides[0] * fb->height);
+	pixel_count = fb->strides[0] * fb->height;
+	x = (pixel & (0xff << 24)) >> 24;
+	r = (pixel & (0xff << 16)) >> 16;
+	g = (pixel & (0xff << 8)) >> 8;
+	b = pixel & 0xff;
+
+	for (i = 0; i <= pixel_count - step; i += step) {
+		ptr[i + 3] = x;
+		ptr[i + 2] = r;
+		ptr[i + 1] = g;
+		ptr[i + 0] = b;
+	}
 
 	igt_fb_unmap_buffer(fb, ptr);
 }
Signature · 1 line
2.30.2
#1 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for tests/kms_writeback.c: fix the `fill_fb` function

== Series Details ==

== Series Details ==

Series: tests/kms_writeback.c: fix the fill_fb function
URL : https://patchwork.freedesktop.org/series/95459/
State : success

== Summary ==

CI Bug Log - changes from IGT_6231 -> IGTPW_6286
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_prime@amd-to-i915:
- fi-kbl-x1275: NOTRUN -> [SKIP][1] ([fdo#109271]) +28 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/fi-kbl-x1275/igt@amdgpu/[email protected]

* igt@amdgpu/amd_prime@i915-to-amd:
- fi-snb-2520m: NOTRUN -> [SKIP][2] ([fdo#109271]) +37 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/fi-snb-2520m/igt@amdgpu/[email protected]

* igt@gem_huc_copy@huc-copy:
- fi-tgl-u2: NOTRUN -> [SKIP][3] ([i915#2190])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/fi-tgl-u2/igt@[email protected]
- fi-kbl-x1275: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#2190])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/fi-kbl-x1275/igt@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-skl-6600u: [PASS][5] -> [FAIL][6] ([i915#3239])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/fi-skl-6600u/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/fi-skl-6600u/igt@[email protected]

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-tgl-u2: NOTRUN -> [SKIP][7] ([fdo#109284] / [fdo#111827]) +8 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/fi-tgl-u2/igt@[email protected]

* igt@kms_chamelium@hdmi-crc-fast:
- fi-kbl-x1275: NOTRUN -> [SKIP][8] ([fdo#109271] / [fdo#111827]) +8 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/fi-kbl-x1275/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-snb-2520m: NOTRUN -> [SKIP][9] ([fdo#109271] / [fdo#111827]) +8 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/fi-snb-2520m/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-tgl-u2: NOTRUN -> [SKIP][10] ([i915#4103]) +1 similar issue
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/fi-tgl-u2/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- fi-tgl-u2: NOTRUN -> [SKIP][11] ([fdo#109285])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/fi-tgl-u2/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- fi-kbl-x1275: NOTRUN -> [SKIP][12] ([fdo#109271] / [i915#533])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/fi-kbl-x1275/igt@[email protected]

* igt@prime_vgem@basic-userptr:
- fi-tgl-u2: NOTRUN -> [SKIP][13] ([i915#3301])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/fi-tgl-u2/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s3:
- fi-tgl-1115g4: [FAIL][14] ([i915#1888]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/fi-tgl-1115g4/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/fi-tgl-1115g4/igt@[email protected]

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3239]: https://gitlab.freedesktop.org/drm/intel/issues/3239
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533

Participating hosts (33 -> 35)
------------------------------

Additional (3): fi-kbl-x1275 fi-snb-2520m fi-tgl-u2
Missing (1): fi-bsw-cyan

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

* CI: CI-20190529 -> None
* IGT: IGT_6231 -> IGTPW_6286

CI-20190529: 20190529
CI_DRM_10683: 2db2331e0b19308750c3b921c2779c4c2da9b04b @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_6286: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/index.html
IGT_6231: 13460b8b626b0b377638f84e429f394322646ea4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

#2 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_writeback.c: fix the `fill_fb` function

In reply to Igor Matheus Andrade Torrente
== Series Details ==

== Series Details ==

Series: tests/kms_writeback.c: fix the fill_fb function
URL : https://patchwork.freedesktop.org/series/95459/
State : failure

== Summary ==

CI Bug Log - changes from IGT_6231_full -> IGTPW_6286_full
====================================================

Summary
-------

**FAILURE**

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

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

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_pm_dc@dc9-dpms:
- shard-iclb: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-iclb1/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb8/igt@[email protected]

* igt@kms_writeback@writeback-fb-id:
- shard-tglb: NOTRUN -> [SKIP][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb8/igt@[email protected]

#### Warnings ####

* igt@kms_writeback@writeback-check-output:
- shard-iclb: [SKIP][4] ([i915#2437]) -> [SKIP][5] +3 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-iclb6/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb6/igt@[email protected]

* igt@kms_writeback@writeback-invalid-parameters:
- shard-tglb: [SKIP][6] ([i915#2437]) -> [SKIP][7] +2 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-tglb6/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb3/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@feature_discovery@display-4x:
- shard-apl: NOTRUN -> [SKIP][8] ([fdo#109271]) +224 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl7/igt@[email protected]

* igt@feature_discovery@psr2:
- shard-iclb: [PASS][9] -> [SKIP][10] ([i915#658])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-iclb2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb7/igt@[email protected]

* igt@gem_ctx_persistence@engines-queued:
- shard-snb: NOTRUN -> [SKIP][11] ([fdo#109271] / [i915#1099]) +3 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-snb5/igt@[email protected]

* igt@gem_eio@in-flight-contexts-1us:
- shard-tglb: [PASS][12] -> [TIMEOUT][13] ([i915#3063])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-tglb3/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb5/igt@[email protected]

* igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-glk: [PASS][14] -> [FAIL][15] ([i915#2842]) +1 similar issue
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-glk5/igt@gem_exec_fair@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-glk1/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-tglb: [PASS][16] -> [FAIL][17] ([i915#2842])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-tglb6/igt@gem_exec_fair@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb8/igt@gem_exec_fair@[email protected]

* igt@gem_exec_flush@basic-batch-kernel-default-cmd:
- shard-snb: NOTRUN -> [SKIP][18] ([fdo#109271]) +387 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-snb7/igt@[email protected]
- shard-tglb: NOTRUN -> [SKIP][19] ([fdo#109313])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb3/igt@[email protected]

* igt@gem_huc_copy@huc-copy:
- shard-tglb: NOTRUN -> [SKIP][20] ([i915#2190])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb7/igt@[email protected]
- shard-apl: NOTRUN -> [SKIP][21] ([fdo#109271] / [i915#2190])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl1/igt@[email protected]

* igt@gem_render_copy@y-tiled-to-vebox-yf-tiled:
- shard-iclb: NOTRUN -> [SKIP][22] ([i915#768])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb5/igt@[email protected]

* igt@gem_userptr_blits@coherency-unsync:
- shard-tglb: NOTRUN -> [SKIP][23] ([i915#3297])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb3/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][24] ([i915#3297])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb8/igt@[email protected]

* igt@gem_userptr_blits@input-checking:
- shard-apl: NOTRUN -> [DMESG-WARN][25] ([i915#3002])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl1/igt@[email protected]
- shard-kbl: NOTRUN -> [DMESG-WARN][26] ([i915#3002])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl1/igt@[email protected]

* igt@gem_userptr_blits@vma-merge:
- shard-apl: NOTRUN -> [FAIL][27] ([i915#3318])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl6/igt@[email protected]
- shard-kbl: NOTRUN -> [FAIL][28] ([i915#3318])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl4/igt@[email protected]

* igt@gen9_exec_parse@bb-start-cmd:
- shard-tglb: NOTRUN -> [SKIP][29] ([i915#2856]) +2 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb8/igt@[email protected]

* igt@i915_pm_dc@dc6-psr:
- shard-tglb: NOTRUN -> [FAIL][30] ([i915#454])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb8/igt@[email protected]

* igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:
- shard-kbl: NOTRUN -> [SKIP][31] ([fdo#109271] / [i915#1937])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl1/igt@i915_pm_lpsp@[email protected]
- shard-apl: NOTRUN -> [SKIP][32] ([fdo#109271] / [i915#1937])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl1/igt@i915_pm_lpsp@[email protected]

* igt@i915_pm_rpm@pc8-residency:
- shard-tglb: NOTRUN -> [SKIP][33] ([fdo#109506] / [i915#2411])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb6/igt@[email protected]

* igt@i915_suspend@fence-restore-untiled:
- shard-tglb: [PASS][34] -> [INCOMPLETE][35] ([i915#456])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-tglb2/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb7/igt@[email protected]

* igt@i915_suspend@forcewake:
- shard-kbl: [PASS][36] -> [DMESG-WARN][37] ([i915#180]) +4 similar issues
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-kbl7/igt@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl4/igt@[email protected]

* igt@kms_addfb_basic@invalid-smem-bo-on-discrete:
- shard-tglb: NOTRUN -> [SKIP][38] ([i915#3826])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb8/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][39] ([i915#3826])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb6/igt@[email protected]

* igt@kms_atomic_transition@plane-all-modeset-transition:
- shard-tglb: NOTRUN -> [SKIP][40] ([i915#1769])
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb5/igt@[email protected]

* igt@kms_big_fb@linear-32bpp-rotate-180:
- shard-glk: [PASS][41] -> [DMESG-WARN][42] ([i915#118] / [i915#95])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-glk9/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-glk6/igt@[email protected]

* igt@kms_big_fb@linear-64bpp-rotate-270:
- shard-iclb: NOTRUN -> [SKIP][43] ([fdo#110725] / [fdo#111614])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb4/igt@[email protected]

* igt@kms_big_fb@linear-64bpp-rotate-90:
- shard-tglb: NOTRUN -> [SKIP][44] ([fdo#111614]) +2 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb1/igt@[email protected]

* igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-async-flip:
- shard-tglb: NOTRUN -> [SKIP][45] ([fdo#111615]) +2 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb8/igt@[email protected]

* igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip:
- shard-apl: NOTRUN -> [SKIP][46] ([fdo#109271] / [i915#3777]) +1 similar issue
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl8/igt@[email protected]

* igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-hflip:
- shard-kbl: NOTRUN -> [SKIP][47] ([fdo#109271] / [i915#3777])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl7/igt@[email protected]

* igt@kms_big_joiner@basic:
- shard-tglb: NOTRUN -> [SKIP][48] ([i915#2705])
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb6/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][49] ([i915#2705])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb4/igt@[email protected]

* igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_ccs:
- shard-tglb: NOTRUN -> [SKIP][50] ([i915#3689]) +6 similar issues
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb3/igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_ccs.html

* igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_gen12_mc_ccs:
- shard-tglb: NOTRUN -> [SKIP][51] ([i915#3689] / [i915#3886]) +2 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb8/igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_gen12_mc_ccs.html
- shard-glk: NOTRUN -> [SKIP][52] ([fdo#109271] / [i915#3886]) +3 similar issues
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-glk8/igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_gen12_mc_ccs.html
- shard-iclb: NOTRUN -> [SKIP][53] ([fdo#109278] / [i915#3886]) +3 similar issues
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb7/igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_gen12_mc_ccs.html

* igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_mc_ccs:
- shard-apl: NOTRUN -> [SKIP][54] ([fdo#109271] / [i915#3886]) +11 similar issues
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl3/igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_mc_ccs.html

* igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_mc_ccs:
- shard-kbl: NOTRUN -> [SKIP][55] ([fdo#109271] / [i915#3886]) +8 similar issues
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl1/igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_mc_ccs.html

* igt@kms_chamelium@dp-hpd-for-each-pipe:
- shard-iclb: NOTRUN -> [SKIP][56] ([fdo#109284] / [fdo#111827]) +2 similar issues
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb8/igt@[email protected]

* igt@kms_chamelium@hdmi-edid-change-during-suspend:
- shard-apl: NOTRUN -> [SKIP][57] ([fdo#109271] / [fdo#111827]) +13 similar issues
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl3/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd:
- shard-tglb: NOTRUN -> [SKIP][58] ([fdo#109284] / [fdo#111827]) +10 similar issues
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb5/igt@[email protected]

* igt@kms_color_chamelium@pipe-a-degamma:
- shard-kbl: NOTRUN -> [SKIP][59] ([fdo#109271] / [fdo#111827]) +13 similar issues
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl1/igt@[email protected]

* igt@kms_color_chamelium@pipe-b-ctm-negative:
- shard-snb: NOTRUN -> [SKIP][60] ([fdo#109271] / [fdo#111827]) +15 similar issues
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-snb2/igt@[email protected]

* igt@kms_color_chamelium@pipe-c-ctm-0-5:
- shard-glk: NOTRUN -> [SKIP][61] ([fdo#109271] / [fdo#111827]) +5 similar issues
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-glk6/igt@[email protected]

* igt@kms_color_chamelium@pipe-d-gamma:
- shard-iclb: NOTRUN -> [SKIP][62] ([fdo#109278] / [fdo#109284] / [fdo#111827])
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb4/igt@[email protected]

* igt@kms_concurrent@pipe-b:
- shard-tglb: NOTRUN -> [FAIL][63] ([i915#1385])
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb3/igt@[email protected]

* igt@kms_content_protection@atomic:
- shard-kbl: NOTRUN -> [TIMEOUT][64] ([i915#1319])
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl7/igt@[email protected]

* igt@kms_content_protection@content_type_change:
- shard-iclb: NOTRUN -> [SKIP][65] ([fdo#109300] / [fdo#111066])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb6/igt@kms_content_protection@content_type_change.html
- shard-tglb: NOTRUN -> [SKIP][66] ([fdo#111828]) +1 similar issue
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb1/igt@kms_content_protection@content_type_change.html

* igt@kms_content_protection@legacy:
- shard-apl: NOTRUN -> [TIMEOUT][67] ([i915#1319])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl8/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-32x32-sliding:
- shard-tglb: NOTRUN -> [SKIP][68] ([i915#3319]) +2 similar issues
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb3/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-512x170-sliding:
- shard-tglb: NOTRUN -> [SKIP][69] ([fdo#109279] / [i915#3359]) +3 similar issues
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb1/igt@[email protected]

* igt@kms_cursor_crc@pipe-d-cursor-128x42-rapid-movement:
- shard-iclb: NOTRUN -> [SKIP][70] ([fdo#109278]) +7 similar issues
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb6/igt@[email protected]

* igt@kms_cursor_crc@pipe-d-cursor-max-size-rapid-movement:
- shard-tglb: NOTRUN -> [SKIP][71] ([i915#3359]) +6 similar issues
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb7/igt@[email protected]

* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
- shard-iclb: NOTRUN -> [SKIP][72] ([fdo#109274] / [fdo#109278])
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb3/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- shard-tglb: NOTRUN -> [SKIP][73] ([i915#4103])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb8/igt@[email protected]

* igt@kms_cursor_legacy@pipe-d-torture-bo:
- shard-kbl: NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#533]) +1 similar issue
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl3/igt@[email protected]
- shard-glk: NOTRUN -> [SKIP][75] ([fdo#109271] / [i915#533]) +2 similar issues
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-glk2/igt@[email protected]

* igt@kms_flip@2x-blocking-absolute-wf_vblank-interruptible:
- shard-tglb: NOTRUN -> [SKIP][76] ([fdo#111825]) +26 similar issues
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb1/igt@kms_flip@2x-blocking-absolute-wf_vblank-interruptible.html

* igt@kms_flip@2x-nonexisting-fb-interruptible:
- shard-iclb: NOTRUN -> [SKIP][77] ([fdo#109274]) +2 similar issues
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb4/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible@c-dp1:
- shard-apl: [PASS][78] -> [DMESG-WARN][79] ([i915#180]) +2 similar issues
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-apl7/igt@kms_flip@[email protected]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl1/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-suspend@c-dp1:
- shard-kbl: [PASS][80] -> [INCOMPLETE][81] ([i915#636])
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-kbl2/igt@kms_flip@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl2/igt@kms_flip@[email protected]

* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs:
- shard-apl: NOTRUN -> [SKIP][82] ([fdo#109271] / [i915#2672])
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs.html

* igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile:
- shard-iclb: [PASS][83] -> [SKIP][84] ([i915#3701])
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-iclb3/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-blt:
- shard-kbl: NOTRUN -> [SKIP][85] ([fdo#109271]) +131 similar issues
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-shrfb-draw-pwrite:
- shard-iclb: NOTRUN -> [SKIP][86] ([fdo#109280]) +6 similar issues
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-shrfb-draw-pwrite.html

* igt@kms_hdr@bpc-switch-suspend:
- shard-apl: NOTRUN -> [DMESG-WARN][87] ([i915#180]) +1 similar issue
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl1/igt@[email protected]

* igt@kms_pipe_b_c_ivb@pipe-b-double-modeset-then-modeset-pipe-c:
- shard-tglb: NOTRUN -> [SKIP][88] ([fdo#109289]) +1 similar issue
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb1/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][89] ([fdo#109289])
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb3/igt@[email protected]

* igt@kms_pipe_crc_basic@hang-read-crc-pipe-d:
- shard-apl: NOTRUN -> [SKIP][90] ([fdo#109271] / [i915#533])
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl6/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- shard-kbl: NOTRUN -> [DMESG-WARN][91] ([i915#180])
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl7/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
- shard-kbl: NOTRUN -> [FAIL][92] ([fdo#108145] / [i915#265])
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl6/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-apl: NOTRUN -> [FAIL][93] ([fdo#108145] / [i915#265]) +1 similar issue
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl6/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb:
- shard-apl: NOTRUN -> [FAIL][94] ([i915#265])
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl3/igt@[email protected]
- shard-glk: NOTRUN -> [FAIL][95] ([i915#265])
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-glk1/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-alpha-basic:
- shard-glk: NOTRUN -> [FAIL][96] ([fdo#108145] / [i915#265])
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-glk6/igt@[email protected]

* igt@kms_plane_cursor@pipe-d-viewport-size-256:
- shard-glk: NOTRUN -> [SKIP][97] ([fdo#109271]) +70 similar issues
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-glk5/igt@[email protected]

* igt@kms_plane_lowres@pipe-c-tiling-none:
- shard-iclb: NOTRUN -> [SKIP][98] ([i915#3536])
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb5/igt@[email protected]
- shard-tglb: NOTRUN -> [SKIP][99] ([i915#3536]) +1 similar issue
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb1/igt@[email protected]

* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-1:
- shard-apl: NOTRUN -> [SKIP][100] ([fdo#109271] / [i915#658]) +4 similar issues
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl8/igt@[email protected]

* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-5:
- shard-glk: NOTRUN -> [SKIP][101] ([fdo#109271] / [i915#658]) +1 similar issue
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-glk2/igt@[email protected]
- shard-tglb: NOTRUN -> [SKIP][102] ([i915#2920])
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb1/igt@[email protected]
- shard-kbl: NOTRUN -> [SKIP][103] ([fdo#109271] / [i915#658]) +1 similar issue
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl3/igt@[email protected]
- shard-iclb: NOTRUN -> [SKIP][104] ([i915#658])
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb3/igt@[email protected]

* igt@kms_psr@psr2_basic:
- shard-iclb: [PASS][105] -> [SKIP][106] ([fdo#109441])
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-iclb2/igt@kms_psr@psr2_basic.html
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb3/igt@kms_psr@psr2_basic.html

* igt@kms_psr@psr2_cursor_plane_onoff:
- shard-tglb: NOTRUN -> [FAIL][107] ([i915#132] / [i915#3467]) +3 similar issues
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb1/igt@kms_psr@psr2_cursor_plane_onoff.html
- shard-iclb: NOTRUN -> [SKIP][108] ([fdo#109441]) +1 similar issue
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb4/igt@kms_psr@psr2_cursor_plane_onoff.html

* igt@kms_setmode@basic:
- shard-snb: NOTRUN -> [FAIL][109] ([i915#31])
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-snb5/igt@[email protected]

* igt@prime_nv_api@i915_nv_double_export:
- shard-iclb: NOTRUN -> [SKIP][110] ([fdo#109291]) +1 similar issue
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb6/igt@prime_nv_api@i915_nv_double_export.html

* igt@prime_nv_test@nv_write_i915_gtt_mmap_read:
- shard-tglb: NOTRUN -> [SKIP][111] ([fdo#109291]) +1 similar issue
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb2/igt@prime_nv_test@nv_write_i915_gtt_mmap_read.html

* igt@prime_vgem@fence-read-hang:
- shard-tglb: NOTRUN -> [SKIP][112] ([fdo#109295])
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb8/igt@[email protected]

* igt@sysfs_clients@fair-7:
- shard-apl: NOTRUN -> [SKIP][113] ([fdo#109271] / [i915#2994]) +2 similar issues
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-apl8/igt@[email protected]
- shard-tglb: NOTRUN -> [SKIP][114] ([i915#2994])
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb8/igt@[email protected]

* igt@sysfs_clients@sema-10:
- shard-kbl: NOTRUN -> [SKIP][115] ([fdo#109271] / [i915#2994]) +1 similar issue
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl4/igt@[email protected]

* igt@sysfs_clients@sema-50:
- shard-glk: NOTRUN -> [SKIP][116] ([fdo#109271] / [i915#2994])
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-glk1/igt@[email protected]

#### Possible fixes ####

* igt@gem_eio@unwedge-stress:
- shard-tglb: [TIMEOUT][117] ([i915#2369] / [i915#3063] / [i915#3648]) -> [PASS][118]
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-tglb5/igt@[email protected]
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb6/igt@[email protected]

* igt@gem_exec_fair@basic-deadline:
- shard-kbl: [FAIL][119] ([i915#2846]) -> [PASS][120]
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-kbl4/igt@[email protected]
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl6/igt@[email protected]

* igt@gem_exec_fair@basic-flow@rcs0:
- shard-tglb: [FAIL][121] ([i915#2842]) -> [PASS][122]
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-tglb6/igt@gem_exec_fair@[email protected]
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-tglb2/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-none-rrul@rcs0:
- shard-glk: [FAIL][123] ([i915#2842]) -> [PASS][124] +1 similar issue
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-glk8/igt@gem_exec_fair@[email protected]
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-glk5/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-throttle@rcs0:
- shard-iclb: [FAIL][125] ([i915#2849]) -> [PASS][126]
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-iclb7/igt@gem_exec_fair@[email protected]
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb7/igt@gem_exec_fair@[email protected]

* igt@gem_exec_reloc@basic-wc-read-active:
- shard-kbl: [DMESG-WARN][127] ([i915#203] / [i915#62] / [i915#92]) -> [PASS][128]
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-kbl6/igt@[email protected]
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl7/igt@[email protected]

* igt@i915_module_load@reload-no-display:
- shard-kbl: [DMESG-WARN][129] ([i915#203]) -> [PASS][130]
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-kbl6/igt@[email protected]
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl1/igt@[email protected]

* igt@i915_pm_dc@dc6-dpms:
- shard-iclb: [FAIL][131] ([i915#454]) -> [PASS][132]
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-iclb3/igt@[email protected]
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-iclb1/igt@[email protected]

* igt@kms_big_fb@y-tiled-64bpp-rotate-180:
- shard-glk: [FAIL][133] ([i915#1888]) -> [PASS][134]
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-glk7/igt@[email protected]
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-glk4/igt@[email protected]

* igt@kms_color@pipe-c-legacy-gamma:
- shard-kbl: [DMESG-WARN][135] ([i915#180] / [i915#203] / [i915#62] / [i915#92]) -> [PASS][136] +2 similar issues
[135]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6231/shard-kbl6/igt@[email protected]
[136]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6286/shard-kbl6/igt@kms_co

== Logs ==

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

#3 lore raw
In reply to Igor Matheus Andrade Torrente
Quoted 44 lines · Igor Matheus Andrade Torrente

Currently, the fill_fb function, instead of filling the framebuffer with the whole pixel, is only filling it with the rightmost byte.

This is happening because, even though the memset accepts an int as a parameter, it's casting the value to unsigned char and will fill the memory with this 8 bits value.

If we setup the pixel to 0xff0000|f0|, the buffer will filled with:

| addr     | = 0f
| addr + 1 | = 0f
| addr + 2 | = 0f
| addr + 3 | = 0f
    ...

| addr + N | = 0f

This patch address this issue by manually copying the entire integer in the little-endian format.

---
 tests/kms_writeback.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
tests/kms_writeback.c +4 -2
index 60dbda2a..60d9b74e 100644
@@ -227,14 +227,26 @@ static void writeback_fb_id(igt_output_t *output, igt_fb_t *valid_fb, igt_fb_t *
 
 static void fill_fb(igt_fb_t *fb, uint32_t pixel)
 {
-	void *ptr;
+	uint8_t *ptr, x, r, g, b, step = sizeof(uint32_t);
+	int64_t pixel_count, i;
 
 	igt_assert(fb->drm_format == DRM_FORMAT_XRGB8888);
 
 	ptr = igt_fb_map_buffer(fb->fd, fb);
 	igt_assert(ptr);
 
-	memset(ptr, pixel, fb->strides[0] * fb->height);
+	pixel_count = fb->strides[0] * fb->height;
+	x = (pixel & (0xff << 24)) >> 24;

tests/kms_writeback.c static void writeback_fb_id(igt_output_t *output, igt_fb_t *valid_fb, igt_fb_t * · line 249

Quoted 10 lines
tests/kms_writeback.c +10 -0
+	r = (pixel & (0xff << 16)) >> 16;
+	g = (pixel & (0xff << 8)) >> 8;
+	b = pixel & 0xff;
+
+	for (i = 0; i <= pixel_count - step; i += step) {
+		ptr[i + 3] = x;
+		ptr[i + 2] = r;
+		ptr[i + 1] = g;
+		ptr[i + 0] = b;
+	}

Is there a reason to explicitly go for little endian here? Can't the pixel be written as is, like

uint32_t *p = ptr;

while (p++ < ptr + fb->strides[0] * fb->height)
*p = pixel;

Signature · 1 line
Petri Latvala
#4 lore raw
Quoted 59 lines · Petri Latvala
Quoted 44 lines · Igor Matheus Andrade Torrente

Currently, the fill_fb function, instead of filling the framebuffer with the whole pixel, is only filling it with the rightmost byte.

This is happening because, even though the memset accepts an int as a parameter, it's casting the value to unsigned char and will fill the memory with this 8 bits value.

If we setup the pixel to 0xff0000|f0|, the buffer will filled with:

| addr     | = 0f
| addr + 1 | = 0f
| addr + 2 | = 0f
| addr + 3 | = 0f
     ...

| addr + N | = 0f

This patch address this issue by manually copying the entire integer in the little-endian format.

---
  tests/kms_writeback.c | 16 ++++++++++++++--
  1 file changed, 14 insertions(+), 2 deletions(-)
tests/kms_writeback.c +4 -2
index 60dbda2a..60d9b74e 100644
@@ -227,14 +227,26 @@ static void writeback_fb_id(igt_output_t *output, igt_fb_t *valid_fb, igt_fb_t *
 
  static void fill_fb(igt_fb_t *fb, uint32_t pixel)
  {
-	void *ptr;
+	uint8_t *ptr, x, r, g, b, step = sizeof(uint32_t);
+	int64_t pixel_count, i;
 
  	igt_assert(fb->drm_format == DRM_FORMAT_XRGB8888);
 
  	ptr = igt_fb_map_buffer(fb->fd, fb);
  	igt_assert(ptr);
 
-	memset(ptr, pixel, fb->strides[0] * fb->height);
+	pixel_count = fb->strides[0] * fb->height;
+	x = (pixel & (0xff << 24)) >> 24;

tests/kms_writeback.c static void writeback_fb_id(igt_output_t *output, igt_fb_t *valid_fb, igt_fb_t * · line 249

Quoted 10 lines
tests/kms_writeback.c +10 -0
+	r = (pixel & (0xff << 16)) >> 16;
+	g = (pixel & (0xff << 8)) >> 8;
+	b = pixel & 0xff;
+
+	for (i = 0; i <= pixel_count - step; i += step) {
+		ptr[i + 3] = x;
+		ptr[i + 2] = r;
+		ptr[i + 1] = g;
+		ptr[i + 0] = b;
+	}

Is there a reason to explicitly go for little endian here? Can't the pixel be written as is, like

Quoted 6 lines

uint32_t *p = ptr;

while (p++ < ptr + fb->strides[0] * fb->height)
*p = pixel;

I did it to cover the possible case of this code being running on big-endian machines. But, I realized that isn't necessary, since I'm just copying the bytes and not manipulating them.

I will send a V2 without all this code.