On 1/24/2025 10:35 AM, Lizhi Hou wrote:
It is required by firmware to wait up to 2 seconds for pending commands
before sending the destroy hardware context command. After 2 seconds
wait, if there are still pending commands, driver needs to cancel them.

So the context destroy steps need to be:
   1. Stop drm scheduler. (drm_sched_entity_destroy)
   2. Wait up to 2 seconds for pending commands.
   3. Destroy hardware context and cancel the rest pending requests.
   4. Wait all jobs associated with the hwctx are freed.
   5. Free job resources.

Signed-off-by: Lizhi Hou <lizhi....@amd.com>

Pushed to drm-misc-next.

-Jeff

Reply via email to