via:
authorThomas Hellstrom <thomas@tungstengraphics.com>
Thu, 15 Jun 2006 18:37:05 +0000 (18:37 +0000)
committerThomas Hellstrom <thomas@tungstengraphics.com>
Thu, 15 Jun 2006 18:37:05 +0000 (18:37 +0000)
-Remove out of memory error message.
-Move sman cleanup from final_context to lastclose.
-Add the P4VM800PRO (?) PCI ID.

linux-core/via_mm.c
shared-core/drm_pciids.txt
shared-core/via_drm.h
shared-core/via_drv.c
shared-core/via_drv.h

index 2881a1d..7d520ea 100644 (file)
@@ -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;
index c1289c3..a86e4a2 100644 (file)
 0x1106 0x3122 0 "VIA CLE266"
 0x1106 0x7205 0 "VIA KM400"
 0x1106 0x3108 0 "VIA K8M800"
+0x1106 0x3344 0 "VIA P4VM800PRO"
 
 [i810]
 0x8086 0x7121 0 "Intel i810 GMCH"
index 4be7e24..cd3d566 100644 (file)
  * backwards incompatibilities, (which should be avoided whenever possible).
  */
 
-#define VIA_DRM_DRIVER_DATE            "20060528"
+#define VIA_DRM_DRIVER_DATE            "20060615"
 
 #define VIA_DRM_DRIVER_MAJOR           2
 #define VIA_DRM_DRIVER_MINOR           10
-#define VIA_DRM_DRIVER_PATCHLEVEL      0
+#define VIA_DRM_DRIVER_PATCHLEVEL      1
 #define VIA_DRM_DRIVER_VERSION          (((VIA_DRM_DRIVER_MAJOR) << 16) | (VIA_DRM_DRIVER_MINOR))
 
 #define VIA_NR_SAREA_CLIPRECTS                 8
index a7509cf..bacfe37 100644 (file)
@@ -60,6 +60,7 @@ static struct drm_driver driver = {
        .reclaim_buffers = drm_core_reclaim_buffers,
 #ifdef VIA_HAVE_CORE_MM
        .reclaim_buffers_locked = via_reclaim_buffers_locked,
+       .lastclose = via_lastclose,
 #endif
        .get_map_ofs = drm_core_get_map_ofs,
        .get_reg_ofs = drm_core_get_reg_ofs,
index 2e9e10c..86cd049 100644 (file)
@@ -153,6 +153,7 @@ extern int via_driver_irq_wait(drm_device_t * dev, unsigned int irq,
 
 #ifdef VIA_HAVE_CORE_MM
 extern void via_reclaim_buffers_locked(drm_device_t *dev, struct file *filp);
+extern void via_lastclose(drm_device_t *dev);
 #else
 extern int via_init_context(drm_device_t * dev, int context);
 #endif