Skip to contentSkip to conversation

drm/amdgpu: Fix vcn v5.0.1 poison irq call trace

PATCH In review Stanley.Yang 2 participants 4 messages Jul 29, 2025

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

PATCH 1/2 drm/amdgpu: Fix vcn v5.0.1 poison irq call trace

Why:

    [13014.890792] Call Trace:
    [13014.890793]  <TASK>
    [13014.890795]  ? show_trace_log_lvl+0x1d6/0x2ea
    [13014.890799]  ? show_trace_log_lvl+0x1d6/0x2ea
    [13014.890800]  ? vcn_v5_0_1_hw_fini+0xe9/0x110 [amdgpu]
    [13014.890872]  ? show_regs.part.0+0x23/0x29
    [13014.890873]  ? show_regs.cold+0x8/0xd
    [13014.890874]  ? amdgpu_irq_put+0xc6/0xe0 [amdgpu]
    [13014.890934]  ? __warn+0x8c/0x100
    [13014.890936]  ? amdgpu_irq_put+0xc6/0xe0 [amdgpu]
    [13014.890995]  ? report_bug+0xa4/0xd0
    [13014.890999]  ? handle_bug+0x39/0x90
    [13014.891001]  ? exc_invalid_op+0x19/0x70
    [13014.891003]  ? asm_exc_invalid_op+0x1b/0x20
    [13014.891005]  ? amdgpu_irq_put+0xc6/0xe0 [amdgpu]
    [13014.891065]  ? amdgpu_irq_put+0x63/0xe0 [amdgpu]
    [13014.891124]  vcn_v5_0_1_hw_fini+0xe9/0x110 [amdgpu]
    [13014.891189]  amdgpu_ip_block_hw_fini+0x3b/0x78 [amdgpu]
    [13014.891309]  amdgpu_device_fini_hw+0x3c1/0x479 [amdgpu]

How:
Add omitted vcn poison irq get call.

---
 drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 10 +++++-----
 drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c  |  7 +++++++
 2 files changed, 12 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c +5 -5
