On Wed, 1 May 2002, Peter Andersson wrote:
> Sorry about the lateness of my reply but i have been away over night and
> didn�t get this mail until just recently. The patch fails when patching
> mach64_state.c. It exits with "HUNK #2 FAILED at 535" and i am not
> comfortable with applying the changes manually since there are a great
> risc that i would do something wrong. I am using the latest dri branch
> which i downloaded a couple of minutes ago.
Try the attached patch. It's merged with the current changes so it should
apply. I checked in some changes after Jose made his original patch.
--
Leif Delgass
http://www.retinalburn.net
? ppc.diff
Index: mach64_drv.h
===================================================================
RCS file:
/cvsroot/dri/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Attic/mach64_drv.h,v
retrieving revision 1.1.6.3.2.11
diff -u -r1.1.6.3.2.11 mach64_drv.h
--- mach64_drv.h 1 May 2002 00:10:29 -0000 1.1.6.3.2.11
+++ mach64_drv.h 1 May 2002 18:02:15 -0000
@@ -359,9 +359,8 @@
#define MACH64_ADDR(reg) (MACH64_BASE(reg) + reg)
-#define MACH64_DEREF(reg) *(volatile u32 *)MACH64_ADDR(reg)
-#define MACH64_READ(reg) le32_to_cpu(MACH64_DEREF(reg))
-#define MACH64_WRITE(reg,val) do { MACH64_DEREF(reg) = cpu_to_le32(val); } while (0)
+#define MACH64_READ(reg) readl(MACH64_ADDR(reg))
+#define MACH64_WRITE(reg,val) writel((val),MACH64_ADDR(reg));
#define DWMREG0 0x0400
Index: mach64_state.c
===================================================================
RCS file:
/cvsroot/dri/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Attic/mach64_state.c,v
retrieving revision 1.1.6.4.2.17
diff -u -r1.1.6.4.2.17 mach64_state.c
--- mach64_state.c 1 May 2002 00:10:29 -0000 1.1.6.4.2.17
+++ mach64_state.c 1 May 2002 18:02:16 -0000
@@ -526,7 +526,8 @@
while ( used ) {
u32 reg, count;
- reg = le32_to_cpu(*p++);
+ reg = le32_to_cpu(*p);
+ p++;
used--;
count = (reg >> 16) + 1;
@@ -543,7 +544,8 @@
--fifo;
/* data is already little-endian */
- MACH64_DEREF(reg) = *p++;
+ MACH64_WRITE(reg, le32_to_cpu(*p));
+ p++;
used--;
reg += 4;