Lines Matching refs:dev
32 __FBSDID("$FreeBSD: releng/11.0/sys/dev/drm/drm_drawable.c 183834 2008-10-13 18:06:33Z rnoland $");
39 #include "dev/drm/drmP.h"
62 drm_get_drawable_info(struct drm_device *dev, int handle)
67 result = RB_FIND(drawable_tree, &dev->drw_head, &find);
72 int drm_adddraw(struct drm_device *dev, void *data, struct drm_file *file_priv)
82 info->handle = alloc_unr(dev->drw_unrhdr);
83 DRM_SPINLOCK(&dev->drw_lock);
84 RB_INSERT(drawable_tree, &dev->drw_head, info);
86 DRM_SPINUNLOCK(&dev->drw_lock);
93 int drm_rmdraw(struct drm_device *dev, void *data, struct drm_file *file_priv)
98 DRM_SPINLOCK(&dev->drw_lock);
99 info = drm_get_drawable_info(dev, draw->handle);
101 RB_REMOVE(drawable_tree, &dev->drw_head,
103 DRM_SPINUNLOCK(&dev->drw_lock);
104 free_unr(dev->drw_unrhdr, draw->handle);
109 DRM_SPINUNLOCK(&dev->drw_lock);
114 int drm_update_draw(struct drm_device *dev, void *data,
121 info = drm_get_drawable_info(dev, update->handle);
127 DRM_SPINLOCK(&dev->drw_lock);
134 DRM_SPINUNLOCK(&dev->drw_lock);
141 DRM_SPINUNLOCK(&dev->drw_lock);
149 DRM_SPINUNLOCK(&dev->drw_lock);
156 void drm_drawable_free_all(struct drm_device *dev)
160 DRM_SPINLOCK(&dev->drw_lock);
161 for (info = RB_MIN(drawable_tree, &dev->drw_head);
163 next = RB_NEXT(drawable_tree, &dev->drw_head, info);
164 RB_REMOVE(drawable_tree, &dev->drw_head,
166 DRM_SPINUNLOCK(&dev->drw_lock);
167 free_unr(dev->drw_unrhdr, info->handle);
170 DRM_SPINLOCK(&dev->drw_lock);
172 DRM_SPINUNLOCK(&dev->drw_lock);