DMA_FENCE_OUT_CMD:将driver创建的dma-fence通过fd的方式导出到user层 DMA_FENCE_SIGNAL_CMD:对driver创建的dma-fence调用signal操作 1.内核中对dma-fence初始化: static DEFINE_SPINLOCK(fence_lock); static void dma_fence_cb(struct dma_fence *f, struct dma_fence_cb *cb) { printk("dma-fence callbac...
wait_queue_head_t poll; struct dma_buf_poll_cb_t { // related with poll in userspace struct dma_fence_cb cb; wait_queue_head_t *poll; __poll_t active; } cb_excl, cb_shared; }; dma_buf_attachment 将importer device与dma buf关联起来的结构,dma_buf_attach中将dma_buf与device关联起来...
在等待前Gpu scheduler会注册一个新的回调接口dma_fence_cb到in fence上(其中包含唤醒Gpu scheduler调度程序的代码),当in fence被signal时,这个callback会被调用,在其中再次唤醒对该job的调度。 一个job有两个out fence:scheduled 和finished,当scheduled fence被signaled,表明该job要被发送到GPU上,当finished fence被...
intdma_fence_signal_timestamp_locked(structdma_fence*fence, ktime_ttimestamp) { structdma_fence_cb*cur,*tmp; structlist_headcb_list; Expand All@@ -341,7 +344,7 @@ int dma_fence_signal_locked(struct dma_fence *fence) /* Stash the cb_list before replacing it with the timestamp */...
dma-fence-unwrap.h dma-fence.h dma-heap.h dma-map-ops.h dma-mapping.h dma-resv.h dmaengine.h dmapool.h dmar.h dmi.h dnotify.h dns_resolver.h dpll.h dqblk_qtree.h dqblk_v1.h dqblk_v2.h drbd.h drbd_config.h drbd_genl.h drbd_genl_api.h drbd_limits...
structfence_cbcb; wait_queue_head_t*poll; unsignedlongactive; }cb_excl, cb_shared; }; dma_buf对象中最重要的成员变量是ops方法集,dma_buf本身是一个通用的框架,正是依靠这里的ops回调函数集来实现dma_buf对象的重载功能,所谓重载就是 说dma_buf框架可以用于不同的运用场景。所以ops定义的回调函数是我们...
# CONFIG_FENCE_TRACE is not set +CONFIG_DMA_CMA=y + +# +# Default contiguous memory area size: +# +CONFIG_CMA_SIZE_MBYTES=16 +CONFIG_CMA_SIZE_SEL_MBYTES=y +# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set +# CONFIG_CMA_SIZE_SEL_MIN is not set ...
*/ static void dma_buf_poll_cb(struct dma_fence *fence, struct dma_fence_cb *cb) { struct dma_buf_poll_cb_t *dcb = (struct dma_buf_poll_cb_t *)cb; struct dma_buf *dmabuf = container_of(dcb->poll, struct dma_buf, poll); unsigned long flags; spin_lock_irqsave(&dcb->poll...
/ include / linux / dma-buf.h v6 v6.14 v6.13 v6.13.7 v6.13.6 v6.13.5 v6.13.4 v6.13.3 v6.13.2 v6.13.1 v6.13 v6.13-rc7 v6.13-rc6 v6.13-rc5 v6.13-rc4 v6.13-rc3 v6.13-rc2 v6.13-rc1 v6.12
dma-buf/dma-fence: Add deadline awareness Browse files Add a way to hint to the fence signaler of an upcoming deadline, such as vblank, which the fence waiter would prefer not to miss. This is to aid the fence signaler in making power management decisions, like boosting frequency as ...