[PATCH 10/23] dma-buf: finally make dma_resv_excl_fence private v2
Christian König
ckoenig.leichtzumerken at gmail.com
Tue Apr 5 07:58:24 UTC 2022
Am 23.03.22 um 14:36 schrieb Daniel Vetter:
> On Mon, Mar 21, 2022 at 02:58:43PM +0100, Christian König wrote:
>> Drivers should never touch this directly.
>>
>> v2: fix rebase clash
>>
>> Signed-off-by: Christian König <christian.koenig at amd.com>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
>
> I guess as soon as we have the rdma ack you can land up to this patch?
It also needed the nouveau and vmwgfx acks, but I just pushed it. Finally :)
Christian.
> -Daniel
>
>> ---
>> drivers/dma-buf/dma-resv.c | 6 ++++++
>> include/linux/dma-resv.h | 17 -----------------
>> 2 files changed, 6 insertions(+), 17 deletions(-)
>>
>> diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
>> index c09fd8da0c85..1c9af97fe904 100644
>> --- a/drivers/dma-buf/dma-resv.c
>> +++ b/drivers/dma-buf/dma-resv.c
>> @@ -140,6 +140,12 @@ void dma_resv_fini(struct dma_resv *obj)
>> }
>> EXPORT_SYMBOL(dma_resv_fini);
>>
>> +static inline struct dma_fence *
>> +dma_resv_excl_fence(struct dma_resv *obj)
>> +{
>> + return rcu_dereference_check(obj->fence_excl, dma_resv_held(obj));
>> +}
>> +
>> static inline struct dma_resv_list *dma_resv_shared_list(struct dma_resv *obj)
>> {
>> return rcu_dereference_check(obj->fence, dma_resv_held(obj));
>> diff --git a/include/linux/dma-resv.h b/include/linux/dma-resv.h
>> index 08512c1e215d..20e13f36710a 100644
>> --- a/include/linux/dma-resv.h
>> +++ b/include/linux/dma-resv.h
>> @@ -423,23 +423,6 @@ static inline void dma_resv_unlock(struct dma_resv *obj)
>> ww_mutex_unlock(&obj->lock);
>> }
>>
>> -/**
>> - * dma_resv_excl_fence - return the object's exclusive fence
>> - * @obj: the reservation object
>> - *
>> - * Returns the exclusive fence (if any). Caller must either hold the objects
>> - * through dma_resv_lock() or the RCU read side lock through rcu_read_lock(),
>> - * or one of the variants of each
>> - *
>> - * RETURNS
>> - * The exclusive fence or NULL
>> - */
>> -static inline struct dma_fence *
>> -dma_resv_excl_fence(struct dma_resv *obj)
>> -{
>> - return rcu_dereference_check(obj->fence_excl, dma_resv_held(obj));
>> -}
>> -
>> void dma_resv_init(struct dma_resv *obj);
>> void dma_resv_fini(struct dma_resv *obj);
>> int dma_resv_reserve_shared(struct dma_resv *obj, unsigned int num_fences);
>> --
>> 2.25.1
>>
More information about the dri-devel
mailing list