aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
diff options
context:
space:
mode:
authorLijo Lazar <[email protected]>2022-02-25 09:24:13 +0000
committerAlex Deucher <[email protected]>2022-03-04 18:03:29 +0000
commit9e08564727fc7770b30715fb81348aee54fa50c3 (patch)
tree427cbdaf53bb8bf1ec4387892dcfe703d08a72f4 /drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
parentdrm/amd/display: 3.2.175 (diff)
downloadkernel-9e08564727fc7770b30715fb81348aee54fa50c3.tar.gz
kernel-9e08564727fc7770b30715fb81348aee54fa50c3.zip
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 <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c8
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: