diff options
author | Igor Matheus Andrade Torrente <igormtorrente@gmail.com> | 2021-10-07 14:20:11 -0300 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2021-10-08 13:25:08 +0300 |
commit | b232a092b9e1b10a8be13601acaa440903b226bc (patch) | |
tree | a12acd360976cad2585d069bc1af65c25e5dcd6f /tests/prime_self_import.c | |
parent | 4bb153a5ba98baa14e04b079d0523913bf3e0344 (diff) |
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.
Signed-off-by: Igor Torrente <igormtorrente@gmail.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'tests/prime_self_import.c')
0 files changed, 0 insertions, 0 deletions