AMD General Hi,
Please help me review the attached patch. A gfx hang that occurs 2 out of 400 times when performing S3 cycles. The issue is seen with the kernel version 6.18.8 and on AMD hardware; Picasso gfx9 APU. When going to S3 suspend, the driver checks whether GPU has completed its tasks, but it doesn't wait for jobs that are submitted to the scheduler. As a result, queued up jobs slip into the ring and are lost when WPTR is set to 0. On wake up, we hit a timeout followed by a hang. The fix is to wait for all scheduled task to finish before going to S3. I tested the patch and the issue is not seen again. Thanks, Tharshan
0001-drm-amdgpu-dma-wait-on-scheduled-tasks-before-suspen.patch
Description: 0001-drm-amdgpu-dma-wait-on-scheduled-tasks-before-suspen.patch
