diff options
| author | [email protected] <[email protected]> | 2025-04-16 06:13:30 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-04-21 14:57:07 +0000 |
| commit | 6a07ac702f022dc85b186e7d2bec6216a0c260b0 (patch) | |
| tree | 15bbf295e7b9f423e24fdeb146ec392bd6131939 /drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | |
| parent | drm/amdgpu: optimize queue reset and stop logic for sdma_v5_0 (diff) | |
| download | kernel-6a07ac702f022dc85b186e7d2bec6216a0c260b0.tar.gz kernel-6a07ac702f022dc85b186e7d2bec6216a0c260b0.zip | |
drm/amdgpu: optimize queue reset and stop logic for sdma_v5_2
This patch refactors the SDMA v5.2 queue reset and stop logic to improve
code readability, maintainability, and performance. The key changes include:
1. **Generalized `sdma_v5_2_gfx_stop` Function**:
- Added an `inst_mask` parameter to allow stopping specific SDMA instances
instead of all instances. This is useful for resetting individual queues.
2. **Simplified `sdma_v5_2_reset_queue` Function**:
- Removed redundant loops and checks by directly using the `ring->me` field
to identify the SDMA instance.
- Reused the `sdma_v5_2_gfx_stop` function to stop the queue, reducing code
duplication.
v1: The general coding style is to declare variables like "i" or "r" last. E.g. longest lines first and short lasts. (Chritian)
Signed-off-by: Jesse Zhang <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c')
0 files changed, 0 insertions, 0 deletions
