[PATCH] accel/amdxdna: Refactor hardware context destroy routine
Jeffrey Hugo
quic_jhugo at quicinc.com
Fri Jan 31 17:37:02 UTC 2025
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.hou at amd.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo at quicinc.com>
More information about the dri-devel
mailing list