On Wed, 2026-12-02 at 12:34 +0100, Boris Brezillon wrote:
> 

[…]

> +/**
> + * drm_sched_job_add_dependency_unwrapped - unwrap the fence (if this is a
> + * container) and add the resulting fences as job dependencies
> + * @job: scheduler job to add the dependencies to
> + * @fence: the dma_fence to add to the list of dependencies.

Not entirely true, this is the container containing the dependencies,
not the actual dependency. Right?

Maybe just call  it "dependencies" or "deps" and below "fence" then
singular, "dep"?

> + *
> + * Note that @fence is consumed in both the success and error cases.
> + *
> + * Returns:

same nit, "Return: "

> + * 0 on success, or an error on failing to expand the array.
> + */
> +int drm_sched_job_add_dependency_unwrapped(struct drm_sched_job *job,
> +                                        struct dma_fence *fence)
> +{
> +     struct dma_fence *inner_fence;
> +     int ret;
> +
> +     dma_fence_unwrap_for_each(inner_fence, fence) {
> +             ret = drm_sched_job_add_dependency(job, 
> dma_fence_get(inner_fence));
> +             if (ret)
> +                     break;
> +     }
> +
> +     dma_fence_put(fence);
> +     return ret;
> +}
> +EXPORT_SYMBOL(drm_sched_job_add_dependency_unwrapped);


But makes sense to me.

With the docu:

Reviewed-by: Philipp Stanner <[email protected]>

Reply via email to