DRM fence list helpers, V3D CSD support.
Subsystems (4)
cover DRM fence list helpers, V3D CSD support.
The DRM fence list helpers came from needing to fix implicit synchronization on V3D (serious flickering in X11 once you had multiple clients involved), a bug I think I noticed in panfrost, and having recently reviewed lima and liked their model. Compared to lima, I chose to use xarray as the storage, as I think it cleans things up significantly. The last_dep thing is a little gross, but Matthew Wilcox is thinking about giving us an xarray pop function soon that would let us drop that.
Unfortunately, rebasing the V3D side of things to before the job refactor was a bit more work than I was ready for, so I'm resending it and Ccing the Broadcom folks again in the hope that they might be able to review or ack it. I would still accept an ack from anyone willing to do so -- the userspace has been sitting around for a long time at this point, and I'd love to get it merged.
Eric Anholt (7):
drm/v3d: Switch the type of job-> to reduce casting. drm/v3d: Refactor job management.
drm/v3d: Add support for compute shader dispatch. drm/v3d: Drop reservation of a shared slot in the dma-buf
reservations.
drm: Add helpers for setting up an array of dma_fence dependencies. drm/v3d: Add missing implicit synchronization.
drm/lima: Use the drm_gem_fence_array_add helpers for our deps.
drivers/gpu/drm/drm_gem.c | 94 ++++++ drivers/gpu/drm/lima/lima_gem.c | 37 +- drivers/gpu/drm/lima/lima_sched.c | 66 +--- drivers/gpu/drm/lima/lima_sched.h | 6 +- drivers/gpu/drm/v3d/v3d_debugfs.c | 22 ++ drivers/gpu/drm/v3d/v3d_drv.c | 10 +- drivers/gpu/drm/v3d/v3d_drv.h | 104 +++--- drivers/gpu/drm/v3d/v3d_fence.c | 2 + drivers/gpu/drm/v3d/v3d_gem.c | 545 +++++++++++++++++++----------- drivers/gpu/drm/v3d/v3d_irq.c | 24 +- drivers/gpu/drm/v3d/v3d_regs.h | 73 ++++ drivers/gpu/drm/v3d/v3d_sched.c | 380 ++++++++++++++------- drivers/gpu/drm/v3d/v3d_trace.h | 94 ++++++ include/drm/drm_gem.h | 5 + include/uapi/drm/v3d_drm.h | 28 ++ 15 files changed, 1019 insertions(+), 471 deletions(-)
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/7 drm/v3d: Switch the type of job-> to reduce casting.
All consumers wanted drm_gem_object * now.
--- drivers/gpu/drm/v3d/v3d_drv.h | 4 ++-- drivers/gpu/drm/v3d/v3d_gem.c | 42 +++++++++++++---------------------- 2 files changed, 17 insertions(+), 29 deletions(-)
drivers/gpu/drm/v3d/v3d_drv.h +2 -2
@@ -195,7 +195,7 @@ struct v3d_exec_info {struct kref refcount;/* This is the array of BOs that were looked up at the start of exec. */ -struct v3d_bo **bo; +struct drm_gem_object **bo;u32 bo_count;/* List of overflow BOs used in the job that need to be
@@ -223,7 +223,7 @@ struct v3d_tfu_job {struct kref refcount;/* This is the array of BOs that were looked up at the start of exec. */ -struct v3d_bo *bo[4 ]; +struct drm_gem_object *bo[4 ]; };/**
drivers/gpu/drm/v3d/v3d_gem.c +15 -27
123 lines not on this page · raw message
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/7 drm/v3d: Refactor job management.
In reply to Eric AnholtThe CL submission had two jobs embedded in an exec struct. When I added TFU support, I had to replicate some of the exec stuff and some of the job stuff. As I went to add CSD, it became clear that actually what was in exec should just be in the two CL jobs, and it would let us share a lot more code between the 4 queues.
--- drivers/gpu/drm/v3d/v3d_drv.h | 77 +++---- drivers/gpu/drm/v3d/v3d_gem.c | 362 ++++++++++++++++---------------- drivers/gpu/drm/v3d/v3d_irq.c | 8 +- drivers/gpu/drm/v3d/v3d_sched.c | 259 +++++++++++++---------- 4 files changed, 376 insertions(+), 330 deletions(-)
drivers/gpu/drm/v3d/v3d_drv.h +39 -38
@@ -73,8 +73,8 @@ struct v3d_dev {struct work_struct overflow_mem_work; -struct v3d_exec_info *bin_job; -struct v3d_exec_info *render_job; +struct v3d_bin_job *bin_job; +struct v3d_render_job *render_job;struct v3d_tfu_job *tfu_job;struct v3d_queue_state queue[V3D_MAX_QUEUES ];
@@ -123,7 +123,7 @@ struct v3d_bo {struct drm_mm_node node;/* List entry for the BO's position in -* v3d_exec_info->unref_list +* v3d_render_job->unref_list */ struct list_head unref_head; };
@@ -163,7 +163,15 @@ to_v3d_fence(struct dma_fence *fence)struct v3d_job {struct drm_sched_job base; -struct v3d_exec_info *exec; +struct kref refcount; + +struct v3d_dev *v3d; + +/* This is the array of BOs that were looked up at the start +* of submission. +*/ +struct drm_gem_object **bo; +u32 bo_count;/* An optional fence userspace can pass in for the job to depend on. */ struct dma_fence *in_fence;
@@ -171,59 +179,53 @@ struct v3d_job {/* v3d fence to be signaled by IRQ handler when the job is complete. */ struct dma_fence *irq_fence; +/* scheduler fence for when the job is considered complete and +* the BO reservations can be released. +*/ +struct dma_fence *done_fence; + +/* Callback for the freeing of the job on refcount going to 0. */ +void (*free)(struct kref *ref); +}; + +struct v3d_bin_job { +struct v3d_job base; +/* GPU virtual addresses of the start/end of the CL job. */ u32 start, end;u32 timedout_ctca, timedout_ctra; -}; -struct v3d_exec_info { -struct v3d_dev *v3d; +/* Corresponding render job, for attaching our overflow memory. */ +struct v3d_render_job *render; + +/* Submitted tile memory allocation start/size, tile state. */ +u32 qma, qms, qts; +}; -struct v3d_job bin, render; +struct v3d_render_job { +struct v3d_job base; -/* Fence for when the scheduler considers the binner to be -* done, for render to depend on. +/* Optional fence for the binner, to depend on before starting +* our job. */ struct dma_fence *bin_done_fence; -/* Fence for when the scheduler considers the render to be -* done, for when the BOs reservations should be complete. -*/ -struct dma_fence *render_done_fence; - -struct kref refcount; +/* GPU virtual addresses of the start/end of the CL job. */ +u32 start, end; -/* This is the array of BOs that were looked up at the start of exec. */ -struct drm_gem_object **bo; -u32 bo_count; +u32 timedout_ctca, timedout_ctra;/* List of overflow BOs used in the job that need to be * released once the job is complete. */ struct list_head unref_list; - -/* Submitted tile memory allocation start/size, tile state. */ -u32 qma, qms, qts; };struct v3d_tfu_job { -struct drm_sched_job base; +struct v3d_job base;struct drm_v3d_submit_tfu args; - -/* An optional fence userspace can pass in for the job to depend on. */ -struct dma_fence *in_fence; - -/* v3d fence to be signaled by IRQ handler when the job is complete. */ -struct dma_fence *irq_fence; - -struct v3d_dev *v3d; - -struct kref refcount; - -/* This is the array of BOs that were looked up at the start of exec. */ -struct drm_gem_object *bo[4 ]; };/**
@@ -289,8 +291,7 @@ int v3d_submit_tfu_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv);int v3d_wait_bo_ioctl (struct drm_device *dev,void *data,struct drm_file *file_priv); -void v3d_exec_put (struct v3d_exec_info *exec); -void v3d_tfu_job_put (struct v3d_tfu_job *exec); +void v3d_job_put (struct v3d_job *job);void v3d_reset (struct v3d_dev *v3d);void v3d_invalidate_caches (struct v3d_dev *v3d);
drivers/gpu/drm/v3d/v3d_gem.c +182 -180
546 lines not on this page · raw message
drivers/gpu/drm/v3d/v3d_irq.c +4 -4
@@ -62,7 +62,7 @@ v3d_overflow_mem_work(struct work_struct *work) }drm_gem_object_get (obj); -list_add_tail (&bo->unref_head, &v3d->bin_job->unref_list); +list_add_tail (&bo->unref_head, &v3d->bin_job->render->unref_list);spin_unlock_irqrestore (&v3d->job_lock, irqflags);V3D_CORE_WRITE (0 ,V3D_PTB_BPOA , bo->node.start <<PAGE_SHIFT );
@@ -96,7 +96,7 @@ v3d_irq(int irq, void *arg)if (intsts &V3D_INT_FLDONE ) {struct v3d_fence *fence = -to_v3d_fence (v3d->bin_job->bin.irq_fence); +to_v3d_fence (v3d->bin_job->base.irq_fence);trace_v3d_bcl_irq (&v3d->drm, fence->seqno);dma_fence_signal (&fence->base);
@@ -105,7 +105,7 @@ v3d_irq(int irq, void *arg)if (intsts &V3D_INT_FRDONE ) {struct v3d_fence *fence = -to_v3d_fence (v3d->render_job->render.irq_fence); +to_v3d_fence (v3d->render_job->base.irq_fence);trace_v3d_rcl_irq (&v3d->drm, fence->seqno);dma_fence_signal (&fence->base);
@@ -141,7 +141,7 @@ v3d_hub_irq(int irq, void *arg)if (intsts &V3D_HUB_INT_TFUC ) {struct v3d_fence *fence = -to_v3d_fence (v3d->tfu_job->irq_fence); +to_v3d_fence (v3d->tfu_job->base.irq_fence);trace_v3d_tfu_irq (&v3d->drm, fence->seqno);dma_fence_signal (&fence->base);
drivers/gpu/drm/v3d/v3d_sched.c +151 -108
388 lines not on this page · raw message
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/7 drm/v3d: Add support for compute shader dispatch.
In reply to Eric AnholtThe compute shader dispatch interface is pretty simple -- just pass in the regs that userspace has passed us, with no CLs to run. However, with no CL to run it means that we need to do manual cache flushing of the L2 after the HW execution completes (for SSBO, atomic, and image_load_store writes that are the output of compute shaders).
This doesn't yet expose the L2 cache's ability to have a region of the address space not write back to memory (which could be used for shared_var storage).
So far, the Mesa side has been tested on V3D v4.2 simpenrose (passing the ES31 tests), and on the kernel side on 7278 (failing atomic compswap tests in a way that doesn't reproduce on simpenrose).
--- drivers/gpu/drm/v3d/v3d_debugfs.c | 22 +++++ drivers/gpu/drm/v3d/v3d_drv.c | 10 +- drivers/gpu/drm/v3d/v3d_drv.h | 28 +++++- drivers/gpu/drm/v3d/v3d_fence.c | 2 + drivers/gpu/drm/v3d/v3d_gem.c | 155 +++++++++++++++++++++++++++++- drivers/gpu/drm/v3d/v3d_irq.c | 16 ++- drivers/gpu/drm/v3d/v3d_regs.h | 73 ++++++++++++++ drivers/gpu/drm/v3d/v3d_sched.c | 121 +++++++++++++++++++++-- drivers/gpu/drm/v3d/v3d_trace.h | 94 ++++++++++++++++++ include/uapi/drm/v3d_drm.h | 28 ++++++ 10 files changed, 530 insertions(+), 19 deletions(-)
drivers/gpu/drm/v3d/v3d_debugfs.c +22 -0
@@ -58,6 +58,17 @@ static const struct v3d_reg_def v3d_core_reg_defs[] = { REGDEF(V3D_GMP_VIO_ADDR), }; +static const struct v3d_reg_def v3d_csd_reg_defs[] = { +REGDEF (V3D_CSD_STATUS ), +REGDEF (V3D_CSD_CURRENT_CFG0 ), +REGDEF (V3D_CSD_CURRENT_CFG1 ), +REGDEF (V3D_CSD_CURRENT_CFG2 ), +REGDEF (V3D_CSD_CURRENT_CFG3 ), +REGDEF (V3D_CSD_CURRENT_CFG4 ), +REGDEF (V3D_CSD_CURRENT_CFG5 ), +REGDEF (V3D_CSD_CURRENT_CFG6 ), +}; +static int v3d_v3d_debugfs_regs (struct seq_file *m,void *unused) {struct drm_info_node *node = (struct drm_info_node *)m->private;
@@ -89,6 +100,17 @@ static int v3d_v3d_debugfs_regs(struct seq_file *m, void *unused)V3D_CORE_READ (core, v3d_core_reg_defs[i].reg)); } + +if (v3d_has_csd (v3d)) { +for (i =0 ; i <ARRAY_SIZE (v3d_csd_reg_defs); i++) { +seq_printf (m,"core %d %s (0x%04x): 0x%08x\n" , + core, + v3d_csd_reg_defs[i].name, + v3d_csd_reg_defs[i].reg, +V3D_CORE_READ (core, + v3d_csd_reg_defs[i].reg)); + } + } }return 0 ;
drivers/gpu/drm/v3d/v3d_drv.c +7 -3
@@ -7,9 +7,9 @@* This driver supports the Broadcom V3D 3.3 and 4.1 OpenGL ES GPUs. * For V3D 2.x support, see the VC4 driver. * -* Currently only single-core rendering using the binner and renderer, -* along with TFU (texture formatting unit) rendering is supported. -* V3D 4.x's CSD (compute shader dispatch) is not yet supported. +* The V3D GPU includes a tiled render (composed of a bin and render +* pipelines), the TFU (texture formatting unit), and the CSD (compute +* shader dispatch). */ #include <linux/clk.h>
@@ -193,6 +193,9 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data,case DRM_V3D_PARAM_SUPPORTS_TFU : args->value =1 ;return 0 ; +case DRM_V3D_PARAM_SUPPORTS_CSD : + args->value =v3d_has_csd (v3d); +return 0 ;default :DRM_DEBUG ("Unknown parameter %d\n" , args->param);return -EINVAL ;
@@ -252,6 +255,7 @@ static const struct drm_ioctl_desc v3d_drm_ioctls[] = {DRM_IOCTL_DEF_DRV (V3D_GET_PARAM , v3d_get_param_ioctl,DRM_RENDER_ALLOW ),DRM_IOCTL_DEF_DRV (V3D_GET_BO_OFFSET , v3d_get_bo_offset_ioctl,DRM_RENDER_ALLOW ),DRM_IOCTL_DEF_DRV (V3D_SUBMIT_TFU , v3d_submit_tfu_ioctl,DRM_RENDER_ALLOW |DRM_AUTH ), + DRM_IOCTL_DEF_DRV(V3D_SUBMIT_CSD, v3d_submit_csd_ioctl, DRM_RENDER_ALLOW | DRM_AUTH), }; static int v3d_dumb_create(struct drm_file *file_priv,
drivers/gpu/drm/v3d/v3d_drv.h +27 -1
@@ -17,9 +17,11 @@ enum v3d_queue { V3D_BIN,V3D_RENDER ,V3D_TFU , +V3D_CSD , + V3D_CACHE_CLEAN, }; -#define V3D_MAX_QUEUES (V3D_TFU + 1) +#define V3D_MAX_QUEUES (V3D_CACHE_CLEAN + 1)struct v3d_queue_state {struct drm_gpu_scheduler sched;
@@ -76,6 +78,7 @@ struct v3d_dev {struct v3d_bin_job *bin_job;struct v3d_render_job *render_job;struct v3d_tfu_job *tfu_job; +struct v3d_csd_job *csd_job;struct v3d_queue_state queue[V3D_MAX_QUEUES ];
@@ -98,6 +101,12 @@ struct v3d_dev {*/ struct mutex sched_lock; +/* Lock taken during a cache clean and when initiating an L2 +* flush, to keep L2 flushes from interfering with the +* synchronous L2 cleans. +*/ +struct mutex cache_clean_lock; +struct {u32 num_allocated;u32 pages_allocated;
@@ -110,6 +119,12 @@ to_v3d_dev(struct drm_device *dev)return (struct v3d_dev *)dev->dev_private; } +static inline bool +v3d_has_csd (struct v3d_dev *v3d) +{ +return v3d->ver >=41 ; +} +/* The per-fd struct, which tracks the MMU mappings. */ struct v3d_file_priv {struct v3d_dev *v3d;
@@ -228,6 +243,14 @@ struct v3d_tfu_job {struct drm_v3d_submit_tfu args; }; +struct v3d_csd_job { +struct v3d_job base; + +u32 timedout_batches; + +struct drm_v3d_submit_csd args; +}; +/** * _wait_for - magic (register) wait macro *
@@ -289,11 +312,14 @@ int v3d_submit_cl_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv);int v3d_submit_tfu_ioctl (struct drm_device *dev,void *data,struct drm_file *file_priv); +int v3d_submit_csd_ioctl (struct drm_device *dev,void *data, +struct drm_file *file_priv);int v3d_wait_bo_ioctl (struct drm_device *dev,void *data,struct drm_file *file_priv);void v3d_job_put (struct v3d_job *job);void v3d_reset (struct v3d_dev *v3d);void v3d_invalidate_caches (struct v3d_dev *v3d); +void v3d_clean_caches (struct v3d_dev *v3d);/* v3d_irq.c */ int v3d_irq_init (struct v3d_dev *v3d);
drivers/gpu/drm/v3d/v3d_fence.c +2 -0
@@ -36,6 +36,8 @@ static const char *v3d_fence_get_timeline_name(struct dma_fence *fence)return "v3d-render" ;case V3D_TFU :return "v3d-tfu" ; +case V3D_CSD : +return "v3d-csd" ;default :return NULL ; }
drivers/gpu/drm/v3d/v3d_gem.c +150 -5
203 lines not on this page · raw message
drivers/gpu/drm/v3d/v3d_irq.c +13 -3
@@ -4,9 +4,9 @@/** * DOC: Interrupt management for the V3D engine * -* When we take a bin, render, or TFU done interrupt, we need to -* signal the fence for that job so that the scheduler can queue up -* the next one and unblock any waiters. +* When we take a bin, render, TFU done, or CSD done interrupt, we +* need to signal the fence for that job so that the scheduler can +* queue up the next one and unblock any waiters. * * When we take the binner out of memory interrupt, we need to * allocate some new memory and pass it to the binner so that the
@@ -20,6 +20,7 @@#define V3D_CORE_IRQS ((u32)(V3D_INT_OUTOMEM | \ V3D_INT_FLDONE | \ V3D_INT_FRDONE | \ + V3D_INT_CSDDONE | \ V3D_INT_GMPV))#define V3D_HUB_IRQS ((u32)(V3D_HUB_INT_MMU_WRV | \
@@ -112,6 +113,15 @@ v3d_irq(int irq, void *arg) status =IRQ_HANDLED ; } +if (intsts &V3D_INT_CSDDONE ) { +struct v3d_fence *fence = +to_v3d_fence (v3d->csd_job->base.irq_fence); + +trace_v3d_csd_irq (&v3d->drm, fence->seqno); +dma_fence_signal (&fence->base); + status =IRQ_HANDLED ; + } +/* We shouldn't be triggering these if we have GMP in * always-allowed mode. */
drivers/gpu/drm/v3d/v3d_regs.h +73 -0
91 lines not on this page · raw message
drivers/gpu/drm/v3d/v3d_sched.c +114 -7
173 lines not on this page · raw message
drivers/gpu/drm/v3d/v3d_trace.h +94 -0
106 lines not on this page · raw message
include/uapi/drm/v3d_drm.h +28 -0
@@ -37,6 +37,7 @@ extern "C" {#define DRM_V3D_GET_PARAM 0x04#define DRM_V3D_GET_BO_OFFSET 0x05#define DRM_V3D_SUBMIT_TFU 0x06 +#define DRM_V3D_SUBMIT_CSD 0x07#define DRM_IOCTL_V3D_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl)#define DRM_IOCTL_V3D_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo)
@@ -45,6 +46,7 @@ extern "C" {#define DRM_IOCTL_V3D_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_PARAM, struct drm_v3d_get_param)#define DRM_IOCTL_V3D_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_BO_OFFSET, struct drm_v3d_get_bo_offset)#define DRM_IOCTL_V3D_SUBMIT_TFU DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_TFU, struct drm_v3d_submit_tfu) +#define DRM_IOCTL_V3D_SUBMIT_CSD DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CSD, struct drm_v3d_submit_csd)/** * struct drm_v3d_submit_cl - ioctl argument for submitting commands to the 3D
@@ -190,6 +192,7 @@ enum drm_v3d_param {DRM_V3D_PARAM_V3D_CORE0_IDENT1 ,DRM_V3D_PARAM_V3D_CORE0_IDENT2 ,DRM_V3D_PARAM_SUPPORTS_TFU , + DRM_V3D_PARAM_SUPPORTS_CSD, }; struct drm_v3d_get_param {
@@ -230,6 +233,31 @@ struct drm_v3d_submit_tfu {__u32 out_sync; }; +/* Submits a compute shader for dispatch. This job will block on any +* previous compute shaders submitted on this fd, and any other +* synchronization must be performed with in_sync/out_sync. +*/ +struct drm_v3d_submit_csd { +__u32 cfg[7 ]; +__u32 coef[4 ]; + +/* Pointer to a u32 array of the BOs that are referenced by the job. +*/ +__u64 bo_handles; + +/* Number of BO handles passed in (size is that times 4). */ +__u32 bo_handle_count; + +/* sync object to block on before running the CSD job. Each +* CSD job will execute in the order submitted to its FD. +* Synchronization against rendering/TFU jobs or CSD from +* other fds requires using sync objects. +*/ +__u32 in_sync; +/* Sync object to signal when the CSD job is done. */ +__u32 out_sync; +}; +#if defined(__cplusplus) }#endif
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/7 drm/v3d: Drop reservation of a shared slot in the dma-buf reservations.
In reply to Eric AnholtWe only set the excl (possible-writing) fence pointer and never add a shared (read-only) fence.
--- drivers/gpu/drm/v3d/v3d_gem.c | 12 ------------ 1 file changed, 12 deletions(-)
drivers/gpu/drm/v3d/v3d_gem.c +0 -12
@@ -253,18 +253,6 @@ v3d_lock_bo_reservations(struct drm_gem_object **bos,if (ret)return ret; -/* Reserve space for our shared (read-only) fence references, -* before we commit the CL to the hardware. -*/ -for (i =0 ; i < bo_count; i++) { - ret =reservation_object_reserve_shared (bos[i]->resv,1 ); -if (ret) { -drm_gem_unlock_reservations (bos, bo_count, - acquire_ctx); -return ret; - } - } -return 0 ; }
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 5/7 drm: Add helpers for setting up an array of dma_fence dependencies.
In reply to Eric AnholtI needed to add implicit dependency support for v3d, and Rob Herring has been working on it for panfrost, and I had recently looked at the lima implementation so I think this will be a good intersection of what we all want and simplify our scheduler implementations.
--- drivers/gpu/drm/drm_gem.c | 94 +++++++++++++++++++++++++++++++++++++++ include/drm/drm_gem.h | 5 +++ 2 files changed, 99 insertions(+)
drivers/gpu/drm/drm_gem.c +94 -0
@@ -1311,3 +1311,97 @@ drm_gem_unlock_reservations(struct drm_gem_object **objs, int count,ww_acquire_fini (acquire_ctx); }EXPORT_SYMBOL (drm_gem_unlock_reservations); + +/** +* drm_gem_fence_array_add - Adds the fence to an array of fences to be +* waited on, deduplicating fences from the same context. +* +* @fence_array array of dma_fence * for the job to block on. +* @fence the dma_fence to add to the list of dependencies. +* +* Returns: +* 0 on success, or an error on failing to expand the array. +*/ +int drm_gem_fence_array_add (struct xarray *fence_array, +struct dma_fence *fence) +{ +struct dma_fence *entry; +unsigned long index; +u32 id =0 ; +int ret; + +if (!fence) +return 0 ; + +/* Deduplicate if we already depend on a fence from the same context. +* This lets the size of the array of deps scale with the number of +* engines involved, rather than the number of BOs. +*/ +xa_for_each (fence_array, index, entry) { +if (entry->context != fence->context) +continue ; + +if (dma_fence_is_later (fence, entry)) { +dma_fence_put (entry); +xa_store (fence_array, index, fence,GFP_KERNEL ); + }else { +dma_fence_put (fence); + } +return 0 ; + } + + ret =xa_alloc (fence_array, &id,UINT_MAX , fence,GFP_KERNEL ); +if (ret !=0 ) +dma_fence_put (fence); + +return ret; +} +EXPORT_SYMBOL (drm_gem_fence_array_add); + +/** +* drm_gem_fence_array_add_implicit - Adds the implicit dependencies tracked +* in the GEM object's reservation object to an array of dma_fences for use in +* scheduling a rendering job. +* +* This should be called after drm_gem_lock_reservations() on your array of +* GEM objects used in the job but before updating the reservations with your +* own fences. +* +* @fence_array array of dma_fence * for the job to block on. +* @obj the gem object to add new dependencies from. +* @write whether the job might write the object (so we need to depend on +* shared fences in the reservation object). +*/ +int drm_gem_fence_array_add_implicit (struct xarray *fence_array, +struct drm_gem_object *obj, +bool write) +{ +int ret; +struct dma_fence **fences; +unsigned i, fence_count; + +if (!write) { +struct dma_fence *fence = +reservation_object_get_excl_rcu (obj->resv); + +return drm_gem_fence_array_add (fence_array, fence); + } + + ret =reservation_object_get_fences_rcu (obj->resv,NULL , + &fence_count, &fences); +if (ret || !fence_count) +return ret; + +for (i =0 ; i < fence_count; i++) { + ret =drm_gem_fence_array_add (fence_array, fences[i]); +if (ret) +break ; + } + +for (; i < fence_count; i++) +dma_fence_put (fences[i]); +kfree (fences); +return ret; +} + +EXPORT_SYMBOL (drm_gem_fence_array_add_implicit);
include/drm/drm_gem.h +5 -0
@@ -388,6 +388,11 @@ int drm_gem_lock_reservations(struct drm_gem_object **objs, int count, struct ww_acquire_ctx *acquire_ctx);void drm_gem_unlock_reservations (struct drm_gem_object **objs,int count,struct ww_acquire_ctx *acquire_ctx); +int drm_gem_fence_array_add (struct xarray *fence_array, +struct dma_fence *fence); +int drm_gem_fence_array_add_implicit (struct xarray *fence_array, +struct drm_gem_object *obj, +bool write);int drm_gem_dumb_map_offset (struct drm_file *file,struct drm_device *dev,u32 handle,u64 *offset); int drm_gem_dumb_destroy(struct drm_file *file,
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 6/7 drm/v3d: Add missing implicit synchronization.
In reply to Eric AnholtIt is the expectation of existing userspace (X11 + Mesa, in particular) that jobs submitted to the kernel against a shared BO will get implicitly synchronized by their submission order. If we want to allow clever userspace to disable implicit synchronization, we should do that under its own submit flag (as amdgpu and lima do).
Note that we currently only implicitly sync for the rendering pass, not binning -- if you texture-from-pixmap in the binning vertex shader (vertex coordinate generation), you'll miss out on synchronization.
Fixes flickering when multiple clients are running in parallel, particularly GL apps and compositors.
--- drivers/gpu/drm/v3d/v3d_drv.h | 11 +++--- drivers/gpu/drm/v3d/v3d_gem.c | 62 ++++++++++++++++++++++++--------- drivers/gpu/drm/v3d/v3d_sched.c | 40 +++------------------ 3 files changed, 53 insertions(+), 60 deletions(-)
drivers/gpu/drm/v3d/v3d_drv.h +4 -7
@@ -188,8 +188,10 @@ struct v3d_job {struct drm_gem_object **bo;u32 bo_count; -/* An optional fence userspace can pass in for the job to depend on. */ -struct dma_fence *in_fence; +/* Array of struct dma_fence * to block on before submitting this job. +*/ +struct xarray deps; +unsigned long last_dep;/* v3d fence to be signaled by IRQ handler when the job is complete. */ struct dma_fence *irq_fence;
@@ -221,11 +223,6 @@ struct v3d_bin_job {struct v3d_render_job {struct v3d_job base; -/* Optional fence for the binner, to depend on before starting -* our job. -*/ -struct dma_fence *bin_done_fence; -/* GPU virtual addresses of the start/end of the CL job. */ u32 start, end;
drivers/gpu/drm/v3d/v3d_gem.c +45 -17
133 lines not on this page · raw message
drivers/gpu/drm/v3d/v3d_sched.c +4 -36
@@ -74,47 +74,15 @@ v3d_job_dependency(struct drm_sched_job *sched_job, struct drm_sched_entity *s_entity) {struct v3d_job *job =to_v3d_job (sched_job); -struct dma_fence *fence; - - fence = job->in_fence; -if (fence) { - job->in_fence =NULL ; -return fence; - }/* XXX: Wait on a fence for switching the GMP if necessary, * and then do so. */ -return NULL ; -} +if (!xa_empty (&job->deps)) +return xa_erase (&job->deps, job->last_dep++); -/** -* Returns the fences that the render job depends on, one by one. -* v3d_job_run() won't be called until all of them have been signaled. -*/ -static struct dma_fence * -v3d_render_job_dependency (struct drm_sched_job *sched_job, -struct drm_sched_entity *s_entity) -{ -struct v3d_render_job *job =to_render_job (sched_job); -struct dma_fence *fence; - - fence =v3d_job_dependency (sched_job, s_entity); -if (fence) -return fence; - -/* If we had a bin job, the render job definitely depends on -* it. We first have to wait for bin to be scheduled, so that -* its done_fence is created. -*/ - fence = job->bin_done_fence; -if (fence) { - job->bin_done_fence =NULL ; -return fence; - } - -return fence; +return NULL ; }static struct dma_fence *v3d_bin_job_run (struct drm_sched_job *sched_job)
@@ -394,7 +362,7 @@ static const struct drm_sched_backend_ops v3d_bin_sched_ops = { };static const struct drm_sched_backend_ops v3d_render_sched_ops = { - .dependency = v3d_render_job_dependency, + .dependency = v3d_job_dependency, .run_job = v3d_render_job_run, .timedout_job = v3d_render_job_timedout, .free_job = v3d_job_free,
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 7/7 drm/lima: Use the drm_gem_fence_array_add helpers for our deps.
In reply to Eric AnholtI haven't tested this, but it's a pretty direct port of what I did for v3d.
--- drivers/gpu/drm/lima/lima_gem.c | 37 +---------------- drivers/gpu/drm/lima/lima_sched.c | 66 ++++++------------------------- drivers/gpu/drm/lima/lima_sched.h | 6 +-- 3 files changed, 16 insertions(+), 93 deletions(-)
drivers/gpu/drm/lima/lima_gem.c +2 -35
@@ -144,40 +144,7 @@ static int lima_gem_sync_bo(struct lima_sched_task *task, struct lima_bo *bo,if (explicit)return 0 ; -/* implicit sync use bo fence in resv obj */ -if (write) { -unsigned nr_fences; -struct dma_fence **fences; -int i; - - err =reservation_object_get_fences_rcu ( - bo->gem.resv,NULL , &nr_fences, &fences); -if (err || !nr_fences) -return err; - -for (i =0 ; i < nr_fences; i++) { - err =lima_sched_task_add_dep (task, fences[i]); -if (err) -break ; - } - -/* for error case free remaining fences */ -for ( ; i < nr_fences; i++) -dma_fence_put (fences[i]); - -kfree (fences); - }else { -struct dma_fence *fence; - - fence =reservation_object_get_excl_rcu (bo->gem.resv); -if (fence) { - err =lima_sched_task_add_dep (task, fence); -if (err) -dma_fence_put (fence); - } - } - -return err; +return drm_gem_fence_array_add_implicit (&task->deps, &bo->gem, write); } static int lima_gem_lock_bos(struct lima_bo **bos, u32 nr_bos,
@@ -250,7 +217,7 @@ static int lima_gem_add_deps(struct drm_file *file, struct lima_submit *submit)if (err)return err; - err =lima_sched_task_add_dep (submit->task, fence); + err =drm_gem_fence_array_add (&submit->task->deps, fence);if (err) {dma_fence_put (fence);return err;
drivers/gpu/drm/lima/lima_sched.c +12 -54
100 lines not on this page · raw message
drivers/gpu/drm/lima/lima_sched.h +2 -4
@@ -14,9 +14,8 @@ struct lima_sched_task {struct lima_vm *vm;void *frame; -struct dma_fence **dep; -int num_dep; -int max_dep; +struct xarray deps; +unsigned long last_dep;struct lima_bo **bos;int num_bos;
@@ -78,7 +77,6 @@ int lima_sched_task_init(struct lima_sched_task *task, struct lima_bo **bos, int num_bos, struct lima_vm *vm);void lima_sched_task_fini (struct lima_sched_task *task); -int lima_sched_task_add_dep (struct lima_sched_task *task,struct dma_fence *fence); int lima_sched_context_init(struct lima_sched_pipe *pipe, struct lima_sched_context *context,
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Qiang Yu
maintainerRe: [PATCH 7/7] drm/lima: Use the drm_gem_fence_array_add helpers for our deps.
Quoted 110 lines · Eric Anholt
I haven't tested this, but it's a pretty direct port of what I did for v3d.
Signed-off-by Eric Anholt <[email protected]>--- drivers/gpu/drm/lima/lima_gem.c | 37 +---------------- drivers/gpu/drm/lima/lima_sched.c | 66 ++++++------------------------- drivers/gpu/drm/lima/lima_sched.h | 6 +-- 3 files changed, 16 insertions(+), 93 deletions(-)drivers/gpu/drm/lima/lima_gem.c +2
-35@@ -144,40 +144,7 @@ static int lima_gem_sync_bo(struct lima_sched_task *task, struct lima_bo *bo,if (explicit)return 0 ; -/* implicit sync use bo fence in resv obj */ -if (write) { -unsigned nr_fences; -struct dma_fence **fences; -int i; - - err =reservation_object_get_fences_rcu ( - bo->gem.resv,NULL , &nr_fences, &fences); -if (err || !nr_fences) -return err; - -for (i =0 ; i < nr_fences; i++) { - err =lima_sched_task_add_dep (task, fences[i]); -if (err) -break ; - } - -/* for error case free remaining fences */ -for ( ; i < nr_fences; i++) -dma_fence_put (fences[i]); - -kfree (fences); - }else { -struct dma_fence *fence; - - fence =reservation_object_get_excl_rcu (bo->gem.resv); -if (fence) { - err =lima_sched_task_add_dep (task, fence); -if (err) -dma_fence_put (fence); - } - } - -return err; +return drm_gem_fence_array_add_implicit (&task->deps, &bo->gem, write); } static int lima_gem_lock_bos(struct lima_bo **bos, u32 nr_bos,@@ -250,7 +217,7 @@ static int lima_gem_add_deps(struct drm_file *file, struct lima_submit *submit)if (err)return err; - err =lima_sched_task_add_dep (submit->task, fence); + err =drm_gem_fence_array_add (&submit->task->deps, fence);if (err) {dma_fence_put (fence);return err;drivers/gpu/drm/lima/lima_sched.c +10
-4@@ -3,6 +3,7 @@#include <linux/kthread.h> #include <linux/slab.h> +#include <linux/xarray.h> #include "lima_drv.h" #include "lima_sched.h" @@ -126,19 +127,24 @@ int lima_sched_task_init(struct lima_sched_task *task, task->num_bos = num_bos; task->vm =lima_vm_get (vm); + +xa_init_flags (&task->deps,XA_FLAGS_ALLOC ); +return 0 ; }void lima_sched_task_fini (struct lima_sched_task *task) { +struct dma_fence *fence; +unsigned long index;int i;drm_sched_job_cleanup (&task->base); -for (i =0 ; i < task->num_dep; i++) -dma_fence_put (task->dep[i]); - -kfree (task->dep); +xa_for_each (&task->deps, index, fence) { +dma_fence_put (fence); + } +xa_destroy (&task->deps);if (task->bos) {for (i =0 ; i < task->num_bos; i++)@@ -149,42 +155,6 @@ void lima_sched_task_fini(struct lima_sched_task *task)lima_vm_put (task->vm); }
drivers/gpu/drm/lima/lima_sched.c void lima_sched_task_fini(struct lima_sched_task *task) · line 160
Quoted 10 lines
drivers/gpu/drm/lima/lima_sched.c +0
-9-int lima_sched_task_add_dep (struct lima_sched_task *task,struct dma_fence *fence) -{ -int i, new_dep =4 ; - -/* same context's fence is definitly earlier then this task */ -if (fence->context == task->base.s_fence->finished.context) { -dma_fence_put (fence); -return 0 ; - }
Seems you dropped this check in the drm_gem_fence_array_add, no bug if we don't have this, but redundant fence will be added in the deps array. Maybe we can add a context parameter to drm_gem_fence_array_add and drm_gem_fence_array_add_implicit to filter out fences from same drm_sched_entity.
Regards,
Qiang
Quoted 81 lines
drivers/gpu/drm/lima/lima_sched.c +2
-41- -if (task->dep && task->num_dep == task->max_dep) - new_dep = task->max_dep *2 ; - -if (task->max_dep < new_dep) { -void *dep =krealloc (task->dep,sizeof (*task->dep) * new_dep,GFP_KERNEL ); - -if (!dep) -return -ENOMEM ; - - task->max_dep = new_dep; - task->dep = dep; - } - -for (i =0 ; i < task->num_dep; i++) { -if (task->dep[i]->context == fence->context && -dma_fence_is_later (fence, task->dep[i])) { -dma_fence_put (task->dep[i]); - task->dep[i] = fence; -return 0 ; - } - } - - task->dep[task->num_dep++] = fence; -return 0 ; -} -int lima_sched_context_init (struct lima_sched_pipe *pipe,struct lima_sched_context *context,atomic_t *guilty)@@ -213,21 +183,9 @@ static struct dma_fence *lima_sched_dependency(struct drm_sched_job *job, struct drm_sched_entity *entity) {struct lima_sched_task *task =to_lima_task (job); -int i; - -for (i =0 ; i < task->num_dep; i++) { -struct dma_fence *fence = task->dep[i]; - -if (!task->dep[i]) -continue ; - - task->dep[i] =NULL ; -if (!dma_fence_is_signaled (fence)) -return fence; - -dma_fence_put (fence); - } +if (!xa_empty (&task->deps)) +return xa_erase (&task->deps, task->last_dep++);return NULL ; }drivers/gpu/drm/lima/lima_sched.h +2
-5@@ -14,9 +14,8 @@ struct lima_sched_task {struct lima_vm *vm;void *frame; -struct dma_fence **dep; -int num_dep; -int max_dep; +struct xarray deps; +unsigned long last_dep;struct lima_bo **bos;int num_bos;@@ -78,7 +77,6 @@ int lima_sched_task_init(struct lima_sched_task *task, struct lima_bo **bos, int num_bos, struct lima_vm *vm);void lima_sched_task_fini (struct lima_sched_task *task); -int lima_sched_task_add_dep (struct lima_sched_task *task,struct dma_fence *fence); int lima_sched_context_init(struct lima_sched_pipe *pipe, struct lima_sched_context *context, --2.20.1
Re: [PATCH 7/7] drm/lima: Use the drm_gem_fence_array_add helpers for our deps.
Quoted 112 lines · Qiang Yu
Quoted 111 lines · Eric Anholt
I haven't tested this, but it's a pretty direct port of what I did for v3d.
Signed-off-by Eric Anholt <[email protected]>--- drivers/gpu/drm/lima/lima_gem.c | 37 +---------------- drivers/gpu/drm/lima/lima_sched.c | 66 ++++++------------------------- drivers/gpu/drm/lima/lima_sched.h | 6 +-- 3 files changed, 16 insertions(+), 93 deletions(-)drivers/gpu/drm/lima/lima_gem.c +2
-35@@ -144,40 +144,7 @@ static int lima_gem_sync_bo(struct lima_sched_task *task, struct lima_bo *bo,if (explicit)return 0 ; -/* implicit sync use bo fence in resv obj */ -if (write) { -unsigned nr_fences; -struct dma_fence **fences; -int i; - - err =reservation_object_get_fences_rcu ( - bo->gem.resv,NULL , &nr_fences, &fences); -if (err || !nr_fences) -return err; - -for (i =0 ; i < nr_fences; i++) { - err =lima_sched_task_add_dep (task, fences[i]); -if (err) -break ; - } - -/* for error case free remaining fences */ -for ( ; i < nr_fences; i++) -dma_fence_put (fences[i]); - -kfree (fences); - }else { -struct dma_fence *fence; - - fence =reservation_object_get_excl_rcu (bo->gem.resv); -if (fence) { - err =lima_sched_task_add_dep (task, fence); -if (err) -dma_fence_put (fence); - } - } - -return err; +return drm_gem_fence_array_add_implicit (&task->deps, &bo->gem, write); } static int lima_gem_lock_bos(struct lima_bo **bos, u32 nr_bos,@@ -250,7 +217,7 @@ static int lima_gem_add_deps(struct drm_file *file, struct lima_submit *submit)if (err)return err; - err =lima_sched_task_add_dep (submit->task, fence); + err =drm_gem_fence_array_add (&submit->task->deps, fence);if (err) {dma_fence_put (fence);return err;drivers/gpu/drm/lima/lima_sched.c +10
-4@@ -3,6 +3,7 @@#include <linux/kthread.h> #include <linux/slab.h> +#include <linux/xarray.h> #include "lima_drv.h" #include "lima_sched.h" @@ -126,19 +127,24 @@ int lima_sched_task_init(struct lima_sched_task *task, task->num_bos = num_bos; task->vm =lima_vm_get (vm); + +xa_init_flags (&task->deps,XA_FLAGS_ALLOC ); +return 0 ; }void lima_sched_task_fini (struct lima_sched_task *task) { +struct dma_fence *fence; +unsigned long index;int i;drm_sched_job_cleanup (&task->base); -for (i =0 ; i < task->num_dep; i++) -dma_fence_put (task->dep[i]); - -kfree (task->dep); +xa_for_each (&task->deps, index, fence) { +dma_fence_put (fence); + } +xa_destroy (&task->deps);if (task->bos) {for (i =0 ; i < task->num_bos; i++)@@ -149,42 +155,6 @@ void lima_sched_task_fini(struct lima_sched_task *task)lima_vm_put (task->vm); }
Quoted 15 lines
drivers/gpu/drm/lima/lima_sched.c void lima_sched_task_fini(struct lima_sched_task *task) · line 160
Quoted 9 lines
drivers/gpu/drm/lima/lima_sched.c +0
-9-int lima_sched_task_add_dep (struct lima_sched_task *task,struct dma_fence *fence) -{ -int i, new_dep =4 ; - -/* same context's fence is definitly earlier then this task */ -if (fence->context == task->base.s_fence->finished.context) { -dma_fence_put (fence); -return 0 ; - }Seems you dropped this check in the
drm_gem_fence_array_add, no bug if we don't have this, but redundant fence will be added in the deps array. Maybe we can add a context parameter todrm_gem_fence_array_addanddrm_gem_fence_array_add_implicitto filter out fences from samedrm_sched_entity.
Does this feel important to you? To me, one extra slot in the array and a trip through the top of drm_sched_entity_add_dependency_cb() doesn't like it's feel worth making the API clumsier.
Qiang Yu
maintainerRe: [PATCH 7/7] drm/lima: Use the drm_gem_fence_array_add helpers for our deps.
Indeed not that important, so patch 5&7 is:
Regards,
Qiang
Quoted 134 lines · Eric Anholt
Quoted 112 lines · Qiang Yu
Quoted 111 lines · Eric Anholt
I haven't tested this, but it's a pretty direct port of what I did for v3d.
Signed-off-by Eric Anholt <[email protected]>--- drivers/gpu/drm/lima/lima_gem.c | 37 +---------------- drivers/gpu/drm/lima/lima_sched.c | 66 ++++++------------------------- drivers/gpu/drm/lima/lima_sched.h | 6 +-- 3 files changed, 16 insertions(+), 93 deletions(-)drivers/gpu/drm/lima/lima_gem.c +2
-35@@ -144,40 +144,7 @@ static int lima_gem_sync_bo(struct lima_sched_task *task, struct lima_bo *bo,if (explicit)return 0 ; -/* implicit sync use bo fence in resv obj */ -if (write) { -unsigned nr_fences; -struct dma_fence **fences; -int i; - - err =reservation_object_get_fences_rcu ( - bo->gem.resv,NULL , &nr_fences, &fences); -if (err || !nr_fences) -return err; - -for (i =0 ; i < nr_fences; i++) { - err =lima_sched_task_add_dep (task, fences[i]); -if (err) -break ; - } - -/* for error case free remaining fences */ -for ( ; i < nr_fences; i++) -dma_fence_put (fences[i]); - -kfree (fences); - }else { -struct dma_fence *fence; - - fence =reservation_object_get_excl_rcu (bo->gem.resv); -if (fence) { - err =lima_sched_task_add_dep (task, fence); -if (err) -dma_fence_put (fence); - } - } - -return err; +return drm_gem_fence_array_add_implicit (&task->deps, &bo->gem, write); } static int lima_gem_lock_bos(struct lima_bo **bos, u32 nr_bos,@@ -250,7 +217,7 @@ static int lima_gem_add_deps(struct drm_file *file, struct lima_submit *submit)if (err)return err; - err =lima_sched_task_add_dep (submit->task, fence); + err =drm_gem_fence_array_add (&submit->task->deps, fence);if (err) {dma_fence_put (fence);return err;drivers/gpu/drm/lima/lima_sched.c +10
-4@@ -3,6 +3,7 @@#include <linux/kthread.h> #include <linux/slab.h> +#include <linux/xarray.h> #include "lima_drv.h" #include "lima_sched.h" @@ -126,19 +127,24 @@ int lima_sched_task_init(struct lima_sched_task *task, task->num_bos = num_bos; task->vm =lima_vm_get (vm); + +xa_init_flags (&task->deps,XA_FLAGS_ALLOC ); +return 0 ; }void lima_sched_task_fini (struct lima_sched_task *task) { +struct dma_fence *fence; +unsigned long index;int i;drm_sched_job_cleanup (&task->base); -for (i =0 ; i < task->num_dep; i++) -dma_fence_put (task->dep[i]); - -kfree (task->dep); +xa_for_each (&task->deps, index, fence) { +dma_fence_put (fence); + } +xa_destroy (&task->deps);if (task->bos) {for (i =0 ; i < task->num_bos; i++)@@ -149,42 +155,6 @@ void lima_sched_task_fini(struct lima_sched_task *task)lima_vm_put (task->vm); }Quoted 15 lines
drivers/gpu/drm/lima/lima_sched.c void lima_sched_task_fini(struct lima_sched_task *task) · line 160
Quoted 9 lines
drivers/gpu/drm/lima/lima_sched.c +0
-9-int lima_sched_task_add_dep (struct lima_sched_task *task,struct dma_fence *fence) -{ -int i, new_dep =4 ; - -/* same context's fence is definitly earlier then this task */ -if (fence->context == task->base.s_fence->finished.context) { -dma_fence_put (fence); -return 0 ; - }Seems you dropped this check in the
drm_gem_fence_array_add, no bug if we don't have this, but redundant fence will be added in the deps array. Maybe we can add a context parameter todrm_gem_fence_array_addanddrm_gem_fence_array_add_implicitto filter out fences from samedrm_sched_entity.Does this feel important to you? To me, one extra slot in the array and a trip through the top of
drm_sched_entity_add_dependency_cb()doesn't like it's feel worth making the API clumsier.
Re: [PATCH 7/7] drm/lima: Use the drm_gem_fence_array_add helpers for our deps.
Quoted 2 lines · Qiang Yu
Indeed not that important, so patch 5&7 is:
Reviewed-and-tested-by Qiang Yu <[email protected]>
Merged these two. Thanks for trying it out!