mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user