-Remove out of memory error message.
-Move sman cleanup from final_context to lastclose.
-Add the P4VM800PRO (?) PCI ID.
This commit is contained in:
Thomas Hellstrom 2006-06-15 18:37:05 +00:00
parent 6c7faf5814
commit ca1a77683d
5 changed files with 24 additions and 10 deletions

View 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;

View file

@ -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"

View file

@ -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

View 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,

View 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