]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amdgpu: Implement SDMA soft reset directly for v5.x
authorJesse.zhang@amd.com <Jesse.zhang@amd.com>
Fri, 11 Apr 2025 07:26:18 +0000 (15:26 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 21 Apr 2025 14:56:54 +0000 (10:56 -0400)
commit5c3e7c49538e2ddad10296a318c225bbb3d37d20
tree355d0c4d3a6c9b5aa79c542a39e4ae7158ff6a7e
parentb22659d5d3520c82295981797e75de525365a411
drm/amdgpu: Implement SDMA soft reset directly for v5.x

This patch introduces a new function `amdgpu_sdma_soft_reset` to handle SDMA soft resets directly,
rather than relying on the DPM interface.

1. **New `amdgpu_sdma_soft_reset` Function**:
   - Implements a soft reset for SDMA engines by directly writing to the hardware registers.
   - Handles SDMA versions 4.x and 5.x separately:
     - For SDMA 4.x, the existing `amdgpu_dpm_reset_sdma` function is used for backward compatibility.
     - For SDMA 5.x, the driver directly manipulates the `GRBM_SOFT_RESET` register to reset the specified SDMA instance.

2. **Integration into `amdgpu_sdma_reset_engine`**:
   - The `amdgpu_sdma_soft_reset` function is called during the SDMA reset process, replacing the previous call to `amdgpu_dpm_reset_sdma`.

v2: r should default to an error (Alex)

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>
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c