drm/amdgpu: Fix vce work queue was not cancelled when suspend
The vce cancel_delayed_work_sync never be called.
driver call the function in error path.
This caused s3 hang on A+A when runtime pm enebled.
As the smu will be visited in the idle queue, this will cause
smu hang because the dgpu may be in suspend, and the dgpu
will be waked up. As the smu has been hang, so the dgpu resume
will failed.
Reviewed-by: Christian König <email address hidden>
Reviewed-by: Feifei Xu <email address hidden>
Signed-off-by: Rex Zhu <email address hidden>
Cherry-picked-by: Jack Gui <email address hidden>
To avoid the tlb flush not interrupted by world switch, use kiq and one
command to do tlb invalidate.
v2:
Refine the invalidate lock position.
Signed-off-by: Emily Deng <email address hidden>
Reviewed-and-Tested-by: Rex Zhu <email address hidden>
Reviewed-by: Christian König <email address hidden>
Signed-off-by: Alex Deucher <email address hidden>
drm/amdgpu/gmc9: use amdgpu_ring_emit_reg_write_reg_wait in gpu tlb flush
Use amdgpu_ring_emit_reg_write_reg_wait. On engines that support it,
it provides a write and wait in a single packet which avoids a missed
ack if a world switch happens between the request and waiting for the
ack.
Reviewed-by: Huang Rui <email address hidden>
Reviewed-by: Christian König <email address hidden>
Signed-off-by: Alex Deucher <email address hidden>
drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback (v2)
This adds support for writing and reading back in a single
oneshot packet. This is needed to send a tlb invalidation
and wait for ack in a single operation.
v2: squash the gfx ring stall fix
Reviewed-by: Huang Rui <email address hidden>
Reviewed-by: Christian König <email address hidden>
Signed-off-by: Alex Deucher <email address hidden>
Signed-off-by: Emily Deng <email address hidden>