On Sat, 2001-11-10 at 20:58, Benjamin Herrenschmidt wrote:
> Note that it doesn't work correctly with all chipsets yet (the Rage M3
> loves to lockup) with XFree 4.1. I beleive the problem is specific to
> that chip and possibly not related to those AGP fixes as other r128
> cards seem to work properly.
I suspect it's less stable for us than for the x86 folks though, or
there would be more noise about it on the various lists.
What's this agp_special_page about?
> diff -urN linuxppc_2_4_devel/drivers/char/drm/r128_drv.h
>linuxppc_benh_stable/drivers/char/drm/r128_drv.h
> --- linuxppc_2_4_devel/drivers/char/drm/r128_drv.h Sat Nov 10 12:23:58 2001
> +++ linuxppc_benh_stable/drivers/char/drm/r128_drv.h Sat Nov 10 20:38:19 2001
> @@ -34,8 +34,13 @@
> #ifndef __R128_DRV_H__
> #define __R128_DRV_H__
>
> +#ifdef __powerpc__
> +#define GET_RING_HEAD( ring ) in_le32((volatile u32 *)(ring)->head)
> +#define SET_RING_HEAD( ring, val ) out_le32((volatile u32 *)(ring)->head, (val) )
> +#else
> #define GET_RING_HEAD( ring ) le32_to_cpu( *(ring)->head )
> #define SET_RING_HEAD( ring, val ) *(ring)->head = cpu_to_le32( val )
> +#endif
>
> typedef struct drm_r128_freelist {
> unsigned int age;
> @@ -397,6 +402,9 @@
> wmb(); \
> R128_DEREF(reg) = val; \
> } while (0)
> +#elif defined (__powerpc__)
> +#define R128_READ(reg) in_le32( (volatile u32 *)R128_ADDR( reg ) )
> +#define R128_WRITE(reg,val) out_le32( (volatile u32 *)R128_ADDR( reg ), (val) )
> #else
> #define R128_READ(reg) le32_to_cpu( R128_DEREF( reg ) )
> #define R128_WRITE(reg,val) \
> @@ -418,6 +426,9 @@
> wmb(); \
> R128_DEREF8(reg) = val; \
> } while (0)
> +#elif defined (__powerpc__)
> +#define R128_READ8(reg) in_8( (volatile u8 *)R128_ADDR(reg) )
> +#define R128_WRITE8(reg,val) out_8( (volatile u8 *)R128_ADDR(reg), val )
> #else
> #define R128_READ8(reg) R128_DEREF8( reg )
> #define R128_WRITE8(reg,val) do { R128_DEREF8( reg ) = val; } while (0)
The alpha versions of these look general to me, so I cleaned them up for
endianness in my tree. What would the other DRI developers think about
making them the general solution for all architectures? I'm afraid the
memory barriers could raise performance issues on x86...
> @@ -493,8 +504,11 @@
> * Ring control
> */
>
> +#ifdef __powerpc__
> +#define r128_flush_write_combine() (void)in_le32(ring)
> +#else
> #define r128_flush_write_combine() mb()
> -
> +#endif
>
> #define R128_VERBOSE 0
>
Is this really useful?
--
Earthling Michel D�nzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member / CS student, Free Software enthusiast
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel