[PATCH v4] drm/virtio: add drm_driver.release callback.
Gerd Hoffmann
kraxel at redhat.com
Wed Feb 12 09:35:43 UTC 2020
On Tue, Feb 11, 2020 at 03:27:11PM +0100, Daniel Vetter wrote:
> On Tue, Feb 11, 2020 at 02:58:04PM +0100, Gerd Hoffmann wrote:
> > 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 at redhat.com>
>
> Looks reasonable I think.
>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
>
> I didn't review whether you need more drm_dev_enter/exit pairs, virtio is
> a bit more complex for that and I have no idea how exactly it works.
virtio uses two rings to send commands to the device, one to move the
cursor and one for everything else. So pretty much everything ends up
calling either this ...
> > @@ -330,7 +330,14 @@ static void virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
... or this ...
> > @@ -460,12 +460,13 @@ static void virtio_gpu_queue_cursor(struct virtio_gpu_device *vgdev,
... to submit some request to the (virtual) hardware. Therefore we
don't need many drm_dev_enter/exit pairs to cover everything ;)
cheers,
Gerd
More information about the dri-devel
mailing list