OSDN Git Service

drm/virtio: track created object state
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 19 Oct 2018 06:18:42 +0000 (08:18 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 29 Oct 2018 21:50:55 +0000 (22:50 +0100)
commit23c897d72ca8064c626be0ef73fe671488d584bb
tree7f3fb51dc44840cda5601e9cb2c2a92902a72519
parent918d89bb1a639adf28a61d0a35c24a2b256ca635
drm/virtio: track created object state

Track whenever the virtio_gpu_object is already created (i.e. host knows
about it) in a new variable.  Add checks to virtio_gpu_object_attach()
to do nothing on objects not created yet.

Make virtio_gpu_ttm_bo_destroy() use the new variable too, instead of
expecting hw_res_handle indicating the object state.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20181019061847.18958-2-kraxel@redhat.com
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/virtio/virtgpu_fb.c
drivers/gpu/drm/virtio/virtgpu_gem.c
drivers/gpu/drm/virtio/virtgpu_ioctl.c
drivers/gpu/drm/virtio/virtgpu_object.c
drivers/gpu/drm/virtio/virtgpu_vq.c