search for: virtio_gpu_cmd_context_create

Displaying 19 results from an estimated 19 matches for "virtio_gpu_cmd_context_create".

2018 Sep 26
2
[PATCH 4/4] drm/virtio: Use IDAs more efficiently
On Wed, Sep 26, 2018 at 09:00:31AM -0700, Matthew Wilcox wrote: > @@ -59,6 +59,7 @@ static int virtio_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
On Wed, Sep 26, 2018 at 09:00:31AM -0700, Matthew Wilcox wrote: > @@ -59,6 +59,7 @@ static int virtio_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 13
0
[PATCH 3/3] drm/virtio: add edid support
...@ int virtio_gpu_cmd_get_capset_info(struct virtio_gpu_device *vgdev, int idx); int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev, int idx, int version, struct virtio_gpu_drv_cap_cache **cache_p); +int virtio_gpu_cmd_get_edids(struct virtio_gpu_device *vgdev); void virtio_gpu_cmd_context_create(struct virtio_gpu_device *vgdev, uint32_t id, uint32_t nlen, const char *name); void virtio_gpu_cmd_context_destroy(struct virtio_gpu_device *vgdev, diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index 25503b9335..e573eab1f1 100644 --- a/dr...
2020 Feb 14
0
[PATCH v4 6/6] drm/virtio: move remaining virtio_gpu_notify calls
...rtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c index 8fd7acef960f..ad3b673f5796 100644 --- a/drivers/gpu/drm/virtio/virtgpu_kms.c +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c @@ -61,6 +61,7 @@ static int virtio_gpu_context_create(struct virtio_gpu_device *vgdev, return handle; handle += 1; virtio_gpu_cmd_context_create(vgdev, 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-&...
2015 Apr 02
0
[PATCH v2 3/4] Add virtio gpu driver.
...l at redhat.com> wrote: > +#define MAX_INLINE_CMD_SIZE 96 > [ 750.446449] kernel BUG at drivers/gpu/drm/virtio/virtgpu_vq.c:132! [ 750.447005] Call Trace: [ 750.447005] [<ffffffffa00f3592>] virtio_gpu_alloc_cmd+0x22/0x50 [virtio_gpu] [ 750.447005] [<ffffffffa00f4580>] virtio_gpu_cmd_context_create+0x30/0xa0 [virtio_gpu] struct virtio_gpu_ctx_create { struct virtio_gpu_ctrl_hdr hdr; __le32 nlen; __le32 padding; char debug_name[64]; }; Is actually 96 bytes. Perhaps that condition should be changed: + BUG_ON(size >= MAX_INLINE_CMD_SIZE); -- Marc-An...
2018 Sep 26
0
[PATCH 4/4] drm/virtio: Use IDAs more efficiently
...s/gpu/drm/virtio/virtgpu_kms.c index bf609dcae224..b576c9ef6323 100644 --- a/drivers/gpu/drm/virtio/virtgpu_kms.c +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c @@ -59,6 +59,7 @@ static int virtio_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; } @@ -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_i...
2018 Oct 02
0
[PATCH 4/4] drm/virtio: Use IDAs more efficiently
...0700, Matthew Wilcox wrote: > On Wed, Sep 26, 2018 at 09:00:31AM -0700, Matthew Wilcox wrote: > > @@ -59,6 +59,7 @@ static int virtio_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 ther...
2020 Feb 13
0
[PATCH v3 1/4] drm/virtio: rework notification for better batching
...,6 +907,7 @@ int virtio_gpu_cmd_get_edids(struct virtio_gpu_device *vgdev) cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_GET_EDID); cmd_p->scanout = cpu_to_le32(scanout); virtio_gpu_queue_ctrl_buffer(vgdev, vbuf); + virtio_gpu_notify(vgdev); } return 0; @@ -924,6 +928,7 @@ void virtio_gpu_cmd_context_create(struct virtio_gpu_device *vgdev, uint32_t id, strncpy(cmd_p->debug_name, name, sizeof(cmd_p->debug_name) - 1); cmd_p->debug_name[sizeof(cmd_p->debug_name) - 1] = 0; virtio_gpu_queue_ctrl_buffer(vgdev, vbuf); + virtio_gpu_notify(vgdev); } void virtio_gpu_cmd_context_destroy(str...
2020 Feb 14
0
[PATCH v4 1/6] drm/virtio: rework notification for better batching
...,6 +907,7 @@ int virtio_gpu_cmd_get_edids(struct virtio_gpu_device *vgdev) cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_GET_EDID); cmd_p->scanout = cpu_to_le32(scanout); virtio_gpu_queue_ctrl_buffer(vgdev, vbuf); + virtio_gpu_notify(vgdev); } return 0; @@ -924,6 +928,7 @@ void virtio_gpu_cmd_context_create(struct virtio_gpu_device *vgdev, uint32_t id, strncpy(cmd_p->debug_name, name, sizeof(cmd_p->debug_name) - 1); cmd_p->debug_name[sizeof(cmd_p->debug_name) - 1] = 0; virtio_gpu_queue_ctrl_buffer(vgdev, vbuf); + virtio_gpu_notify(vgdev); } void virtio_gpu_cmd_context_destroy(str...
2015 Sep 21
2
[PATCH v2 4/6] virtio-gpu: add 3d/virgl support
...struct virtio_gpu_device *vgdev, uint32_t resource_id); +int virtio_gpu_cmd_get_capset_info(struct virtio_gpu_device *vgdev, int idx); +int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev, + int idx, int version, + struct virtio_gpu_drv_cap_cache **cache_p); +void virtio_gpu_cmd_context_create(struct virtio_gpu_device *vgdev, uint32_t id, + uint32_t nlen, const char *name); +void virtio_gpu_cmd_context_destroy(struct virtio_gpu_device *vgdev, + uint32_t id); +void virtio_gpu_cmd_context_attach_resource(struct virtio_gpu_device *vgdev, + uint32_t ctx_id, + uin...
2015 Sep 21
2
[PATCH v2 4/6] virtio-gpu: add 3d/virgl support
...struct virtio_gpu_device *vgdev, uint32_t resource_id); +int virtio_gpu_cmd_get_capset_info(struct virtio_gpu_device *vgdev, int idx); +int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev, + int idx, int version, + struct virtio_gpu_drv_cap_cache **cache_p); +void virtio_gpu_cmd_context_create(struct virtio_gpu_device *vgdev, uint32_t id, + uint32_t nlen, const char *name); +void virtio_gpu_cmd_context_destroy(struct virtio_gpu_device *vgdev, + uint32_t id); +void virtio_gpu_cmd_context_attach_resource(struct virtio_gpu_device *vgdev, + uint32_t ctx_id, + uin...
2015 Oct 02
0
[PATCH v3 4/7] virtio-gpu: add 3d/virgl support
...struct virtio_gpu_device *vgdev, uint32_t resource_id); +int virtio_gpu_cmd_get_capset_info(struct virtio_gpu_device *vgdev, int idx); +int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev, + int idx, int version, + struct virtio_gpu_drv_cap_cache **cache_p); +void virtio_gpu_cmd_context_create(struct virtio_gpu_device *vgdev, uint32_t id, + uint32_t nlen, const char *name); +void virtio_gpu_cmd_context_destroy(struct virtio_gpu_device *vgdev, + uint32_t id); +void virtio_gpu_cmd_context_attach_resource(struct virtio_gpu_device *vgdev, + uint32_t ctx_id, + uin...
2015 Oct 02
0
[PATCH v3 4/7] virtio-gpu: add 3d/virgl support
...struct virtio_gpu_device *vgdev, uint32_t resource_id); +int virtio_gpu_cmd_get_capset_info(struct virtio_gpu_device *vgdev, int idx); +int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev, + int idx, int version, + struct virtio_gpu_drv_cap_cache **cache_p); +void virtio_gpu_cmd_context_create(struct virtio_gpu_device *vgdev, uint32_t id, + uint32_t nlen, const char *name); +void virtio_gpu_cmd_context_destroy(struct virtio_gpu_device *vgdev, + uint32_t id); +void virtio_gpu_cmd_context_attach_resource(struct virtio_gpu_device *vgdev, + uint32_t ctx_id, + uin...
2015 Sep 21
0
[PATCH v2 4/6] virtio-gpu: add 3d/virgl support
...v, > uint32_t resource_id); > +int virtio_gpu_cmd_get_capset_info(struct virtio_gpu_device *vgdev, int idx); > +int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev, > + int idx, int version, > + struct virtio_gpu_drv_cap_cache **cache_p); > +void virtio_gpu_cmd_context_create(struct virtio_gpu_device *vgdev, uint32_t id, > + uint32_t nlen, const char *name); > +void virtio_gpu_cmd_context_destroy(struct virtio_gpu_device *vgdev, > + uint32_t id); > +void virtio_gpu_cmd_context_attach_resource(struct virtio_gpu_device *vgdev, > + uint3...
2015 Sep 09
3
[PATCH 3/5] update virtio gpu driver: add 3d/virgl support
...struct virtio_gpu_device *vgdev, uint32_t resource_id); +int virtio_gpu_cmd_get_capset_info(struct virtio_gpu_device *vgdev, int idx); +int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev, + int idx, int version, + struct virtio_gpu_drv_cap_cache **cache_p); +void virtio_gpu_cmd_context_create(struct virtio_gpu_device *vgdev, uint32_t id, + uint32_t nlen, const char *name); +void virtio_gpu_cmd_context_destroy(struct virtio_gpu_device *vgdev, + uint32_t id); +void virtio_gpu_cmd_context_attach_resource(struct virtio_gpu_device *vgdev, + uint32_t ctx_id, + uin...
2015 Sep 09
3
[PATCH 3/5] update virtio gpu driver: add 3d/virgl support
...struct virtio_gpu_device *vgdev, uint32_t resource_id); +int virtio_gpu_cmd_get_capset_info(struct virtio_gpu_device *vgdev, int idx); +int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev, + int idx, int version, + struct virtio_gpu_drv_cap_cache **cache_p); +void virtio_gpu_cmd_context_create(struct virtio_gpu_device *vgdev, uint32_t id, + uint32_t nlen, const char *name); +void virtio_gpu_cmd_context_destroy(struct virtio_gpu_device *vgdev, + uint32_t id); +void virtio_gpu_cmd_context_attach_resource(struct virtio_gpu_device *vgdev, + uint32_t ctx_id, + uin...
2015 Apr 01
3
[PATCH v2 3/4] Add virtio gpu driver.
From: Dave Airlie <airlied at gmail.com> This patch adds a kms driver for the virtio gpu. The xorg modesetting driver can handle the device just fine, the framebuffer for fbcon is there too. Qemu patches for the host side are under review currently. The pci version of the device comes in two variants: with and without vga compatibility. The former has a extra memory bar for the vga
2015 Apr 01
3
[PATCH v2 3/4] Add virtio gpu driver.
From: Dave Airlie <airlied at gmail.com> This patch adds a kms driver for the virtio gpu. The xorg modesetting driver can handle the device just fine, the framebuffer for fbcon is there too. Qemu patches for the host side are under review currently. The pci version of the device comes in two variants: with and without vga compatibility. The former has a extra memory bar for the vga