Skip to contentSkip to conversation

drm/amdgpu: decline max_me for mec2_fw remove in renoir/arcturus

PATCH In review [email protected] 3 participants 4 messages Feb 24, 2021 – Feb 25, 2021

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

PATCH 1/1 drm/amdgpu: decline max_me for mec2_fw remove in renoir/arcturus

From: changzhu <[email protected]>

From: Changfeng <[email protected]>

The value of max_me in amdgpu_gfx_rlc_setup_cp_table should reduce to 4 when mec2_fw is removed on asic renoir/arcturus. Or it will cause kernel NULL pointer when modprobe driver.

Change-Id I268610e85f6acd9200478d0ab1518349ff81469b
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +4 -1
index 2f56adebbb31..300a07227597 100644
@@ -1890,7 +1890,10 @@ static void gfx_v9_0_enable_lbpw(struct amdgpu_device *adev, bool enable)
 
 static int gfx_v9_0_cp_jump_table_num(struct amdgpu_device *adev)
 {
-	return 5;
+	if (gfx_v9_0_load_mec2_fw_bin_support(adev))
+		return 5;
+	else
+		return 4;
 }
 
 static int gfx_v9_0_rlc_init(struct amdgpu_device *adev)
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · On 02/24, [email protected] wrote:

From: changzhu <[email protected]>

From: Changfeng <[email protected]>

The value of max_me in amdgpu_gfx_rlc_setup_cp_table should reduce to 4 when mec2_fw is removed on asic renoir/arcturus. Or it will cause kernel NULL pointer when modprobe driver.

Hi,

The commit

6972f8d17f3603a6b002e42f7890a42d77e3e50b
drm/amdgpu: disable mec2 fw bin loading

introduced a regression to Renoir systems, basically the system hangs and your patch fixed the issue. I recommend you to add the Fixes label, i.e.:

Fixes 6972f8d17f36 ("drm/amdgpu: disable mec2 fw bin loading")

With that change,

Quoted 1 line

Change-Id: I268610e85f6acd9200478d0ab1518349ff81469b

Also, do we need this Change-Id?

Best Regards
Siqueira

Quoted 28 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +4 -1
index 2f56adebbb31..300a07227597 100644
@@ -1890,7 +1890,10 @@ static void gfx_v9_0_enable_lbpw(struct amdgpu_device *adev, bool enable)
 
 static int gfx_v9_0_cp_jump_table_num(struct amdgpu_device *adev)
 {
-	return 5;
+	if (gfx_v9_0_load_mec2_fw_bin_support(adev))
+		return 5;
+	else
+		return 4;
 }
 
 static int gfx_v9_0_rlc_init(struct amdgpu_device *adev)
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7CRodrigo.Siqueira%40amd.com%7Cccb7b58ed1df4111bc6b08d8d8a42b59%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637497546910967958%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=z0S60q8SZYqI3sHYZRucI2FjuXqll9ZdLfreHl8AQyo%3D&amp;reserved=0
Signature · 2 lines
Rodrigo Siqueira
https://siqueira.tech

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 10 lines · Changfeng

From: changzhu <[email protected]>

From: Changfeng <[email protected]>

The value of max_me in amdgpu_gfx_rlc_setup_cp_table should reduce to 4 when mec2_fw is removed on asic renoir/arcturus. Or it will cause kernel NULL pointer when modprobe driver.

Change-Id I268610e85f6acd9200478d0ab1518349ff81469b
Quoted 23 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +4 -1
index 2f56adebbb31..300a07227597 100644
@@ -1890,7 +1890,10 @@ static void gfx_v9_0_enable_lbpw(struct amdgpu_device *adev, bool enable)
 
 static int gfx_v9_0_cp_jump_table_num(struct amdgpu_device *adev)
 {
-	return 5;
+	if (gfx_v9_0_load_mec2_fw_bin_support(adev))
+		return 5;
+	else
+		return 4;
 }
 
 static int gfx_v9_0_rlc_init(struct amdgpu_device *adev)
Signature · 1 line
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author Reviewed-by Huang Rui
#3 lore raw

[AMD Official Use Only - Internal Distribution Only]

Thanks,Ray.

BR,
Changfeng.

-----Original Message-----
From: Huang, Ray <[email protected]>
Sent: Thursday, February 25, 2021 1:42 PM
To: Zhu, Changfeng <[email protected]>
Cc: [email protected]; Clements, John <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: decline max_me for mec2_fw remove in renoir/arcturus

Quoted 10 lines · Changfeng

From: changzhu <[email protected]>

From: Changfeng <[email protected]>

The value of max_me in amdgpu_gfx_rlc_setup_cp_table should reduce to 4 when mec2_fw is removed on asic renoir/arcturus. Or it will cause kernel NULL pointer when modprobe driver.

Change-Id I268610e85f6acd9200478d0ab1518349ff81469b
Quoted 22 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +4 -2
index 2f56adebbb31..300a07227597 100644
@@ -1890,7 +1890,10 @@ static void gfx_v9_0_enable_lbpw(struct 
 amdgpu_device *adev, bool enable)
 
 static int gfx_v9_0_cp_jump_table_num(struct amdgpu_device *adev)  {
-	return 5;
+	if (gfx_v9_0_load_mec2_fw_bin_support(adev))
+		return 5;
+	else
+		return 4;
 }
 
 static int gfx_v9_0_rlc_init(struct amdgpu_device *adev)
--
Quoted 2 lines

2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx