search for: ctx_id_ida

Displaying 8 results from an estimated 8 matches for "ctx_id_ida".

Did you mean: ctx_id_idr
2018 Sep 26
2
[PATCH 4/4] drm/virtio: Use IDAs more efficiently
..._gpu_context_create(struct virtio_gpu_device *vgdev, > > if (handle < 0) > return handle; > + handle++; > virtio_gpu_cmd_context_create(vgdev, handle, nlen, name); > return handle; > } Uh. This line is missing. - int handle = ida_alloc_min(&vgdev->ctx_id_ida, 1, GFP_KERNEL); + int handle = ida_alloc(&vgdev->ctx_id_ida, GFP_KERNEL); It'll be there in v2 ;-)
2018 Sep 26
2
[PATCH 4/4] drm/virtio: Use IDAs more efficiently
..._gpu_context_create(struct virtio_gpu_device *vgdev, > > if (handle < 0) > return handle; > + handle++; > virtio_gpu_cmd_context_create(vgdev, handle, nlen, name); > return handle; > } Uh. This line is missing. - int handle = ida_alloc_min(&vgdev->ctx_id_ida, 1, GFP_KERNEL); + int handle = ida_alloc(&vgdev->ctx_id_ida, GFP_KERNEL); It'll be there in v2 ;-)
2018 Sep 26
5
[PATCH 0/4] Improve virtio ID allocation
I noticed you were using IDRs where you could be using the more efficient IDAs, then while fixing that I noticed the lack of error handling, and I decided to follow that up with an efficiency improvement. There's probably a v2 of this to follow because I couldn't figure out how to properly handle one of the error cases ... see the comment embedded in one of the patches. Matthew Wilcox
2018 Sep 26
0
[PATCH 4/4] drm/virtio: Use IDAs more efficiently
...urn handle; + handle++; virtio_gpu_cmd_context_create(vgdev, handle, nlen, name); return handle; } @@ -67,7 +68,7 @@ static void virtio_gpu_context_destroy(struct virtio_gpu_device *vgdev, uint32_t ctx_id) { virtio_gpu_cmd_context_destroy(vgdev, ctx_id); - ida_free(&vgdev->ctx_id_ida, ctx_id); + ida_free(&vgdev->ctx_id_ida, ctx_id - 1); } static void virtio_gpu_init_vq(struct virtio_gpu_queue *vgvq, diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 387951c971d4..81297fe0147d 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +...
2018 Oct 02
0
[PATCH 4/4] drm/virtio: Use IDAs more efficiently
...t; > > > if (handle < 0) > > return handle; > > + handle++; > > virtio_gpu_cmd_context_create(vgdev, handle, nlen, name); > > return handle; > > } > > Uh. This line is missing. > > - int handle = ida_alloc_min(&vgdev->ctx_id_ida, 1, GFP_KERNEL); > + int handle = ida_alloc(&vgdev->ctx_id_ida, GFP_KERNEL); > > It'll be there in v2 ;-) I've touched the resource/object id handling too, see my "drm/virtio: rework ttm resource handling" patch series (https://patchwork.freedesktop.org/ser...
2020 Feb 14
0
[PATCH v4 6/6] drm/virtio: move remaining virtio_gpu_notify calls
...dev, handle, nlen, name); + virtio_gpu_notify(vgdev); return handle; } @@ -68,6 +69,7 @@ static void virtio_gpu_context_destroy(struct virtio_gpu_device *vgdev, uint32_t ctx_id) { virtio_gpu_cmd_context_destroy(vgdev, ctx_id); + virtio_gpu_notify(vgdev); ida_free(&vgdev->ctx_id_ida, ctx_id - 1); } @@ -93,6 +95,7 @@ static void virtio_gpu_get_capsets(struct virtio_gpu_device *vgdev, } for (i = 0; i < num_capsets; i++) { virtio_gpu_cmd_get_capset_info(vgdev, i); + virtio_gpu_notify(vgdev); ret = wait_event_timeout(vgdev->resp_wq, vgdev->capsets[i]....
2020 May 13
0
[PATCH v3 4/4] drm/virtio: Support virtgpu exported resources
...b/drivers/gpu/drm/virtio/virtgpu_kms.c > @@ -134,6 +134,7 @@ int virtio_gpu_init(struct drm_device *dev) > vgdev->dev = dev->dev; > > spin_lock_init(&vgdev->display_info_lock); > + spin_lock_init(&vgdev->resource_export_lock); > ida_init(&vgdev->ctx_id_ida); > ida_init(&vgdev->resource_ida); > init_waitqueue_head(&vgdev->resp_wq); > @@ -162,6 +163,9 @@ int virtio_gpu_init(struct drm_device *dev) > if (virtio_has_feature(vgdev->vdev, VIRTIO_RING_F_INDIRECT_DESC)) { > vgdev->has_indirect = true; > } >...
2020 Mar 02
0
[virtio-dev] [PATCH v2 4/4] drm/virtio: Support virtgpu exported resources
...tio/virtgpu_kms.c > @@ -134,6 +134,7 @@ int virtio_gpu_init(struct drm_device *dev) > vgdev->dev = dev->dev; > > spin_lock_init(&vgdev->display_info_lock); > + spin_lock_init(&vgdev->resource_export_lock); > ida_init(&vgdev->ctx_id_ida); > ida_init(&vgdev->resource_ida); > init_waitqueue_head(&vgdev->resp_wq); > @@ -162,6 +163,9 @@ int virtio_gpu_init(struct drm_device *dev) > if (virtio_has_feature(vgdev->vdev, VIRTIO_RING_F_INDIRECT_DESC)) { > vgdev->has...