Prev: [PATCH] Change struct flchip_shared spinlock locking into mutex
Next: [GIT PULL] 9p file system changes for the 2.6.36 merge window
From: Ondrej Zary on 2 Aug 2010 16:00 Hello, matroxfb (at least with Mystique and Mystique 220) stopped working in 2.6.34 - the screen is completely corrupted. Bisection shows that 6175ddf06b6172046a329e3abfd9c901a43efd2e is first bad commit. Reverting 6175ddf06b6172046a329e3abfd9c901a43efd2e in 2.6.34 fixes the problem (1c5b9069e12e20d2fe883076ae0bf73966492108 must be reverted first). -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: H. Peter Anvin on 2 Aug 2010 17:10 On 08/02/2010 12:49 PM, Ondrej Zary wrote: > Hello, > matroxfb (at least with Mystique and Mystique 220) stopped working in 2.6.34 - > the screen is completely corrupted. Bisection shows that > 6175ddf06b6172046a329e3abfd9c901a43efd2e is first bad commit. > > Reverting 6175ddf06b6172046a329e3abfd9c901a43efd2e in 2.6.34 fixes the problem > (1c5b9069e12e20d2fe883076ae0bf73966492108 must be reverted first). > Sounds like another driver which used memcpy_toio() when it should have used iowrite32_rep() or __iowrite32_copy(). Hmm... is __iowrite32_copy() and iowrite32_rep() redundant? If so, we should get rid of the former. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: H. Peter Anvin on 2 Aug 2010 17:20 On 08/02/2010 02:14 PM, Ondrej Zary wrote: > On Monday 02 August 2010 23:04:28 H. Peter Anvin wrote: >> On 08/02/2010 12:49 PM, Ondrej Zary wrote: >>> Hello, >>> matroxfb (at least with Mystique and Mystique 220) stopped working in >>> 2.6.34 - the screen is completely corrupted. Bisection shows that >>> 6175ddf06b6172046a329e3abfd9c901a43efd2e is first bad commit. >>> >>> Reverting 6175ddf06b6172046a329e3abfd9c901a43efd2e in 2.6.34 fixes the >>> problem (1c5b9069e12e20d2fe883076ae0bf73966492108 must be reverted >>> first). >> >> Sounds like another driver which used memcpy_toio() when it should have >> used iowrite32_rep() or __iowrite32_copy(). >> >> Hmm... is __iowrite32_copy() and iowrite32_rep() redundant? If so, we >> should get rid of the former. > > There is a wrapper in drivers/video/matrox/matroxfb_base.h (see below) with > some comment. So this commit changed one of the three points? > > static inline void mga_memcpy_toio(vaddr_t va, const void* src, int len) { > #if defined(__alpha__) || defined(__i386__) || defined(__x86_64__) > /* > * memcpy_toio works for us if: > * (1) Copies data as 32bit quantities, not byte after byte, > * (2) Performs LE ordered stores, and > * (3) It copes with unaligned source (destination is guaranteed to be page > * aligned and length is guaranteed to be multiple of 4). > */ > memcpy_toio(va.vaddr, src, len); > #else Yes, point (1) is not guaranteed by memcpy_toio(). -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Ondrej Zary on 2 Aug 2010 17:20 On Monday 02 August 2010 23:04:28 H. Peter Anvin wrote: > On 08/02/2010 12:49 PM, Ondrej Zary wrote: > > Hello, > > matroxfb (at least with Mystique and Mystique 220) stopped working in > > 2.6.34 - the screen is completely corrupted. Bisection shows that > > 6175ddf06b6172046a329e3abfd9c901a43efd2e is first bad commit. > > > > Reverting 6175ddf06b6172046a329e3abfd9c901a43efd2e in 2.6.34 fixes the > > problem (1c5b9069e12e20d2fe883076ae0bf73966492108 must be reverted > > first). > > Sounds like another driver which used memcpy_toio() when it should have > used iowrite32_rep() or __iowrite32_copy(). > > Hmm... is __iowrite32_copy() and iowrite32_rep() redundant? If so, we > should get rid of the former. There is a wrapper in drivers/video/matrox/matroxfb_base.h (see below) with some comment. So this commit changed one of the three points? static inline void mga_memcpy_toio(vaddr_t va, const void* src, int len) { #if defined(__alpha__) || defined(__i386__) || defined(__x86_64__) /* * memcpy_toio works for us if: * (1) Copies data as 32bit quantities, not byte after byte, * (2) Performs LE ordered stores, and * (3) It copes with unaligned source (destination is guaranteed to be page * aligned and length is guaranteed to be multiple of 4). */ memcpy_toio(va.vaddr, src, len); #else u_int32_t __iomem* addr = va.vaddr; if ((unsigned long)src & 3) { while (len >= 4) { fb_writel(get_unaligned((u32 *)src), addr); addr++; len -= 4; src += 4; } } else { while (len >= 4) { fb_writel(*(u32 *)src, addr); addr++; len -= 4; src += 4; } } #endif } -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Ondrej Zary on 2 Aug 2010 17:40
On Monday 02 August 2010 23:15:33 H. Peter Anvin wrote: > On 08/02/2010 02:14 PM, Ondrej Zary wrote: > > On Monday 02 August 2010 23:04:28 H. Peter Anvin wrote: > >> On 08/02/2010 12:49 PM, Ondrej Zary wrote: > >>> Hello, > >>> matroxfb (at least with Mystique and Mystique 220) stopped working in > >>> 2.6.34 - the screen is completely corrupted. Bisection shows that > >>> 6175ddf06b6172046a329e3abfd9c901a43efd2e is first bad commit. > >>> > >>> Reverting 6175ddf06b6172046a329e3abfd9c901a43efd2e in 2.6.34 fixes the > >>> problem (1c5b9069e12e20d2fe883076ae0bf73966492108 must be reverted > >>> first). > >> > >> Sounds like another driver which used memcpy_toio() when it should have > >> used iowrite32_rep() or __iowrite32_copy(). > >> > >> Hmm... is __iowrite32_copy() and iowrite32_rep() redundant? If so, we > >> should get rid of the former. > > > > There is a wrapper in drivers/video/matrox/matroxfb_base.h (see below) > > with some comment. So this commit changed one of the three points? > > > > static inline void mga_memcpy_toio(vaddr_t va, const void* src, int len) > > { #if defined(__alpha__) || defined(__i386__) || defined(__x86_64__) /* > > * memcpy_toio works for us if: > > * (1) Copies data as 32bit quantities, not byte after byte, > > * (2) Performs LE ordered stores, and > > * (3) It copes with unaligned source (destination is guaranteed > > to be page * aligned and length is guaranteed to be multiple of 4). > > */ > > memcpy_toio(va.vaddr, src, len); > > #else > > Yes, point (1) is not guaranteed by memcpy_toio(). Now I wonder how many drivers will this break... The patch below fixes it for me. Is it correct on all architectures? --- linux-2.6.35-rc2/drivers/video/matrox/matroxfb_base.h 2010-06-06 05:43:24.000000000 +0200 +++ linux-2.6.35-rc3/drivers/video/matrox/matroxfb_base.h 2010-08-02 23:31:34.000000000 +0200 @@ -157,7 +157,7 @@ static inline void mga_memcpy_toio(vaddr * (3) It copes with unaligned source (destination is guaranteed to be page * aligned and length is guaranteed to be multiple of 4). */ - memcpy_toio(va.vaddr, src, len); + iowrite32_rep(va.vaddr, src, len); #else u_int32_t __iomem* addr = va.vaddr; -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |