Am 18.03.25 um 13:39 schrieb Danilo Krummrich:
> On Tue, Mar 18, 2025 at 01:03:12PM +0100, Christian König wrote:
>>  /**
>>   * drm_sched_job_add_dependency - adds the fence as a job dependency
>>   * @job: scheduler job to add the dependencies to
>> @@ -878,10 +910,12 @@ int drm_sched_job_add_dependency(struct drm_sched_job 
>> *job,
>>       * engines involved, rather than the number of BOs.
>>       */
>>      xa_for_each(&job->dependencies, index, entry) {
>> -            if (entry->context != fence->context)
>> +            bool signaled = dma_fence_is_signaled(entry);
>> +
>> +            if (!signaled && entry->context != fence->context)
>>                      continue;
>>  
>> -            if (dma_fence_is_later(fence, entry)) {
>> +            if (signaled || dma_fence_is_later(fence, entry)) {
>>                      dma_fence_put(entry);
>>                      xa_store(&job->dependencies, index, fence, GFP_KERNEL);
>>              } else {
>> @@ -890,7 +924,8 @@ int drm_sched_job_add_dependency(struct drm_sched_job 
>> *job,
>>              return 0;
>>      }
>>  
>> -    ret = xa_alloc(&job->dependencies, &id, fence, xa_limit_32b, 
>> GFP_KERNEL);
>> +    ret = xa_alloc(&job->dependencies, &id, fence, xa_limit_32b,
>> +                   GFP_KERNEL);
>>      if (ret != 0)
>>              dma_fence_put(fence);
> Those changes seem unrelated, aren't they?

Ah, yes that was just a leftover from a previous try to fix this.

Thanks,
Christian.

Reply via email to