summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2022-03-08 15:18:01 +0100
committerMaxime Ripard <maxime@cerno.tech>2022-06-28 15:56:04 +0200
commit9e9469cee564428d21ac2a72e81e4244ebca4d53 (patch)
tree93a0b657f763c72d20d52ba5edb478eccac6ee15 /tests
parent4736e0fa308208c7407f9cc8e2fce07562258912 (diff)
tests/kms_writeback: Use endianness accessor to fill pixels
The fill_fb() function in the kms_writeback test suite will fill an XRGB8888 buffer using a pattern passed an an argument. However, the pattern is native endian, while XRGB8888 is little-endian. Add an accessor and use it to fill the framebuffer with our pattern. Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_writeback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c
index 6efc72df..cf70a28e 100644
--- a/tests/kms_writeback.c
+++ b/tests/kms_writeback.c
@@ -244,7 +244,7 @@ static void fill_fb(igt_fb_t *fb, uint32_t pixel)
pixel_count = fb->strides[0] * fb->height / sizeof(uint32_t);
for (i = 0; i < pixel_count; i++)
- ptr[i] = pixel;
+ ptr[i] = cpu_to_le32(pixel);
igt_fb_unmap_buffer(fb, ptr);
}