[Macchiato] Fwd: framebuffer corruption due to overlapping stp instructions on arm64
Ard Biesheuvel
ard.biesheuvel at linaro.org
Thu Aug 2 20:39:05 BST 2018
---------- Forwarded message ----------
From: Mikulas Patocka <mpatocka at redhat.com>
Date: 2 August 2018 at 21:31
Subject: framebuffer corruption due to overlapping stp instructions on arm64
To: Catalin Marinas <catalin.marinas at arm.com>, Will Deacon
<will.deacon at arm.com>, Russell King <linux at armlinux.org.uk>, Thomas
Petazzoni <thomas.petazzoni at free-electrons.com>
Cc: libc-alpha at sourceware.org, linux-kernel at vger.kernel.org,
linux-arm-kernel at lists.infradead.org
Hi
I tried to use a PCIe graphics card on the MacchiatoBIN board and I hit a
strange problem.
When I use the links browser in graphics mode on the framebuffer, I get
occasional pixel corruption. Links does memcpy, memset and 4-byte writes
on the framebuffer - nothing else.
I found out that the pixel corruption is caused by overlapping unaligned
stp instructions inside memcpy. In order to avoid branching, the arm64
memcpy implementation may write the same destination twice with different
alignment. If I put "dmb sy" between the overlapping stp instructions, the
pixel corruption goes away.
This seems like a hardware bug. Is it a known errata? Do you have any
workarounds for it?
I tried AMD card (HD 6350) and NVidia (NVS 285) and both exhibit the same
corruption. OpenGL doesn't work (it results in artifacts on the AMD card
and lock-up on the NVidia card), but it's quite expected if even simple
writing to the framebuffer doesn't work.
Mikulas
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
More information about the Macchiato
mailing list