Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] Removing `amdgpu_ttm_disable_buffer_funcs` during system suspend leaves hardware-accelerated memory moves enabled, causing TTM to submit SDMA jobs while the SDMA hardware is suspended or fence interrupts are disabled. --
--- Patch [3]: [PATCH v3 3/3] drm/amdgpu: remove useless enable/disable of ttm buffer funcs --- commit fbef8cb928db8ff229937f5e75fbde6b525226c0 Author: Pierre-Eric Pelloux-Prayer <[email protected]> drm/amdgpu: remove useless enable/disable of ttm buffer funcs This commit removes calls to amdgpu_ttm_disable_buffer_funcs and amdgpu_ttm_enable_buffer_funcs, indicating they are redundant outside of device startup and teardown. > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > index 1ec3162cb1750..e966e6f7d2fa6 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > @@ -3379,8 +3379,6 @@ static int amdgpu_device_ip_resume(struct amdgpu_device > *adev) > > r = amdgpu_device_ip_resume_phase2(adev); > > - amdgpu_ttm_enable_buffer_funcs(adev); > - > if (r) > return r; [Severity: High] Does removing this call in amdgpu_device_ip_resume() cause BO moves triggered in earlier phases to hang? If enablement is not explicitly delayed to this safe point, TTM might attempt to use SDMA before it is fully ready, such as during SR-IOV late reinit where DCE resumes before SDMA. [ ... ] > @@ -4511,8 +4509,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool > notify_clients) > if (r) > goto unwind_userq; > > - amdgpu_ttm_disable_buffer_funcs(adev); > - > amdgpu_fence_driver_hw_fini(adev); [Severity: High] Does removing amdgpu_ttm_disable_buffer_funcs() in amdgpu_device_suspend() leave hardware-accelerated memory moves enabled while the hardware is being suspended? During system suspend, resume, or GPU reset, BO memory moves can still occur. If TTM buffer functions are not disabled, TTM might submit BO moves to the SDMA hardware while it is suspended, or while fence interrupts are disabled by the subsequent call to amdgpu_fence_driver_hw_fini(). Could this lead to deadlocks from fence timeouts? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=3
