Skip to contentSkip to conversation

drm/amdgpu: do not enable asic reset for raven2

PATCH In review Chen Gong 3 participants 3 messages Feb 17, 2022

Subsystems (2)
lore
Share & tools
lore

Chen Gong

author
#0 lore raw

PATCH 1/1 drm/amdgpu: do not enable asic reset for raven2

The GPU reset function of raven2 is not maintained or tested, so it should be very unstable.

Now the amdgpu_asic_reset function is added to amdgpu_pmops_suspend, which causes the S3 test of raven2 to fail, so the asic_reset of raven2 is ignored here.

---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -2
index 25e1ee2bd2f7..4c6775ff7619 100644
@@ -586,8 +586,8 @@ soc15_asic_reset_method(struct amdgpu_device *adev)
 static int soc15_asic_reset(struct amdgpu_device *adev)
 {
 	/* original raven doesn't have full asic reset */
-	if ((adev->apu_flags & AMD_APU_IS_RAVEN) &&
-	    !(adev->apu_flags & AMD_APU_IS_RAVEN2))
+	if ((adev->apu_flags & AMD_APU_IS_RAVEN) ||
+	    (adev->apu_flags & AMD_APU_IS_RAVEN2))
 		return 0;
 
 	switch (soc15_asic_reset_method(adev)) {
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/1
#1 lore raw

[AMD Official Use Only]

________________________________
From: Gong, Curry <[email protected]>
Sent: Thursday, February 17, 2022 4:07 AM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Gong, Curry <[email protected]>
Subject: [PATCH] drm/amdgpu: do not enable asic reset for raven2

The GPU reset function of raven2 is not maintained or tested, so it should be very unstable.

Now the amdgpu_asic_reset function is added to amdgpu_pmops_suspend, which causes the S3 test of raven2 to fail, so the asic_reset of raven2 is ignored here.

---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -2
index 25e1ee2bd2f7..4c6775ff7619 100644
@@ -586,8 +586,8 @@ soc15_asic_reset_method(struct amdgpu_device *adev)
 static int soc15_asic_reset(struct amdgpu_device *adev)
 {
         /* original raven doesn't have full asic reset */
-       if ((adev->apu_flags & AMD_APU_IS_RAVEN) &&
-           !(adev->apu_flags & AMD_APU_IS_RAVEN2))
+       if ((adev->apu_flags & AMD_APU_IS_RAVEN) ||
+           (adev->apu_flags & AMD_APU_IS_RAVEN2))
                 return 0;
 
         switch (soc15_asic_reset_method(adev)) {

--
2.25.1

Reviewed-by on v1 1/1
#2 lore raw
In reply to Chen Gong
Quoted 8 lines · Chen Gong

The GPU reset function of raven2 is not maintained or tested, so it should be very unstable.

Now the amdgpu_asic_reset function is added to amdgpu_pmops_suspend, which causes the S3 test of raven2 to fail, so the asic_reset of raven2 is ignored here.

I think you want a:

Fixes 6dc8265f9803 ("drm/amdgpu: always reset the asic in suspend (v2)")

With that:

Quoted 19 lines
---
  drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -2
index 25e1ee2bd2f7..4c6775ff7619 100644
@@ -586,8 +586,8 @@ soc15_asic_reset_method(struct amdgpu_device *adev)
  static int soc15_asic_reset(struct amdgpu_device *adev)
  {
  	/* original raven doesn't have full asic reset */
-	if ((adev->apu_flags & AMD_APU_IS_RAVEN) &&
-	    !(adev->apu_flags & AMD_APU_IS_RAVEN2))
+	if ((adev->apu_flags & AMD_APU_IS_RAVEN) ||
+	    (adev->apu_flags & AMD_APU_IS_RAVEN2))
  		return 0;
 
  	switch (soc15_asic_reset_method(adev)) {