mirror of
https://github.com/torvalds/linux.git
synced 2026-05-04 06:22:40 -04:00
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
This commit is contained in:
@@ -232,7 +232,7 @@ static int virtio_gpufb_create(struct drm_fb_helper *helper,
|
||||
return PTR_ERR(obj);
|
||||
|
||||
virtio_gpu_resource_id_get(vgdev, &resid);
|
||||
virtio_gpu_cmd_create_resource(vgdev, resid, format,
|
||||
virtio_gpu_cmd_create_resource(vgdev, obj, resid, format,
|
||||
mode_cmd.width, mode_cmd.height);
|
||||
|
||||
ret = virtio_gpu_object_kmap(obj);
|
||||
|
||||
Reference in New Issue
Block a user