summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2001-05-04 09:30:14 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2001-05-04 09:30:14 +0000
commitdd61a633466cd98ad61b7082c8536b474e71e4bb (patch)
tree668261999cc21f6423671faa90de99fe847e684f
parentf412294c7c86c5349e7ab59d6a961b5f7949b9ac (diff)
linux compile fixes
-rw-r--r--linux-core/drm_drv.c3
-rw-r--r--linux-core/drm_os_linux.h1
-rw-r--r--linux/drm_drv.h3
-rw-r--r--linux/drm_os_linux.h1
-rw-r--r--linux/mga_dma.c4
-rw-r--r--linux/mga_drv.h3
-rw-r--r--linux/mga_state.c14
7 files changed, 15 insertions, 14 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index a95fc2eb..60a5a09c 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -127,8 +127,7 @@ static struct file_operations DRM(fops) = {
#include <sys/proc.h>
#include <machine/../linux/linux.h>
#include <machine/../linux/linux_proto.h>
-#include <compat/linux/linux_ioctl.h>
-#include <dev/drm/drm_linux.h>
+#include "drm_linux.h"
#endif
static int DRM(init)(device_t nbdev);
diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h
index 6bfc9d84..3c31a8dd 100644
--- a/linux-core/drm_os_linux.h
+++ b/linux-core/drm_os_linux.h
@@ -267,6 +267,7 @@ do { \
#define DRM_OS_DEVICE drm_file_t *priv = filp->private_data; \
drm_device_t *dev = priv->dev
#define DRM_OS_PRIV
+#define DRM_OS_DELAY(d) udelay(d)
#define DRM_OS_RETURN(v) return -v;
#define DRM_OS_CURRENTPID current->pid
#define DRM_OS_KRNTOUSR(arg1, arg2, arg3) \
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index a95fc2eb..60a5a09c 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -127,8 +127,7 @@ static struct file_operations DRM(fops) = {
#include <sys/proc.h>
#include <machine/../linux/linux.h>
#include <machine/../linux/linux_proto.h>
-#include <compat/linux/linux_ioctl.h>
-#include <dev/drm/drm_linux.h>
+#include "drm_linux.h"
#endif
static int DRM(init)(device_t nbdev);
diff --git a/linux/drm_os_linux.h b/linux/drm_os_linux.h
index 6bfc9d84..3c31a8dd 100644
--- a/linux/drm_os_linux.h
+++ b/linux/drm_os_linux.h
@@ -267,6 +267,7 @@ do { \
#define DRM_OS_DEVICE drm_file_t *priv = filp->private_data; \
drm_device_t *dev = priv->dev
#define DRM_OS_PRIV
+#define DRM_OS_DELAY(d) udelay(d)
#define DRM_OS_RETURN(v) return -v;
#define DRM_OS_CURRENTPID current->pid
#define DRM_OS_KRNTOUSR(arg1, arg2, arg3) \
diff --git a/linux/mga_dma.c b/linux/mga_dma.c
index 009f2c01..4c30811a 100644
--- a/linux/mga_dma.c
+++ b/linux/mga_dma.c
@@ -515,7 +515,7 @@ static int mga_do_init_dma( drm_device_t *dev, drm_mga_init_t *init )
break;
}
}
-#else
+#endif
DRM_FIND_MAP( dev_priv->fb, init->fb_offset );
DRM_FIND_MAP( dev_priv->mmio, init->mmio_offset );
@@ -771,7 +771,7 @@ int mga_dma_buffers( DRM_OS_IOCTL )
ret = 0;
}
- DRM_OS_KRNTOUSR( data, &d, sizeof(d) );
+ DRM_OS_KRNTOUSR( (drm_dma_t *) data, d, sizeof(d) );
return ret;
}
diff --git a/linux/mga_drv.h b/linux/mga_drv.h
index 5ebe595f..fa253545 100644
--- a/linux/mga_drv.h
+++ b/linux/mga_drv.h
@@ -143,6 +143,7 @@ extern int mga_warp_init( drm_device_t *dev );
#endif
#if defined( __FreeBSD__ )
#define mga_flush_write_combine() \
+{ \
int xchangeDummy; \
DRM_DEBUG("%s\n", __FUNCTION__); \
__asm__ volatile(" push %%eax ; xchg %%eax, %0 ; pop %%eax" : : "m" (xchangeDummy)); \
@@ -641,7 +642,7 @@ do { \
/* Simple idle test.
*/
-static inline int mga_is_idle( drm_mga_private_t *dev_priv )
+static __inline__ int mga_is_idle( drm_mga_private_t *dev_priv )
{
u32 status = MGA_READ( MGA_STATUS ) & MGA_ENGINE_IDLE_MASK;
return ( status == MGA_ENDPRDMASTS );
diff --git a/linux/mga_state.c b/linux/mga_state.c
index 16fe402f..253ab34a 100644
--- a/linux/mga_state.c
+++ b/linux/mga_state.c
@@ -69,7 +69,7 @@ static void mga_emit_clip_rect( drm_mga_private_t *dev_priv,
ADVANCE_DMA();
}
-static inline void mga_g200_emit_context( drm_mga_private_t *dev_priv )
+static __inline__ void mga_g200_emit_context( drm_mga_private_t *dev_priv )
{
drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_mga_context_regs_t *ctx = &sarea_priv->context_state;
@@ -95,7 +95,7 @@ static inline void mga_g200_emit_context( drm_mga_private_t *dev_priv )
ADVANCE_DMA();
}
-static inline void mga_g400_emit_context( drm_mga_private_t *dev_priv )
+static __inline__ void mga_g400_emit_context( drm_mga_private_t *dev_priv )
{
drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_mga_context_regs_t *ctx = &sarea_priv->context_state;
@@ -126,7 +126,7 @@ static inline void mga_g400_emit_context( drm_mga_private_t *dev_priv )
ADVANCE_DMA();
}
-static inline void mga_g200_emit_tex0( drm_mga_private_t *dev_priv )
+static __inline__ void mga_g200_emit_tex0( drm_mga_private_t *dev_priv )
{
drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_mga_texture_regs_t *tex = &sarea_priv->tex_state[0];
@@ -157,7 +157,7 @@ static inline void mga_g200_emit_tex0( drm_mga_private_t *dev_priv )
ADVANCE_DMA();
}
-static inline void mga_g400_emit_tex0( drm_mga_private_t *dev_priv )
+static __inline__ void mga_g400_emit_tex0( drm_mga_private_t *dev_priv )
{
drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_mga_texture_regs_t *tex = &sarea_priv->tex_state[0];
@@ -198,7 +198,7 @@ static inline void mga_g400_emit_tex0( drm_mga_private_t *dev_priv )
ADVANCE_DMA();
}
-static inline void mga_g400_emit_tex1( drm_mga_private_t *dev_priv )
+static __inline__ void mga_g400_emit_tex1( drm_mga_private_t *dev_priv )
{
drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_mga_texture_regs_t *tex = &sarea_priv->tex_state[1];
@@ -236,7 +236,7 @@ static inline void mga_g400_emit_tex1( drm_mga_private_t *dev_priv )
ADVANCE_DMA();
}
-static inline void mga_g200_emit_pipe( drm_mga_private_t *dev_priv )
+static __inline__ void mga_g200_emit_pipe( drm_mga_private_t *dev_priv )
{
drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv;
unsigned int pipe = sarea_priv->warp_pipe;
@@ -266,7 +266,7 @@ static inline void mga_g200_emit_pipe( drm_mga_private_t *dev_priv )
ADVANCE_DMA();
}
-static inline void mga_g400_emit_pipe( drm_mga_private_t *dev_priv )
+static __inline__ void mga_g400_emit_pipe( drm_mga_private_t *dev_priv )
{
drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv;
unsigned int pipe = sarea_priv->warp_pipe;