Lines Matching defs:dev

108 	uint8_t		dev;
769 * \param dev major and minor numbers of the device.
776 * special file node with the major and minor numbers specified by \p dev and
779 static int drmOpenDevice(dev_t dev, int minor, int type)
819 mknod(buf, S_IFCHR | devmode, dev);
862 if (st.st_rdev != dev) {
866 mknod(buf, S_IFCHR | devmode, dev);
974 // If not in /dev/drm/ we have the type in the name
1170 * entry in /dev/dri is created if necessary and if called by root.
1190 * entry in /dev/dri is created if necessary and if called by root.
3266 snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device/drm",
3276 * in /dev/drm/ and links in /dev/dri while a WIP in kernel driver creates
3277 * only device nodes in /dev/dri/ */
3373 snprintf(buf, sizeof(buf), "/sys/dev/char/%d:%d/device/drm", maj, min);
3411 /* Handle both /dev/drm and /dev/dri
3413 * in /dev/drm/ and links in /dev/dri while a WIP in kernel driver creates
3414 * only device nodes in /dev/dri/ */
3563 snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device", maj, min);
3591 snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device", maj, min);
3611 unsigned int rdev, majmin, domain, bus, dev, func;
3651 nelem = sscanf(sysctl_val, bus_fmt, &domain, &bus, &dev, &func);
3656 info->dev = dev;
3666 unsigned int domain, bus, dev, func;
3676 num = sscanf(value, "%04x:%02x:%02x.%1u", &domain, &bus, &dev, &func);
3684 info->dev = dev;
3708 info->dev = pinfo.dev;
3895 fd = open("/dev/pci", O_RDONLY, 0);
3902 patterns[0].pc_sel.pc_dev = info.dev;
4040 drmDevicePtr dev;
4044 dev = drmDeviceAlloc(node_type, node, sizeof(drmPciBusInfo),
4046 if (!dev)
4049 dev->bustype = DRM_BUS_PCI;
4051 dev->businfo.pci = (drmPciBusInfoPtr)addr;
4053 ret = drmParsePciBusInfo(maj, min, dev->businfo.pci);
4060 dev->deviceinfo.pci = (drmPciDeviceInfoPtr)addr;
4062 ret = drmParsePciDeviceInfo(maj, min, dev->deviceinfo.pci, flags);
4067 *device = dev;
4072 free(dev);
4082 snprintf(path, len, "/sys/dev/char/%d:%d/device", maj, min);
4125 unsigned int bus, dev;
4146 ret = sscanf(value, "%03u", &dev);
4153 info->dev = dev;
4197 drmDevicePtr dev;
4201 dev = drmDeviceAlloc(node_type, node, sizeof(drmUsbBusInfo),
4203 if (!dev)
4206 dev->bustype = DRM_BUS_USB;
4208 dev->businfo.usb = (drmUsbBusInfoPtr)ptr;
4210 ret = drmParseUsbBusInfo(maj, min, dev->businfo.usb);
4216 dev->deviceinfo.usb = (drmUsbDeviceInfoPtr)ptr;
4218 ret = drmParseUsbDeviceInfo(maj, min, dev->deviceinfo.usb);
4223 *device = dev;
4228 free(dev);
4237 snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device", maj, min);
4274 snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device", maj, min);
4332 drmDevicePtr dev;
4336 dev = drmDeviceAlloc(node_type, node, sizeof(drmPlatformBusInfo),
4338 if (!dev)
4341 dev->bustype = DRM_BUS_PLATFORM;
4343 dev->businfo.platform = (drmPlatformBusInfoPtr)ptr;
4345 ret = drmParseOFBusInfo(maj, min, dev->businfo.platform->fullname);
4351 dev->deviceinfo.platform = (drmPlatformDeviceInfoPtr)ptr;
4353 ret = drmParseOFDeviceInfo(maj, min, &dev->deviceinfo.platform->compatible);
4358 *device = dev;
4363 free(dev);
4372 drmDevicePtr dev;
4376 dev = drmDeviceAlloc(node_type, node, sizeof(drmHost1xBusInfo),
4378 if (!dev)
4381 dev->bustype = DRM_BUS_HOST1X;
4383 dev->businfo.host1x = (drmHost1xBusInfoPtr)ptr;
4385 ret = drmParseOFBusInfo(maj, min, dev->businfo.host1x->fullname);
4391 dev->deviceinfo.host1x = (drmHost1xDeviceInfoPtr)ptr;
4393 ret = drmParseOFDeviceInfo(maj, min, &dev->deviceinfo.host1x->compatible);
4398 *device = dev;
4403 free(dev);
4520 * in /dev along with a large number of statically generated /dev nodes.
4521 * Avoid stat'ing all of /dev needlessly by implementing this custom path.
4778 snprintf(path, sizeof(path), "/sys/dev/char/%d:%d", maj, min);
4784 snprintf(path, sizeof(path), "/dev/%s", value);