Skip to contentSkip to conversation

drm/amdgpu: Enable mca debug mode mode for apu

PATCH In review Stanley.Yang 3 participants 3 messages Oct 18, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Enable mca debug mode mode for apu

Enable smu_v13_0_6 mca debug mode when GFX RAS feature is enabled on APU.

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +2 -1
index cab5a5569bc6..62589ba3c4a5 100644
@@ -2298,7 +2298,8 @@ static int smu_v13_0_6_post_init(struct smu_context *smu)
 {
 	struct amdgpu_device *adev = smu->adev;
 
-	if (!amdgpu_sriov_vf(adev) && amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__UMC))
+	if (!amdgpu_sriov_vf(adev) && (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__UMC) ||
+		(adev->is_app_apu && amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__GFX))))
 		return smu_v13_0_6_mca_set_debug_mode(smu, true);
 
 	return 0;
Signature · 1 line
2.25.1
#1 lore raw

[AMD Official Use Only - General]

Quoted 7 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Stanley.Yang
Sent: Wednesday, October 18, 2023 8:22 PM
To: [email protected]
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: Enable mca debug mode mode for apu

[Tao] the "mode" is duplicated.

Quoted 21 lines

Enable smu_v13_0_6 mca debug mode when GFX RAS feature is enabled on APU.

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +1 -1
index cab5a5569bc6..62589ba3c4a5 100644
@@ -2298,7 +2298,8 @@ static int smu_v13_0_6_post_init(struct smu_context
 *smu)  {
      struct amdgpu_device *adev = smu->adev;
 
-     if (!amdgpu_sriov_vf(adev) && amdgpu_ras_is_supported(adev,
 AMDGPU_RAS_BLOCK__UMC))
+     if (!amdgpu_sriov_vf(adev) && (amdgpu_ras_is_supported(adev,

AMDGPU_RAS_BLOCK__UMC) ||

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

Quoted 2 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +2 -0
+             (adev->is_app_apu && amdgpu_ras_is_supported(adev,
+AMDGPU_RAS_BLOCK__GFX))))

[Tao] Can "adev->is_app_apu" be dropped?

Quoted 5 lines
              return smu_v13_0_6_mca_set_debug_mode(smu, true);

      return 0;

--
2.25.1

#2 lore raw
In reply to Stanley.Yang

[AMD Official Use Only - General]

Let's not rely on specific IP block. Just check adev->ras_enabled.

Regards,
Hawking

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Stanley.Yang
Sent: Wednesday, October 18, 2023 20:22
To: [email protected]
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: Enable mca debug mode mode for apu

Enable smu_v13_0_6 mca debug mode when GFX RAS feature is enabled on APU.

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +3 -2
index cab5a5569bc6..62589ba3c4a5 100644
@@ -2298,7 +2298,8 @@ static int smu_v13_0_6_post_init(struct smu_context *smu)  {
        struct amdgpu_device *adev = smu->adev;
 
-       if (!amdgpu_sriov_vf(adev) && amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__UMC))
+       if (!amdgpu_sriov_vf(adev) && (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__UMC) ||
+               (adev->is_app_apu && amdgpu_ras_is_supported(adev,
+AMDGPU_RAS_BLOCK__GFX))))
                return smu_v13_0_6_mca_set_debug_mode(smu, true);
 
        return 0;
--

2.25.1