Skip to contentSkip to conversation

drm/amdgpu: Add fw minimum version check for usermode queue

PATCH Superseded Arvind Yadav 3 participants 4 messages Apr 10, 2025

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 drm/amdgpu: Add fw minimum version check for usermode queue

This patch is load usermode queue based on FW support for gfx11. CP Ucode FW version: [PFP = 2530, ME = 2390, MEC = 2600, MES = 120]

v2: Addressed review comments from Alex.
- Just check the firmware versions directly.

Cc Alex Deucher <[email protected]>
Cc Christian Koenig <[email protected]>
Cc Shashank Sharma <[email protected]>
Cc Sunil Khatri <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +8 -2
index 91d29f482c3c..62dcdba589cb 100644
@@ -1632,7 +1632,10 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
 	case IP_VERSION(11, 0, 3):
 #ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 		/* add firmware version checks here */
-		if (0) {
+		if (adev->gfx.me_fw_version  >= 2390 &&
+		    adev->gfx.pfp_fw_version >= 2530 &&
+		    adev->gfx.mec_fw_version >= 2600 &&
+		    adev->mes.fw_version[0] >= 120) {
 			adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
 			adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
 		}
@@ -1646,7 +1649,10 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
 	case IP_VERSION(11, 5, 3):
 #ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
 		/* add firmware version checks here */
-		if (0) {
+		if (adev->gfx.me_fw_version  >= 2390 &&
+		    adev->gfx.pfp_fw_version >= 2530 &&
+		    adev->gfx.mec_fw_version >= 2600 &&
+		    adev->mes.fw_version[0] >= 120) {
 			adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
 			adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
 		}
Signature · 1 line
2.34.1
#1 lore raw
Quoted 33 lines · Arvind Yadav

This patch is load usermode queue based on FW support for gfx11. CP Ucode FW version: [PFP = 2530, ME = 2390, MEC = 2600, MES = 120]

v2: Addressed review comments from Alex.
- Just check the firmware versions directly.

Cc Alex Deucher <[email protected]>
Cc Christian Koenig <[email protected]>
Cc Shashank Sharma <[email protected]>
Cc Sunil Khatri <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +4 -1
index 91d29f482c3c..62dcdba589cb 100644
@@ -1632,7 +1632,10 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
        case IP_VERSION(11, 0, 3):
 #ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
                /* add firmware version checks here */
-               if (0) {
+               if (adev->gfx.me_fw_version  >= 2390 &&
+                   adev->gfx.pfp_fw_version >= 2530 &&
+                   adev->gfx.mec_fw_version >= 2600 &&
+                   adev->mes.fw_version[0] >= 120) {
                        adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
                        adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
                }

drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block) · line 1655

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +4 -1
@@ -1646,7 +1649,10 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
        case IP_VERSION(11, 5, 3):
 #ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
                /* add firmware version checks here */
-               if (0) {
+               if (adev->gfx.me_fw_version  >= 2390 &&
+                   adev->gfx.pfp_fw_version >= 2530 &&
+                   adev->gfx.mec_fw_version >= 2600 &&
+                   adev->mes.fw_version[0] >= 120) {

Are you sure this is correct? I didn't think the firmware is ready yet for these families.

Alex

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +0 -1
                        adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
                        adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
                }
--

2.34.1

#2 lore raw
Quoted 35 lines · Alex Deucher
Quoted 34 lines · Arvind Yadav

This patch is load usermode queue based on FW support for gfx11. CP Ucode FW version: [PFP = 2530, ME = 2390, MEC = 2600, MES = 120]

v2: Addressed review comments from Alex.
- Just check the firmware versions directly.

Cc Alex Deucher <[email protected]>
Cc Christian Koenig <[email protected]>
Cc Shashank Sharma <[email protected]>
Cc Sunil Khatri <[email protected]>
---
  drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 10 ++++++++--
  1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +4 -1
index 91d29f482c3c..62dcdba589cb 100644
@@ -1632,7 +1632,10 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
         case IP_VERSION(11, 0, 3):
  #ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
                 /* add firmware version checks here */
-               if (0) {
+               if (adev->gfx.me_fw_version  >= 2390 &&
+                   adev->gfx.pfp_fw_version >= 2530 &&
+                   adev->gfx.mec_fw_version >= 2600 &&
+                   adev->mes.fw_version[0] >= 120) {
                         adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
                         adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
                 }
@@ -1646,7 +1649,10 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
         case IP_VERSION(11, 5, 3):
  #ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
Quoted 8 lines

drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block) · line 1638

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +4 -1
                 /* add firmware version checks here */
-               if (0) {
+               if (adev->gfx.me_fw_version  >= 2390 &&
+                   adev->gfx.pfp_fw_version >= 2530 &&
+                   adev->gfx.mec_fw_version >= 2600 &&
+                   adev->mes.fw_version[0] >= 120) {

Are you sure this is correct? I didn't think the firmware is ready yet for these families.

These version is shared by Mario. I have also added you in that mail. Firmware Type    navi4x    Navi3x
PFP                        2840    2530
ME                         2780    2390
MEC                       3050    2600

~arvind

Quoted 8 lines

Alex

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +0 -1
                         adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
                         adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
                 }
--

2.34.1

#3 lore raw
Quoted 46 lines · Arvind
Quoted 35 lines · Alex Deucher
Quoted 34 lines · Arvind Yadav

This patch is load usermode queue based on FW support for gfx11. CP Ucode FW version: [PFP = 2530, ME = 2390, MEC = 2600, MES = 120]

v2: Addressed review comments from Alex.
- Just check the firmware versions directly.

Cc Alex Deucher <[email protected]>
Cc Christian Koenig <[email protected]>
Cc Shashank Sharma <[email protected]>
Cc Sunil Khatri <[email protected]>
---
  drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 10 ++++++++--
  1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +4 -1
index 91d29f482c3c..62dcdba589cb 100644
@@ -1632,7 +1632,10 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
         case IP_VERSION(11, 0, 3):
  #ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
                 /* add firmware version checks here */
-               if (0) {
+               if (adev->gfx.me_fw_version  >= 2390 &&
+                   adev->gfx.pfp_fw_version >= 2530 &&
+                   adev->gfx.mec_fw_version >= 2600 &&
+                   adev->mes.fw_version[0] >= 120) {
                         adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
                         adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
                 }
@@ -1646,7 +1649,10 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
         case IP_VERSION(11, 5, 3):
  #ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
Quoted 8 lines

drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block) · line 1638

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +4 -1
                 /* add firmware version checks here */
-               if (0) {
+               if (adev->gfx.me_fw_version  >= 2390 &&
+                   adev->gfx.pfp_fw_version >= 2530 &&
+                   adev->gfx.mec_fw_version >= 2600 &&
+                   adev->mes.fw_version[0] >= 120) {

Are you sure this is correct? I didn't think the firmware is ready yet for these families.

Quoted 5 lines

These version is shared by Mario. I have also added you in that mail.

Firmware Type    navi4x    Navi3x
PFP                        2840    2530
ME                         2780    2390

MEC 3050 2600

Those are the dGPUs. The support for APUs is not ready yet.

Alex

Quoted 10 lines

~arvind

Quoted 8 lines

Alex

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +0 -1
                         adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
                         adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
                 }
--

2.34.1