summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-04-10 08:15:48 +0000
committerDave Airlie <airlied@linux.ie>2004-04-10 08:15:48 +0000
commite375a3dc10eb8945e05577df8b40072dfffaba81 (patch)
treedc50125a62407230a26972c87a5ca9794bd1764a
parent23ec8875fce631e4554a72161937dca735c2d675 (diff)
patch from Andrew Morton tree from Arjan van de Ven fixes some oopses seen
with 4G/4G split
-rw-r--r--linux-core/i810_dma.c9
-rw-r--r--linux-core/i830_dma.c8
-rw-r--r--linux/i810_dma.c9
-rw-r--r--linux/i830_dma.c8
4 files changed, 18 insertions, 16 deletions
diff --git a/linux-core/i810_dma.c b/linux-core/i810_dma.c
index 6e7dc898..651b0808 100644
--- a/linux-core/i810_dma.c
+++ b/linux-core/i810_dma.c
@@ -244,7 +244,7 @@ int i810_dma_cleanup(drm_device_t *dev)
* may not have been called from userspace and after dev_private
* is freed, it's too late.
*/
- if (dev->irq_enabled) DRM(irq_uninstall)(dev);
+ if ( dev->irq_enabled ) DRM(irq_uninstall)(dev);
#endif
if (dev->dev_private) {
@@ -851,11 +851,12 @@ static void i810_dma_dispatch_vertex(drm_device_t *dev,
if (buf_priv->currently_mapped == I810_BUF_MAPPED) {
unsigned int prim = (sarea_priv->vertex_prim & PR_MASK);
- *(u32 *)buf_priv->virtual = (GFX_OP_PRIMITIVE | prim |
- ((used/4)-2));
+ DRM_PUT_USER_UNCHECKED((u32 *)buf_priv->virtual,
+ (GFX_OP_PRIMITIVE | prim |
+ ((used/4)-2)));
if (used & 4) {
- *(u32 *)((u32)buf_priv->virtual + used) = 0;
+ DRM_PUT_USER_UNCHECKED((u32 *)((u32)buf_priv->virtual + used), 0);
used += 4;
}
diff --git a/linux-core/i830_dma.c b/linux-core/i830_dma.c
index 626f84be..c2fd8c26 100644
--- a/linux-core/i830_dma.c
+++ b/linux-core/i830_dma.c
@@ -1173,17 +1173,17 @@ static void i830_dma_dispatch_vertex(drm_device_t *dev,
if (buf_priv->currently_mapped == I830_BUF_MAPPED) {
u32 *vp = buf_priv->virtual;
- vp[0] = (GFX_OP_PRIMITIVE |
+ DRM_PUT_USER_UNCHECKED(&vp[0], (GFX_OP_PRIMITIVE |
sarea_priv->vertex_prim |
- ((used/4)-2));
+ ((used/4)-2)));
if (dev_priv->use_mi_batchbuffer_start) {
- vp[used/4] = MI_BATCH_BUFFER_END;
+ DRM_PUT_USER_UNCHECKED(&vp[used/4], MI_BATCH_BUFFER_END);
used += 4;
}
if (used & 4) {
- vp[used/4] = 0;
+ DRM_PUT_USER_UNCHECKED(&vp[used/4], 0);
used += 4;
}
diff --git a/linux/i810_dma.c b/linux/i810_dma.c
index 6e7dc898..651b0808 100644
--- a/linux/i810_dma.c
+++ b/linux/i810_dma.c
@@ -244,7 +244,7 @@ int i810_dma_cleanup(drm_device_t *dev)
* may not have been called from userspace and after dev_private
* is freed, it's too late.
*/
- if (dev->irq_enabled) DRM(irq_uninstall)(dev);
+ if ( dev->irq_enabled ) DRM(irq_uninstall)(dev);
#endif
if (dev->dev_private) {
@@ -851,11 +851,12 @@ static void i810_dma_dispatch_vertex(drm_device_t *dev,
if (buf_priv->currently_mapped == I810_BUF_MAPPED) {
unsigned int prim = (sarea_priv->vertex_prim & PR_MASK);
- *(u32 *)buf_priv->virtual = (GFX_OP_PRIMITIVE | prim |
- ((used/4)-2));
+ DRM_PUT_USER_UNCHECKED((u32 *)buf_priv->virtual,
+ (GFX_OP_PRIMITIVE | prim |
+ ((used/4)-2)));
if (used & 4) {
- *(u32 *)((u32)buf_priv->virtual + used) = 0;
+ DRM_PUT_USER_UNCHECKED((u32 *)((u32)buf_priv->virtual + used), 0);
used += 4;
}
diff --git a/linux/i830_dma.c b/linux/i830_dma.c
index 626f84be..c2fd8c26 100644
--- a/linux/i830_dma.c
+++ b/linux/i830_dma.c
@@ -1173,17 +1173,17 @@ static void i830_dma_dispatch_vertex(drm_device_t *dev,
if (buf_priv->currently_mapped == I830_BUF_MAPPED) {
u32 *vp = buf_priv->virtual;
- vp[0] = (GFX_OP_PRIMITIVE |
+ DRM_PUT_USER_UNCHECKED(&vp[0], (GFX_OP_PRIMITIVE |
sarea_priv->vertex_prim |
- ((used/4)-2));
+ ((used/4)-2)));
if (dev_priv->use_mi_batchbuffer_start) {
- vp[used/4] = MI_BATCH_BUFFER_END;
+ DRM_PUT_USER_UNCHECKED(&vp[used/4], MI_BATCH_BUFFER_END);
used += 4;
}
if (used & 4) {
- vp[used/4] = 0;
+ DRM_PUT_USER_UNCHECKED(&vp[used/4], 0);
used += 4;
}