Lines Matching defs:device
304 " b - Specify device's PCI bus id to run tests\n"
305 " d - Specify device's PCI device id to run tests (optional)\n"
313 * Return the number of AMD device opened.
339 /* If this is not PCI device, skip*/
404 drmDevicePtr device;
406 /* Open the first AMD device to print driver information. */
412 perror("Cannot get version for AMDGPU device");
426 &device) == 0) {
427 if (device->bustype == DRM_BUS_PCI) {
430 device->businfo.pci->domain);
432 device->businfo.pci->bus);
433 printf(" device:%02x",
434 device->businfo.pci->dev);
436 device->businfo.pci->func);
438 device->deviceinfo.pci->vendor_id);
440 device->deviceinfo.pci->device_id);
442 device->deviceinfo.pci->subvendor_id);
444 device->deviceinfo.pci->subdevice_id);
446 device->deviceinfo.pci->revision_id);
449 drmFreeDevice(&device);
453 /* Find a match AMD device in PCI bus
454 * Return the index of the device or -1 if not found
459 drmDevicePtr device;
464 &device) == 0) {
465 if (device->bustype == DRM_BUS_PCI)
466 if ((bus == 0xFF || device->businfo.pci->bus == bus) &&
467 device->deviceinfo.pci->device_id == dev) {
468 drmFreeDevice(&device);
472 drmFreeDevice(&device);
591 perror("Cannot open AMDGPU device");
596 /* Most tests run on device of drm_amdgpu[0].
597 * Swap the chosen device to drm_amdgpu[0].
616 snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device/drm",
627 * only device nodes in /dev/dri/ */
650 snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device", maj, min);
668 int pci_device_id = 0; /* By default PC device ID is zero */
718 perror("Cannot open AMDGPU device");
723 perror("Cannot open AMDGPU device");
734 /* A device was specified to run the test */
739 /* Most tests run on device of drm_amdgpu[0].
740 * Swap the chosen device to drm_amdgpu[0].
747 "The specified GPU device does not exist.\n");