[PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

Christian König christian.koenig at amd.com
Thu Nov 17 09:53:24 UTC 2022


Am 17.11.22 um 03:36 schrieb Dmitry Osipenko:
> Hi,
>
> On 10/14/22 11:46, Christian König wrote:
>> +/* Remove the entity from the scheduler and kill all pending jobs */
>> +static void drm_sched_entity_kill(struct drm_sched_entity *entity)
>> +{
>> +	struct drm_sched_job *job;
>> +	struct dma_fence *prev;
>> +
>> +	if (!entity->rq)
>> +		return;
>> +
>> +	spin_lock(&entity->rq_lock);
>> +	entity->stopped = true;
>> +	drm_sched_rq_remove_entity(entity->rq, entity);
>> +	spin_unlock(&entity->rq_lock);
>> +
>> +	/* Make sure this entity is not used by the scheduler at the moment */
>> +	wait_for_completion(&entity->entity_idle);
> I'm always hitting lockup here using Panfrost driver on terminating
> Xorg. Revering this patch helps. Any ideas how to fix it?
>

Well is the entity idle or are there some unsubmitted jobs left?

Regards,
Christian.


More information about the dri-devel mailing list