aboutsummaryrefslogtreecommitdiff
path: root/linux-core/via_mm.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas@tungstengraphics.com>2006-06-15 18:37:05 +0000
committerThomas Hellstrom <thomas@tungstengraphics.com>2006-06-15 18:37:05 +0000
commitca1a77683d523dc1d2268531b19ea23b3e1ae4f0 (patch)
tree44c16397e56d92df29317e11d73343a404762a66 /linux-core/via_mm.c
parent6c7faf5814547169dec2b865abf1f63b83aaeb05 (diff)
via:
-Remove out of memory error message. -Move sman cleanup from final_context to lastclose. -Add the P4VM800PRO (?) PCI ID.
Diffstat (limited to 'linux-core/via_mm.c')
-rw-r--r--linux-core/via_mm.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/linux-core/via_mm.c b/linux-core/via_mm.c
index 2881a1d1..7d520ea2 100644
--- a/linux-core/via_mm.c
+++ b/linux-core/via_mm.c
@@ -104,18 +104,26 @@ int via_final_context(struct drm_device *dev, int context)
drm_irq_uninstall(dev);
via_cleanup_futex(dev_priv);
via_do_cleanup_map(dev);
-
- down(&dev->struct_sem);
- drm_sman_cleanup(&dev_priv->sman);
- dev_priv->vram_initialized = FALSE;
- dev_priv->agp_initialized = FALSE;
- up(&dev->struct_sem);
}
#endif
-
return 1;
}
+void via_lastclose(struct drm_device *dev)
+{
+ drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
+
+ if (!dev_priv)
+ return;
+
+ down(&dev->struct_sem);
+ drm_sman_cleanup(&dev_priv->sman);
+ dev_priv->vram_initialized = FALSE;
+ dev_priv->agp_initialized = FALSE;
+ up(&dev->struct_sem);
+}
+
+
int via_mem_alloc(DRM_IOCTL_ARGS)
{
DRM_DEVICE;
@@ -156,7 +164,7 @@ int via_mem_alloc(DRM_IOCTL_ARGS)
mem.offset = 0;
mem.size = 0;
mem.index = 0;
- DRM_ERROR("Video memory allocation failed\n");
+ DRM_DEBUG("Video memory allocation failed\n");
retval = DRM_ERR(ENOMEM);
}
DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, sizeof(mem));
@@ -182,6 +190,9 @@ int via_mem_free(DRM_IOCTL_ARGS)
return ret;
}
+
+
+
void via_reclaim_buffers_locked(drm_device_t * dev, struct file *filp)
{
drm_via_private_t *dev_priv = dev->dev_private;