Files
linux/drivers/gpu/drm/amd/amdgpu
Jesse.zhang@amd.com 574f4b5562 drm/amdgpu: optimize queue reset and stop logic for sdma_v5_0
This patch refactors the SDMA v5.0 queue reset and stop logic to improve
code readability, maintainability, and performance. The key changes include:

1. **Generalized `sdma_v5_0_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_0_reset_queue` Function**:
   - Removed redundant loops and checks by directly using the `ring->me` field
     to identify the SDMA instance.
   - Reused the `sdma_v5_0_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 <Jesse.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2025-04-21 10:57:04 -04:00
..
2025-04-07 15:18:34 -04:00
2025-04-08 16:48:14 -04:00
2024-07-24 17:30:23 -04:00
2025-03-26 17:44:34 -04:00
2024-11-03 01:28:06 -05:00
2025-02-25 11:45:12 -05:00
2025-02-12 21:05:50 -05:00
2024-01-15 18:35:37 -05:00
2024-01-15 18:35:37 -05:00
2024-01-15 18:35:37 -05:00
2025-04-08 16:48:13 -04:00
2025-04-08 16:48:13 -04:00
2024-07-24 17:30:23 -04:00
2024-07-24 17:30:23 -04:00
2025-04-07 15:18:34 -04:00
2025-04-07 15:18:34 -04:00
2025-04-07 15:18:34 -04:00
2025-04-21 10:55:51 -04:00
2022-05-04 09:53:12 -04:00
2023-08-07 16:35:38 -04:00
2022-05-04 10:43:54 -04:00
2022-05-10 17:53:11 -04:00
2023-03-15 18:45:26 -04:00
2023-03-15 18:45:26 -04:00
2023-08-30 15:00:27 -04:00
2025-03-13 23:08:51 -04:00
2021-10-20 11:43:57 -04:00
2022-03-22 10:53:39 -04:00
2025-04-08 16:48:14 -04:00
2025-04-08 16:48:14 -04:00
2025-03-26 17:44:34 -04:00
2025-03-05 10:37:13 -05:00
2025-03-05 10:37:13 -05:00
2023-08-31 16:34:05 -04:00