index af4f562db32b..51b9148626fc 100644
@@ -1069,6 +1069,11 @@ static int jpeg_v5_0_1_ras_late_init(struct amdgpu_device *adev, struct ras_comm
 	if (r)
 		return r;
 
+	r = amdgpu_ras_bind_aca(adev, AMDGPU_RAS_BLOCK__JPEG,
+				&jpeg_v5_0_1_aca_info, NULL);
+	if (r)
+		goto late_fini;
+
 	if (amdgpu_ras_is_supported(adev, ras_block->block) &&
 		adev->jpeg.inst->ras_poison_irq.funcs) {
 		r = amdgpu_irq_get(adev, &adev->jpeg.inst->ras_poison_irq, 0);
@@ -1076,11 +1081,6 @@ static int jpeg_v5_0_1_ras_late_init(struct amdgpu_device *adev, struct ras_comm
 			goto late_fini;
 	}
 
-	r = amdgpu_ras_bind_aca(adev, AMDGPU_RAS_BLOCK__JPEG,
-				&jpeg_v5_0_1_aca_info, NULL);
-	if (r)
-		goto late_fini;
-
 	return 0;
 
 late_fini:
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c +7 -0
index d788898808db..0333a2833b2e 100644
@@ -1611,6 +1611,13 @@ static int vcn_v5_0_1_ras_late_init(struct amdgpu_device *adev, struct ras_commo
 	if (r)
 		goto late_fini;
 
+	if (amdgpu_ras_is_supported(adev, ras_block->block) &&
+		adev->vcn.inst->ras_poison_irq.funcs) {
+		r = amdgpu_irq_get(adev, &adev->vcn.inst->ras_poison_irq, 0);
+		if (r)
+			goto late_fini;
+	}
+
 	return 0;
 
 late_fini:
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 drm/amdgpu: Add new error code for VCN/JPEG new chain

Add VIDS and JPEG8/9 S|D chain error code for VCN/JPEG v5.0.1.

---
 drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c  | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c +2 -1
index 51b9148626fc..961ab557fed7 100644
@@ -1028,7 +1028,8 @@ static int jpeg_v5_0_1_aca_bank_parser(struct aca_handle *handle, struct aca_ban
 /* reference to smu driver if header file */
 static int jpeg_v5_0_1_err_codes[] = {
 	16, 17, 18, 19, 20, 21, 22, 23, /* JPEG[0-7][S|D] */
-	24, 25, 26, 27, 28, 29, 30, 31
+	24, 25, 26, 27, 28, 29, 30, 31,
+	48, 49, 50, 51,
 };
 
 static bool jpeg_v5_0_1_aca_bank_is_valid(struct aca_handle *handle, struct aca_bank *bank,
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c +1 -1
index 0333a2833b2e..120414fb024d 100644
@@ -1565,7 +1565,7 @@ static int vcn_v5_0_1_aca_bank_parser(struct aca_handle *handle, struct aca_bank
 
 /* reference to smu driver if header file */
 static int vcn_v5_0_1_err_codes[] = {
-	14, 15, /* VCN */
+	14, 15, 47, /* VCN [D|V|S] */
 };
 
 static bool vcn_v5_0_1_aca_bank_is_valid(struct aca_handle *handle, struct aca_bank *bank,
Signature · 1 line
2.25.1
Reviewed-by Reviewed-by Hawking Zhang on v1 2/2
#2 lore raw

RE: [PATCH Review 2/2] drm/amdgpu: Add new error code for VCN/JPEG new chain

[AMD Official Use Only - AMD Internal Distribution Only]

        16, 17, 18, 19, 20, 21, 22, 23, /* JPEG[0-7][S|D] */

it is better to correct/add the code comments before submit patch, after that the series patch is

Best Regards,
Kevin

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Stanley.Yang
Sent: Tuesday, July 29, 2025 11:32 AM
To: [email protected]
Cc: Yang, Stanley <[email protected]>; Zhang, Hawking <[email protected]>
Subject: [PATCH Review 2/2] drm/amdgpu: Add new error code for VCN/JPEG new chain

Add VIDS and JPEG8/9 S|D chain error code for VCN/JPEG v5.0.1.

---
 drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 3 ++-  drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c  | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c +2 -1
index 51b9148626fc..961ab557fed7 100644
@@ -1028,7 +1028,8 @@ static int jpeg_v5_0_1_aca_bank_parser(struct aca_handle *handle, struct aca_ban
 /* reference to smu driver if header file */  static int jpeg_v5_0_1_err_codes[] = {
        16, 17, 18, 19, 20, 21, 22, 23, /* JPEG[0-7][S|D] */
-       24, 25, 26, 27, 28, 29, 30, 31
+       24, 25, 26, 27, 28, 29, 30, 31,
+       48, 49, 50, 51,
 };
 
 static bool jpeg_v5_0_1_aca_bank_is_valid(struct aca_handle *handle, struct aca_bank *bank, diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c

index 0333a2833b2e..120414fb024d 100644

drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c +1 -2
@@ -1565,7 +1565,7 @@ static int vcn_v5_0_1_aca_bank_parser(struct aca_handle *handle, struct aca_bank
 
 /* reference to smu driver if header file */  static int vcn_v5_0_1_err_codes[] = {
-       14, 15, /* VCN */
+       14, 15, 47, /* VCN [D|V|S] */
 };
 
 static bool vcn_v5_0_1_aca_bank_is_valid(struct aca_handle *handle, struct aca_bank *bank,
--

2.25.1

#3 lore raw

RE: [PATCH Review 2/2] drm/amdgpu: Add new error code for VCN/JPEG new chain

[AMD Official Use Only - AMD Internal Distribution Only]

Thanks, will update.

Regards,
Stanley

Quoted 75 lines

-----Original Message-----
From: Wang, Yang(Kevin) <[email protected]>
Sent: Tuesday, July 29, 2025 1:52 PM
To: Yang, Stanley <[email protected]>; [email protected]
Cc: Yang, Stanley <[email protected]>; Zhang, Hawking <[email protected]>
Subject: RE: [PATCH Review 2/2] drm/amdgpu: Add new error code for VCN/JPEG new chain

[AMD Official Use Only - AMD Internal Distribution Only]

        16, 17, 18, 19, 20, 21, 22, 23, /* JPEG[0-7][S|D] */

it is better to correct/add the code comments before submit patch, after that the series patch is

Best Regards,
Kevin

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Stanley.Yang
Sent: Tuesday, July 29, 2025 11:32 AM
To: [email protected]
Cc: Yang, Stanley <[email protected]>; Zhang, Hawking <[email protected]>
Subject: [PATCH Review 2/2] drm/amdgpu: Add new error code for VCN/JPEG new chain

Add VIDS and JPEG8/9 S|D chain error code for VCN/JPEG v5.0.1.

---
 drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 3 ++-
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c  | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c +0 -0
index 51b9148626fc..961ab557fed7 100644
@@ -1028,7 +1028,8 @@ static int jpeg_v5_0_1_aca_bank_parser(struct

aca_handle *handle, struct aca_ban
/* reference to smu driver if header file */ static int jpeg_v5_0_1_err_codes[]

= {
        16, 17, 18, 19, 20, 21, 22, 23, /* JPEG[0-7][S|D] */
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c +2 -1
-       24, 25, 26, 27, 28, 29, 30, 31
+       24, 25, 26, 27, 28, 29, 30, 31,
+       48, 49, 50, 51,
 };
 
 static bool jpeg_v5_0_1_aca_bank_is_valid(struct aca_handle *handle, struct

aca_bank *bank, diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c
index 0333a2833b2e..120414fb024d 100644

drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c +0 -0
@@ -1565,7 +1565,7 @@ static int vcn_v5_0_1_aca_bank_parser(struct

aca_handle *handle, struct aca_bank

/* reference to smu driver if header file */ static int vcn_v5_0_1_err_codes[] =
{

drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c +1 -1
-       14, 15, /* VCN */
+       14, 15, 47, /* VCN [D|V|S] */
 };
 
 static bool vcn_v5_0_1_aca_bank_is_valid(struct aca_handle *handle, struct

aca_bank *bank,
--
2.25.1