Lines Matching refs:dev
37 __FBSDID("$FreeBSD: releng/11.0/sys/dev/drm2/drm_ioctl.c 280183 2015-03-17 18:50:33Z dumbbell $");
39 #include <dev/drm2/drmP.h>
40 #include <dev/drm2/drm_core.h>
53 int drm_getunique(struct drm_device *dev, void *data,
69 drm_unset_busid(struct drm_device *dev,
93 int drm_setunique(struct drm_device *dev, void *data,
106 if (!dev->driver->bus->set_unique)
109 ret = dev->driver->bus->set_unique(dev, master, u);
116 drm_unset_busid(dev, master);
120 static int drm_set_busid(struct drm_device *dev, struct drm_file *file_priv)
126 drm_unset_busid(dev, master);
128 ret = dev->driver->bus->set_busid(dev, master);
133 drm_unset_busid(dev, master);
150 int drm_getmap(struct drm_device *dev, void *data,
164 DRM_LOCK(dev);
165 list_for_each(list, &dev->maplist) {
173 DRM_UNLOCK(dev);
183 DRM_UNLOCK(dev);
201 int drm_getclient(struct drm_device *dev, void *data,
212 DRM_LOCK(dev);
213 list_for_each_entry(pt, &dev->filelist, lhead) {
220 DRM_UNLOCK(dev);
225 DRM_UNLOCK(dev);
240 int drm_getstats(struct drm_device *dev, void *data,
248 for (i = 0; i < dev->counters; i++) {
249 if (dev->types[i] == _DRM_STAT_LOCK)
253 stats->data[i].value = atomic_read(&dev->counts[i]);
254 stats->data[i].type = dev->types[i];
257 stats->count = dev->counters;
265 int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
272 if (dev->driver->dumb_create)
279 req->value = dev->mode_config.preferred_depth;
282 req->value = dev->mode_config.prefer_shadow;
285 req->value |= false /* XXXKIB dev->driver->prime_fd_to_handle */ ? DRM_PRIME_CAP_IMPORT : 0;
286 req->value |= false /* XXXKIB dev->driver->prime_handle_to_fd */ ? DRM_PRIME_CAP_EXPORT : 0;
308 int drm_setversion(struct drm_device *dev, void *data, struct drm_file *file_priv)
321 dev->if_version = max(if_version, dev->if_version);
327 retcode = drm_set_busid(dev, file_priv);
334 if (sv->drm_dd_major != dev->driver->major ||
336 dev->driver->minor) {
341 if (dev->driver->set_version)
342 dev->driver->set_version(dev, sv);
348 sv->drm_dd_major = dev->driver->major;
349 sv->drm_dd_minor = dev->driver->minor;
355 int drm_noop(struct drm_device *dev, void *data,