aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2005-10-20 18:49:00 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-21 15:18:09 -0400
commite29971f9a4ca08c3c31b98be96c293ef9f7dcc32 (patch)
tree9542decf5a838b36bee07fd5961e059d328da128 /drivers
parent5d96551541a8f5521dcc8c634a18d42a3d349ec9 (diff)
[PATCH] drm: another mga bug
The wrong state emission routines were being called for G550, and consistent maps weren't correctly mapped... Signed-off-by: Dave Airlie <airlied@linux.ie> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/drm/drm_vm.c3
-rw-r--r--drivers/char/drm/mga_drv.h2
-rw-r--r--drivers/char/drm/mga_state.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c
index ced4215e2275..39ea96e42c5b 100644
--- a/drivers/char/drm/drm_vm.c
+++ b/drivers/char/drm/drm_vm.c
@@ -148,7 +148,8 @@ static __inline__ struct page *drm_do_vm_shm_nopage(struct vm_area_struct *vma,
148 148
149 offset = address - vma->vm_start; 149 offset = address - vma->vm_start;
150 i = (unsigned long)map->handle + offset; 150 i = (unsigned long)map->handle + offset;
151 page = vmalloc_to_page((void *)i); 151 page = (map->type == _DRM_CONSISTENT) ?
152 virt_to_page((void *)i) : vmalloc_to_page((void *)i);
152 if (!page) 153 if (!page)
153 return NOPAGE_OOM; 154 return NOPAGE_OOM;
154 get_page(page); 155 get_page(page);
diff --git a/drivers/char/drm/mga_drv.h b/drivers/char/drm/mga_drv.h
index b22fdbd4f830..6059c5a5b105 100644
--- a/drivers/char/drm/mga_drv.h
+++ b/drivers/char/drm/mga_drv.h
@@ -227,7 +227,7 @@ static inline u32 _MGA_READ(u32 *addr)
227#define MGA_EMIT_STATE( dev_priv, dirty ) \ 227#define MGA_EMIT_STATE( dev_priv, dirty ) \
228do { \ 228do { \
229 if ( (dirty) & ~MGA_UPLOAD_CLIPRECTS ) { \ 229 if ( (dirty) & ~MGA_UPLOAD_CLIPRECTS ) { \
230 if ( dev_priv->chipset == MGA_CARD_TYPE_G400 ) { \ 230 if ( dev_priv->chipset >= MGA_CARD_TYPE_G400 ) { \
231 mga_g400_emit_state( dev_priv ); \ 231 mga_g400_emit_state( dev_priv ); \
232 } else { \ 232 } else { \
233 mga_g200_emit_state( dev_priv ); \ 233 mga_g200_emit_state( dev_priv ); \
diff --git a/drivers/char/drm/mga_state.c b/drivers/char/drm/mga_state.c
index 05bbb4719376..6ac5e006226f 100644
--- a/drivers/char/drm/mga_state.c
+++ b/drivers/char/drm/mga_state.c
@@ -53,7 +53,7 @@ static void mga_emit_clip_rect( drm_mga_private_t *dev_priv,
53 53
54 /* Force reset of DWGCTL on G400 (eliminates clip disable bit). 54 /* Force reset of DWGCTL on G400 (eliminates clip disable bit).
55 */ 55 */
56 if (dev_priv->chipset == MGA_CARD_TYPE_G400) { 56 if (dev_priv->chipset >= MGA_CARD_TYPE_G400) {
57 DMA_BLOCK(MGA_DWGCTL, ctx->dwgctl, 57 DMA_BLOCK(MGA_DWGCTL, ctx->dwgctl,
58 MGA_LEN + MGA_EXEC, 0x80000000, 58 MGA_LEN + MGA_EXEC, 0x80000000,
59 MGA_DWGCTL, ctx->dwgctl, 59 MGA_DWGCTL, ctx->dwgctl,