From: Greg Kroah-Hartman Date: Fri, 27 Jun 2014 21:47:21 +0000 (-0700) Subject: 3.10-stable patches X-Git-Tag: v3.4.96~54 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f3fdb9fc88d5b353492fc72ffdd45013c727c7e5;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: matroxfb-perform-a-dummy-read-of-m_status.patch --- diff --git a/queue-3.10/matroxfb-perform-a-dummy-read-of-m_status.patch b/queue-3.10/matroxfb-perform-a-dummy-read-of-m_status.patch new file mode 100644 index 00000000000..71410d5a95d --- /dev/null +++ b/queue-3.10/matroxfb-perform-a-dummy-read-of-m_status.patch @@ -0,0 +1,40 @@ +From 972754cfaee94d6e25acf94a497bc0a864d91b7e Mon Sep 17 00:00:00 2001 +From: Mikulas Patocka +Date: Thu, 15 May 2014 06:58:24 -0400 +Subject: matroxfb: perform a dummy read of M_STATUS + +From: Mikulas Patocka + +commit 972754cfaee94d6e25acf94a497bc0a864d91b7e 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 +Signed-off-by: Tomi Valkeinen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/video/matrox/matroxfb_base.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/video/matrox/matroxfb_base.h ++++ b/drivers/video/matrox/matroxfb_base.h +@@ -698,7 +698,7 @@ void matroxfb_unregister_driver(struct m + + #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 */ + #ifdef CONFIG_FB_MATROX_MILLENIUM diff --git a/queue-3.10/series b/queue-3.10/series index 5467d47256e..a81ca22f3f5 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -23,3 +23,4 @@ idr-fix-overflow-bug-during-maximum-id-calculation-at-maximum-height.patch s390-lowcore-reserve-96-bytes-for-irb-in-lowcore.patch ext4-fix-zeroing-of-page-during-writeback.patch ext4-fix-wrong-assert-in-ext4_mb_normalize_request.patch +matroxfb-perform-a-dummy-read-of-m_status.patch