Lines Matching refs:dev
32 __FBSDID("$FreeBSD: releng/11.0/sys/dev/drm/drm_ioctl.c 183833 2008-10-13 18:03:27Z rnoland $");
39 #include "dev/drm/drmP.h"
47 int drm_getunique(struct drm_device *dev, void *data,
52 if (u->unique_len >= dev->unique_len) {
53 if (DRM_COPY_TO_USER(u->unique, dev->unique, dev->unique_len))
56 u->unique_len = dev->unique_len;
64 int drm_setunique(struct drm_device *dev, void *data,
96 if ((domain != dev->pci_domain) ||
97 (bus != dev->pci_bus) ||
98 (slot != dev->pci_slot) ||
99 (func != dev->pci_func)) {
106 if (dev->unique_len || dev->unique) {
111 dev->unique_len = u->unique_len;
112 dev->unique = busid;
120 drm_set_busid(struct drm_device *dev)
125 if (dev->unique != NULL) {
130 dev->unique_len = 20;
131 dev->unique = malloc(dev->unique_len + 1, DRM_MEM_DRIVER, M_NOWAIT);
132 if (dev->unique == NULL) {
137 snprintf(dev->unique, dev->unique_len, "pci:%04x:%02x:%02x.%1x",
138 dev->pci_domain, dev->pci_bus, dev->pci_slot, dev->pci_func);
145 int drm_getmap(struct drm_device *dev, void *data, struct drm_file *file_priv)
160 TAILQ_FOREACH(mapinlist, &dev->maplist, link) {
181 int drm_getclient(struct drm_device *dev, void *data,
191 TAILQ_FOREACH(pt, &dev->files, link) {
208 int drm_getstats(struct drm_device *dev, void *data, struct drm_file *file_priv)
217 for (i = 0; i < dev->counters; i++) {
218 if (dev->types[i] == _DRM_STAT_LOCK)
220 (dev->lock.hw_lock ? dev->lock.hw_lock->lock : 0);
222 stats->data[i].value = atomic_read(&dev->counts[i]);
223 stats->data[i].type = dev->types[i];
226 stats->count = dev->counters;
236 int drm_setversion(struct drm_device *dev, void *data,
249 sv->drm_dd_major = dev->driver->major;
250 sv->drm_dd_minor = dev->driver->minor;
259 dev->if_version = DRM_MAX(if_version, dev->if_version);
264 drm_set_busid(dev);
269 if (ver.drm_dd_major != dev->driver->major ||
271 ver.drm_dd_minor > dev->driver->minor)
281 int drm_noop(struct drm_device *dev, void *data, struct drm_file *file_priv)