diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-02-11 14:58:04 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-02-12 10:24:08 +0100 |
commit | b1df3a2b24a917f8853d43fe9683c0e360d2c33a (patch) | |
tree | 12b9267ba6a6fba75ba38fe213b720d754638580 /drivers/gpu/drm/virtio/virtgpu_drv.h | |
parent | drm/cirrus: add drm_driver.release callback. (diff) | |
download | linux-b1df3a2b24a917f8853d43fe9683c0e360d2c33a.tar.xz linux-b1df3a2b24a917f8853d43fe9683c0e360d2c33a.zip |
drm/virtio: add drm_driver.release callback.
Split virtio_gpu_deinit(), move the drm shutdown and release to
virtio_gpu_release(). Drop vqs_ready variable, instead use
drm_dev_{enter,exit,unplug} to avoid touching hardware after
device removal. Tidy up here and there.
v4: add changelog.
v3: use drm_dev_*().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20200211135805.24436-1-kraxel@redhat.com
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_drv.h')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_drv.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 7fd8361e1c9e..af9403e1cf78 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -32,6 +32,7 @@ #include <linux/virtio_gpu.h> #include <drm/drm_atomic.h> +#include <drm/drm_drv.h> #include <drm/drm_encoder.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem.h> @@ -177,7 +178,6 @@ struct virtio_gpu_device { struct virtio_gpu_queue ctrlq; struct virtio_gpu_queue cursorq; struct kmem_cache *vbufs; - bool vqs_ready; bool disable_notify; bool pending_notify; @@ -219,6 +219,7 @@ extern struct drm_ioctl_desc virtio_gpu_ioctls[DRM_VIRTIO_NUM_IOCTLS]; /* virtio_kms.c */ int virtio_gpu_init(struct drm_device *dev); void virtio_gpu_deinit(struct drm_device *dev); +void virtio_gpu_release(struct drm_device *dev); int virtio_gpu_driver_open(struct drm_device *dev, struct drm_file *file); void virtio_gpu_driver_postclose(struct drm_device *dev, struct drm_file *file); |