2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/gpu/drm/amd
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
..
acp drivers/gpu: Fix misalignment in comment block 2024-05-29 14:48:30 -04:00
amdgpu drm/amdgpu: optimize queue reset and stop logic for sdma_v5_0 2025-04-21 10:57:04 -04:00
amdkfd drm/amdkfd: fix a bug of smi event for superuser 2025-04-21 10:54:44 -04:00
amdxcp drm/amd/amdxcp: Fix warnings 2024-05-08 15:17:05 -04:00
display drm/amd/display: Add error check for avi and vendor infoframe setup function 2025-04-21 10:56:13 -04:00
include drm/amdgpu: fix typo in atombios.h 2025-04-21 10:54:24 -04:00
pm drm/amd/pm: Enable host limit metrics support 2025-04-21 10:55:43 -04:00