Lines Matching +full:m +full:- +full:class

1 // SPDX-License-Identifier: GPL-2.0
34 static const struct class accel_class = {
49 static int accel_name_info(struct seq_file *m, void *data) in accel_name_info() argument
51 struct drm_info_node *node = (struct drm_info_node *) m->private; in accel_name_info()
52 struct drm_minor *minor = node->minor; in accel_name_info()
53 struct drm_device *dev = minor->dev; in accel_name_info()
56 mutex_lock(&dev->master_mutex); in accel_name_info()
57 master = dev->master; in accel_name_info()
58 seq_printf(m, "%s", dev->driver->name); in accel_name_info()
59 if (dev->dev) in accel_name_info()
60 seq_printf(m, " dev=%s", dev_name(dev->dev)); in accel_name_info()
61 if (master && master->unique) in accel_name_info()
62 seq_printf(m, " master=%s", master->unique); in accel_name_info()
63 if (dev->unique) in accel_name_info()
64 seq_printf(m, " unique=%s", dev->unique); in accel_name_info()
65 seq_puts(m, "\n"); in accel_name_info()
66 mutex_unlock(&dev->master_mutex); in accel_name_info()
77 * accel_debugfs_init() - Initialize debugfs for device
88 * accel_debugfs_register() - Register debugfs for device
95 struct drm_minor *minor = dev->accel; in accel_debugfs_register()
97 minor->debugfs_root = dev->debugfs_root; in accel_debugfs_register()
100 dev->debugfs_root, minor); in accel_debugfs_register()
104 * accel_set_device_instance_params() - Set some device parameters for accel device
109 * the device's minor number. In addition, it sets the class and type of the
110 * device instance to the accel sysfs class and device type, respectively.
114 kdev->devt = MKDEV(ACCEL_MAJOR, index); in accel_set_device_instance_params()
115 kdev->class = &accel_class; in accel_set_device_instance_params()
116 kdev->type = &accel_sysfs_device_minor; in accel_set_device_instance_params()
120 * accel_open - open method for ACCEL file
125 * It looks up the correct ACCEL device and instantiates all the per-file
140 dev = minor->dev; in accel_open()
142 atomic_fetch_inc(&dev->open_count); in accel_open()
144 /* share address_space across all char-devs of a single device */ in accel_open()
145 filp->f_mapping = dev->anon_inode->i_mapping; in accel_open()
154 atomic_dec(&dev->open_count); in accel_open()
170 new_fops = fops_get(minor->dev->driver->fops); in accel_stub_open()
172 err = -ENODEV; in accel_stub_open()
177 if (filp->f_op->open) in accel_stub_open()
178 err = filp->f_op->open(inode, filp); in accel_stub_open()
208 DRM_ERROR("Cannot create ACCEL class: %d\n", ret); in accel_core_init()