[PATCH 1/4] dma-buf: fix incorrect dma-fence documentation

Dmitry Osipenko dmitry.osipenko at collabora.com
Mon Feb 17 20:12:00 UTC 2025


On 2/11/25 19:31, Christian König wrote:
> diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h
> index e7ad819962e3..e230af0d123f 100644
> --- a/include/linux/dma-fence.h
> +++ b/include/linux/dma-fence.h
> @@ -169,8 +169,8 @@ struct dma_fence_ops {
>  	 * implementation know that there is another driver waiting on the
>  	 * signal (ie. hw->sw case).
>  	 *
> -	 * This function can be called from atomic context, but not
> -	 * from irq context, so normal spinlocks can be used.
> +	 * This is called with irq's disabled, so only spinlocks which also
> +	 * disable irq's can be used.

Nit:

The description sounds a bit cryptic to me. I'd add ".. so only
spinlocks which disable IRQ's can be used in the code outside of this
callback".

Note that I removed the word 'also' because disabling IRQs isn't
necessary for a spinlock taken within interrupt context because IRQs are
already disabled there.

-- 
Best regards,
Dmitry


More information about the dri-devel mailing list