linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: linux-fbdev-devel@lists.sourceforge.net,
	Andrew Walrond <andrew@walrond.org>
Subject: Re: x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today
Date: Thu, 18 Nov 2004 06:23:28 +0800	[thread overview]
Message-ID: <200411180623.28248.adaplas@hotpop.com> (raw)
In-Reply-To: <200411171107.21823.andrew@walrond.org>

[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]

On Wednesday 17 November 2004 19:07, Andrew Walrond wrote:
> On Wednesday 17 Nov 2004 00:33, Andrew Walrond wrote:
> > On Wednesday 17 Nov 2004 00:15, Antonino A. Daplas wrote:
> > > There was a bunch of IO access fixes in rivafb.  Can you narrow it down
> > > to a particular function?  Replace the following...
> > >
> > >  .fb_fillrect  = rivafb_fillrect,
>
> Broken.
>
> > >  .fb_copyarea  = rivafb_copyarea,
>
> seems ok
>
> > >  .fb_imageblit  = rivafb_imageblit,
>
> broken.
>

I was suspecting imageblit, I never suspected fillrect.  Anyway, can you try
the 2 patches attached.  The first patch reverts io access to the old method
(direct pointer loading/reading and forced alignment) and the second uses
__raw_{read|write} but forces alignment. You need to reverse the previous
patch before applying the other.

If none of the patches work, it will entail more work.  Revert the following
functions to linux-2.6.10-rc1, in the given order and preferrably one at a
time.

riva_set_pattern()
riva_set_rop_solid()
riva_setup_accel()
rivafb_imageblit()
rivafb_fillrect()

Tony



[-- Attachment #2: rivafb-ioaccess-revert1.diff --]
[-- Type: text/x-diff, Size: 1335 bytes --]

diff -Nru a/drivers/video/riva/riva_hw.h b/drivers/video/riva/riva_hw.h
--- a/drivers/video/riva/riva_hw.h	2004-11-17 18:29:40 +08:00
+++ b/drivers/video/riva/riva_hw.h	2004-11-18 05:54:17 +08:00
@@ -73,17 +73,20 @@
 /*
  * HW access macros.
  */
+#if defined(__powerpc__)
 #include <asm/io.h>
-
-#define NV_WR08(p,i,d)  (__raw_writeb((d), (void __iomem *)(p) + (i)))
-#define NV_RD08(p,i)    (__raw_readb((void __iomem *)(p) + (i)))
-#define NV_WR16(p,i,d)  (__raw_writew((d), (void __iomem *)(p) + (i)))
-#define NV_RD16(p,i)    (__raw_readw((void __iomem *)(p) + (i)))
-#define NV_WR32(p,i,d)  (__raw_writel((d), (void __iomem *)(p) + (i)))
-#define NV_RD32(p,i)    (__raw_readl((void __iomem *)(p) + (i)))
-
-#define VGA_WR08(p,i,d) (writeb((d), (void __iomem *)(p) + (i)))
-#define VGA_RD08(p,i)   (readb((void __iomem *)(p) + (i)))
+#define NV_WR08(p,i,d)	out_8(p+i, d)
+#define NV_RD08(p,i)	in_8(p+i)
+#else
+#define NV_WR08(p,i,d)  (((U008 *)(p))[i]=(d))
+#define NV_RD08(p,i)    (((U008 *)(p))[i])
+#endif
+#define NV_WR16(p,i,d)  (((U016 *)(p))[(i)/2]=(d))
+#define NV_RD16(p,i)    (((U016 *)(p))[(i)/2])
+#define NV_WR32(p,i,d)  (((U032 *)(p))[(i)/4]=(d))
+#define NV_RD32(p,i)    (((U032 *)(p))[(i)/4])
+#define VGA_WR08(p,i,d) NV_WR08(p,i,d)
+#define VGA_RD08(p,i)   NV_RD08(p,i)
 
 /*
  * Define different architectures.

[-- Attachment #3: rivafb-ioaccess-revert2.diff --]
[-- Type: text/x-diff, Size: 1200 bytes --]

diff -Nru a/drivers/video/riva/riva_hw.h b/drivers/video/riva/riva_hw.h
--- a/drivers/video/riva/riva_hw.h	2004-11-17 18:29:40 +08:00
+++ b/drivers/video/riva/riva_hw.h	2004-11-18 06:06:02 +08:00
@@ -75,12 +75,12 @@
  */
 #include <asm/io.h>
 
-#define NV_WR08(p,i,d)  (__raw_writeb((d), (void __iomem *)(p) + (i)))
-#define NV_RD08(p,i)    (__raw_readb((void __iomem *)(p) + (i)))
-#define NV_WR16(p,i,d)  (__raw_writew((d), (void __iomem *)(p) + (i)))
-#define NV_RD16(p,i)    (__raw_readw((void __iomem *)(p) + (i)))
-#define NV_WR32(p,i,d)  (__raw_writel((d), (void __iomem *)(p) + (i)))
-#define NV_RD32(p,i)    (__raw_readl((void __iomem *)(p) + (i)))
+#define NV_WR08(p,i,d)  (__raw_writeb((d), (u8 __iomem *)(p) + (i)))
+#define NV_RD08(p,i)    (__raw_readb((u8 __iomem *)(p) + (i)))
+#define NV_WR16(p,i,d)  (__raw_writew((d), (u16 __iomem *)(p) + (i)/2))
+#define NV_RD16(p,i)    (__raw_readw((u16 __iomem *)(p) + (i)/2))
+#define NV_WR32(p,i,d)  (__raw_writel((d), (u32 __iomem *)(p) + (i)/4))
+#define NV_RD32(p,i)    (__raw_readl((u32 __iomem *)(p) + (i)/4))
 
 #define VGA_WR08(p,i,d) (writeb((d), (void __iomem *)(p) + (i)))
 #define VGA_RD08(p,i)   (readb((void __iomem *)(p) + (i)))

  parent reply	other threads:[~2004-11-17 22:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-16 22:44 x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today Andrew Walrond
2004-11-16 23:29 ` Andrew Walrond
2004-11-17  0:01 ` Andrew Walrond
2004-11-17  0:15 ` Antonino A. Daplas
2004-11-17  0:33   ` Andrew Walrond
2004-11-17 11:07     ` Andrew Walrond
2004-11-17 11:11       ` Geert Uytterhoeven
2004-11-17 11:34         ` Andrew Walrond
2004-11-17 22:23       ` Antonino A. Daplas [this message]
2004-11-17 22:28         ` Antonino A. Daplas
2004-11-17 22:50           ` Andrew Walrond
2004-11-18  0:02             ` Antonino A. Daplas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200411180623.28248.adaplas@hotpop.com \
    --to=adaplas@hotpop.com \
    --cc=andrew@walrond.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).