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

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


Am 17.11.22 um 15:41 schrieb Dmitry Osipenko:
> [SNIP]
>> drm_sched_entity_flush() should be called from the flush callback from
>> the file_operations structure of panfrost. See amdgpu_flush() and
>> amdgpu_ctx_mgr_entity_flush(). This makes sure that we wait for all
>> entities of the process/file descriptor to be flushed out.
>>
>> drm_sched_entity_fini() must be called before you free the memory the
>> entity structure or otherwise we would run into an use after free.
> Right, drm_sched_entity_destroy() invokes these two functions and
> Panfrost uses drm_sched_entity_destroy().

Than I have no idea what's going wrong here.

The scheduler should trivially finish with the entity and call 
complete(&entity->entity_idle) in it's main loop. No idea why this 
doesn't happen. Can you investigate?

Regards,
Christian.


More information about the amd-gfx mailing list