diff mbox series

[RFC,v2,01/13] drm/i915: Use provided dma_fence_is_chain

Message ID 20250509153352.7187-2-tvrtko.ursulin@igalia.com
State New
Headers show
Series Some (drm_sched_|dma_)fence lifetime issues | expand

Commit Message

Tvrtko Ursulin May 9, 2025, 3:33 p.m. UTC
Replace open-coded helper with the subsystem one.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_wait.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Christian König May 12, 2025, 8:05 a.m. UTC | #1
On 5/9/25 17:47, Matthew Brost wrote:
> On Fri, May 09, 2025 at 04:33:40PM +0100, Tvrtko Ursulin wrote:
>> Replace open-coded helper with the subsystem one.
>>
> 
> You probably can just send this one by itself as it good cleanup and
> independent.
> 
> Reviewed-by: Matthew Brost <matthew.brost@intel.com>

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

Any objections that I start to push those patches to drm-misc-next or do you want to take this one through the i915 branch?

Regards,
Christian.

> 
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
>> ---
>>  drivers/gpu/drm/i915/gem/i915_gem_wait.c | 7 +------
>>  1 file changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
>> index 7127e90c1a8f..991666fd9f85 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_wait.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
>> @@ -106,11 +106,6 @@ static void fence_set_priority(struct dma_fence *fence,
>>  	rcu_read_unlock();
>>  }
>>  
>> -static inline bool __dma_fence_is_chain(const struct dma_fence *fence)
>> -{
>> -	return fence->ops == &dma_fence_chain_ops;
>> -}
>> -
>>  void i915_gem_fence_wait_priority(struct dma_fence *fence,
>>  				  const struct i915_sched_attr *attr)
>>  {
>> @@ -126,7 +121,7 @@ void i915_gem_fence_wait_priority(struct dma_fence *fence,
>>  
>>  		for (i = 0; i < array->num_fences; i++)
>>  			fence_set_priority(array->fences[i], attr);
>> -	} else if (__dma_fence_is_chain(fence)) {
>> +	} else if (dma_fence_is_chain(fence)) {
>>  		struct dma_fence *iter;
>>  
>>  		/* The chain is ordered; if we boost the last, we boost all */
>> -- 
>> 2.48.0
>>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
index 7127e90c1a8f..991666fd9f85 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_wait.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
@@ -106,11 +106,6 @@  static void fence_set_priority(struct dma_fence *fence,
 	rcu_read_unlock();
 }
 
-static inline bool __dma_fence_is_chain(const struct dma_fence *fence)
-{
-	return fence->ops == &dma_fence_chain_ops;
-}
-
 void i915_gem_fence_wait_priority(struct dma_fence *fence,
 				  const struct i915_sched_attr *attr)
 {
@@ -126,7 +121,7 @@  void i915_gem_fence_wait_priority(struct dma_fence *fence,
 
 		for (i = 0; i < array->num_fences; i++)
 			fence_set_priority(array->fences[i], attr);
-	} else if (__dma_fence_is_chain(fence)) {
+	} else if (dma_fence_is_chain(fence)) {
 		struct dma_fence *iter;
 
 		/* The chain is ordered; if we boost the last, we boost all */