linux/drivers/gpu/drm/virtio
Gerd Hoffmann 530b28426a drm/virtio: rework resource creation workflow.
This patch moves the virtio_gpu_cmd_create_resource() call (which
notifies the host about the new resource created) into the
virtio_gpu_object_create() function.  That way we can call
virtio_gpu_cmd_create_resource() before ttm_bo_init(), so the host
already knows about the object when ttm initializes the object and calls
our driver callbacks.

Specifically the object is already created when the
virtio_gpu_ttm_tt_bind() callback invokes virtio_gpu_object_attach(),
so the extra virtio_gpu_object_attach() calls done after
virtio_gpu_object_create() are not needed any more.

The fence support for the create ioctl becomes a bit more tricky though.
The code moved into virtio_gpu_object_create() too.  We first submit the
(fenced) virtio_gpu_cmd_create_resource() command, then initialize the
ttm object, and finally attach just created object to the fence for the
command in case it didn't finish yet.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20190318113332.10900-6-kraxel@redhat.com
2019-03-28 12:11:56 +01:00
..
Kconfig drm: fix compilations issues introduced by "drm: allow to use mmuless SoC" 2017-01-09 11:30:30 +01:00
Makefile drm/virtio: Drop deprecated load/unload initialization 2019-01-09 09:38:49 +01:00
virtgpu_debugfs.c drm/virtio: add virtio-gpu-features debugfs file. 2019-03-28 12:11:55 +01:00
virtgpu_display.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
virtgpu_drv.c drm/virtio: implement prime export 2019-02-28 09:09:02 +01:00
virtgpu_drv.h drm/virtio: rework resource creation workflow. 2019-03-28 12:11:56 +01:00
virtgpu_fb.c drm/virtio: switch to generic fbdev emulation 2018-12-14 09:40:27 +01:00
virtgpu_fence.c drm/virtio: rework resource creation workflow. 2019-03-28 12:11:56 +01:00
virtgpu_gem.c drm/virtio: rework resource creation workflow. 2019-03-28 12:11:56 +01:00
virtgpu_ioctl.c drm/virtio: rework resource creation workflow. 2019-03-28 12:11:56 +01:00
virtgpu_kms.c drm/virtio: Drop deprecated load/unload initialization 2019-01-09 09:38:49 +01:00
virtgpu_object.c drm/virtio: rework resource creation workflow. 2019-03-28 12:11:56 +01:00
virtgpu_plane.c drm/virtio: drop virtio_gpu_fence_cleanup() 2019-01-08 12:00:01 +01:00
virtgpu_prime.c drm/virtio: implement prime export 2019-02-28 09:09:02 +01:00
virtgpu_ttm.c drm/virtio: move virtio_gpu_object_{attach, detach} calls. 2019-03-28 12:11:55 +01:00
virtgpu_vq.c drm/virtio: rework resource creation workflow. 2019-03-28 12:11:56 +01:00