[PATCH v3 08/18] drm/ttm: use gem vma_node

2019-06-28 Thread Gerd Hoffmann
Drop vma_node from ttm_buffer_object, use the gem struct (base.vma_node) instead. Signed-off-by: Gerd Hoffmann Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +- drivers/gpu/drm/qxl/qxl_object.h | 2 +- drivers/gpu/drm/radeon/radeon_object.h | 2

[PATCH v3 03/18] drm/qxl: use embedded gem object

2019-06-28 Thread Gerd Hoffmann
Drop drm_gem_object from qxl_bo, use the ttm_buffer_object.base instead. Signed-off-by: Gerd Hoffmann Acked-by: Christian König --- drivers/gpu/drm/qxl/qxl_drv.h | 6 +++--- drivers/gpu/drm/qxl/qxl_object.h | 4 ++-- drivers/gpu/drm/qxl/qxl_cmd.c | 4 ++--

[PATCH v3 16/18] drm/qxl: switch driver from bo->resv to bo->base.resv

2019-06-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Acked-by: Christian König --- drivers/gpu/drm/qxl/qxl_debugfs.c | 2 +- drivers/gpu/drm/qxl/qxl_release.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_debugfs.c b/drivers/gpu/drm/qxl/qxl_debugfs.c index

[PATCH v3 17/18] drm/virtio: switch driver from bo->resv to bo->base.resv

2019-06-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Acked-by: Christian König --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 4 ++-- drivers/gpu/drm/virtio/virtgpu_plane.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c

Re: [PATCH v4 02/12] drm/virtio: switch virtio_gpu_wait_ioctl() to gem helper.

2019-06-28 Thread Gerd Hoffmann
On Wed, Jun 26, 2019 at 04:55:20PM -0700, Chia-I Wu wrote: > On Wed, Jun 19, 2019 at 11:07 PM Gerd Hoffmann wrote: > > > > Use drm_gem_reservation_object_wait() in virtio_gpu_wait_ioctl(). > > This also makes the ioctl run lockless. > The userspace has a BO cache to avoid freeing BOs immediately

Re: [PATCH v4 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing

2019-06-28 Thread Gerd Hoffmann
Hi, > > --- a/drivers/gpu/drm/virtio/virtgpu_drv.h > > +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h > > @@ -120,9 +120,9 @@ struct virtio_gpu_vbuffer { > > > > char *resp_buf; > > int resp_size; > > - > > virtio_gpu_resp_cb resp_cb; > > > > + struct

[PATCH v5 05/12] drm/virtio: drop no_wait argument from virtio_gpu_object_reserve

2019-06-28 Thread Gerd Hoffmann
All callers pass no_wait = false. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/virtio/virtgpu_drv.h | 5 ++--- drivers/gpu/drm/virtio/virtgpu_gem.c | 4 ++-- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-)

[PATCH v5 12/12] drm/virtio: remove virtio_gpu_alloc_object

2019-06-28 Thread Gerd Hoffmann
Thin wrapper around virtio_gpu_object_create(), but calling that directly works equally well. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter --- drivers/gpu/drm/virtio/virtgpu_drv.h | 4 drivers/gpu/drm/virtio/virtgpu_gem.c | 23 ---

[PATCH v5 07/12] drm/virtio: add virtio_gpu_object_array & helpers

2019-06-28 Thread Gerd Hoffmann
Some helper functions to manage an array of gem objects. v5: some small optimizations (Chia-I Wu). v4: make them virtio-private instead of generic helpers. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 10 +++ drivers/gpu/drm/virtio/virtgpu_gem.c | 45

Re: [PATCH v4 11/12] drm/virtio: switch from ttm to gem shmem helpers

2019-06-28 Thread Gerd Hoffmann
> > static inline struct virtio_gpu_object* > > virtio_gpu_object_ref(struct virtio_gpu_object *bo) > The last users of these two helpers are removed with this patch. We > can remove them. patch 12/12 does that. > > + bo = gem_to_virtio_gpu_obj(_obj->base); > > +

[PATCH v5 10/12] drm/virtio: drop virtio_gpu_object_list_validate/virtio_gpu_unref_list

2019-06-28 Thread Gerd Hoffmann
No users left. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter --- drivers/gpu/drm/virtio/virtgpu_drv.h | 3 -- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 39 -- 2 files changed, 42 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h

[PATCH v5 11/12] drm/virtio: switch from ttm to gem shmem helpers

2019-06-28 Thread Gerd Hoffmann
virtio-gpu basically needs a sg_table for the bo, to tell the host where the backing pages for the object are. So the gem shmem helpers are a perfect fit. Some drm_gem_object_funcs need thin wrappers to update the host state, but otherwise the helpers handle everything just fine. Once the

[PATCH v5 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing

2019-06-28 Thread Gerd Hoffmann
Use gem reservation helpers and direct reservation_object_* calls instead of ttm. v5: fix fencing (Chia-I Wu). v3: Also attach the array of gem objects to the virtio command buffer, so we can drop the object references in the completion callback. Needed because ttm fence helpers grab a reference

[PATCH v5 03/12] drm/virtio: simplify cursor updates

2019-06-28 Thread Gerd Hoffmann
No need to do the reservation dance, we can just wait on the fence directly. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/virtio/virtgpu_plane.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git

[PATCH v5 09/12] drm/virtio: rework virtio_gpu_object_create fencing

2019-06-28 Thread Gerd Hoffmann
Use gem reservation helpers and direct reservation_object_* calls instead of ttm. v5: fix fencing (Chia-I Wu). v3: Due to using the gem reservation object it is initialized and ready for use before calling ttm_bo_init, so we can also drop the tricky fence logic which checks whenever the command

[PATCH v5 02/12] drm/virtio: switch virtio_gpu_wait_ioctl() to gem helper.

2019-06-28 Thread Gerd Hoffmann
Use drm_gem_reservation_object_wait() in virtio_gpu_wait_ioctl(). This also makes the ioctl run lockless. v5: handle lookup failure. v2: use reservation_object_test_signaled_rcu for VIRTGPU_WAIT_NOWAIT. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter ---

[PATCH v5 01/12] drm/virtio: pass gem reservation object to ttm init

2019-06-28 Thread Gerd Hoffmann
With this gem and ttm will use the same reservation object, so mixing and matching ttm / gem reservation helpers should work fine. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/virtio/virtgpu_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v5 06/12] drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve, unreserve}

