diff options
author | Lijo Lazar <lijo.lazar@amd.com> | 2022-02-25 12:24:13 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-03-04 21:03:29 +0300 |
commit | 9e08564727fc7770b30715fb81348aee54fa50c3 (patch) | |
tree | 427cbdaf53bb8bf1ec4387892dcfe703d08a72f4 /drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | |
parent | 90d282582aa709eeadaf33db71e92718c9471e31 (diff) | |
download | linux-9e08564727fc7770b30715fb81348aee54fa50c3.tar.xz |
drm/amdgpu: Refactor mode2 reset logic for v13.0.2
Use IP version and refactor reset logic to apply to a list of devices.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Le Ma <Le.Ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c index 248d64158721..c80af0889773 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c @@ -36,8 +36,8 @@ int amdgpu_reset_init(struct amdgpu_device *adev) { int ret = 0; - switch (adev->asic_type) { - case CHIP_ALDEBARAN: + switch (adev->ip_versions[MP1_HWIP][0]) { + case IP_VERSION(13, 0, 2): ret = aldebaran_reset_init(adev); break; default: @@ -51,8 +51,8 @@ int amdgpu_reset_fini(struct amdgpu_device *adev) { int ret = 0; - switch (adev->asic_type) { - case CHIP_ALDEBARAN: + switch (adev->ip_versions[MP1_HWIP][0]) { + case IP_VERSION(13, 0, 2): ret = aldebaran_reset_fini(adev); break; default: |