diff options
Diffstat (limited to 'drivers/char/drm/drm_drv.c')
-rw-r--r-- | drivers/char/drm/drm_drv.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c index b366c5b1bd16..a70af0de4453 100644 --- a/drivers/char/drm/drm_drv.c +++ b/drivers/char/drm/drm_drv.c | |||
@@ -116,6 +116,8 @@ static drm_ioctl_desc_t drm_ioctls[] = { | |||
116 | [DRM_IOCTL_NR(DRM_IOCTL_SG_FREE)] = {drm_sg_free, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY}, | 116 | [DRM_IOCTL_NR(DRM_IOCTL_SG_FREE)] = {drm_sg_free, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY}, |
117 | 117 | ||
118 | [DRM_IOCTL_NR(DRM_IOCTL_WAIT_VBLANK)] = {drm_wait_vblank, 0}, | 118 | [DRM_IOCTL_NR(DRM_IOCTL_WAIT_VBLANK)] = {drm_wait_vblank, 0}, |
119 | |||
120 | [DRM_IOCTL_NR(DRM_IOCTL_UPDATE_DRAW)] = {drm_update_drawable_info, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY}, | ||
119 | }; | 121 | }; |
120 | 122 | ||
121 | #define DRIVER_IOCTL_COUNT ARRAY_SIZE( drm_ioctls ) | 123 | #define DRIVER_IOCTL_COUNT ARRAY_SIZE( drm_ioctls ) |
@@ -151,6 +153,18 @@ int drm_lastclose(drm_device_t * dev) | |||
151 | if (dev->irq_enabled) | 153 | if (dev->irq_enabled) |
152 | drm_irq_uninstall(dev); | 154 | drm_irq_uninstall(dev); |
153 | 155 | ||
156 | /* Free drawable information memory */ | ||
157 | for (i = 0; i < dev->drw_bitfield_length / sizeof(*dev->drw_bitfield); | ||
158 | i++) { | ||
159 | drm_drawable_info_t *info = drm_get_drawable_info(dev, i); | ||
160 | |||
161 | if (info) { | ||
162 | drm_free(info->rects, info->num_rects * | ||
163 | sizeof(drm_clip_rect_t), DRM_MEM_BUFS); | ||
164 | drm_free(info, sizeof(*info), DRM_MEM_BUFS); | ||
165 | } | ||
166 | } | ||
167 | |||
154 | mutex_lock(&dev->struct_mutex); | 168 | mutex_lock(&dev->struct_mutex); |
155 | del_timer(&dev->timer); | 169 | del_timer(&dev->timer); |
156 | 170 | ||