Skip to contentSkip to conversation

drm/amdgpu: Skip SDMA suspend during mode-2 reset

PATCH In review Lijo Lazar 4 participants 5 messages Oct 8, 2025 – Oct 20, 2025

Subsystems (2)
lore
Share & tools
lore

Lijo Lazar

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Skip SDMA suspend during mode-2 reset

For SDMA IP versions > v4.4.2, firmware will take care of quiescing SDMA before mode-2 reset.

---
 drivers/gpu/drm/amd/amdgpu/aldebaran.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/aldebaran.c +4 -0
index 9569dc16dd3d..0007d00b9e8f 100644
@@ -88,6 +88,10 @@ static int aldebaran_mode2_suspend_ip(struct amdgpu_device *adev)
 	uint32_t ip_block;
 	int r, i;
 
+	/* Skip suspend of SDMA IP versions > 4.4.2. They are multi-aid */
+	if (adev->aid_mask)
+		ip_block_mask &= ~BIT(AMD_IP_BLOCK_TYPE_SDMA);
+
 	amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
 	amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
 
Signature · 1 line
2.49.0
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

With minor comment and patch description changes

Thanks & Regards
Asad

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Lijo Lazar
Sent: Wednesday, October 8, 2025 10:34 AM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Deucher, Alexander <[email protected]>; Kamal, Asad <[email protected]>
Subject: [PATCH] drm/amdgpu: Skip SDMA suspend during mode-2 reset

For SDMA IP versions > v4.4.2, firmware will take care of quiescing SDMA before mode-2 reset.

AK: Please change it as >= 4.4.2, same for code comment below

---
 drivers/gpu/drm/amd/amdgpu/aldebaran.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/aldebaran.c +4 -0
index 9569dc16dd3d..0007d00b9e8f 100644
@@ -88,6 +88,10 @@ static int aldebaran_mode2_suspend_ip(struct amdgpu_device *adev)
        uint32_t ip_block;
        int r, i;
 
+       /* Skip suspend of SDMA IP versions > 4.4.2. They are multi-aid */
+       if (adev->aid_mask)
+               ip_block_mask &= ~BIT(AMD_IP_BLOCK_TYPE_SDMA);
+
        amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
        amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
 

--
2.49.0

author Reviewed-by Asad Kamal
#2 lore raw

[Public]

Good catch. Will change the comments before committing.

Thanks,
Lijo
-----Original Message-----
From: Kamal, Asad <[email protected]>
Sent: Wednesday, October 8, 2025 11:25 AM
To: Lazar, Lijo <[email protected]>; [email protected]
Cc: Zhang, Hawking <[email protected]>; Deucher, Alexander <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: Skip SDMA suspend during mode-2 reset

[AMD Official Use Only - AMD Internal Distribution Only]

With minor comment and patch description changes

Thanks & Regards
Asad

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Lijo Lazar
Sent: Wednesday, October 8, 2025 10:34 AM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Deucher, Alexander <[email protected]>; Kamal, Asad <[email protected]>
Subject: [PATCH] drm/amdgpu: Skip SDMA suspend during mode-2 reset

For SDMA IP versions > v4.4.2, firmware will take care of quiescing SDMA before mode-2 reset.

AK: Please change it as >= 4.4.2, same for code comment below

---
 drivers/gpu/drm/amd/amdgpu/aldebaran.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/aldebaran.c +4 -0
index 9569dc16dd3d..0007d00b9e8f 100644
@@ -88,6 +88,10 @@ static int aldebaran_mode2_suspend_ip(struct amdgpu_device *adev)
        uint32_t ip_block;
        int r, i;
 
+       /* Skip suspend of SDMA IP versions > 4.4.2. They are multi-aid */
+       if (adev->aid_mask)
+               ip_block_mask &= ~BIT(AMD_IP_BLOCK_TYPE_SDMA);
+
        amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
        amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
 

--
2.49.0

#3 lore raw
In reply to Lijo Lazar
Quoted 20 lines · Lijo Lazar

For SDMA IP versions > v4.4.2, firmware will take care of quiescing SDMA
before mode-2 reset.

---
 drivers/gpu/drm/amd/amdgpu/aldebaran.c | 4 ++++

 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/aldebaran.c +0 -0
index 9569dc16dd3d..0007d00b9e8f 100644
@@ -88,6 +88,10 @@ static int aldebaran_mode2_suspend_ip(struct
 amdgpu_device *adev)
  	uint32_t ip_block;
  	int r, i;

drivers/gpu/drm/amd/amdgpu/aldebaran.c +1 -0
+	/* Skip suspend of SDMA IP versions > 4.4.2. They are multi-
Quoted 1 line

aid */

What does "multi-aid" mean here?

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/aldebaran.c +3 -0
+	if (adev->aid_mask)
+		ip_block_mask &= ~BIT(AMD_IP_BLOCK_TYPE_SDMA);
+

  amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE); amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);

#4 lore raw
Quoted 21 lines · On Mon, Oct 20, 2025 at 8:31 AM <[email protected]> wrote:
Quoted 19 lines · Lijo Lazar

For SDMA IP versions > v4.4.2, firmware will take care of quiescing SDMA
before mode-2 reset.

---
 drivers/gpu/drm/amd/amdgpu/aldebaran.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/aldebaran.c +0 -0
index 9569dc16dd3d..0007d00b9e8f 100644
@@ -88,6 +88,10 @@ static int aldebaran_mode2_suspend_ip(struct
 amdgpu_device *adev)
      uint32_t ip_block;
      int r, i;
 
Quoted 4 lines
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/aldebaran.c +1 -0
+     /* Skip suspend of SDMA IP versions > 4.4.2. They are multi-

aid */

What does "multi-aid" mean here?

Active Interposer Die. Multi-chiplet platforms like MI300.

Alex

Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/aldebaran.c +3 -0
+     if (adev->aid_mask)
+             ip_block_mask &= ~BIT(AMD_IP_BLOCK_TYPE_SDMA);
+
      amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
      amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);