Hi Thierry, On 23 December 2016 at 17:49, Thierry Reding <thierry.reding@xxxxxxxxx> wrote: > Allow DRM/KMS devices hosted on USB to be detected by the drmDevice > infrastructure. > > Signed-off-by: Thierry Reding <thierry.reding@xxxxxxxxx> > --- > Note that this is completely untested because I don't have a UDL device > for testing. I'm fairly confident that this will work, though, and it'd > be nice to include it before the new platform and host1x busses because > support for it existed in the kernel longer than for platform devices. > Functionality looks spot on, but I'm a bit hesitant to get this in without any testing. Can we please extend tests/drmdevice.c (separate patch?) as poke someone on dri-devel/xorg-devel to give it a quick run ? > +static int drmParseUsbDeviceInfo(int maj, int min, drmUsbDeviceInfoPtr info) > +{ > + char path[PATH_MAX + 1], *value; > + unsigned int vendor, product; > + int ret; > + > + snprintf(path, PATH_MAX, "/sys/dev/char/%d:%d/device", maj, min); > + > + value = sysfs_uevent_get(path, "PRODUCT"); > + ret = sscanf(value, "%x/%x", &vendor, &product); > + free(value); > + > + if (ret <= 0) > + return -errno; > + > + info->vendor = vendor; > + info->product = product; > + Worth fetching bcdDevice as well ? Thanks Emil _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel