diff options
-rw-r--r-- | linux-core/via_mm.c | 27 | ||||
-rw-r--r-- | shared-core/drm_pciids.txt | 1 | ||||
-rw-r--r-- | shared-core/via_drm.h | 4 | ||||
-rw-r--r-- | shared-core/via_drv.c | 1 | ||||
-rw-r--r-- | shared-core/via_drv.h | 1 |
5 files changed, 24 insertions, 10 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; diff --git a/shared-core/drm_pciids.txt b/shared-core/drm_pciids.txt index c1289c3e..a86e4a24 100644 --- a/shared-core/drm_pciids.txt +++ b/shared-core/drm_pciids.txt @@ -217,6 +217,7 @@ 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" diff --git a/shared-core/via_drm.h b/shared-core/via_drm.h index 4be7e249..cd3d5666 100644 --- a/shared-core/via_drm.h +++ b/shared-core/via_drm.h @@ -42,11 +42,11 @@ * 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 diff --git a/shared-core/via_drv.c b/shared-core/via_drv.c index a7509cff..bacfe37d 100644 --- a/shared-core/via_drv.c +++ b/shared-core/via_drv.c @@ -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, diff --git a/shared-core/via_drv.h b/shared-core/via_drv.h index 2e9e10c3..86cd049d 100644 --- a/shared-core/via_drv.h +++ b/shared-core/via_drv.h @@ -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 |