search for: virtio_fence_ops

Displaying 20 results from an estimated 21 matches for "virtio_fence_ops".

2016 Dec 12
6
[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()
...*vdev, u64 last_seq); diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c b/drivers/gpu/drm/virtio/virtgpu_fence.c index 2335352..4dbfe44 100644 --- a/drivers/gpu/drm/virtio/virtgpu_fence.c +++ b/drivers/gpu/drm/virtio/virtgpu_fence.c @@ -74,28 +74,40 @@ static const struct dma_fence_ops virtio_fence_ops = { .timeline_value_str = virtio_timeline_value_str, }; +struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device *vgdev) +{ + struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; + struct virtio_gpu_fence *fence; + unsigned long irq_flags; + + fence = kmalloc(sizeo...
2016 Dec 12
6
[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()
...*vdev, u64 last_seq); diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c b/drivers/gpu/drm/virtio/virtgpu_fence.c index 2335352..4dbfe44 100644 --- a/drivers/gpu/drm/virtio/virtgpu_fence.c +++ b/drivers/gpu/drm/virtio/virtgpu_fence.c @@ -74,28 +74,40 @@ static const struct dma_fence_ops virtio_fence_ops = { .timeline_value_str = virtio_timeline_value_str, }; +struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device *vgdev) +{ + struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; + struct virtio_gpu_fence *fence; + unsigned long irq_flags; + + fence = kmalloc(sizeo...
2016 Dec 13
0
[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()
...gs; > + > + fence = kmalloc(sizeof(struct virtio_gpu_fence), GFP_ATOMIC); > + if (!fence) > + return NULL; > + > + spin_lock_irqsave(&drv->lock, irq_flags); > + fence->drv = drv; > + fence->seq = ++drv->sync_seq; > + dma_fence_init(&fence->f, &virtio_fence_ops, &drv->lock, > + drv->context, fence->seq); > + spin_unlock_irqrestore(&drv->lock, irq_flags); seq assignment ... > + > + return fence; > +} > + > int virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev, > struct virtio_gpu_ctrl_hdr *cm...
2018 May 03
1
[PATCH 14/15] drm/virtio: Remove unecessary dma_fence_ops
...able_signaling(struct dma_fence *f) -{ - return true; -} - static bool virtio_signaled(struct dma_fence *f) { struct virtio_gpu_fence *fence = to_virtio_fence(f); @@ -67,9 +62,7 @@ static void virtio_timeline_value_str(struct dma_fence *f, char *str, int size) static const struct dma_fence_ops virtio_fence_ops = { .get_driver_name = virtio_get_driver_name, .get_timeline_name = virtio_get_timeline_name, - .enable_signaling = virtio_enable_signaling, .signaled = virtio_signaled, - .wait = dma_fence_default_wait, .fence_value_str = virtio_fence_value_str, .ti...
2015 Sep 02
1
[PATCH] virtio-gpu: fix compilation warnings
...e *f, char *str, int size) { struct virtio_gpu_fence *fence = to_virtio_fence(f); - snprintf(str, size, "%lu", atomic64_read(&fence->drv->last_seq)); + snprintf(str, size, "%llu", atomic64_read(&fence->drv->last_seq)); } static const struct fence_ops virtio_fence_ops = { -- 1.8.3.1
2015 Sep 02
1
[PATCH] virtio-gpu: fix compilation warnings
...e *f, char *str, int size) { struct virtio_gpu_fence *fence = to_virtio_fence(f); - snprintf(str, size, "%lu", atomic64_read(&fence->drv->last_seq)); + snprintf(str, size, "%llu", atomic64_read(&fence->drv->last_seq)); } static const struct fence_ops virtio_fence_ops = { -- 1.8.3.1
2019 Jul 19
0
[PATCH AUTOSEL 5.2 005/171] drm/virtio: set seqno for dma-fence
...uct virtio_gpu_device *vgdev) return fence; fence->drv = drv; + + /* This only partially initializes the fence because the seqno is + * unknown yet. The fence must not be used outside of the driver + * until virtio_gpu_fence_emit is called. + */ dma_fence_init(&fence->f, &virtio_fence_ops, &drv->lock, drv->context, 0); return fence; @@ -89,13 +92,13 @@ int virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev, unsigned long irq_flags; spin_lock_irqsave(&drv->lock, irq_flags); - fence->seq = ++drv->sync_seq; + fence->f.seqno = ++drv->sync_seq;...
2019 Jul 19
0
[PATCH AUTOSEL 5.1 004/141] drm/virtio: set seqno for dma-fence
...uct virtio_gpu_device *vgdev) return fence; fence->drv = drv; + + /* This only partially initializes the fence because the seqno is + * unknown yet. The fence must not be used outside of the driver + * until virtio_gpu_fence_emit is called. + */ dma_fence_init(&fence->f, &virtio_fence_ops, &drv->lock, drv->context, 0); return fence; @@ -89,13 +92,13 @@ int virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev, unsigned long irq_flags; spin_lock_irqsave(&drv->lock, irq_flags); - fence->seq = ++drv->sync_seq; + fence->f.seqno = ++drv->sync_seq;...
2016 Aug 31
1
[PATCH 1/2] drm/virtio: drop virtio_gpu_execbuffer_ioctl() wrapping
From: Gustavo Padovan <gustavo.padovan at collabora.co.uk> Instead of wrapping virtio_gpu_execbuffer() to execute the ioctl just execute it directly. Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk> --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git
2016 Aug 31
1
[PATCH 1/2] drm/virtio: drop virtio_gpu_execbuffer_ioctl() wrapping
From: Gustavo Padovan <gustavo.padovan at collabora.co.uk> Instead of wrapping virtio_gpu_execbuffer() to execute the ioctl just execute it directly. Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk> --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git
2015 Oct 07
2
[PATCH] drm/virtio: use %llu format string form atomic64_t
...char *str, int size) { struct virtio_gpu_fence *fence = to_virtio_fence(f); - snprintf(str, size, "%lu", atomic64_read(&fence->drv->last_seq)); + snprintf(str, size, "%llu", (u64)atomic64_read(&fence->drv->last_seq)); } static const struct fence_ops virtio_fence_ops = {
2015 Oct 07
2
[PATCH] drm/virtio: use %llu format string form atomic64_t
...char *str, int size) { struct virtio_gpu_fence *fence = to_virtio_fence(f); - snprintf(str, size, "%lu", atomic64_read(&fence->drv->last_seq)); + snprintf(str, size, "%llu", (u64)atomic64_read(&fence->drv->last_seq)); } static const struct fence_ops virtio_fence_ops = {
2019 Mar 18
1
[PATCH v3 5/5] drm/virtio: rework resource creation workflow.
...;; } -static bool virtio_signaled(struct dma_fence *f) +bool virtio_fence_signaled(struct dma_fence *f) { struct virtio_gpu_fence *fence = to_virtio_fence(f); @@ -62,7 +62,7 @@ static void virtio_timeline_value_str(struct dma_fence *f, char *str, int size) static const struct dma_fence_ops virtio_fence_ops = { .get_driver_name = virtio_get_driver_name, .get_timeline_name = virtio_get_timeline_name, - .signaled = virtio_signaled, + .signaled = virtio_fence_signaled, .fence_value_str = virtio_fence_value_str, .timeline_value_str = virtio_timeline_value_str, };...
2015 Mar 24
10
[PATCH] Add virtio gpu driver.
..."%llu", fence->seq); +} + +static void virtio_timeline_value_str(struct fence *f, char *str, int size) +{ + struct virtio_gpu_fence *fence = to_virtio_fence(f); + + snprintf(str, size, "%lu", atomic64_read(&fence->drv->last_seq)); +} + +static const struct fence_ops virtio_fence_ops = { + .get_driver_name = virtio_get_driver_name, + .get_timeline_name = virtio_get_timeline_name, + .enable_signaling = virtio_enable_signaling, + .signaled = virtio_signaled, + .wait = fence_default_wait, + .fence_value_str = virtio_fence_value_str, + .timeli...
2015 Mar 24
10
[PATCH] Add virtio gpu driver.
..."%llu", fence->seq); +} + +static void virtio_timeline_value_str(struct fence *f, char *str, int size) +{ + struct virtio_gpu_fence *fence = to_virtio_fence(f); + + snprintf(str, size, "%lu", atomic64_read(&fence->drv->last_seq)); +} + +static const struct fence_ops virtio_fence_ops = { + .get_driver_name = virtio_get_driver_name, + .get_timeline_name = virtio_get_timeline_name, + .enable_signaling = virtio_enable_signaling, + .signaled = virtio_signaled, + .wait = fence_default_wait, + .fence_value_str = virtio_fence_value_str, + .timeli...
2015 Mar 24
0
[PATCH] Add virtio gpu driver.
...gt; +static void virtio_timeline_value_str(struct fence *f, char *str, int size) > +{ > + struct virtio_gpu_fence *fence = to_virtio_fence(f); > + > + snprintf(str, size, "%lu", atomic64_read(&fence->drv->last_seq)); > +} > + > +static const struct fence_ops virtio_fence_ops = { > + .get_driver_name = virtio_get_driver_name, > + .get_timeline_name = virtio_get_timeline_name, > + .enable_signaling = virtio_enable_signaling, > + .signaled = virtio_signaled, > + .wait = fence_default_wait, > + .fence_value_str = vir...
2015 Mar 24
0
[PATCH] Add virtio gpu driver.
...gt; +static void virtio_timeline_value_str(struct fence *f, char *str, int size) > +{ > + struct virtio_gpu_fence *fence = to_virtio_fence(f); > + > + snprintf(str, size, "%lu", atomic64_read(&fence->drv->last_seq)); > +} > + > +static const struct fence_ops virtio_fence_ops = { > + .get_driver_name = virtio_get_driver_name, > + .get_timeline_name = virtio_get_timeline_name, > + .enable_signaling = virtio_enable_signaling, > + .signaled = virtio_signaled, > + .wait = fence_default_wait, > + .fence_value_str = vir...
2015 May 22
1
[PATCH v3 4/4] Add virtio gpu driver.
..."%llu", fence->seq); +} + +static void virtio_timeline_value_str(struct fence *f, char *str, int size) +{ + struct virtio_gpu_fence *fence = to_virtio_fence(f); + + snprintf(str, size, "%lu", atomic64_read(&fence->drv->last_seq)); +} + +static const struct fence_ops virtio_fence_ops = { + .get_driver_name = virtio_get_driver_name, + .get_timeline_name = virtio_get_timeline_name, + .enable_signaling = virtio_enable_signaling, + .signaled = virtio_signaled, + .wait = fence_default_wait, + .fence_value_str = virtio_fence_value_str, + .timeli...
2015 May 22
1
[PATCH v3 4/4] Add virtio gpu driver.
..."%llu", fence->seq); +} + +static void virtio_timeline_value_str(struct fence *f, char *str, int size) +{ + struct virtio_gpu_fence *fence = to_virtio_fence(f); + + snprintf(str, size, "%lu", atomic64_read(&fence->drv->last_seq)); +} + +static const struct fence_ops virtio_fence_ops = { + .get_driver_name = virtio_get_driver_name, + .get_timeline_name = virtio_get_timeline_name, + .enable_signaling = virtio_enable_signaling, + .signaled = virtio_signaled, + .wait = fence_default_wait, + .fence_value_str = virtio_fence_value_str, + .timeli...
2015 Apr 01
3
[PATCH v2 3/4] Add virtio gpu driver.
..."%llu", fence->seq); +} + +static void virtio_timeline_value_str(struct fence *f, char *str, int size) +{ + struct virtio_gpu_fence *fence = to_virtio_fence(f); + + snprintf(str, size, "%lu", atomic64_read(&fence->drv->last_seq)); +} + +static const struct fence_ops virtio_fence_ops = { + .get_driver_name = virtio_get_driver_name, + .get_timeline_name = virtio_get_timeline_name, + .enable_signaling = virtio_enable_signaling, + .signaled = virtio_signaled, + .wait = fence_default_wait, + .fence_value_str = virtio_fence_value_str, + .timeli...