[RFC 11/14] drm/sched: Connect with dma-fence deadlines

Tvrtko Ursulin tvrtko.ursulin at igalia.com
Thu Jan 9 13:31:04 UTC 2025


On 09/01/2025 11:38, Michel Dänzer wrote:
> On 2024-12-30 17:52, Tvrtko Ursulin wrote:
>>
>> diff --git a/drivers/gpu/drm/scheduler/sched_fence.c b/drivers/gpu/drm/scheduler/sched_fence.c
>> index 0f35f009b9d3..dfc7f50d4e0d 100644
>> --- a/drivers/gpu/drm/scheduler/sched_fence.c
>> +++ b/drivers/gpu/drm/scheduler/sched_fence.c
>> @@ -168,6 +168,8 @@ static void drm_sched_fence_set_deadline_finished(struct dma_fence *f,
>>   
>>   	spin_unlock_irqrestore(&fence->lock, flags);
>>   
>> +	drm_sched_entity_set_deadline(fence->entity, deadline);
> 
> AFAICT sync_file_ioctl_set_deadline passes through the unmodified deadline from user space. If the scheduler uses that directly, all user space can fake unlimited high priority for its jobs via the ioctl?

Yes, that wouldn't be great. I could only allow high priority 
contexts/entities to have their deadlines respected. I hope the uapi 
side of deadlines did not make any hard promises. Well obviously it did 
not since it is not wired up at the moment anyway.

I also need to improve it and pull in the internal deadline to some time 
before the userspace one.

Regards,

Tvrtko


More information about the dri-devel mailing list