xf86-video-mga: Changes to 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Nov 21 21:55:05 UTC 2018
src/mga_exa.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
New commits:
commit a939aa56b3af4418d0c026a3775fde7288b0cca7
Author: Mikulas Patocka <mikulas at twibright.com>
Date: Tue Nov 20 08:41:14 2018 -0800
mga_drv: fix image corruption due to memcpy reordering
The memcpy specification doesn't specify how the destination is written -
and on glibc 2.19 memcpy is doing some bytewise writes with the rep stosb
instruction. These bytewise writes confuse the hardware (because it
expects 32-bit writes) and result in image corruption.
This patch replaces memcpy with explicit writes, so that the sequential
write order and 32-bit write size is guaranteed. We use the "volatile"
attribute to make sure that compiler optimizations won't cause write
reordering. When reading the memory, we use a structure with "packed"
attribute to avoid unaligned traps on RISC machines.
Tested-by: Kevin Brace <kevinbrace at gmx.com>
Signed-off-by: Mikulas Patocka <mikulas at twibright.com>
More information about the xorg-commit
mailing list