search for: dma_fence_init

Displaying 7 results from an estimated 7 matches for "dma_fence_init".

2016 Dec 13
0
[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()
...e *fence; > + unsigned long irq_flags; > + > + 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, &...
2016 Dec 12
6
[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()
...&vgdev->fence_drv; + struct virtio_gpu_fence *fence; + unsigned long irq_flags; + + 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); + + return fence; +} + int virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev, struct virtio_gpu_ctrl_hdr *cmd_hdr, - struct v...
2016 Dec 12
6
[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()
...&vgdev->fence_drv; + struct virtio_gpu_fence *fence; + unsigned long irq_flags; + + 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); + + return fence; +} + int virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev, struct virtio_gpu_ctrl_hdr *cmd_hdr, - struct v...
2019 Jul 19
0
[PATCH AUTOSEL 5.2 005/171] drm/virtio: set seqno for dma-fence
..._gpu_fence *virtio_gpu_fence_alloc(struct 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; + f...
2019 Jul 19
0
[PATCH AUTOSEL 5.1 004/141] drm/virtio: set seqno for dma-fence
..._gpu_fence *virtio_gpu_fence_alloc(struct 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; + f...
2018 Jan 11
0
[PATCH 1/3] gpu: host1x: Add support for DMA fences
...ERNEL); + if (!waiter) { + kfree(f); + return NULL; + } + + f->host = host; + f->syncpt = syncpt; + f->threshold = threshold; + f->waiter = NULL; + snprintf(f->timeline_name, ARRAY_SIZE(f->timeline_name), + "%d", syncpt->id); + + spin_lock_init(&f->lock); + dma_fence_init(&f->base, &host1x_fence_ops, &f->lock, + host->fence_ctx_base + syncpt->id, threshold); + + err = host1x_intr_add_action(f->host, f->syncpt->id, f->threshold, + HOST1X_INTR_ACTION_SIGNAL_FENCE, f, + waiter, &f->waiter); + if (err) {...
2018 Jan 11
6
[PATCH 0/3] drm/tegra: Add support for fence FDs
From: Thierry Reding <treding at nvidia.com> This set of patches adds support for fences to Tegra DRM and complements the fence FD support for Nouveau. Technically this isn't necessary for a fence-based synchronization loop with Nouveau because the KMS core takes care of all that, but engines behind host1x can use the IOCTL extensions provided here to emit fence FDs that in turn can be