diff options
author | Jesse.zhang@amd.com <Jesse.zhang@amd.com> | 2024-11-05 15:22:56 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-11-08 11:08:01 -0500 |
commit | 6c8d1f4b042e706ccd7575beb0397a75d545d71b (patch) | |
tree | cab0149c597e5d4ae2d22c5e82aebab72c387ac9 /drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | |
parent | f4a3246a2c7a595161f1ba11db53639b7f580104 (diff) | |
download | linux-6c8d1f4b042e706ccd7575beb0397a75d545d71b.tar.gz linux-6c8d1f4b042e706ccd7575beb0397a75d545d71b.tar.bz2 linux-6c8d1f4b042e706ccd7575beb0397a75d545d71b.zip |
drm/amdgpu: Add sysfs interface for gc reset mask
Add two sysfs interfaces for gfx and compute:
gfx_reset_mask
compute_reset_mask
These interfaces are read-only and show the resets supported by the IP.
For example, full adapter reset (mode1/mode2/BACO/etc),
soft reset, queue reset, and pipe reset.
V2: the sysfs node returns a text string instead of some flags (Christian)
v3: add a generic helper which takes the ring as parameter
and print the strings in the order they are applied (Christian)
check amdgpu_gpu_recovery before creating sysfs file itself,
and initialize supported_reset_types in IP version files (Lijo)
v4: Fixing uninitialized variables (Tim)
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c index 1b99f90cd193..fe7c48f2fb2a 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c @@ -1437,6 +1437,12 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block) } } + /* TODO: Add queue reset mask when FW fully supports it */ + adev->gfx.gfx_supported_reset = + amdgpu_get_soft_full_reset_mask(&adev->gfx.gfx_ring[0]); + adev->gfx.compute_supported_reset = + amdgpu_get_soft_full_reset_mask(&adev->gfx.compute_ring[0]); + if (!adev->enable_mes_kiq) { r = amdgpu_gfx_kiq_init(adev, GFX12_MEC_HPD_SIZE, 0); if (r) { |