[RFC v2 05/13] dma-fence: Add helpers for accessing driver and timeline name

Christian König christian.koenig at amd.com
Mon May 12 08:20:44 UTC 2025


On 5/9/25 17:33, Tvrtko Ursulin wrote:
> Add some helpers in order to enable preventing dma-fence users accessing
> the implementation details directly.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at igalia.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>  include/linux/dma-fence.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h
> index 5bafd0a5f1f1..c814a86087f8 100644
> --- a/include/linux/dma-fence.h
> +++ b/include/linux/dma-fence.h
> @@ -387,6 +387,16 @@ bool dma_fence_remove_callback(struct dma_fence *fence,
>  			       struct dma_fence_cb *cb);
>  void dma_fence_enable_sw_signaling(struct dma_fence *fence);
>  
> +static inline const char *dma_fence_driver_name(struct dma_fence *fence)
> +{
> +	return fence->ops->get_driver_name(fence);
> +}
> +
> +static inline const char *dma_fence_timeline_name(struct dma_fence *fence)
> +{
> +	return fence->ops->get_timeline_name(fence);
> +}
> +
>  /**
>   * dma_fence_is_signaled_locked - Return an indication if the fence
>   *                                is signaled yet.



More information about the Intel-gfx mailing list