mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
matroxfb: perform a dummy read of M_STATUS
commit 972754cfae
upstream.
I had occasional screen corruption with the matrox framebuffer driver and
I found out that the reason for the corruption is that the hardware
blitter accesses the videoram while it is being written to.
The matrox driver has a macro WaitTillIdle() that should wait until the
blitter is idle, but it sometimes doesn't work. I added a dummy read
mga_inl(M_STATUS) to WaitTillIdle() to fix the problem. The dummy read
will flush the write buffer in the PCI chipset, and the next read of
M_STATUS will return the hardware status.
Since applying this patch, I had no screen corruption at all.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2dbc65d60c
commit
4aff6991e3
1 changed files with 1 additions and 1 deletions
|
@ -698,7 +698,7 @@ void matroxfb_unregister_driver(struct matroxfb_driver* drv);
|
||||||
|
|
||||||
#define mga_fifo(n) do {} while ((mga_inl(M_FIFOSTATUS) & 0xFF) < (n))
|
#define mga_fifo(n) do {} while ((mga_inl(M_FIFOSTATUS) & 0xFF) < (n))
|
||||||
|
|
||||||
#define WaitTillIdle() do {} while (mga_inl(M_STATUS) & 0x10000)
|
#define WaitTillIdle() do { mga_inl(M_STATUS); do {} while (mga_inl(M_STATUS) & 0x10000); } while (0)
|
||||||
|
|
||||||
/* code speedup */
|
/* code speedup */
|
||||||
#ifdef CONFIG_FB_MATROX_MILLENIUM
|
#ifdef CONFIG_FB_MATROX_MILLENIUM
|
||||||
|
|
Loading…
Reference in a new issue