aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/gpu/amdgpu
diff options
context:
space:
mode:
authorJesse.zhang@amd.com <Jesse.zhang@amd.com>2025-01-23 16:21:47 +0800
committerAlex Deucher <alexander.deucher@amd.com>2025-02-25 11:43:58 -0500
commitd6e6ea5efbe91466fc2b5943efbeea3a5a0044a7 (patch)
treec1aa6cccdcd9b6ac08b8da5400f8a5972f5bb2f0 /Documentation/gpu/amdgpu
parentdrm/amdgpu/kfd: Add shared SDMA reset functionality with callback support (diff)
downloadlinux-d6e6ea5efbe91466fc2b5943efbeea3a5a0044a7.tar.gz
linux-d6e6ea5efbe91466fc2b5943efbeea3a5a0044a7.zip
drm/amdgpu/sdma: Refactor SDMA reset functionality and add callback support
This patch refactors the SDMA reset functionality in the `sdma_v4_4_2` driver to improve modularity and support shared usage between AMDGPU and KFD. The changes include: 1. **Refactored SDMA Reset Logic**: - Split the `sdma_v4_4_2_reset_queue` function into two separate functions: - `sdma_v4_4_2_stop_queue`: Stops the SDMA queue before reset. - `sdma_v4_4_2_restore_queue`: Restores the SDMA queue after reset. - These functions are now used as callbacks for the shared reset mechanism. 2. **Added Callback Support**: - Introduced a new structure `sdma_v4_4_2_reset_funcs` to hold the stop and restore callbacks. - Added `sdma_v4_4_2_set_reset_funcs` to register these callbacks with the shared reset mechanism using `amdgpu_set_on_reset_callbacks`. 3. **Fixed Reset Queue Function**: - Modified `sdma_v4_4_2_reset_queue` to use the shared `amdgpu_sdma_reset_queue` function, ensuring consistency across the driver. This patch ensures that SDMA reset functionality is more modular, reusable, and aligned with the shared reset mechanism between AMDGPU and KFD. v2: Renamed sdma_v4_4_2_set_reset_funcs to sdma_v4_4_2_set_engine_reset_funcs. Renamed sdma_v4_4_2_reset_funcs to sdma_v4_4_2_engine_reset_funcs.(Alex) Suggested-by: Jiadong Zhu <Jiadong.Zhu@amd.com> Suggested-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'Documentation/gpu/amdgpu')
0 files changed, 0 insertions, 0 deletions