summaryrefslogtreecommitdiff
path: root/linux/mga_dma.c
diff options
context:
space:
mode:
authorRik Faith <faith@alephnull.com>2000-08-25 12:49:18 +0000
committerRik Faith <faith@alephnull.com>2000-08-25 12:49:18 +0000
commit37643234affb329775d3330eed650dee59d39bad (patch)
treea1008ff8d871f3e0d950c732b2f96c08d0ca46f1 /linux/mga_dma.c
parentac3c3571a714a38f7572f94c40fe143b43beb3b9 (diff)
Apply patch from Alan Hourihane to temporarily allow compilation on Alpha
(the driver has not been tested on Alpha -- this just makes it compile)
Diffstat (limited to 'linux/mga_dma.c')
-rw-r--r--linux/mga_dma.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux/mga_dma.c b/linux/mga_dma.c
index 0df0906e..9ca72296 100644
--- a/linux/mga_dma.c
+++ b/linux/mga_dma.c
@@ -82,6 +82,7 @@ static void mga_delay(void)
return;
}
+#ifdef __i386__
void mga_flush_write_combine(void)
{
int xchangeDummy;
@@ -92,6 +93,7 @@ void mga_flush_write_combine(void)
" movl $0,%%eax ; cpuid ; pop %%edx ; pop %%ecx ; pop %%ebx ;"
" pop %%eax" : /* no outputs */ : /* no inputs */ );
}
+#endif
/* These are two age tags that will never be sent to
* the hardware */
@@ -427,7 +429,9 @@ void mga_fire_primary(drm_device_t *dev, drm_mga_prim_buf_t *prim)
}
}
+#ifdef __i386__
mga_flush_write_combine();
+#endif
atomic_inc(&dev_priv->pending_bufs);
MGA_WRITE(MGAREG_PRIMADDRESS, phys_head | TT_GENERAL);
MGA_WRITE(MGAREG_PRIMEND, (phys_head + num_dwords * 4) | use_agp);
@@ -824,7 +828,9 @@ static int mga_dma_initialize(drm_device_t *dev, drm_mga_init_t *init) {
* the status register will be correct
*/
+#ifdef __i386__
mga_flush_write_combine();
+#endif
MGA_WRITE(MGAREG_PRIMADDRESS, phys_head | TT_GENERAL);
MGA_WRITE(MGAREG_PRIMEND, ((phys_head + num_dwords * 4) |