mirror of
https://github.com/torvalds/linux
synced 2024-09-22 03:55:39 +00:00
drm/legacy: move map cleanups into drm_bufs.c
This makes it easier to clean this up later. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
15e60851e1
commit
35a280219b
|
@ -584,6 +584,14 @@ void drm_legacy_master_rmmaps(struct drm_device *dev, struct drm_master *master)
|
||||||
mutex_unlock(&dev->struct_mutex);
|
mutex_unlock(&dev->struct_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void drm_legacy_rmmaps(struct drm_device *dev)
|
||||||
|
{
|
||||||
|
struct drm_map_list *r_list, *list_temp;
|
||||||
|
|
||||||
|
list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
|
||||||
|
drm_legacy_rmmap(dev, r_list->map);
|
||||||
|
}
|
||||||
|
|
||||||
/* The rmmap ioctl appears to be unnecessary. All mappings are torn down on
|
/* The rmmap ioctl appears to be unnecessary. All mappings are torn down on
|
||||||
* the last close of the device, and this is necessary for cleanup when things
|
* the last close of the device, and this is necessary for cleanup when things
|
||||||
* exit uncleanly. Therefore, having userland manually remove mappings seems
|
* exit uncleanly. Therefore, having userland manually remove mappings seems
|
||||||
|
|
|
@ -1038,8 +1038,6 @@ EXPORT_SYMBOL(drm_dev_register);
|
||||||
*/
|
*/
|
||||||
void drm_dev_unregister(struct drm_device *dev)
|
void drm_dev_unregister(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
struct drm_map_list *r_list, *list_temp;
|
|
||||||
|
|
||||||
if (drm_core_check_feature(dev, DRIVER_LEGACY))
|
if (drm_core_check_feature(dev, DRIVER_LEGACY))
|
||||||
drm_lastclose(dev);
|
drm_lastclose(dev);
|
||||||
|
|
||||||
|
@ -1056,8 +1054,7 @@ void drm_dev_unregister(struct drm_device *dev)
|
||||||
if (dev->agp)
|
if (dev->agp)
|
||||||
drm_pci_agp_destroy(dev);
|
drm_pci_agp_destroy(dev);
|
||||||
|
|
||||||
list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
|
drm_legacy_rmmaps(dev);
|
||||||
drm_legacy_rmmap(dev, r_list->map);
|
|
||||||
|
|
||||||
remove_compat_control_link(dev);
|
remove_compat_control_link(dev);
|
||||||
drm_minor_unregister(dev, DRM_MINOR_PRIMARY);
|
drm_minor_unregister(dev, DRM_MINOR_PRIMARY);
|
||||||
|
|
|
@ -83,6 +83,7 @@ int __drm_legacy_mapbufs(struct drm_device *, void *, int *,
|
||||||
|
|
||||||
void drm_legacy_master_rmmaps(struct drm_device *dev,
|
void drm_legacy_master_rmmaps(struct drm_device *dev,
|
||||||
struct drm_master *master);
|
struct drm_master *master);
|
||||||
|
void drm_legacy_rmmaps(struct drm_device *dev);
|
||||||
|
|
||||||
#ifdef CONFIG_DRM_VM
|
#ifdef CONFIG_DRM_VM
|
||||||
void drm_legacy_vma_flush(struct drm_device *d);
|
void drm_legacy_vma_flush(struct drm_device *d);
|
||||||
|
|
Loading…
Reference in a new issue