]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm: Remove drm_device->virtdev
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 24 May 2017 14:51:37 +0000 (16:51 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 29 May 2017 18:57:25 +0000 (20:57 +0200)
This is a leftover from the drm_bus days, where we've had a
bus-specific device type for every bus type in drm_device. Except for
pci (which we can't remove because dri1 drivers) this is all gone. And
the virt driver also doesn't really need it, dev_to_virtio works
perfectly fine.

Cc: David Airlie <airlied@linux.ie>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-3-daniel.vetter@ffwll.ch
drivers/gpu/drm/virtio/virtgpu_drm_bus.c
drivers/gpu/drm/virtio/virtgpu_kms.c
include/drm/drmP.h

index 43e1d5916c6c6e0eb388e4397244c94d6bdfb96d..7df8d0c9026acb81e6bf25bf7bc19c2ba0911cc8 100644 (file)
@@ -56,7 +56,6 @@ 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);
-       dev->virtdev = vdev;
        vdev->priv = dev;
 
        if (strcmp(vdev->dev.parent->bus->name, "pci") == 0) {
index 1e1c90b30d4ad9b6cac056169d6f6eea7acede00..6400506a06b07036d77be04cdb6cb9fe567a7419 100644 (file)
@@ -138,7 +138,7 @@ int virtio_gpu_driver_load(struct drm_device *dev, unsigned long flags)
        u32 num_scanouts, num_capsets;
        int ret;
 
-       if (!virtio_has_feature(dev->virtdev, VIRTIO_F_VERSION_1))
+       if (!virtio_has_feature(dev_to_virtio(dev->dev), VIRTIO_F_VERSION_1))
                return -ENODEV;
 
        vgdev = kzalloc(sizeof(struct virtio_gpu_device), GFP_KERNEL);
@@ -147,7 +147,7 @@ int virtio_gpu_driver_load(struct drm_device *dev, unsigned long flags)
 
        vgdev->ddev = dev;
        dev->dev_private = vgdev;
-       vgdev->vdev = dev->virtdev;
+       vgdev->vdev = dev_to_virtio(dev->dev);
        vgdev->dev = dev->dev;
 
        spin_lock_init(&vgdev->display_info_lock);
index b9b5566acfe6035a7080c76adfdf1fc27eb4a9c4..3f724c53c9ed49898affd4403fc5fd5f198463a3 100644 (file)
@@ -429,8 +429,6 @@ struct drm_device {
        struct pci_controller *hose;
 #endif
 
-       struct virtio_device *virtdev;
-
        struct drm_sg_mem *sg;  /**< Scatter gather memory */
        unsigned int num_crtcs;                  /**< Number of CRTCs on this device */