aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/via_mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/via_mm.c')
-rw-r--r--drivers/char/drm/via_mm.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/char/drm/via_mm.c b/drivers/char/drm/via_mm.c
index 13921f3c0ec2..3baddacdff26 100644
--- a/drivers/char/drm/via_mm.c
+++ b/drivers/char/drm/via_mm.c
@@ -81,7 +81,8 @@ int via_agp_init(DRM_IOCTL_ARGS)
81 81
82 AgpHeap = via_mmInit(agp.offset, agp.size); 82 AgpHeap = via_mmInit(agp.offset, agp.size);
83 83
84 DRM_DEBUG("offset = %lu, size = %lu", (unsigned long)agp.offset, (unsigned long)agp.size); 84 DRM_DEBUG("offset = %lu, size = %lu", (unsigned long)agp.offset,
85 (unsigned long)agp.size);
85 86
86 return 0; 87 return 0;
87} 88}
@@ -97,7 +98,8 @@ int via_fb_init(DRM_IOCTL_ARGS)
97 98
98 FBHeap = via_mmInit(fb.offset, fb.size); 99 FBHeap = via_mmInit(fb.offset, fb.size);
99 100
100 DRM_DEBUG("offset = %lu, size = %lu", (unsigned long)fb.offset, (unsigned long)fb.size); 101 DRM_DEBUG("offset = %lu, size = %lu", (unsigned long)fb.offset,
102 (unsigned long)fb.size);
101 103
102 return 0; 104 return 0;
103} 105}
@@ -134,8 +136,8 @@ int via_init_context(struct drm_device *dev, int context)
134} 136}
135 137
136int via_final_context(struct drm_device *dev, int context) 138int via_final_context(struct drm_device *dev, int context)
137{ 139{
138 int i; 140 int i;
139 drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; 141 drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
140 142
141 for (i = 0; i < MAX_CONTEXT; i++) 143 for (i = 0; i < MAX_CONTEXT; i++)
@@ -171,14 +173,13 @@ int via_final_context(struct drm_device *dev, int context)
171 via_setDestroy(set); 173 via_setDestroy(set);
172 global_ppriv[i].used = 0; 174 global_ppriv[i].used = 0;
173 } 175 }
174 via_release_futex(dev_priv, context); 176 via_release_futex(dev_priv, context);
175 177
176
177#if defined(__linux__) 178#if defined(__linux__)
178 /* Linux specific until context tracking code gets ported to BSD */ 179 /* Linux specific until context tracking code gets ported to BSD */
179 /* Last context, perform cleanup */ 180 /* Last context, perform cleanup */
180 if (dev->ctx_count == 1 && dev->dev_private) { 181 if (dev->ctx_count == 1 && dev->dev_private) {
181 DRM_DEBUG("Last Context\n"); 182 DRM_DEBUG("Last Context\n");
182 if (dev->irq) 183 if (dev->irq)
183 drm_irq_uninstall(dev); 184 drm_irq_uninstall(dev);
184 185