2019-06-28 Thread Gerd Hoffmann
Call reservation_object_* directly instead of using ttm_bo_{reserve,unreserve}. v4: check for EINTR only. v3: check for EINTR too. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/virtio/virtgpu_drv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH v5 04/12] drm/virtio: remove virtio_gpu_object_wait

2019-06-28 Thread Gerd Hoffmann
No users left. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/virtio/virtgpu_drv.h| 1 - drivers/gpu/drm/virtio/virtgpu_object.c | 13 - 2 files changed, 14 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h

[PATCH v2 1/3] vsock/virtio: use RCU to avoid use-after-free on the_virtio_vsock

2019-06-28 Thread Stefano Garzarella
Some callbacks used by the upper layers can run while we are in the .remove(). A potential use-after-free can happen, because we free the_virtio_vsock without knowing if the callbacks are over or not. To solve this issue we move the assignment of the_virtio_vsock at the end of .probe(), when we

[PATCH v2 2/3] vsock/virtio: stop workers during the .remove()

2019-06-28 Thread Stefano Garzarella
Before to call vdev->config->reset(vdev) we need to be sure that no one is accessing the device, for this reason, we add new variables in the struct virtio_vsock to stop the workers during the .remove(). This patch also add few comments before vdev->config->reset(vdev) and

[PATCH v2 3/3] vsock/virtio: fix flush of works during the .remove()

2019-06-28 Thread Stefano Garzarella
This patch moves the flush of works after vdev->config->del_vqs(vdev), because we need to be sure that no workers run before to free the 'vsock' object. Since we stopped the workers using the [tx|rx|event]_run flags, we are sure no one is accessing the device while we are calling

[PATCH v2 0/3] vsock/virtio: several fixes in the .probe() and .remove()

2019-06-28 Thread Stefano Garzarella
During the review of "[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver", Stefan pointed out some possible issues in the .probe() and .remove() callbacks of the virtio-vsock driver. This series tries to solve these issues: - Patch 1 adds RCU critical sections to

Call for Papers - ICOTTS'2019, Buenos Aires, Argentina | Deadline: July 21

2019-06-28 Thread ML
ICOTTS'19 - The 2019 International Conference on Tourism, Technology & Systems 5 - 7 December 2019, Buenos Aires, Argentina Proceedings by Springer. Indexed by Scopus, ISI, etc. https://www.icotts.org/ ICOTTS'19 - The 2019 International Conference on Tourism,