Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Add GFX 9.5.0 support for per-queue/pipe reset

This patch enables per-queue and per-pipe reset functionality for
GFX IP v9.5.0 when using MEC firmware version 21 (0x15) or later.

This change:
1. Refactors the pipe reset support check in gfx_v9_4_3_pipe_reset_support()
to use the compute_supported_reset flags instead of hardcoding
version checks.
2. Adds support for GFX9.5.0 (IP 9.5.0) with MEC firmware version >= 21
to enable per-queue and per-pipe reset capabilities.

v2: Replaced mec version check with !!(adev->gfx.compute_supported_reset & AMDGPU_RESET_TYPE_PER_PIPE) (Lijo)

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Jesse Zhang <jesse.zhang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Jesse.Zhang and committed by
Alex Deucher
3b636026 5d6fddac

+7 -3
+7 -3
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
··· 1153 1153 adev->gfx.compute_supported_reset |= AMDGPU_RESET_TYPE_PER_PIPE; 1154 1154 } 1155 1155 break; 1156 + case IP_VERSION(9, 5, 0): 1157 + if (adev->gfx.mec_fw_version >= 21) { 1158 + adev->gfx.compute_supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE; 1159 + adev->gfx.compute_supported_reset |= AMDGPU_RESET_TYPE_PER_PIPE; 1160 + } 1161 + break; 1156 1162 default: 1157 1163 break; 1158 1164 } ··· 3458 3452 3459 3453 static bool gfx_v9_4_3_pipe_reset_support(struct amdgpu_device *adev) 3460 3454 { 3461 - /*TODO: Need check gfx9.4.4 mec fw whether supports pipe reset as well.*/ 3462 - if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 3) && 3463 - adev->gfx.mec_fw_version >= 0x0000009b) 3455 + if (!!(adev->gfx.compute_supported_reset & AMDGPU_RESET_TYPE_PER_PIPE)) 3464 3456 return true; 3465 3457 else 3466 3458 dev_warn_once(adev->dev, "Please use the latest MEC version to see whether support pipe reset\n");