drm/virtio: add virtio_gpu_cmd_unref_resource error handling
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 8 Sep 2020 07:07:23 +0000 (09:07 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 15 Sep 2020 11:30:53 +0000 (13:30 +0200)
commit9fe6bda9823ea90c22ad47436293413d5fd58991
treefaaad6b17998278e6d43c6ad55acb1643eacf1bd
parentb7170f9457f282783b6f3843e2b30d619449837c
drm/virtio: add virtio_gpu_cmd_unref_resource error handling

Usually we wait for the host to complete the unref request, then cleanup
the guest-side state of the object in the completion callback.  When
submitting the unref command failed the completion callback will not be
called though, so cleanup right away.

Fixes a WARN on stale mm entries on driver shutdown.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20200908070723.6394-4-kraxel@redhat.com
drivers/gpu/drm/virtio/virtgpu_vq.c