Lines Matching full:minor
57 struct drm_minor *minor = node->minor; in accel_name_info() local
58 struct drm_device *dev = minor->dev; in accel_name_info()
82 * accel_debugfs_init() - Initialize debugfs for accel minor
83 * @minor: Pointer to the drm_minor instance.
84 * @minor_id: The minor's id
86 * This function initializes the drm minor's debugfs members and creates
87 * a root directory for the minor in debugfs. It also creates common files
90 void accel_debugfs_init(struct drm_minor *minor, int minor_id) in accel_debugfs_init() argument
92 struct drm_device *dev = minor->dev; in accel_debugfs_init()
95 INIT_LIST_HEAD(&minor->debugfs_list); in accel_debugfs_init()
96 mutex_init(&minor->debugfs_lock); in accel_debugfs_init()
98 minor->debugfs_root = debugfs_create_dir(name, accel_debugfs_root); in accel_debugfs_init()
101 minor->debugfs_root, minor); in accel_debugfs_init()
104 dev->driver->debugfs_init(minor); in accel_debugfs_init()
110 * @index: The minor's index
113 * the device's minor number. In addition, it sets the class and type of the
124 * accel_minor_alloc() - Allocates a new accel minor
127 * a new id to represent a new accel minor
144 * accel_minor_remove() - Remove an accel minor
145 * @index: The minor id to remove.
160 * accel_minor_replace() - Replace minor pointer in accel minors idr.
161 * @minor: Pointer to the new minor.
162 * @index: The minor id to replace.
165 * that is associated with an existing id. Because the minor pointer can be
170 void accel_minor_replace(struct drm_minor *minor, int index) in accel_minor_replace() argument
175 idr_replace(&accel_minors_idr, minor, index); in accel_minor_replace()
180 * Looks up the given minor-ID and returns the respective DRM-minor object. The
186 * As long as you hold this minor, it is guaranteed that the object and the
187 * minor->dev pointer will stay valid! However, the device may get unplugged and
188 * unregistered while you hold the minor.
192 struct drm_minor *minor; in accel_minor_acquire() local
196 minor = idr_find(&accel_minors_idr, minor_id); in accel_minor_acquire()
197 if (minor) in accel_minor_acquire()
198 drm_dev_get(minor->dev); in accel_minor_acquire()
201 if (!minor) { in accel_minor_acquire()
203 } else if (drm_dev_is_unplugged(minor->dev)) { in accel_minor_acquire()
204 drm_dev_put(minor->dev); in accel_minor_acquire()
208 return minor; in accel_minor_acquire()
211 static void accel_minor_release(struct drm_minor *minor) in accel_minor_release() argument
213 drm_dev_put(minor->dev); in accel_minor_release()
230 struct drm_minor *minor; in accel_open() local
233 minor = accel_minor_acquire(iminor(inode)); in accel_open()
234 if (IS_ERR(minor)) in accel_open()
235 return PTR_ERR(minor); in accel_open()
237 dev = minor->dev; in accel_open()
244 retcode = drm_open_helper(filp, minor); in accel_open()
252 accel_minor_release(minor); in accel_open()
260 struct drm_minor *minor; in accel_stub_open() local
263 minor = accel_minor_acquire(iminor(inode)); in accel_stub_open()
264 if (IS_ERR(minor)) in accel_stub_open()
265 return PTR_ERR(minor); in accel_stub_open()
267 new_fops = fops_get(minor->dev->driver->fops); in accel_stub_open()
280 accel_minor_release(minor); in accel_stub_open()