linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: still no accelerated X ($#!$*)
@ 2000-01-19 10:38 Moritz Thomas
  2000-01-20 18:19 ` David Edelsohn
  0 siblings, 1 reply; 5+ messages in thread
From: Moritz Thomas @ 2000-01-19 10:38 UTC (permalink / raw)
  To: linuxppc-dev, linuxppc-user; +Cc: Kevin_Hendricks


Finally I got it!

The problem was in the Xpmac code. If I remember correctly, this error
was some time ago in the kernel's "atyfb.c" as well. Probably this is also
fixed in current release of Xpmac

The following functions in "regmach.h":
#if defined (__powerpc__)
extern pointer mach64MemReg;

static inline void regw(volatile unsigned long regindex, unsigned long regdata)
{
  register unsigned long base_addr = (unsigned long)mach64MemReg;

  asm("stwbrx %0,%1,%2": : "r"(regdata), "r"(regindex), "r"(base_addr));
}

static inline unsigned long regr(volatile unsigned long regindex)
{
  register unsigned long base_addr = (unsigned long)mach64MemReg, val;

  asm("lwbrx %0,%1,%2": "=r"(val):"r"(regindex), "r"(base_addr));
  return(val);
}
#endif

need to be replaced by:
#if defined (__powerpc__)
extern pointer mach64MemReg;

static inline void regw(volatile unsigned long regindex, unsigned long regdata)
{
  register unsigned long base_addr = (unsigned long)mach64MemReg;

  asm("stwbrx %0,%1,%2": : "r"(regdata), "b"(regindex), "r"(base_addr));
}

static inline unsigned long regr(volatile unsigned long regindex)
{
  register unsigned long base_addr = (unsigned long)mach64MemReg, val;

  asm("lwbrx %0,%1,%2": "=r"(val):"b"(regindex), "r"(base_addr));
  return(val);
}
#endif

Don't know if this is correct (no clue about ppc assembly), but it works...

mo


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <20000117135832.10037gmx1@mx2.gmx.net>]

end of thread, other threads:[~2000-01-20 18:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-19 10:38 still no accelerated X ($#!$*) Moritz Thomas
2000-01-20 18:19 ` David Edelsohn
2000-01-20 18:25   ` Kevin Hendricks
2000-01-20 18:42     ` Geert Uytterhoeven
     [not found] <20000117135832.10037gmx1@mx2.gmx.net>
     [not found] ` <l03130300b4aa3cb5b581@[213.6.51.119]>
2000-01-18 17:15   ` Ruben Malchow

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).