Skip to content

Commit

Permalink
DEBUG: drm: printf unique at different stages
Browse files Browse the repository at this point in the history
  • Loading branch information
evelikov-work authored and evelikov committed Apr 3, 2018
1 parent befdaaf commit c2bc545
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/drm_ioctl.c
Expand Up @@ -123,6 +123,7 @@ int drm_getunique(struct drm_device *dev, void *data,
u->unique_len = master->unique_len;
mutex_unlock(&master->dev->master_mutex);

DRM_ERROR("%s: unique %s\n", __func__, u->unique);
return 0;
}

Expand All @@ -143,6 +144,8 @@ static int drm_set_busid(struct drm_device *dev, struct drm_file *file_priv)
if (master->unique != NULL)
drm_unset_busid(dev, master);

DRM_ERROR("%s: dev %p, is_pci %d\n", __func__, dev->dev,
(dev->dev) ? dev_is_pci(dev->dev) : 0);
if (dev->dev && dev_is_pci(dev->dev)) {
ret = drm_pci_set_busid(dev, master);
if (ret) {
Expand All @@ -155,6 +158,7 @@ static int drm_set_busid(struct drm_device *dev, struct drm_file *file_priv)
if (master->unique)
master->unique_len = strlen(dev->unique);
}
DRM_ERROR("%s: unique %s\n", __func__, master->unique);

return 0;
}
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/virtio/virtgpu_drm_bus.c
Expand Up @@ -56,6 +56,7 @@ int drm_virtio_init(struct drm_driver *driver, struct virtio_device *vdev)
dev = drm_dev_alloc(driver, &vdev->dev);
if (IS_ERR(dev))
return PTR_ERR(dev);
DRM_ERROR("%s: #1 dev->unique %s\n", __func__, dev->unique);
vdev->priv = dev;

if (strcmp(vdev->dev.parent->bus->name, "pci") == 0) {
Expand All @@ -75,6 +76,7 @@ int drm_virtio_init(struct drm_driver *driver, struct virtio_device *vdev)
if (ret)
goto err_free;

DRM_ERROR("%s: #2 dev->unique %s\n", __func__, dev->unique);
return 0;

err_free:
Expand Down

0 comments on commit c2bc545

Please sign in to comment.