Lines Matching defs:minor
57 struct drm_minor *minor = node->minor;
58 struct drm_device *dev = minor->dev;
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)
92 struct drm_device *dev = minor->dev;
95 INIT_LIST_HEAD(&minor->debugfs_list);
96 mutex_init(&minor->debugfs_lock);
98 minor->debugfs_root = debugfs_create_dir(name, accel_debugfs_root);
101 minor->debugfs_root, minor);
104 dev->driver->debugfs_init(minor);
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)
175 idr_replace(&accel_minors_idr, minor, index);
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;
196 minor = idr_find(&accel_minors_idr, minor_id);
197 if (minor)
198 drm_dev_get(minor->dev);
201 if (!minor) {
203 } else if (drm_dev_is_unplugged(minor->dev)) {
204 drm_dev_put(minor->dev);
208 return minor;
211 static void accel_minor_release(struct drm_minor *minor)
213 drm_dev_put(minor->dev);
230 struct drm_minor *minor;
233 minor = accel_minor_acquire(iminor(inode));
234 if (IS_ERR(minor))
235 return PTR_ERR(minor);
237 dev = minor->dev;
244 retcode = drm_open_helper(filp, minor);
252 accel_minor_release(minor);
260 struct drm_minor *minor;
263 minor = accel_minor_acquire(iminor(inode));
264 if (IS_ERR(minor))
265 return PTR_ERR(minor);
267 new_fops = fops_get(minor->dev->driver->fops);
280 accel_minor_release(minor);